Jump to content

SamuraiHUN

Member
  • Posts

    79
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by SamuraiHUN

  1. On 4/1/2023 at 6:09 PM, Metin2GH said:

    hi , i have a problem when i add the switchboot in binary 

     

    i know you say the sistem is sell in dis moment but in romania is posted for free

    when i want to compile si get dis erorr 

    uG7NGLJ.png

     

    auto& it2 = it->second.find(table.apply_num);

    change to

    const auto& it2 = it->second.find(table.apply_num);

  2. Basically in the char_item.cpp -> AutoGiveItem function don't have extend with stack item. 


    Check with this, and yes write the datatype to fit with your src.

    Search this:

     

    void CHARACTER::AutoGiveItem(LPITEM item, bool longOwnerShip)
    {
    	if (NULL == item)
    	{
    		sys_err ("NULL point.");
    		return;
    	}
    	if (item->GetOwner())
    	{
    		sys_err ("item %d 's owner exists!",item->GetID());
    		return;
    	}


    Add under this:

     

    	WORD bCount = item->GetCount();
    
    	if (item->GetType() == ITEM_BLEND)
    	{
    		for (int i=0; i < INVENTORY_MAX_NUM; i++)
    		{
    			LPITEM inv_item = GetInventoryItem(i);
    
    			if (inv_item == NULL)
    				continue;
    
    			if (inv_item->GetType() == ITEM_BLEND && inv_item->GetVnum() == item->GetVnum())
    			{
    				if (inv_item->GetSocket(0) == item->GetSocket(0) && inv_item->GetSocket(1) == item->GetSocket(1) && inv_item->GetSocket(2) == item->GetSocket(2) && inv_item->GetCount() < MAX_ITEM_STACK)
    				{
    					inv_item->SetCount(inv_item->GetCount() + item->GetCount());
    					M2_DESTROY_ITEM(item);
    					return;
    				}
    			}
    		}
    	}
    	else
    	{
    		TItemTable * p = ITEM_MANAGER::instance().GetTable(item->GetVnum());
    		if (!p)
    		{
    			M2_DESTROY_ITEM(item);
    			return;
    		}
    		if (p->dwFlags & ITEM_FLAG_STACKABLE)
    		{
    			for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
    			{
    				LPITEM invItem = GetInventoryItem(i);
    				if (!invItem)
    					continue;
    
    				if (invItem->GetVnum() == item->GetVnum() && FN_check_item_socket(invItem))
    				{
    					if (IS_SET(p->dwFlags, ITEM_FLAG_MAKECOUNT))
    					{
    						if (bCount < p->alValues[1])
    							bCount = p->alValues[1];
    					}
    					const WORD bCount2 = MIN(MAX_ITEM_STACK - invItem->GetCount(), bCount);
    					bCount -= bCount2;
    					invItem->SetCount(invItem->GetCount() + bCount2);
    					if (bCount == 0)
    					{
    						if (invItem->GetType() == ITEM_QUEST || invItem->GetType() == ITEM_MATERIAL)
    							quest::CQuestManager::instance().PickupItem (GetPlayerID(), invItem);
    						M2_DESTROY_ITEM(item);
    						return;
    					}
    				}
    			}
    		}
    	}
    
    	item->SetCount(bCount);

     

  3.  

    spacer.png

     

    Hey guys!

    We are looking for Community Manager's on our brand new, Newschool server, named HardSouls2. We have a strong Management, and we are building something new.
    The position's, that's are opened: -Spanish, portugese, turkish, polish Community Managers. Note, to fill these positions, you must be able to talk, and text in a good english. Join our Discord server, and get more information from the Server Manager, Negan#0011 (discord.gg/wsSPZzaKa2)

    • Think 1
  4. char.h search this:

     

    };
    
    enum EPKModes

    add before this.


     

    POINT_ATTBONUS_STONE = xy,


    The xy indicates the next line number.

    Packet.h

    need to change:

     

    POINT_ATTBONUS_STONE = xy,


    My file looks like (char.h):

     

    #ifdef BONUS_ATTBONUS_BOSS_AND_STONES
    	POINT_ATTBONUS_BOSS				= 145,
    	POINT_ATTBONUS_STONE			= 146,
    #endif


    + Userinterface/packet.h
     

    #ifdef BONUS_ATTBONUS_BOSS_AND_STONES
    	POINT_ATTBONUS_BOSS				= 145,
    	POINT_ATTBONUS_STONE			= 146,
    #endif

     

  5. item_length.h

    search this:

     

    enum EMaterialSubTypes
    {
    	MATERIAL_LEATHER,
    	MATERIAL_BLOOD,
    	MATERIAL_ROOT,
    	MATERIAL_NEEDLE,
    	MATERIAL_JEWEL,
    	MATERIAL_DS_REFINE_NORMAL,
    	MATERIAL_DS_REFINE_BLESSED,
    	MATERIAL_DS_REFINE_HOLLY,
    };

    extend with this:

     

    enum EMaterialSubTypes
    {
    	MATERIAL_LEATHER,
    	MATERIAL_BLOOD,
    	MATERIAL_ROOT,
    	MATERIAL_NEEDLE,
    	MATERIAL_JEWEL,
    	MATERIAL_DS_REFINE_NORMAL,
    	MATERIAL_DS_REFINE_BLESSED,
    	MATERIAL_DS_REFINE_HOLLY,
    #if defined(__DS_CHANGE_ATTR__)
    	MATERIAL_DS_CHANGE_ATTR,
    #endif
    };

    DragonSoul.cpp

     

    nullptr

    change to:

     

    NULL
  6. char.cpp

    add this to char.cpp
     

    void CHARACTER::ReloadMountBonus(LPITEM mountItem)
    {
    	RemoveAffect(AFFECT_MOUNT_BONUS);
    	
    	for (int i = 0; i < ITEM_APPLY_MAX_NUM; ++i)
    	{
    		if (mountItem->GetProto()->aApplies[i].bType == APPLY_NONE)
    			continue;
    
    		AddAffect(AFFECT_MOUNT_BONUS, aApplyInfo[mountItem->GetProto()->aApplies[i].bType].bPointType, mountItem->GetProto()->aApplies[i].lValue, AFF_NONE, 60*60*24*365, 0, false);
    	}
    }


    char.h

    search this:

     

    		bool 				IsRidingMount();

    add under this:

     

    		void				ReloadMountBonus(LPITEM mountItem);

    MountSystem.cpp

    search this:
     

    bool CMountActor::Mount(LPITEM mountItem)

    modify the function this:

     

    bool CMountActor::Mount(LPITEM mountItem)
    {
    	if (0 == m_pkOwner)
    		return false;
    	
    	if(!mountItem)
    		return false;
    
    	if (m_pkOwner->IsHorseRiding())
    		m_pkOwner->StopRiding();
    	
    	if (m_pkOwner->GetHorse())
    		m_pkOwner->HorseSummon(false);
    
    	Unmount();
    	int fixtime;
    
    	for (int i = 0; i < ITEM_LIMIT_MAX_NUM; i++)
    	{
    		if ((LIMIT_REAL_TIME == mountItem->GetLimitType(i)) || (LIMIT_REAL_TIME_START_FIRST_USE == mountItem->GetLimitType(i)))
    			fixtime = (DWORD)mountItem->GetSocket(0);
    		else
    			fixtime = INFINITE_AFFECT_DURATION;
    	}
    	m_pkOwner->AddAffect(AFFECT_MOUNT, POINT_MOUNT, m_dwVnum, AFF_NONE, fixtime - time(0), 0, true);
    
    	m_pkOwner->ReloadMountBonus(mountItem);
    	m_pkOwner->ComputePoints();
    	
    	return m_pkOwner->GetMountVnum() == m_dwVnum;
    }



    item_proto you can remove real_time for mount.

  7. 20 hours ago, Elders said:

    you can help me with this error?

    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::CGrid(int,int)" (??0CGrid@@QAE@HH@Z)
    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::~CGrid(void)" (??1CGrid@@QAE@XZ)
    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: void __thiscall CGrid::Clear(void)" (?Clear@CGrid@@QAEXXZ)
    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: int __thiscall CGrid::FindBlank(int,int)" (?FindBlank@CGrid@@QAEHHH@Z)
    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CGrid::Put(int,int,int)" (?Put@CGrid@@QAE_NHHH@Z)

     

    you forget add grid.cc to eterbase project.  right click eterbase -> add -> existing item and select grid.cc in eterbase libary.

    • Love 1
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.