okay guys this is what I am looking for:
On client enter I want the script to also check if the pc has rp_awards item on them, if not then it should be given.
For some reason I cannot seem to get it to work (even when trying to alter some of the coding on there myself) I feel really ignorantnow for not knowing this but am hoping someone can help me out here....
ITEM TAG: rp_awards
#include "habd_include"#include "fugue_xpdebt_inc"#include "pgs_inc_events"#include "pgs_inc_uidsys"#include "pqj_inc"#include "omw_plns"#include "vg_give_items"#include "vg_move_rates"#include "doa_gold_hrtbt"#include "vg_factions_inc"#include "ww_inc"#include "vamp_inc"#include "b_rep_factions"#include "sha_subr_methds"//#include "x3_inc_horse"void main(){object oMod = GetModule();// The object entering the areaobject oPC = GetEnteringObject();// Used to check if PC is new to module or notstring sRegion = GetCampaignString("Regions","Region",oPC);// Possible region codes PC could be native toint iRegion01 = TestStringAgainstPattern("01",sRegion);int iRegion02 = TestStringAgainstPattern("02",sRegion);int iRegion03 = TestStringAgainstPattern("03",sRegion);int iRegion04 = TestStringAgainstPattern("04",sRegion);int iRegion05 = TestStringAgainstPattern("05",sRegion);int iRegion06 = TestStringAgainstPattern("06",sRegion);// Prep the STARTING_GOLD INT for use in section giving starting goldint STARTING_GOLD = 0;// update 1.69 ridable horses add-onExecuteScript("x3_mod_def_enter",OBJECT_SELF);// Remove invulnerabilityDelayCommand(2.0,SetPlotFlag(oPC, FALSE));// Rebuild the persistant journals for clients when they enterDelayCommand(2.2,RebuildJournalQuestEntries(oPC));//---***---\\//Turns out this script calls x3_mod_def_enter, which calls x3_mod_pre_enter, which//calls sha_on_cl_enter which calls this function already. So, not needed here.//SubraceOnClientEnter();//***---***\\// Handles the initialization of the werewolf system and vampire subraceif(GetIsPC(oPC)){if(GetLocalInt(GetModule(),"Werewolf")==1){// werewolf system initializationDelayCommand(2.4,SetLocalInts(oPC));// run pseudo heartbeat for werewolf systemDelayCommand(2.6,WWHrtbt(oPC));}if(GetLocalInt(GetModule(),"Vampire")==1){// vampire system initializationif (GetSubRace(oPC) == "VAMPIRE"){init_subrace(oPC);}}}// Get DB info and make sure clients have Death/Bleed items when they enterHABDGetDBOnClientEnter(oPC);DelayCommand(2.8, HABDItemsOnClientEnter(oPC));// Set up XPDebt PersistenceDelayCommand(3.0,XPonEnter(oPC));// Set up player guild info when client entersDelayCommand(3.2,PGS_OnClientEnter (oPC));// Set up Loot Notificationif (GetLocalInt(oMod,"PCLootTool")==1){DelayCommand(3.4,PLNSLoadNotificationOnClientEnter(oPC));}// Give PC a Subdual Tool if they dont have one and set Subdual Mode to "Full Damage"if (GetLocalInt(oMod,"PCSubdualTool")==1){DelayCommand(3.6,GivePCSubdualTool(oPC));DelayCommand(3.8, SetLocalInt(oPC,"SUBDUAL",0));}// Set up factions for persistenceif (GetLocalInt(oMod,"Factions")==1){// This tracks what faction the PC started with in the very beginningint nOriginalFaction = GetCampaignInt("Factions",CHAR_FACTION_ORIGINAL(oPC),oMod);SetLocalInt(GetModule(),CHAR_FACTION_ORIGINAL(oPC),nOriginalFaction);// This tracks what faction the PC currently belongs toint nCurrentFaction = GetCampaignInt("Factions",CHAR_FACTION(oPC),oMod);SetLocalInt(GetModule(),CHAR_FACTION(oPC),nCurrentFaction);}// Give PC a Persistent Location Saving Toolif (GetLocalInt(oMod,"PLSTool")==0){GivePCPLSTool(oPC);}// Give PC their DMFI toolsif (GetLocalInt(oMod,"DMFITools")==1){GiveDMFITools(oPC);}// Give PC their climb toolif (GetLocalInt(oMod,"PCClimbTool")==1){GivePCClimbTool(oPC);}// Set up the player's starting gold as per PnP rules (two variants included)if (!iRegion01&&!iRegion02&&!iRegion03&&!iRegion04&&!iRegion05&&!iRegion06&&GetLocalInt(oMod,"STARTING_GOLD")!=0){if (GetLocalInt(oMod,"STARTING_GOLD")==0) // Full amount of class based gold{if (GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC)) STARTING_GOLD = 160;else if (GetLevelByClass(CLASS_TYPE_BARD, oPC)) STARTING_GOLD = 160;else if (GetLevelByClass(CLASS_TYPE_CLERIC, oPC)) STARTING_GOLD = 200;else if (GetLevelByClass(CLASS_TYPE_DRUID, oPC)) STARTING_GOLD = 80;else if (GetLevelByClass(CLASS_TYPE_FIGHTER, oPC)) STARTING_GOLD = 240;else if (GetLevelByClass(CLASS_TYPE_MONK, oPC)) STARTING_GOLD = 20;else if (GetLevelByClass(CLASS_TYPE_PALADIN, oPC)) STARTING_GOLD = 240;else if (GetLevelByClass(CLASS_TYPE_RANGER, oPC)) STARTING_GOLD = 240;else if (GetLevelByClass(CLASS_TYPE_ROGUE, oPC)) STARTING_GOLD = 200;else if (GetLevelByClass(CLASS_TYPE_SORCERER, oPC)) STARTING_GOLD = 120;else if (GetLevelByClass(CLASS_TYPE_WIZARD, oPC)) STARTING_GOLD = 120;else STARTING_GOLD = 160;}if (GetLocalInt(oMod,"STARTING_GOLD")==0) // Roll for amount of class based gold{if (GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC)) STARTING_GOLD = d4(4)*10;else if (GetLevelByClass(CLASS_TYPE_BARD, oPC)) STARTING_GOLD = d4(4)*10;else if (GetLevelByClass(CLASS_TYPE_CLERIC, oPC)) STARTING_GOLD = d4(5)*10;else if (GetLevelByClass(CLASS_TYPE_DRUID, oPC)) STARTING_GOLD = d4(2)*10;else if (GetLevelByClass(CLASS_TYPE_FIGHTER, oPC)) STARTING_GOLD = d4(6)*10;else if (GetLevelByClass(CLASS_TYPE_MONK, oPC)) STARTING_GOLD = d4(5);else if (GetLevelByClass(CLASS_TYPE_PALADIN, oPC)) STARTING_GOLD = d4(6)*10;else if (GetLevelByClass(CLASS_TYPE_RANGER, oPC)) STARTING_GOLD = d4(6)*10;else if (GetLevelByClass(CLASS_TYPE_ROGUE, oPC)) STARTING_GOLD = d4(5)*10;else if (GetLevelByClass(CLASS_TYPE_SORCERER, oPC)) STARTING_GOLD = d4(3)*10;else if (GetLevelByClass(CLASS_TYPE_WIZARD, oPC)) STARTING_GOLD = d4(3)*10;else STARTING_GOLD = d4(4)*10;}AssignCommand(oPC, DelayCommand(3.6, TakeGoldFromCreature(GetGold(oPC), oPC, FALSE)));AssignCommand(oPC, DelayCommand(3.8, GiveGoldToCreature(oPC, STARTING_GOLD)));}// Set up PC with proper racial movement rate if system is turned onif (GetLocalInt(oMod,"RacialMovement")==1){SetRacialMovementRate(oPC);}/* ===== PC pseudo-heartbeat ====DOA Gold Encumbrance System 1.0 */if (GetLocalInt(oMod,"GoldEncumbrance")==1){GoldHrtbt(oPC);// Get the creature who triggered this event.object oPC = GetEnteringObject();// Only fire for (real) PCs.if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )return;// Update all players' journals.AddJournalQuestEntry("RULES", 1, oPC, FALSE, TRUE);// Update the party's journals.AddJournalQuestEntry("GAME INFO", 1, oPC);}ExecuteScript ("cnr_module_oce", OBJECT_SELF);//Looks at the trade journal and adjusts the player's reputations based on the variables stored there.RestoreReputations(oPC);//The very first time a player enters this sets their reputationsNewCharacter_SetReputations(oPC);}





Retour en haut






