Blasphemy
Well-Known Member
- Joined
- Jan 5, 2012
- Messages
- 387
- Reaction score
- 71
Hello everyone, I have the next issue:
When I use pick on a tile with actions "55555" or "55556" It creates the hole id "5024" that decays to "0" on 10 seconds, but the item never decays, so I think that there's another function I'm missing, someone can help me?
Thanks everyone <3
"items.xml":
"Pick.lua"
When I use pick on a tile with actions "55555" or "55556" It creates the hole id "5024" that decays to "0" on 10 seconds, but the item never decays, so I think that there's another function I'm missing, someone can help me?
Thanks everyone <3
"items.xml":
Code:
<item id="5024" article="a" name="pickhole">
<attribute key="decayTo" value="0"/>
<attribute key="duration" value="10"/>
<attribute key="floorchange" value="down"/>
</item>
"Pick.lua"
Code:
function onUse(cid, item, frompos, item2, topos)
aID = 55556 --Action Id the ground tile must have to turn into a hole.
aID2 = 55555
ticks = 20
topos = {x=topos.x, y=topos.y, z=topos.z}
GRASS = {4526, 4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4529, 4540, 4541, 4567, 4568, 4569, 4756}
DIRT = {351, 352, 353, 354, 355}
SNOW = {671, 6683, 6684, 6685, 6686, 7002}
SAND = {231}
DENY = {383, 384, 385, 392, 418, 469, 470, 482, 484, 485, 489}
if item2.actionid == aID or item2.actionid == aID2 then
if isInArray(GRASS, item2.itemid) == 1 then
doCreateItem(5024, 1, topos)
elseif isInArray(DIRT, item2.itemid) == 1 then
doCreateItem(5024, 1, topos)
elseif isInArray(SAND, item2.itemid) == 1 then
doCreateItem(5024, 1, topos)
elseif isInArray(SNOW, item2.itemid) == 1 then
doCreateItem(5024, 1, topos)
elseif isInArray(DENY, item2.itemid) == 1 then
doPlayerSendTextMessage(cid,23,"Sorry! not possible.")
else
doCreateItem(5024, 1, topos)
end
end
return true
end