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: #31
RE: Gold -> Bag -> Bank
It is a hard code issue. It is why I tried switching the Src with TrySrc. It is on a todo list to add another parameter to where it can go. Basically a bounce placement of your choice. Just thought that TrySrc might have been a cheap way to beat the system, since Sphere has a lot of ways to do things you shouldn't. Smile
(This post was last modified: 03-25-2016 04:16 PM by Khaos.)
03-25-2016 04:15 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: #32
RE: Gold -> Bag -> Bank
ON=@Timer

// display a message over the LINK object that can be seen by TOPOBJ (TOPOBJ is a reference to the top-most
// object that contains this object, for example the character that has the item equipped)
TRYSRC <TOPOBJ.UID> LINK.MESSAGE Hello There! // if you recall, the MESSAGE function only shows a message to SRC
RETURN 1


And another:


ON=@Timer

// place 5000 gold coins in LINK's backpack
SERV.NEWITEM i_gold
NEW.AMOUNT = 5000
TRYSRC <LINK.UID> NEW.BOUNCE // the BOUNCE function places an item into SRC's backpack
RETURN 1
04-17-2016 04:36 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: #33
RE: Gold -> Bag -> Bank
SERV.NEWITEM i_gold
NEW.AMOUNT = 5000
LINK.BOUNCE=<NEW> // you can make anyone to force an item to be bounced calling the bounce on that char and passing the item as arg.
04-17-2016 10:06 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: #34
RE: Gold -> Bag -> Bank
[Function AddGold]
Serv.NewItem=i_Bag,1,<Src.FindLayer.Layer_BankBox.UID>
TrySrc <New.UID> NewGold <ArgN>

How full without errors?

Or don't work compactly?
(This post was last modified: 04-18-2016 03:25 AM by Llirik.)
04-18-2016 02:59 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
roberpot
Moderator
****

Posts: 48
Likes Given: 4
Likes Received: 12 in 8 posts
Joined: Apr 2014
Reputation: 0



Post: #35
Gold -> Bag -> Bank
You can remove the if too.
(This post was last modified: 04-18-2016 03:51 AM by roberpot.)
04-18-2016 03:51 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: #36
RE: Gold -> Bag -> Bank
(03-02-2016 01:22 AM)Llirik Wrote:  [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

[FUNCTION f_add_gold]
serv.newitem i_bag, 1, <findlayer.29.uid>
local.newbag = <new.uid>
local.money = <argn>

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

serv.newitem i_gold, <local.money>, <local.newbag>
update

Yes, yes, yes! Smile
11-12-2016 09:04 PM
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)