WoR_PRC8/_module/nss/s_guildnames.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

93 lines
2.6 KiB
Plaintext

#include "nw_i0_tool"
void SetUpCustomTokens()
{
string GuildName = "";
object oArea;
object oWaypoint;
int class = GetClassByPosition(1 , GetPCSpeaker());
if(class == CLASS_TYPE_BARBARIAN)
{
oWaypoint = GetWaypointByTag("SHIP_BARB");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea) + " (Your Guild)";
}
else if(class == CLASS_TYPE_BARD){
oWaypoint = GetWaypointByTag("SHIP_BARD");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
else if(class == CLASS_TYPE_CLERIC){
oWaypoint = GetWaypointByTag("SHIP_CLER");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
else if(class == CLASS_TYPE_DRUID){
oWaypoint = GetWaypointByTag("SHIP_DRUID");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
else if(class == CLASS_TYPE_FIGHTER){
oWaypoint = GetWaypointByTag("SHIP_FIGHT");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
else if(class == CLASS_TYPE_MONK){
oWaypoint = GetWaypointByTag("SHIP_MONK");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
else if(class == CLASS_TYPE_PALADIN){
oWaypoint = GetWaypointByTag("SHIP_PAL");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
else if(class == CLASS_TYPE_RANGER){
oWaypoint = GetWaypointByTag("SHIP_DRUID");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
else if(class == CLASS_TYPE_ROGUE){
oWaypoint = GetWaypointByTag("SHIP_THIEF");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
else if(class == CLASS_TYPE_SORCERER){
oWaypoint = GetWaypointByTag("SHIP_WIZ");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
else if(class == CLASS_TYPE_WIZARD){
oWaypoint = GetWaypointByTag("SHIP_WIZ");
oArea = GetArea(oWaypoint);
GuildName = GetName(oArea)+ " (Your Guild)";
}
SetCustomToken(9895, GuildName);
}
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; }
SetUpCustomTokens();
return TRUE;
}