Jump to content

Help condition in Item level text/icon


Go to solution Solved by Mali,

Recommended Posts

  • Active Member
		####Item level text/icon ###
		itemName=item.GetItemName().strip()
		itemNameP=item.GetItemName().rfind('+')
		if itemNameP>0 and len(itemName)>itemNameP+1:
			level=itemName[itemNameP+1:]
			if level.isdigit():
				wndMgr.SetSlotLevelImage(self.hWnd, renderingSlotNumber, ("icon/level/%d.tga"%int(level)))
		####Item level text/icon END ###

How can I create a condition to not apply the level icon to stones, because as they are stackable, the level icon is above the quantity, but I was not successful, could someone give an example of how I can do it?

 

I tried by condition in the function above.

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

  • Honorable Member
  • Solution
item.GetItemType() != item.ITEM_TYPE_METIN

 

more exception:

if not item.GetItemType() in (item.ITEM_TYPE_METIN, item.ITEM_TYPE_ARMOR)

 

Edited by Mali61
  • Love 1

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.