What`s the bug?

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Juzeph
New User
Posts: 23
Joined: Sun Apr 15, 2007 5:58 pm

What`s the bug?

Post by Juzeph »

itemdesc.cfg
Item 0x998B
{
Name banco
Desc Bank Box
Graphic 0xE7C
Color 1151
Script bank
Movable 0
}
bank.src
use uo;
use os;

Const UOBJ_BANKBOX := 0x0E7C;

program Item_Bankbox(quem)
var banco := FindBankBox(quem);
if(!banco)
return;
endif
// This bug are HERE???
SendOpenSpecialContainer(quem, banco);
SendSysMessage(quem, quem.name + ", you are open in the bank box.");
endprogram

function FindBankBox(quem)
var bank := OpenWorldBank();
var nome := "Bankbox of " + CStr(quem.serial);
var bankbox := FindRootItemInStorageArea(bank, nome);
if(!bankbox)
bankbox := CreateRootItemInStorageArea(bank, nome, UOBJ_BANKBOX);
endif
if(!bankbox)
syslog(" " + quem.name + " (Serial: " + quem.serial + ") this no open bank box.");
endif
return bankbox;
endfunction

function OpenWorldBank()
var bank := FindStorageArea("Serial Bank");
if(!bank)
bank := CreateStorageArea("Serial Bank");
endif
if(!bank)
syslog("Not open and not create bank box system.");
endif
return bank;
endfunction
Last edited by Juzeph on Wed Sep 05, 2007 6:27 am, edited 2 times in total.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

At a quick glance, you haven't defined it as a container, no gump, no co-ordinates.
coltain
Grandmaster Poster
Posts: 159
Joined: Tue Mar 20, 2007 7:17 am

Post by coltain »

You define Script bannk

but use bank.src
Juzeph
New User
Posts: 23
Joined: Sun Apr 15, 2007 5:58 pm

Post by Juzeph »

coltain wrote:You define Script bannk

but use bank.src
This is not problem.

OldnGrey wrote:At a quick glance, you haven't defined it as a container, no gump, no co-ordinates.
Already I tried this. In the CORE 095 this was not necessary.


Edit:
SORRY

It lacked the itemdesc of the container 0x0E7C.
hehehe... Pardon... :oops:
Post Reply