Jump to content

redscoutyt2

Inactive Member
  • Posts

    50
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by redscoutyt2

  1. Hi everyone! First of all, sorry for my bad English.
    I've tried to increase dwDuration in polymorph.cpp but it doesn't go over 35 minutes, how can I solve it?
    I did this:
     

    bool CPolymorphUtils::PolymorphCharacter(LPCHARACTER pChar, LPITEM pItem, const CMob* pMob, LPCHARACTER ch)
    {
    	bool hasTriceratops = false;
    
    	switch (pChar->GetSkillMasterType(POLYMORPH_SKILL_ID))
    	{
    		if (ch->FindAffect(AFFECT_TRICERATROPSZ))
    			hasTriceratops = true;
    		case SKILL_PERFECT_MASTER:
    			//dwDuration = 35;
    			//break;
    			if (hasTriceratops == true)
    			{
    				dwDuration = 40;
    				break;
    			}
    			else
    			{
    				dwDuration = 55;
    				break;
    			}

    I even increased dwDuration in the else function just to make sure it goes over 35 but it doesnt.
    Can someone help me?
    Thank you!

  2. It has one bug I can't solve. The problem is: When I drag an item(first item) to another item(second item), the second item disappears and the first item goes to the second item slot, and the second item just disappears. If i log out, or restart the client nothing will happen only when I restart the server. When I restart the server the second item which is disappers, will appear again.

     

    Solved, i'll update the post.

  3. Hi guys. I have a mount inventory system which is using the belt inventory. I have a button for it, and I had to have a Belt on to use it(like official) but I wanted to use it without Belt
    If you want to do this follow this tutorial, I'm not good at coding, so maybe there's better solution, but I did this that way. Sorry for my English.
    Open char_item.cpp and search:

    bool CHARACTER::IsEmptyItemGrid(TItemPos Cell, BYTE bSize, int iExceptionCell) const


    Search this in IsEmptyItemGrid (Item disappear fix by: Pisti95)

    if (Cell.IsBeltInventoryPosition())
    {
    	LPITEM beltItem = GetWear(WEAR_BELT);
    
    	if (NULL == beltItem)
    		return false;
      
    	if (false == CBeltInventoryHelper::IsAvailableCell(bCell - BELT_INVENTORY_SLOT_START, beltItem->GetValue(0)))
    		return false;

    Comment it, make it look like this:
     

    if (Cell.IsBeltInventoryPosition())
    {
    	//LPITEM beltItem = GetWear(WEAR_BELT);
    		
    	//if (NULL == beltItem)
    	//	return true;
    		
    	//if (false == CBeltInventoryHelper::IsAvailableCell(bCell - BELT_INVENTORY_SLOT_START, beltItem->GetValue(0)))
    	//	return false;

     

    Open belt_inventory_helper.h

    Search for:

    static bool IsExistItemInBeltInventory(LPCHARACTER pc)

    Make it look like this:

    	static bool IsExistItemInBeltInventory(LPCHARACTER pc)
    	{
    		//for (WORD i = BELT_INVENTORY_SLOT_START; i < BELT_INVENTORY_SLOT_END; ++i)
    		//{
    		//	LPITEM beltInventoryItem = pc->GetInventoryItem(i);
    		//
    		//	if (NULL != beltInventoryItem)
    		//		return true;
    		//}
    
    		return true;
    	}

    You can compile game.

    Python part to ,,turn off" disabled slots, and make it look like you have a Belt on
    Open uiinventory.py

     

    Search this in class BeltInventoryWindow

    def RefreshSlot(self):

    Change this:
     

    self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, True)

    To this:
     

    self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, False)

    Then change this:
     

    self.wndBeltInventorySlot.DisableCoverButton(slotNumber)

    To this:
     

    self.wndBeltInventorySlot.EnableCoverButton(slotNumber)

    And I dont know if its necessary, but I did these thing too

    Search for this in class BeltInventoryWindow

    def __LoadWindow(self):

    In this search for:

    for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
    	slotNumber = item.BELT_INVENTORY_SLOT_START + i
    	wndBeltInventorySlot.SetCoverButton(slotNumber,	"d:/ymir work/ui/game/quest/slot_button_01.sub",\
    										"d:/ymir work/ui/game/quest/slot_button_01.sub",\
    										"d:/ymir work/ui/game/quest/slot_button_01.sub")
    										"d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False)

    And comment the last line, make it look like this:

    #"d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False)

    Client source (Still don't know, if it's necessary or not)
    Open Userinterface/PythonPlayerModule.cpp

    Search for:

    #ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
    PyObject * playerIsEquippingBelt(PyObject* poSelf, PyObject* poArgs)
    {

    Make it look like this: (Change PyObject * playerIsAvailableBeltInventoryCell(PyObject* poSelf, PyObject* poArgs) too! )
     

    #ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
    PyObject * playerIsEquippingBelt(PyObject* poSelf, PyObject* poArgs)
    {
    	const CPythonPlayer* player = CPythonPlayer::InstancePtr();
    	bool bEquipping = false;
    
    //	const TItemData* data = player->GetItemData(TItemPos(EQUIPMENT, c_Equipment_Belt));
    //
    //	if (NULL != data)
    //		bEquipping = 0 < data->count;
    
    	return Py_BuildValue("b", bEquipping);
    	
    }
    
    PyObject * playerIsAvailableBeltInventoryCell(PyObject* poSelf, PyObject* poArgs)
    {
    	const CPythonPlayer* player = CPythonPlayer::InstancePtr();
    //	const TItemData* pData = player->GetItemData(TItemPos(EQUIPMENT, c_Equipment_Belt));
    //
    //	if (NULL == pData || 0 == pData->count)
    //		return Py_BuildValue("b", true);
    //
    //	CItemManager::Instance().SelectItemData(pData->vnum);
    	CItemData * pItem = CItemManager::Instance().GetSelectedItemDataPointer();
    
    	long beltGrade = pItem->GetValue(0);
    
    	int pos = 0;
    	if (!PyTuple_GetInteger(poArgs, 0, &pos))
    		return Py_BadArgument();
    
    	//return Py_BuildValue("b", CBeltInventoryHelper::IsAvailableCell(pos - c_Belt_Inventory_Slot_Start, GetItemGrade(pItem->GetName())));
    	return Py_BuildValue("b", CBeltInventoryHelper::IsAvailableCell(pos - c_Belt_Inventory_Slot_Start, beltGrade));
    }
    #endif


    And we're done. Have a good day!

    • Good 2
    • Love 1
  4. Hi everyone! First of all, sorry for my bad English.
    I have a big problem, its very annoying, the problem is: I'm testing my server with my friends, we're killing mobs, testing runs, and the game randomly kicks me/or one of my friends to the login menu, they can log in back to the character select menu, they select their character, the game starts loading, then immediately drops them into the login menu, and they cant log in only after a server restart.
    So if I restart the server, they can log in back, no sysser.
    Can someone help me please? Its very annoying and I dont even know how to fix it
    Edit: They can log in with another character, but not with the one the game dropped

×
×
  • 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.