Table of Contents
Guildbuilder basics
Improve formating and layout
Requirements
Each guild should have atleast the following:
- Public Guild area
- Members only area/areas
- Guild Shops
- The member signs in a public place
- Joining quest
- Guild rank items
The following are recomended:
- Unique Items in the Guild shops
- The member room areas
- Some other quest
Rank Items
They should be in the following form:
name should be “XXXXXX YYYYYY ZZZZZZ”
where XXXXXX is the guild name YYYY is the rank and ZZZZ is the decription and same for all ranks
Atleast for priests and other primary people in the guild they should preferably be wearable, with the given color or the rank visible on them.
(like Kieron Evangelist multicolor joke robes)
They should allways be in a series, so that abilites for higher items are based on thsoe of lower but more powerfull.
These should allways be indentifed and marked as plot and should be in plot item category.
These should all be identifed and plot
tag and resref should both be:
gi_YYYY_XX_Z
Where:
YYYY is the guild number from inc_cereaguilds (“GUILD_” constant)
XX is the memebership type from inc_cereaguilds (“GUILD_MEMBERSHIP_” constant)
Z is a number 1 to 5 for the rank. (“GUILD_LEVEL_” constant)
The maximum base cost for such items should not exceed,
Rank | Maximum Cost | ||
---|---|---|---|
Initiate | 5 000gp | ||
Apprentice | 20 000gp | ||
Journeyman | 50 000gp | ||
Master | 130 000gp | ||
Senior Master | 300 000gp |
Nonvisible items should have lower costs, closer to normal rank item costs.
Please include a chest placed in special 3 than contain all the items you have made in the inventory, named something starting with your name then export that chest to the erf and send it to me.
Items
If making generic items usable by a guild, you should add them to the normal places (blades and such)
Use resrefs and tags that begin with.. your unique start
“name_” where name is your name
in general the maximum bonus of a item is equal to the guildrank and the items found on monsters should usually be more powerfull.
The names should hopefully start with the guild in question
The maximum base cost for such items should not exceed:
Rank | Maximum Cost | ||
---|---|---|---|
Initiate | 3 500gp | ||
Apprentice | 12 000gp | ||
Journeyman | 30 000gp | ||
Master | 65 000gp | ||
Senior Master | 130 000gp |
These should not be plot and not identified
example:
name: Fighter school sword of missing +10
tag: borg_swodmiss
resref: borg_swordmiss
abilities: -5 to hit +10 damage
Script inc_cerea_guilds
/////////////////////////////////////////////////////////////////////////////// //INCLUDE File for GUILDs in Cerea // // /////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// //IMPORTANT NOTE ABOUT ITEM TAGS // //The tags for guild items should follow the following format. //Guild items should have the same ResRef as tag (hence only use lowercase) and //only 12 characters // // The format is as follows: // gi_aaaa_bb_c // // KEY: // if neccessary use leading zeros (0), always use all characters available // // gi - marker (guild item) // aaaa - the actual value of the guild (see constants below) e.g. 0001 for arcane academy // bb - the type of membership (see constants below) // c - the level of membership (1 - 5) 5 being highest // // For example, a senior master in the arcance academy would have an item with // the tag: gi_0001_10_5 /////////////////////////////////////////////////////////////////////////////// ////////////////////////// //Header ////////////////////////// ///////////// //Constants ///////////// //Guild IDs const int GUILD_NONE = 0; const int GUILD_ARCANE_ACADEMY = 1; const int GUILD_BARD = 2; const int GUILD_FIGHTER_SCHOOL = 3; const int GUILD_CEREA_THIEVES = 4; const int GUILD_ADVENTURERS = 5; const int GUILD_RANGERS = 6; const int GUILD_DRUIDS = 7; const int GUILD_NOMA_ROGUE = 8; const int GUILD_THUG_BLACK = 9; const int GUILD_THUG_RED = 10; const int GUILD_CEREA_GUARD = 11; const int GUILD_MARCUS_APPRENTICE = 12; const int GUILD_GRIMSON_ROGUES = 13; const int GUILD_CEREA_BROTHERHOOD = 14; const int GUILD_LOREMASTERS = 15; const int GUILD_ALTAI = 16; const int GUILD_NAVIGATORS = 17; const int GUILD_CEREA_NOBLE = 18; const int GUILD_CEREA_MERCHANT = 19; const int GUILD_CEREA_LEADER = 20; const int GUILD_VESPER_LEADER = 21; const int GUILD_NOMA_LEADER = 22; const int GUILD_NAYEBAY_LEADER = 23; const int GUILD_DYOA_LEADER = 24; const int GUILD_GUIDES_OF_VURN_KYE = 25; const int GUILD_DURUNI_OLKANANE = 26; const int GUILD_ASKASI_DETENII = 27; const int GUILD_NORTH_WIND = 28; const int GUILD_DRAGON_GOLDWING = 29; const int GUILD_DRAGON_SILVERTAIL = 30; const int GUILD_DRAGON_COPPER = 31; const int GUILD_DRAGON_BRONZE = 32; const int GUILD_DRAGON_RED = 33; const int GUILD_DRAGON_BLACK = 34; const int GUILD_DRAGON_BLUE = 35; const int GUILD_DRAGON_GREEN = 36; const int GUILD_DUEGAR_ARMY = 37; const int GUILD_NAVIGATOR_NAVIGATOR = 38; const int GUILD_TREIDE_FERWER = 39; const int GUILD_GHANDEMAI_DURII = 40; const int GUILD_GARDENERS_ASSOCIATION = 41; const int GUILD_CRAFTING = 42; const int GUILD_STARBURST = 43; const int GUILD_NOMEIKOS_HISTORICAL = 44; const int GUILD_INVISIBLE_HAND = 45; const int GUILD_CEREA_ANIMAL_CONTROL = 46; //God Guilds 1000-2000; const int GUILD_STORM = 1001; const int GUILD_RA = 1002; const int GUILD_KUOR = 1003; const int GUILD_VALRIS = 1004; const int GUILD_REANN = 1005; const int GUILD_ULANE = 1006; const int GUILD_JAYSEK = 1007; const int GUILD_KIERON = 1008; const int GUILD_TERIS = 1009; const int GUILD_IORAK = 1010; const int GUILD_DURAL = 1011; const int GUILD_KRAO = 1012; const int GUILD_GREYRE = 1013; const int GUILD_LIFE = 1014; const int GUILD_UNLIFE = 1015; const int GUILD_FIRE = 1016; const int GUILD_AIR = 1017; const int GUILD_EARTH = 1018; const int GUILD_WATER = 1019; const int GUILD_DRAGONLORD = 1100; const int GUILD_DISP_DRAGONLORD = 1101; const int GUILD_IZ = 1115; const int GUILD_CROG = 1116; const int GUILD_WAUKYA = 1117; // demigods 1500-2999 const int GUILD_DEATH = 1500; // wannabees 3000-5000 const int GUILD_SUTTUS = 3000; const int GUILD_BOINK = 3001; const int GUILD_SAFFRON = 3002; const int GUILD_BORG = 3003; const int GUILD_ADAMUS = 3004; const int GUILD_ANNALINA = 3005; const int GUILD_NEOWEN = 3006; const int GUILD_TARA = 3007; const int GUILD_VINDIR = 3008; const int GUILD_NEDA = 3009; const int GUILD_ROBIN = 3010; const int GUILD_BORT = 3011; const int GUILD_SHANDRIL = 3012; const int GUILD_LAGNAR = 3013; const int GUILD_RAGNAROK = 3014; const int GUILD_ORIBASUS = 3015; //Guild Membership Levels const int GUILD_NOT_MEMBER = 0; const int GUILD_LEVEL_1 = 1; const int GUILD_LEVEL_2 = 2; const int GUILD_LEVEL_3 = 3; const int GUILD_LEVEL_4 = 4; const int GUILD_LEVEL_5 = 5; //Guilk Membership Type (in reverse order of seniority) //e.g. if a PC is both a paladin & a cleric, the cleric ranks are dominant //if they have a higher value here, than paladin (as they are) // ranks 50-69 are semipriests 70-89 priests const int GUILD_MEMBERSHIP_NONE = 0; const int GUILD_MEMBERSHIP_STANDARD = 10; const int GUILD_MEMBERSHIP_MILITARY = 20; const int GUILD_MEMBERSHIP_MONK = 40; const int GUILD_MEMBERSHIP_RANGER = 50; const int GUILD_MEMBERSHIP_PALADIN = 60; const int GUILD_MEMBERSHIP_DRUID = 70; const int GUILD_MEMBERSHIP_CLERIC = 80; //Memberstip type string const string GUILD_MEMBERSHIP_NONE_STR = "None"; const string GUILD_MEMBERSHIP_STANDARD_STR = "Normal"; const string GUILD_MEMBERSHIP_MILITARY_STR = "Military"; const string GUILD_MEMBERSHIP_MONK_STR = "Monk"; const string GUILD_MEMBERSHIP_RANGER_STR = "Ranger"; const string GUILD_MEMBERSHIP_PALADIN_STR = "Paladin"; const string GUILD_MEMBERSHIP_CLERIC_STR = "Cleric"; //Guild Membership Strings const string GUILD_MEMB_STANDARD_1 = "Initiate"; const string GUILD_MEMB_STANDARD_2 = "Apprentice"; const string GUILD_MEMB_STANDARD_3 = "Journeyman"; const string GUILD_MEMB_STANDARD_4 = "Master"; const string GUILD_MEMB_STANDARD_5 = "Senior Master"; const string GUILD_MEMB_CLERIC_1 = "Initiate"; const string GUILD_MEMB_CLERIC_2 = "Evangelist"; const string GUILD_MEMB_CLERIC_3 = "Priest"; const string GUILD_MEMB_CLERIC_4 = "Bishop"; const string GUILD_MEMB_CLERIC_5 = "Archbishop"; const string GUILD_MEMB_PALADIN_1 = "Initiate"; const string GUILD_MEMB_PALADIN_2 = "Squire"; const string GUILD_MEMB_PALADIN_3 = "Paladin"; const string GUILD_MEMB_PALADIN_4 = "Commander"; const string GUILD_MEMB_PALADIN_5 = "Senior Commander"; const string GUILD_MEMB_MILITARY_1 = "Recruit"; const string GUILD_MEMB_MILITARY_2 = "Trooper"; const string GUILD_MEMB_MILITARY_3 = "Sergeant"; const string GUILD_MEMB_MILITARY_4 = "Leutnant"; const string GUILD_MEMB_MILITARY_5 = "Captain"; //Guild Names (use same constant name as guild above, with STR at the end const string GUILD_ARCANE_ACADEMY_STR = "Arcane Academy"; const string GUILD_BARD_STR = "Bardic Guild"; const string GUILD_FIGHTER_SCHOOL_STR = "Fighter School"; const string GUILD_CEREA_THIEVES_STR = "Cerea Thieves Guild"; const string GUILD_ADVENTURERS_STR = "Adventurer's Guild"; const string GUILD_RANGERS_STR = "Great Forest Rangers"; const string GUILD_DRUIDS_STR = "Druid Grove"; const string GUILD_NOMA_ROGUE_STR = "Rogues and Smugglers Guild of North"; const string GUILD_THUG_BLACK_STR = "Cerea Black Fan Club"; const string GUILD_THUG_RED_STR = "Cerea Red Followers"; const string GUILD_CEREA_GUARD_STR = "Cerea City Guard"; const string GUILD_MARCUS_APPRENTICE_STR = "The Chosen"; const string GUILD_GRIMSON_ROGUES_STR = "Grimson Rogues"; const string GUILD_CEREA_BROTHERHOOD_STR = "Cerea Brotherhood"; const string GUILD_LOREMASTERS_STR = "Loremasters"; const string GUILD_ALTAI_STR = "Al-Tai"; const string GUILD_NAVIGATORS_STR = "Ch'kar B'kora"; const string GUILD_CEREA_NOBLE_STR = "The Nobles of Cerea"; const string GUILD_CEREA_MERCHANT_STR = "Cerea Merchant association"; const string GUILD_CEREA_LEADER_STR = "Cerea City Leadership"; const string GUILD_VESPER_LEADER_STR = "Vesper Village Leadership"; const string GUILD_NOMA_LEADER_STR = "Noma Town Leadership"; const string GUILD_NAYEBAY_LEADER_STR = "Naye Bay Town Leadership"; const string GUILD_DYOA_LEADER_STR = "Dyoa Village Leadership"; const string GUILD_GUIDES_OF_VURN_KYE_STR = "Guides of Vurn-Kye"; const string GUILD_DURUNI_OLKANANE_STR = "Duruni Olkanane"; const string GUILD_ASKASI_DETENII_STR = "Askasi Detenii Navigators"; const string GUILD_NORTH_WIND_STR = "The North Wind Navigators"; const string GUILD_DRAGON_GOLDWING_STR = "Goldwings"; const string GUILD_DRAGON_SILVERTAIL_STR = "Silvertails"; const string GUILD_DRAGON_COPPER_STR = "Copperfangs"; const string GUILD_DRAGON_BRONZE_STR = "Bronzemanes"; const string GUILD_DRAGON_RED_STR = "Red Dragons"; const string GUILD_DRAGON_BLACK_STR = "Black Dragons"; const string GUILD_DRAGON_BLUE_STR = "Blue Dragons"; const string GUILD_DRAGON_GREEN_STR = "Green Dragons"; const string GUILD_DUEGAR_ARMY_STR = "The Duegar Army"; const string GUILD_NAVIGATOR_NAVIGATOR_STR = "The Navigators!"; const string GUILD_TREIDE_FERWER_STR = "The Navigators of Treide Ferwer"; const string GUILD_GHANDEMAI_DURII_STR = "The Navigators of Ghandemai Durii"; const string GUILD_GARDENERS_ASSOCIATION_STR = "Gardeners Guild of Cerea"; const string GUILD_CRAFTING_STR = "Cerea Crafters Guild"; const string GUILD_STARBURST_STR = "Starburst Island Society"; const string GUILD_NOMEIKOS_HISTORICAL_STR = "Nomeikos Historical Society"; const string GUILD_INVISIBLE_HAND_STR = "Monestary of the Invisible hand"; const string GUILD_CEREA_ANIMAL_CONTROL_STR = "Cerea Animal Control"; //God Guilds 1000-2000; const string GUILD_STORM_STR = "Storm's Church"; const string GUILD_RA_STR = "Ra's Church"; const string GUILD_KUOR_STR = "Kuor's Church"; const string GUILD_VALRIS_STR = "Valris's Church"; const string GUILD_REANN_STR = "Reann's Church"; const string GUILD_ULANE_STR = "Ulane's Church"; const string GUILD_JAYSEK_STR = "Jaysek's Church"; const string GUILD_KIERON_STR = "Kieron's Church"; const string GUILD_TERIS_STR = "Teris' Church"; const string GUILD_IORAK_STR = "Iorak's Church"; const string GUILD_DURAL_STR = "Dural's Church"; const string GUILD_KRAO_STR = "Krao's Church"; const string GUILD_GREYRE_STR = "Greyre's Church"; const string GUILD_LIFE_STR = "Fellowship of Followers of Life"; const string GUILD_UNLIFE_STR = "Servants of unLife"; const string GUILD_FIRE_STR = "Fire Followers"; const string GUILD_AIR_STR = "Air Followers"; const string GUILD_EARTH_STR = "Earth Followers"; const string GUILD_WATER_STR = "Water Followers"; const string GUILD_DRAGONLORD_STR="Dragonlord Church"; const string GUILD_DISP_DRAGONLORD_STR="Displaced Dragonlord Church"; const string GUILD_IZ_STR="Iz Church"; const string GUILD_CROG_STR="Crog Church"; const string GUILD_WAUKYA_STR="Waukya Church"; // demigods 1500-2999 // wannabees 3000-5000 const string GUILD_SUTTUS_STR="Followers of Suttus"; const string GUILD_BOINK_STR="Followers of Boink"; const string GUILD_SAFFRON_STR="Followers of Saffron"; const string GUILD_BORG_STR="Followers of Borg"; const string GUILD_ADAMUS_STR="Followers of Adamus"; const string GUILD_ANNALINA_STR="Followers of Annalina"; const string GUILD_NEOWEN_STR="Followers of Neowen"; const string GUILD_TARA_STR="Followers of Tara"; const string GUILD_VINDIR_STR="Followers of Vindir"; const string GUILD_NEDA_STR = "Followers of Neda"; const string GUILD_ROBIN_STR = "Followers of Robin"; const string GUILD_BORT_STR = "Followers of Bort"; const string GUILD_SHANDRIL_STR = "Followers of Shandril"; const string GUILD_LAGNAR_STR = "Followers of Lagnar the insane Tank"; const string GUILD_RAGNAROK_STR = "Followers of Lagnar Ragnarock"; const string GUILD_ORIBASUS_STR = "Followers of Oribasus"; ////////////////////// /////METHODS////////// ////////////////////// //Returns the first guild found on a PC (inventory order) //returns GUILD_NONE if not a member of any guild int GetFirstGuild(object oPC); //Returns the next guild found on a PC (inventory order) //Returns GUILD_NONE if not a member of any more guilds //This function can return unexpected results if the players rearranges his //inventory between calls. int GetNextGuild(object oPC); //Returns the rank string for specified values //See constants for appropriate values string GetGuildRankStr(int MemberShipType, int Level); //Returns TRUE if player is a member of the specified guild int GetIsGuildMember(object oPC, int Guild); //Gets the rank value for the specified player in the specified guild int GetGuildRank(object oPC, int Guild); //Gets the Guild Member Type for specified guild int GetGuildMemberType(object oPC, int Guild); //Get Guild Name string GetGuildName(int Guild); //Gets guild int from item int GetGuildNameIntFromItem(object oItem); //Gets guild type int from item int GetGuildTypeIntFromItem(object oItem); //Gets guild rank from item int GetGuildRankFromItem(object oItem); //Lists all of a given players Guild Info //oPC - the player whose info you want //oDM - the DM to display the info for void DisplayGuildInfo(object oPC, object oDM); //This will replace all old guild items (with old tags) with the same item with //new tags, should be called from ClientEnter event void UpdateOldGuildItems(object oPC); //Retrieves the first equipped item. //if no items are equipped it returns OBJECT_INVALID object GetFirstEquippedItem(object oPC); //Retrieves the next equipped item. Only call when GetFirstEquippedItem //has already been called //Returns OBEJCT_INVALID if no more items to find, or all slots checked. object GetNextEquippedItem(object oPC); // returs the member type string for the given member type number // see he GUILD_MEMBERSHIP_* and GUILD_MEMBERSHIP_*_STR constants string GetMemberTypeStr(int Membertype); ///new functions added by solo1607, report me any bug... //Used in OnAquiredItem event, add guild rank to player's local variables void GuildsAddRank(object oPC,object oItem); //Used in OnUnAquiredItem to remove guild rank from player's loca variables void GuildsRemoveRank(object oPC,object oItem); //Return the Rank from the current guild in a GetNextGuild loop int GetGuildCurrentRank(object oPC); //Return the Membership type in the current guild in a GetNextGuild loop int GetGuildCurrentMemberType(object oPC); //For the 2 last functions, look in the DisplayGuildInfo function //for an example of use... ////////////////////////// //Footer ////////////////////////// void GuildsAddRank(object oPC,object oItem) { int i=GetLocalInt(oPC,"GuildsNum")+1; string sIndex=IntToString(i); int GuildID=GetGuildNameIntFromItem(oItem); SetLocalInt(oPC, "GuildID"+sIndex, GuildID); // SetLocalObject(oPC,"GuildItem"+sIndex,oItem); SetLocalInt(oPC,"GuildRank"+sIndex,GetGuildRankFromItem(oItem)); SetLocalInt(oPC,"GuildMemberType"+sIndex,GetGuildTypeIntFromItem(oItem)); SetLocalInt(oPC,"GuildsNum",i); SetLocalInt(oPC,"GuildsInit",1); } void GuildsRemoveRank(object oPC,object oItem) { int j,i,n=GetLocalInt(oPC,"GuildsNum"); string sIndex2,sIndex; int GuildID=GetGuildNameIntFromItem(oItem); int GuildRank=GetGuildRankFromItem(oItem); for(i=1;i<=n;i++) { if(GetLocalInt(oPC,"GuildID"+IntToString(i))==GuildID && GuildRank==GetLocalInt(oPC,"GuildRank"+IntToString(i))) break; } if(i>n) return; for(j=i;j<n;j++) { sIndex=IntToString(j); sIndex2=IntToString(j+1); SetLocalInt(oPC, "GuildID"+sIndex, GetLocalInt(oPC,"GuildID"+sIndex2)); // SetLocalObject(oPC,"GuildItem"+sIndex,GetLocalObject(oPC,"GuildItem"+sIndex2)); SetLocalInt(oPC,"GuildRank"+sIndex,GetLocalInt(oPC,"GuildRank"+sIndex2)); SetLocalInt(oPC,"GuildMemberType"+sIndex,GetLocalInt(oPC,"GuildMemberType"+sIndex2)); } SetLocalInt(oPC,"GuildsNum",n-1); SetLocalInt(oPC,"GuildsInit",1); } int GetFirstGuild(object oPC) { SetLocalInt(oPC,"GuildNext",1); return GetNextGuild(oPC); } int GetNextGuild(object oPC) { if (!GetIsPC(oPC)) return GUILD_NONE; int i,GuildsNum,GuildID; i=GetLocalInt(oPC,"GuildNext"); GuildsNum=GetLocalInt(oPC,"GuildsNum"); if(i>GuildsNum) return GUILD_NONE; SetLocalInt(oPC,"GuildNext",i+1); return GetLocalInt(oPC,"GuildID"+IntToString(i)); } int GetGuildCurrentRank(object oPC) { int i=GetLocalInt(oPC,"GuildNext")-1; return GetLocalInt(oPC,"GuildRank"+IntToString(i)); } int GetGuildCurrentMemberType(object oPC) { int i=GetLocalInt(oPC,"GuildNext")-1; return GetLocalInt(oPC,"GuildMemberType"+IntToString(i)); } //Returns the rank string for specified values //See constants for appropriate values string GetGuildRankStr(int MemberShipType, int Level) { string result = ""; if (MemberShipType == GUILD_MEMBERSHIP_CLERIC) { switch (Level) { case GUILD_LEVEL_5: result = GUILD_MEMB_CLERIC_5; break; case GUILD_LEVEL_4: result = GUILD_MEMB_CLERIC_4; break; case GUILD_LEVEL_3: result = GUILD_MEMB_CLERIC_3; break; case GUILD_LEVEL_2: result = GUILD_MEMB_CLERIC_2; break; case GUILD_LEVEL_1: result = GUILD_MEMB_CLERIC_1; break; } } else if (MemberShipType == GUILD_MEMBERSHIP_PALADIN) { switch (Level) { case GUILD_LEVEL_5: result = GUILD_MEMB_PALADIN_5; break; case GUILD_LEVEL_4: result = GUILD_MEMB_PALADIN_4; break; case GUILD_LEVEL_3: result = GUILD_MEMB_PALADIN_3; break; case GUILD_LEVEL_2: result = GUILD_MEMB_PALADIN_2; break; case GUILD_LEVEL_1: result = GUILD_MEMB_PALADIN_1; break; } } else if (MemberShipType == GUILD_MEMBERSHIP_MILITARY) { switch (Level) { case GUILD_LEVEL_5: result = GUILD_MEMB_MILITARY_5; break; case GUILD_LEVEL_4: result = GUILD_MEMB_MILITARY_4; break; case GUILD_LEVEL_3: result = GUILD_MEMB_MILITARY_3; break; case GUILD_LEVEL_2: result = GUILD_MEMB_MILITARY_2; break; case GUILD_LEVEL_1: result = GUILD_MEMB_MILITARY_1; break; } } else { switch (Level) { case GUILD_LEVEL_5: result = GUILD_MEMB_STANDARD_5; break; case GUILD_LEVEL_4: result = GUILD_MEMB_STANDARD_4; break; case GUILD_LEVEL_3: result = GUILD_MEMB_STANDARD_3; break; case GUILD_LEVEL_2: result = GUILD_MEMB_STANDARD_2; break; case GUILD_LEVEL_1: result = GUILD_MEMB_STANDARD_1; break; } } return result; } //Returns TRUE if player is a member of the specified guild int GetIsGuildMember(object oPC, int Guild) { // if (!GetIsPC(oPC)) // return FALSE; int i=GetFirstGuild(oPC); while(i != GUILD_NONE) { if(i==Guild) return TRUE; i=GetNextGuild(oPC); } return FALSE; } //Gets the rank value for the specified player in the specified guild int GetGuildRank(object oPC, int Guild) { // if (!GetIsPC(oPC)) // return GUILD_NOT_MEMBER; int i=GetFirstGuild(oPC); while(i != GUILD_NONE) { if(i==Guild) { //return GetGuildRankFromItem(GetLocalObject(oPC,"GuildItem"+IntToString(i))); return GetGuildCurrentRank(oPC); } i=GetNextGuild(oPC); } return GUILD_NOT_MEMBER; } //Gets the Guild Member Type for specified guild int GetGuildMemberType(object oPC, int Guild) { if (!GetIsPC(oPC)) return GUILD_MEMBERSHIP_NONE; int i=GetFirstGuild(oPC); while(i != GUILD_NONE) { if(i==Guild) { //return GetGuildTypeIntFromItem(GetLocalObject(oPC,"GuildItem"+IntToString(i))); return GetGuildCurrentMemberType(oPC); } i=GetNextGuild(oPC); } return GUILD_MEMBERSHIP_NONE; } //Get Guild Name string GetGuildName(int Guild) { string result = ""; switch (Guild) { //Standard Guilds case GUILD_ARCANE_ACADEMY: result = GUILD_ARCANE_ACADEMY_STR; break; case GUILD_BARD: result = GUILD_BARD_STR; break; case GUILD_FIGHTER_SCHOOL: result = GUILD_FIGHTER_SCHOOL_STR; break; case GUILD_CEREA_THIEVES: result = GUILD_CEREA_THIEVES_STR; break; case GUILD_ADVENTURERS: result = GUILD_ADVENTURERS_STR; break; case GUILD_RANGERS: result = GUILD_RANGERS_STR; break; case GUILD_DRUIDS: result = GUILD_DRUIDS_STR; break; case GUILD_NOMA_ROGUE: result = GUILD_NOMA_ROGUE_STR; break; case GUILD_THUG_BLACK: result = GUILD_THUG_BLACK_STR; break; case GUILD_THUG_RED: result = GUILD_THUG_RED_STR; break; case GUILD_CEREA_GUARD: result = GUILD_CEREA_GUARD_STR; break; case GUILD_MARCUS_APPRENTICE: result = GUILD_MARCUS_APPRENTICE_STR; break; case GUILD_GRIMSON_ROGUES: result = GUILD_GRIMSON_ROGUES_STR; break; case GUILD_CEREA_BROTHERHOOD: result = GUILD_CEREA_BROTHERHOOD_STR; break; case GUILD_LOREMASTERS: result = GUILD_LOREMASTERS_STR; break; case GUILD_ALTAI: result = GUILD_ALTAI_STR; break; case GUILD_NAVIGATORS: result = GUILD_NAVIGATORS_STR; break; case GUILD_CEREA_NOBLE: result = GUILD_CEREA_NOBLE_STR; break; case GUILD_CEREA_MERCHANT: result = GUILD_CEREA_MERCHANT_STR; break; case GUILD_CEREA_LEADER: result = GUILD_CEREA_LEADER_STR; break; case GUILD_VESPER_LEADER: result = GUILD_VESPER_LEADER_STR; break; case GUILD_NOMA_LEADER: result = GUILD_NOMA_LEADER_STR; break; case GUILD_NAYEBAY_LEADER: result = GUILD_NAYEBAY_LEADER_STR; break; case GUILD_DYOA_LEADER: result = GUILD_DYOA_LEADER_STR; break; case GUILD_GUIDES_OF_VURN_KYE: result = GUILD_GUIDES_OF_VURN_KYE_STR; break; case GUILD_DURUNI_OLKANANE: result = GUILD_DURUNI_OLKANANE_STR; break; case GUILD_ASKASI_DETENII: result = GUILD_ASKASI_DETENII_STR; break; case GUILD_NORTH_WIND: result = GUILD_NORTH_WIND_STR; break; case GUILD_DRAGON_GOLDWING: result = GUILD_DRAGON_GOLDWING_STR; break; case GUILD_DRAGON_SILVERTAIL: result = GUILD_DRAGON_SILVERTAIL_STR; break; case GUILD_DRAGON_COPPER: result = GUILD_DRAGON_COPPER_STR; break; case GUILD_DRAGON_BRONZE: result = GUILD_DRAGON_BRONZE_STR; break; case GUILD_DRAGON_RED: result = GUILD_DRAGON_RED_STR; break; case GUILD_DRAGON_BLACK: result = GUILD_DRAGON_BLACK_STR; break; case GUILD_DRAGON_BLUE: result = GUILD_DRAGON_BLUE_STR; break; case GUILD_DRAGON_GREEN: result = GUILD_DRAGON_GREEN_STR; break; case GUILD_DUEGAR_ARMY: result = GUILD_DUEGAR_ARMY_STR; break; case GUILD_GHANDEMAI_DURII: result = GUILD_GHANDEMAI_DURII_STR; break; case GUILD_NAVIGATOR_NAVIGATOR: result = GUILD_NAVIGATOR_NAVIGATOR_STR; break; case GUILD_TREIDE_FERWER: result = GUILD_TREIDE_FERWER_STR; break; case GUILD_GARDENERS_ASSOCIATION: result = GUILD_GARDENERS_ASSOCIATION_STR; break; //God Guilds 1000-2000; case GUILD_STORM: result = GUILD_STORM_STR; break; case GUILD_RA: result = GUILD_RA_STR; break; case GUILD_KUOR: result = GUILD_ARCANE_ACADEMY_STR; break; case GUILD_VALRIS: result = GUILD_KUOR_STR; break; case GUILD_REANN: result = GUILD_REANN_STR; break; case GUILD_ULANE: result = GUILD_ULANE_STR; break; case GUILD_JAYSEK: result = GUILD_JAYSEK_STR; break; case GUILD_KIERON: result = GUILD_KIERON_STR; break; case GUILD_TERIS: result = GUILD_TERIS_STR; break; case GUILD_IORAK: result = GUILD_IORAK_STR; break; case GUILD_DURAL: result = GUILD_DURAL_STR; break; case GUILD_KRAO: result = GUILD_KRAO_STR; break; case GUILD_GREYRE: result = GUILD_GREYRE_STR; break; case GUILD_LIFE: result = GUILD_LIFE_STR; break; case GUILD_UNLIFE: result = GUILD_UNLIFE_STR; break; case GUILD_FIRE: result = GUILD_FIRE_STR; break; case GUILD_AIR: result = GUILD_AIR_STR; break; case GUILD_EARTH: result = GUILD_EARTH_STR; break; case GUILD_WATER: result = GUILD_WATER_STR; break; //lesser goodlings case GUILD_DRAGONLORD: result = GUILD_DRAGONLORD_STR; break; case GUILD_DISP_DRAGONLORD: result = GUILD_DISP_DRAGONLORD_STR; break; case GUILD_IZ: result = GUILD_IZ_STR; break; case GUILD_CROG: result = GUILD_CROG_STR; break; case GUILD_WAUKYA: result = GUILD_WAUKYA_STR; break; case GUILD_SUTTUS: result = GUILD_SUTTUS_STR; break; case GUILD_BOINK: result = GUILD_BOINK_STR; break; case GUILD_SAFFRON: result = GUILD_SAFFRON_STR; break; case GUILD_BORG: result = GUILD_BORG_STR; break; case GUILD_ADAMUS: result = GUILD_ADAMUS_STR; break; case GUILD_ANNALINA: result = GUILD_ANNALINA_STR; break; case GUILD_NEOWEN: result = GUILD_NEOWEN_STR; break; case GUILD_TARA: result = GUILD_TARA_STR; break; case GUILD_VINDIR: result = GUILD_VINDIR_STR; break; default: result = "Unknown Guild"; } return result; } //Gets guild int from item int GetGuildNameIntFromItem(object oItem) { if (GetIsObjectValid(oItem)) { string tag = GetTag(oItem); string id = GetSubString(tag, 0, 3); string guild = GetSubString(tag, 3, 4); string type = GetSubString(tag, 8, 2); string rank = GetSubString(tag, 11, 1); if (id == "gi_") { return StringToInt(guild); } } return GUILD_NONE; } //Gets guild type int from item int GetGuildTypeIntFromItem(object oItem) { if (GetIsObjectValid(oItem)) { string tag = GetTag(oItem); string id = GetSubString(tag, 0, 3); string guild = GetSubString(tag, 3, 4); string type = GetSubString(tag, 8, 2); string rank = GetSubString(tag, 11, 1); if (id == "gi_") { return StringToInt(type); } } return GUILD_NONE; } //Gets guild rank from item int GetGuildRankFromItem(object oItem) { if (GetIsObjectValid(oItem)) { string tag = GetTag(oItem); string id = GetSubString(tag, 0, 3); string guild = GetSubString(tag, 3, 4); string type = GetSubString(tag, 8, 2); string rank = GetSubString(tag, 11, 1); if (id == "gi_") { return StringToInt(rank); } } return GUILD_NONE; } //Lists all of a given players Guild Info //oPC - the player whose info you want //oDM - the DM to display the info for void DisplayGuildInfo(object oPC, object oDM) { string sColor = GetName(GetObjectByTag("COLORS")); string colWhite = GetSubString(sColor, 0, 6); //white string colYellow = GetSubString(sColor, 6, 6); //yellow string colMagenta = GetSubString(sColor, 12, 6); //magenta string colCyan = GetSubString(sColor, 18, 6); //cyan string colRed = GetSubString(sColor, 24, 6); //red string colGreen = GetSubString(sColor, 30, 6); //green string colBlue = GetSubString(sColor, 36, 6); //blue int Guild = GetFirstGuild(oPC); SendMessageToPC(oDM, colWhite + "** Guild Info **"); SendMessageToPC(oDM, colYellow + "Name: " + colCyan + GetName(oPC) + colWhite + "(" + colGreen + GetPCPlayerName(oPC) + colWhite + ")"); SendMessageToPC(oDM, colWhite + "****************"); while (Guild != GUILD_NONE) { SendMessageToPC(oDM, colMagenta + GetGuildName(Guild) + colWhite + " : " + colYellow + GetGuildRankStr(GetGuildCurrentMemberType(oPC), GetGuildCurrentRank(oPC))); Guild = GetNextGuild(oPC); } SendMessageToPC(oDM, colWhite + "****************"); } //replaces an existing item void ReplaceGuildItem(object oPC, string strTagItemTake, string strResRefItemGive) { //check for item and remove it if (GetIsObjectValid(GetItemPossessedBy(oPC,strTagItemTake))) { object oItemToTake = GetItemPossessedBy(oPC, strTagItemTake); SendMessageToPC(oPC, "Old Guild Item Replaced:"+GetName(oItemToTake)+", Any Problems, contact a DM"); if(GetIsObjectValid(oItemToTake) != 0) { DestroyObject(oItemToTake); } CreateItemOnObject(strResRefItemGive, oPC, 1); } } // returs the member type string for the given member type number // see he GUILD_MEMBERSHIP_* and GUILD_MEMBERSHIP_*_STR constants string GetMemberTypeStr(int Membertype) { switch (Membertype) { case GUILD_MEMBERSHIP_STANDARD: return GUILD_MEMBERSHIP_STANDARD_STR; case GUILD_MEMBERSHIP_MILITARY: return GUILD_MEMBERSHIP_MILITARY_STR; case GUILD_MEMBERSHIP_MONK: return GUILD_MEMBERSHIP_MONK_STR; case GUILD_MEMBERSHIP_RANGER: return GUILD_MEMBERSHIP_RANGER_STR; case GUILD_MEMBERSHIP_PALADIN: return GUILD_MEMBERSHIP_PALADIN_STR; case GUILD_MEMBERSHIP_CLERIC: return GUILD_MEMBERSHIP_CLERIC_STR; } return GUILD_MEMBERSHIP_NONE_STR; } //Retrieves the first equipped item. //if no items are equipped it returns OBJECT_INVALID object GetFirstEquippedItem(object oPC) { object oItem = OBJECT_INVALID; int iCurSlot = -9999; while (iCurSlot != 99999) { if (iCurSlot == -9999) iCurSlot = INVENTORY_SLOT_ARMS; else if (iCurSlot == INVENTORY_SLOT_ARMS)iCurSlot = INVENTORY_SLOT_ARROWS; else if (iCurSlot == INVENTORY_SLOT_ARROWS)iCurSlot = INVENTORY_SLOT_BELT; else if (iCurSlot == INVENTORY_SLOT_BELT) iCurSlot = INVENTORY_SLOT_BOLTS; else if (iCurSlot == INVENTORY_SLOT_BOLTS) iCurSlot = INVENTORY_SLOT_BOOTS; else if (iCurSlot == INVENTORY_SLOT_BOOTS) iCurSlot = INVENTORY_SLOT_BULLETS; else if (iCurSlot == INVENTORY_SLOT_BULLETS) iCurSlot = INVENTORY_SLOT_CARMOUR; else if (iCurSlot == INVENTORY_SLOT_CARMOUR) iCurSlot = INVENTORY_SLOT_CHEST; else if (iCurSlot == INVENTORY_SLOT_CHEST) iCurSlot = INVENTORY_SLOT_CLOAK; else if (iCurSlot == INVENTORY_SLOT_CLOAK) iCurSlot = INVENTORY_SLOT_CWEAPON_B; else if (iCurSlot == INVENTORY_SLOT_CWEAPON_B) iCurSlot = INVENTORY_SLOT_CWEAPON_L; else if (iCurSlot == INVENTORY_SLOT_CWEAPON_L) iCurSlot = INVENTORY_SLOT_CWEAPON_R; else if (iCurSlot == INVENTORY_SLOT_CWEAPON_R) iCurSlot = INVENTORY_SLOT_HEAD; else if (iCurSlot == INVENTORY_SLOT_HEAD) iCurSlot = INVENTORY_SLOT_LEFTHAND; else if (iCurSlot == INVENTORY_SLOT_LEFTHAND) iCurSlot = INVENTORY_SLOT_LEFTRING; else if (iCurSlot == INVENTORY_SLOT_LEFTRING) iCurSlot = INVENTORY_SLOT_NECK; else if (iCurSlot == INVENTORY_SLOT_NECK) iCurSlot = INVENTORY_SLOT_RIGHTHAND; else if (iCurSlot == INVENTORY_SLOT_RIGHTHAND) iCurSlot = INVENTORY_SLOT_RIGHTRING; else if (iCurSlot == INVENTORY_SLOT_RIGHTRING) {iCurSlot = 99999; continue; } oItem = GetItemInSlot(iCurSlot, oPC); if (GetIsObjectValid(oItem)) { SetLocalInt(oPC, "GetFirstEquipped", iCurSlot); return oItem; } } DeleteLocalInt(oPC, "GetFirstEquipped"); return OBJECT_INVALID; } //Retrieves the next equipped item. Only call when GetFirstEquippedItem //has already been called //Returns OBEJCT_INVALID if no more items to find, or all slots checked. object GetNextEquippedItem(object oPC) { object oItem = OBJECT_INVALID; int iCurSlot = GetLocalInt(oPC, "GetFirstEquipped"); while (iCurSlot != 99999) { if (iCurSlot == -9999) iCurSlot = INVENTORY_SLOT_ARMS; else if (iCurSlot == INVENTORY_SLOT_ARMS)iCurSlot = INVENTORY_SLOT_ARROWS; else if (iCurSlot == INVENTORY_SLOT_ARROWS)iCurSlot = INVENTORY_SLOT_BELT; else if (iCurSlot == INVENTORY_SLOT_BELT) iCurSlot = INVENTORY_SLOT_BOLTS; else if (iCurSlot == INVENTORY_SLOT_BOLTS) iCurSlot = INVENTORY_SLOT_BOOTS; else if (iCurSlot == INVENTORY_SLOT_BOOTS) iCurSlot = INVENTORY_SLOT_BULLETS; else if (iCurSlot == INVENTORY_SLOT_BULLETS) iCurSlot = INVENTORY_SLOT_CARMOUR; else if (iCurSlot == INVENTORY_SLOT_CARMOUR) iCurSlot = INVENTORY_SLOT_CHEST; else if (iCurSlot == INVENTORY_SLOT_CHEST) iCurSlot = INVENTORY_SLOT_CLOAK; else if (iCurSlot == INVENTORY_SLOT_CLOAK) iCurSlot = INVENTORY_SLOT_CWEAPON_B; else if (iCurSlot == INVENTORY_SLOT_CWEAPON_B) iCurSlot = INVENTORY_SLOT_CWEAPON_L; else if (iCurSlot == INVENTORY_SLOT_CWEAPON_L) iCurSlot = INVENTORY_SLOT_CWEAPON_R; else if (iCurSlot == INVENTORY_SLOT_CWEAPON_R) iCurSlot = INVENTORY_SLOT_HEAD; else if (iCurSlot == INVENTORY_SLOT_HEAD) iCurSlot = INVENTORY_SLOT_LEFTHAND; else if (iCurSlot == INVENTORY_SLOT_LEFTHAND) iCurSlot = INVENTORY_SLOT_LEFTRING; else if (iCurSlot == INVENTORY_SLOT_LEFTRING) iCurSlot = INVENTORY_SLOT_NECK; else if (iCurSlot == INVENTORY_SLOT_NECK) iCurSlot = INVENTORY_SLOT_RIGHTHAND; else if (iCurSlot == INVENTORY_SLOT_RIGHTHAND) iCurSlot = INVENTORY_SLOT_RIGHTRING; else if (iCurSlot == INVENTORY_SLOT_RIGHTRING) {iCurSlot = 99999; continue; } oItem = GetItemInSlot(iCurSlot, oPC); if (GetIsObjectValid(oItem)) { SetLocalInt(oPC, "GetFirstEquipped", iCurSlot); return oItem; } } DeleteLocalInt(oPC, "GetFirstEquipped"); return OBJECT_INVALID; }