View Full Version : Random Teleport ( Gameobject )

Lightning Blade
11-04-2013, 01:06 PM
Hello everyone , i made this script for my own server and though i would release it since i haven't released anything here.


You should be able to Edit it.

You may use this script & Edit it as you wish.

Foereaper - Helping with the SetPvP(True) Part

11-04-2013, 03:40 PM
You could enhance the script with lua tables :)
it would make less repetitive code and easy location editing and adding and removing.

? Also faster as it works as a jump table?

Lightning Blade
11-04-2013, 03:52 PM
I'm not the best at eluna but i will look into it :)

11-04-2013, 05:22 PM
You could do something like this, using tables :) Untested but should work fine

local objectid = objectentryhere

local Table = {
{map, x, y, z, o},
{map, x, y, z, o},

function PortalTrigger(event, plr, intid)
local chance = math.random(1, #Table)

plr:Teleport(Table[chance][1], Table[chance][2], Table[chance][3], Table[chance][4], Table[chance][5])

RegisterGameObjectGossipEvent(objectid, 1, PortalTrigger)

Lightning Blade
11-05-2013, 11:20 AM
Alright will look into it :)