Hello everyone!
I'm using Avest SQL Engine, and I'm having a problem with the pick.
It is working like it should, but it doesn't close the holes afterwards!
(The hole won't close once it has been opened by pick)
THIS IS THE CURRENT NON-WORKING SCRIPT:
Anybody out there's able to help?
Thanks in advance.
I'm using Avest SQL Engine, and I'm having a problem with the pick.
It is working like it should, but it doesn't close the holes afterwards!
(The hole won't close once it has been opened by pick)
THIS IS THE CURRENT NON-WORKING SCRIPT:
LUA:
function onUse(cid, item, frompos, item2, topos)
aID = 55555 --Action Id the ground tile must have to turn into a hole.
ticks = 30 --How many seconds the hole will last before turning into a normal tile again
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}
if item2.actionid == aID then
if isInArray(GRASS, item2.itemid) == 1 then
doTransformItem(item2.uid,470)
doDecayItemTo(topos, item2.itemid, ticks)
elseif isInArray(DIRT, item2.itemid) == 1 then
doTransformItem(item2.uid,383)
doDecayItemTo(topos, item2.itemid, ticks)
elseif item2.itemid == 231 then
doTransformItem(item2.uid,482)
doDecayItemTo(topos, item2.itemid, ticks)
elseif isInArray(SNOW, item2.itemid) == 1 then
doTransformItem(item2.uid,485)
doDecayItemTo(topos, item2.itemid, ticks)
else
doCreateItem(3324, 1, topos)
doDecayItemTo(topos, 0, ticks)
end
elseif item2.itemid == 7200 then
doTransformItem(item2.uid,7236)
end
end
PHP:
Lua Script Error: [Action Interface]
data/actions/scripts/tools/pick.lua:onUse
data/actions/scripts/tools/pick.lua:16: attempt to call global 'doDecayItemTo'
<a nil value>[
stack traceback:
data/actions/scripts/tools/pick.lua:16: in function data/actions/scripts/tools/pick.lua:1>
Anybody out there's able to help?
Thanks in advance.
Last edited: