Open Container - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Open Container (/Thread-Open-Container) |
Open Container - Avatar - 10-27-2013 09:36 PM 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.. ) 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 ) 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 ( Thanks in advance. RE: Open Container - Alaric - 10-27-2013 10:09 PM Code: trysrc <uid1> uid2.bank does it work? :-O or easier.. when you are src just say Code: uid.bank Edit: ouuu, bad bad function only shows whats in the bank but you cant manipulate with those items. You were right ) RE: Open Container - Avatar - 10-27-2013 10:46 PM 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. RE: Open Container - XuN - 10-27-2013 11:19 PM The correct way would be this: Code: [function asd] 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] 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. RE: Open Container - Avatar - 10-28-2013 04:35 AM 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. RE: Open Container - Staff_Stanic - 10-28-2013 12:36 PM 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] RE: Open Container - Mordaunt - 10-28-2013 08:07 PM 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. RE: Open Container - Staff_Stanic - 10-29-2013 12:39 AM (10-28-2013 08:07 PM)Mordaunt Wrote: Which would obviously result in any kind of bank organisation by the player to be lost.the organization would not be lost white the 'contp' RE: Open Container - Mordaunt - 10-29-2013 01:11 AM 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. RE: Open Container - Avatar - 10-29-2013 06:37 AM Nice ) Thank you. |