Ultimate combat dummy

Ultimate Combat Dummy
Script names: ucombat_dummy_od, ucombat_dummy_sp , ucombat_dummy_lv, ucombat_dummy_cn

What it does
Awards 7 different levels of experience by damage (adjusted only by DM), spins around, talks back and does not attack (at all, including Opt attacks).

ucombat_dummy_od
// ucombat_dummy_lv void main { object oPC = GetLastUsedBy;

if(GetIsDM(oPC) == TRUE) {   ActionStartConversation(oPC,"cs_explever1_01",TRUE); }   else if(GetIsDM(oPC) != TRUE) { FloatingTextStringOnCreature("You tug at the lever, yet it won't budge!",oPC,TRUE); } }

ucombat_dummy_sp
// ucombat_dummy_cn void main { object oPC = GetLastUsedBy; ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE); DelayCommand(2.0,FloatingTextStringOnCreature("EXPERIENCE LEVELS SET",oPC,FALSE)); DelayCommand(2.0,ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));

}

ucombat_dummy_lv
// ucombat_dummy_od void main { object oPC = GetLastHostileActor(OBJECT_SELF); object oLever = GetNearestObjectByTag("DEXP"); int iESet = GetLocalInt(oLever,"exp"); int iCur = GetCurrentHitPoints(OBJECT_SELF); int iMax = GetMaxHitPoints(OBJECT_SELF); int iRound = 1; int iHit = 1; int iGive = 1; float iChange = 1.0; int nNum = 1; int sNum = 1; int rNum = 1; float fNum = 1.0; SetLocalInt(OBJECT_SELF,"responses",TRUE); // Make FALSE to turn off sarcastic comments. // Valid weapon check, start. object oItem = GetLastWeaponUsed(oPC); // iWeap = GetBaseItemType(GetLastWeaponUsed(oPC)); int iWeap = 1; oItem = GetLastWeaponUsed(oPC); iWeap = GetWeaponRanged(oItem); if(iWeap == FALSE) { SetLocalInt(oPC,"d_invalid",FALSE); int bExp = FALSE; bExp = FALSE; while(bExp == FALSE) // Check the damage {   iCur = GetCurrentHitPoints(OBJECT_SELF); iRound = GetLocalInt(OBJECT_SELF,"last_round"); // Remember the damage done, store previous round's hit points in "last_round". if(GetLocalInt(OBJECT_SELF,"start") == TRUE) {       iHit = iRound - iCur; SetLocalInt(oPC,"damage",iHit); // Less than three points damage, I really don't want to divide it by three. // Put it on the next round's damage, then divide it. if(GetLocalInt(oPC,"damage") < 3) {           bExp = TRUE; }           else if(GetLocalInt(oPC,"damage") > 2) {           SetLocalInt(OBJECT_SELF,"last_round",iCur); bExp = TRUE; }       }        else if(GetLocalInt(OBJECT_SELF,"start") == FALSE) {       iMax = GetMaxHitPoints(OBJECT_SELF); iHit = iMax - iCur; SetLocalInt(oPC,"damage",iHit); SetLocalInt(OBJECT_SELF,"last_round",iCur); SetLocalInt(OBJECT_SELF,"start",TRUE); bExp = TRUE; }   } // == bExp is false // Make dummy spin sometimes. if(GetLocalInt(oPC,"damage") > 10) {   nNum = Random(4); if(nNum < 3) {           rNum = Random(360); fNum = IntToFloat(rNum); SetFacing(fNum); }   }     // Experience lever settings. Turn damage into experience. if(GetIsObjectValid(oLever) == TRUE) {   iESet = GetLocalInt(oLever,"exp"); if(GetLocalInt(oPC,"damage") > 2) {       if(iESet == 6) {       iHit = GetLocalInt(oPC,"damage"); iChange = IntToFloat(iHit); iChange = iChange * 100; iGive = FloatToInt(iChange); GiveXPToCreature(oPC,iGive); }       else if(iESet == 5) {       iHit = GetLocalInt(oPC,"damage"); iChange = IntToFloat(iHit); iChange = iChange * 10; iGive = FloatToInt(iChange); GiveXPToCreature(oPC,iGive); }       else if(iESet == 4) {       iHit = GetLocalInt(oPC,"damage"); iChange = IntToFloat(iHit); iChange = iChange * 5; iGive = FloatToInt(iChange); GiveXPToCreature(oPC,iGive); }       else if(iESet == 3) {       iHit = GetLocalInt(oPC,"damage"); iChange = IntToFloat(iHit); iChange = iChange * 2; iGive = FloatToInt(iChange); GiveXPToCreature(oPC,iGive); }       else if(iESet == 2) {       iHit = GetLocalInt(oPC,"damage"); iChange = IntToFloat(iHit); // iChange = iChange * 10; iGive = FloatToInt(iChange); GiveXPToCreature(oPC,iGive); }       else if(iESet == 1) {       iHit = GetLocalInt(oPC,"damage"); iChange = IntToFloat(iHit); iChange = iChange / 2; iGive = FloatToInt(iChange); GiveXPToCreature(oPC,iGive); }       else if(iESet == 0) {       iHit = GetLocalInt(oPC,"damage"); iChange = IntToFloat(iHit); iChange = iChange / 3; iGive = FloatToInt(iChange); GiveXPToCreature(oPC,iGive); }    }  }    else if(GetIsObjectValid(oLever) != TRUE) {       if(GetLocalInt(oPC,"damage") > 2) {       iHit = GetLocalInt(oPC,"damage"); iChange = IntToFloat(iHit); iChange = iChange / 2; iGive = FloatToInt(iChange); GiveXPToCreature(oPC,iGive); }  } // Responses section. if(GetLocalInt(OBJECT_SELF,"responses") == TRUE) { iHit = GetLocalInt(oPC,"damage"); if(iHit < 10) {       sNum = Random(4); if(sNum == 1) {           nNum = Random(10); if(nNum == 0) {               SpeakString("You're kidding right?",TALKVOLUME_WHISPER); }               if(nNum == 1) {               SpeakString("Oh yeah, you got me now.",TALKVOLUME_WHISPER); DelayCommand(2.0,PlaySound("vs_fchristm_haha")); DelayCommand(3.0,SpeakString("Ouch ooh HA HA stop tickling me!.",TALKVOLUME_WHISPER)); }               if(nNum == 2) {               SpeakString("Where did you buy that weapon at anyway?.",TALKVOLUME_WHISPER); DelayCommand(2.0,SpeakString("You better get you money back.",TALKVOLUME_WHISPER)); }               if(nNum == 3) {               SpeakString("I'm not going to stand here all day, if you're not even going to try!",TALKVOLUME_WHISPER); }               if(nNum == 4) {               SpeakString("Oh yeah Ooo, you're a real tough guy!",TALKVOLUME_WHISPER); }               if(nNum == 5) {               SpeakString("Perhaps you should use the sharp end?",TALKVOLUME_WHISPER); }               if(nNum == 6) {               PlaySound("as_pl_yawningm1"); SpeakString("Yawn",TALKVOLUME_WHISPER); }               if(nNum == 7) {               PlaySound("vs_fchristm_inff"); DelayCommand(2.0,SpeakString("You are trying to hit me right?",TALKVOLUME_WHISPER)); }               if(nNum == 8) {               PlaySound("vs_fchristm_tant"); DelayCommand(2.0,SpeakString("Come on, put some back into it!",TALKVOLUME_WHISPER)); }               if(nNum == 9) {               PlaySound("vs_fchristm_haha"); DelayCommand(2.0,SpeakString("What can I say, you suck!",TALKVOLUME_WHISPER)); }           } // = sNum = 1 } // = Damage < 10 if(GetLocalInt(oPC,"damage") > 20) {     sNum = Random(4); if(sNum == 1) {         nNum = Random(10); if(nNum == 0) {               PlaySound("vs_fchristm_hit1"); SpeakString("DAM! NOW THAT HURT!",TALKVOLUME_WHISPER); }               if(nNum == 1) {               SpeakString("Hey you...",TALKVOLUME_WHISPER); DelayCommand(2.0,SpeakString("I'll pay you just to leave me alone.",TALKVOLUME_WHISPER)); }               if(nNum == 2) {               SpeakString("Can't we just get along?.",TALKVOLUME_WHISPER); }               if(nNum == 3) {               PlaySound("vs_fchristm_hit2"); SpeakString("WHAT'S THE BIG IDEA, GO AWAY.",TALKVOLUME_WHISPER); }               if(nNum == 4) {               PlaySound("vs_fchristm_hit3"); SpeakString("Ok, now that's going to leave a mark.",TALKVOLUME_WHISPER); }               if(nNum == 5) {               PlaySound("vs_fchristm_warn"); }               if(nNum == 6) {               PlaySound("vs_fchristm_done"); DelayCommand(2.0,PlaySound("vs_fchristm_flee")); }               if(nNum == 7) {               PlaySound("vs_fchristm_hit2"); SpeakString("I got such a bad headache right now.",TALKVOLUME_WHISPER); }               if(nNum == 8) {               PlaySound("vs_fchristm_cuss"); SpeakString("I hope you get a splinter.",TALKVOLUME_WHISPER); }               if(nNum == 9) {               PlaySound("vs_fchristm_thnx"); DelayCommand(2.0,SpeakString("Having a right arm was starting to bug me.",TALKVOLUME_WHISPER)); }         }// = sNum < 2 } // = damage > 20 }// = Response true } // = Is weapon valid else if(iWeap == TRUE) {       if(GetLocalInt(oPC,"d_invalid") == FALSE) { SpeakString("I'M A COMBAT DUMMY ... DUMMY!",TALKVOLUME_SHOUT); DelayCommand(2.0,SpeakString("WHY DON'T YOU TRY IT WITH A MELEE WEAPON?",TALKVOLUME_SHOUT)); DelayCommand(4.0,FloatingTextStringOnCreature("Hmmm....",oPC,TRUE)); DelayCommand(6.0,FloatingTextStringOnCreature("PERHAPS I SHOULD USE A MELEE WEAPON?",oPC,TRUE)); SetLocalInt(oPC,"d_invalid",TRUE); } iCur = GetCurrentHitPoints(OBJECT_SELF); SetLocalInt(OBJECT_SELF,"last_round",iCur); SetLocalInt(oPC,"damage",0); } }

