Jump to content

Antiflag Tooltip System


Recommended Posts

  • Premium

M2 Download Center

This is the hidden content, please
( Internal )

Hello,

this type of system was already released on TurkMMO today, I thought I will post a in my opinion better implementation of this system.

 

Download: 

This is the hidden content, please

Thanks to VegaS for the re-edit.

 

Kind regards,

CHMarvin.

 

  • Metin2 Dev 220
  • kekw 2
  • Dislove 4
  • Angry 1
  • Not Good 1
  • Sad 2
  • Cry 1
  • Smile Tear 2
  • Confused 3
  • Scream 2
  • Lmao 1
  • Good 59
  • Love 6
  • Love 98
Link to comment
Share on other sites

  • Forum Moderator
On 8/31/2019 at 9:34 PM, CHMarvin said:
Spoiler


	ANTI_FLAG_NAMES = (
		localeInfo.TOOLTIP_ANTIFLAG_DROP,
		localeInfo.TOOLTIP_ANTIFLAG_SELL,
		localeInfo.TOOLTIP_ANTIFLAG_GIVE,
		localeInfo.TOOLTIP_ANTIFLAG_PKDROP,
		localeInfo.TOOLTIP_ANTIFLAG_STACK,
		localeInfo.TOOLTIP_ANTIFLAG_MYSHOP,
	)
	ANTI_FLAG_COUNT = len(ANTI_FLAG_NAMES)

	def AppendAntiflagInformation(self):
		self.AppendSpace(5)
	
		antiFlagList = (
			item.IsAntiFlag(item.ITEM_ANTIFLAG_DROP),	
			item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL),
			item.IsAntiFlag(item.ITEM_ANTIFLAG_GIVE),
			item.IsAntiFlag(item.ITEM_ANTIFLAG_PKDROP),
			item.IsAntiFlag(item.ITEM_ANTIFLAG_STACK),
			item.IsAntiFlag(item.ITEM_ANTIFLAG_MYSHOP),
			item.IsAntiFlag(item.ITEM_ANTIFLAG_SAFEBOX),
		)
		
		antiFlagNames = ""
		flagCount = 0
		for i in xrange(self.ANTI_FLAG_COUNT):

			name = self.ANTI_FLAG_NAMES[i]
			flag = antiFlagList[i]

			if flag:
				if flagCount > 0:
					antiFlagNames += ", "
				flagCount = flagCount + 1
				antiFlagNames += name
				
		if flagCount > 0:
			antiFlagNames += " "
			antiFlagNames += localeInfo.NOT_POSSIBLE
		
		if antiFlagNames != "":
			textLine = self.AppendTextLine(antiFlagNames, self.CONDITION_COLOR)
			textLine.SetFeather()

I would do it like this, in a simple way, without useless code, as i said in another forum too.

This is the hidden content, please

 

  • Metin2 Dev 126
  • kekw 2
  • Eyes 2
  • Dislove 1
  • Angry 1
  • Not Good 2
  • Think 4
  • Scream 2
  • Good 23
  • Love 2
  • Love 81
Link to comment
Share on other sites

  • 8 months later...
  • 2 years later...
  • 7 months later...

Announcements



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