106 lines
3.1 KiB
Plaintext
106 lines
3.1 KiB
Plaintext
#include "nw_i0_tool"
|
|
int SetUpCustomTokens()
|
|
{
|
|
string GuildName = "";
|
|
object oArea;
|
|
object oWaypoint;
|
|
int PartofGuild = FALSE;
|
|
int class = GetClassByPosition(3 , GetPCSpeaker());
|
|
|
|
if(class == CLASS_TYPE_BARBARIAN)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_BARB");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea) + " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_BARD)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_BARD");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_CLERIC)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_CLER");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_DRUID)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_DRUID");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_FIGHTER)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_FIGHT");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_MONK)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_MONK");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_PALADIN)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_PAL");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_RANGER)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_DRUID");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_ROGUE)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_THIEF");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_SORCERER)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_WIZ");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
else if(class == CLASS_TYPE_WIZARD)
|
|
{
|
|
oWaypoint = GetWaypointByTag("SHIP_WIZ");
|
|
oArea = GetArea(oWaypoint);
|
|
GuildName = GetName(oArea)+ " (Your Guild)";
|
|
PartofGuild = TRUE;
|
|
}
|
|
|
|
SetCustomToken(9897, GuildName);
|
|
return PartofGuild;
|
|
}
|
|
|
|
int StartingConditional()
|
|
{
|
|
if(GetIsDM(GetPCSpeaker()))
|
|
{
|
|
SetUpCustomTokens();
|
|
return TRUE;
|
|
}
|
|
string subrace = GetStringLowerCase(GetSubRace(GetPCSpeaker()));
|
|
if(subrace == "werecat" || subrace == "vampire" || subrace == "lich" || subrace == "drow" || subrace == "dark-elf" || subrace == "werewolf")
|
|
{ return FALSE; }
|
|
|
|
int iResult = SetUpCustomTokens();
|
|
return iResult;
|
|
}
|