Purpose

  1. 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.
  2. Optional: every monster has a small chance to give Ruud / WCoin; stronger monsters give more often (chance = monster level / AllChance).
  3. Optional: Zen from experience instead of dropped Zen (each EXP point gives ZenRate / 1000 Zen).

How to enable

  1. Remove the -- in front of LoadModule("ShopPointRate\\ShopPointRate") in Main.lua.
  2. Edit Includes\ShopPointRate\Config.lua.
  3. 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)

KeyValueDefaultMeaning
Enabletrue / falsetrueTurns the module on / off.
AllEnabletrue / falsefalseEnables the reward for every monster.
AllChancenumber6000Chance = monster level / AllChance.
AllRuudMin, AllRuudMaxnumber1, 2Range of Ruud received.
AllWCoinnumber0Amount of WCoin received.
ZenEnabletrue / falsefalseEnables Zen from EXP. You should turn off the server's Zen drop when using it.
ZenRatenumber50Each EXP point gives ZenRate / 1000 Zen.
Monsterstableseveral sample rowsEach 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).
Texttable(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.