itemdesc.cfg
Quote:
Item 0x998B
{
Name banco
Desc Bank Box
Graphic 0xE7C
Color 1151
Script bank
Movable 0
}
bank.src
Quote:
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