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  broadcastdeath
Author  ffbj
Submitted / Updated  03-10-2004 / 11-22-2006
Category  Creature Related
Expansions  Works on all versions
Format  Code Only
Type  Type - General
Includes  None
Description
This is just a little broadcast ondeath script for boss monsters. The body of the script goes at the top of the monsters ondeath. It will broadcast, shout, to all players that so and so killed monsterx in areax. I imagine this is not new, but I had a request for it.

Files

NameTypeSizeDownloads
ffbj1078976658280broadcastdeath.zipffbj1078976658280broadcastdeath.zip
Submitted: 03-10-2004 / Last Updated: 03-10-2004
zip0.91b391
--
SCORE OUT OF 10
10
2 votes
View Stats
Cast Your Vote!

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




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

Posted by Blasco-Yang at 2009-04-11 12:28:47    Voted 10.00 on 04/11/09
Another simple, but quite handy script that makes you say: "Why didn't I think of that?"

I actually downloaded this quite some time ago, but had other things going on that prevented me from really looking at it.

Thanks ffbj.

Posted by Shargast at 2006-03-30 07:47:38    Voted 10.00 on 03/30/06
Got it running - 10.00 is for the scripting plus the online support! Keep on rocking in a free world!
Shargast aka Sai Highpockets
_________________________
Realms of Shargast V1-V5ab, LOTR V15, The Undeath Clave & Faithful of Aerth

Posted by ffbj at 2006-03-29 21:00:40    
You can also just add in the line:
SpeakString(sMessage, TALKVOLUME_SHOUT);
under the oPlayer message, but it won't shout to all the players, though it will still send the message. This is due to the fact that you can't shout to all players, there is not function that does that. Sorry.

Posted by Shargast at 2006-03-29 10:00:24    Voted 10.00 on 03/30/06
Ok All I could wish for is that you could edit this script so that it will appear as TALKVOLUME_SHOUT. The message at the end of the script 76 - 96 .

I've borrowed from you and if you can help me to get this script going I'd be most grateful!

Thanks for any help - should be easy, but then again Greek and Latin are also easy.

Cheers
Sai


NWScript:
//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT7
/*
Default OnDeath event handler for NPCs.
Adjusts killer's alignment if appropriate and
alerts allies to our death.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/22/2002
//:://////////////////////////////////////////////////
#include "x2_inc_compon"
#include "x0_i0_spawncond"
#include "se_respawn_inc"
void main()
{
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
object oKiller = GetLastKiller();
// If we're a good/neutral commoner,
// adjust the killer's alignment evil
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
{
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
}
// Call to allies to let them know we're dead
SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
//Shout Attack my target, only works with the On Spawn In setup
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
// NOTE: the OnDeath user-defined event does not
// trigger reliably and should probably be removed
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
}
craft_drop_items(oKiller);
// Do not respawn creature if tagged with _NSP eg. NW_GOBLINA_NSP
if (FindSubString(GetTag(OBJECT_SELF), "NSP") > -1)
return;
{ SE_DoCreatureRespawn(); }
{
object oPC = GetLastKiller();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = OBJECT_SELF;
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oTarget));
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DESTRUCTION), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DESTRUCTION), GetLocation(oTarget));

//add in to the top of the ondeath of the creature ffbj
}
//the following is the body of the script. I just left the void
//main in so it would compile.
object oBoss = OBJECT_SELF;//code begins
object oPC = GetLastHostileActor(oBoss);
object oArea = GetArea(oBoss);
string sBoss = GetName(oBoss);
string sPC = GetName(oPC);
string sArea = GetName(oArea);
object oPlayer = GetFirstPC();
if (GetIsDead(oBoss))
while (oPlayer != OBJECT_INVALID)
{ string sMessage = (sBoss + " was killed by "+sPC+" in "+sArea);
SendMessageToPC(oPlayer, sMessage);
oPlayer = GetNextPC();
}//end of code
}

_________________________
Realms of Shargast V1-V5ab, LOTR V15, The Undeath Clave & Faithful of Aerth

Posted by ScrewTape at 2004-08-21 10:16:00    
Fleshmelter - OBJECT_SELF in the OnPlayerDeath event IS the module. (OnPlayerDeath is a module event, as where OnDeath is a creature event so the creature is OBJECT_SELF).

If you want to tell who killed the player, try this
// object oBoss = OBJECT_SELF;//code begins

object oBoss = GetLastPlayerDied();//code begins

Posted by ffbj at 2004-03-12 22:13:00    
Thanks BT.

Posted by Blacktrancer ( ..xxx.xxx ) at 2004-03-12 16:16:00    
This is a nice little script. Works very well and makes for some interesting eye-candy...

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 Scripts


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