Jump to content
  • 0
Sign in to follow this  
useless69

open poison icon at gauge MOB

Question

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!

Share this post


Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Recently Browsing   0 members

    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.