is it possible to make if i have an action id on a tile, then it will create item?
then is it just to do like this.
thanks.
Code:
function onUse(cid, item, frompos, item2, topos)
pos = getPlayerPosition(cid)
if item2.itemid == 0 then
return 0
end
if item2.itemid == 468 then
doTransformItem(item2.uid,469)
doDecayItem(item2.uid)
elseif item2.itemid == 481 then
doTransformItem(item2.uid,482)
doDecayItem(item2.uid)
elseif item2.itemid == 483 then
doTransformItem(item2.uid,484)
doDecayItem(item2.uid)
elseif item2.itemid == 231 then
rand = math.random(1,30)
if rand == 6 then
doSummonCreature("Scarab", topos)
doTeleportThing(cid,topos)
doTeleportThing(cid,pos)
elseif rand == 15 then
doPlayerAddItem(cid,2159,1)
else
doSendMagicEffect(topos,2)
end
else
return 0
end
return 1
end
then is it just to do like this.
Code:
if item.aid == 55555 then
doTransformItem(item2.uid,469)
doDecayItem(item2.uid)