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
Gold -> Bag -> Bank
Author Message
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #21
RE: Gold -> Bag -> Bank
The else is needed. It actually is parsing if the first line is more than 65000. Where as the else gets called if it is less than or equal. Thanks for reminding me about this thought Pointz!!! Need to try and play with forcing NewGold to bounce that gold in a bag in his bank box. Big Grin
03-02-2016 12:07 AM
Find all posts by this user Like Post Quote this message in a reply
Llirik
Journeyman
*

Posts: 116
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #22
RE: Gold -> Bag -> Bank
[FUNCTION f_add_gold]
serv.newitem i_bag, 1, <findlayer.29.uid>
local.newbag = <new.uid>
local.money = <argn>

if <local.money> > 65000
while <local.money> > 65000
serv.newitem i_gold, 65000, <local.newbag>
local.money -= 65000
endwhile
endif
serv.newitem i_gold, <local.money>, <local.newbag>
update

Work well! I take it! Smile
03-02-2016 01:22 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Llirik's post
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #23
RE: Gold -> Bag -> Bank
Awesome. Smile If I simplify it more, I will let you know. Remember, try to avoid var on the 56 servers unless you want it globally saved. Smile
03-02-2016 04:15 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: #24
RE: Gold -> Bag -> Bank
What else does the function need to do ? Isnt it just add the gold to a bag inside bankbox?
03-02-2016 04:36 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #25
RE: Gold -> Bag -> Bank
Yes, but I am trying to get it to call NewGold from the bag so it parses less internally. Serv.NewItem calls for item, amount, and cont/equip. NewGold just parses amount and drops it into <Src>. So if you can switch to be called from the Bag itself, it is less memory consuming.

Optimization for memory is always key.
03-02-2016 07:10 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #26
RE: Gold -> Bag -> Bank
Llirik sweetie. Test this. Think I just did what you wanted in three lines of code.
Code:
[Function AddGold]
Serv.NewItem=i_Bag,1,<Src.FindLayer.Layer_BankBox.UID>
TrySrc <New.UID> NewGold <ArgN>
(This post was last modified: 03-18-2016 07:53 PM by Khaos.)
03-18-2016 07:53 PM
Find all posts by this user Like Post Quote this message in a reply
Llirik
Journeyman
*

Posts: 116
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #27
RE: Gold -> Bag -> Bank
12:34:ERROR:(stone_money.scp,60)Can't trysrc NewGold 1000 object Kirill (01bb10): invalid src uid 040019672

Sad
03-19-2016 07:35 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #28
RE: Gold -> Bag -> Bank
Awww let me see what is going on! Thanks for testing it for me though!! Smile
03-20-2016 05:11 AM
Find all posts by this user Like Post Quote this message in a reply
Llirik
Journeyman
*

Posts: 116
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #29
RE: Gold -> Bag -> Bank
I'm not understand! You need get my TeamViewer?
(This post was last modified: 03-20-2016 07:43 PM by Llirik.)
03-20-2016 07:42 PM
Visit this user's website 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: #30
RE: Gold -> Bag -> Bank
that newgold is most likely hard coded to check if the src is a character, or has a backpack, or something.

Not that I understand anything about what is hard coded or not, but I can't think of anything for that function to work on character but not on items
03-23-2016 08:53 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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