The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ITEM/FUNCTION] Account Gold Bank
Author Message
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #1
[ITEM/FUNCTION] Account Gold Bank
Hello everyone,

This script is about an Account Gold Bank and its primary goal is allowing players to transfer gold between their account characters without having to log off.

Adding a "i_account_gold_bank" will spawn the chest seen in the picture below. Double-clicking in it will display the Account Gold Bank Menu.

This is not scripted as an item for any special reason besides me not wanting players to access it everywhere in the world. You are free to force the menu to be opened through the function "accountgoldbank" by adding it to an NPC or just through a command. It's up to you, it should work exactly the same.

[Image: image.jpg]

So, as you can see in the above picture, the menu has a few options and information.

It tells you the total amount of gold you have in your account (in ALL your characters) and to which character belongs the Gold Bank you are currently checking.

Besides the total amount of gold you have in your account, it also shows you, inside the Chest picture, the amount of gold the character you are checking has.

As for the above picture, I have 41.986 total gold pieces spread in all my account characters, the current bank I'm checking is from the character "Char Two" and that character has 21.986 gold pieces.

Typing the amount of gold you want to "Transfer to" or "Transfer From" in the white box inside the Chest picture and then clicking in the respective blue button will either transfer gold from the character you are currently playing with to the character you've selected or the other way around.

Additionally to the explained above, if instead of clicking in one of the blue buttons to "Transfer to" or "Transfer from" the amount of gold you typed, you click in the "New Cheque" button, you will be given a cheque of the gold amount you typed and the gold amount will be removed from the character you are currently checking.

For example, I'm with Char 1 and go to Char 2 "bank" and create a 500k cheque. Char 1 will be given the 500k worth cheque and the 500k gold will be removed from Char 2.

Clicking "Cash Cheque" and targetting the desired cheque will remove the cheque and add the gold to the character you are currently checking.

For example, I'm with Char 1 and go to Char 2 "bank" and cash a 500k cheque. Cheque will be removed from Char 1 and Char 2 will be given the 500k gold pieces.

You can cash cheques directly into the character you are currently logged in with too.

The cheque script is included too.

Gold will always be created at the character's bankbox, but it doesn't need to be in there in order to be removed (Because I'm using the GOLD function. This may also cause gold to be a mess at your bankbox).

Think I'm not forgetting anything. Any question just ask.


Attached File(s)
.scp  p_acc_gold_bank.scp (Size: 21.34 KB / Downloads: 20)
(This post was last modified: 09-04-2015 02:34 AM by pointhz.)
09-04-2015 02:32 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 4 users Like pointhz's post
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: [ITEM/FUNCTION] Account Gold Bank
Nice. I had made something similar, but to share items between chars on the same account.
It basically is a shared container which can be accessed by any char, just dclick on it.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-04-2015 03:13 AM
Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #3
RE: [ITEM/FUNCTION] Account Gold Bank
I really dont understood why to create this...

If You want to "share" the gold between the chars of the account.. Why dont share the complete bank between the chars??

I've made it for my shard, the entire script have 22 lines (including the [EOF]) and it is one of the most easy scripts to be done i ever made....

You really need to make this check system?

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
09-06-2015 07:23 AM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #4
RE: [ITEM/FUNCTION] Account Gold Bank
Share your script then, if you havent yet mate Tongue

Probably it is as easy as you say and I dont know about it.

Btw,I guess EOF isnt needed anymore.
09-06-2015 03:28 PM
Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #5
RE: [ITEM/FUNCTION] Account Gold Bank
For several reasons, i'll never share a private script from my shard... in other words: i am here to help people do their job, not to do it... i hate script copiers!

I can guide you trough the steps to make the script if you want, so if you want my help your script should be something like this:

1) An function that will be triggered on every login
2) In this function, store the actual BANK-UID (uid from layer 29) an "variable" outside the loop (section 3)
3) Make a loop through all characters on the account
4) Send each item in each bank box to the BANK-ID stored before the loop (you can save the item position in this way the bank will be organized)

Too easy no?

Note: I know about the [EOF], but as sphere have some issues with backward compatibility... i prefer still use Smile

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
(This post was last modified: 09-08-2015 03:03 AM by escribano.)
09-08-2015 03:00 AM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #6
RE: [ITEM/FUNCTION] Account Gold Bank
That's well thought and easy indeed, but what I was aiming to achieve in here was allowing a character to access another character bank to transfer gold to and from without having to logout/login several times, and not have all characters sharing the same bank account xD The container is too small imo to be used by several chars.
09-08-2015 03:22 AM
Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #7
RE: [ITEM/FUNCTION] Account Gold Bank
hummmm, why don't you tell before?? Big Grin

You can do an dialog, that could be opened after the client says "bank". This dialog will show all the characters of the account and let the player "open" any bank container using an button.

Your script shold be something like this:
Code:
[DIALOG d_bank_list]
...
...
...
FOR x 1 <eval <account.chars>>
BUTTON .... <local.x> // The button ID shoud be the account counter
DTEXT .....
ENDFOR

[DIALOG d_bank_list BUTTON]
ON=1 5 // From char 1 to 5
var.account = <argn> // This is the Button clicked
TRY UID.<account.char.<eval <var.account>>.uid>.findlayer.29.open
return 1


Smile

Note: you can change the bank size... also you can do some script to let the player "improve" its bank box, leting the player store more itens inside the bank.

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
(This post was last modified: 09-08-2015 03:37 AM by escribano.)
09-08-2015 03:35 AM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #8
RE: [ITEM/FUNCTION] Account Gold Bank
I had tried that already TRY UID.<account.char.<eval <var.account>>.uid>.findlayer.29.open but it doesn't work Sad It says "he has X stones in his bankbox" but the bank box doesnt show up.

I can always force all items from a character bank to be transferred temporarily to a container and then send them back when they are no longer in use. Guess ill go that path. Is there any trigger to check when a chest is closed?
(This post was last modified: 09-08-2015 03:51 AM by pointhz.)
09-08-2015 03:46 AM
Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #9
RE: [ITEM/FUNCTION] Account Gold Bank
Woops.. my fault! I forgot to tell: you have to change the container type to t_container before open and back to t_eq_bank_box after close.

Thats why i decided to share the entire bank box with all chars from the same account.. it's easier, faster and more elegant then create thousends of lines to create pretty dialogs!

i've done the same with the runebook Smile

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
(This post was last modified: 09-08-2015 03:50 AM by escribano.)
09-08-2015 03:48 AM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #10
RE: [ITEM/FUNCTION] Account Gold Bank
[FUNCTION test]
TRY UID.<SRC.ACCOUNT.CHAR.0.UID>.FINDLAYER.layer_bankbox.TYPE=t_container
TRY UID.<SRC.ACCOUNT.CHAR.0.UID>.FINDLAYER.layer_bankbox.open
TRY UID.<SRC.ACCOUNT.CHAR.0.UID>.FINDLAYER.layer_bankbox.type=t_eq_bank_box

Sorry for all the trouble, but shouldn't this work? If I use this in Char 0 it works, coz the bank belongs to that char, but on others chars it doesnt open
09-08-2015 04:37 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)