megachock
Member
- Joined
- Mar 12, 2009
- Messages
- 115
- Reaction score
- 7
Well, i have made this script..
This teleport randomly to different positions.
In movements/movements.xml
XXXX will be the actionid of the teleport in map.
In movements/scripts/
Copy any script and rename it RandomTP.lua
and paste it inside:
Inside the table "t" you must put the positions or you can edited what i wrote.
This teleport randomly to different positions.
In movements/movements.xml
Lua:
<movevent type="StepIn" actionid="XXXX" event="script" value="RandomTP.lua"/>
XXXX will be the actionid of the teleport in map.
In movements/scripts/
Copy any script and rename it RandomTP.lua
and paste it inside:
Lua:
local t = {
{x = 1954, y = 879, z = 10},
{x = 1909, y = 893, z = 10},
{x = 1859, y = 907, z = 10}
}
function onStepIn(cid, item, position, fromPosition)
local v = t[math.random(#t)]
doSendMagicEffect(position, CONST_ME_TELEPORT)
doTeleportThing(cid, v)
doSendMagicEffect(v, CONST_ME_TELEPORT)
end
Inside the table "t" you must put the positions or you can edited what i wrote.