Purpose
A scheduled event. When it starts, players talk to the quest NPC to try to receive a random monster-kill quest (for example "kill Hound x 5 in 60 minutes"). Completing it on time earns WCoin, Goblin Point and Ruud, sometimes multiplied.
- Claim phase (
GrabMinutes): players talk to the NPC. Each attempt succeeds with a probability ofSuccessRate% (higher if wearing the bonus item). In total, at mostMaxQuestsquests can be taken. - A player who fails can use a scroll to try one more time.
- Players who have received a quest have
QuestMinutesminutes to complete it. Each player (per account) can take part only once per event. - Talk to the NPC again to see progress.
How to enable
- Remove the
--in front ofLoadModule("RandomQuestSystem\\RandomQuestSystem")inMain.lua. - Edit
Includes\RandomQuestSystem\Config.lua. - Click Reload LuaAPI.
No SQL needed. The module attaches OnReadScript, OnTimerThread, OnNpcTalk, OnMonsterDie, OnCharacterEntry.
The event state is kept only in memory: restarting the GameServer or reloading LuaAPI while the event is running ends the event. The NPC is created only if its map runs on this GameServer. Only the player who kills the monster is credited with the kill.
Configuration (Config.lua, RandomQuestConfig table)
| Key | Meaning |
|---|---|
Enable | Turns the module on / off. |
Npc | Quest NPC: Class, Name, Map, X, Y, Dir. |
NpcTalkInterval | Seconds between two lines the NPC says on its own during the event. |
MultiRewardChance | Probability (%) of receiving a multiplied reward. |
Multipliers | The multipliers that can be rolled (for example 1.1, 1.2, 2, 3). |
BonusItem | Enable, Item = { group, index }, Slot (equipment slot), Bonus: wearing this item in slot Slot adds Bonus % to the chance of receiving a quest. Slots: 0 right hand, 1 left hand, 2 helm, 3 armor, 4 pants, 5 gloves, 6 boots, 7 wings, 8 pet, 9 pendant, 10 right ring, 11 left ring. |
Scroll | Enable, Item = { group, index }: the scroll used to try one more time. |
Schedule | Schedule: each row has Days (0 = Sunday ... 6 = Saturday), Hour, Minute, GrabMinutes, QuestMinutes, List (quest list used), SuccessRate, MaxQuests. |
Quests | Each row: List, MinLevel, MaxLevel (by total level: normal + master + majestic), Weight (the higher, the more often it is picked), Monster (monster number), Name (displayed name), Kills (number of monsters), Reward = { WCoin, GoblinPoint, Ruud }. |
Text | The notice messages. |
RandomQuestConfig.Schedule = {
{ Days = { 1, 2 }, Hour = 9, Minute = 30, GrabMinutes = 30, QuestMinutes = 60, List = 1, SuccessRate = 50, MaxQuests = 50 },
}
RandomQuestConfig.Quests = {
{ List = 1, MinLevel = 100, MaxLevel = 1000, Weight = 30, Monster = 1, Name = "Hound", Kills = 5,
Reward = { WCoin = 100, GoblinPoint = 50, Ruud = 20 } },
}