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

doSetItemActionId() TFS 1.1

Frikx

Computer Science
Joined
Mar 10, 2013
Messages
128
Solutions
3
Reaction score
31
Location
Spain
GitHub
amatria
What's the function to set an Actioin ID to an ítem by LUA?

Thanks
 
you can use ..
Code:
local item = player:addItem(2523) -- blessed shield :3
if not item then
    return true
end
item:setActionId(value)
end
 
you can use ..
Code:
local item = player:addItem(2523) -- blessed shield :3
if not item then
    return true
end
item:setActionId(value)
end

Code:
local item = doCreateItem(pos, 1, id)
if not item then
    return true
end
item:setActionId(value)

Could it work?
 
Code:
local item = doCreateItem(pos, 1, id)
if not item then
    return true
end
item:setActionId(value)

Could it work?
Code:
--Taken from sources
--doCreateItem(itemid, type/count, pos)
local item = doCreateItem(id, 1 pos)
    if not item then
        return true
    end
    item:setActionId(value)

id, 1 & pos must be passed as arguments to doCreateItem in the order seen above, itemid, type/count, pos are just descriptive placeholders (e.g. parameters) that tell you the type of data to passed to them.
 
here work

Could you pls send me your example?

Mine is not working.

Code:
function onSay(player, words, param)
local item = doCreateItem(405, 1, {x=193, y=386, z=6})
if not item then
   return true
end
item:setActionId(5401)
return true
end

--EDIT

Gotem!

Code:
 local item = doCreateItem(405, 1, {x=193, y=386, z=6})
 doSetItemActionId(item, 4501)

Thanks dudes
 
Last edited:
Could you pls send me your example?

Mine is not working.

Code:
function onSay(player, words, param)
local item = doCreateItem(405, 1, {x=193, y=386, z=6})
if not item then
   return true
end
item:setActionId(5401)
return true
end
Code:
item = doCreateItem(405, 1, {x=193, y=386, z=6})
doSetItemActionId(item, 5401)
 
Back
Top