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  (1.61+) Kittrell's Persistent Banking 1.7 Final
Author  Brian J. Kittrell
Submitted / Updated  03-22-2005 / 11-22-2006
Category  Database Related
Expansions  SOU-1.65
Format  Module and Code
Type  Type - Banking
Includes  BioWare Standard
Description
This is the continuation of the KPB system, and it is considered to be the final edition. Expansions may come in the future, but it's at a final point for the base system. Store gold and items, invest in random ventures, take out/repay loans, and more. Read the ReadMe for more information.

This is a compilation of many previous versions. You may see the others under Scripts Index -> Database Related -> Banking.

Files

NameTypeSizeDownloads
Brian_J._Kittrell01KPBREADME.txtBrian_J._Kittrell01KPBREADME.txt
Submitted: 03-22-2005 / Last Updated: 12-21-2005
txt12.91Kb353
Read Me
Brian_J._Kittrell1111481526125kpbbanking17.zipBrian_J._Kittrell1111481526125kpbbanking17.zip
Submitted: 03-22-2005 / Last Updated: 03-22-2005
zip184.62Kb886
--
SCORE OUT OF 10
9.83
8 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 (28):

Posted by sharlynk at 2010-05-10 16:56:55    Voted 9.00 on 05/10/10
If some people are still using this and having a problem with the Item Duping issue described below, here is a fix I found today while trying to fix the exploit for our persistent world (The Moonsea).
There were some serious issues with the counters in kpb_ppis_disturb and with my fix it looks like it's working fine. Here is how:

1. Add kpb_ppis_disturb to the OnDisturb event of the placeable Item Bank Vault (unique) in the palette.

2. Replace the entire content of the kpb_ppis_disturb script by this:

/////////////////////////////////
//: Kittrell's Persistent Banking
//: kbp_ppis_disturb.css
//: Modified By: Brian J. Kittrell
//: Modified On: 19-2-2004
//:
//: Originally By: OldManWhistler
//: PPIS System
/////////////////////////////////

int PPISUserDefinedInventoryLimit(object oPC, int iCount, object oItem)
{
// Maximum allowable items stored in the vault by any one player.
if(iCount >= 30)
{
SendMessageToPC(oPC, "You may not store more than 30 items.");
return FALSE;
}
return TRUE;
}

const string PPIS_COUNT = "PPISCount";

void main()
{
object oPC = GetLastDisturbed();
if (!GetIsPC(oPC)) return;
int iType = GetInventoryDisturbType();
object oItem = GetInventoryDisturbItem();
int iCount = GetLocalInt(OBJECT_SELF, PPIS_COUNT);

if (iType == INVENTORY_DISTURB_TYPE_ADDED)
{
if (GetItemStackSize(oItem) > 1)
{
iCount++;
SetLocalInt(OBJECT_SELF, PPIS_COUNT, iCount);
DelayCommand(0.3, AssignCommand(OBJECT_SELF, ActionGiveItem(oItem, oPC)));
SendMessageToPC(oPC, "Gold and other stacked items cannot be stored within this container.");
}
else if (GetHasInventory(oItem))
{
iCount++;
SetLocalInt(OBJECT_SELF, PPIS_COUNT, iCount);
DelayCommand(0.3, AssignCommand(OBJECT_SELF, ActionGiveItem(oItem, oPC)));
SendMessageToPC(oPC, "You cannot store containers in your vault.");
}
else if(!PPISUserDefinedInventoryLimit(oPC, iCount, oItem))
{
iCount++;
SetLocalInt(OBJECT_SELF, PPIS_COUNT, iCount);
DelayCommand(0.3, AssignCommand(OBJECT_SELF, ActionGiveItem(oItem, oPC)));

}
else {
iCount++;
SendMessageToPC(oPC, "The vault has "+IntToString(iCount)+" items stored.");
}
SetLocalInt(OBJECT_SELF, PPIS_COUNT, iCount);
}
else if (iType == INVENTORY_DISTURB_TYPE_REMOVED)
{
iCount--;
SetLocalInt(OBJECT_SELF, PPIS_COUNT, iCount);
SendMessageToPC(oPC, "The vault has "+IntToString(iCount)+" items stored.");
}



return ;

}




Anyway, very nice bank system, has been in use in our PW for a while now. Thanks again!

Posted by azak30 at 2009-06-30 20:13:18    Voted 10.00 on 06/30/09
Still one of the best banks made for the game. Number 1 in my book.

