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  



NWN2 SCRIPTS

- Jump to comments -
Name  onAreaExit Cleanup
Author  Bar Fubaz
Submitted / Updated  05-16-2008 / 05-07-2010
Category  Area
Type  Type - Other
Format  Code Only
ShowCode  

Select All Text | View Code in separate window
Patch  1.23
NWN2Game  All
Description
bar_onareaexit
On Area Exit script:
- Cleans up loot bags, encounter creatures, dead creatures and hostile creatures when last char leaves the area.
- Does not kill friendly merchants and NPCs, suitable for all areas in most mods.
- New revision introduces delay, players can reenter to prevent clean up with in two minutes. Requires one placable in area to latch on to.
- Old revision seemed to fire a bit too often. In practice did in fact clean up when players where in the area.

Files

NameTypeSizeDownloads
NO FILES
SCORE OUT OF 10
9.06
6 votes
View Stats
Cast Your Vote!
Voting FAQ

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 (10):

Posted by Natala at 2011-02-24 09:09:38    Voted 9.00 on 02/24/11
Very useful, haven't had the chance to try it live but if it does what it says on the package I'll be putting this in most wilderness and cave areas. :) Love none Heartbeat scripts.
_________________________
Tales of Nelanther PW Link
Hardcore roleplay with moderate combat, Intimate Player Community with high-DM Interaction, 4th Edition Forgotten Realms setting - NWN2 3.5 ruleset.

Posted by Qrizz at 2010-05-13 23:52:59    Voted 9.75 on 05/13/10
Great !
_________________________
Qrizz
Middle Earth Arnor PW
Link

Posted by Sepelio at 2009-03-10 16:21:35    Voted 9.00 on 03/10/09
Seems to run under my testing conditions in a server empty of players. I've stuck it in most areas that have hostile spawns now. Hope it performs just as well under load.

In my case its replacing a hearbeat script that was put in by a previous developer.

Posted by Sepelio at 2009-03-09 15:45:51    Voted 9.00 on 03/10/09
I'll be using this script in a pwc. Once I actually get the chance to see it run I'll rate :)

Posted by barfubaz at 2008-06-21 14:59:57    Voted 10.00 on 05/23/08
Arvigo,

Thank you for the feedback.

To answer your questions:

Well, didn't use the module object because I was doing the area. In practice I prefer to do lower overhead scripts, besides try not to make a script that can wipe out monsters as they fight them (although could have coded around that). Honestly a full module clean doesn't make much sense to me since I am trying to preserve the feel of the area being persistent and only cleaning up when the chars are out of the specific area long enough to lose sense of continuity. If full module clean works for you then using the module for the delay would make sense.

Yes, you may want to customize the creature cleanup condition if you have more complex requirements.

Heh "The code in TrashObject function could be cleaner" ... irony. Was the bit that took from someone else so kept that as close to the original as possible, but yeah I suppose I could have cleaned up the trash better *chuckles*.

- Bar

Posted by Arvirago at 2008-06-20 05:24:12    Voted 6.50 on 06/20/08
Why don't you use the module object to do the actions, instead of looking for a placeable?
That's what I did in NWN1 to have a script cleaning all bodybags for the whole module (instead of working on a per area basis).
The script is OK, but when you have different factions where one can be ostile to some players and not to others you have to be aware that the script will clean all but the commoners.
Also remember to set the respawn time of your encounters accordingly, so you can't just get away with them exiting the areas (2 minutes delay).
The code in TrashObject function could be cleaner.
_________________________
Reino de Aldor

Posted by over_my_head at 2008-05-31 02:55:54    Voted 8.50 on 05/31/08
Hey Barfubaz,

Thanks for the quick reply. And indeed, I should take that into account. I used Sir Elric's system due to its simplicity, but you are right in assuming it causes lag. Until now my computer can handle it, but what's the point in causing extra lag when this can be overcome. I just like the flexibility of editing every single creature placed. Determining where they should spawn is more time-consuming, and encounter triggers reduces the flexibilty. I will have a look at what is the best solution. Though, thank you for the note, and for the quick reply and solution.

Yours sincerely,

Over My Head

Posted by barfubaz at 2008-05-30 21:14:36    Voted 10.00 on 05/23/08
Over_my_head:

Re: compatability with "Sir Elric's Simple NPC Respawning"

Looking at Sir Elric's code, I see he depends on the on death event. So verbatum use of my script would destroy the creatures and not fire the death script and you'd end up with an empty module right quick.

If you just want to clean up the loot bags, change the long if expression to just:

if( (iType == OBJECT_TYPE_PLACEABLE && GetTag(oItem) == "BodyBag") ){

As a note our experiments show that empty areas with NPCs in them do take up CPU, so if you are experiencing lag due to CPU you may want to reconsider how you spawn.

- Bar

Posted by over_my_head at 2008-05-29 03:05:05    Voted 8.50 on 05/31/08
What if we do not use encounters which are triggered, but place creatures in the Toolset which respawn after they have been killed by a player. I use Sir Elric's Simple NPC Respawning. Will it cause the event to stop since the creature has not been destroyed, or will the script assume the NPC has been destroyed and respawn after set interval and remain until a PC enters and exits the area again?

Posted by barfubaz at 2008-05-23 09:58:56    Voted 10.00 on 05/23/08
Please post here if are using this script.

- Bar

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

10 - A Masterpiece, Genuinely Groundbreaking
9 - Outstanding, a Must Have
8 - Excellent, Recommended to Anyone
7 - Very Good, Deserves a Look
6 - Good, Qualified Recommendation
5 - Fair, Solid yet Unremarkable
4 - Some Merit, Requires Improvements
3 - Poor Execution, Potential Unrealized
2 - Very Little Appeal
1 - Not Recommended to Anyone

 
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 Other


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