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
escribano
Journeyman
*

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

Dragon Shard

Post: #11
RE: [ITEM/FUNCTION] Account Gold Bank
Hummmm it's strange... i've never done this way, i've created a "handler" to change the type back to t_eq_bank_box after the container closes.

But it should be working... you have to remember that sphere sometimes changes the character list order (i don't understand why.. but sometimes the order is changed).

You can compare the UID from the desired player insted of the number of the character list... this way is a little more slow, but its more acccurate!

Code:
[FUNCTION open_bank_char]
// Receives an parameter with the desired character UID to open the bank box
// IE: src.open_bank_char <var.uid_of_char_that_bank_should_open>
var.chars <eval <account.chars>>
var.uid = <argv[0]>

for x 1 <var.chars>
    if (<var.uid> == <account.char.<eval <local.x>>.uid>)
        TRY UID.<account.char.<eval <local.x>>.uid>.findlayer.29.type = t_container
        TRY UID.<account.char.<eval <local.x>>.uid>.findlayer.29.open
        TRY UID.<account.char.<eval <local.x>>.uid>.findlayer.29.type = t_eq_bank_box
    endif
endfor

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
(This post was last modified: 09-08-2015 04:50 AM by escribano.)
09-08-2015 04:47 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: #12
RE: [ITEM/FUNCTION] Account Gold Bank
Not working. I don't think there is a way to do it tbh xD To totally access another character bank without moving the items temporary to another container.

Even with the TYPE of a container, another character would not be able to access it because it would be too far away.

And even by moving all items to another container, unless that container was the player bankbox or backpack (which would cause weight/space issues), it wouldn't work because the item would've to be near the player.

The only solution would be creating a static chest near city banks which could not be opened, but once double-clicked, would spawn the account character banks inside and open them for SRC. After X time the chests would return to each character bankbox.
(This post was last modified: 09-08-2015 05:00 AM by pointhz.)
09-08-2015 04:52 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: #13
RE: [ITEM/FUNCTION] Account Gold Bank
There is no limits to open a container if its been opened by an script (as long as i know and tryied).

You can do this too but i still don't think this is the best idea... i already had thousends of problems cuz of strange behaviors of sphere... i keep thinkg if this item transfer happens when sphere starts to save the world, if there is an resync or anything that could mess with the server processing could be a hudge problem.

I've allready sayed my opinion: share the entire bank, create an systen to players improve theirs banks to store more itens and this kind of stuff Smile

If is there something more i could help, feel free to ask!
See yah!

Other thing you can do is this:

1) Creates a dialog that shows all the charactes
2) When the character is choosen, change the layer 29 (bank box) type to t_container, change the attr to invis and move the box to the player bank (inside the bank)
3) Open the box and create a event to "restore" the bank after the player logout (this is the best way to restore the bank back, its a little hard to trigger when the container is closed, this way the bank will always back to the right character)

NOTE: You have to create some verifications to see if the box you want to open isn't already inside the bank of the player... if you won't do this there is a chance that some players "lost" theys boxes Tongue

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

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #14
RE: [ITEM/FUNCTION] Account Gold Bank
I had this done since some years ago, it should keep working...

Code:
[function f_banktransfer]
IF !(<findlayer.29.count>>0) && (<account.chars>>1)
    for 0 <eval <account.chars>-1>
        ref1=<account.char.<dlocal._for>.uid>
        ref2=<ref1.findlayer.29>
        if (<ref2.count>>0)
            findlayer.29.remove
            ref2.cont=<uid>
        endif
    endfor
endif

Just add f_banktransfer to a ON=@Login in a global event and you are done. This will move the entire bank to the character you are using now so everything will work 'as it should' in sphere's mind ... however if you already had some characters with banked items you'll have to create one 'installation' function to move the items of these characters to the bank of one of their account.

@Pointhz: I don't know in other emus or OSI, but in Sphere the last character used is always on top of the list (character.0).
09-09-2015 05:54 PM
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: #15
RE: [ITEM/FUNCTION] Account Gold Bank
Thanks Xun!

I've scripted a chest allowing a character to do what I originally wanted: Temporarily access another character bank without having to login that character.

Players double-click the scripted chest, pick which character bank they want to access through a custom dialog, and then all items from the chosen character bankbox are transferred to a new chest placed inside the scripted chest.

After 5 minutes, all items remaining in that new chest will be transferred back to its original container/owner (the other character bankbox).

The 5 minutes delay is merely to update the character bankbox. You are free to use the scripted chest as many times as you want.

Isn't perfect, but I think it will do and has no bugs.

If anyone wants it feel free to ask and I'll share.
(This post was last modified: 09-10-2015 05:26 AM by pointhz.)
09-10-2015 12:46 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes pointhz's post
dafty
Apprentice
*

Posts: 6
Likes Given: 6
Likes Received: 0 in 0 posts
Joined: Sep 2015
Reputation: 0



Post: #16
RE: [ITEM/FUNCTION] Account Gold Bank
if u can share so share please i want to test this one.
tank u
(This post was last modified: 09-11-2015 09:26 PM by dafty.)
09-11-2015 09:26 PM
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: #17
RE: [ITEM/FUNCTION] Account Gold Bank
Ok, will do in a new topic soon, so it can be better explained
09-11-2015 10:11 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes pointhz's post
Post Reply 


Forum Jump:


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