Posted by TethyrDarknight at 2006-12-28 13:36:47    
Also, my purchase of NWN Diamond/NWN1 was sparked by a highly difficult time of trying to make sense of the new toolset. It's definitely more like a 3D software suite than a game/map editor. I may worry with it in the future, but for now, I'd rather stick to what I know. lol

Posted by TethyrDarknight at 2006-12-28 13:34:24    
Well, I am suprised that people have still found a use for it after all this time. I just went and bought NWN Diamond (can't find my old CD's) so that I could possibly play and build again.

Thanks for the positive comments. I really appreciate it.

Posted by DM_Lady_Death at 2006-09-23 22:46:06    Voted 10.00 on 09/23/06
this is an awesome system we are going to be adding it in to the PW RP server Elanst'wyb Shire Among the Mists.
_________________________
DM_Lady_Death

Posted by diavlen at 2006-08-02 12:40:59    Voted 10.00 on 08/02/06
I've been using this banking system for some time now on our persistant world of Borgo Pass. Very nice work!
_________________________
Borgo Pass PW
Link

Posted by DMLadyAbagail at 2006-07-29 16:03:46    Voted 10.00 on 07/29/06
I just love this system I have been using for over a year now and its the best Ive seen! This belongs in the HOF!
_________________________
"Pudding can't fill the emptiness inside me...but it will help!"

Posted by TethyrDarknight ( 74.229.xxx.xxx ) at 2006-06-08 19:48:29    
Hi,

Well, the formulae and the numbers can be adjusted depending upon each particular DM.

The numbers/formulae used in this guarantees a money-sink/rare extreme success rate on the investments. It is designed to make money a little rarer by sinking it from the players, while keeping making a big reward if a player happens to be lucky enough to hit the big money. (And there is some big money available in the script.)

But, sorry for the length between responses. I heard NWN2 was coming out, and I am very turned on about the new planned features.

I will be re-writing this system for NWN2, as it will more than likely need to be re-vamped for the new functions and new platform.

I also have a little more programming experience under my belt now from when I started, so I will write the system to run a little more smoothly and efficiently.

Glad everyone is having a good time with the system (save the few errors experienced by some folks).

If your DM wants to change the variables in the script for his uses, that's fine. But, in playing around with it personally, I found the system to be balanced for use in a game like this. (Since money is generated via monsters/loot out of thin-air, you need something on the other end to catch some of the thin-air stuff to keep the economy balanced).

Posted by Skyhooker at 2006-01-22 07:17:16    
Hi again,

Just re-read my comment - I meant "Market" investment in the 2nd sentence, not "Food Production." Thanks again.

Posted by Skyhooker at 2006-01-21 17:22:47    
Hi,

I've been playing in a PW that uses this system, and was trying to generate some additional gold for my group between weekly sessions by using the Investment Broker. When I finally accumulated enough to invest in Food Production, within a few attempts I lost the entire investment. That led me to wonder how the terms describing risk are defined numerically in the script - especially "small chance of losing your entire investment." Our DM was kind enough to mention that he found the banking script here, so I downloaded it and dug a little deeper. I did some rough calculations based on the percentage chance for various returns, and found that, except for Food Production, all of the other types of investments have a large negative expectancy due mainly to the chance of losing the entire investment. This means that, over a large number of trials (or even a small number, in my case - ouch!), the players investing in these are all but guaranteed to go broke. I'm not sure whether this was your intention, but I thought I'd bring it to your attention just in case. Thanks.

Posted by Daijin at 2005-12-21 20:50:28    Voted 10.00 on 12/21/05
I use this in my private server Dunjon Legends, and it makes thing soo much easier, thank you!!
_________________________
Dream Well, Faith, Loyalty, Truth, Honor, Friendship always.....

Daijin Dreamweaver, Leader of the Dream Warriors for 32 years, going strong.

Nwn The Dunjon Shard:
Link

Posted by TethyrDarknight ( 216.45.xxx.xxx ) at 2005-07-23 14:31:30    
I have read back over the comments here after being gone for a while, and I will take a look at this and see if I can figure out some kind of workaround. I did not design the storage chest system personally, I simply integrated it to work into this banking system and included it as many people were requesting a system like this.

At that time, I could not see a way of doing the chest storage system without duping bugs such as this. The system I integrated claimed to work correctly without duping, but alas, it did not. hehe

