Jump to content

rewrote function for energy display


Recommended Posts

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

Edited by ShyD
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 3

      Crystal Metinstone

    2. 3

      Feeding game source to LLM

    3. 113

      Ulthar SF V2 (TMP4 Base)

    4. 3

      Feeding game source to LLM

    5. 0

      Target Information System

    6. 3

      Feeding game source to LLM

    7. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.