Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Knats Combat Dummy
Author  Knat
Submitted / Updated  05-26-2003 / 04-03-2007
Category  Placeable Item
Expansions  Works on all versions
Format  Code Only
Type  Type - Other (Subtype - Other)
Includes  BioWare Standard
Description
combat dummy that lets the PC exercise a lengthy training session.
  • does not need a creature object to simulate combat status.
  • player needs to deplete a set amount of HP, depending on their level, to complete a training session.
  • rewards XP one time during a specific timespan (default 1 hour realtime) ONLY if they complete a training session. (no xp if they abort/cancel a session) players will be able to re-train asap, but will not get any XP until said timer runs out. it's not possible to 'farm' xp, it's just a small spice up...you can change those values easily.
  • combat dummy records some basic statistics like number of hits and total damage done. It displays them during combat and a final statistic after the session is complete.
  • adds FX based on player damage
  • accounts for multiplayer.. only one active training session per dummy. other PCs attacking the same dummy get ignored (in theorie at least, never tested so far)

Files

NameTypeSizeDownloads
cmbtdummy.zipcmbtdummy.zip
Submitted: 05-26-2003 / Last Updated: 05-26-2003
zip4.59Kb2660
--
SCORE OUT OF 10
9.27
28 votes
View Stats
Cast Your Vote!

AWARDS



PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS





You Must Be Logged In to Participate.
Comments (43):

  1  2 Next>

Posted by Alaster Wolf at 2010-04-10 04:47:51    Voted 9.00 on 04/10/10
Very usable.

Posted by Primeval Atom at 2009-08-23 15:05:47    Voted 10.00 on 08/23/09
Fantastic idea :)
_________________________
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.

Rip RPG

Posted by Phalkhan at 2007-08-31 01:03:42    Voted 10.00 on 08/31/07
Nice and simple... a good thing to have in a mod to slow boredom while waiting for other players to got to you .

Does what it says....and it is super simple....A 10

Posted by petdragon at 2007-03-18 01:17:26    Voted 9.25 on 03/18/07
I just love this! It makes a great addition to all my mods

Posted by caesarbear at 2007-03-17 22:38:00    Voted 9.25 on 03/17/07
It's a very well crafted script that fits into modules with ease. Complete and well thought out, this can be a very useful addition for players.

Posted by Lasenna at 2007-03-14 15:32:21    
Found a slight bug with this script for NWN1 (not NWN2). I've noticed that if a player starts to fight the dummy then logs before the dummy aborts their session, the dummy is then bugged until either 1) the server is reset or 2) the players logs back in later and attacks the same dummy, completing their session. It keeps giving "combat dummy is busy" message otherwise. Is there a way to fix this in the script, like a reset button to auto-refresh dummy when needed?

Posted by Lasenna at 2007-03-14 13:58:45    
Found a slight bug with this script for NWN1 (not NWN2). I've noticed that if a player starts to fight the dummy then logs before the dummy aborts their session, the dummy is then bugged until either 1) the server is reset or 2) the players logs back in later and attacks the same dummy, completing their session. It keeps giving "combat dummy is busy" message otherwise. Is there a way to fix this in the script, like a reset button to auto-refresh dummy when needed?

Posted by rikki.o at 2007-01-29 06:38:24    Voted 7.75 on 01/29/07
Nice

Posted by hexmendacious at 2007-01-22 13:34:50    Voted 9.25 on 01/22/07
This works great, and is easy to install.

Posted by styzygy at 2006-12-10 05:03:04    Voted 9.75 on 12/10/06
Great stuff. Thanks for your excellent work!

Posted by Dreamwarder at 2006-08-27 09:13:24    Voted 10.00 on 08/27/06
Have used this for a long time, and will continue to.

Posted by tango1 at 2006-08-04 11:15:16    Voted 9.25 on 08/04/06
would be cool if the combat dummies can be made immune to spells or feats like harm or dev crit to prevent abuse. overall, a really great script!

Posted by Night Below at 2006-07-22 19:13:00    Voted 10.00 on 07/22/06
This is really awsome and found its way into our academies.

Posted by ffbj at 2006-02-19 07:49:41    Voted 9.50 on 02/19/06
Love it and use it.

Posted by JPLewis at 2005-09-24 21:02:35    Voted 10.00 on 09/24/05
I use it. =)

Posted by Blade421 at 2004-11-01 21:20:25    Voted 8.25 on 11/01/04

Posted by Ben_Harrison at 2004-10-01 07:51:08    Voted 8.75 on 10/01/04
Excellent script, very useful, easy to implement.

Posted by Ben_Harrison at 2004-10-01 07:50:00    Voted 8.75 on 10/01/04
Guess I'm a little late leaving my comment...

Anyway, this is an awesome script, no server should be without something like this. I've modified it a little for my own purposes, and used Sir Elric's fix, and it works perfectly. Thanks."We started off trying to set up a small anarchist community, but people wouldn't obey the rules."

Posted by Ben_Harrison at 2004-10-01 07:49:00    Voted 8.75 on 10/01/04
Guess I'm a little late leaving my comment...

