Page 1 of 1
Bank Checks?
Posted: Thu Sep 07, 2006 5:34 pm
by Natas
I was just curious if there is a script out there for bank checks. Or maybe I over looked it.
Thanks
-Natas-
Posted: Thu Sep 07, 2006 10:17 pm
by Xuri
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.
Posted: Thu Sep 07, 2006 10:32 pm
by Natas
Where can I get winrar or winace to unpack that file? And also in OSI they have it set up so that when you sell items to an npc or are collecting a reward that if your bag can't hold all the gold coins it puts a bank check for that amount in your bag. did you include that in your code?
Posted: Thu Sep 07, 2006 10:39 pm
by Xuri
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.

Posted: Thu Sep 07, 2006 10:44 pm
by Natas
Would I be able to just set it up where the quest npc just rewards a chr with a bank check as oppose to gold? That would be easyer wouldnt it?
Posted: Fri Sep 08, 2006 11:31 pm
by Xuri
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;
}
Posted: Mon Dec 29, 2008 4:25 am
by Jediman
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?
Posted: Mon Dec 29, 2008 6:18 pm
by Xuri
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 onUseChecked( pUser, iUsed )
Posted: Mon Dec 29, 2008 6:26 pm
by Xuri
Btw, I just went through the Script Vault and ninja-replaced all instances of "onUse" with "onUseChecked" in the scripts there.

Posted: Mon Dec 29, 2008 6:46 pm
by Jediman
Perfect!