Hultin
Member
- Joined
- Dec 2, 2008
- Messages
- 262
- Reaction score
- 17
I've created a lever I want players to use to get teleported to another location, it looks like this
Actions.xml
and trainingelev.lua
I get no errors, but nothing happens when I use the lever I've set the id to. just to make sure it works I've tried just printing something in the chat when you use it. I've also made sure there's solid ground on the spot it tries to teleport you to.
Actions.xml
XML:
<action actionid="55001" event="script" value="custom/trainingelev.lua"/>
and trainingelev.lua
Lua:
function onUse(cid)
local curpos = getCreaturePosition(cid)
if(curpos.x == 1075 and curpos.y == 1077 and curpos.z == 6) then
doTeleportThing(cid, {x = 1092,y = 1074,z = 15})
end
end
I get no errors, but nothing happens when I use the lever I've set the id to. just to make sure it works I've tried just printing something in the chat when you use it. I've also made sure there's solid ground on the spot it tries to teleport you to.
Last edited: