• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Get item object through the item ID

lord vortexx

New Member
Joined
Dec 14, 2008
Messages
92
Reaction score
3
My doubt is very simple, I just want to get the item (for display on a component of a module), but this item must be obtained through the ID containing the item.zml.

Thank you in advance, Thank you very much
 
1. does the item already exist in game somewhere?
1.1 If yes then where, Player has it, on the ground, somewhere on the map

Else make game.createItem(itemid) gives you the item.
 
sorry if I'm wrong, but is not working, should I just put in my module, game.createItem (item ID in item.xml)?

I tried to do this and said that game there, I looked on github by createItem and also not found
 
sorry if I'm wrong, but is not working, should I just put in my module, game.createItem (item ID in item.xml)?

I tried to do this and said that game there, I looked on github by createItem and also not found
I don't even know what server version you are using.
I'm just giving solution for TFS 1.x
and line is: Game.createItem(itemId, count[, position])
 
Sorry, I guess I'm confused, it would be to create the item through a server-side script, what I wanted was just to show a component "Item" contained in a module of OTClient.
The problem is that to show the item in this component the item.xml ID serves not have to be the other part (the otb I believe)
 
oh, well i know nothing about OTC, so nevermind me.
Edit: didn't notice it was posted in OTC topic.
the title looked like its a question from support thread xD
 
Last edited:
No problem, I was confused because the post in this section OtClient ^^
But Thanks for the help.

Thank you
 
Back
Top