Faraonekkk
New Member
- Joined
- Feb 15, 2010
- Messages
- 686
- Reaction score
- 4
I have a problem, because i can't go up ladder when its in house.
Anyone can help me in script it?
teleport.lua
also i have error in console
Anyone can help me in script it?
teleport.lua
also i have error in console
data/actions/scripts/teleport.luanUse
luadoteleportthing(). Can not teleport thing
function onUse(cid, item, frompos, item2, topos)
npos = {x=frompos.x, y=frompos.y, z=frompos.z}
if(item.itemid == 1369 and item.actionid ~= 100) then
doPlayerSendCancel(cid,"You cannot use this object.")
return false
end
if item.itemid == 1386 or item.itemid == 3678 then
npos.y = npos.y + 1
npos.z = npos.z - 1
else
npos.z = npos.z + 1
end
local pos, dir = getCreaturePosition(cid), SOUTH
if(pos.x < npos.x) then
dir = EAST
elseif(pos.x == npos.x) then
if(pos.y == npos.y) then
dir = getCreatureLookDirection(cid)
elseif(pos.y > npos.y) then
dir = NORTH
end
elseif(pos.x > npos.x) then
dir = WEST
end
doTeleportThing(cid, npos)
doCreatureSetLookDirection(cid, dir)
return 1
end