Jump to content

Block item/function on map in python


Recommended Posts

Not tested, wrote from phone.

 

	def Block(self, slot, map, vnum):
		item_vnum = player.GetItemIndex(slot)
		item.SelectItem(item_vnum)

		if (background.GetCurrentMapName() == str(map_name)) and (item_vnum == int(vnum)):
			chat.AppendChat(chat.CHAT_TYPE_INFO, "#error 33121")
			return

	def __UseItem(self, slotIndex):
		self.Block(slotIndex, "metin2_map_c1", 19)

It might be extended to other functions, but thats basic

 

Edited by ridetpro
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.