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  Simple Store Cleaner
Author  RiffRaff
Submitted / Updated  04-09-2006 / 11-22-2006
Category  Inventory Item
Expansions  NWN-1.67
View Code  

Select All Text | View Code in separate window
Format  Code Only
Type  Type - Store
Includes  None
Description
This code can be added to your onunaquire event to keep your stores from getting cluttered up with tons of items.

This script destroys any object sold to a merchant.

Files

NameTypeSizeDownloads
NO FILES
SCORE OUT OF 10
9.67
3 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 (9):

Posted by riffraff at 2006-05-30 00:20:50    
lylver:

Only if one of the players is OBJECT_TYPE_STORE instead of OBJECT_TYPE_CREATURE :)
_________________________
My Submissions

Posted by lylver at 2006-05-16 05:21:10    Voted 9.00 on 05/16/06
technically the best way to do, but breaking some possibilities : anonymous ressources exchange between players in PW.
_________________________
TN Bouchon 2 (PW-RP), un des "bouchons lyonnais"

Posted by lylver at 2006-05-16 05:18:39    Voted 9.00 on 05/16/06
Bioware store panel : you have option to restrict type of items that can be sold instead of just destroying them. Depends on what type of store you need, just destroying anything that comes "in" can break item exchange between players in a persistent PW.
Technically : this is the best way to do.
From the player point of view : you can let some items to make the store a point of rendez-vous and put a trashcan near for discarding of no valuable items.
_________________________
TN Bouchon 2 (PW-RP), un des "bouchons lyonnais"

Posted by riffraff at 2006-04-30 08:01:17    
I do it like this on my server since I figure if it is over 10k gold it is worthy to keep it. The concept might fall apart with higher level areas though. Only time will tell :)

object oItem = GetModuleItemLost();
object oOwner = GetItemPossessor(oItem);
if (GetObjectType(oOwner) == OBJECT_TYPE_STORE)
{
if (GetGoldPieceValue(oItem) < 10000) DestroyObject(oItem, 0.1f);
}

_________________________
My Submissions

Posted by lylver at 2006-04-14 05:35:20    Voted 9.00 on 05/16/06
Alternative : OnClose Store
// shop_clean

void main()
{
object oItem;
string sTag;
int nCount = 1;
int MAXCOUNT = 3;

oItem = GetFirstItemInInventory();
while (GetIsObjectValid(oItem)) {
sTag = GetTag(oItem);
nCount = GetLocalInt(OBJECT_SELF, "COUNT_"+sTag);
if (nCount > MAXCOUNT) DestroyObject(oItem);
else SetLocalInt(OBJECT_SELF, "COUNT_"+sTag, ++nCount);
oItem = GetNextItemInInventory();
}

oItem = GetFirstItemInInventory();
while (GetIsObjectValid(oItem)) {
DeleteLocalInt(OBJECT_SELF, "COUNT_"+GetTag(oItem));
oItem = GetNextItemInInventory();
}
}
_________________________
TN Bouchon 2 (PW-RP), un des "bouchons lyonnais"

Posted by Markshire at 2006-04-13 20:17:01    Voted 10.00 on 04/13/06
Excellent concept. Hadn't realized I wanted to do this until I saw it posted.
_________________________
Vault Game World Entry: Markshire
Website: www.markshire.com
Server: www.markshire.net:5121
NWNWiki: Markshire
Vault Submissions:
NWN1: Magic Carpet Transitions | Experience and Teamwork System | Portable Persistent Chest System | Nerfed Pulse Drown | Renaming System | Quill of PC Recording
NWN2: Climbing System | Explosive Barrels | Quill of PC Recording
Fiction: A Missed Adventure | Kurm and the Sewer King's Curse | A Harrowing Story | Loki's Foulest Trick | Rising Force | The Mad Red Titan: One, Two, Three

Posted by Markshire at 2006-04-13 20:16:25    Voted 10.00 on 04/13/06
I had the same idea for the change DM Mask made except in a more realistic concept ... Anything over 1000 gold piece value is something they would retain and perhaps find a special buyer for. This covers most magic weapons and armor.

if (GetObjectType(GetItemPossessor(oItem)) == OBJECT_TYPE_STORE & GetGoldPieceValue(oItem) > 1000) DestroyObject(oItem, 0.1f);

Same thought, slightly different applications.
_________________________
Vault Game World Entry: Markshire
Website: www.markshire.com
Server: www.markshire.net:5121
NWNWiki: Markshire
Vault Submissions:
NWN1: Magic Carpet Transitions | Experience and Teamwork System | Portable Persistent Chest System | Nerfed Pulse Drown | Renaming System | Quill of PC Recording
NWN2: Climbing System | Explosive Barrels | Quill of PC Recording
Fiction: A Missed Adventure | Kurm and the Sewer King's Curse | A Harrowing Story | Loki's Foulest Trick | Rising Force | The Mad Red Titan: One, Two, Three

Posted by DM Mask at 2006-04-11 14:20:53    Voted 10.00 on 04/11/06
Great method of keeping shops clean, I was actually looking for something like this. With a minor modification to deal with expensive items, its perfect for what I needed.

For anyone with a similiar GP value concern..

if (GetGoldPieceValue(oItem)>14999)return;//15K or over.. we stop.
_________________________
Itinerant Admin: RPGModding.com - Where Modders Muster.

CTP: [Release 1] [Release 2] [Generic Doors]
NWN1: [Core Tools] [Migrating Traps] [HiPS Restriction] [Tag Based Treats/Terrors]

If you need to, Contact Me
Its more effective than leaving a post on a vault entry you will probably never return to look at a second time

Posted by DM Mask at 2006-04-11 14:19:37    Voted 10.00 on 04/11/06
Great method of keeping shops clean, I was actually looking for something exactly like this.
_________________________
Itinerant Admin: RPGModding.com - Where Modders Muster.

CTP: [Release 1] [Release 2] [Generic Doors]
NWN1: [Core Tools] [Migrating Traps] [HiPS Restriction] [Tag Based Treats/Terrors]

If you need to, Contact Me
Its more effective than leaving a post on a vault entry you will probably never return to look at a second time

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 UI


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