Jump to content

ShyD

Banned
  • Posts

    50
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by ShyD

  1. hey guys! as i have mentioned in the title i rewrote energy gauge display cuz i changed the attribute what you get from energycrystal ...

    Now my question: is there any way to track the increasement from a attribute due to an item in python? before (from original code) it was "player.GetStatus (player.ENERGY)" and ofc its working cuz energy attribute was 0 before activating the item but i changed it to melee magic damage increasement so the getStaus thing wont work cuz its just outputting the total amount of the actual attribute

     

    	def RefreshStatus(self):
    		for invslotnumber in xrange(player.INVENTORY_PAGE_SIZE*4):
    			getItemVNum=player.GetItemIndex
    			itemVnum = getItemVNum(invslotnumber)
    			if itemVnum == 50296:##for item with 10% attribute
    				if player.GetItemMetinSocket(invslotnumber, 5) == 1:
    					pointEnergy = 10
    					leftTimeEnergy = 2
    					self.SetEnergy (pointEnergy, leftTimeEnergy, 7200)
    				else:
    					pointEnergy = 0
    					leftTimeEnergy = 0
    					self.SetEnergy (pointEnergy, leftTimeEnergy, 7200)
    			elif itemVnum == 50297:##for item with 5% attribute
    				if player.GetItemMetinSocket(invslotnumber, 5) == 1:
    					pointEnergy = 5
    					leftTimeEnergy = 1
    					self.SetEnergy (pointEnergy, leftTimeEnergy, 7200)
    				else:
    					pointEnergy = 0
    					leftTimeEnergy = 0
    					self.SetEnergy (pointEnergy, leftTimeEnergy, 7200)

    this was my attempt, its working but if you change character it will display the blue image although there is no item activated somehow, even on a new account

    what am i missing? 

     

    nvm solved it with setting the energy to 0 before

  2. Hey guys, when i have a stack autopotions and i press right Click on it, it will unstack one Potion and activate it + slot effect cuz its a New item.. when i hover on it it will disable the active effect.. when i put different potion like movespeed it will refresh the autopotion so the effect will be visible in inventory. Any ideas how i can disable the Highlight slot for the item or maybe i can Do a refresh somewhere ? When i change invenory Page the effect will be back aswell...

  3. hey guys, i have this error in my first core from ch1... any idea ? i did not changed anything in this function...

    LPITEM CItem::RemoveFromCharacter()
    {
    	if (!m_pOwner)
    	{
    		sys_err("Item::RemoveFromCharacter owner null");
    		return (this);
    	}
    
    	LPCHARACTER pOwner = m_pOwner;
    
    	if (m_bEquipped)	// �����Ǿ��°�?
    	{
    		Unequip();
    		//pOwner->UpdatePacket();
    
    		SetWindow(RESERVED_WINDOW);
    		Save();
    		return (this);
    	}
    	else
    	{
    		if (GetWindow() != SAFEBOX && GetWindow() != MALL)
    		{
    			if (IsDragonSoul())
    			{
    				if (m_wCell >= DRAGON_SOUL_INVENTORY_MAX_NUM)
    					sys_err("CItem::RemoveFromCharacter: pos >= DRAGON_SOUL_INVENTORY_MAX_NUM");
    				else
    					pOwner->SetItem(TItemPos(m_bWindow, m_wCell), NULL);
    			}
    #ifdef ENABLE_SWITCHBOT
    			else if (m_bWindow == SWITCHBOT)
    			{
    				if (m_wCell >= SWITCHBOT_SLOT_COUNT)
    				{
    					sys_err("CItem::RemoveFromCharacter: pos >= SWITCHBOT_SLOT_COUNT");
    				}
    				else
    				{
    					pOwner->SetItem(TItemPos(SWITCHBOT, m_wCell), NULL);
    				}
    			}
    #endif
    			else
    			{
    				TItemPos cell(INVENTORY, m_wCell);
    #ifdef ENABLE_SPECIAL_INVENTORY
    				bool defaultSpecialInventoryPosition = GetSpecialInventoryType() != -1 && cell.IsSpecialInventoryPosition();
    				if (false == cell.IsDefaultInventoryPosition() && false == cell.IsBeltInventoryPosition() && false == defaultSpecialInventoryPosition)
    #else
    				if (false == cell.IsDefaultInventoryPosition() && false == cell.IsBeltInventoryPosition())
    #endif
    					sys_err("CItem::RemoveFromCharacter: Invalid Item Position");
    				else
    				{
    					pOwner->SetItem(cell, NULL);
    				}
    			}
    		}
    
    		m_pOwner = NULL;
    		m_wCell = 0;
    
    		SetWindow(RESERVED_WINDOW);
    		Save();
    		return (this);
    	}
    }

    this is my remove item function

  4. Hey guys!

    i have this problem.. sometimes when i attack some mobs it shows random element

    i already tried in char.pp what sonitex wrote
    If someone has the same issues as me with elements sometimes being shown wrong replace this part of function in char.cpp:

    for (int i = RACE_FLAG_ATT_ELEC; i <= RACE_FLAG_ATT_DARK; i = 2)

    { int diff = raceFlag - i;

    if (abs(diff) <= 1024) break;

    }

    to this:

    for (int i = RACE_FLAG_ATT_ELEC; i <= RACE_FLAG_ATT_DARK; i= 2) {

    curElementBase++;

    if (raceFlag & i)

    break;

    }

    Gyazo from problem

  5. On 7/23/2022 at 11:12 PM, TMP4 said:

    it's either on you or the tutorial.

    i now tested ur tutorial. its completely same. all working good but its not same position like on official server(its too much at the back of character when equiped).. its not fixable with ur tutorial...its 100% not about me. a friend tried same (he has more than 2 years experience in this editing now) and he got same problem... i actually would pay for a fix. can sb help?

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