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

Need 2 Functions please :), getItemActionId - setItemActionId

Blood BlvD Ot

Member
Joined
Jun 12, 2010
Messages
243
Reaction score
7
Aight this is what I need, 2 functions. getItemActionId and setItemActionId
I have no clue how to write functions but something like this i think for an example?

function setItemActionId(uid,id)
return doItemSetAttribute(uid,'id',actionid)
end

function getItemAction(uid,id)
return getItemAttribute(uid,'id',actionid)
end
 
ID that you specify should be the number right? not the aid or uid (Since the funcion says what to do [add actionID])

Try this:
LUA:
function setItemActionId(uid,id)
return doItemSetAttribute(uid,'aid',id)
end

function getItemActionId(uid,id)
return getItemAttribute(uid,'aid',id)
end

Else just use set/getItemAttribute since its the same.
 
yea cus what I'ma do is
Code:
function setItemActionId(uid,id)
return doItemSetAttribute(uid,'aid',id)
end
 
function getItemActionId(uid,id)
return getItemAttribute(uid,'aid',id)
end
local switchPos = {x = XXXX, y = XXXX, z = XXXX, stackpos = 253}
local switch = getThingFromPos(switchPos)

        if getItemActionId(switch) == ID then
                 do stuff
        else
             Someone Is already in the Area message :P

And the other function is in another script witch does -1 to the action id everytime someone will die :P
 
lol In another script i need it to be able to get an item from a specific position..
or could i jsut say
local switchPos = position stuff
local switch = getThingFromPos(switchPos)

if switch.aid == 1 then


???
 
Back
Top