SphereCommunity
RESTESTing too much money? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: RESTESTing too much money? (/Thread-RESTESTing-too-much-money)



RESTESTing too much money? - pinku - 09-24-2013 06:04 PM

Hey everyone! Smile

Code:
ONBUTTON=1
IF (<SRC.RESTEST <TAG.itemvalue> i_gold>)
SRC.NEWITEM = <TAG.item>
SRC.ACT.BOUNCE
SRC.CONSUME <TAG.itemvalue>
...
...
ELSE
SRC.SYSMESSAGE You don't have enough gold.
ENDIF

TAG.itemvalue is always 5 million or more, it's random.
Problem is, I have 16 million on my bag and I still get "You don't have enough gold."

Am I RESTESTing for too much money?
What is the possible solution for this?

Thanks everyone!


RE: RESTESTing too much money? - XuN - 09-24-2013 06:24 PM

You are using <tag.ItemValue> on a Dialog, wich is supposed that it was called from item: findid.i_item_with_tags.dialog d_your_dialog in wich Def is the item and src is yourself.

Maybe you can call the dialog on yourself and then search for that item with <tag.itemvalue> to retrieve that information.

If you show us how you call it we can help you more.


RE: RESTESTing too much money? - pinku - 09-24-2013 06:45 PM

Thanks for helping!

I call it through a speech.

Code:
ON=*buy*
DIALOG d_blabla

If I charge lower values, such as 5k or 50k, it works just fine.
The issue is with higher values only.. Tongue


RE: RESTESTing too much money? - Extreme - 09-24-2013 06:49 PM

PHP Code:
IF <SRC.GOLD> >= X
 BUY
ELSE
 
YOU DON'T HAVE MONEY.
ENDIF 



RE: RESTESTing too much money? - Mordaunt - 09-24-2013 08:55 PM

The search function is your friend: http://forum.spherecommunity.net/Thread-Getting-money-in-players-bank


RE: RESTESTing too much money? - XuN - 09-24-2013 09:07 PM

So try @Extreme's syntax ' if <src.gold>>=<tag.itemvalue>) ' (Note that this will search for gold in bank also)


RE: RESTESTing too much money? - pinku - 09-24-2013 11:59 PM

(09-24-2013 06:49 PM)Extreme Wrote:  
PHP Code:
IF <SRC.GOLD> >= X
 BUY
ELSE
 
YOU DON'T HAVE MONEY.
ENDIF 

Thanks!

(09-24-2013 08:55 PM)Mordaunt Wrote:  The search function is your friend: http://forum.spherecommunity.net/Thread-Getting-money-in-players-bank

I'm really sorry.
I should have searched, but I'm used to my stupid mistakes, thought it was me failing again. >:

(09-24-2013 09:07 PM)XuN Wrote:  So try @Extreme's syntax ' if <src.gold>>=<tag.itemvalue>) ' (Note that this will search for gold in bank also)

Thank you too! Really helpful!