• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Ground Teleport Rep+++

Dramix

New Member
Joined
Jun 26, 2009
Messages
289
Reaction score
1
Hello, I Searching after a '' ground teleport '', when i walk on a tile with actionid 400 i get teleported to x.y.z. Thx rep+++
 
Movements/Movements.xml
PHP:
<movevent event="StepIn" itemid="0000" script="script.lua"/>

Movements/scripts/"tp.lua?"
PHP:
function onStepIn(cid, item, frompos, item2, topos)
NewPOS = {x=000, y=000, z=7}
	if item.actionid == 0000 then
		doPlayerSendTextMessage(cid,22,"Hah!! Tped!!")
		doTeleportThing(cid,NewPos)
		doSendMagicEffect(NewPos,12)		
		return 1
	end
end

hope it helped you

Edit:
Item."actionid" --The action id of the item
Item."uid" --The unique id of the item
"item." --The item you use/step on
************
item.Actionid
item.uid
 
Movements/Movements.xml
PHP:
<movevent event="StepIn" itemid="0000" script="script.lua"/>

Movements/scripts/"tp.lua?"
PHP:
function onStepIn(cid, item, frompos, item2, topos)
NewPOS = {x=000, y=000, z=7}
	if item.actionid == 0000 then
		doPlayerSendTextMessage(cid,22,"Hah!! Tped!!")
		doTeleportThing(cid,NewPos)
		doSendMagicEffect(NewPos,12)		
		return 1
	end
end

hope it helped you

Edit:
Item."actionid" --The action id of the item
Item."uid" --The unique id of the item
"item." --The item you use/step on
************
item.Actionid
item.uid

thx rep++
 
PHP:
function onStepIn(cid, item, frompos, item2, topos)
NewPOS = {x=000, y=000, z=7}
    if item.actionid == 0000 then
        doPlayerSendTextMessage(cid,22,"Hah!! Tped!!")
        doTeleportThing(cid,NewPos)
        doSendMagicEffect(NewPos,12)        
        return 1
    end
end
< This script reduces performance

PHP:
local NewPOS = {x=000, y=000, z=7}

function onStepIn(cid, item, frompos, item2, topos)
    if item.actionid == 0000 then
        doPlayerSendTextMessage(cid,22,"Hah!! Tped!!")
        doTeleportThing(cid,NewPos)
        doSendMagicEffect(NewPos,12)        
        return 1
    end
end
Because when the server executes the movement is working more and more if you put the local into the script if you take it out just take it as a variable and does not run every time you step on the particular frame.
 
Back
Top