Jump to content

poison icon at gauge MOB


Recommended Posts

hello i trying to do poison icon at hp gauge for mob(not for players!), so if MOB have poison, that icon show it, but i still fail, can somebody help me, im not best in this.
here is my code:

game.py
 

	def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
		self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
		if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
			self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
		elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
			self.BINARY_DragonSoulGiveQuilification()
			
		elif chr.AFFECT_POISON == type or 209 == type:
			self.interface.poisonshow()

	def BINARY_NEW_RemoveAffect(self, type, pointIdx):
		self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
		if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
			self.interface.DragonSoulDeactivate()
		elif chr.AFFECT_POISON == type or 209 == type:
			self.interface.poisonhide()

interfacemodule.py
 

	def poisonshow(self):
		self.TargetBoard.HPPoisonEffectShow()
		
	def poisonhide(self):
		self.TargetBoard.HPPoisonEffectHide()

uitarget.py
 

	def HPPoisonEffectShow(self):
		self.poisonEffect = 1
		
	def HPPoisonEffectHide(self):
		self.poisonEffect = 0


	def SetEnemyVID(self, vid):
		self.SetTargetVID(vid)

		name = chr.GetNameByVID(vid)
		
		if app.ENABLE_SEND_TARGET_INFO:
			vnum = nonplayer.GetRaceNumByVID(vid)
		if app.ENABLE_SEND_TARGET_INFO:
			vnum2 = nonplayer.GetRaceNumByVID(vid)
		level = nonplayer.GetLevelByVID(vid)
		grade = nonplayer.GetGradeByVID(vid)
		nameFront1 = " "
		nameFront2 = " "
		nameFront = localeInfo.MOB_INFO_MENO + str(name)
		if -1 != level:
			nameFront1 = localeInfo.MOB_INFO_LEVEL + str(level) + " "
		if self.GRADE_NAME.has_key(grade):
			nameFront2 = localeInfo.MOB_INFO_HODNOST + self.GRADE_NAME[grade]

		self.SetTargetName(nameFront)
		self.SetTargetName1(nameFront1)
		self.SetTargetName2(nameFront2)
		
		if app.ENABLE_SEND_TARGET_INFO:
			(textWidth, textHeight) = self.name.GetTextSize()

			self.infoButton.SetPosition(textWidth + 25, 12)
			self.infoButton.SetWindowHorizontalAlignLeft()

			self.vnum = vnum
			if chr.GetInstanceType(self.vid) == chr.INSTANCE_TYPE_PLAYER:
				self.infoButton.Hide()
			else:
				self.infoButton.Show()
				
		if app.ENABLE_SEND_TARGET_INFO:
			(textWidth, textHeight) = self.name.GetTextSize()

			self.infoButton2.SetPosition(textWidth + 65, 12)
			self.infoButton2.SetWindowHorizontalAlignLeft()

			self.vnum2 = vnum2
			if chr.GetInstanceType(self.vid) == chr.INSTANCE_TYPE_PLAYER:
				self.infoButton2.Hide()
		 if self.poisonEffect == 0:
		    self.infoButton2.Hide()
		 else:
			self.infoButton2.Show()

if i make  

if self.poisonEffect == 0:
                     self.infoButton2.show()


that show that icon, so in icon is not problem, only client dont know when show it, dont know when is poison maybe? THANKS VERY MUCH FOR ANY HELP.

Have a nice day!

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

      [Discussion] Rain - The First Person that leaked the M2 Files

    2. 0

      [Client] All tabs opening after quest/npc talk or even shop // PORTS

    3. 0

      Arrow does not hide at warp

    4. 0

      Problem with sidebar by vegas

    5. 58

      Discord Rich Presence

    6. 145

      Full Costume Mount System

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