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:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open Container
Author Message
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #1
Open Container
Hi guys,

I just wonder, whether it is possible to open bank container (Layer 29) of a character from another character.

For instance, a character in game, just type .listbanks. Actually, i made this part and also i can get other characters bank uid in same account. I just want to open bank container of characters in same account.

src.findlayer.29.open, opening the character bank box as far as i know.

i try to get the bank uid of another character in same account and tryied something like that ;

try <ref1> ref1.open. Seems ridiculous guess.. Smile)

ref1 is the uid of bank container of an another character in same account.

The purpose of doing this will be making players transfering their items to their characters from one to another like as i mentioned above.

If you guys have any idea regarding , help me to do so Smile) I'll glad..

The code i prepared for listing and getting uid is the following ;


[dialog d_char_list_bank]
230,130
PAGE 0

resizepic 0 0 9200 310 280
gumppictiled 10 10 290 260 2624


dtext 60 20 1153 <serv.name> Item Transfer Menu
dtext 25 50 1153 Which Character do you want to open bank box
for 0 <eval <account.chars>-1>
dtext 65 <eval (<dlocal._for>*30)+90> 025 <account.char.<dlocal._for>.name>
endfor
for 1 <eval <account.chars>>
button 30 <eval (<dlocal._for>*30)+60> 4020 4022 1 0 <dlocal._for>
endfor

[dialog d_char_list_bank button]
on=0
sysmessage @1153 You canceled transfering

on=1 5
if (<src.account.char.<eval <argn>-1>.uid> == <src.uid>)
src.sysmessage @1153 You cant transfer items to character as same as character you are online.
return 1
endif
try ctag.<src.account.name><eval <argn>-1> <src.account.char.<eval <argn>-1>.uid>
src.open <uid.<ctag.<account.name><eval <argn>-1>>.findlayer.29.uid> // if something works like that would be nice Sad(



Thanks in advance.
(This post was last modified: 10-27-2013 09:43 PM by Avatar.)
10-27-2013 09:36 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #2
RE: Open Container
Code:
trysrc <uid1> uid2.bank

uid1=the viewer
uid2=the one whos bank it is

does it work? :-O

or easier.. when you are src just say
Code:
uid.bank

uid=the one whos bank it is
src would be the viewer


Edit: ouuu, bad bad function only shows whats in the bank but you cant manipulate with those items. You were right )
(This post was last modified: 10-29-2013 09:44 AM by Alaric.)
10-27-2013 10:09 PM
Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #3
RE: Open Container
The suggestion you made would be working if we wanted to open another account bank account guess. Because it does not work and don't know why.
(This post was last modified: 10-27-2013 10:47 PM by Avatar.)
10-27-2013 10:46 PM
Visit this user's website 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: #4
RE: Open Container
The correct way would be this:

Code:
[function asd]
for 0 <eval <account.chars>-1>
    ref1=<account.char.<dlocal._for>.uid>
    uid.<ref1.findlayer.29>.open
endfor

But it won't work since you can't see the container as they are logged out.

You can tweak it to put their bank boxes in your backpack so you can open it:
Code:
[function asd]
for 0 <eval <account.chars>-1>
    ref1=<account.char.<dlocal._for>.uid>
    ref2=<ref1.findlayer.29>
    ref2.cont=<findlayer.21>
    ref2.open
    ref2.cont=<ref1>
endfor
But the problem now is that the bankboxes are again in their real cont, so you cannot pickup/drop items.

My suggestion is, if you are so interested in sharing banks: Use one bankbox for all characters in account, you can do it in @Login, check all your characters and remove bankbox if empty, and then the one that should not be empty must be placed in the logging character.
10-27-2013 11:19 PM
Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #5
RE: Open Container
Anyways, i just made a function to transfer items to another character bank box without seeing the bank box. It works right now with no problem. I can transfer the items like the following ;


targetf transfer_item

[function transfer_item]
ref1 = <argo.uid>
ref1.cont <uid.<ctag.<account.name><argn>>.findlayer.29.uid>

argn and ctag are coming from character list dialog.
(This post was last modified: 10-28-2013 04:36 AM by Avatar.)
10-28-2013 04:35 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Staff_Stanic
Journeyman
*

Posts: 96
Likes Given: 25
Likes Received: 14 in 8 posts
Joined: Nov 2012
Reputation: 1

Dimension Shard

Post: #6
RE: Open Container
You can do a function that fires when a player open his bank, or when login the shard, and transfer all items that are in the bank of another's chars of this account.
Exemple:
Code:
[FUNCTION bankItems]
REF1=<FINDLAYER.layer_bankbox>
FOR 0 <eval <ACCOUNT.CHARS>-1>
REF2=<ACCOUNT.CHAR.<dLOCAL._FOR>>
FORCONT <REF2.FINDLAYER.layer_bankbox>
  LOCAL.CONTP=<CONTP>
  CONT=<REF1>
  CONTP=<LOCAL.CONTP>
ENDFOR
ENDFOR
(This post was last modified: 10-28-2013 12:37 PM by Staff_Stanic.)
10-28-2013 12:36 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #7
RE: Open Container
Which would obviously result in any kind of bank organisation by the player to be lost.

I made the mistake of suggesting something like that for a similarly different problem once.

[Image: 2nis46r.jpg]
10-28-2013 08:07 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Staff_Stanic
Journeyman
*

Posts: 96
Likes Given: 25
Likes Received: 14 in 8 posts
Joined: Nov 2012
Reputation: 1

Dimension Shard

Post: #8
RE: Open Container
(10-28-2013 08:07 PM)Mordaunt Wrote:  Which would obviously result in any kind of bank organisation by the player to be lost.

I made the mistake of suggesting something like that for a similarly different problem once.
the organization would not be lost white the 'contp'
10-29-2013 12:39 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #9
RE: Open Container
Ahh ok well.

1. Pre-coffee post by me I didn't even see the contp

2. Now it's pointed out I confess I was unaware of it's existence even, so I'll chalk that up to learning something new today. Tongue

[Image: 2nis46r.jpg]
10-29-2013 01:11 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #10
RE: Open Container
Nice Smile) Thank you.
10-29-2013 06:37 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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