Anyway, this is an awesome script, no server should be without something like this. I've modified it a little for my own purposes, and used Sir Elric's fix, and it works perfectly. Thanks."We started off trying to set up a small anarchist community, but people wouldn't obey the rules."

Posted by Gomisan at 2004-08-23 21:11:27    Voted 9.75 on 08/23/04

Posted by Gomi ( 203.87.xxx.xxx ) at 2004-06-17 23:27:00    
Thanks Sir Elric.

I've implemented the Comabt Dummys with Sir Elric's code modification and they seem to be working well.

Perhaps the core system needs an update with that fix.

Posted by Greenlion420 at 2004-05-19 13:08:44    Voted 10.00 on 05/19/04
Yup, good stuff as always Knat. Thanks :)

Posted by c00lm at 2004-05-05 11:50:40    Voted 10.00 on 05/05/04

Posted by Bane_Moonglum at 2004-04-17 14:36:31    Voted 10.00 on 04/17/04
Very nice to add to a barracks or training temple

Posted by jboy123 at 2004-03-12 16:54:54    Voted 8.00 on 03/12/04

Posted by Civious at 2004-03-12 13:06:16    Voted 10.00 on 03/12/04
Simple and elegant. Another good script by Knat.

Posted by ManChild at 2004-03-11 09:52:37    Voted 10.00 on 03/11/04

Posted by Sir_Elric at 2004-03-09 18:50:00    Voted 7.00
This is a fix for the multiple dummys.

//::///////////////////////////////////////////////
//:: Combat Dummy
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*

usage:

assign this script to the OnDamaged event of a placeable
make placeable non-static & usable
assign 10.000 hp to the placeable
set hardness and all saves to 0

*/
//:://////////////////////////////////////////////
//:: Created By: Knat
//:: Created On: 5/2003
//:://////////////////////////////////////////////

// -------------------------------------------------------------------
// --------------- COMBAT DUMMY START --------------------------------
// -------------------------------------------------------------------
/*

combat dummy

does not need a creature object to simulate and track combat status.

player needs to deplete a set amount of HP, depending on their level, to complete
a training session.

rewards XP one time during a specific timespan (default 1 hour realtime) ONLY
if they complete a training session. (no xp if they abort/cancel a session)
players will be able to re-train asap, but will not get any XP until said timer runs out.
it's not possible to "farm" xp, it's just a small spice up...

you can change those values easily.

combat dummy records some basic statistics like number of hits and total damage
done. It displays them during combat and a final statistic after the session is complete.

adds FX based on player damage

accounts for multiplayer.. only one active training session per dummy. other PCs attacking the
same dummy get ignored (in theorie at least, never tested so far)

*/

int PLC_DUMMY_HP_MODIFIER = 40; // dummy-hp = modifier + (pc-level * modifier)
float PLC_DUMMY_XP_MODIFIER = 0.2; // adjust this to control XP output (xp = dummy-hp * modifier)
float PLC_DUMMY_XP_TIMER = 3600.0; // XP timer in seconds. Player won't get XP again until this timer runs out

void DummyRespawn(string sResRef, location lLoc)
{
CreateObject(OBJECT_TYPE_PLACEABLE, sResRef, lLoc);
}

void DummyCheckSession(object oDummy = OBJECT_SELF)
{
object oUser = GetLocalObject(oDummy,"PLC_INTERACT_USER");
if(GetIsObjectValid(oUser))
{
if(GetIsInCombat(oUser)) // still in combat, restart timer
DelayCommand(5.0,DummyCheckSession(oDummy));
else
{
// not in combat, abort session
FloatingTextStringOnCreature("Session Aborted...",oUser);
// delete & re-create dummy
string sResRef = GetResRef(oDummy); location lLoc = GetLocation(oDummy);
AssignCommand(GetModule(),DelayCommand(0.1,DummyRespawn(sResRef,lLoc)));;
DestroyObject(oDummy);
}
}
}

