Purpose
- Special monsters give coins (WCoin, Goblin Point or Ruud) to the killer, with a random chance and amount. Each row can be limited to one map.
- Optional: every monster has a small chance to give Ruud / WCoin; stronger monsters give more often (chance = monster level /
AllChance). - Optional: Zen from experience instead of dropped Zen (each EXP point gives
ZenRate / 1000Zen).
How to enable
- Remove the
--in front ofLoadModule("ShopPointRate\\ShopPointRate")inMain.lua. - Edit
Includes\ShopPointRate\Config.lua. - Click Reload LuaAPI.
No SQL needed. The module attaches OnMonsterDie, and OnPlayerGiveExp when ZenEnable = true. EXP is accumulated every loop, so ZenEnable is very light.
Configuration (Config.lua, ShopPointRateConfig table)
| Key | Value | Default | Meaning |
|---|---|---|---|
Enable | true / false | true | Turns the module on / off. |
AllEnable | true / false | false | Enables the reward for every monster. |
AllChance | number | 6000 | Chance = monster level / AllChance. |
AllRuudMin, AllRuudMax | number | 1, 2 | Range of Ruud received. |
AllWCoin | number | 0 | Amount of WCoin received. |
ZenEnable | true / false | false | Enables Zen from EXP. You should turn off the server's Zen drop when using it. |
ZenRate | number | 50 | Each EXP point gives ZenRate / 1000 Zen. |
Monsters | table | several sample rows | Each row: Class (monster number in Data\Monster\MonsterList.xml), Coin (COIN_WCOIN / COIN_GOBLIN_POINT / COIN_RUUD), Chance (out of 1000), Min, Max, Map (-1 = all maps), Name (name shown to the player). |
Text | table | (built in) | Reward, All: the notice messages. |
ShopPointRateConfig.Monsters = {
{ Class = 647, Coin = COIN_RUUD, Chance = 1000, Min = 10, Max = 30, Map = -1, Name = "Green Snake" },
}
A monster can have several rows (for example both Ruud and Goblin Point); each row is evaluated independently.