// Newbie Bank-Items
// by Xuri (xuri@sensewave.com)
// v1.01
// Last Update: 17. April 2005
// This script allows you to add specific items to all newbie players' bankboxes upon char-creation.
// By default, the script adds 2000 gold - but you can tweak that and add more items
// by copying & pasting the two last lines (excluding the brackets) and editing the
// hex-id & amount.
// To use this script, save it in your UOX3\JS\CUSTOM folder as (for instance) newbieBankItems.js,
// then open JSE_FILEASSOCIATIONS.SCP and add a new line saying 0=custom/newbieBankItems.js just
// below [SCRIPT LIST] and the first bracket. Alternatively, merge the script into any existing
// script you have listed with scriptID 0.
function onCreateDFN( objMade, objType )
{
if( objType == 1 && !objMade.npc ) // Make sure it's a new player
{
var pUser = objMade;
var bankBox = pUser.FindItemLayer( 29 );
if( bankBox == null || !bankBox.isItem )
{
// Create a new bankbox for the player
var newBankBox = CreateDFNItem( pUser.socket, pUser, "0x09ab", 1, "ITEM", false );
newBankBox.name = pUser.name + "'s bank box";
newBankBox.layer = 29;
newBankBox.owner = pUser;
newBankBox.container = pUser;
newBankBox.type = 1;
newBankBox.morex = 1;
bankBox = newBankBox;
}
if( bankBox && bankBox.isItem )
{
var newBankItem = CreateDFNItem( pUser.socket, pUser, "0x0eed", 2000, "ITEM", false ); //Add 2000 gold
newBankItem.container = bankBox; //Move the gold to player's bankbox
}
}
}
// by Xuri (xuri@sensewave.com)
// v1.01
// Last Update: 17. April 2005
// This script allows you to add specific items to all newbie players' bankboxes upon char-creation.
// By default, the script adds 2000 gold - but you can tweak that and add more items
// by copying & pasting the two last lines (excluding the brackets) and editing the
// hex-id & amount.
// To use this script, save it in your UOX3\JS\CUSTOM folder as (for instance) newbieBankItems.js,
// then open JSE_FILEASSOCIATIONS.SCP and add a new line saying 0=custom/newbieBankItems.js just
// below [SCRIPT LIST] and the first bracket. Alternatively, merge the script into any existing
// script you have listed with scriptID 0.
function onCreateDFN( objMade, objType )
{
if( objType == 1 && !objMade.npc ) // Make sure it's a new player
{
var pUser = objMade;
var bankBox = pUser.FindItemLayer( 29 );
if( bankBox == null || !bankBox.isItem )
{
// Create a new bankbox for the player
var newBankBox = CreateDFNItem( pUser.socket, pUser, "0x09ab", 1, "ITEM", false );
newBankBox.name = pUser.name + "'s bank box";
newBankBox.layer = 29;
newBankBox.owner = pUser;
newBankBox.container = pUser;
newBankBox.type = 1;
newBankBox.morex = 1;
bankBox = newBankBox;
}
if( bankBox && bankBox.isItem )
{
var newBankItem = CreateDFNItem( pUser.socket, pUser, "0x0eed", 2000, "ITEM", false ); //Add 2000 gold
newBankItem.container = bankBox; //Move the gold to player's bankbox
}
}
}