I will look through this an attempt to either fix it or add a workaround for this problem. Thank you for your support and discussion, though.

Posted by FunkySwerve at 2005-05-17 21:02:51    
Oh, just in case its not clear from the above, you CAN add more than 30 items and noy wind up with dupes, I just did this to verify the point at which duping occurs. The tower shield is 2x4 squares, so you could add 30 more 2x2 items and still not get duping. Or you could put 360 one space items in there with nothing else and get no dupes, if you were so inclined. Duping occurs at the point that the item you are tring to put in does not fit into any of the remaining empty spots. Depending on the order you put things in, you could wind up duping or not duping with the same set of items. On average, players start getting dupes between 70 and 80 items stored.
Funky

Posted by FunkySwerve at 2005-05-17 20:52:19    
Oh, and by the way, the Readme is still not up. :(
Funky

Posted by FunkySwerve at 2005-05-17 20:50:11    
The below script is cut out of kpb_ppis_start. The added section is set off by commented lines. This works flawlessly to stop duping, but doesn't resolve the other problems I discuss above.

void PPISStorageHeartbeat(object oPC, object oChest)
{
float fDist = GetDistanceBetween(oChest, oPC);
if ((fDist > 0.0) && (fDist < 5.0))
{
DelayCommand(PPIS_STORAGE_HEARTBEAT, PPISStorageHeartbeat(oPC, oChest));
return;
}
object oStorage = OBJECT_SELF;
DeleteLocalInt(oStorage, PPIS_HB_MUTEX);
if(PPISStore(oStorage))
{
SendMessageToPC(oPC, IntToString(GetLocalInt(oStorage, PPIS_COUNT))+" items were stored

persistently.");
//below section added to despawn duped items
object oArea = GetArea(oPC);
object oDupe = GetFirstObjectInArea(oArea);
while (oDupe != OBJECT_INVALID)
{
if (GetObjectType(oDupe) == OBJECT_TYPE_ITEM)
{
DestroyObject(oDupe);
}
oDupe = GetNextObjectInArea(OBJECT_SELF);
}
////end added section
} else {
SpeakString("Error: unable to store "+GetName(oPC)+"'s items to the database in

area:"+GetName(GetArea(OBJECT_SELF))+".", TALKVOLUME_SHOUT);
}
return;
}

Posted by FunkySwerve at 2005-05-17 20:42:12    
The problem Sol is referring to is posted on the previous versions page. I'll supply the details for you now. I'm not going to vote one way or the other at this time, out of respect for the time you've obviously put into these scripts. But I would certainly not characterize it as 'minor'. Duping occurs whenever the invisible creatures inventory exceeds the normal 6 page limit of a character. This means the minimum number of items needed before duping is possible is 31. The fact that you set the default limit in kpb_ppis_disturb to 30 suggests to me that you are aware of this, though I suppose it could be coincidence. Basically, whenever the creature receives an item it cannot fit into its inventory, that item is duped onto the ground, but this happens at the very end of the vaulting process, AFTER the item has already been stored in the database. One can open the container and ppull the same item out again. You can test this by opening your demo module and depositing 33 tower shields on the ground. Thn run the module. Deposit the 33 shields (Im using 33 as an example, 31 still causes this problem as I indicated earlier. This will not be a problem as by default the inventory limiter function is NOT on the the ppis_individual (where it does no good) OR the unique vault (where it fires correctly). Walk away from the chest. The PPIS Heartbeat script fires and sends the message, 33 items stored. But 3 tower shields are deposited on the ground in front of the chest at the same instant. Pick them up, deposit them. Walk away. Message says 36 stored, and 6 fall to the ground. Repeat again, and 42 are stored, 12 fall to the ground. Now withdraw all 42, and combined with the 12 on the ground, you now have 54 ahields - 21 dupes, all ready for sale. Now imagine doing this with an expensive item on a PW. And don't think that players won't discover it, players on my PW report it regularly.
So, I and another DM cracked open the toolset, and after some experimenting, figured out that the kpb_ppis_disturb script needs to go on the the unique vault. Great! we figured, problem solved. We left the limit at 30 and tested it. Funny thing is, that script doesnt work correctly. Its behavior is a bit erratic, but it appears that the first shield deposited (or whatever item you please) after the 30 limit is broached is STILL entered into inventory. Only at the 31st does the limiter kick in. End result? You can still dupe. Not only that, but if you dump items in there fast enough, you can dupe almost as easily as with no disturb script. I finally devised a workaround script to destroy the dupes instantaneously, which I'll post below. This does NOT, however, resolve the fairly serious issue that players can dump items into storage to their hearts content, generating unwanted database size and extra lag. The DM and I toyed with the ondisturb script for hours, tweaking this and that. Tried switching the iCount to 29, no good. Tried redoing the if/else structure - no good. Tried adding nInt -- statements, no good. Got it to do some very strange stuff, but not to work correctly.
Otherwise, this is a great script, but PLEASE fix kpb_ppis_disturb. Thank you for your time, and your formiddable script!
Best,
Funky

Posted by DM_HellSpawn at 2005-05-17 18:33:14    Voted 9.50 on 05/17/05
I'm currently experiencing 2 problems.
1) I'm also having problems with Items "spilling" out onto the floor. Though I believe this is because when the items are stored in the database they are stored on a creature and that creature is in some ways governed by the bioware allotted inventory slots.

2) When you set your item limit (ie 30) It is allowing me to put the 31st items in storage then when I add another (32nd) it kicks it out and tells me I have 30 Items in the vault when there is 31. You can keep putting items in the vault in this fashion infinitely it seems. It will however register the correct number of items when you walk away from the chest to persistantly store them.

If you would like more info on this feel free to contact me.

Thanks,

Hellspawn

Posted by TethyrDarknight at 2005-04-22 02:43:00    
I've heard briefly of this problem before someplace, but I was never supplies the exact details about it.

Posted by _Sol_ ( 65.173.xxx.xxx ) at 2005-04-12 03:07:00    
I seem to have a problem, which I couldn't see listed in the fixes for 1.6x.

The item vault seems to 'spill' items duplicating them somehow. Anybody ran into this problem before? I will post more details later tonite when i get home from work ;)

Posted by _Sol_ ( 65.173.xxx.xxx ) at 2005-04-12 03:07:00    
I seem to have a problem, which I couldn't see listed in the fixes for 1.6x.

The item vault seems to 'spill' items duplicating them somehow. Anybody ran into this problem before? I will post more details later tonite when i get home from work ;)

Posted by TethyrDarknight at 2005-04-01 02:49:00    
Ack, just found out that my new Readme was overwritten at some point by one of the old ones. Have they changed how you update files on the vault? I put my correct email in the field where it asked...

Posted by TethyrDarknight at 2005-04-01 02:47:00    
Grrr... I will try to see how I can update this stuff, but I never did receive my information to update it. (No email, although I put my email information in there.)

Anyhow, the conversations/core scripts have only been fixed with any grammatical/spelling errors I've noticed. The only scripting add-on is the persistent time script, which most of you already will have. Like I said before, it's mainly a final version with everything necessary to run out of the box, so to speak. People who have been using this system are not required to update to the latest version, as no core scripts nor conversations have changed in any functional way. If you have noticed no spelling/grammar errors in the conversation, you've either already fixed it or no one has noticed as yet.

Posted by Ry'gel ( 82.217.xxx.xxx ) at 2005-04-01 01:17:00    
What scripts/conversations did change? I went up modifying the lot (MySQL functions) in our module to concentrate the MySQL calls, so it would be very nice to know what has changed exactly. Also the readme included in the zip has a date of 20-2-2005 and doesn't look new to me :S

Posted by TethyrDarknight at 2005-03-29 04:55:00    
Hmmm... that's strange. It's never come up for me like that before. Did you make sure to walk away from the chest after placing something inside until you saw a "X items store persistently"? Or is it storing the things and just saying 0 items?

Posted by Yabbadabbado ( 220.240.xxx.xxx ) at 2005-03-28 05:04:00    
Just a little bug...
No matter how many items you store in the bank vault, it seems to tell you that; "You have 0 items stored."

Otherwise, the script is great! Well done.

Posted by TethyrDarknight at 2005-03-28 02:19:00    
As for the lag-free policy, there are no heartbeats (whew :) ) in the system, and the only real resources it uses is to send/receive information to/from the database. Other than that, it's clean and efficient.

Posted by caesarbear at 2005-03-28 00:57:00    
So what's new in 1.7? The readme only covers the last version?

Posted by Fu_Miga at 2005-03-27 11:26:08    Voted 9.50 on 03/27/05

_________________________
========================
The SAGA Project
========================
Link
Friendship based RP club
========================

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