ucombat_dummy_cn
//:://///////////////////////////////////////////// //:: Default: On Spawn In //:: NW_C2_HERBIVORE //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /*   Determines the course of action to be taken after having just been spawned in for Herbivores //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: Dec 21, 2001 //::////////////////////////////////////////////// // *** ucombat_dummy_sp ***** void main { effect eBlnd = EffectBlindness; effect eDeaf = EffectDeaf; effect eOpt = EffectSkillDecrease(FEAT_OPPORTUNIST,100); ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBlnd,OBJECT_SELF); ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDeaf,OBJECT_SELF); ApplyEffectToObject(DURATION_TYPE_PERMANENT,eOpt,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_AMBIENT_ANIMATIONS); //This will play Ambient Animations until the NPC sees an enemy or is cleared. //NOTE that these animations will play automatically for Encounter Creatures. //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); //This will play Ambient Animations until the NPC sees an enemy or is cleared. //NOTE that NPCs using this form of ambient animations will not move to other NPCs. // 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.) // SPECIAL BEHAVIOR SECTION /*   The following section outlines the various special behaviors that can be placed on a creature. To activate one of the special behaviors: 1. Comment in  SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL); 2. Comment in one other special behavior setting (ONLY ONE). SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL); //SetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE); //Creature will only attack those that close within 5m and are not friends, //Rangers or Druids. SetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE);//Creature will flee those that close within 7m if they are not friends, //Rangers or Druids. // 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 // DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***************************************************************************************** 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. GenerateNPCTreasure;    //* Use this to create a small amount of treasure on the creature }
 * 1) include "NW_I0_GENERIC"
 * 2) include "NW_O2_CONINCLUDE"