• 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!

What is Unique ID/uid?

An identification number used to identify or assign specific actions to said item (e.g. adding a unique id to an item on your map will make it impossible to move).

Maybe someone else can explain in more detail. ;)
 
on rme map editor unique id its for quests on chest box, well not just for that but thats my example to make a quest like poi, where you take only 1 item you put the same unique id in all the boxes, so that makes all the boxes been the same box, if 1 its taken the rest show, you already took that item or something similar
 
Its pretty much what J.Dre said

An UID is an unique number between 100 and 65535 if I'm not mistaken, each number can be given a script that will be executed when that item is activated(using an item, stepping in/out of a tile)(configurable in actions.xml/movements.xml)
Items with an UID are also unable to be moved and there can only be 1 item with each UID on the server at any time(if there's a door with UID 1000, then no other item in the entire server can have that UID)

UID is pretty much the same as an AID(action id), the major differences are the limitations(unable to be moved and only 1 item with each UID)
 
Thanks for the replys =)
Well what I really wanted to know is what I should put for example: "doRemoveItem(uid<here>, <optional> n)".
Since it's supposed to remove an item, what should I write there? I saw some other scripts where it said "item.uid" but I get nothing from that :P
 
uid = the item id as we all know it so for example we all know gold coins its 3031 and optional n refers to a number


doRemoveItem(3031, 100)

will remove 100 gold coins (at least thats what i want to think, i didnt read it just a wild guess)
 
This will remove the item that you are using (e.g. food):

LUA:
doRemoveItem(item.uid, 1)
The following will remove "id", which I used in this script. It is fetching an item, from that position and removing it (if it's there).

LUA:
local id = getTileItemById({x = 100, y = 100, z = 7}, ITEM_ID_HERE).uid
if(id ~= 0) then
	doRemoveItem(id, 1)
end
You can learn a lot by reading scripts. My signature contains quite a few that may be helpful.

Good luck with learning how to code! :)
 
Back
Top