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