Jump to content

Recommended Posts

  • Active+ Member

Hello there. How do we use the def AddItemData function in Python?

When calling this function elsewhere, do we have to call all the arguments in it?

 

examp func:

def AddItemData(self, itemVnum, metinSlot, attrSlot = 0, evolution = 0, flags = 0, unbindTime = 0, window_type = player.INVENTORY, slotIndex = -1, preview = 0):

 

and in the def SetInventoryItem:

self.AddItemData(itemVnum, metinSlot, attrSlot, player.GetItemEvolution(window_type, slotIndex), window_type, slotIndex, 1)

Can we call it?

Link to comment
https://metin2.dev/topic/28066-py-how-to-use-the-def-additemdata-function/
Share on other sites

  • Bot

If the argument have a default value and you don't need that argument you can skip it. And if you need let's say the last argument (which have a default value) you can use it like this :

self.AddItemData(itemVnum, metinSlot, attrSlot, preview = 1)

 

  • Metin2 Dev 1

english_banner.gif

  • Active+ Member
9 minutes ago, Abel(Tiger) said:

If the argument have a default value and you don't need that argument you can skip it. And if you need let's say the last argument (which have a default value) you can use it like this :

self.AddItemData(itemVnum, metinSlot, attrSlot, preview = 1)

 

Thanks ❤️

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.