ruth
Veteran OT User
- Joined
- Aug 3, 2009
- Messages
- 670
- Solutions
- 2
- Reaction score
- 380
Hello.
Can somebody add to this shovel.lua script open tomb function? It must use action or unique id assigned to sand.
Sand id = 231
Open hole id = 482
For example:
But i dont know if it working and how to combine these two scripts.
Can somebody add to this shovel.lua script open tomb function? It must use action or unique id assigned to sand.
Sand id = 231
Open hole id = 482
Code:
function onUse(cid, item, frompos, item2, topos)
if item2.itemid == 28 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 < 12 then
doSummonCreature("Scarab", topos)
elseif rand == 20 then
doPlayerAddItem(cid,2159,1)
else
doSendMagicEffect(topos,2)
end
else
return 0
end
return 1
end
For example:
Code:
itemEx.itemid == 231 and itemEx.uid == 4000) then
doTransformItem(itemEx.uid, 482)