ond
Veteran OT User
What I want it to do:
I want the first item to get an action of 6010
Here is the script:
I want the first item to get an action of 6010
Here is the script:
LUA:
local ids = {2091, 2151, 2230, 2229, 1953}
local charges = {1, 2, 1, 1, 1}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, item.uid) ~= 1 then
setPlayerStorageValue(cid, item.uid, 1)
local bp = doPlayerAddItem(cid, 1987, 1)
for i = 1, #ids do
doAddContainerItem(bp, ids[i], charges[i])
doSetItemActionId(ids, 6010)
doPlayerSendTextMessage(cid,22,"You have found a bag.")
end
return TRUE
end
end