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 no Feature() check for Offline Attack. The server owner enables it with Enable = 1 in Data\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" in Data\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):

  1. Offline Attack is enabled (Enable); if it is off, the command does nothing.
  2. The total level (normal + master + majestic) is not below MinLevel and not above MaxLevel (when non-zero).
  3. The map is not a map of the Plugin EventMap (there a red message "Offline Attack is not allowed in this map." is shown).
  4. The standing position is inside an allowed zone (OfflineAttackZone.xml).
  5. The number of characters hunting offline on the same machine has not reached Count; on the same IP it has not reached IPCount.
  6. MU Helper is running; no personal store is open; no interface or trade window is open.
  7. The map has the OfflineAttack flag in WorldTemplate.xml.

Common.ini - section [OfflineAttack]

KeyValueDefaultMeaning
Enable0 / 101 = the /offattack command works.
MinLevelnumber >= 00Minimum total level to start. 0 = no limit.
MaxLevelnumber >= 00Maximum total level. 0 = no limit.
Timeseconds0Maximum hunting time; when time runs out MU Helper stops and the character leaves. 0 = no limit.
Countnumber >= 00Number of characters allowed to hunt per machine (see Flag for how a machine is identified). 0 = no limit.
Flag0 / 1 / 20How a machine is identified for Count: 0 = MAC + disk serial number, 1 = MAC, 2 = disk serial number.
IPCountnumber >= 00Number of characters allowed to hunt per IP. 0 = no limit.
OnDisconnect0 / 101 = 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).
ZenLoot0 / 101 = pick up Zen during offline hunting even if the MU Helper setting is not enabled.
DetailAutoloot0 / 101 = use the MU Helper detailed pickup list during offline hunting.
BuffItem0 / 101 = MU Helper may use buff items (potions / scrolls) during offline hunting.
GoblinPointsGain0 / 101 = Goblin Points are still gained by play time during offline hunting.
MonsterAICheck0 / 101 = 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/>).

Currently the GameServer still loads this file but does not use it to allow / forbid maps or to limit levels. The comments in the file and in the source code both state clearly that 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.
AttributeValueDefaultMeaning
WorldIDmap number0Map ID. If declared twice, the later entry overrides the earlier one.
LevelMin, LevelMaxnumber0Loaded 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.

AttributeValueDefaultMeaning
WorldIDmap number0The map it applies to.
X1, Y1, X2, Y2cell coordinates0Corners of the rectangle (X1..X2, Y1..Y2). Maps are 255 x 255 in size.
Enable0 / 101 = 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 EventMap ID 35: "Offline Attack is not allowed in this map."

Reloading the configuration

  • The two XML files: admin command .reload config 18 (reloads OfflineAttackWorld.xml and OfflineAttackZone.xml, sends message ID 176), or restart the GameServer. Offline Attack is NOT part of the Reload plugin button.
  • The [OfflineAttack] section in Common.ini: the command .reload config (without a number) reloads the common configuration, or restart the GameServer. [TO VERIFY: confirm that the .reload config command without a number correctly reloads the [OfflineAttack] keys (the code calls LoadCommonSettings)]