Hello again, i need some help with a script
This is how it should work..
1. Players is going to move a lever(it should have actionid 4830) to get teleported.
2. To do this he need to stand on a specific sqm (tile)
3. If not send a message it can't be done..
This is what i got, totally shity script. Im learing so please understand
And as you might understand i don't work so please tell me what should i do and what did i wrong?
This is how it should work..
1. Players is going to move a lever(it should have actionid 4830) to get teleported.
2. To do this he need to stand on a specific sqm (tile)
3. If not send a message it can't be done..
This is what i got, totally shity script. Im learing so please understand
Code:
local config = {
playertile = {x=32991,y=31539,z=1},
newpos1 = {x=32991,y=31539,z=4}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (item.actionid == 4830) and getCreaturePosition(config.playertile) then
doTeleportThing(cid,config.newpos1)
else
doCreatureSay(cid, "test wrong", TALKTYPE_ORANGE_1)
end
return true
end
And as you might understand i don't work so please tell me what should i do and what did i wrong?