Hide and Seek event: at scheduled times, an NPC hides on a random map over several rounds, with hints broadcast over time. The first player to talk to the NPC during a round wins and receives that round's reward bag.
Requirements
PluginPlushas been purchased andData\Plugin\Plugin.inihasPluginPlus = 1(see PluginPlus).Enable="1"inData\Plugin\HideAndSeek.xml(the sample file hasEnable="0").- Runs only on normal sub-servers; it does not run on Event / Siege / ArkaWar servers. Each sub-server runs its own event independently.
- Only
<Map>tags whose map exists on that sub-server are used. - The reward bag (
ItemBagID) must be declared inData\Scripts\Item\ItemBagScript.lua(typeItemBag_Event). The sample file uses bags 677 / 678 / 679. - No separate client file is needed.
Event flow
- The server finds the nearest start time in the schedule (
<Start>, searching the next 400 days). Times follow the game server's clock. - 5 minutes before the start time: a server-wide announcement "starts in 5 minutes" (Lang 0).
- Round 1 starts: round announcement (Lang 1) and the map + time limit (Lang 2). The NPC appears on a random map / spot. From round 2, the NPC moves to a different map than the previous round (if more than one usable map exists).
- During the round: every 5 minutes remaining, the time is announced (Lang 4); the
<Hint>hints are sent in order ofIDonce the round has run forDisplayTimeminutes (sent verbatim, not through Lang). - The first person to talk to the NPC: the NPC says Lang 8, the whole server receives Lang 3, fireworks are launched (if
FireWorks="1") and the winner receives the round'sItemBagIDbag; the round ends. - Time runs out and nobody found it: announcement Lang 10, the round ends.
- After each round, if rounds remain: announcement Lang 11, wait
NextRoundTimeminutes, then go to the next round. AfterMaxRoundsrounds: announcement Lang 5, waitEndTimeminutes (the NPC is removed), then go back to looking for the next start time.
Others who talk to the NPC after someone has won: hear Lang 7 (with the winner's name); the winner talking again: Lang 9; if nobody has won (the round ended due to timeout): Lang 6.
Configuration
File: Data\Plugin\HideAndSeek.xml. Do not write comments inside tags. The & character in text must be written as &.
HideAndSeek tag
| Key | Value | Default | Meaning |
|---|---|---|---|
Enable | 0 / 1 | 0 | Disables / enables the event. |
FireWorks | 0 / 1 | 0 | Launch fireworks for the player who finds the NPC. |
MaxRounds | number | 0 | Maximum number of rounds. The number of declared <Round> tags must equal this value; if a round is not declared, the event stops when it reaches that round. |
Schedule tag
| Key | Value | Default | Meaning |
|---|---|---|---|
NextRoundTime | minutes | 0 | Break time between rounds. |
EndTime | minutes | 0 | Time after the last round before the event closes and the NPC is removed. |
Start tag (each tag is one start time)
| Key | Value | Default | Meaning |
|---|---|---|---|
Year | year, or -1 | -1 | Start year; -1 = no restriction. |
Month | 1-12, or -1 | -1 | Start month. |
Day | 1-31, or -1 | -1 | Day of the month. |
DayOfWeek | 1-7, or -1 | -1 | Day of the week: 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday, 7 = Saturday. |
Hour | 0-23, or -1 | -1 | Hour; -1 = every hour. |
Minute | 0-59, or -1 | -1 | Minute; -1 = every minute. |
Second | 0-59, or -1 | -1 | Second; -1 = second 0. |
Round tag (inside Rounds)
| Key | Value | Default | Meaning |
|---|---|---|---|
Number | number from 1 | 0 | Round sequence number. A value ≤ 0 is an error: the log writes Invalid Round Number and loading of the rest (including locations) stops. |
Time | minutes | 0 | Round duration. |
ItemBagID | bag ID | 0 | Item bag given to the winner (see Data\Scripts\Item\ItemBagScript.lua). |
Map, Spawn, Hint tags (inside Locations)
| Key | Value | Default | Meaning |
|---|---|---|---|
Map / Number | map number | 0 | Map containing the NPC hiding spots. |
Map / NPCType | NPC ID | 0 | NPC ID in Data\Monster\MonsterList.xml (must be an NPC, Type = 4). |
Spawn / StartX, StartY | coordinates | 0 | First corner of the NPC placement area. |
Spawn / EndX, EndY | coordinates | 0 | Last corner of the NPC placement area. This area is used like a monster spawn area (the NPC is placed at a cell chosen within the area). |
Spawn / Dir | -1 to 7 | 0 | Direction the NPC faces. Actual code behavior: values 0-7 are used as is, -1 or anything outside 0-7 = random. The direction table in the file's comments (0 center, 1 Southwest, 2 South, 3 Southeast, 4 East, 5 Northeast, 6 North, 7 Northwest, 8 West) is a description from the sample file; 8 is in practice treated as random. [TO VERIFY: the direction name corresponding to each number 0-7 in the client has not been cross-checked] |
Hint / ID | number from 0 | 0 | Hint ID, unique within each Spawn; hints are sent in ID order. |
Hint / Text | string | empty | Hint content, sent verbatim to the whole server. |
Hint / DisplayTime | minutes | 0 | The minute within the round (counted from the start of the round) at which the hint is shown. |
Configuration example
<HideAndSeek Enable="0" FireWorks="1" MaxRounds="3">
<Schedule NextRoundTime="1" EndTime="1">
<Start Year="-1" Month="-1" Day="-1" DayOfWeek="-1" Hour="10" Minute="0" Second="-1" />
<Start Year="-1" Month="-1" Day="-1" DayOfWeek="-1" Hour="14" Minute="0" Second="-1" />
</Schedule>
<Rounds>
<Round Number="1" Time="8" ItemBagID="677" />
<Round Number="2" Time="8" ItemBagID="678" />
<Round Number="3" Time="8" ItemBagID="679" />
</Rounds>
<Locations>
<Map Number="0" NPCType="258">
<Spawn StartX="7" StartY="47" EndX="7" EndY="47" Dir="-1">
<Hint ID="0" Text="H&S Hint: Becoming cold.." DisplayTime="3" />
<Hint ID="1" Text="H&S Hint: Starts snowing.." DisplayTime="6" />
</Spawn>
</Map>
</Locations>
</HideAndSeek>
The sample file also declares maps 1 (Noria) and 2 (Devias), with two hiding spots on each map.
Messages (Lang)
The HideAndSeek section in Data\Lang\*.xml:
| ID | Content (English) |
|---|---|
| 0 | Hide And Seek will start after %d minutes |
| 1 | Hide And Seek Round %d started! |
| 2 | Find a NPC in %s to get a reward! Time Limit: %d minutes |
| 3 | %s found hidden NPC and got reward! |
| 4 | Hide And Seek Round %d will end after %d minutes |
| 5 | Hide And Seek is over! |
| 6 | No one found me in a proper time! |
| 7 | You are too late, %s found me first! |
| 8 | You got me! This is your reward! |
| 9 | You already got your reward. |
| 10 | Round over - no one found hidden NPC |
| 11 | Next round will start after %d minutes |
Reloading the configuration
Click Reload plugin in the GameServer control panel: the hidden NPC is removed and the event restarts from looking for the next start time in the schedule (if it is in the middle of a round, that round is cancelled).