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

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

UO Forum

Post: #1
Gold -> Bag -> Bank
Who wan't me help to put gold in bag and bank. Sorry my English is not good:

[FUNCTION PAYPALL]
PayPallFunc <ARGS>

[FUNCTION PayPallFunc]
VAR.COUNTER=<EVAL <ARGS>>
IF (<VAR.COUNTER> > 65000)
serv.newitem i_gold, 65000, i_bag
new.cont <src.findlayer.29.uid>
VAR.COUNTER=(<VAR.COUNTER> - 65000)
PayPallFunc <VAR.COUNTER>
ELSE
serv.newitem i_gold, <ARGS>, i_bag
new.cont <src.findlayer.29.uid>
ENDIF
(This post was last modified: 08-15-2015 10:22 AM by Llirik.)
08-13-2015 06:16 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
evening
Journeyman
*

Posts: 138
Likes Given: 0
Likes Received: 14 in 9 posts
Joined: Apr 2012
Reputation: 1

Finally Land

Post: #2
RE: Gold -> Bag -> Bank
i don't know if you need is this?

[function paypallfunc]
var.counter=<eval <args>>
serv.newitem=i_bag
new.cont=<src.findlayer.29.uid>
local.baguid=<new>
if (<args> > 65000)
serv.newitem i_gold, 65000
new.cont <local.baguid>
var.counter=(<var.counter> - 65000)
paypallfunc <var.counter>
else
serv.newitem i_gold, <args>
new.cont <local.baguid>
endif

use
.paypallfunc 65000
(This post was last modified: 08-13-2015 07:12 PM by evening.)
08-13-2015 07:10 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Kanibal
Master
**

Posts: 255
Likes Given: 6
Likes Received: 30 in 28 posts
Joined: Jun 2012
Reputation: 0



Post: #3
RE: Gold -> Bag -> Bank
Code:
[FUNCTION f_add_gold]
serv.newitem i_bag, 1, <src.findlayer.29.uid>
var.newbag = <new.uid>

if (<argn1> > 65000)
  var.tmp=<argn1>/65000
    for i 1 <var.tmp>
      serv.newitem i_gold, 65000, <var.newbag>
    endfor
    serv.newitem i_gold, (<argn1>-(<var.tmp>*65000)), <var.newbag>
else
   serv.newitem i_gold, <argn1>, <var.newbag>
endif
src.update
use
.f_add_gold 1000000

Grandmaster Localhost Admin
(This post was last modified: 08-14-2015 01:36 AM by Kanibal.)
08-14-2015 01:26 AM
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: Gold -> Bag -> Bank
Or you can simply: GOLD += 5000, this will add 5000 gold to your bank. Note that you have to use += to add gold, using GOLD=5000 will remove all your gold and add 5000gp to your bank so be carefull about using = or +=. <gold> will also retrieve the total gold that you own.
08-14-2015 02:48 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #5
RE: Gold -> Bag -> Bank
you can use the internal function NEWGOLD <value> to create the gold on the bankbox

or if you want add the gold on other location (like backpack), you must use a new function like this
Code:
[FUNCTION PayPallFunc]
WHILE (<ARGS> > 0)
  SERV.NEWITEM i_gold
  IF (<ARGS> > <SERV.ItemsMaxAmount>)
    NEW.AMOUNT=<SERV.ItemsMaxAmount>
  ELSE
    NEW.AMOUNT=<ARGS>
  ENDIF
  NEW.CONT=<FINDLAYER.layer_backpack.UID>
  ARGS -= <NEW.AMOUNT>
ENDWHILE
08-14-2015 03:00 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
evening
Journeyman
*

Posts: 138
Likes Given: 0
Likes Received: 14 in 9 posts
Joined: Apr 2012
Reputation: 1

Finally Land

Post: #6
RE: Gold -> Bag -> Bank
(08-14-2015 01:26 AM)Kanibal Wrote:  
Code:
[FUNCTION f_add_gold]
serv.newitem i_bag, 1, <src.findlayer.29.uid>
var.newbag = <new.uid>

if (<argn1> > 65000)
  var.tmp=<argn1>/65000
    for i 1 <var.tmp>
      serv.newitem i_gold, 65000, <var.newbag>
    endfor
    serv.newitem i_gold, (<argn1>-(<var.tmp>*65000)), <var.newbag>
else
   serv.newitem i_gold, <argn1>, <var.newbag>
endif
src.update
use
.f_add_gold 1000000

such calculations are not accurate

your use .f_add_gold 251110
look it is a reference
[FUNCTION CreateGold]
IF (<ARGN>)
VAR.Created="<ARGN>"
WHILE (<VAR0.Created> > 0)
NEWITEM=i_gold
IF (<VAR0.Created> > 65535)
ACT.AMOUNT=65535
VAR.Created="<EVAL <VAR0.Created>+ -65535>"
ELSE
ACT.AMOUNT=<VAR0.Created>
VAR.Created=
ENDIF
ACT.CONT=<FINDLAYER.21.UID>
ENDWHILE
RETURN 1
ENDIF
RETURN 0
(This post was last modified: 08-14-2015 03:37 AM by evening.)
08-14-2015 03:36 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Kanibal
Master
**

Posts: 255
Likes Given: 6
Likes Received: 30 in 28 posts
Joined: Jun 2012
Reputation: 0



Post: #7
RE: Gold -> Bag -> Bank
(08-14-2015 03:36 AM)evening Wrote:  such calculations are not accurate
Lol

Grandmaster Localhost Admin
08-14-2015 04:31 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
evening
Journeyman
*

Posts: 138
Likes Given: 0
Likes Received: 14 in 9 posts
Joined: Apr 2012
Reputation: 1

Finally Land

Post: #8
RE: Gold -> Bag -> Bank
(08-14-2015 04:31 AM)Kanibal Wrote:  
(08-14-2015 03:36 AM)evening Wrote:  such calculations are not accurate
Lol
maybe after we test, provide an answer to the questioner will be better!
08-14-2015 05:15 AM
Visit this user's website 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: #9
RE: Gold -> Bag -> Bank
Thank you!
08-14-2015 09:09 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Kanibal
Master
**

Posts: 255
Likes Given: 6
Likes Received: 30 in 28 posts
Joined: Jun 2012
Reputation: 0



Post: #10
RE: Gold -> Bag -> Bank
(08-14-2015 05:15 AM)evening Wrote:  maybe after we test, provide an answer to the questioner will be better!
Ok Veryhappy
Code:
[FUNCTION f_add_gold]
serv.newitem i_bag, 1, <src.findlayer.29.uid>
var.newbag = <new.uid>
var.money = <argn>
  
if <var.money> > 65000
  while <var.money> > 65000
    serv.newitem i_gold, 65000, <var.newbag>
    var.money = <var.money> - 65000
  endwhile
  serv.newitem i_gold, <var.money>, <var.newbag>
else
  serv.newitem i_gold, <var.money>, <var.newbag>
endif
src.update

Grandmaster Localhost Admin
(This post was last modified: 08-18-2015 05:04 AM by Kanibal.)
08-18-2015 04:42 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: 3 Guest(s)