Teleport Command script

Post Reply
kennxonline
Posts: 56
Joined: Sun Mar 23, 2014 2:58 pm

Teleport Command script

Post by kennxonline » Thu Jan 28, 2016 11:29 pm

Anyone have a teleport command script I could use for my server?

like @teledem > tele dem pos.

I tried messing around with @homepoint script and I cant figure out how to make a teleport one for my players due to lack of whm. Any help would be really nice thank you.

User avatar
IncognitoEel
Posts: 5
Joined: Thu Jan 21, 2016 9:26 am

Re: Teleport Command script

Post by IncognitoEel » Fri Jan 29, 2016 1:25 am

You have a couple of options.

This will warp you to the crystal using the teleports global:

Code: Select all

cmdprops =
{
    permission = 0,
    parameters = ""
};
    require("scripts/globals/teleports");
	
function onTrigger(player)
    player:addStatusEffectEx(EFFECT_TELEPORT,0,TELEPORT_DEM,0,1);
end;

Or you could setup a list like so:

Code: Select all

cmdprops =
{
    permission = 0,
    parameters = "ss"
};

local word  = "";
function onTrigger(player, word)
	if (word == "dem") then
		 player:setPos(220,19,302,209,108);
	end
	if (word == "holla") then
		player:setPos(418,19,21,197,102);
	end
end;
And add to it the destinations you wish.
You could also include the keyitem global in either script and call:

Code: Select all

if(player:hasKeyItem(DEM_GATE_CRYSTAL)
Hopefully that gets ya started.
Last edited by IncognitoEel on Fri Jan 29, 2016 2:12 am, edited 1 time in total.

kennxonline
Posts: 56
Joined: Sun Mar 23, 2014 2:58 pm

Re: Teleport Command script

Post by kennxonline » Fri Jan 29, 2016 2:06 am

THANKS helps much! I so need to go to school for coding XD

Post Reply