Event Examples

Store
Even though a store system is already featured in RPGx, various events are included so you can manually create your own store system. An example is shown below - it will check for a certain amount of gold coins (5) a player is carrying, and if that player has enough coins to purchase a certain item (such as a bow), it will remove that specific stack of coins and give the player that item.

onActivate -> RPGx_ifHasStack -> [Player] [Gold Coin]  [5]

onRPGxHasStackPass -> RPGx_RmvStack -> [Player]  [Gold Coin]  [5]

onRPGxHasStackPass -> RPGx_AddStack -> [Player]  [BowItem]  [1]

onRPGxHasStackFail -> MessageClient -> "You need 5 coins to purchase this item."