Raocoin.lua

Download Latest Version

The Raocoin library allows for dragon coins to be saved between levels, and used for shop systems.

Installation
Place the file raocoin.lua and the folder named raocoin into the LuaScriptsLib folder.

How to use
To enable the Raocoin library for a specific set of levels, add this line to lunaworld.lua: This will load the Raocoin API, and begin counting and storing dragon coins.

Creating a shop requires a little more Lua code. The example in the download uses the Triggers.lua library to activate shop items, but this is not necessary.

Example
This will create a new shop item, which will display its price when the player is within the box defined by the first 4 values. It will cost 3 dragon coins, save the purchase under the variable name "BonusContent" (which allows purchases to remain after the game is shut down), and will execute Lua code which triggers a SMBX event called "AccessContent" when bought.

Values
These are variables you can access

External Use Functions
These are functions you will need to use the library

Internal Use Functions
These are functions that the library uses to function, but are not necessary for the user