Author Topic: VCE Money help  (Read 911 times)

Can someone please tell me how to make a event so that if you have ____ wood, you get ____ money? For example I am making an RPG where you chop down trees for lumber. How do I make it so you get 1 credit for each lumber?

[0] [OnActivate]>[Self]>[VCEifValue] > [var:cl:wood] [>=] [1] > [1 2]
[1] [OnVariableTrue]>[self]>[VCEmodVar]>[client] [wood] [subtract] [1]
[2] [OnVariableTrue]>[self]>[VCEmodVar>[client] [monies] [add] [1]
[3] [OnVariableTrue]>[self]>[VCEifValue] > [var:cl:wood] [>=] [1] > [1 2]
[4] [OnVariableFalse]>[client]>[CentrePrint]>[All your wood is now magically money!]

I think that should work.

[0] [OnActivate]>[Self]>[VCEifValue] > [var:cl:wood] [>=] [1] > [1 4]
[1] [OnVariableTrue]>[self]>[VCEmodVar]>[client] [wood] [subtract] [1]
[2] [OnVariableTrue]>[self]>[VCEmodVar>[client] [monies] [add] [1]
[3] [OnVariableTrue]>[self]>[VCEifValue] > [var:cl:wood] [>=] [1] > [1 4]
[4] [OnVariableFalse]>[client]>[CentrePrint]>[All your wood is now magically money!]

I think that should work.

Wait wait, change the subsystem boxes to this - That first one wont work
[1 2] becomes [1 4]

Better yet, why not let the user define the amount he wants to trade by chatting it?

1: onActivate > Client > CenterPrint > <color:ffffff>Please chat the amount you wish to trade.<br>Click me again once you have.
2: onActivate > Self > VCE_ifValue > <var:cl:wood> >= <var:cl:lastmsg> > 3 7
3: onVariableTrue > Client > VCE_modVariable > Wood > Subtract > <var:cl:lastmsg>
4: onVariableTrue > Client > VCE_modVariable > Cash > Add > <var:cl:lastmsg>
5: onVariableTrue > Client > ChatMessage > <color:009900>Cash: <color:ffffff><var:cl:cash>    [+<var:cl:lastmsg>]
6: onVariableTrue > Client > ChatMessage > <color:663300>Wood: <color:ffffff><var:cl:wood> [-<var:cl:lastmsg>]
7: onVariableFalse > Client > ChatMessage > <color:ff0000>Please specify a number less than <var:cl:wood>.

you might be able to check if it's numbers only, not sure how i would do that though

Wait wait, change the subsystem boxes to this - That first one wont work
[1 2] becomes [1 4]
Ok thanks.
is there a way to do it all @ once?

The way I said will do all the wood to gold. The way TheBlackParrot said will do user defined amount.