diff --git a/_module/are/hallofstatues.are.json b/_module/are/hallofstatues.are.json index 5740346c..628a6703 100644 --- a/_module/are/hallofstatues.are.json +++ b/_module/are/hallofstatues.are.json @@ -1842,7 +1842,7 @@ }, "Version": { "type": "dword", - "value": 23 + "value": 24 }, "Width": { "type": "int", diff --git a/_module/are/labyrinth_undead.are.json b/_module/are/labyrinth_undead.are.json index 47d47b83..a7a4dd90 100644 --- a/_module/are/labyrinth_undead.are.json +++ b/_module/are/labyrinth_undead.are.json @@ -861,7 +861,7 @@ }, "Tile_ID": { "type": "int", - "value": 5 + "value": 166 }, "Tile_MainLight1": { "type": "byte", @@ -873,15 +873,15 @@ }, "Tile_Orientation": { "type": "int", - "value": 2 + "value": 3 }, "Tile_SrcLight1": { "type": "byte", - "value": 2 + "value": 3 }, "Tile_SrcLight2": { "type": "byte", - "value": 2 + "value": 3 } }, { @@ -2194,7 +2194,7 @@ }, "Tile_ID": { "type": "int", - "value": 118 + "value": 38 }, "Tile_MainLight1": { "type": "byte", @@ -2237,7 +2237,7 @@ }, "Tile_ID": { "type": "int", - "value": 39 + "value": 154 }, "Tile_MainLight1": { "type": "byte", @@ -2245,7 +2245,7 @@ }, "Tile_MainLight2": { "type": "byte", - "value": 1 + "value": 0 }, "Tile_Orientation": { "type": "int", @@ -2296,11 +2296,11 @@ }, "Tile_SrcLight1": { "type": "byte", - "value": 3 + "value": 2 }, "Tile_SrcLight2": { "type": "byte", - "value": 3 + "value": 2 } }, { @@ -3629,11 +3629,11 @@ }, "Tile_SrcLight1": { "type": "byte", - "value": 2 + "value": 3 }, "Tile_SrcLight2": { "type": "byte", - "value": 2 + "value": 3 } }, { @@ -44197,7 +44197,7 @@ }, "Version": { "type": "dword", - "value": 34 + "value": 32 }, "Width": { "type": "int", diff --git a/_module/git/hallofstatues.git.json b/_module/git/hallofstatues.git.json index 9df52dca..36d690c4 100644 --- a/_module/git/hallofstatues.git.json +++ b/_module/git/hallofstatues.git.json @@ -685,7 +685,7 @@ "__struct_id": 2, "Orientation": { "type": "float", - "value": -3.092491388320923 + "value": -3.092490911483765 }, "X": { "type": "float", @@ -891,7 +891,7 @@ "__struct_id": 2, "Orientation": { "type": "float", - "value": 3.092490911483765 + "value": 3.092490434646606 }, "X": { "type": "float", @@ -1097,7 +1097,7 @@ "__struct_id": 2, "Orientation": { "type": "float", - "value": -3.141578435897827 + "value": -3.141577959060669 }, "X": { "type": "float", @@ -1303,7 +1303,7 @@ "__struct_id": 2, "Orientation": { "type": "float", - "value": -3.04340386390686 + "value": -3.043403625488281 }, "X": { "type": "float", diff --git a/_module/git/labyrinth_undead.git.json b/_module/git/labyrinth_undead.git.json index 288c3e22..1d758042 100644 --- a/_module/git/labyrinth_undead.git.json +++ b/_module/git/labyrinth_undead.git.json @@ -31592,7 +31592,7 @@ }, "XPosition": { "type": "float", - "value": 165.0381317138672 + "value": 165.8017883300781 }, "YOrientation": { "type": "float", @@ -31600,7 +31600,7 @@ }, "YPosition": { "type": "float", - "value": 14.20234966278076 + "value": 13.92373180389404 }, "ZPosition": { "type": "float", @@ -34406,7 +34406,7 @@ }, "XPosition": { "type": "float", - "value": 164.8339538574219 + "value": 164.9021759033203 }, "YOrientation": { "type": "float", @@ -34414,11 +34414,11 @@ }, "YPosition": { "type": "float", - "value": 20.38010215759277 + "value": 19.68864059448242 }, "ZPosition": { "type": "float", - "value": 0.199998140335083 + "value": 0.2000000029802322 } }, { diff --git a/_module/ifo/module.ifo.json b/_module/ifo/module.ifo.json index 542a1f0a..048363ad 100644 --- a/_module/ifo/module.ifo.json +++ b/_module/ifo/module.ifo.json @@ -3131,21 +3131,6 @@ "value": 1 } }, - { - "__struct_id": 0, - "Name": { - "type": "cexostring", - "value": "PRC_XP_USE_PNP_XP" - }, - "Type": { - "type": "dword", - "value": 1 - }, - "Value": { - "type": "int", - "value": 0 - } - }, { "__struct_id": 0, "Name": { diff --git a/_module/itp/creaturepalcus.itp.json b/_module/itp/creaturepalcus.itp.json index da54a759..26938466 100644 --- a/_module/itp/creaturepalcus.itp.json +++ b/_module/itp/creaturepalcus.itp.json @@ -21,7 +21,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 51.0 + "value": 50.0 }, "FACTION": { "type": "cexostring", @@ -86,7 +86,7 @@ }, "NAME": { "type": "cexostring", - "value": "Gerater Beholder Mage" + "value": "Greater Beholder Mage" }, "RESREF": { "type": "resref", @@ -874,7 +874,7 @@ }, "FACTION": { "type": "cexostring", - "value": "" + "value": "Hostile" }, "NAME": { "type": "cexostring", @@ -1212,11 +1212,11 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 16.0 + "value": 15.0 }, "FACTION": { "type": "cexostring", - "value": "" + "value": "Hostile" }, "NAME": { "type": "cexostring", diff --git a/_module/ncs/codi_spawn.ncs b/_module/ncs/codi_spawn.ncs index 0f753750..13b0c632 100644 Binary files a/_module/ncs/codi_spawn.ncs and b/_module/ncs/codi_spawn.ncs differ diff --git a/_module/ncs/horsecrettrig1.ncs b/_module/ncs/horsecrettrig1.ncs index 94310027..55dd910b 100644 Binary files a/_module/ncs/horsecrettrig1.ncs and b/_module/ncs/horsecrettrig1.ncs differ diff --git a/_module/ncs/horsecrettrig2.ncs b/_module/ncs/horsecrettrig2.ncs index 46ff5170..a248b309 100644 Binary files a/_module/ncs/horsecrettrig2.ncs and b/_module/ncs/horsecrettrig2.ncs differ diff --git a/_module/ncs/no_spn_dragon.ncs b/_module/ncs/no_spn_dragon.ncs new file mode 100644 index 00000000..9a5d40e7 Binary files /dev/null and b/_module/ncs/no_spn_dragon.ncs differ diff --git a/_module/ncs/nw_c2_dropin9.ncs b/_module/ncs/nw_c2_dropin9.ncs index ea11fee8..fe9b9bd3 100644 Binary files a/_module/ncs/nw_c2_dropin9.ncs and b/_module/ncs/nw_c2_dropin9.ncs differ diff --git a/_module/ncs/oncliententer.ncs b/_module/ncs/oncliententer.ncs index aff7ebb8..22394310 100644 Binary files a/_module/ncs/oncliententer.ncs and b/_module/ncs/oncliententer.ncs differ diff --git a/_module/ncs/onplayerlevelup.ncs b/_module/ncs/onplayerlevelup.ncs index e010384e..a22c46af 100644 Binary files a/_module/ncs/onplayerlevelup.ncs and b/_module/ncs/onplayerlevelup.ncs differ diff --git a/_module/ncs/prc_pwonspawn.ncs b/_module/ncs/prc_pwonspawn.ncs index 3148909a..279796a4 100644 Binary files a/_module/ncs/prc_pwonspawn.ncs and b/_module/ncs/prc_pwonspawn.ncs differ diff --git a/_module/ncs/setxpbank.ncs b/_module/ncs/setxpbank.ncs index 9fd5a56a..e5f65565 100644 Binary files a/_module/ncs/setxpbank.ncs and b/_module/ncs/setxpbank.ncs differ diff --git a/_module/ncs/sf_wingwand.ncs b/_module/ncs/sf_wingwand.ncs index bc76f6ea..a416ab9c 100644 Binary files a/_module/ncs/sf_wingwand.ncs and b/_module/ncs/sf_wingwand.ncs differ diff --git a/_module/ncs/sf_xp.ncs b/_module/ncs/sf_xp.ncs index 7416ecc4..17ae0514 100644 Binary files a/_module/ncs/sf_xp.ncs and b/_module/ncs/sf_xp.ncs differ diff --git a/_module/ncs/silenttrigger.ncs b/_module/ncs/silenttrigger.ncs index 9e22b5b0..728e58e1 100644 Binary files a/_module/ncs/silenttrigger.ncs and b/_module/ncs/silenttrigger.ncs differ diff --git a/_module/ncs/silenttrigger2.ncs b/_module/ncs/silenttrigger2.ncs index 2274260f..90e8f4e5 100644 Binary files a/_module/ncs/silenttrigger2.ncs and b/_module/ncs/silenttrigger2.ncs differ diff --git a/_module/ncs/spawnb_cc_activ.ncs b/_module/ncs/spawnb_cc_activ.ncs index de4d1662..b571555b 100644 Binary files a/_module/ncs/spawnb_cc_activ.ncs and b/_module/ncs/spawnb_cc_activ.ncs differ diff --git a/_module/ncs/spawnb_cc_dactiv.ncs b/_module/ncs/spawnb_cc_dactiv.ncs index 7e94385e..77e80d77 100644 Binary files a/_module/ncs/spawnb_cc_dactiv.ncs and b/_module/ncs/spawnb_cc_dactiv.ncs differ diff --git a/_module/ncs/x2_def_heartbeat.ncs b/_module/ncs/x2_def_heartbeat.ncs deleted file mode 100644 index bb991a9b..00000000 Binary files a/_module/ncs/x2_def_heartbeat.ncs and /dev/null differ diff --git a/_module/ncs/x2_def_spawn.ncs b/_module/ncs/x2_def_spawn.ncs index c3ebad0e..b5f06524 100644 Binary files a/_module/ncs/x2_def_spawn.ncs and b/_module/ncs/x2_def_spawn.ncs differ diff --git a/_module/nss/codi_spawn.nss b/_module/nss/codi_spawn.nss index 56f83b13..819c5a4f 100644 --- a/_module/nss/codi_spawn.nss +++ b/_module/nss/codi_spawn.nss @@ -582,27 +582,25 @@ void main() { //:: Execute drop in from above spawn. ExecuteScript("nw_c2_dropin9", OBJECT_SELF); + //:: Execute CODI AI OnSpawn script. + ExecuteScript(sSpawnType, OBJECT_SELF); } else { //:: Execute CODI AI OnSpawn script. ExecuteScript(sSpawnType, OBJECT_SELF); - - //:: Execute default OnSpawn script. - //ExecuteScript("nw_c2_default9", OBJECT_SELF); + //:: Execute PRC OnSpawn module hook script. + ExecuteScript("prc_pwonspawn", OBJECT_SELF); + //:: Execute PRC OnSpawn script. + ExecuteScript("prc_npc_spawn", OBJECT_SELF); } //:: Set or Randomize name ms_Nomenclature(OBJECT_SELF); - -//:: Execute PRC OnSpawn script. - ExecuteScript("prc_npc_spawn", OBJECT_SELF); - //:: Post Spawn event requested if (nSpecEvent == 2 || nSpecEvent == 3) { - SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN)); + SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN)); } - } \ No newline at end of file diff --git a/_module/nss/no_spn_dragon.nss b/_module/nss/no_spn_dragon.nss new file mode 100644 index 00000000..76fdd343 --- /dev/null +++ b/_module/nss/no_spn_dragon.nss @@ -0,0 +1,174 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// +#include "sd_lootsys_tools" +#include "no_lib_data" +#include "no_inc" + +void main() +{ +SetThreatLevel(OBJECT_SELF); + + + //Dragon config + +AddBehaviour( "+ENHANCESELF", 100 ); //enhancing spells [self] + +AddBehaviour( "+DISPELAOE", 90 ); //Dispel AOEs +AddBehaviour( "+DISPEL", 40 ); //Dispel [enemies] +AddBehaviour( "+DISMISSAL", 80 ); //Dismiss [summoned enemies] + +AddBehaviour( "+BREATH", 25 ); //breath weapons + +AddBehaviour( "+FEATENHANCE", 60 ); //feat enhance [self] +AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + +/* +// Movement + +AddBehaviour( "+AVOIDENEMY", 100 ); //Keep away from enemies +AddBehaviour( "+AVOIDMELEE", 100 ); //Flee +//Melee +AddBehaviour( "+MELEEASSIST", 100 ); //Melee Assist [allies] +AddBehaviour( "+ATKRANGED", 100 ); //ranged attack +AddBehaviour( "+ATKMELEE", 100 ); //melee attack +// Buffs self +AddBehaviour( "+DEFSELF", 100 ); //defensive [self] +AddBehaviour( "+ENHANCESELF", 100 ); //enhancing spells [self] +AddBehaviour( "+FEATENHANCE", 100 ); //feat enhance [self] +// Buffs party +AddBehaviour( "+DEFSING", 100 ); //defensive [single allies] +AddBehaviour( "+ENHANCESING", 100 ); //enhancing spells [single allies] +AddBehaviour( "+VIS", 100 ); //visual aid spells [self/allies] +AddBehaviour( "+GROUPENHANCE", 100 ); //enhancing spells [AOE] +// Curing +AddBehaviour( "+HELP", 100 ); //Restore debuffs [self/allies] +AddBehaviour( "+RAISE", 100 ); //Ressurect [allies] +// Healing +AddBehaviour( "+HEAL", 100 ); //heal [self/allies] +AddBehaviour( "+HEALSELF", 100 ); //Use pots/spec abil [heal self] +AddBehaviour( "+GROUPHEAL", 100 ); //AOE heal [Allies] +// Off casting +AddBehaviour( "+DIRECT", 100 ); // attack spells [single enemy] +AddBehaviour( "+TOUCH", 100 ); //touch attack spells [single enemy] +AddBehaviour( "+AREA", 100 ); //AOEs +AddBehaviour( "+SUMMON", 100 ); //Summon allies +//Def casting +AddBehaviour( "+COUNTERSPELL", 100 ); //Counterspell [enemy] +AddBehaviour( "+DISPELAOE", 100 ); //Dispel AOEs +AddBehaviour( "+DISPEL", 100 ); //Dispel [enemies] +AddBehaviour( "+DISMISSAL", 100 ); //Dismiss [summoned enemies] +AddBehaviour( "+BREACH", 100 ); //Spell Breach [enemy] +// Special +AddBehaviour( "+TIMESTOP", 100 ); //Cast Time Stop +AddBehaviour( "+BREATH", 100 ); //breath weapons +AddBehaviour( "+TURN", 100 ); //Turn Undead + +AddBehaviour( "+EYERAYS", 100 ); //Specific behaviour for: Beholders +AddBehaviour( "+CENTRALEYE", 100 ); //Specific behaviour for: Beholders + +*/ + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + +int iDice = d100(); +if (iDice<20)ExecuteScript ("cd_helper_func", OBJECT_SELF); +} \ No newline at end of file diff --git a/_module/nss/nw_c2_dropin9.nss b/_module/nss/nw_c2_dropin9.nss index 66700094..24b1c8c0 100644 --- a/_module/nss/nw_c2_dropin9.nss +++ b/_module/nss/nw_c2_dropin9.nss @@ -82,6 +82,7 @@ void main() // combat. GenerateNPCTreasure(); //* Use this to create a small amount of treasure on the creature - - ExecuteScript("prc_pwonspawn", OBJECT_SELF); + + ExecuteScript("prc_pwonspawn", OBJECT_SELF); + ExecuteScript("prc_npc_spawn", OBJECT_SELF); } diff --git a/_module/nss/oncliententer.nss b/_module/nss/oncliententer.nss index a9d7da65..56ee825a 100644 --- a/_module/nss/oncliententer.nss +++ b/_module/nss/oncliententer.nss @@ -18,6 +18,10 @@ If the player is playing a legal character or not...read below.. And if the Player themself have been banned from the module or not.. */ ////////////////////////////////////////////////////////////////////// +#include "nwnx_player" +//Required Include For Color Messages(Read include to learn more) +#include "gen_inc_color" +#include "inc_utility" //Redundant Variables Declared effect eEffect; @@ -26,35 +30,30 @@ object oItem; object aTarget; location bTarget; -//Required Include For Color Messages(Read include to learn more) -#include "gen_inc_color" -#include "inc_utility" -#include "nwnx_player" - //Required Include for SimTools //#include "fky_chat_inc" +void SetTlkOverrideForMaximumLevel(object oPC); void SetTlkOverrideForMaximumLevel(object oPC) { - int nLevel = GetHitDice(oPC); - if (nLevel < 40) - { - NWNX_Player_SetTlkOverride(oPC, 315, ""); - } - else - { - NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n"); - } + int nLevel = GetHitDice(oPC); + + if (nLevel < 40) + { + NWNX_Player_SetTlkOverride(oPC, 315, ""); + } + else + { + NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n"); + } } - //Main Script void main() { - ExecuteScript("prc_onenter", OBJECT_SELF); - - //Declare Major Variables + ExecuteScript("prc_onenter", OBJECT_SELF); + //Declare Major Variables.. object oPC; oPC = GetEnteringObject(); object oTarget; @@ -62,30 +61,32 @@ void main() object oPlayer = oPC; object oPP = oPC; string sCDKey = GetPCPublicCDKey(oPC, FALSE); - - SetTlkOverrideForMaximumLevel(GetEnteringObject()); + + SetTlkOverrideForMaximumLevel(oPC); //IMPORTANT, please set the Nap Time Below! //If changed here you must open the script "kopcwand" and adjust it there! -object oNap = GetItemPossessedBy(oPC, "napper"); - if(oNap !=OBJECT_INVALID) - { - //Only on PCs! - if(GetIsPC(oPC) && !GetIsDM(oPC) && !GetIsDMPossessed(oPC)) - { - //Start the nap all over again! (the 15 = minutes of nap!) - SetLocalInt(oTarget, "NAP_TIME", 15); //set 15 to your taste - //Allow them to actually enter the module... - DelayCommand(12.0, ExecuteScript("naptime", oPC)); - return; - } - } + object oNap = GetItemPossessedBy(oPC, "napper"); + + if(oNap !=OBJECT_INVALID) + { + //Only on PCs! + if(GetIsPC(oPC) && !GetIsDM(oPC) && !GetIsDMPossessed(oPC)) + { + //Start the nap all over again! (the 15 = minutes of nap!) + SetLocalInt(oTarget, "NAP_TIME", 15); //set 15 to your taste + //Allow them to actually enter the module... + DelayCommand(12.0, ExecuteScript("naptime", oPC)); + return; + } + } -//Only for PCs! -if(GetIsDM(oPC)) -{ -AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE); -return; } +//Only for DMs! + if(GetIsDM(oPC)) + { + AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE); + return; + } /////////////////////////////////////////////////////////////////////////// @@ -122,89 +123,89 @@ return; } //Please leave the credits to the module within the message. //Colorful Server Message sent to all PCs when they enter the module.. -string sMessage; -sMessage = GetRGB(1,7,7); //The color (See above) -sMessage += "Welcome to "; //The text to be colorized by the above color. -sMessage += GetRGB(15,15,1);//The next color. -sMessage += "Server Genisys "; //The next text to be colorized by the above color. -sMessage += GetRGB(15,1,1);//etc.. -sMessage += "a Revised "; -sMessage += GetRGB(7,7,15); -sMessage += "1.69 "; -sMessage += GetRGB(1,15,1); -sMessage += "Paths of Ascension "; -sMessage += GetRGB(13,9,13); -sMessage += "Classic Module "; -sMessage += GetRGB(12,10,7); -sMessage += "Revised & "; -sMessage += GetRGB(); -sMessage += "Rescripted By "; -sMessage += GetRGB(15,5,1); -sMessage += "Genisys (Guile) "; -sMessage += GetRGB(12,10,7); -sMessage += "from 8/20/08 to 3/21/09."; -string sNewb = GetRGB(1,15,1) + "This is PRC Presents Path of Ascension."; -string sNewb2 = GetRGB(1,15,1) + "Contact Altpersona on Discord if you need assistance."; + string sMessage; + sMessage = GetRGB(1,7,7); //The color (See above) + sMessage += "Welcome to "; //The text to be colorized by the above color. + sMessage += GetRGB(15,15,1);//The next color. + sMessage += "Server Genisys "; //The next text to be colorized by the above color. + sMessage += GetRGB(15,1,1);//etc.. + sMessage += "a Revised "; + sMessage += GetRGB(7,7,15); + sMessage += "1.69 "; + sMessage += GetRGB(1,15,1); + sMessage += "Paths of Ascension "; + sMessage += GetRGB(13,9,13); + sMessage += "Classic Module "; + sMessage += GetRGB(12,10,7); + sMessage += "Revised & "; + sMessage += GetRGB(); + sMessage += "Rescripted By "; + sMessage += GetRGB(15,5,1); + sMessage += "Genisys (Guile) "; + sMessage += GetRGB(12,10,7); + sMessage += "from 8/20/08 to 3/21/09."; + string sNewb = GetRGB(1,15,1) + "This is PRC Presents Path of Ascension."; + string sNewb2 = GetRGB(1,15,1) + "Contact Altpersona on Discord if you need assistance."; //string sNewb = GetRGB(1,15,1) + "Be sure to read your journal frequently (press J)."; //string sNewb2 = GetRGB(1,15,1) + "Be sure to examine the Rest Menu carefully."; -string sEnter = GetName(oPC) + " / " + GetPCPlayerName(oPC) + " / " + GetPCPublicCDKey(oPC) + " / " + GetPCIPAddress(oPC) + " Entered." ; -SendMessageToAllDMs(sEnter); + string sEnter = GetName(oPC) + " / " + GetPCPlayerName(oPC) + " / " + GetPCPublicCDKey(oPC) + " / " + GetPCIPAddress(oPC) + " Entered." ; + SendMessageToAllDMs(sEnter); //Get all the stats on the player when they enter the module... -WriteTimestampedLogEntry(sEnter); + WriteTimestampedLogEntry(sEnter); //Float welcome message by.. -DelayCommand(15.3, FloatingTextStringOnCreature(sMessage, oPC, FALSE)); + DelayCommand(15.3, FloatingTextStringOnCreature(sMessage, oPC, FALSE)); -if(GetHitDice(oPC)<=6) -{ -DelayCommand(19.3, FloatingTextStringOnCreature(sNewb, oPC, FALSE)); -DelayCommand(27.3, FloatingTextStringOnCreature(sNewb2, oPC, FALSE)); -} + if(GetHitDice(oPC)<=6) + { + DelayCommand(19.3, FloatingTextStringOnCreature(sNewb, oPC, FALSE)); + DelayCommand(27.3, FloatingTextStringOnCreature(sNewb2, oPC, FALSE)); + } //This means the entering Character has been banned. -int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP); + int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP); -object oTag; -location lTag; + object oTag; + location lTag; //This part is about verifying the Player's name.. //A player must have at least a 2 character name or they are going to //return with an error! If they have spaces in their name it will return //with an error as well, including alt code! -string sPCNM = GetName(oPP); -string sPCNMR = GetStringRight(sPCNM, 2); -string sNC1; string sNC2; string sRNC1; string sRNC2; -int nBad; + string sPCNM = GetName(oPP); + string sPCNMR = GetStringRight(sPCNM, 2); + string sNC1; string sNC2; string sRNC1; string sRNC2; + int nBad; //Find the second character of the players name.. -sNC1 = GetSubString(sPCNM, 0, 1); + sNC1 = GetSubString(sPCNM, 0, 1); //Find the second character of the players name.. -sNC2 = GetSubString(sPCNM, 0, 2); + sNC2 = GetSubString(sPCNM, 0, 2); //Find the last letter in the player's name. -sRNC1 = GetSubString(sPCNMR, 0, 1); + sRNC1 = GetSubString(sPCNMR, 0, 1); //Find the next to the last letter in the player's name. -sRNC2 = GetSubString(sPCNMR, 0, 2); + sRNC2 = GetSubString(sPCNMR, 0, 2); /////////////////////////IMPORTANT////////////////////////////////// //You must make all the "" below into " " to check for legal names //I turned it off because a lot of my characters have bad names! //Simply put the cursor between "" and hit the space bar for "" to " " -if(sNC1 =="") -{ nBad =1; } -else if(sNC2 =="") -{ nBad =1; } -else if(sRNC1 =="") -{ nBad =1; } -else if(sRNC2 =="") -{ nBad =1; } -else { nBad = 0; } + if(sNC1 =="") + { nBad =1; } + else if(sNC2 =="") + { nBad =1; } + else if(sRNC1 =="") + { nBad =1; } + else if(sRNC2 =="") + { nBad =1; } + else { nBad = 0; } //See below to activate this system.. //////////////////////////////////////////////////////////////////////////// //This is for the rest of the script, if it's not a PC stop here! -if(!GetIsPC(oPC))return; + if(!GetIsPC(oPC))return; ///////////////////////////////////////////////////////////////////////////// @@ -217,15 +218,15 @@ if(!GetIsPC(oPC))return; //AddJournalQuestEntry("x2spells", 1, oPC, FALSE, FALSE); //AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE); //AddJournalQuestEntry("shifter", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("xprules", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("serverrules", 1, oPC, FALSE, FALSE); + AddJournalQuestEntry("xprules", 1, oPC, FALSE, FALSE); + AddJournalQuestEntry("serverrules", 1, oPC, FALSE, FALSE); //AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE); -if(GetHitDice(oPC) <=5) -{ -AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE); -} + if(GetHitDice(oPC) <=5) + { + AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE); + } //////////////////IMPORTANT////////////////IMPORTANT//////////////////////// @@ -241,9 +242,9 @@ AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE); if(GetHitDice(oPC) == 40 || GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID) { //Lets make the concealed 50% - eEffect = EffectConcealment(50); - eEffect = SupernaturalEffect(eEffect); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + eEffect = EffectConcealment(50); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); //Lets make the look like a ghost.. :) //To activate, simply delete the // below this line @@ -256,11 +257,11 @@ AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE); //This is the immortal option, you must utilize the "makeimmortal" script //to make players immortal (please read that script.) -if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID) -{ - //Run this script on the player (See script to configure settings) - ExecuteScript("powerimmortal", oPC); -} + if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID) + { + //Run this script on the player (See script to configure settings) + ExecuteScript("powerimmortal", oPC); + } ////////////////////////////////////////////////////////////////////////////// //If a player has been found with an illegal character they will have this item. @@ -284,45 +285,45 @@ if (GetItemPossessedBy(oPC, "banned")!= OBJECT_INVALID) } // */ //////////////////////////////////////////////////////////////////////////// -object oDeath = GetItemPossessedBy(oPC, "death"); + object oDeath = GetItemPossessedBy(oPC, "death"); //Since the player was dead when they logged, kill them! -if (oDeath!=OBJECT_INVALID) - { + if (oDeath!=OBJECT_INVALID) + { //FIRST REMOVE THE DEATH TOKEN!! - DestroyObject(oDeath, 0.0f); + DestroyObject(oDeath, 0.0f); - effect eEffect; - eEffect = EffectDamage(3000, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY); - eEffect = SupernaturalEffect(eEffect); - DelayCommand(5.8, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC)); - DelayCommand(6.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC)); - DelayCommand(7.0, FloatingTextStringOnCreature - ("Logging out to cheat death is not permitted on this server, YOU HAVE BEEN WARNED!", oPC, TRUE)); + effect eEffect; + eEffect = EffectDamage(3000, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY); + eEffect = SupernaturalEffect(eEffect); + DelayCommand(5.8, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC)); + DelayCommand(6.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC)); + DelayCommand(7.0, FloatingTextStringOnCreature + ("Logging out to cheat death is not permitted on this server, YOU HAVE BEEN WARNED!", oPC, TRUE)); - SendMessageToAllDMs(GetName(oPC) + " HAS LOGGED OUT TO CHEAT DEATH!"); + SendMessageToAllDMs(GetName(oPC) + " HAS LOGGED OUT TO CHEAT DEATH!"); } //////////////////////////////////////////////////////////////////////// //Handling BANN on this server... //Let's see if the entering PC has been banned Altogether! -if(GetCampaignInt(GetName(GetModule()), "ADMIN_BANN", oPP)==2) -{ -//Boot the PC fast! -DelayCommand(3.3, BootPC(oPP)); -return; -} + if(GetCampaignInt(GetName(GetModule()), "ADMIN_BANN", oPP)==2) + { + //Boot the PC fast! + DelayCommand(3.3, BootPC(oPP)); + return; + } //Let's see if the player's character has been banned.. -if(GetItemPossessedBy(oPP, "char_bann")!=OBJECT_INVALID) -{ + if(GetItemPossessedBy(oPP, "char_bann")!=OBJECT_INVALID) + { -//If so boot them fast! -DelayCommand(2.5, BootPC(oPP)); + //If so boot them fast! + DelayCommand(2.5, BootPC(oPP)); -return; -} + return; + } @@ -362,4 +363,4 @@ else /////////////////////////////////////////////////////////////// //End Script -} +} \ No newline at end of file diff --git a/_module/nss/onplayerlevelup.nss b/_module/nss/onplayerlevelup.nss index 525534c4..5148a8fd 100644 --- a/_module/nss/onplayerlevelup.nss +++ b/_module/nss/onplayerlevelup.nss @@ -14,73 +14,79 @@ Intergrated SimTools to the OnPlayerLevelUp Event //Required Include for SimTools //#include "fky_chat_inc" +void SetTlkOverrideForMaximumLevel(object oPC); + +void SendMessageToAllPC(string sMessage); + void SetTlkOverrideForMaximumLevel(object oPC) { - int nLevel = GetHitDice(oPC); - if (nLevel < 40) - { - NWNX_Player_SetTlkOverride(oPC, 315, ""); - } - else - { - NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n"); - } + int nLevel = GetHitDice(oPC); + + if (nLevel < 40) + { + NWNX_Player_SetTlkOverride(oPC, 315, ""); + } + else + { + NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n"); + } } void SendMessageToAllPC(string sMessage) { - object oPC = GetFirstPC(); - while(GetIsObjectValid(oPC)) - { - SendMessageToPC(oPC, sMessage); - oPC = GetNextPC(); - } + object oPC = GetFirstPC(); + + while(GetIsObjectValid(oPC)) + { + SendMessageToPC(oPC, sMessage); + oPC = GetNextPC(); + } } void main() { ExecuteScript("prc_levelup", OBJECT_SELF); - object oPC = GetPCLevellingUp(); int nHD = GetHitDice(oPC); location lSaved = GetLocation(oPC); int MULTI_PLAYER = GetLocalInt(GetModule(), "multi"); - - SetTlkOverrideForMaximumLevel(GetPCLevellingUp()); + ///////LOCATION SAVING OPTION//////// //Delete the /* above to activate + SetTlkOverrideForMaximumLevel(oPC); + //If in the guild only! //If they are in the guild... -if(GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID) -{ -if(GetArea(GetAreaFromLocation(lSaved))!=OBJECT_INVALID) -{ - object oGuild = GetItemPossessedBy(oPC, "guildstone"); + if(GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID) + { + if(GetArea(GetAreaFromLocation(lSaved))!=OBJECT_INVALID) + { + object oGuild = GetItemPossessedBy(oPC, "guildstone"); - //Store the PC's location, so they can come back here after relogging - SetCampaignLocation("LOCATIONS", GetName(oGuild), lSaved, oPC); + //Store the PC's location, so they can come back here after relogging + SetCampaignLocation("LOCATIONS", GetName(oGuild), lSaved, oPC); - //Tell the PC thier location was saved.. - SendMessageToPC(oPC, "Location Saved."); -} -} + //Tell the PC thier location was saved.. + SendMessageToPC(oPC, "Location Saved."); + } + } // (DO NOT TOUCH THIS LINE!) */ ///////////////////////////////////////// -///Character Auto Save (Single Character / safe save) +//:: Character Auto Save (Single Character / safe save) -if(MULTI_PLAYER) -{ - //DelayCommand(3.0, ExportSingleCharacter(oPC)); -} -else -{ - //DelayCommand(2.0, DoSinglePlayerAutoSave()); -} + if(MULTI_PLAYER) + { + //DelayCommand(3.0, ExportSingleCharacter(oPC)); + } + else + { + //DelayCommand(2.0, DoSinglePlayerAutoSave()); + } if(nHD == 5 || nHD == 10 || nHD == 15 || nHD == 20 || nHD == 25 || nHD == 30 || nHD == 35 || nHD == 40) @@ -90,27 +96,17 @@ else if(nHD == 40) ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); - } + if (!GetIsPC(oPC)) return; + int nInt; + nInt = GetObjectType(oPC); - { + if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), oPC); + else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), GetLocation(oPC)); -object oPC = GetPCLevellingUp(); -if (!GetIsPC(oPC)) return; - -object oTarget; -oTarget = oPC; - - -int nInt; -nInt = GetObjectType(oTarget); - -if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), oTarget); -else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), GetLocation(oTarget)); - - } + /////////////////////////CHARACTER SCANNING OPTIONS//////////////////////// diff --git a/_module/nss/prc_pwonspawn.nss b/_module/nss/prc_pwonspawn.nss index e0de30f5..27a22b6e 100644 --- a/_module/nss/prc_pwonspawn.nss +++ b/_module/nss/prc_pwonspawn.nss @@ -13,6 +13,16 @@ void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot); +void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot) +{ + if (GetItemInSlot(nSlot) != oItem) + { + //ClearAllActions(); + AssignCommand(oNPC, ActionEquipItem(oItem, nSlot)); + DelayCommand(0.5, ReallyEquipItemInSlot(oNPC, oItem, nSlot)); + } +} + void main() { //:: Initialize Major Variables @@ -30,8 +40,6 @@ void main() object oSkelly; object oPC = GetFirstObjectInArea(oArea); - //ExecuteScript("prc_npc_spawn", OBJECT_SELF); -NOT NEEDED - //:: Get average PC level for area //:: Cycle through PCs in Area @@ -67,15 +75,19 @@ void main() (sMonthDay == "10/31") || (sMonthDay == "11/01")) { + //: Don't spawn skeletons from skeletons or commoners + if (GetResRef(OBJECT_SELF) == "pa_skeleton" || GetResRef(OBJECT_SELF) == "nw_skeleton" || nCommoner > 0) + return; + //:: 33% chance to spawn if ( Random(100) < 33 ) { //:: Spawn Skeleton. eVFX = EffectVisualEffect(VFX_IMP_EVIL_HELP); oSkelly = CreateObject(OBJECT_TYPE_CREATURE, "nw_skeleton", GetLocation(OBJECT_SELF)); - DelayCommand(0.1f, ActionDoLevelUp(oSkelly, nAveragePCLevel)); + DelayCommand(0.0, ActionDoLevelUp(oSkelly, nAveragePCLevel)); - //:: Assign Weapon + //:: Assign Weapon int nResult = d6(1); int nStackSize = 1; // Create 1 items; string sItem; @@ -109,19 +121,8 @@ void main() //:: Apply VFX & Attack AssignCommand(oSkelly, DetermineCombatRound(OBJECT_SELF)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly); + DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly)); } - } - -} - -void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot) -{ - if (GetItemInSlot(nSlot) != oItem) - { - //ClearAllActions(); - AssignCommand(oNPC, ActionEquipItem(oItem, nSlot)); - DelayCommand(0.3, ReallyEquipItemInSlot(oNPC, oItem, nSlot)); - } -} \ No newline at end of file + } +} \ No newline at end of file diff --git a/_module/nss/rd_level.nss b/_module/nss/rd_level.nss index 3a542c6b..b4b829bb 100644 --- a/_module/nss/rd_level.nss +++ b/_module/nss/rd_level.nss @@ -1,10 +1,6 @@ -#include "prc_inc_util" - - +void ActionDoLevelUp(object oCreature, int iLevels); int LevelMob(object oCreature, int iLevels); int GetPackage(int iClass); -void ActionDoLevelUp(object oCreature, int iLevels); - void ActionDoLevelUp(object oCreature, int iLevels) { @@ -13,35 +9,38 @@ void ActionDoLevelUp(object oCreature, int iLevels) int LevelMob(object oCreature, int iLevels) { -int iNewLevel; -int iIndex; -int iClass; -int iPackage; + int iNewLevel; + int iIndex; + int iClass; + int iPackage; -if (GetClassByPosition(2,oCreature) == CLASS_TYPE_INVALID) - { - iClass = GetClassByPosition(1,oCreature); - iPackage =PACKAGE_INVALID; - } else { - iClass = CLASS_TYPE_INVALID; - iPackage =PACKAGE_INVALID; - } + if (GetClassByPosition(2,oCreature) == CLASS_TYPE_INVALID) + { + iClass = GetClassByPosition(1,oCreature); + iPackage =PACKAGE_INVALID; + } + else + { + iClass = CLASS_TYPE_INVALID; + iPackage =PACKAGE_INVALID; + } -iIndex = 1; -while (iIndex <= iLevels) - { - iNewLevel=LevelUpHenchman(oCreature,iClass,TRUE,iPackage); - iIndex++; - } + iIndex = 1; + + while (iIndex <= iLevels) + { + iNewLevel=LevelUpHenchman(oCreature,iClass,TRUE,iPackage); + iIndex++; + } -//Force Rest to mem spells -PRCForceRest(oCreature); + //Force Rest to mem spells + ForceRest(oCreature); -//Give more treasure to be lvl appropriate -//rem this out cuz too much code is running and getting error -//CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, oCreature); + //Give more treasure to be lvl appropriate + //rem this out cuz too much code is running and getting error + //CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, oCreature); -return iNewLevel; + return iNewLevel; } //Setup Random Packages, note that Wizards won't get random packages @@ -168,7 +167,5 @@ switch (iClass) break; } -return iPackage; -} - -//:: void main (){} + return iPackage; +} \ No newline at end of file diff --git a/_module/nss/sd_lootsys_tools.nss b/_module/nss/sd_lootsys_tools.nss new file mode 100644 index 00000000..599132b0 --- /dev/null +++ b/_module/nss/sd_lootsys_tools.nss @@ -0,0 +1,1964 @@ +#include "x2_inc_itemprop" +//#include "nw_i0_generic" + +////////////////////////////////////////////////////////// +//: Constants +//: +//:note* See line 2782 of "sd_lootsystem" for specific item droprate configuration + +const int LUCK_CHANCE = 5000; // 1 in x chance getting a much better item (0 for off) +const int DROP_RATE = 4; // % chance or loot drop +const int CHANCE_WORN = 15; // % chance of worn item (0 for off) +const int CHANCE_BROKEN = 5; // % chance of broken item (0 for off) +const int CHANCE_WFOCUS = 20; // % chance of weapon drop based on weap focus + +// Generates a random weapon +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the weapon +// iRange = the quality of the weapon: 1=lowest 5=highest +// SockChance = a % chance for the generated weapon to be socketed +// DamBroke = a switch to disable chance of damaged/broken weapon: 0=on 1=off +void DropWeapon(object oMob, object oSack, int iRange, int SockChance, int DamBroke); + +// Generates random chest armor +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the armor +// iRange = the quality of the armor: 1=lowest 5=highest +// SockChance = a % chance for the generated armor to be socketed +// DamBroke = a switch to disable chance of damaged/broken armor: 0=on 1=off +void DropArmor(object oMob, object oSack, int iRange, int SockChance, int DamBroke); + +// Generates a random shield +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the shield +// iRange = the quality of the shield: 1=lowest 5=highest +// SockChance = a % chance for the generated shield to be socketed +// DamBroke = a switch to disable chance of damaged/broken shield: 0=on 1=off +void DropShield(object oMob, object oSack, int iRange, int SockChance, int DamBroke); + +// Generates random monk gloves +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the gloves +// iRange = the quality of the gloves: 1=lowest 5=highest +// SockChance = a % chance for the generated gloves to be socketed +// DamBroke = a switch to disable chance of damaged/broken gloves: 0=on 1=off +void DropMonkGloves(object oMob, object oSack, int iRange, int SockChance, int DamBroke); + +// Generates a random magic item (i.e. boots, helm, amulet, ring, belt, bracer) +// ============================================================================ +// oMob = the creature that just died +// oSack = the object into which you will spawn the item +// iRange = the quality of the item: 1=lowest 5=highest +// SockChance = a % chance for the generated item to be socketed +// DamBroke = a switch to disable chance of damaged/broken item: 0=on 1=off +void DropMagicItem(object oMob, object oSack, int iRange, int SockChance, int DamBroke); + +// Generates a random socket gem +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the gem +// iRange = the quality of the gem: 1=lowest 5=highest +void DropGem(object oMob, object oSack, int iRange); + +// Generates random ranged ammo (only arrows & bolts) +// ================================================== +// oMob = the creature that just died +// oSack = the object into which you will spawn the ammo +// iRange = the quality of the ammo: 1=lowest 5=highest +void DropAmmo(object oMob, object oSack, int iRange); + +// Generates a random scroll +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the scroll +// iRange = the quality of the scroll: 1=lowest 5=highest +// note* this is based on the gold-value of the scroll +void DropScroll(object oMob, object oSack, int iRange); + +// Generates a random potion +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the potion +// iStack = Stacksize +void DropPot(object oMob, object oSack, int iStack); + +// Generates a random misc item (i.e. bag) +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the misc +void DropMisc(object oMob, object oSack); + +// Generates a random rod or wand +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the rod or wand +void DropRodWand(object oMob, object oSack); + +// Generates random gold +// ================================================== +// oMob = the creature that just died +// note* the gold amount will be based on the creature's level using the below formula +// Gold = (d20()*Creature LVL)+(15*Creature LVL)+iBonus +// oSack = the object into which you will spawn the ammo +// iBonus = additional gold to be added to the tally +void DropGold(object oMob, object oSack, int iBonus); + +// Drop randomly chosen and generated loot & some gold +// =================================================== +// *This is the main call function of the sd lootsystem +// oMob = the creature that just died (the loot dropped is based on their class & level) +// oSack = the object into which you will spawn the loot +void sd_droploot (object oMob, object oSack); + +// Generates a random alchemy recipe +// ======================================= +// oMob = the creature that just died +// oSack = the object into which you will spawn the recipe +// iRange = the quality of the item: 1=lowest 5=highest +void DropAlchemyRecipe(object oMob, object oSack, int iRange); + + + + + +const string COLORTOKEN =" ##################$%&'()*+,-./0123456789:;;==?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[]^_`abcdefghijklmnopqrstuvwxyz{|}~~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ¡¡¢£¤¥¦§¨©ª«¬¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþþ"; + +string ColorString(string sText, int nRed=255, int nGreen=255, int nBlue=255) +{ + return "" + sText + ""; +} + +void SetQuality(object oItem, string sIName, int iQual) +{ + string sName; + switch(iQual) + { + case 0: sName = ColorString("Inferior "+sIName,255, 255, 255); break; + case 1: sName = ColorString("Superior "+sIName,255, 255, 255); break; + case 2: sName = ColorString("Enchanted "+sIName, 0, 255, 0); break; + case 3: sName = ColorString("Powerful "+sIName, 65, 105, 225); break; + case 4: sName = ColorString("Champion's "+sIName, 102, 205, 170); break; + case 5: sName = ColorString("Epic "+sIName, 128, 0, 218); break; + case 6: sName = ColorString("Heroic "+sIName, 255, 255, 0 ); break; + case 7: sName = ColorString("Legendary "+sIName, 218, 165, 32 ); break; + case 8: sName = ColorString("Titan's "+sIName, 255, 0, 255 ); break; + } + SetName(oItem, sName); +} + +void SetThreatLevel(object oMob) +{ + int iHD = GetHitDice(OBJECT_SELF); + int iRange; + string sName; + string cName = GetName(oMob); + + if (iHD>0&&iHD<6)iRange=1; // lvl 1-5 + if (iHD>5&&iHD<11)iRange=2; // lvl 6-10 + if (iHD>10&&iHD<21)iRange=3; // lvl 11-20 + if (iHD>20&&iHD<31)iRange=4; // lvl 21-30 + if (iHD>30&&iHD<41)iRange=5; // lvl 31-40 + + switch(iRange) + { + case 1: sName = ColorString(cName,255, 255, 255); break; + case 2: sName = ColorString(cName,189, 183, 107); break; + case 3: sName = ColorString(cName,218, 165, 32); break; + case 4: sName = ColorString(cName,210, 105, 30); break; + case 5: sName = ColorString(cName,255, 0, 0); break; + } + if (GetLocalInt(OBJECT_SELF, "BOSS")==1)sName = ColorString(cName,255, 255, 0); + SetName(oMob, sName); +} + +void NameSack(object oSack) +{ + string sName = GetName(OBJECT_SELF); + sName+= " Corpse"; + SetName(oSack, sName); +} + +void InvClear (object oMob) +{ + object oItem = GetFirstItemInInventory(oMob); + while (GetIsObjectValid(oItem)) + { + if (GetPlotFlag(oItem)==FALSE)DestroyObject(oItem); + oItem = GetNextItemInInventory(oMob); + } +} +void LootClear (object oMob) +{ + object oItem = GetFirstItemInInventory(oMob); + while (GetIsObjectValid(oItem)) + { + DestroyObject(oItem); + oItem = GetNextItemInInventory(oMob); + } +DestroyObject(oMob); +} + + +void DropScroll(object oMob, object oSack, int iRange) +{ + string sType; + int nRandom = Random(16) + 1; + int iRoll; + + if (iRange==1) // scrolls up to max value of 300 + { + iRoll = d100(); + switch (iRoll) + { + case 1: sType = "x1_it_sparscr002";break; + case 2: sType = "nw_it_sparscr107";break; + case 3: sType = "x1_it_sparscr102";break; + case 4: sType = "x1_it_spdvscr101";break; + case 5: sType = "x2_it_spdvscr202";break; + case 6: sType = "x2_it_spdvscr103";break; + case 7: sType = "x2_it_spdvscr102";break; + case 8: sType = "nw_it_sparscr211";break; + case 9: sType = "x1_it_spdvscr202";break; + case 10: sType = "nw_it_sparscr212";break; + case 11: sType = "nw_it_sparscr112";break; + case 12: sType = "x1_it_spdvscr107";break; + case 13: sType = "nw_it_sparscr213";break; + case 14: sType = "x2_it_sparscr207";break; + case 15: sType = "nw_it_sparscr107";break; + case 16: sType = "nw_it_spdvscr202";break; + case 17: sType = "nw_it_sparscr217";break; + case 18: sType = "x2_it_sparscr206";break; + case 19: sType = "nw_it_sparscr110";break; + case 20: sType = "x2_it_sparscr201";break; + case 21: sType = "x1_it_spdvscr301";break; + case 22: sType = "x2_it_spdvscr104";break; + case 23: sType = "x2_it_spdvscr001";break; + case 24: sType = "x2_it_spdvscr203";break; + case 25: sType = "x2_it_spdvscr308";break; + case 26: sType = "nw_it_sparscr206";break; + case 27: sType = "nw_it_sparscr003";break; + case 28: sType = "x2_it_spdvscr101";break; + case 29: sType = "x2_it_sparscr202";break; + case 30: sType = "x1_it_spdvscr102";break; + case 31: sType = "x2_it_spdvscr105";break; + case 32: sType = "nw_it_sparscr219";break; + case 33: sType = "x1_it_sparscr003";break; + case 34: sType = "nw_it_sparscr215";break; + case 35: sType = "nw_it_sparscr101";break; + case 36: sType = "x2_it_spdvscr106";break; + case 37: sType = "x1_it_spdvscr103";break; + case 38: sType = "x1_it_sparscr101";break; + case 39: sType = "x1_it_sparscr101";break; + case 40: sType = "x2_it_sparscr305";break; + case 41: sType = "x1_it_spdvscr205";break; + case 42: sType = "x2_it_sparscr205";break; + case 43: sType = "x1_it_sparscr001";break; + case 44: sType = "nw_it_sparscr220";break; + case 45: sType = "x2_it_sparscr203";break; + case 46: sType = "nw_it_sparscr208";break; + case 47: sType = "nw_it_sparscr209";break; + case 48: sType = "nw_it_sparscr103";break; + case 49: sType = "x2_it_spdvscr204";break; + case 50: sType = "nw_it_sparscr308";break; + case 51: sType = "x2_it_sparscr101";break; + case 52: sType = "x2_it_sparscr104";break; + case 53: sType = "nw_it_sparscr106";break; + case 54: sType = "x1_it_spdvscr104";break; + case 55: sType = "x1_it_spdvscr001";break; + case 56: sType = "x1_it_spdvscr201";break; + case 57: sType = "nw_it_sparscr207";break; + case 58: sType = "x2_it_sparscr102";break; + case 59: sType = "nw_it_sparscr216";break; + case 60: sType = "nw_it_sparscr218";break; + case 61: sType = "nw_it_spdvscr201";break; + case 62: sType = "nw_it_sparscr004";break; + case 63: sType = "nw_it_sparscr104";break; + case 64: sType = "x1_it_spdvscr106";break; + case 65: sType = "nw_it_sparscr109";break; + case 66: sType = "x2_it_sparscr105";break; + case 67: sType = "nw_it_sparscr202";break; + case 68: sType = "nw_it_sparscr113";break; + case 69: sType = "x1_it_spdvscr203";break; + case 70: sType = "nw_it_sparscr221";break; + case 71: sType = "nw_it_sparscr102";break; + case 72: sType = "x2_it_sparscral";break; + case 73: sType = "nw_it_sparscr111";break; + case 74: sType = "nw_it_sparscr002";break; + case 75: sType = "x2_it_spdvscr107";break; + case 76: sType = "x2_it_spdvscr205";break; + case 77: sType = "nw_it_sparscr201";break; + case 78: sType = "nw_it_sparscr001";break; + case 79: sType = "x2_it_spdvscr108";break; + case 80: sType = "nw_it_sparscr210";break; + case 81: sType = "x2_it_sparscr103";break; + case 82: sType = "x1_it_sparscr103";break; + case 83: sType = "x1_it_spdvscr105";break; + case 84: sType = "nw_it_spdvscr203";break; + case 85: sType = "nw_it_sparscr108";break; + case 86: sType = "nw_it_spdvscr204";break; + case 87: sType = "x2_it_sparscr204";break; + case 88: sType = "nw_it_sparscr105";break; + case 89: sType = "nw_it_sparscr203";break; + case 90: sType = "x1_it_sparscr202";break; + case 91: sType = "x1_it_sparscr104";break; + case 92: sType = "nw_it_sparscr214";break; + case 93: sType = "x2_it_spdvscr002";break; + case 94: sType = "nw_it_sparscr204";break; + } + } + if (iRange==2) + { + iRoll = d100(); /// scrolls valued 540-1621 + switch (iRoll) + { + case 1: sType = "nw_it_sparscr509";break; + case 2: sType = "x2_it_spdvscr508";break; + case 3: sType = "x2_it_sparscr501";break; + case 4: sType = "x2_it_spdvscr501";break; + case 5: sType = "nw_it_sparscr414";break; + case 6: sType = "x1_it_sparscr502";break; + case 7: sType = "x2_it_spdvscr307";break; + case 8: sType = "nw_it_sparscr405";break; + case 9: sType = "x2_it_spdvscr504";break; + case 10: sType = "nw_it_sparscr307";break; + case 11: sType = "nw_it_sparscr502";break; + case 12: sType = "nw_it_sparscr507";break; + case 13: sType = "nw_it_sparscr406";break; + case 14: sType = "nw_it_sparscr411";break; + case 15: sType = "x2_it_spdvscr402";break; + case 16: sType = "x2_it_spdvscr305";break; + case 17: sType = "x2_it_spdvscr403";break; + case 18: sType = "nw_it_sparscr501";break; + case 19: sType = "nw_it_sparscr301";break; + case 20: sType = "x1_it_sparscr301";break; + case 21: sType = "x2_it_spdvscr404";break; + case 22: sType = "x2_it_spdvscr309";break; + case 23: sType = "nw_it_sparscr416";break; + case 24: sType = "nw_it_sparscr503";break; + case 25: sType = "nw_it_sparscr608";break; + case 26: sType = "nw_it_sparscr418";break; + case 27: sType = "x2_it_spdvscr509";break; + case 28: sType = "nw_it_sparscr413";break; + case 29: sType = "nw_it_sparscr504";break; + case 30: sType = "nw_it_sparscr309";break; + case 31: sType = "x1_it_sparscr501";break; + case 32: sType = "nw_it_sparscr304";break; + case 33: sType = "x1_it_spdvscr403";break; + case 34: sType = "x2_it_spdvscr405";break; + case 35: sType = "x2_it_spdvscr306";break; + case 36: sType = "x2_it_sparscr701";break; + case 37: sType = "nw_it_sparscr602";break; + case 38: sType = "x1_it_spdvscr303";break; + case 39: sType = "x2_it_sparscr304";break; + case 40: sType = "nw_it_sparscr508";break; + case 41: sType = "x1_it_sparscr303";break; + case 42: sType = "x2_it_spdvscr406";break; + case 43: sType = "nw_it_sparscr312";break; + case 44: sType = "x2_it_spdvscr505";break; + case 45: sType = "x2_it_spdvscr302";break; + case 46: sType = "nw_it_sparscr505";break; + case 47: sType = "x2_it_spdvscr401";break; + case 48: sType = "nw_it_sparscr408";break; + case 49: sType = "x1_it_spdvscr501";break; + case 50: sType = "x2_it_spdvscr301";break; + case 51: sType = "x1_it_spdvscr401";break; + case 52: sType = "x1_it_spdvscr302";break; + case 53: sType = "x2_it_spdvscr310";break; + case 54: sType = "nw_it_sparscr314";break; + case 55: sType = "x1_it_sparscr401";break; + case 56: sType = "x2_it_sparscr303";break; + case 57: sType = "x2_it_sparscr602";break; + case 58: sType = "nw_it_sparscr511";break; + case 59: sType = "nw_it_sparscr512";break; + case 60: sType = "nw_it_sparscr417";break; + case 61: sType = "nw_it_sparscr513";break; + case 62: sType = "nw_it_sparscr310";break; + case 63: sType = "nw_it_sparscr302";break; + case 64: sType = "x2_it_sparscrmc";break; + case 65: sType = "x2_it_spdvscr304";break; + case 66: sType = "x1_it_spdvscr402";break; + case 67: sType = "x2_it_sparscr301";break; + case 68: sType = "x2_it_sparscr502";break; + case 69: sType = "nw_it_sparscr506";break; + case 70: sType = "nw_it_sparscr401";break; + case 71: sType = "x2_it_spdvscr502";break; + case 72: sType = "nw_it_sparscr315";break; + case 73: sType = "x2_it_spdvscr311";break; + case 74: sType = "nw_it_spdvscr402";break; + case 75: sType = "x1_it_spdvscr502";break; + case 76: sType = "nw_it_sparscr409";break; + case 77: sType = "x2_it_spdvscr407";break; + case 78: sType = "nw_it_sparscr415";break; + case 79: sType = "x2_it_spdvscr312";break; + case 80: sType = "x1_it_spdvscr305";break; + case 81: sType = "nw_it_spdvscr501";break; + case 82: sType = "nw_it_spdvscr301";break; + case 83: sType = "nw_it_sparscr402";break; + case 84: sType = "nw_it_spdvscr401";break; + case 85: sType = "x2_it_sparscr302";break; + case 86: sType = "nw_it_sparscr410";break; + case 87: sType = "x2_it_spdvscr506";break; + case 88: sType = "nw_it_sparscr313";break; + case 89: sType = "x2_it_spdvscr507";break; + case 90: sType = "x1_it_spdvscr304";break; + case 91: sType = "nw_it_sparscr305";break; + case 92: sType = "nw_it_sparscr403";break; + case 93: sType = "nw_it_sparscr306";break; + case 94: sType = "nw_it_sparscr404";break; + case 95: sType = "nw_it_sparscr510";break; + case 96: sType = "x2_it_sparscr902";break; + case 97: sType = "nw_it_sparscr606";break; + case 98: sType = "x2_it_spdvscr503";break; + case 99: sType = "nw_it_sparscr407";break; + case 100: sType = "x1_it_sparscr302";break; + } + } + if (iRange==3) + { + iRoll = d100();// scrolls valued 2400-3200 + switch (iRoll) + { + case 1: sType = "nw_it_sparscr603";break; + case 2: sType = "x1_it_spdvscr701";break; + case 3: sType = "x1_it_spdvscr601";break; + case 4: sType = "x1_it_sparscr602";break; + case 5: sType = "x1_it_sparscr701";break; + case 6: sType = "x2_it_spdvscr603";break; + case 7: sType = "nw_it_sparscr607";break; + case 8: sType = "nw_it_sparscr610";break; + case 9: sType = "nw_it_sparscr707";break; + case 10: sType = "x1_it_spdvscr605";break; + case 11: sType = "x1_it_spdvscr702";break; + case 12: sType = "x2_it_spdvscr601";break; + case 13: sType = "nw_it_sparscr704";break; + case 14: sType = "x1_it_spdvscr703";break; + case 15: sType = "x1_it_sparscr601";break; + case 16: sType = "x1_it_spdvscr604";break; + case 17: sType = "x2_it_sparscr503";break; + case 18: sType = "nw_it_sparscr708";break; + case 19: sType = "x1_it_spdvscr704";break; + case 20: sType = "x1_it_sparscr605";break; + case 21: sType = "nw_it_sparscr601";break; + case 22: sType = "nw_it_spdvscr701";break; + case 23: sType = "x1_it_spdvscr602";break; + case 24: sType = "x2_it_spdvscr606";break; + case 25: sType = "nw_it_sparscr612";break; + case 26: sType = "nw_it_sparscr613";break; + case 27: sType = "x2_it_spdvscr604";break; + case 28: sType = "x2_it_spdvscr605";break; + case 29: sType = "x1_it_sparscr603";break; + case 30: sType = "nw_it_sparscr611";break; + case 31: sType = "x1_it_spdvscr603";break; + case 32: sType = "nw_it_sparscr604";break; + case 33: sType = "nw_it_sparscr702";break; + case 34: sType = "nw_it_sparscr706";break; + case 35: sType = "nw_it_sparscr802";break; + case 36: sType = "x2_it_spdvscr702";break; + case 37: sType = "nw_it_spdvscr702";break; + case 38: sType = "nw_it_sparscr609";break; + case 39: sType = "x2_it_sparscr703";break; + case 40: sType = "nw_it_sparscr701";break; + case 41: sType = "x1_it_sparscr604";break; + case 42: sType = "x2_it_spdvscr602";break; + case 43: sType = "nw_it_sparscr605";break; + case 44: sType = "nw_it_sparscr703";break; + case 45: sType = "x2_it_spdvscr803";break; + case 46: sType = "nw_it_sparscr614";break; + case 47: sType = "nw_it_sparscr614";break; + case 48: sType = "x2_it_sparscr601";break; + case 49: sType = "x2_it_spdvscr701";break; + case 50: sType = "nw_it_sparscr603";break; + case 51: sType = "x1_it_spdvscr701";break; + case 52: sType = "x1_it_spdvscr601";break; + case 53: sType = "x1_it_sparscr602";break; + case 54: sType = "x1_it_sparscr701";break; + case 55: sType = "x2_it_spdvscr603";break; + case 56: sType = "nw_it_sparscr607";break; + case 57: sType = "nw_it_sparscr610";break; + case 58: sType = "nw_it_sparscr707";break; + case 59: sType = "x1_it_spdvscr605";break; + case 60: sType = "x1_it_spdvscr702";break; + case 61: sType = "x2_it_spdvscr601";break; + case 62: sType = "nw_it_sparscr704";break; + case 63: sType = "x1_it_spdvscr703";break; + case 64: sType = "x1_it_sparscr601";break; + case 65: sType = "x1_it_spdvscr604";break; + case 66: sType = "x2_it_sparscr503";break; + case 67: sType = "nw_it_sparscr708";break; + case 68: sType = "x1_it_spdvscr704";break; + case 69: sType = "x1_it_sparscr605";break; + case 70: sType = "nw_it_sparscr601";break; + case 71: sType = "nw_it_spdvscr701";break; + case 72: sType = "x1_it_spdvscr602";break; + case 73: sType = "x2_it_spdvscr606";break; + case 74: sType = "nw_it_sparscr612";break; + case 75: sType = "nw_it_sparscr613";break; + case 76: sType = "x2_it_spdvscr604";break; + case 77: sType = "x2_it_spdvscr605";break; + case 78: sType = "x1_it_sparscr603";break; + case 79: sType = "nw_it_sparscr611";break; + case 80: sType = "x1_it_spdvscr603";break; + case 81: sType = "nw_it_sparscr604";break; + case 82: sType = "nw_it_sparscr702";break; + case 83: sType = "nw_it_sparscr706";break; + case 84: sType = "nw_it_sparscr802";break; + case 85: sType = "x2_it_spdvscr702";break; + case 86: sType = "nw_it_spdvscr702";break; + case 87: sType = "nw_it_sparscr609";break; + case 88: sType = "x2_it_sparscr703";break; + case 89: sType = "nw_it_sparscr701";break; + case 90: sType = "x1_it_sparscr604";break; + case 91: sType = "x2_it_spdvscr602";break; + case 92: sType = "nw_it_sparscr605";break; + case 93: sType = "nw_it_sparscr703";break; + case 94: sType = "x2_it_spdvscr803";break; + case 95: sType = "nw_it_sparscr614";break; + case 96: sType = "nw_it_sparscr614";break; + case 97: sType = "x2_it_sparscr601";break; + case 98: sType = "x2_it_spdvscr701";break; + } + } +if (iRange==4||iRange==5) + { + iRoll = Random(40)+1; // scrolls valued above 3200 + switch (iRoll) + { + case 1: sType = "nw_it_sparscr806"; + case 2: sType = "x2_it_spdvscr804"; + case 3: sType = "x1_it_sparscr801"; + case 4: sType = "x1_it_sparscr901"; + case 5: sType = "x2_it_sparscr901"; + case 6: sType = "x2_it_sparscr801"; + case 7: sType = "x1_it_spdvscr803"; + case 8: sType = "x1_it_spdvscr804"; + case 9: sType = "nw_it_sparscr905"; + case 10: sType = "x2_it_spdvscr901"; + case 11: sType = "nw_it_sparscr908"; + case 12: sType = "nw_it_sparscr902"; + case 13: sType = "nw_it_sparscr803"; + case 14: sType = "nw_it_sparscr912"; + case 15: sType = "nw_it_sparscr809"; + case 16: sType = "x2_it_spdvscr902"; + case 17: sType = "nw_it_sparscr804"; + case 18: sType = "nw_it_sparscr807"; + case 19: sType = "nw_it_sparscr806"; + case 20: sType = "x2_it_spdvscr801"; + case 21: sType = "nw_it_sparscr906"; + case 22: sType = "nw_it_sparscr801"; + case 23: sType = "nw_it_sparscr901"; + case 24: sType = "x2_it_spdvscr802"; + case 25: sType = "nw_it_sparscr903"; + case 26: sType = "nw_it_sparscr808"; + case 27: sType = "nw_it_sparscr910"; + case 28: sType = "x2_it_spdvscr903"; + case 29: sType = "nw_it_sparscr904"; + case 30: sType = "nw_it_sparscr805"; + case 31: sType = "x1_it_spdvscr802"; + case 32: sType = "nw_it_sparscr911"; + case 33: sType = "x1_it_spdvscr901"; + case 34: sType = "nw_it_sparscr909"; + case 35: sType = "nw_it_sparscr907"; + case 36: sType = "x1_it_spdvscr801"; + case 37: sType = "nw_it_sparscr906"; + case 38: sType = "nw_it_sparscr808"; + case 39: sType = "x2_it_sparscr801"; + case 40: sType = "x2_it_spdvscr804"; + } + } + +object oScroll = CreateItemOnObject(sType, oSack, 1); +SetIdentified(oScroll, FALSE); +} + +void DropAlchemyRecipe(object oMob, object oSack, int iRange) +{ + string sType; + int iRoll; + + if (iRange==1) // + { + iRoll = d10(); + switch (iRoll) + { + case 1: sType = "cm_alch_rec1";break; + case 2: sType = "cm_alch_rec2";break; + case 3: sType = "cm_alch_rec3";break; + case 4: sType = "cm_alch_rec4";break; + case 5: sType = "cm_alch_rec5";break; + case 6: sType = "cm_alch_rec6";break; + case 7: sType = "cm_alch_rec7";break; + case 8: sType = "cm_alch_rec8";break; + case 9: sType = "cm_alch_rec9";break; + case 10: sType = "cm_alch_rec10";break; + } + } + if (iRange==2) + { + iRoll = d10(); /// + switch (iRoll) + { + case 1: sType = "cm_alch_rec1";break; + case 2: sType = "cm_alch_rec2";break; + case 3: sType = "cm_alch_rec3";break; + case 4: sType = "cm_alch_rec4";break; + case 5: sType = "cm_alch_rec5";break; + case 6: sType = "cm_alch_rec6";break; + case 7: sType = "cm_alch_rec7";break; + case 8: sType = "cm_alch_rec8";break; + case 9: sType = "cm_alch_rec9";break; + case 10: sType = "cm_alch_rec10";break; + } + } + if (iRange==3) + { + iRoll = d10();// + switch (iRoll) + { + case 1: sType = "cm_alch_rec11";break; + case 2: sType = "cm_alch_rec12";break; + case 3: sType = "cm_alch_rec13";break; + case 4: sType = "cm_alch_rec14";break; + case 5: sType = "cm_alch_rec15";break; + case 6: sType = "cm_alch_rec16";break; + case 7: sType = "cm_alch_rec17";break; + case 8: sType = "cm_alch_rec18";break; + case 9: sType = "cm_alch_rec19";break; + case 10: sType = "cm_alch_rec20";break; + } + } +if (iRange==4||iRange==5) + { + iRoll = d10(); // + switch (iRoll) + { + case 1: sType = "cm_alch_rec21";break; + case 2: sType = "cm_alch_rec22";break; + case 3: sType = "cm_alch_rec23";break; + case 4: sType = "cm_alch_rec24";break; + case 5: sType = "cm_alch_rec25";break; + case 6: sType = "cm_alch_rec26";break; + case 7: sType = "cm_alch_rec27";break; + case 8: sType = "cm_alch_rec28";break; + case 9: sType = "cm_alch_rec29";break; + case 10: sType = "cm_alch_rec30";break; + } + } + +object oRecipe = CreateItemOnObject(sType, oSack, 1); +SetIdentified(oRecipe, FALSE); +} + +void DropPot(object oMod, object oSack, int iStack) +{ + string sPotion; + + int iDice = d10()+d10()+d10(); + switch (iDice) + { + case 1:sPotion = "dummy"; break; + case 2:sPotion = "dummy"; break; + case 3:sPotion = "nw_it_mpotion002"; break; + case 4:sPotion = "nw_it_mpotion003"; break; + case 5:sPotion = "nw_it_mpotion008"; break; + case 6:sPotion = "nw_it_mpotion009"; break; + case 7:sPotion = "nw_it_mpotion012"; break; + case 8:sPotion = "nw_it_mpotion011"; break; + case 9: sPotion = "nw_it_mpotion001" ; break; + case 10: sPotion = "nw_it_mpotion002" ; break; + case 11: sPotion = "nw_it_mpotion003" ; break; + case 12: sPotion = "nw_it_mpotion004" ; break; + case 13: sPotion = "nw_it_mpotion005" ; break; + case 14: sPotion = "nw_it_mpotion006"; break; + case 15: sPotion = "nw_it_mpotion007"; break; + case 16: sPotion = "nw_it_mpotion008"; break; + case 17: sPotion = "nw_it_mpotion009"; break; + case 18: sPotion = "nw_it_mpotion010"; break; + case 19: sPotion = "nw_it_mpotion011"; break; + case 20: sPotion = "nw_it_mpotion012"; break; + case 21: sPotion = "nw_it_mpotion013"; break; + case 22: sPotion = "nw_it_mpotion014"; break; + case 23: sPotion = "nw_it_mpotion015"; break; + case 24: sPotion = "nw_it_mpotion016"; break; + case 25: sPotion = "nw_it_mpotion017"; break; + case 26: sPotion = "nw_it_mpotion018"; break; + case 27: sPotion = "nw_it_mpotion019"; break; + case 28: sPotion = "nw_it_mpotion020"; break; + case 29: sPotion = "nw_it_mpotion002"; break; + case 30: sPotion = "x2_it_mpotion001"; break; + } + CreateItemOnObject(sPotion, oSack, iStack); +} + +void DropRodWand(object oMod, object oSack) +{ + string sType; + + int nRandom = Random(16) + 1; + switch (nRandom) + { + // rods + + case 1: sType = "nw_wmgmrd002";break; //res + case 2: sType = "nw_wmgmrd005";break; //rev + case 3: sType = "nw_wmgrd002";break; // ghost + case 4: sType = "nw_wmgmrd006";break; // frost + + // wands + + case 5: sType = "nw_wmgwn011";break; + case 6: sType = "nw_wmgwn002";break; + case 7: sType = "nw_wmgwn007";break; + case 8: sType = "nw_wmgwn004";break; + case 9: sType = "nw_wmgwn006";break; + case 10: sType = "nw_wmgwn005";break; + case 11: sType = "nw_wmgwn012";break; + case 12: sType = "nw_wmgwn010";break; + case 13: sType = "nw_wmgwn008";break; + case 14: sType = "nw_wmgwn009";break; + case 15: sType = "nw_wmgwn003";break; + case 16: sType = "nw_wmgwn013";break; + } + CreateItemOnObject(sType, oSack, 1); +} + +void DropMisc(object oMod, object oSack) +{ + string sName; + + int nDice = d10(3); + switch (nDice) + { + case 1: sName = "nw_it_contain006"; break; //bag holding + case 2: sName = "nw_it_contain005"; break; //gmbag + case 3: sName = "nw_it_contain003"; break; //lmbag + case 4: sName = "nw_it_contain004"; break; //mbag + case 5: sName = "nw_it_contain002"; break; //mpouch + case 6: sName = "nw_it_msmlmisc05"; break; //healpearl + case 7: sName = "nw_it_mmidmisc04"; break; //scab bless + case 8: sName = "x0_it_msmlmisc05"; break; //earth elem + case 9: sName = "x0_it_mmedmisc03"; break; //harp + case 10: sName = "x0_it_msmlmisc01"; break; //water elem + case 11: sName = "x0_it_msmlmisc02"; break; //fire elem + case 12: sName = "x0_it_mmedmisc01"; break; //shielding + case 13: sName = "x0_it_mthnmisc21"; break; //air elem + case 14: sName = "x0_it_mthnmisc19"; break; //bard lire + case 15: sName = "x0_it_mthnmisc17"; break; // bard spls + case 16: sName = "x0_it_mmedmisc02"; break; // bard spls + case 17: sName = "x0_it_mthnmisc05"; break; // dust app + case 18: sName = "x0_it_mthnmisc06"; break; // dust dissapp + case 19: sName = "x0_it_mthnmisc13"; break; // sunbeam + case 20: sName = "x0_it_mthnmisc15"; break; // + case 21: sName = "x0_it_mthnmisc14"; break; // lath chal + case 22: sName = "nw_it_mmidmisc01"; break; // harp charm + case 23: sName = "nw_it_mmidmisc02"; break; // harp haunt + case 24: sName = "nw_it_mmidmisc03"; break; // harp pand + case 25: sName = "x0_it_msmlmisc06"; break; // horn good/evil + case 26: sName = "x0_it_mthnmisc09"; break; // + case 27: sName = "nw_it_contain001"; break; // box + case 28: sName = "nw_it_contain006"; break; //bag holding + case 29: sName = "nw_it_contain005"; break; //gmbag + case 30: sName = "nw_it_contain003"; break; //lmbag + } + CreateItemOnObject(sName, oSack, 1); +} + +void DropSetItem(object oMod, object oSack, int iClass) +{ + object oPC = GetLastKiller(); + if (oPC==OBJECT_INVALID)oPC = GetFirstPC(); + if (GetMaster(oPC)!=OBJECT_INVALID)oPC = GetMaster(oPC); + + int iDex = GetAbilityScore(oPC, ABILITY_DEXTERITY, TRUE); + int iStr = GetAbilityScore(oPC, ABILITY_STRENGTH, TRUE); + + int iHD = GetHitDice(oPC); + if (iHD<=9)return; + + string sName; + int iDice; + + if (iClass==0) + { + if (GetLevelByClass(CLASS_TYPE_WIZARD, oPC)>=3)iClass = 2; + if (GetLevelByClass(CLASS_TYPE_SORCERER, oPC)>=3)iClass = 3; + if (GetLevelByClass(CLASS_TYPE_BARD, oPC)>=3)iClass = 3; + if (GetLevelByClass(CLASS_TYPE_CLERIC, oPC)>=5)iClass = 5; + if (GetLevelByClass(CLASS_TYPE_MONK, oPC)>=5)iClass = 10; + if (GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC)>=5)iClass = 11; + if (GetLevelByClass(CLASS_TYPE_DRUID, oPC)>=5)iClass = 8; + if (GetLevelByClass(CLASS_TYPE_ROGUE, oPC)>=5)iClass = 4; + if (GetLevelByClass(CLASS_TYPE_DWARVEN_DEFENDER, oPC)>1)iClass = 11; + if (GetLevelByClass(CLASS_TYPE_DIVINE_CHAMPION, oPC)>1)iClass = 7; + if (GetLevelByClass(CLASS_TYPE_PALADIN, oPC)>=5)iClass = 7; + if (GetLevelByClass(CLASS_TYPE_ARCANE_ARCHER, oPC)>1)iClass = 4; + if (GetLevelByClass(CLASS_TYPE_FIGHTER, oPC)>=5){ + if (iStr>iDex)iClass = 1; + else iClass = 4; + } + if (GetLevelByClass(CLASS_TYPE_RANGER, oPC)>5){ + if (iStr>iDex)iClass = 1; + else iClass = 4; + } + + } + + + switch (iClass) + { + case 1:{ // STR Fighter Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_fighter_s1_1"; break; + case 2: sName = "sd_fighter_s1_2"; break; + case 3: sName = "sd_fighter_s1_3"; break; + case 4: sName = "sd_fighter_s1_4"; break; + case 5: sName = "sd_fighter_s1_5"; break; + case 6: sName = "sd_fighter_s1_6"; break; + }}break; + case 2:{ // Wizard Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_wizard_s1_1"; break; + case 2: sName = "sd_wizard_s1_2"; break; + case 3: sName = "sd_wizard_s1_3"; break; + case 4: sName = "sd_wizard_s1_4"; break; + case 5: sName = "sd_wizard_s1_5"; break; + case 6: sName = "sd_wizard_s1_6"; break; + }}break; + case 3:{ // Sorcerer Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_sorc_s1_1"; break; + case 2: sName = "sd_sorc_s1_2"; break; + case 3: sName = "sd_sorc_s1_3"; break; + case 4: sName = "sd_sorc_s1_4"; break; + case 5: sName = "sd_sorc_s1_5"; break; + case 6: sName = "sd_sorc_s1_6"; break; + }}break; + case 4:{ // DEX Fighter/Rogue Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_fighter_s2_1"; break; + case 2: sName = "sd_fighter_s2_2"; break; + case 3: sName = "sd_fighter_s2_3"; break; + case 4: sName = "sd_fighter_s2_4"; break; + case 5: sName = "sd_fighter_s2_5"; break; + case 6: sName = "sd_fighter_s2_6"; break; + }} break; + case 5:{ // Cleric Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_cleric_s1_1"; break; + case 2: sName = "sd_cleric_s1_2"; break; + case 3: sName = "sd_cleric_s1_3"; break; + case 4: sName = "sd_cleric_s1_4"; break; + case 5: sName = "sd_cleric_s1_5"; break; + case 6: sName = "sd_cleric_s1_6"; break; + }} break; + case 6:{ // Bard Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_bard_s1_1"; break; + case 2: sName = "sd_bard_s1_2"; break; + case 3: sName = "sd_bard_s1_3"; break; + case 4: sName = "sd_bard_s1_4"; break; + case 5: sName = "sd_bard_s1_5"; break; + case 6: sName = "sd_bard_s1_6"; break; + }}break; + case 7:{ // Paladin Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_paladin_s1_1"; break; + case 2: sName = "sd_paladin_s1_2"; break; + case 3: sName = "sd_paladin_s1_3"; break; + case 4: sName = "sd_paladin_s1_4"; break; + case 5: sName = "sd_paladin_s1_5"; break; + case 6: sName = "sd_paladin_s1_6"; break; + }}break; + case 8:{ // Druid Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_druid_s1_1"; break; + case 2: sName = "sd_druid_s1_2"; break; + case 3: sName = "sd_druid_s1_3"; break; + case 4: sName = "sd_druid_s1_4"; break; + case 5: sName = "sd_druid_s1_5"; break; + case 6: sName = "sd_druid_s1_6"; break; + }}break; + case 9:{ // Ranger Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_ranger_s1_1"; break; + case 2: sName = "sd_ranger_s1_2"; break; + case 3: sName = "sd_ranger_s1_3"; break; + case 4: sName = "sd_ranger_s1_4"; break; + case 5: sName = "sd_ranger_s1_5"; break; + case 6: sName = "sd_ranger_s1_6"; break; + }}break; + case 10:{ // Monk Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_monk_s1_1"; break; + case 2: sName = "sd_monk_s1_2"; break; + case 3: sName = "sd_monk_s1_3"; break; + case 4: sName = "sd_monk_s1_4"; break; + case 5: sName = "sd_monk_s1_5"; break; + case 6: sName = "sd_monk_s1_6"; break; + }}break; + case 11:{ // Barbarian Set + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_barb_s6"; break; + case 2: sName = "sd_barb_s1"; break; + case 3: sName = "sd_barb_s2"; break; + case 4: sName = "sd_barb_s3"; break; + case 5: sName = "sd_barb_s4"; break; + case 6: sName = "sd_barb_s5"; break; + }}break; + case 12:{ // Duel Weapon/Weapon & Shield Sets + iDice = d6(); + switch(iDice) + { + case 1: sName = "sd_weap_s1_1"; break; + case 2: sName = "sd_weap_s1_2"; break; + case 3: sName = "sd_weap_s2_1"; break; + case 4: sName = "sd_weap_s2_2"; break; + case 5: sName = "sd_weap_s3_1"; break; + case 6: sName = "sd_weap_s3_2"; break; + }}break; + } +// comming soon: Ring Sets, Ammy/Ring Sets + + +////////////////////////////////////// +//:Debugging +// FloatingTextStringOnCreature("Class: "+IntToString(iClass), oMod); +// FloatingTextStringOnCreature("Roll: "+IntToString(iDice), oMod); +// FloatingTextStringOnCreature(sName, oMod); + + CreateItemOnObject(sName, oSack, 1); +} + + + +void DropGold (object oMob, object oSack, int iBonus) +{ +object oPC = GetFirstPC(); +string sGold, sLvl; +int iHD = GetHitDice(oMob); +int iGold = 0; + +iGold = (d20()*iHD)+(15*iHD)+iBonus; + +if (GetHenchman(oPC,2)!=OBJECT_INVALID)iGold+=iGold; + +CreateItemOnObject("nw_it_gold001", oSack, iGold); + +///////////////////////////////////////////////////////////////////////// +//Gold Debugging +//object oPC = GetFirstPC(); +//sGold = IntToString(iGold); +//sLvl = IntToString(iHD); +//FloatingTextStringOnCreature(sGold+" Gold Spawned by lvl "+sLvl+" mob", oPC); +// +// +// +} + +void CastImbue(object oItem, int iRange) +{ + itemproperty ipAdd; + int iSpell; + int iUses; + int iRoll; + switch (iRange) + { + case 1: { + iRoll = d8(); + if (iRoll==1)iSpell = IP_CONST_CASTSPELL_BURNING_HANDS_2; + if (iRoll==2)iSpell = IP_CONST_CASTSPELL_BARKSKIN_3; + if (iRoll==3)iSpell = IP_CONST_CASTSPELL_MAGE_ARMOR_2; + if (iRoll==4)iSpell = IP_CONST_CASTSPELL_MAGIC_MISSILE_5; + if (iRoll==5)iSpell = IP_CONST_CASTSPELL_COLOR_SPRAY_2; + if (iRoll==6)iSpell = IP_CONST_CASTSPELL_DOOM_5; + if (iRoll==7)iSpell = IP_CONST_CASTSPELL_ENTANGLE_5; + if (iRoll==8)iSpell = IP_CONST_CASTSPELL_GHOSTLY_VISAGE_3; + }break; + case 2: { + iRoll = d8(); + if (iRoll==1)iSpell = IP_CONST_CASTSPELL_DISPLACEMENT_9; + if (iRoll==2)iSpell = IP_CONST_CASTSPELL_FIREBALL_10; + if (iRoll==3)iSpell = IP_CONST_CASTSPELL_MAGIC_CIRCLE_AGAINST_ALIGNMENT_5; + if (iRoll==4)iSpell = IP_CONST_CASTSPELL_SLAY_LIVING_9; + if (iRoll==5)iSpell = IP_CONST_CASTSPELL_STONESKIN_7; + if (iRoll==6)iSpell = IP_CONST_CASTSPELL_ICE_STORM_9; + if (iRoll==7)iSpell = IP_CONST_CASTSPELL_CALL_LIGHTNING_10; + if (iRoll==8)iSpell = IP_CONST_CASTSPELL_ISAACS_LESSER_MISSILE_STORM_13; + }break; + case 3: { + iRoll = d8(); + if (iRoll==1)iSpell = IP_CONST_CASTSPELL_SUNBEAM_13; + if (iRoll==2)iSpell = IP_CONST_CASTSPELL_CONE_OF_COLD_15; + if (iRoll==3)iSpell = IP_CONST_CASTSPELL_MASS_HEAL_15; + if (iRoll==4)iSpell = IP_CONST_CASTSPELL_ETHEREAL_VISAGE_15; + if (iRoll==5)iSpell = IP_CONST_CASTSPELL_GREATER_DISPELLING_15; + if (iRoll==6)iSpell = IP_CONST_CASTSPELL_ISAACS_GREATER_MISSILE_STORM_15; + if (iRoll==7)iSpell = IP_CONST_CASTSPELL_CHAIN_LIGHTNING_20; + if (iRoll==8)iSpell = IP_CONST_CASTSPELL_GREATER_STONESKIN_11; + }break; + case 4: { + iRoll = d12(); + if (iRoll==1)iSpell = IP_CONST_CASTSPELL_BIGBYS_FORCEFUL_HAND_15; + if (iRoll==2)iSpell = IP_CONST_CASTSPELL_HORRID_WILTING_20; + if (iRoll==3)iSpell = IP_CONST_CASTSPELL_IMPLOSION_17; + if (iRoll==4)iSpell = IP_CONST_CASTSPELL_INCENDIARY_CLOUD_15; + if (iRoll==5)iSpell = IP_CONST_CASTSPELL_PREMONITION_15; + if (iRoll==6)iSpell = IP_CONST_CASTSPELL_MORDENKAINENS_DISJUNCTION_17; + if (iRoll==7)iSpell = IP_CONST_CASTSPELL_METEOR_SWARM_17; + if (iRoll==8)iSpell = IP_CONST_CASTSPELL_ISAACS_GREATER_MISSILE_STORM_15; + if (iRoll==9)iSpell = IP_CONST_CASTSPELL_SUNBEAM_13; + if (iRoll==10)iSpell = IP_CONST_CASTSPELL_CONE_OF_COLD_15; + if (iRoll==11)iSpell = IP_CONST_CASTSPELL_MASS_HEAL_15; + if (iRoll==12)iSpell = IP_CONST_CASTSPELL_ETHEREAL_VISAGE_15; + }break; + case 5: { + iRoll = d20(); + if (iRoll==1)iSpell = IP_CONST_CASTSPELL_WAIL_OF_THE_BANSHEE_17; + if (iRoll==2)iSpell = IP_CONST_CASTSPELL_TIME_STOP_17; + if (iRoll==3)iSpell = IP_CONST_CASTSPELL_IMPLOSION_17; + if (iRoll==4)iSpell = IP_CONST_CASTSPELL_ISAACS_GREATER_MISSILE_STORM_15; + if (iRoll==5)iSpell = IP_CONST_CASTSPELL_HORRID_WILTING_20; + if (iRoll==6)iSpell = IP_CONST_CASTSPELL_MORDENKAINENS_SWORD_18; + if (iRoll==7)iSpell = IP_CONST_CASTSPELL_MORDENKAINENS_DISJUNCTION_17; + if (iRoll==8)iSpell = IP_CONST_CASTSPELL_MASS_HEAL_15; + if (iRoll==9)iSpell = IP_CONST_CASTSPELL_BIGBYS_FORCEFUL_HAND_15; + if (iRoll==10)iSpell = IP_CONST_CASTSPELL_HORRID_WILTING_20; + if (iRoll==11)iSpell = IP_CONST_CASTSPELL_IMPLOSION_17; + if (iRoll==12)iSpell = IP_CONST_CASTSPELL_INCENDIARY_CLOUD_15; + if (iRoll==13)iSpell = IP_CONST_CASTSPELL_PREMONITION_15; + if (iRoll==14)iSpell = IP_CONST_CASTSPELL_MORDENKAINENS_DISJUNCTION_17; + if (iRoll==15)iSpell = IP_CONST_CASTSPELL_METEOR_SWARM_17; + if (iRoll==16)iSpell = IP_CONST_CASTSPELL_ISAACS_GREATER_MISSILE_STORM_15; + if (iRoll==17)iSpell = IP_CONST_CASTSPELL_SUNBEAM_13; + if (iRoll==18)iSpell = IP_CONST_CASTSPELL_CONE_OF_COLD_15; + if (iRoll==19)iSpell = IP_CONST_CASTSPELL_MASS_HEAL_15; + if (iRoll==20)iSpell = IP_CONST_CASTSPELL_ETHEREAL_VISAGE_15; + }break; + + } + + + switch (iRange) + { + case 1: {iRoll = d3(); + if (iRoll==1)iUses = IP_CONST_CASTSPELL_NUMUSES_5_CHARGES_PER_USE; + if (iRoll==2)iUses = IP_CONST_CASTSPELL_NUMUSES_4_CHARGES_PER_USE; + if (iRoll==3)iUses = IP_CONST_CASTSPELL_NUMUSES_3_CHARGES_PER_USE; + break; } + case 2: {iRoll = d3(); + if (iRoll==1)iUses = IP_CONST_CASTSPELL_NUMUSES_5_CHARGES_PER_USE; + if (iRoll==2)iUses = IP_CONST_CASTSPELL_NUMUSES_5_CHARGES_PER_USE; + if (iRoll==3)iUses = IP_CONST_CASTSPELL_NUMUSES_4_CHARGES_PER_USE; + break; } + case 3: {iRoll = d3(); + if (iRoll==1)iUses = IP_CONST_CASTSPELL_NUMUSES_4_CHARGES_PER_USE; + if (iRoll==2)iUses = IP_CONST_CASTSPELL_NUMUSES_3_CHARGES_PER_USE; + if (iRoll==3)iUses = IP_CONST_CASTSPELL_NUMUSES_2_CHARGES_PER_USE; + iRoll=d100(); + if (iRoll>95)iUses = IP_CONST_CASTSPELL_NUMUSES_UNLIMITED_USE; + break; } + case 4: {iRoll = d3(); + if (iRoll==1)iUses = IP_CONST_CASTSPELL_NUMUSES_1_CHARGE_PER_USE; + if (iRoll==2)iUses = IP_CONST_CASTSPELL_NUMUSES_1_USE_PER_DAY; + if (iRoll==3)iUses = IP_CONST_CASTSPELL_NUMUSES_2_USES_PER_DAY; + iRoll=d100(); + if (iRoll>95)iUses = IP_CONST_CASTSPELL_NUMUSES_UNLIMITED_USE; + break;} + case 5: {iRoll = d3(); + if (iRoll==1)iUses = IP_CONST_CASTSPELL_NUMUSES_3_USES_PER_DAY; + if (iRoll==2)iUses = IP_CONST_CASTSPELL_NUMUSES_4_USES_PER_DAY; + if (iRoll==3)iUses = IP_CONST_CASTSPELL_NUMUSES_5_USES_PER_DAY; + iRoll=d100(); + if (iRoll>90)iUses = IP_CONST_CASTSPELL_NUMUSES_UNLIMITED_USE; + break;} + + } + ipAdd = ItemPropertyCastSpell(iSpell, iUses); + IPSafeAddItemProperty(oItem, ipAdd); + iRoll = (d12() * iRange)+1; if (iRoll>50)iRoll=50; + SetItemCharges(oItem, iRoll); +} + + +void SpellSlot(object oItem, int iRange, int iNum) +{ + itemproperty ipAdd; + itemproperty ipClass; + int iLvl, i; + int iClass; + int iSpec; + int iRoll; + iRoll = d8(); + switch (iRoll) + { + case 1: { + iClass = IP_CONST_CLASS_BARD; iSpec = 1; + ipClass = ItemPropertyLimitUseByClass(IP_CONST_CLASS_BARD); + } break; + case 2: { + iClass = IP_CONST_CLASS_DRUID; + ipClass = ItemPropertyLimitUseByClass(IP_CONST_CLASS_DRUID); + } break; + case 3: { + iClass = IP_CONST_CLASS_SORCERER; + ipClass = ItemPropertyLimitUseByClass(IP_CONST_CLASS_SORCERER); + } break; + case 4: { + iClass = IP_CONST_CLASS_WIZARD; + ipClass = ItemPropertyLimitUseByClass(IP_CONST_CLASS_WIZARD); + } break; + case 5: { + iClass = IP_CONST_CLASS_PALADIN; iSpec = 2; + ipClass = ItemPropertyLimitUseByClass(IP_CONST_CLASS_PALADIN); + } break; + case 6: { + iClass = IP_CONST_CLASS_RANGER; iSpec = 2; + ipClass = ItemPropertyLimitUseByClass(IP_CONST_CLASS_RANGER); + } break; + case 7: { + iClass = IP_CONST_CLASS_CLERIC; + ipClass = ItemPropertyLimitUseByClass(IP_CONST_CLASS_CLERIC); + } break; + case 8: { + iClass = IP_CONST_CLASS_WIZARD; + ipClass = ItemPropertyLimitUseByClass(IP_CONST_CLASS_WIZARD); + } break; + } + + for (i = 0; i < iNum; i++) + { + if (iSpec==1) + { + switch (iRange) // Bard max lvl 6 + { + case 1: iLvl = 1; break; // 1 + case 2: {iLvl = d3();if(iLvl==3)iLvl=2;}break; // 1-2 + case 3: {iLvl = d3()+2;if(iLvl==5)iLvl=3;}break; // 3-4 + case 4: {iLvl = d3()+3;if(iLvl==6)iLvl=4;}break; // 4-5 + case 5: {iLvl = d3()+4;if(iLvl==7)iLvl=5;}break; // 5-6 + } + } + else if (iSpec==2) + { + switch (iRange) // Pally & Ranger max lvl 4 + { + case 1: iLvl = 1; break; // 1 + case 2: {iLvl = d3();if(iLvl==3)iLvl=2;}break; // 1-2 + case 3: iLvl = d3(); break; // 1-3 + case 4: iLvl = d3()+1; break; // 2-4 + case 5: {iLvl = d3()+2;if(iLvl==5)iLvl=3;}break; // 3-4 + } + } + else + { + switch (iRange) // The rest max lvl 9 + { + case 1: iLvl = 1; break; // 1 + case 2: iLvl = d4(); break; // 1-4 + case 3: iLvl = d4()+1; break; // 2-5 + case 4: iLvl = d6()+2; break; // 3-8 + case 5: iLvl = d6()+4; break; // 5-9 + } + } + ipAdd = ItemPropertyBonusLevelSpell(iClass, iLvl); + AddItemProperty(DURATION_TYPE_PERMANENT, ipAdd, oItem); + } + IPSafeAddItemProperty(oItem, ipClass); +} + +void MightyEnhance(object oItem, int iRange) +{ + itemproperty ipAdd; + int iEnh = d4(); + + switch (iRange) + { + case 1: ; break; // 1-4 + case 2: iEnh+=1; break; // 2-5 + case 3: iEnh+=2; break; // 3-6 + case 4: iEnh+=3; break; // 4-7 + case 5: iEnh+=4; break; // 5-8 + } + ipAdd = ItemPropertyMaxRangeStrengthMod(iEnh); + IPSafeAddItemProperty(oItem, ipAdd); +} + +void BowEnhance(object oItem, int iRange) +{ + itemproperty ipAdd; + int iEnh = d3(); + + switch (iRange) + { + case 1: if (iEnh==3)iEnh=1; break; // 1-2 + case 2: {iEnh+=1;if (iEnh==4)iEnh=2;} break; // 2-3 + case 3: {iEnh+=2;if (iEnh==5)iEnh=3;} break; // 3-4 + case 4: {iEnh+=3;if (iEnh==6)iEnh=4;} break; // 4-5 + case 5: {iEnh+=4;if (iEnh==7)iEnh=5;} break; // 5-6 + } + ipAdd = ItemPropertyAttackBonus(iEnh); + IPSafeAddItemProperty(oItem, ipAdd); +} + + + +void AmmoUnlim(object oItem, int iRange) +{ + itemproperty ipAdd; + int iType; + int iDam; + int iRoll = d12(); + switch (iRange) + { + case 1: + { + iRoll = d3(); + if (iRoll==1)iType = IP_CONST_UNLIMITEDAMMO_BASIC; + if (iRoll==2)iType = IP_CONST_UNLIMITEDAMMO_BASIC; + if (iRoll==3)iType = IP_CONST_UNLIMITEDAMMO_PLUS1; + }break; + case 2: { + iRoll = d4(); + if (iRoll==1)iType = IP_CONST_UNLIMITEDAMMO_PLUS2; + if (iRoll==2)iType = IP_CONST_UNLIMITEDAMMO_PLUS2; + if (iRoll==3)iType = IP_CONST_UNLIMITEDAMMO_1D6COLD; + if (iRoll==4)iType = IP_CONST_UNLIMITEDAMMO_1D6LIGHT; + }break; + case 3: { + iRoll = d6(); + if (iRoll==1)iType = IP_CONST_UNLIMITEDAMMO_PLUS2; + if (iRoll==2)iType = IP_CONST_UNLIMITEDAMMO_PLUS2; + if (iRoll==3)iType = IP_CONST_UNLIMITEDAMMO_PLUS3; + if (iRoll==4)iType = IP_CONST_UNLIMITEDAMMO_1D6FIRE; + if (iRoll==5)iType = IP_CONST_UNLIMITEDAMMO_1D6COLD; + if (iRoll==6)iType = IP_CONST_UNLIMITEDAMMO_1D6LIGHT; + }break; + case 4: { + iRoll = d6(); + if (iRoll==1)iType = IP_CONST_UNLIMITEDAMMO_PLUS3; + if (iRoll==2)iType = IP_CONST_UNLIMITEDAMMO_PLUS4; + if (iRoll==3)iType = IP_CONST_UNLIMITEDAMMO_PLUS4; + if (iRoll==4)iType = IP_CONST_UNLIMITEDAMMO_1D6FIRE; + if (iRoll==5)iType = IP_CONST_UNLIMITEDAMMO_1D6COLD; + if (iRoll==6)iType = IP_CONST_UNLIMITEDAMMO_1D6LIGHT; + }break; + case 5: { + iRoll = d6(); + if (iRoll==1)iType = IP_CONST_UNLIMITEDAMMO_PLUS4; + if (iRoll==2)iType = IP_CONST_UNLIMITEDAMMO_PLUS5; + if (iRoll==3)iType = IP_CONST_UNLIMITEDAMMO_PLUS5; + if (iRoll==4)iType = IP_CONST_UNLIMITEDAMMO_1D6FIRE; + if (iRoll==5)iType = IP_CONST_UNLIMITEDAMMO_1D6COLD; + if (iRoll==6)iType = IP_CONST_UNLIMITEDAMMO_1D6LIGHT; + }break; + } +ipAdd = ItemPropertyUnlimitedAmmo(iType); + IPSafeAddItemProperty(oItem, ipAdd); +} + + + +void AmmoEnhance(object oItem, int iRange) +{ + itemproperty ipAdd; + int iType; + int iDam; + int iRoll = d12(); + switch (iRoll) + { + case 1: iType = IP_CONST_DAMAGETYPE_ACID; break; + case 2: iType = IP_CONST_DAMAGETYPE_BLUDGEONING; break; + case 3: iType = IP_CONST_DAMAGETYPE_COLD; break; + case 4: iType = IP_CONST_DAMAGETYPE_ELECTRICAL; break; + case 5: iType = IP_CONST_DAMAGETYPE_FIRE; break; + case 6: iType = IP_CONST_DAMAGETYPE_MAGICAL; break; + case 7: iType = IP_CONST_DAMAGETYPE_NEGATIVE; break; + case 8: iType = IP_CONST_DAMAGETYPE_DIVINE; break; + case 9: iType = IP_CONST_DAMAGETYPE_PIERCING; break; + case 10: iType = IP_CONST_DAMAGETYPE_POSITIVE; break; + case 11: iType = IP_CONST_DAMAGETYPE_SLASHING; break; + case 12: iType = IP_CONST_DAMAGETYPE_SONIC; break; + } + switch (iRange) + { + case 1: iDam = IP_CONST_DAMAGEBONUS_1; break; + case 2: { + iRoll = d4(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_1; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_2; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_3; + }break; + case 3: { + iRoll = d6(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_2; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_3; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + if (iRoll==5)iDam = IP_CONST_DAMAGEBONUS_4; + if (iRoll==6)iDam = IP_CONST_DAMAGEBONUS_5; + }break; + case 4: { + iRoll = d8(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_3; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + if (iRoll==5)iDam = IP_CONST_DAMAGEBONUS_5; + if (iRoll==6)iDam = IP_CONST_DAMAGEBONUS_1d8; + if (iRoll==7)iDam = IP_CONST_DAMAGEBONUS_6; + if (iRoll==8)iDam = IP_CONST_DAMAGEBONUS_1d10; + }break; + case 5: { + iRoll = d10(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_3; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + if (iRoll==5)iDam = IP_CONST_DAMAGEBONUS_5; + if (iRoll==6)iDam = IP_CONST_DAMAGEBONUS_1d8; + if (iRoll==7)iDam = IP_CONST_DAMAGEBONUS_2d4; + if (iRoll==8)iDam = IP_CONST_DAMAGEBONUS_6; + if (iRoll==9)iDam = IP_CONST_DAMAGEBONUS_1d10; + if (iRoll==10)iDam = IP_CONST_DAMAGEBONUS_7; + }break; + } + ipAdd = ItemPropertyDamageBonus(iType, iDam); + IPSafeAddItemProperty(oItem, ipAdd); +} + +void WeapEnhance(object oItem, int iRange) +{ + itemproperty ipAdd; + int iEnh = d3(); + + switch (iRange) + { + case 1: if (iEnh==3)iEnh=1; break; // 1-2 + case 2: {iEnh+=1;if (iEnh==4)iEnh=2;} break; // 2-3 + case 3: {iEnh+=2;if (iEnh==5)iEnh=3;} break; // 3-4 + case 4: {iEnh+=3;if (iEnh==6)iEnh=4;} break; // 4-5 + case 5: {iEnh+=4;if (iEnh==7)iEnh=5;} break; // 5-6 + } + ipAdd = ItemPropertyEnhancementBonus(iEnh); + IPSafeAddItemProperty(oItem, ipAdd); +} + +void RangedImbue(object oItem) +{ + itemproperty ipAdd; + int iType; + int iRoll = d3(); + + switch (iRoll) + { + case 1: if (iRoll==1)iType=IP_CONST_DAMAGETYPE_BLUDGEONING; break; + case 2: if (iRoll==2)iType=IP_CONST_DAMAGETYPE_SLASHING; break; + case 3: if (iRoll==3)iType=IP_CONST_DAMAGETYPE_PIERCING; break; + } + ipAdd = ItemPropertyExtraRangeDamageType(iType); + IPSafeAddItemProperty(oItem, ipAdd); +} + +void MeleeImbue(object oItem) +{ + itemproperty ipAdd; + int iType; + int iRoll = d3(); + + switch (iRoll) + { + case 1: if (iRoll==1)iType=IP_CONST_DAMAGETYPE_BLUDGEONING; break; + case 2: if (iRoll==2)iType=IP_CONST_DAMAGETYPE_SLASHING; break; + case 3: if (iRoll==3)iType=IP_CONST_DAMAGETYPE_PIERCING; break; + } + ipAdd = ItemPropertyExtraMeleeDamageType(iType); + IPSafeAddItemProperty(oItem, ipAdd); +} + +void MCimbue(object oItem, int iRange) +{ + itemproperty ipAdd; + int iDam; + int iCol; + int iType; + int iRoll; + + switch (iRange) + { + case 1: { + iRoll = d3(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_1; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_2; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4; + }break; + case 2: { + iRoll = d4(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_1; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_2; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + }break; + case 3: { + iRoll = d6(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_2; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_3; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + if (iRoll==5)iDam = IP_CONST_DAMAGEBONUS_4; + if (iRoll==6)iDam = IP_CONST_DAMAGEBONUS_1d8; + }break; + case 4: { + iRoll = d10(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_3; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + if (iRoll==5)iDam = IP_CONST_DAMAGEBONUS_5; + if (iRoll==6)iDam = IP_CONST_DAMAGEBONUS_1d8; + if (iRoll==7)iDam = IP_CONST_DAMAGEBONUS_6; + if (iRoll==8)iDam = IP_CONST_DAMAGEBONUS_2d4; + if (iRoll==9)iDam = IP_CONST_DAMAGEBONUS_5; + if (iRoll==10)iDam = IP_CONST_DAMAGEBONUS_1d10; + }break; + case 5: { + iRoll = d12(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_3; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + if (iRoll==5)iDam = IP_CONST_DAMAGEBONUS_5; + if (iRoll==6)iDam = IP_CONST_DAMAGEBONUS_1d8; + if (iRoll==7)iDam = IP_CONST_DAMAGEBONUS_2d4; + if (iRoll==8)iDam = IP_CONST_DAMAGEBONUS_6; + if (iRoll==9)iDam = IP_CONST_DAMAGEBONUS_1d10; + if (iRoll==10)iDam = IP_CONST_DAMAGEBONUS_7; + if (iRoll==11)iDam = IP_CONST_DAMAGEBONUS_1d12; + if (iRoll==12)iDam = IP_CONST_DAMAGEBONUS_2d6; + }break; + } + ipAdd = ItemPropertyMassiveCritical(iDam); + IPSafeAddItemProperty(oItem, ipAdd); +} + +int sd_PropCheck(object oItem, int tCode, int iSubProp) +{ + int iFlag=0; + itemproperty ipProp = GetFirstItemProperty(oItem); + int iMatchType, iMatchSubType; + while (GetIsItemPropertyValid(ipProp)) + { + iMatchType = GetItemPropertyType(ipProp); + iMatchSubType = GetItemPropertySubType(ipProp); + if (iMatchType == tCode && iMatchSubType == iSubProp)iFlag=1; + ipProp = GetNextItemProperty(oItem); + } + if (iFlag==1)return TRUE; + else return FALSE; +} + +int sd_GetDamType() +{ + int iType; + int iRoll = Random(13)+1; + switch (iRoll) + { + case 1: iType = IP_CONST_DAMAGETYPE_ACID; break; + case 2: iType = IP_CONST_DAMAGETYPE_BLUDGEONING; break; + case 3: iType = IP_CONST_DAMAGETYPE_COLD; break; + case 4: iType = IP_CONST_DAMAGETYPE_DIVINE; break; + case 5: iType = IP_CONST_DAMAGETYPE_ELECTRICAL; break; + case 6: iType = IP_CONST_DAMAGETYPE_FIRE; break; + case 7: iType = IP_CONST_DAMAGETYPE_MAGICAL; break; + case 8: iType = IP_CONST_DAMAGETYPE_NEGATIVE; break; + case 9: iType = IP_CONST_DAMAGETYPE_PHYSICAL; break; + case 10: iType = IP_CONST_DAMAGETYPE_PIERCING; break; + case 11: iType = IP_CONST_DAMAGETYPE_POSITIVE; break; + case 12: iType = IP_CONST_DAMAGETYPE_SLASHING; break; + case 13: iType = IP_CONST_DAMAGETYPE_SONIC; break; + } + + return iType; +} + +int sd_GetAbil() +{ + int iType; + int iRoll = d6(); + switch (iRoll) + { + case 1: iType = ABILITY_DEXTERITY; break; + case 2: iType = ABILITY_INTELLIGENCE; break; + case 3: iType = ABILITY_WISDOM; break; + case 4: iType = ABILITY_CHARISMA; break; + case 5: iType = ABILITY_CONSTITUTION; break; + case 6: iType = ABILITY_STRENGTH; break; + } + + return iType; +} + +void DAMimbue(object oItem, int iRange) +{ + itemproperty ipAdd; + itemproperty ipVis; + int iDam, iCol, iType, iRoll; + + iType = sd_GetDamType(); + while (sd_PropCheck(oItem, 16 , iType))iType = sd_GetDamType(); + + switch (iRange) + { + case 1: { + iRoll = d3(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_1; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_2; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4; + }break; + case 2: { + iRoll = d4(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_1; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_2; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + }break; + case 3: { + iRoll = d6(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_2; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_3; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + if (iRoll==5)iDam = IP_CONST_DAMAGEBONUS_4; + if (iRoll==6)iDam = IP_CONST_DAMAGEBONUS_1d8; + }break; + case 4: { + iRoll = d10(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_3; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + if (iRoll==5)iDam = IP_CONST_DAMAGEBONUS_5; + if (iRoll==6)iDam = IP_CONST_DAMAGEBONUS_1d8; + if (iRoll==7)iDam = IP_CONST_DAMAGEBONUS_6; + if (iRoll==8)iDam = IP_CONST_DAMAGEBONUS_2d4; + if (iRoll==9)iDam = IP_CONST_DAMAGEBONUS_5; + if (iRoll==10)iDam = IP_CONST_DAMAGEBONUS_1d10; + }break; + case 5: { + iRoll = d12(); + if (iRoll==1)iDam = IP_CONST_DAMAGEBONUS_3; + if (iRoll==2)iDam = IP_CONST_DAMAGEBONUS_1d4; + if (iRoll==3)iDam = IP_CONST_DAMAGEBONUS_4; + if (iRoll==4)iDam = IP_CONST_DAMAGEBONUS_1d6; + if (iRoll==5)iDam = IP_CONST_DAMAGEBONUS_5; + if (iRoll==6)iDam = IP_CONST_DAMAGEBONUS_1d8; + if (iRoll==7)iDam = IP_CONST_DAMAGEBONUS_2d4; + if (iRoll==8)iDam = IP_CONST_DAMAGEBONUS_6; + if (iRoll==9)iDam = IP_CONST_DAMAGEBONUS_1d10; + if (iRoll==10)iDam = IP_CONST_DAMAGEBONUS_7; + if (iRoll==11)iDam = IP_CONST_DAMAGEBONUS_1d12; + if (iRoll==12)iDam = IP_CONST_DAMAGEBONUS_2d6; + }break; + } + ipAdd = ItemPropertyDamageBonus(iType, iDam); + IPSafeAddItemProperty(oItem, ipAdd); + + //ipAdd = ItemPropertyVisualEffect(ITEM_VISUAL_EVIL); + //IPSafeAddItemProperty(oItem, ipAdd); + + switch(iCol) + { + case 1: ipVis = ItemPropertyVisualEffect(ITEM_VISUAL_EVIL); break; + case 2: ipVis = ItemPropertyVisualEffect(ITEM_VISUAL_COLD); break; + case 3: ipVis = ItemPropertyVisualEffect(ITEM_VISUAL_FIRE); break; + case 4: ipVis = ItemPropertyVisualEffect(ITEM_VISUAL_ACID); break; + case 5: ipVis = ItemPropertyVisualEffect(ITEM_VISUAL_ELECTRICAL); break; + case 6: ipVis = ItemPropertyVisualEffect(ITEM_VISUAL_HOLY); break; + case 7: ipVis = ItemPropertyVisualEffect(ITEM_VISUAL_SONIC); break; + } + AddItemProperty(DURATION_TYPE_PERMANENT, ipVis, oItem); +} + +void ACmisc(object oItem, int iRange) +{ + itemproperty ipAdd; + int iAC = d3(); + + switch (iRange) + { + case 1: if (iAC==3)iAC=1; break; // 1-2 + case 2: {iAC+=1;if (iAC==4)iAC=2;} break; // 2-3 + case 3: {iAC+=2;if (iAC==5)iAC=3;} break; // 3-4 + case 4: {iAC+=3;if (iAC==6)iAC=4;} break; // 4-5 + case 5: {iAC+=4;if (iAC==7)iAC=5;} break; // 5-6 + } + ipAdd = ItemPropertyACBonus(iAC); + IPSafeAddItemProperty(oItem, ipAdd); +} + +void ACimbue(object oItem, int iRange, int iSpec) +{ + itemproperty ipAdd; + int iAC = d3(); + int iPen; + int iRoll; + int iAbil; + switch (iRange) + { + case 1: if(iAC==3)iAC=1; break; // 1-2 + case 2: {iAC+=1;if (iAC==4)iAC=2;} break; // 2-3 + case 3: {iAC+=2;if (iAC==5)iAC=3;} break; // 3-4 + case 4: {iAC+=3;if (iAC==6)iAC=4;} break; // 4-5 + case 5: {iAC+=4;if (iAC==7)iAC=5;} break; // 5-6 + } + ipAdd = ItemPropertyACBonus(iAC); + + if (iSpec==1){iPen = d4()+1; ipAdd = ItemPropertyDecreaseAC(IP_CONST_ACMODIFIERTYPE_ARMOR, iPen);} + if (iSpec==2){iPen = d4()+1; ipAdd = ItemPropertyEnhancementPenalty(iPen);} + if (iSpec==3) + { + iPen = d4()+1; + iRoll = d6(); + switch(iRoll) + { + case 1: iAbil = ABILITY_DEXTERITY; break; + case 2: iAbil = ABILITY_INTELLIGENCE; break; + case 3: iAbil = ABILITY_WISDOM; break; + case 4: iAbil = ABILITY_CHARISMA; break; + case 5: iAbil = ABILITY_CONSTITUTION; break; + case 6: iAbil = ABILITY_STRENGTH; break; + } + ipAdd = ItemPropertyDecreaseAbility(iAbil, iPen); + } + if (iSpec==4){iPen = d4()+1; ipAdd = ItemPropertyAttackPenalty(iPen);} + + IPSafeAddItemProperty(oItem, ipAdd); +} + +void MIMMimbue(object oItem, int iRange) +{ + itemproperty ipAdd; + int iType; + int iRoll; + switch (iRange) + { + case 1: {}; break; + case 2: { + iRoll = d3(); + if (iRoll==1)iType = IP_CONST_IMMUNITYMISC_POISON; + if (iRoll==2)iType = IP_CONST_IMMUNITYMISC_DISEASE; + if (iRoll==3)iType = IP_CONST_IMMUNITYMISC_DISEASE; + }; break; + case 3: { + iRoll = d6(); + if (iRoll==1)iType = IP_CONST_IMMUNITYMISC_POISON; + if (iRoll==2)iType = IP_CONST_IMMUNITYMISC_DISEASE; + if (iRoll==3)iType = IP_CONST_IMMUNITYMISC_FEAR; + if (iRoll==4)iType = IP_CONST_IMMUNITYMISC_PARALYSIS; + if (iRoll==5)iType = IP_CONST_IMMUNITYMISC_DEATH_MAGIC; + if (iRoll==6)iType = IP_CONST_IMMUNITYMISC_LEVEL_ABIL_DRAIN; + }; break; + case 4: { + iRoll = d10(); + if (iRoll==1)iType = IP_CONST_IMMUNITYMISC_POISON; + if (iRoll==2)iType = IP_CONST_IMMUNITYMISC_DISEASE; + if (iRoll==3)iType = IP_CONST_IMMUNITYMISC_FEAR; + if (iRoll==4)iType = IP_CONST_IMMUNITYMISC_PARALYSIS; + if (iRoll==5)iType = IP_CONST_IMMUNITYMISC_DEATH_MAGIC; + if (iRoll==6)iType = IP_CONST_IMMUNITYMISC_DISEASE; + if (iRoll==7)iType = IP_CONST_IMMUNITYMISC_KNOCKDOWN; + if (iRoll==8)iType = IP_CONST_IMMUNITYMISC_LEVEL_ABIL_DRAIN; + if (iRoll==9)iType = IP_CONST_IMMUNITYMISC_BACKSTAB; + if (iRoll==10)iType = IP_CONST_IMMUNITYMISC_LEVEL_ABIL_DRAIN; + }; break; + case 5: { + iRoll = d12(); + if (iRoll==1)iType = IP_CONST_IMMUNITYMISC_POISON; + if (iRoll==2)iType = IP_CONST_IMMUNITYMISC_DISEASE; + if (iRoll==3)iType = IP_CONST_IMMUNITYMISC_FEAR; + if (iRoll==4)iType = IP_CONST_IMMUNITYMISC_PARALYSIS; + if (iRoll==5)iType = IP_CONST_IMMUNITYMISC_DEATH_MAGIC; + if (iRoll==6)iType = IP_CONST_IMMUNITYMISC_DISEASE; + if (iRoll==7)iType = IP_CONST_IMMUNITYMISC_KNOCKDOWN; + if (iRoll==8)iType = IP_CONST_IMMUNITYMISC_LEVEL_ABIL_DRAIN; + if (iRoll==9)iType = IP_CONST_IMMUNITYMISC_BACKSTAB; + if (iRoll==10)iType = IP_CONST_IMMUNITYMISC_LEVEL_ABIL_DRAIN; + if (iRoll==11)iType = IP_CONST_IMMUNITYMISC_MINDSPELLS; + if (iRoll==12)iType = IP_CONST_IMMUNITYMISC_CRITICAL_HITS; + }; break; + } + ipAdd = ItemPropertyImmunityMisc(iType); + IPSafeAddItemProperty(oItem, ipAdd); +} + +void RESimbue(object oItem, int iRange) +{ + itemproperty ipAdd; + int iRes, iType, iRoll; + + iType = sd_GetDamType(); + while (sd_PropCheck(oItem, 23 , iType))iType = sd_GetDamType(); + + + switch (iRange) + { + case 1: iRes = IP_CONST_DAMAGERESIST_5; break; + case 2: {iRoll=d4(); + if (iRoll==1)iRes = IP_CONST_DAMAGERESIST_5; + if (iRoll==2)iRes = IP_CONST_DAMAGERESIST_5; + if (iRoll==3)iRes = IP_CONST_DAMAGERESIST_5; + if (iRoll==4)iRes = IP_CONST_DAMAGERESIST_10; + }break; + case 3: {iRoll=d3(); + if (iRoll==1)iRes = IP_CONST_DAMAGERESIST_5; + if (iRoll==2)iRes = IP_CONST_DAMAGERESIST_10; + if (iRoll==3)iRes = IP_CONST_DAMAGERESIST_5; + }break; + case 4: {iRoll=d4(); + if (iRoll==1)iRes = IP_CONST_DAMAGERESIST_5; + if (iRoll==2)iRes = IP_CONST_DAMAGERESIST_10; + if (iRoll==3)iRes = IP_CONST_DAMAGERESIST_15; + if (iRoll==4)iRes = IP_CONST_DAMAGERESIST_10; + }break; + case 5: {iRoll=d3(); + if (iRoll==1)iRes = IP_CONST_DAMAGERESIST_5; + if (iRoll==2)iRes = IP_CONST_DAMAGERESIST_10; + if (iRoll==3)iRes = IP_CONST_DAMAGERESIST_15; + }break; + } + ipAdd = ItemPropertyDamageResistance(iType, iRes); + IPSafeAddItemProperty(oItem, ipAdd); +} + + +void AbilityImbue(object oItem, int iRange) +{ + itemproperty ipAdd; + int iAbil; + int iType; + + iType = sd_GetAbil(); + while (sd_PropCheck(oItem, 0, iType))iType = sd_GetDamType(); + + switch (iRange) + { + case 1: iAbil = 1; break; // 1 + case 2: iAbil = d2(); break; // 1-2 + case 3: iAbil = d3(); break; // 1-3 + case 4: iAbil = d3()+1; break; // 2-4 + case 5: iAbil = d2()+2; break; // 3-4 + } + ipAdd = ItemPropertyAbilityBonus(iType, iAbil); + IPSafeAddItemProperty(oItem, ipAdd); +} + +void MiscImbue(object oItem, int iRange) +{ + itemproperty ipAdd; + int iRoll; + switch (iRange) + { + case 1: {}; break; + case 2: { + iRoll = d3(); + if (iRoll==1)ipAdd = ItemPropertyDarkvision(); + if (iRoll==2)ipAdd = ItemPropertyImprovedEvasion(); + if (iRoll==3)ipAdd = ItemPropertyBonusSavingThrow(IP_CONST_SAVEBASETYPE_FORTITUDE, 2); + }; break; + case 3: { + iRoll = d6(); + if (iRoll==1)ipAdd = ItemPropertyDarkvision(); + if (iRoll==2)ipAdd = ItemPropertyImprovedEvasion(); + if (iRoll==3)ipAdd = ItemPropertyVampiricRegeneration(1); + if (iRoll==4)ipAdd = ItemPropertyBonusSavingThrow(IP_CONST_SAVEBASETYPE_FORTITUDE, 3); + if (iRoll==5)ipAdd = ItemPropertyRegeneration(1); + if (iRoll==6)ipAdd = ItemPropertyDarkvision(); + }; break; + case 4: { + iRoll = d6(); + if (iRoll==1)ipAdd = ItemPropertyDarkvision(); + if (iRoll==2)ipAdd = ItemPropertyImprovedEvasion(); + if (iRoll==3)ipAdd = ItemPropertyVampiricRegeneration(2); + if (iRoll==4)ipAdd = ItemPropertyBonusSavingThrow(IP_CONST_SAVEBASETYPE_FORTITUDE, 4); + if (iRoll==5)ipAdd = ItemPropertyRegeneration(2); + if (iRoll==6)ipAdd = ItemPropertyTrueSeeing(); + }; break; + case 5: { + iRoll = d6(); + if (iRoll==1)ipAdd = ItemPropertyDarkvision(); + if (iRoll==2)ipAdd = ItemPropertyImprovedEvasion(); + if (iRoll==3)ipAdd = ItemPropertyVampiricRegeneration(4); + if (iRoll==4)ipAdd = ItemPropertyBonusSavingThrow(IP_CONST_SAVEBASETYPE_FORTITUDE, 5); + if (iRoll==5)ipAdd = ItemPropertyRegeneration(4); + if (iRoll==6)ipAdd = ItemPropertyTrueSeeing(); + }; break; + } + IPSafeAddItemProperty(oItem, ipAdd); +} + +void SaveImbue(object oItem, int iRange) +{ + itemproperty ipAdd; + int iAbil; + int iType; + int iRoll = d6(); + switch (iRoll) + { + case 1: iType = IP_CONST_SAVEBASETYPE_FORTITUDE; break; + case 2: iType = IP_CONST_SAVEBASETYPE_REFLEX; break; + case 3: iType = IP_CONST_SAVEBASETYPE_WILL; break; + case 4: iType = IP_CONST_SAVEBASETYPE_FORTITUDE; break; + case 5: iType = IP_CONST_SAVEBASETYPE_REFLEX; break; + case 6: iType = IP_CONST_SAVEBASETYPE_WILL; break; + } + + + + switch (iRange) + { + case 1: iAbil = 1; break; // 1 + case 2: iAbil = d2(); break; // 1-2 + case 3: iAbil = d3(); break; // 1-3 + case 4: iAbil = d3()+1; break; // 2-4 + case 5: iAbil = d2()+2; break; // 3-4 + } + ipAdd = ItemPropertyBonusSavingThrow(iType, iAbil); + IPSafeAddItemProperty(oItem, ipAdd); +} +void ImpEvasionImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyImprovedEvasion(); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void TruseeingImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyTrueSeeing(); +IPSafeAddItemProperty(oItem, ipAdd); +} +void DarkvisionImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyDarkvision(); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void FreedomImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyFreeAction(); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void RegenImbue(object oItem, int iRange) +{ +int iRegen; +itemproperty ipAdd; +switch (iRange) + { + case 1: {iRegen = d3();if (iRegen==3)iRegen=1; break;} //1-2 + case 2: iRegen = d3(); break; //1-3 + case 3: iRegen = d3()+1; break; //1-4 + case 4: {iRegen = d3()+2;if (iRegen==5)iRegen=3;break;} //2-4 + case 5: iRegen = d4()+1;break; //2-5 + } +ipAdd = ItemPropertyRegeneration(iRegen); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void VRimbue(object oItem, int iRange) +{ +int iRegen; +itemproperty ipAdd; +switch (iRange) + { + case 1: {iRegen = d3();if (iRegen==3)iRegen=1; break;} //1-2 + case 2: iRegen = d3(); break; //1-3 + case 3: iRegen = d3()+1; break; //1-4 + case 4: {iRegen = d3()+2;if (iRegen==5)iRegen=3;break;} //2-4 + case 5: iRegen = d4()+1;break; //2-5 + } +ipAdd = ItemPropertyVampiricRegeneration(iRegen); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void EvilImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyVisualEffect(ITEM_VISUAL_EVIL); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void HolyImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyVisualEffect(ITEM_VISUAL_HOLY); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void FireImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyVisualEffect(ITEM_VISUAL_FIRE); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void ElecImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyVisualEffect(ITEM_VISUAL_ELECTRICAL); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void AcidImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyVisualEffect(ITEM_VISUAL_ACID); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void HasteImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyHaste(); +IPSafeAddItemProperty(oItem, ipAdd); +} + +void KeenImbue(object oItem) +{ +itemproperty ipAdd; +ipAdd = ItemPropertyKeen(); +IPSafeAddItemProperty(oItem, ipAdd); +} + +///////////////// +//Test Compiling +//void main() {} + diff --git a/_module/nss/setxp_inc.nss b/_module/nss/setxp_inc.nss index f575b286..191c4b10 100644 --- a/_module/nss/setxp_inc.nss +++ b/_module/nss/setxp_inc.nss @@ -109,15 +109,14 @@ void Take1Level(object oTarget) case 59: nXP = 1653000; break; case 60: nXP = 1711000; break; } - - SetXP(oTarget, nXP); - + + SetXP(oTarget, nXP); } //The Function Below Give1Level(oTarget); gives the Target one level. //IMPORTANT: This function cannot be used with Take1Level(oTarget); //or it will delevel the target!!!! -//I created this exlusively for the purpose of my DM wand +//I created this exlusively for the purose of my DM wand //and other scripts which only give the PC one level as a reward. void Give1Level(object oTarget) { @@ -187,9 +186,8 @@ void Give1Level(object oTarget) case 59: nXP = 1770000; break; case 60: nXP = 1830000; break; } - + SetXP(oTarget, nXP); - } @@ -212,6 +210,7 @@ void Relevel(object oTarget) TakeGoldFromCreature(nGold, oTarget, TRUE); SetXP(oTarget, 0); DelayCommand(1.0, GiveXPToCreature(oTarget, gXP)); + } else { @@ -231,36 +230,34 @@ void Relevel1(object oTarget) DelayCommand(1.0, SetXP(oTarget, gXP)); } -//The Function Relevel5(oTarget) will take 5 levels from the Target and give -//back their orginal XP. This script does not cause xp loss whatsoever. +//The Function Relevel3(oTarget) will take 3 levels from the Target and give +//back thier orginal XP. This script does not cause xp loss whatsoever. void Relevel5(object oTarget) { int nCCXP; nCCXP = GetXP(oTarget); SetLocalInt(oTarget, "pc_exact_xp", nCCXP); int gXP = GetLocalInt(oTarget, "pc_exact_xp"); - Take1Level(oTarget); Take1Level(oTarget); Take1Level(oTarget); Take1Level(oTarget); Take1Level(oTarget); - DelayCommand(1.0, SetXP(oTarget, gXP)); } -//The Function Relevel10(oTarget) will take 10 levels from the Target and give -//back their orginal XP. This script does not cause xp loss whatsoever. +//The Function Relevel5(oTarget) will take 5 levels from the Target and give +//back thier orginal XP. This script does not cause xp loss whatsoever. void Relevel10(object oTarget) { int nGold = GetHitDice(oTarget) * 50; + if(GetGold(oTarget) >= nGold) { int nCCXP; nCCXP = GetXP(oTarget); SetLocalInt(oTarget, "pc_exact_xp", nCCXP); int gXP = GetLocalInt(oTarget, "pc_exact_xp"); - Take1Level(oTarget); Take1Level(oTarget); Take1Level(oTarget); @@ -271,7 +268,6 @@ void Relevel10(object oTarget) Take1Level(oTarget); Take1Level(oTarget); Take1Level(oTarget); - DelayCommand(1.0, SetXP(oTarget, gXP)); } } @@ -286,6 +282,7 @@ void ApplyRespawnPenalty(object oPlayer) { int cLvl = GetHitDice(oPlayer); int nXP; + //We need this switch to determine what xp they must keep.. switch (cLvl) { @@ -373,7 +370,4 @@ void ApplyRespawnPenalty(object oPlayer) SetXP(oPlayer, nXP); //Set them to the minimum required for level. TakeGoldFromCreature(pGold, oPlayer, TRUE); //Take 10% of their gold. } - -} - -//:: void main (){} \ No newline at end of file +} \ No newline at end of file diff --git a/_module/nss/setxpbank.nss b/_module/nss/setxpbank.nss index badbf013..4cb84520 100644 --- a/_module/nss/setxpbank.nss +++ b/_module/nss/setxpbank.nss @@ -15,20 +15,6 @@ character. */ //////////////////////////////////// -#include "nwnx_player" - -void SetTlkOverrideForMaximumLevel(object oPC) -{ - int nLevel = GetHitDice(oPC); - if (nLevel < 40) - { - NWNX_Player_SetTlkOverride(oPC, 315, ""); - } - else - { - NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n"); - } -} void main() { @@ -65,8 +51,6 @@ int tXP = cXP + rXP; //rXP + pXP; //Take all the player's XP SetXP(oPC, 0); - - SetTlkOverrideForMaximumLevel(oPC); //Let's make sure the character is saved!!!! DelayCommand(1.0, ExportSingleCharacter(oPC)); diff --git a/_module/nss/sf_xp.nss b/_module/nss/sf_xp.nss index 1087580b..659d5613 100644 --- a/_module/nss/sf_xp.nss +++ b/_module/nss/sf_xp.nss @@ -74,7 +74,7 @@ const int PC_DIVIDE_XP = FALSE; // Minimum XP possible for all PC's // Default is 5 XP // Do NOT set this to 0 -const int MIN_XP = 5; +const int MIN_XP = 1; // Check XP to consider level or not? // Set to TRUE to check the PC's XP to consider level diff --git a/_module/nss/x2_def_heartbeat.nss b/_module/nss/x2_def_heartbeat.nss deleted file mode 100644 index cb5375ce..00000000 --- a/_module/nss/x2_def_heartbeat.nss +++ /dev/null @@ -1,180 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Name x2_def_heartbeat -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Default Heartbeat script -*/ -//::////////////////////////////////////////////// -//:: Created By: Keith Warner -//:: Created On: June 11/03 -//::////////////////////////////////////////////// -#include "prc_inc_spells" - -/* -Swarm, Berzerker Wasp: 10 HD ar_berzwasp001 -Swarm, Berzerker Wasp: 14 HD ar_berzwasp002 -Swarm, Locust: 08 HD ds_locustswarm01 -Swarm, Mini Kank: 04 HD ds_minkankswrm01 -Swarm, Reptilian Bat: 04 HD ds_repbatswrm001 -*/ - -void FollowTarget(string sTargetTag, float fDistance); - -void FollowTarget(string sTargetTag, float fDistance) -{ - object oTarget = GetObjectByTag(sTargetTag); - - if (GetIsObjectValid(oTarget)) - { - vector vTargetPosition = GetPosition(oTarget); - vector vCurrentPosition = GetPosition(OBJECT_SELF); - - float fDistanceToTarget = VectorMagnitude(vTargetPosition - vCurrentPosition); - - // Move to the target if the distance is greater than the desired follow distance - if (fDistanceToTarget > fDistance) - { - AssignCommand(OBJECT_SELF, ActionMoveToObject(oTarget, TRUE, fDistance)); - } - } -} - -void main() -{ -//:: Declare major variables - - object oNPC = OBJECT_SELF; - object oArea = GetArea(oNPC); - - string sResRef = GetResRef(oNPC); - string sAreaResRef = GetResRef(oArea); - - int nTrampleScore = (GetLocalInt(oNPC, "TRAMPLER") + GetHasFeat(FEAT_CENTAUR_TRAMPLE, oNPC)); - - int nChargeScore = (GetLocalInt(oNPC, "CHARGER") + - GetHasFeat(FEAT_MINOTAUR_CHARGE, oNPC) + - GetHasFeat(FEAT_ACROBATIC_CHARGE, oNPC) + - GetHasFeat(FEAT_SHIELD_CHARGE ,oNPC) + - GetHasFeat(FEAT_POWERFUL_CHARGE, oNPC) + - GetHasFeat(FEAT_GREATER_POWERFUL_CHARGE, oNPC) + - GetHasFeat(FEAT_RHINO_TRIBE_CHARGE, oNPC) + - GetHasFeat(FEAT_FURIOUS_CHARGE, oNPC) + - GetHasFeat(FEAT_RECKLESS_CHARGE, oNPC) + - GetHasFeat(FEAT_COBALT_CHARGE, oNPC)); - - int nBullRushScore = (GetLocalInt(oNPC, "BULLRUSHER") + - GetHasFeat(FEAT_IMPROVED_BULLRUSH, oNPC) + - GetHasFeat(FEAT_RAMPAGING_BULL_RUSH, oNPC) + - GetHasFeat(5241, oNPC) + //:: Expert Bull Rush - GetHasFeat(5247, oNPC)); //:: Superior Bull Rush - - int iAwesomeBlow = GetHasFeat(FEAT_AWESOME_BLOW, oNPC); - - int iOverrun = GetHasFeat(FEAT_IMPROVED_OVERRUN, oNPC); - - -//:: Run Various Combat Maneuver Heartbeats - if(iOverrun) - { - if (GetLocalInt(oNPC, "OverrrunCooldown") != 1) - { - if(DEBUG) DoDebug( "x2_def_heartbeat: Creature w/ Overrun Detected"); - DelayCommand(0.0f, ExecuteScript("overrunner_hb", oNPC)); - } - else - if(DEBUG) DoDebug("x2_def_heartbeat: Overrun is on cooldown."); - } - if(iAwesomeBlow) - { - if (GetLocalInt(oNPC, "AwesomeBlowCooldown") != 1) - { - if(DEBUG) DoDebug("x2_def_heartbeat: Creature w/ Awesome Blow Detected"); - DelayCommand(0.0f, ExecuteScript("awesomeblow_hb", oNPC)); - } - else - if(DEBUG) DoDebug("x2_def_heartbeat: Awesome Blow is on cooldown."); - } - if(nTrampleScore) - { - if (GetLocalInt(oNPC, "TrampleCooldown") != 1) - { - if(DEBUG) DoDebug("x2_def_heartbeat: Trampler Detected"); - DelayCommand(0.0f, ExecuteScript("trampler_hb", oNPC)); - } - else - if(DEBUG) DoDebug("x2_def_heartbeat: Trample is on cooldown."); - } - if(nChargeScore) - { - if (GetLocalInt(oNPC, "ChargeCooldown") != 1) - { - if(DEBUG) DoDebug("x2_def_heartbeat: Charger Detected"); - DelayCommand(0.0f, ExecuteScript("charger_hb", oNPC)); - } - else - if(DEBUG) DoDebug("x2_def_heartbeat: Charge is on cooldown."); - } - if(nBullRushScore) - { - if (GetLocalInt(oNPC, "BullRushCooldown") != 1) - { - if(DEBUG) DoDebug("x2_def_heartbeat: Bull Rusher Detected"); - DelayCommand(0.0f, ExecuteScript("bullrusher_hb", oNPC)); - } - else - if(DEBUG) DoDebug("x2_def_heartbeat: Bull Rush is on cooldown."); - } - -//:: Runs Malevolent Spirit HB - if (sResRef == "malev_spirit001" ) - { - ExecuteScript("i420_ghost_hb", oNPC); - } - -//:: Runs Mini-kank swarm HB - if (sResRef == "ds_minkankswrm01" ) - { - ExecuteScript("cr_minikank_hb", oNPC); - } - -//:: Runs Berzerker Wasp swarm HB - if (sResRef == "ar_berzwasp001" || sResRef == "ar_berzwasp002" ) - { - ExecuteScript("cr_berzwasp_hb", oNPC); - } - -//:: Runs special swarm HB - if (sResRef == "ds_repbatswrm001" || sResRef == "ds_locustswarm01") - { - ExecuteScript("cr_locust_hb", oNPC); - } - -//: Handles NPCs that spawn in captivity. (Sand Raiders Quest) - if (sResRef == "npc_milos" || sResRef == "npc_flaron" || sResRef == "npc_alia") - { - if ((sAreaResRef == "alt_altaruk") || (sAreaResRef == "alt_wavircoster")) - { - SetLocalInt(oNPC, "FREED_NPC", 1); - } - - if(GetLocalInt(oNPC, "FREED_NPC") == 0) - { - ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, 7.0); - } - } - -//:: Make NPC followers follow the NPC (Sand Raiders Quest) - if ((sAreaResRef != "alt_altaruk") && (sAreaResRef != "alt_wavircoster")) - { - if (sResRef == "npc_flaron" || sResRef == "npc_alia") - { - if(GetLocalInt(oNPC, "FREED_NPC") == 1) - { - FollowTarget("NPC_MILOS", 1.0f); - } - } - } - - ExecuteScript("nw_c2_default1", oNPC); -} \ No newline at end of file diff --git a/_module/nss/x2_def_spawn.nss b/_module/nss/x2_def_spawn.nss index 4f56130c..9e01129b 100644 --- a/_module/nss/x2_def_spawn.nss +++ b/_module/nss/x2_def_spawn.nss @@ -34,8 +34,6 @@ const int EVENT_USER_DEFINED_POSTSPAWN = 1511; #include "ms_name_inc" #include "x2_inc_switches" -#include "nwnx_webhook" -#include "nwnx_util" void Embiggen(object oNPC, float fIncrease); @@ -47,7 +45,6 @@ void Embiggen(object oNPC, float fIncrease) void main() { string sTag; - string NWNX_DISCORD_URL = "webhook URL here"; object oNPC; //:: User defined OnSpawn event requested? @@ -56,7 +53,7 @@ void main() //:: Pre Spawn Event requested if (nSpecEvent == 1 || nSpecEvent == 3 ) { - SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN )); + SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN )); } sTag=GetLocalString(OBJECT_SELF,"X3_HORSE_OWNER_TAG"); @@ -574,18 +571,9 @@ void main() //:: Set or Randomize name ms_Nomenclature(OBJECT_SELF); -//:: Execute PRC OnSpawn script. - //ExecuteScript("prc_npc_spawn", OBJECT_SELF); -Not needed - - - //Post Spawn event requeste +//:: Post Spawn event requested if (nSpecEvent == 2 || nSpecEvent == 3) { - SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN)); + SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN)); } - -// I don't think this should be here -//NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, "Good Morning Ascension.", "The Madman"); -// - -} +} \ No newline at end of file diff --git a/_module/utc/adamantinesta001.utc.json b/_module/utc/adamantinesta001.utc.json index c496a4c8..454aadf9 100644 --- a/_module/utc/adamantinesta001.utc.json +++ b/_module/utc/adamantinesta001.utc.json @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 16.0 + "value": 15.0 }, "ClassList": { "type": "list", @@ -54,7 +54,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -100,7 +100,7 @@ }, "FactionID": { "type": "word", - "value": 8 + "value": 1 }, "FeatList": { "type": "list", @@ -601,11 +601,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 25 + "value": 61 }, "SpellCasterLevel": { "type": "byte", - "value": 9 + "value": 12 }, "SpellFlags": { "type": "byte", @@ -616,11 +616,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 25 + "value": 61 }, "SpellCasterLevel": { "type": "byte", - "value": 9 + "value": 12 }, "SpellFlags": { "type": "byte", @@ -631,11 +631,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 25 + "value": 61 }, "SpellCasterLevel": { "type": "byte", - "value": 9 + "value": 12 }, "SpellFlags": { "type": "byte", @@ -646,11 +646,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 25 + "value": 61 }, "SpellCasterLevel": { "type": "byte", - "value": 9 + "value": 12 }, "SpellFlags": { "type": "byte", @@ -661,86 +661,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 25 + "value": 61 }, "SpellCasterLevel": { "type": "byte", - "value": 9 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 4, - "Spell": { - "type": "word", - "value": 25 - }, - "SpellCasterLevel": { - "type": "byte", - "value": 9 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 4, - "Spell": { - "type": "word", - "value": 25 - }, - "SpellCasterLevel": { - "type": "byte", - "value": 9 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 4, - "Spell": { - "type": "word", - "value": 25 - }, - "SpellCasterLevel": { - "type": "byte", - "value": 9 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 4, - "Spell": { - "type": "word", - "value": 25 - }, - "SpellCasterLevel": { - "type": "byte", - "value": 9 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 4, - "Spell": { - "type": "word", - "value": 25 - }, - "SpellCasterLevel": { - "type": "byte", - "value": 9 + "value": 12 }, "SpellFlags": { "type": "byte", @@ -759,7 +684,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Construct" }, "Tag": { "type": "cexostring", diff --git a/_module/utc/adamantinestatue.utc.json b/_module/utc/adamantinestatue.utc.json index 9389f809..2396f1a4 100644 --- a/_module/utc/adamantinestatue.utc.json +++ b/_module/utc/adamantinestatue.utc.json @@ -100,7 +100,7 @@ }, "FactionID": { "type": "word", - "value": 8 + "value": 1 }, "FeatList": { "type": "list", @@ -133,7 +133,7 @@ }, "Gender": { "type": "byte", - "value": 0 + "value": 4 }, "GoodEvil": { "type": "byte", @@ -712,7 +712,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Construct" }, "Tag": { "type": "cexostring", @@ -730,6 +730,26 @@ "type": "resref", "value": "adamantinestatue" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "PRC_CASTERLEVEL_OVERRIDE" + }, + "Type": { + "type": "dword", + "value": 1 + }, + "Value": { + "type": "int", + "value": 20 + } + } + ] + }, "WalkRate": { "type": "int", "value": 3 diff --git a/_module/utc/ancmistdrag.utc.json b/_module/utc/ancmistdrag.utc.json index 40fb1387..9e844933 100644 --- a/_module/utc/ancmistdrag.utc.json +++ b/_module/utc/ancmistdrag.utc.json @@ -826,55 +826,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "x2_def_attacked" + "value": "codi_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "x2_def_ondamage" + "value": "codi_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "x2_def_ondeath" + "value": "codi_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "x2_def_onconv" + "value": "codi_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "x2_def_ondisturb" + "value": "codi_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "x2_def_endcombat" + "value": "codi_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "x2_def_heartbeat" + "value": "codi_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "x2_def_onblocked" + "value": "codi_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "x2_def_percept" + "value": "codi_percept" }, "ScriptRested": { "type": "resref", - "value": "x2_def_rested" + "value": "codi_rested" }, "ScriptSpawn": { "type": "resref", - "value": "x2_def_spawn" + "value": "codi_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "x2_def_spellcast" + "value": "codi_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "x2_def_userdef" + "value": "codi_userdef" }, "SkillList": { "type": "list", @@ -1188,7 +1188,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Dragon" }, "Tag": { "type": "cexostring", @@ -1206,6 +1206,26 @@ "type": "resref", "value": "ancmistdrag" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_dragon" + } + } + ] + }, "WalkRate": { "type": "int", "value": 8 diff --git a/_module/utc/arcanegolem.utc.json b/_module/utc/arcanegolem.utc.json index 0a5f1a18..058250fc 100644 --- a/_module/utc/arcanegolem.utc.json +++ b/_module/utc/arcanegolem.utc.json @@ -960,7 +960,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Construct" }, "Tag": { "type": "cexostring", @@ -978,6 +978,26 @@ "type": "resref", "value": "arcanegolem" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "PRC_CASTERLEVEL_OVERRIDE" + }, + "Type": { + "type": "dword", + "value": 1 + }, + "Value": { + "type": "int", + "value": 25 + } + } + ] + }, "WalkRate": { "type": "int", "value": 3 diff --git a/_module/utc/bathorror001.utc.json b/_module/utc/bathorror001.utc.json index 4d721b8c..f8f2ffb9 100644 --- a/_module/utc/bathorror001.utc.json +++ b/_module/utc/bathorror001.utc.json @@ -54,7 +54,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -252,55 +252,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "x2_def_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "x2_def_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "x2_def_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "x2_def_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "x2_def_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "x2_def_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "x2_def_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "x2_def_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "x2_def_percept" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "x2_def_rested" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "x2_def_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "x2_def_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "x2_def_userdef" }, "SkillList": { "type": "list", @@ -749,7 +749,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Construct" }, "Tag": { "type": "cexostring", diff --git a/_module/utc/bathorror002.utc.json b/_module/utc/bathorror002.utc.json index 3833758b..864a8cf1 100644 --- a/_module/utc/bathorror002.utc.json +++ b/_module/utc/bathorror002.utc.json @@ -1012,7 +1012,7 @@ }, "StartingPackage": { "type": "byte", - "value": 0 + "value": 75 }, "Str": { "type": "byte", @@ -1020,7 +1020,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Construct" }, "Tag": { "type": "cexostring", diff --git a/_module/utc/blackdragon1.utc.json b/_module/utc/blackdragon1.utc.json index 49e43437..fb99f1f5 100644 --- a/_module/utc/blackdragon1.utc.json +++ b/_module/utc/blackdragon1.utc.json @@ -325,55 +325,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "codi_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "codi_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "codi_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "codi_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "codi_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "codi_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "codi_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "codi_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "codi_percept" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "codi_rested" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_dropin9" + "value": "codi_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "codi_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "codi_userdef" }, "SkillList": { "type": "list", @@ -687,7 +687,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Dragon" }, "Tag": { "type": "cexostring", @@ -705,6 +705,26 @@ "type": "resref", "value": "blackdragon1" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_dragon" + } + } + ] + }, "WalkRate": { "type": "int", "value": 6 diff --git a/_module/utc/drggreen002.utc.json b/_module/utc/drggreen002.utc.json index 8dcd9051..f7c18f30 100644 --- a/_module/utc/drggreen002.utc.json +++ b/_module/utc/drggreen002.utc.json @@ -54,7 +54,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -375,55 +375,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "codi_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "codi_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "codi_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "codi_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "codi_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "codi_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "codi_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "codi_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "codi_percept" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "codi_rested" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_dropin9" + "value": "codi_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "codi_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "codi_userdef" }, "SkillList": { "type": "list", @@ -1157,7 +1157,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Dragon" }, "Tag": { "type": "cexostring", @@ -1175,6 +1175,41 @@ "type": "resref", "value": "drggreen002" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_dragon" + } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "PRC_CASTERLEVEL_OVERRIDE" + }, + "Type": { + "type": "dword", + "value": 1 + }, + "Value": { + "type": "int", + "value": 20 + } + } + ] + }, "WalkRate": { "type": "int", "value": 5 diff --git a/_module/utc/drgred005.utc.json b/_module/utc/drgred005.utc.json index e8599792..671ae39d 100644 --- a/_module/utc/drgred005.utc.json +++ b/_module/utc/drgred005.utc.json @@ -54,7 +54,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -2365,7 +2365,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Dragon" }, "Tag": { "type": "cexostring", diff --git a/_module/utc/drgred007.utc.json b/_module/utc/drgred007.utc.json index 3ac1f48d..d57d0ade 100644 --- a/_module/utc/drgred007.utc.json +++ b/_module/utc/drgred007.utc.json @@ -65,7 +65,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -2429,7 +2429,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Dragon" }, "Tag": { "type": "cexostring", diff --git a/_module/utc/drgred008.utc.json b/_module/utc/drgred008.utc.json index 6576579e..df9f1d68 100644 --- a/_module/utc/drgred008.utc.json +++ b/_module/utc/drgred008.utc.json @@ -1669,7 +1669,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Dragon" }, "Tag": { "type": "cexostring", diff --git a/_module/utc/drgred009.utc.json b/_module/utc/drgred009.utc.json index 0e9f46fd..32932911 100644 --- a/_module/utc/drgred009.utc.json +++ b/_module/utc/drgred009.utc.json @@ -54,7 +54,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -2357,7 +2357,7 @@ }, "StartingPackage": { "type": "byte", - "value": 0 + "value": 80 }, "Str": { "type": "byte", @@ -2365,7 +2365,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Dragon" }, "Tag": { "type": "cexostring", diff --git a/_module/utc/grtgreenmchn23.utc.json b/_module/utc/grtgreenmchn23.utc.json index 733c348c..be5566dd 100644 --- a/_module/utc/grtgreenmchn23.utc.json +++ b/_module/utc/grtgreenmchn23.utc.json @@ -353,55 +353,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "codi_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "codi_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "codi_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "codi_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "codi_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "codi_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "codi_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "codi_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "codi_percept" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "codi_rested" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_dropin9" + "value": "codi_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "codi_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "codi_userdef" }, "SkillList": { "type": "list", @@ -835,7 +835,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Dragon" }, "Tag": { "type": "cexostring", @@ -853,6 +853,26 @@ "type": "resref", "value": "grtgreenmchn23" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_dragon" + } + } + ] + }, "WalkRate": { "type": "int", "value": 5 diff --git a/_module/utc/mutantbeele.utc.json b/_module/utc/mutantbeele.utc.json index 98706765..ec48fad5 100644 --- a/_module/utc/mutantbeele.utc.json +++ b/_module/utc/mutantbeele.utc.json @@ -237,55 +237,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "x2_def_attacked" + "value": "nw_c2_default5" }, "ScriptDamaged": { "type": "resref", - "value": "x2_def_ondamage" + "value": "nw_c2_default6" }, "ScriptDeath": { "type": "resref", - "value": "x2_def_ondeath" + "value": "nw_c2_default7" }, "ScriptDialogue": { "type": "resref", - "value": "x2_def_onconv" + "value": "nw_c2_default4" }, "ScriptDisturbed": { "type": "resref", - "value": "x2_def_ondisturb" + "value": "nw_c2_default8" }, "ScriptEndRound": { "type": "resref", - "value": "x2_def_endcombat" + "value": "nw_c2_default3" }, "ScriptHeartbeat": { "type": "resref", - "value": "x2_def_heartbeat" + "value": "nw_c2_default1" }, "ScriptOnBlocked": { "type": "resref", - "value": "x2_def_onblocked" + "value": "nw_c2_defaulte" }, "ScriptOnNotice": { "type": "resref", - "value": "x2_def_percept" + "value": "nw_c2_default2" }, "ScriptRested": { "type": "resref", - "value": "x2_def_rested" + "value": "nw_c2_defaulta" }, "ScriptSpawn": { "type": "resref", - "value": "x2_def_spawn" + "value": "nw_c2_default9" }, "ScriptSpellAt": { "type": "resref", - "value": "x2_def_spellcast" + "value": "nw_c2_defaultb" }, "ScriptUserDefine": { "type": "resref", - "value": "x2_def_userdef" + "value": "nw_c2_defaultd" }, "SkillList": { "type": "list", diff --git a/_module/utc/mutantfirebeetle.utc.json b/_module/utc/mutantfirebeetle.utc.json index e5332f3b..6a3cd2b9 100644 --- a/_module/utc/mutantfirebeetle.utc.json +++ b/_module/utc/mutantfirebeetle.utc.json @@ -114,6 +114,13 @@ "FeatList": { "type": "list", "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4636 + } + }, { "__struct_id": 1, "Feat": { @@ -248,55 +255,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "x2_def_attacked" + "value": "nw_c2_default5" }, "ScriptDamaged": { "type": "resref", - "value": "x2_def_ondamage" + "value": "nw_c2_default6" }, "ScriptDeath": { "type": "resref", - "value": "x2_def_ondeath" + "value": "nw_c2_default7" }, "ScriptDialogue": { "type": "resref", - "value": "x2_def_onconv" + "value": "nw_c2_default4" }, "ScriptDisturbed": { "type": "resref", - "value": "x2_def_ondisturb" + "value": "nw_c2_default8" }, "ScriptEndRound": { "type": "resref", - "value": "x2_def_endcombat" + "value": "nw_c2_default3" }, "ScriptHeartbeat": { "type": "resref", - "value": "x2_def_heartbeat" + "value": "nw_c2_default1" }, "ScriptOnBlocked": { "type": "resref", - "value": "x2_def_onblocked" + "value": "nw_c2_defaulte" }, "ScriptOnNotice": { "type": "resref", - "value": "x2_def_percept" + "value": "nw_c2_default2" }, "ScriptRested": { "type": "resref", - "value": "x2_def_rested" + "value": "nw_c2_defaulta" }, "ScriptSpawn": { "type": "resref", - "value": "x2_def_spawn" + "value": "nw_c2_default9" }, "ScriptSpellAt": { "type": "resref", - "value": "x2_def_spellcast" + "value": "nw_c2_defaultb" }, "ScriptUserDefine": { "type": "resref", - "value": "x2_def_userdef" + "value": "nw_c2_defaultd" }, "SkillList": { "type": "list", diff --git a/_module/utc/mybitches.utc.json b/_module/utc/mybitches.utc.json index 0d36e97d..2857f65e 100644 --- a/_module/utc/mybitches.utc.json +++ b/_module/utc/mybitches.utc.json @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 51.0 + "value": 50.0 }, "ClassList": { "type": "list", @@ -68,7 +68,7 @@ }, "CRAdjust": { "type": "int", - "value": -30 + "value": -18 }, "CurrentHitPoints": { "type": "short", @@ -581,55 +581,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "x2_def_attacked" + "value": "codi_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "x2_def_ondamage" + "value": "codi_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "x2_def_ondeath" + "value": "codi_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "x2_def_onconv" + "value": "codi_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "x2_def_ondisturb" + "value": "codi_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "x2_def_endcombat" + "value": "codi_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "x2_def_heartbeat" + "value": "codi_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "x2_def_onblocked" + "value": "codi_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "x2_def_percept" + "value": "codi_percept" }, "ScriptRested": { "type": "resref", - "value": "x2_def_rested" + "value": "codi_rested" }, "ScriptSpawn": { "type": "resref", - "value": "x2_def_spawn" + "value": "codi_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "x2_def_spellcast" + "value": "codi_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "x2_def_userdef" + "value": "codi_userdef" }, "SkillList": { "type": "list", @@ -988,7 +988,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Aberration" }, "Tag": { "type": "cexostring", @@ -1013,7 +1013,22 @@ "__struct_id": 0, "Name": { "type": "cexostring", - "value": "X2_L_BEH_MAGIC" + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_beh" + } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "PRC_CASTERLEVEL_OVERRIDE" }, "Type": { "type": "dword", @@ -1021,14 +1036,14 @@ }, "Value": { "type": "int", - "value": 100 + "value": 40 } } ] }, "WalkRate": { "type": "int", - "value": 7 + "value": 3 }, "willbonus": { "type": "short", diff --git a/_module/utc/mydgolems.utc.json b/_module/utc/mydgolems.utc.json index 3dbdb662..28749b92 100644 --- a/_module/utc/mydgolems.utc.json +++ b/_module/utc/mydgolems.utc.json @@ -803,7 +803,7 @@ }, "SoundSetFile": { "type": "word", - "value": 65535 + "value": 258 }, "SpecAbilityList": { "type": "list", @@ -850,7 +850,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Construct" }, "Tag": { "type": "cexostring", @@ -868,6 +868,26 @@ "type": "resref", "value": "mydgolems" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "PRC_CASTERLEVEL_OVERRIDE" + }, + "Type": { + "type": "dword", + "value": 1 + }, + "Value": { + "type": "int", + "value": 1 + } + } + ] + }, "WalkRate": { "type": "int", "value": 6 diff --git a/_module/utc/nw_skeleton.utc.json b/_module/utc/nw_skeleton.utc.json index 5b58a9d7..204df803 100644 --- a/_module/utc/nw_skeleton.utc.json +++ b/_module/utc/nw_skeleton.utc.json @@ -230,55 +230,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "x2_def_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "x2_def_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "x2_def_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "x2_def_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "x2_def_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "x2_def_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "x2_def_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "x2_def_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "x2_def_percept" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "x2_def_rested" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "x2_def_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "x2_def_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "x2_def_userdef" }, "SkillList": { "type": "list", diff --git a/_module/utc/pa_skeleton.utc.json b/_module/utc/pa_skeleton.utc.json index 14769643..7f3ba40c 100644 --- a/_module/utc/pa_skeleton.utc.json +++ b/_module/utc/pa_skeleton.utc.json @@ -237,55 +237,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "x2_def_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "x2_def_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "x2_def_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "x2_def_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "x2_def_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "x2_def_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "x2_def_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "x2_def_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "x2_def_percept" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "x2_def_rested" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "x2_def_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "x2_def_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "x2_def_userdef" }, "SkillList": { "type": "list", diff --git a/_module/utc/shadowdragon.utc.json b/_module/utc/shadowdragon.utc.json index 1d9f9e57..d6765c0f 100644 --- a/_module/utc/shadowdragon.utc.json +++ b/_module/utc/shadowdragon.utc.json @@ -54,7 +54,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -1172,7 +1172,7 @@ }, "Subrace": { "type": "cexostring", - "value": "" + "value": "Dragon" }, "Tag": { "type": "cexostring", diff --git a/_module/utc/superbmage.utc.json b/_module/utc/superbmage.utc.json index f23d48f9..04fcee20 100644 --- a/_module/utc/superbmage.utc.json +++ b/_module/utc/superbmage.utc.json @@ -1249,55 +1249,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "x2_def_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "x2_def_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "x2_def_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "x2_def_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "x2_def_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "x2_def_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "x2_def_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "x2_def_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "x2_def_percept" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "x2_def_rested" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "x2_def_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "x2_def_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "x2_def_userdef" }, "SkillList": { "type": "list", diff --git a/_module/uti/diamondsword.uti.json b/_module/uti/diamondsword.uti.json index 87da0484..600564ba 100644 --- a/_module/uti/diamondsword.uti.json +++ b/_module/uti/diamondsword.uti.json @@ -60,7 +60,7 @@ }, "Plot": { "type": "byte", - "value": 0 + "value": 1 }, "PropertiesList": { "type": "list", diff --git a/_release/Path of Ascension [PRC8-CEP3].7z b/_release/Path of Ascension [PRC8-CEP3].7z index 4a95f621..5651d4b1 100644 Binary files a/_release/Path of Ascension [PRC8-CEP3].7z and b/_release/Path of Ascension [PRC8-CEP3].7z differ