Overview
The player turns on MU Helper and then types the /offattack command. The character leaves the game on the client side, but the GameServer keeps the character hunting monsters automatically with MU Helper. The system consists of 2 XML files in Data\Plugin\OfflineAttack\ (map list and zone list) plus the keys in the [OfflineAttack] section of Data\Common.ini.
Requirements
- Not tied to any key in
Plugin.ini[Plugin]: the GameServer code has noFeature()check for Offline Attack. The server owner enables it withEnable = 1inData\Common.ini, section[OfflineAttack](when the key is missing, the default is off). - Player command
/offattack(Data\Commands\Commands.xml, ID 16, regular player permission). - The map must have the flag
OfflineAttack="1"inData\World\WorldTemplate.xml. - No separate client file is needed.
Conditions when typing /offattack
The GameServer checks the following in order; if any check fails, the request is refused (a dialog titled "Offline Attack" is shown):
- Offline Attack is enabled (
Enable); if it is off, the command does nothing. - The total level (normal + master + majestic) is not below
MinLeveland not aboveMaxLevel(when non-zero). - The map is not a map of the Plugin EventMap (there a red message "Offline Attack is not allowed in this map." is shown).
- The standing position is inside an allowed zone (
OfflineAttackZone.xml). - The number of characters hunting offline on the same machine has not reached
Count; on the same IP it has not reachedIPCount. - MU Helper is running; no personal store is open; no interface or trade window is open.
- The map has the
OfflineAttackflag inWorldTemplate.xml.
Common.ini - section [OfflineAttack]
| Key | Value | Default | Meaning |
|---|---|---|---|
Enable | 0 / 1 | 0 | 1 = the /offattack command works. |
MinLevel | number >= 0 | 0 | Minimum total level to start. 0 = no limit. |
MaxLevel | number >= 0 | 0 | Maximum total level. 0 = no limit. |
Time | seconds | 0 | Maximum hunting time; when time runs out MU Helper stops and the character leaves. 0 = no limit. |
Count | number >= 0 | 0 | Number of characters allowed to hunt per machine (see Flag for how a machine is identified). 0 = no limit. |
Flag | 0 / 1 / 2 | 0 | How a machine is identified for Count: 0 = MAC + disk serial number, 1 = MAC, 2 = disk serial number. |
IPCount | number >= 0 | 0 | Number of characters allowed to hunt per IP. 0 = no limit. |
OnDisconnect | 0 / 1 | 0 | 1 = a character that is running MU Helper and whose client loses connection automatically switches to offline hunting (not applied on EventMap maps: losing connection means leaving). |
ZenLoot | 0 / 1 | 0 | 1 = pick up Zen during offline hunting even if the MU Helper setting is not enabled. |
DetailAutoloot | 0 / 1 | 0 | 1 = use the MU Helper detailed pickup list during offline hunting. |
BuffItem | 0 / 1 | 0 | 1 = MU Helper may use buff items (potions / scrolls) during offline hunting. |
GoblinPointsGain | 0 / 1 | 0 | 1 = Goblin Points are still gained by play time during offline hunting. |
MonsterAICheck | 0 / 1 | 0 | 1 = during offline hunting, skip monsters with special AI (event monsters, guards). |
The defaults in the table are the values used when the key is missing from Common.ini (according to the GameServer default table). The sample file currently sets Enable = 1, ZenLoot = 1, DetailAutoloot = 1, BuffItem = 1.
[OfflineAttack]
Enable = 1
MinLevel = 0
MaxLevel = 0
Time = 0
Count = 0
Flag = 0
IPCount = 0
OnDisconnect = 0
ZenLoot = 1
DetailAutoloot = 1
BuffItem = 1
GoblinPointsGain = 0
MonsterAICheck = 0
OfflineAttackWorld.xml
This file lists maps with the attributes WorldID, LevelMin, LevelMax (read through <OfflineWorld><World/>).
LevelMin / LevelMax no longer have any effect (there is no per-map level limit, so weak characters can still hunt on low-level maps). Which maps allow hunting is decided by the flag OfflineAttack="1" in Data\World\WorldTemplate.xml; Plugin EventMap maps are always forbidden. To limit levels, use MinLevel / MaxLevel in Common.ini.| Attribute | Value | Default | Meaning |
|---|---|---|---|
WorldID | map number | 0 | Map ID. If declared twice, the later entry overrides the earlier one. |
LevelMin, LevelMax | number | 0 | Loaded but no longer used. |
<OfflineWorld>
<World WorldID="0" LevelMin="1" LevelMax="1700" />
<World WorldID="1" LevelMin="1" LevelMax="1700" />
</OfflineWorld>
OfflineAttackZone.xml
Limits the area (rectangle) where hunting is allowed in each map.
| Attribute | Value | Default | Meaning |
|---|---|---|---|
WorldID | map number | 0 | The map it applies to. |
X1, Y1, X2, Y2 | cell coordinates | 0 | Corners of the rectangle (X1..X2, Y1..Y2). Maps are 255 x 255 in size. |
Enable | 0 / 1 | 0 | 1 = hunting is allowed in this zone; 0 = hunting is forbidden in this zone. |
Check rule (according to the source code): the rows of the map are scanned in file order; the first row that contains the character's position decides the result (the Enable of that row). If the position is not inside any row: it is allowed when the map has NO row enabled (Enable="1"), and forbidden when the map has at least one enabled row. A map with no rows in the file is allowed in its entirety. The same check also applies to a character that is hunting offline when it is moved to another position (both the departure point and the destination are checked).
<OfflineZone>
<Zone WorldID="0" X1="1" Y1="1" X2="255" Y2="255" Enable="1" />
</OfflineZone>
Messages (Lang)
In Data\Lang, group Type="2":
- ID 130 "Offline Attack" (dialog title), 131 "Min level required %d.", 132 "Max level allowed %d.", 133 "You are not allowed to use on this zone.", 134 "You have exceeded the maximum count.", 135 "Helper must be active.", 136 "Close Personal Store before start.", 137 "Close Interface before start.", 138 "Not allowed to use on this map."
- ID 176 "Offline Attack World/Zone reloaded." (message after reloading).
- Group
EventMapID 35: "Offline Attack is not allowed in this map."
Reloading the configuration
- The two XML files: admin command
.reload config 18(reloadsOfflineAttackWorld.xmlandOfflineAttackZone.xml, sends message ID 176), or restart the GameServer. Offline Attack is NOT part of the Reload plugin button. - The
[OfflineAttack]section inCommon.ini: the command.reload config(without a number) reloads the common configuration, or restart the GameServer. [TO VERIFY: confirm that the.reload configcommand without a number correctly reloads the [OfflineAttack] keys (the code calls LoadCommonSettings)]