I was just curious if there is a script out there for bank checks. Or maybe I over looked it.
Thanks
-Natas-
Bank Checks?
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
I have a more or less completed javascript which replaces the hardcoded banker ai with a scripted one which supports more commands AND the ability to create checks from gold in your bank box. I also have a script for the bankchecks themselves, which will turn back into gold. They're newbiefied and can only be used while in your bankbox. I'm not sure what other things you're supposed to be able to do with checks 
When I've made sure that it's as bugfree as I can get it, it will probably be included in the next UOX3 release.
If you want to try it out right now, download this RAR file (use WinRar/WinAce to unpack), which you then unzip to your UOX3/JS folder (Make sure that banker.js ends up in npc/ai/ and bankcheck.js in item/).
Then add these two lines to jse_fileassociations.scp at the apropriate places:
3201=npc/ai/banker.js
and
5014=item/bankcheck.js
Next, edit the Banker-NPCs in dfndata/npc/malevendors.dfn and dfndata/npc/femalevendors.dfn, and replace their NPCAI=8 line with one saying SCRIPT=3201 instead.
Note that these changes will only affect any NEW banker-NPCs added to your world, so if you add these manually or through itembased-spawners, you need to respawn them. If you use regional spawns, new banker-NPCs with those changes will automatically be spawned on the next server startup.
Creating checks should be the same as on the official UO servers, say CHECK <amount> to any banker who has the above mentioned banker-ai-script attached.
When I've made sure that it's as bugfree as I can get it, it will probably be included in the next UOX3 release.
If you want to try it out right now, download this RAR file (use WinRar/WinAce to unpack), which you then unzip to your UOX3/JS folder (Make sure that banker.js ends up in npc/ai/ and bankcheck.js in item/).
Then add these two lines to jse_fileassociations.scp at the apropriate places:
3201=npc/ai/banker.js
and
5014=item/bankcheck.js
Next, edit the Banker-NPCs in dfndata/npc/malevendors.dfn and dfndata/npc/femalevendors.dfn, and replace their NPCAI=8 line with one saying SCRIPT=3201 instead.
Note that these changes will only affect any NEW banker-NPCs added to your world, so if you add these manually or through itembased-spawners, you need to respawn them. If you use regional spawns, new banker-NPCs with those changes will automatically be spawned on the next server startup.
Creating checks should be the same as on the official UO servers, say CHECK <amount> to any banker who has the above mentioned banker-ai-script attached.
-= Ho Eyo He Hum =-
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
WinRAR: http://www.rarlab.com/download.htm
WinAce: http://www.winace.com/
(Note that WinAce can handle both .ace, .zip, .rar and many other files)
I didn't include what you mentioned in my script, no. I'm not sure how I could accomplish that.
WinAce: http://www.winace.com/
(Note that WinAce can handle both .ace, .zip, .rar and many other files)
I didn't include what you mentioned in my script, no. I'm not sure how I could accomplish that.
-= Ho Eyo He Hum =-
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
That would be possible. If you through your quest script add a new check to the player's backpack similar to the following method, the check will work exactly like the checks made by the banker NPC.
Code: Select all
var checkSize = 1000;
var newCheck = CreateDFNItem( playerChar.socket, playerChar, "0x14F0", 1, "ITEM", true );
if( newcheck )
{
newCheck.SetTag( "CheckSize", checkSize );
newCheck.name = "A bank check";
newCheck.colour = 0x34;
newCheck.scripttrigger = 5014;
newCheck.isNewbie = true;
newCheck.weight = 100;
}-= Ho Eyo He Hum =-
- Jediman
- UOX3 Apprentice
- Posts: 177
- Joined: Fri Jul 16, 2004 1:38 am
- Location: New England
- Has thanked: 0
- Been thanked: 0
- Contact:
For some reason, this script doesn't seem to be working...well the actual double clicking on the bank check once created doesn't do anything..5014 seems to never trigger for some odd ball reason.
I'm using V0.98-37.q .
I've even double checked the JS for the banker by forceably setting the trigger script of the bank check to 5014 but still no go.
Setting the trigger to 5014 manually on the bank check item itself also yeilds nothing..any ideas?
I'm using V0.98-37.q .
I've even double checked the JS for the banker by forceably setting the trigger script of the bank check to 5014 but still no go.
Setting the trigger to 5014 manually on the bank check item itself also yeilds nothing..any ideas?
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
bankcheck-js uses
which is no longer supported, as it has been replaced by onUseChecked (performs hardcoded checks for range, line of sight, dead-check, etc) and onUseUnchecked (no hardcoded checks).
Try replacing the onUse line with
Code: Select all
function onUse( pUser, iUsed )Try replacing the onUse line with
Code: Select all
function onUseChecked( pUser, iUsed )-= Ho Eyo He Hum =-