jesseripper
New Member
- Joined
- Mar 12, 2008
- Messages
- 20
- Reaction score
- 1
Hello, I am having some problem with my Zao Lever and I wonder what I am doing wrong, here is the code I am using;
aswell as I have named every lever from [5501] - [5505] with the action ID ofc
I am also using
What am I doing wrong?
Code:
local t = {
[5501] = {{x=32991, y=31539, z=1}, {x=32991, y=31539, z=4}, effect = true},
[5502] = {{x=32991, y=31539, z=4}, {x=32991, y=31539, z=1}, effect = true},
[5503] = {{x=32993, y=31547, z=4}, {x=33061, y=31527, z=10}, effect = false},
[5504] = {{x=33061, y=31527, z=10}, {x=32993, y=31547, z=4}, effect = false},
[5505] = {{x=33055, y=31527, z=10}, {x=33055, y=31527, z=10}, effect = false}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local k = t[item.actionid]
local thing = getTopCreature(k[1]).uid
if(k and item.itemid == 1945) then
if(isPlayer(thing)) then
doTeleportThing(thing, k[2], false)
if(k.effect) then
doSendMagicEffect(k[2], CONST_ME_TELEPORT)
end
end
end
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
aswell as I have named every lever from [5501] - [5505] with the action ID ofc
I am also using
Code:
<action actionid="5501" event="script" value="zao/zaolever.lua"/>
<action actionid="5502" event="script" value="zao/zaolever.lua"/>
<action actionid="5503" event="script" value="zao/zaolever.lua"/>
<action actionid="5504" event="script" value="zao/zaolever.lua"/>
<action actionid="5505" event="script" value="zao/zaolever.lua"/>
Last edited: