Having 2 bank boxes?

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Jester
Neophyte Poster
Posts: 36
Joined: Mon Jul 07, 2008 2:33 pm

Having 2 bank boxes?

Post by Jester »

Hey!

I would need some tips on how to get a second storage system up. I want to have a new storage system of some kind that is totally secluded from the bankers. Any tips on the easiest way to go about doing this? Using new datafiles or sum? I run Pol 095.

// David
Tomi
POL Developer
Posts: 478
Joined: Tue Feb 21, 2006 5:08 pm

Re: Having 2 bank boxes?

Post by Tomi »

take a look at scripts/include/NPCBackpacks.inc and see how the storage areas are used there.

Storage areas are 1 of the less documented part of pol/escript. So the best approach should be to check existing scripts for it.
Targun
Neophyte Poster
Posts: 30
Joined: Wed Jul 23, 2008 8:03 am

Re: Having 2 bank boxes?

Post by Targun »

run this command once for pol to create storage area for your addictional boxes:

Code: Select all

CreateStorageArea("mystoragearea");

run this once for every player to create his second bankbox

Code: Select all

var area:=FindStorageArea( "mystoragearea");
CreateRootItemInStorageArea( area, player.serial+"_bankbox2", <objtype> );
Now your player has a new box in storage area 'mystoragearea'. the box name is "<player.serial>_bankbox2"
<objtype> is objtype of container that you want to use as your addictional bankbox

to open this box for player you need to:

Code: Select all

var area:=FindStorageArea( "mystoragearea"); // finds storage area with boxes
var box:=FindRootItemInStorageArea( area, player.serial+"_bankbox2"); // finds players box
SendOpenSpecialContainer( player, box);
:whip:
Targun
Neophyte Poster
Posts: 30
Joined: Wed Jul 23, 2008 8:03 am

Re: Having 2 bank boxes?

Post by Targun »

Tomi wrote:take a look at scripts/include/NPCBackpacks.inc and see how the storage areas are used there.

Storage areas are 1 of the less documented part of pol/escript. So the best approach should be to check existing scripts for it.
yup, looking into includes is a good idea, but remember USE YOUR OWN STORAGE AREA NAMES
or you end up deleting bankboxes while cleaning some garbage
(Once I accidentaly wiped all keyrings and playervendor shops , cuz some genius thought it'll be a good idea to put'em in 'tamed storage' area)
Jester
Neophyte Poster
Posts: 36
Joined: Mon Jul 07, 2008 2:33 pm

Re: Having 2 bank boxes?

Post by Jester »

Targun wrote:
Tomi wrote:take a look at scripts/include/NPCBackpacks.inc and see how the storage areas are used there.

Storage areas are 1 of the less documented part of pol/escript. So the best approach should be to check existing scripts for it.
yup, looking into includes is a good idea, but remember USE YOUR OWN STORAGE AREA NAMES
or you end up deleting bankboxes while cleaning some garbage
(Once I accidentaly wiped all keyrings and playervendor shops , cuz some genius thought it'll be a good idea to put'em in 'tamed storage' area)

Thanks, now I know how to do it really. So the bankers at this secluded area could use a copy of my current banker script just modified for another storage area...
Post Reply