Page 1 of 1
Teleport Command script
Posted: Thu Jan 28, 2016 11:29 pm
by kennxonline
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.
Re: Teleport Command script
Posted: Fri Jan 29, 2016 1:25 am
by IncognitoEel
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.
Re: Teleport Command script
Posted: Fri Jan 29, 2016 2:06 am
by kennxonline
THANKS helps much! I so need to go to school for coding XD