• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Changing aid

richux

Tibera.org
Joined
Aug 18, 2008
Messages
3,666
Reaction score
26
Location
---------
How do I tell the script wich(location or smth like that) item to change aid using these functions?


This one deletes current aid(I think)
Code:
doItemEraseAttribute(uid, key)


This function sets aid:


Code:
doItemSetAttribute(uid, key, value) //Keys are aid, uid


Cuz I am getting error -

Code:
item not found


Here is example of script:

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local enter = {x=2975, y=3083, z=7}

local TreePos = {x=2975, y=3081, z=7} -- ignore tthis one


if getPlayerStorageValue(cid, 15007) == 1 then
doTeleportThing(cid, enter, TRUE)
doItemSetAttribute(uid, aid, 7788)
else
doSendMagicEffect(enter, CONST_ME_POFF)

end
end

HalP!
 
Last edited:
Back
Top