Alright, Variables are the events that are needed for making an RPG. I would recommend V.6 but I'm not so good at it. So i will show you people who had trouble with V.4 Variables. Alright, today we are gonna use the variables Gold, Wood and Copper ore.
Now, this
may require the RPG items if you want it to be a good RPG.
OnAxeHit -> Self -> IfRandomDice -> 30 [GreaterThan] 30
VariableFalse -> Client -> BottomPrint -> (You swing your Axe at the Tree . . .)
VariableTrue -> Player -> AddVariable -> Player -> [Wood] [1]
Now, the AddVariable part is easy. The first box will be the Variable, the second box tells the amount of how many you want to grant the player.
OnAxeHit -> Self -> IfRandomDice -> 30 [GreaterThan] 30
VariableFalse -> Client -> BottomPrint -> (You swing your Axe at the Tree . . .)
VariableTrue -> Player -> AddVariable -> Player -> [Wood] [1]
VariableTrue -> Client -> DisplayVariable -> CenterPrint -> [Wood]
Now, if you want EXP you will need to do this with the variable.
OnAxeHit -> Self -> IfRandomDice -> 30 [GreaterThan] 30
VariableFalse -> Client -> BottomPrint -> (You swing your Axe at the Tree . . .)
VariableTrue -> Player -> AddVariable -> Player -> [Wood] [1]
VariableTrue -> Client -> DisplayVariable -> CenterPrint -> [Wood]
VariableTrue -> Player -> AddVariable -> [Woodcutting EXP] [3]
VariableTrue -> Client -> DisplayVariable -> ChatMessage -> [Woodcutting EXP]
You can change this to Ore also if you plan on doing it. You must change it like this:
OnPickAxeHit -> Self -> IfRandomDice -> 30 [GreaterThan] 30
VariableFalse -> Client -> BottomPrint -> (You swing your PickaxeAxe at the Rock . . .)
VariableTrue -> Player -> AddVariable -> Player -> [Copper ore] [1]
VariableTrue -> Client -> DisplayVariable -> CenterPrint -> [Copper ore]
VariableTrue -> Player -> AddVariable -> [Mining EXP] [3]
VariableTrue -> Client -> DisplayVariable -> ChatMessage -> [Mining EXP EXP]
You may have a problem with the selling process.
OnActivate -> Client -> Prompt -> [Sell 1 Wood for 3 Gold?]
OnActivate -> Self -> IfVariable -> [Wood] -GreaterEquals- [1]
VariableFalse -> Client -> Prompt -> [You don't have any Wood.]
VariableFalse -> Client -> DisplayVariable -> [Wood]
VariableTrue -> Player -> AddVariable -> [Wood] [-1]
VariableTrue -> Player -> AddVariable -> [Gold] [3]
VariableTrue -> Client -> DisplayVariable -> CenterPrint -> [Gold]
VariableTrue -> Client -> DisplayVariable -> BottomPrint -> [Wood]
Hoped this help if your new. You may ask questions about Variables.
Download them here:
http://forum.blockland.us/index.php?topic=43084.0