void DummyMain(object oPC, object oDummy)
{

// initial user interaction, starts training session
if( !GetLocalInt(oDummy,"PLC_INTERACT_INUSE") )
{
// fix multiple dummy creation - SE
SetLocalInt(oDummy,"RECREATE_COMBATDUMMY",TRUE);
// set target PC
SetLocalObject(oDummy,"PLC_INTERACT_USER",oPC);
// set InUse flag
SetLocalInt(oDummy,"PLC_INTERACT_INUSE",TRUE);
// set strength of dummy based on player level
SetLocalInt(oDummy,"PLC_INTERACT_SESSIONHP", ((GetLevelByPosition(1,oPC) + GetLevelByPosition(2,oPC) + GetLevelByPosition(3,oPC)) * PLC_DUMMY_HP_MODIFIER ) + PLC_DUMMY_HP_MODIFIER );
// initiate "check for session abort/cancel"
// this function polls every 5 sec and checks if the player is still
// fighting with the dummy. if not, session gets aborted
// and dummy gets re-created. this deletes all variables and resets
// everything to clean state.
// this "pseudo heartbeat" only runs during PCdummy interaction
// and is very small
DelayCommand(5.0,DummyCheckSession(oDummy));
FloatingTextStringOnCreature("Session Started - Dummy Strength: "+IntToString(GetLocalInt(oDummy,"PLC_INTERACT_SESSIONHP")),oPC);
if(GetLocalInt(oPC,"PLC_INTERACT_COMBATDUMMY_NOXP"))
FloatingTextStringOnCreature("You won't get XP this time",oPC);
}

object oUser = GetLocalObject(oDummy,"PLC_INTERACT_USER");
if(oUser == oPC)
{
int nSessionHP = GetLocalInt(oDummy,"PLC_INTERACT_SESSIONHP");
int nTotalDamage = GetMaxHitPoints() - GetCurrentHitPoints();
int nHitCount;
int nLastTotalDamage = GetLocalInt(oDummy,"PLC_INTERACT_LASTHP");
nHitCount = GetLocalInt(oDummy,"PLC_INTERACT_HITCOUNT");

// register hit
if(nTotalDamage > nLastTotalDamage)
{
SetLocalInt(oDummy,"PLC_INTERACT_LASTHP", nTotalDamage);
nHitCount++;
SetLocalInt(oDummy,"PLC_INTERACT_HITCOUNT", nHitCount);
}

// apply some effects based on damage
int nDamage = nTotalDamage - nLastTotalDamage;
if (nDamage > 24) ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(75), OBJECT_SELF);
if (nDamage > 12) ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(281), OBJECT_SELF);
if (nDamage > 6) ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(112), OBJECT_SELF);
if (nDamage > 3) ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(236 + d3()), OBJECT_SELF);
FloatingTextStringOnCreature("Total Damage: " +IntToString(nTotalDamage)+ " Hits: "+IntToString(nHitCount),oPC);

if(nTotalDamage > nSessionHP) // session done - dummy HP depleted
{
if(GetLocalInt(oDummy,"RECREATE_COMBATDUMMY")==FALSE)//fix - SE
{
return;
}
FloatingTextStringOnCreature("You have finished your training session",oPC);
// report final statistic
AssignCommand(GetModule(),DelayCommand(4.0,FloatingTextStringOnCreature("You inflicted "+IntToString(nTotalDamage)+ " damage to the dummy with "+IntToString(nHitCount)+" hits",oPC)));
AssignCommand(GetModule(),DelayCommand(6.0,FloatingTextStringOnCreature("Your average damage is " + IntToString(nTotalDamage/nHitCount)+" per attack",oPC)));
// award xp only if permitted
if(GetLocalInt(oPC,"PLC_INTERACT_COMBATDUMMY_NOXP"))
AssignCommand(GetModule(),DelayCommand(8.0,FloatingTextStringOnCreature("No XP reward ! You trained too recently...",oPC)));
else
{
// award xp and report it to the user
AssignCommand(GetModule(),DelayCommand(8.0,FloatingTextStringOnCreature("You earned " + IntToString( FloatToInt( IntToFloat(nSessionHP) * PLC_DUMMY_XP_MODIFIER ) ) + " xp for your training",oPC)));
AssignCommand(GetModule(),DelayCommand(9.0,GiveXPToCreature(oPC,FloatToInt( IntToFloat(nSessionHP)* PLC_DUMMY_XP_MODIFIER ) ) ) );
// set no-xp flag
SetLocalInt(oPC,"PLC_INTERACT_COMBATDUMMY_NOXP",TRUE);
// set deletion timer for no-xp flag
AssignCommand(GetModule()
,DelayCommand(PLC_DUMMY_XP_TIMER,DeleteLocalInt(oPC,"PLC_INTERACT_COMBATDUMMY_NO
XP")));
}
// destroy & re-create dummy
SetLocalInt(oDummy,"RECREATE_COMBATDUMMY",FALSE);//fix - SE
string sResRef = GetResRef(oDummy); location lLoc = GetLocation(oDummy);
AssignCommand(GetModule(),DelayCommand(0.1,DummyRespawn(sResRef,lLoc)));;
DestroyObject(oDummy);
}
}
else
SendMessageToPC(oPC,"Dummy is currently busy...");
}

void main()
{
object oLastDamager = GetLastDamager();

if(GetIsObjectValid(oLastDamager))
{
//SendMessageToPC(GetFirstPC(),"Last Damager: "+GetName(oLastDamager));
DummyMain(oLastDamager,OBJECT_SELF);
}
}City of Melnibone - PW
ausnwn2.dyndns.org:5121
_________________________
City of Melnibone
ausnwn.dyndns.org:5121

Posted by Sir_Elric at 2004-03-09 17:10:00    Voted 7.00
Knat also because there are say 2 - 3 hits in a round the dummy gets re-created that amount of times at the completion of the training session so I'm getting 20+ combat dummys all on top of each other after awhile.City of Melnibone - PW
ausnwn2.dyndns.org:5121
_________________________
City of Melnibone
ausnwn.dyndns.org:5121

Posted by MorganQuickthrust at 2004-03-09 12:21:17    Voted 8.00 on 03/09/04

  1  2 Next>

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Visual Effects


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters