33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
#include "elv_guildchecker"
|
|
|
|
void main()
|
|
{
|
|
//These commands beneath here are just used to get the player and the relevant locations, basically to define variables
|
|
object oPC = GetLastUsedBy();
|
|
string sAct = GetPCPlayerName(oPC);
|
|
string sTarget = "WP_WELCOMESTART";
|
|
|
|
if (IsBane(sAct)) sTarget = "gld_strt_bane";
|
|
else if (IsAoD(sAct)) sTarget = "WP_WELCOMESTART";
|
|
|
|
object oTarget;
|
|
location lTarget;
|
|
oTarget = GetWaypointByTag(sTarget);
|
|
lTarget = GetLocation(oTarget);
|
|
|
|
//Wait server to calm down...
|
|
// if(GetLocalInt(GetModule(), "SEND_PORTALS"))
|
|
// {
|
|
// SendMessageToPC(oPC, "You have to wait a moment before getting trough.");
|
|
// return;
|
|
// }
|
|
|
|
AssignCommand(oPC, ClearAllActions()); //This just clears the player's action queue
|
|
|
|
ExecuteScript("update_pc", GetLastUsedBy());
|
|
|
|
//This is where the player gets teleported
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
}
|