summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-12-05 23:08:06 +0300
committerAndrei Karas <akaras@inbox.ru>2018-12-05 23:08:06 +0300
commit28541315ec48d21204638203996c2049857fc3f8 (patch)
treeda99436fc55f89094c1e8f57606d2c4a7cf67e4e
parentc5e09cc4568d9f4ecf88e585da777c0d0f128bde (diff)
downloaddocs-28541315ec48d21204638203996c2049857fc3f8.tar.gz
docs-28541315ec48d21204638203996c2049857fc3f8.tar.bz2
docs-28541315ec48d21204638203996c2049857fc3f8.tar.xz
docs-28541315ec48d21204638203996c2049857fc3f8.zip
Update docs from hercules.
-rw-r--r--server/items/item_bonus.md436
-rw-r--r--server/items/item_bonus.txt444
-rw-r--r--server/monsters/mob_db_mode_list.md72
-rw-r--r--server/monsters/mob_db_mode_list.txt113
-rw-r--r--server/other/quest_variables.md262
-rw-r--r--server/other/quest_variables.txt108
-rw-r--r--server/scripts/script_commands.txt21
7 files changed, 785 insertions, 671 deletions
diff --git a/server/items/item_bonus.md b/server/items/item_bonus.md
new file mode 100644
index 0000000..b9fc17e
--- /dev/null
+++ b/server/items/item_bonus.md
@@ -0,0 +1,436 @@
+# Hercules Item Bonuses List
+
+<!--
+# Copyright
+> This file is part of Hercules.
+> http://herc.ws - http://github.com/HerculesWS/Hercules
+>
+> Copyright (C) 2012-2018 Hercules Dev Team
+> Copyright (C) Athena Dev Teams
+>
+> Hercules is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+>
+> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+> See the GNU General Public License for more details.
+>
+> You should have received a copy of the GNU General Public License along with this program.
+> If not, see <http://www.gnu.org/licenses/>.
+-->
+
+## Description
+List of script instructions used in item bonuses, mainly `bonus`/`bonus2`/`bonus3`/`bonus4`/`bonus5` arguments and etc.
+
+
+## Constants
+This table contains all available constants referenced in the `bonus` commands.
+
+Race (`r`) | Status effect (`eff`) | Element (`e`) | Monster Race (`mr`) | Size (`s`)
+:----------------- | :-------------------- | :------------- | :------------------ | :-----------
+RC_Formless | Eff_Stone | Ele_Neutral | RC2_Goblin | Size_Small
+RC_Undead | Eff_Freeze | Ele_Water | RC2_Kobold | Size_Medium
+RC_Brute | Eff_Stun | Ele_Earth | RC2_Orc | Size_Large
+RC_Plant | Eff_Sleep | Ele_Fire | RC2_Golem |
+RC_Insect | Eff_Poison | Ele_Wind | RC2_Guardian |
+RC_Fish | Eff_Curse | Ele_Poison | RC2_Ninja |
+RC_Demon | Eff_Silence | Ele_Holy | RC2_Scaraba |
+RC_DemiHuman | Eff_Confusion | Ele_Dark | RC2_Turtle |
+RC_Angel | Eff_Blind | Ele_Ghost | |
+RC_Dragon | Eff_Bleeding | Ele_Undead | |
+RC_Player | Eff_DPoison | Ele_All | |
+RC_Boss | Eff_Fear | | |
+RC_NonBoss | Eff_Cold | | |
+RC_NonDemiHuman | Eff_Burning | | |
+RC_NonPlayer | Eff_Deepsleep | | |
+RC_DemiPlayer | | | |
+RC_NonDemiPlayer | | | |
+RC_All | | | |
+
+
+### Trigger criteria (`bf`)
+ Type 1 | Description
+:----------------- | :------------------------------
+`BF_WEAPON` | Trigger on weapon skills
+`BF_MAGIC` | Trigger on magic skills
+`BF_MISC` | Trigger on misc skills
+
+(Default: `BF_WEAPON`)
+
+ Type 2 | Description
+:----------------- | :------------------------------
+`BF_SHORT` | Trigger on melee attacks
+`BF_LONG` | Trigger on ranged attacks
+
+(Default: `BF_SHORT`+`BF_LONG`)
+
+ Type 3 | Description
+:----------------- | :------------------------------
+`BF_NORMAL` | Trigger on normal attacks
+`BF_SKILL` | Trigger on skills
+
+(Default: `BF_SKILL` if type is `BF_MISC` or `BF_MAGIC`, `BF_NORMAL` if type is `BF_WEAPON`)
+
+
+### Attack Trigger Criteria (`abf`)
+ Type 1 | Description
+:----------------- | :------------------------------
+`ATF_SELF` | Trigger on self
+`ATF_TARGET` | Trigger on target
+
+(Default: `ATF_TARGET`)
+
+ Type 2 | Description
+:----------------- | :------------------------------
+`ATF_SHORT` | Trigger on melee attack
+`ATF_LONG` | Trigger on ranged attack
+
+(Default: `ATF_SHORT`+`ATF_LONG`)
+
+ Type 3 | Description
+:----------------- | :------------------------------
+`ATF_WEAPON` | Trigger on Weapon Skills
+`ATF_MAGIC` | Trigger on magic attacks
+`ATF_MISC` | Trigger on misc skills
+`ATF_SKILL` | Trigger on skill attack
+
+(Default: `ATF_WEAPON`)
+
+ Type 4 | Description
+:----------------- | :------------------------------
+`ATF_SELF` | Trigger effect on self.
+`ATF_TARGET` | Trigger effect on target (default)
+`ATF_SHORT` | Trigger on melee attacks
+`ATF_LONG` | Trigger in ranged attacks (default: trigger on all attacks)
+
+(Default: `ATF_TARGET`)
+
+ Other values | Remarks
+:----------------- | :------------------------------
+Skill (`sk`) | see `db/(pre-)re/skill_db.txt` (NOTE: Both skill IDs and names, with and without quotes, are supported.)
+Monster id (`mid`) | see `db/(pre-)re/mob_db.txt`
+Item id (`id`) | see `db/(pre-)re/item_db.conf`
+Item chain (`ic`) | see `db/(pre-)re/item_chain.conf` (Only Constants)
+Item group (`ig`) | see `db/(pre-)re/item_group.conf` (ItemID)
+Weapon type (`w`) | see `doc/item_db.txt` -> View -> Weapons
+Class (`c`) | see `db/(pre-re)/mob_db.txt` -> For Players, `c` = JobID
+
+---------------
+
+
+## Bonuses
+---------------
+The format of bonuses listed in this file is as follows:
+ * 1. Basic Bonuses
+ * 2. Extended Bonuses
+ * 3. Group-specific Bonuses
+ * 4. Status-related Bonuses
+ * 5. AutoSpell Bonuses
+ * 6. Misc Bonuses
+
+
+---------------
+
+### 1. Basic Bonuses
+
+Base Stats | Description
+:-------------------------------- | :-------------------------
+bonus bStr,`n`; | STR + `n`
+bonus bAgi,`n`; | AGI + `n`
+bonus bVit,`n`; | VIT + `n`
+bonus bInt,`n`; | INT + `n`
+bonus bDex,`n`; | DEX + `n`
+bonus bLuk,`n`; | LUK + `n`
+bonus bAgiVit,`n`; | AGI + `n`, VIT + `n`
+bonus bAgiDexStr,`n`; | STR + `n`, AGI + `n`, DEX + `n`
+bonus bAllStats,`n`; | STR + `n`, AGI + `n`, VIT + `n`, INT + `n`, DEX + `n`, LUK + `n`
+
+HP/SP | Description
+:-------------------------------- | :-------------------------
+bonus bMaxHP,`n`; | MaxHP + `n`
+bonus bMaxHPrate,`n`; | MaxHP + `n`%
+bonus bMaxSP,`n`; | MaxSP + `n`
+bonus bMaxSPrate,`n`; | MaxSP + `n`%
+
+Attack/Def | Description
+:-------------------------------- | :-------------------------
+bonus bAtk,`n`; | ATK + `n`
+bonus bAtk2,`n`; | ATK2 + `n`
+bonus bAtkRate,`n`; | Attack Power + `n`%
+bonus bBaseAtk,`n`; | Basic Attack Power + `n`
+bonus bDef,`n`; | Equipment DEF + `n`
+bonus bDef2,`n`; | VIT based DEF + `n`
+bonus bDefRate,`n`; | Equipment DEF + `n`%
+bonus bDef2Rate,`n`; | VIT based DEF + `n`%
+
+Magic Attack/Def | Description
+:-------------------------------- | :-------------------------
+bonus bMatk,`n`; | Magical attack power + `n`
+bonus bMatkRate,`n`; | Magical attack power + `n`%
+bonus bMdef,`n`; | Equipment MDEF + `n`
+bonus bMdef2,`n`; | INT based MDEF + `n`
+bonus bMdefRate,`n`; | Equipment MDEF + `n`%
+bonus bMdef2Rate,`n`; | INT based MDEF + `n`%
+
+Other Stats | Description
+:-------------------------------- | :-------------------------
+bonus bHit,`n`; | Hit + `n`
+bonus bHitRate,`n`; | Hit + `n`%
+bonus bCritical,`n`; | Critical + `n`
+bonus bCriticalRate,`n`; | Critical + `n`%
+bonus bFlee,`n`; | Flee + `n`
+bonus bFleeRate,`n`; | Flee + `n`%
+bonus bFlee2,`n`; | Perfect Dodge + `n`
+bonus bFlee2Rate,`n`; | Perfect Dodge + `n`%
+bonus bPerfectHitRate,`n`; | On-target impact attack probability `n`% (only the highest among all is applied)
+bonus bPerfectHitAddRate,`n`; | On-target impact attack probability + `n`%
+bonus bSpeedRate,`n`; | Moving speed + `n`% (only the highest among all is applied)
+bonus bSpeedAddRate,`n`; | Moving speed + `n`%
+bonus bAspd,`n`; | Attack speed + `n`
+bonus bAspdRate,`n`; | Attack speed + `n`%
+bonus bAtkRange,`n`; | Attack range + `n`
+bonus bAddMaxWeight,`n`; | MaxWeight + `n` (in units of 0.1)
+
+
+---------------
+
+### 2. Extended Bonuses
+
+HP | Description
+:-------------------------------- | :-------------------------
+bonus bHPrecovRate,`n`; | Natural HP recovery ratio + `n`%
+bonus2 bHPRegenRate,`n`,`t`; | Gain `n` HP every `t` milliseconds
+bonus2 bHPLossRate,`n`,`t`; | Lose `n` HP every `t` millisecond
+
+SP | Description
+:-------------------------------- | :-------------------------
+bonus bSPrecovRate,`n`; | Natural SP recovery ratio + `n`%
+bonus2 bSPRegenRate,`n`,`t`; | Gain `n` SP every `t` milliseconds
+bonus2 bSPLossRate,`n`,`t`; | Lose `n` SP every `t` milliseconds
+bonus bUseSPrate,`n`; | SP consumption + `n`%
+bonus2 bSkillUseSP,`sk`,`n`; | Reduces SP consumption of skill `sk` by n.
+bonus2 bSkillUseSPrate,`sk`,`n`; | Reduces SP consumption of skill `sk` by `n`%
+bonus bNoRegen,`x`; | Stops regeneration for `x` (`x`: 1=HP, 2=SP)
+
+Attack/Def | Description
+:-------------------------------- | :-------------------------
+bonus bNearAtkDef,`n`; | Adds `n`% damage reduction against melee physical attacks
+bonus bLongAtkDef,`n`; | Adds `n`% damage reduction against ranged physical attacks
+bonus bMagicAtkDef,`n`; | Adds `n`% damage reduction against magical attacks
+bonus bMiscAtkDef,`n`; | Adds `n`% damage reduction against MISC attacks (traps, falcon, ...)
+bonus bCriticalDef,`n`; | Decreases Chance of being hit by critical by `n`%
+bonus2 bSkillAtk,`sk`,`n`; | Increase damage of skill `sk` by `n`%
+bonus2 bWeaponAtk,`w`,`n`; | Adds `n` ATK when weapon of type `w` is equipped
+bonus2 bWeaponAtkRate,`w`,`n`; | Adds `n`% damage to weapon attacks when weapon of type `w` is equipped
+bonus bLongAtkRate,`n`; | Increases damage of ranged attacks by `n`%
+bonus bCritAtkRate,`n`; | Increase critical damage by +`n`%
+bonus bNoWeaponDamage,`n`; | Prevents from receiving `n`% physical damage
+bonus bNoMagicDamage,`n`; | Prevents from receiving `n`% magical effect (Attack, Healing, Support spells are all blocked)
+bonus bNoMiscDamage,`n`; | Adds `n`% reduction to received misc damage
+
+Heal | Description
+:-------------------------------- | :-------------------------
+bonus bHealPower,`n`; | Increase heal amount of all heal skills used by player on self by `n`%
+bonus bHealPower2,`n`; | Increase heal amount if you are healed by any skills of others by `n`%
+bonus2 bSkillHeal,`sk`,`n`; | Increase heal amount of skill `sk` by `n`%
+bonus2 bSkillHeal2,`sk`,`n`; | Increase heal amount if you are healed by skill `sk` by `n`%
+bonus bAddItemHealRate,`n`; | Increases HP recovered by `n`% for healing items.
+bonus2 bAddItemHealRate,`id`,`n`; | Increases HP recovered by `n`% for item `id`/`ig`
+
+Skill Cast | Description
+:---------------------------------- | :-------------------------
+bonus bCastrate,`n`; | Skill casting time rate + `n`%
+bonus2 bCastrate,`sk`,`n`; | Adjust casting time of skill `sk` by `n`%
+bonus bFixedCastrate,`n`; | Increases fixed cast time of all skills by `n`%
+bonus2 bFixedCastrate,`s`,`n`; | Increases fixed cast time of skill `sk` by `n`%
+bonus bFixedCast,`t`; | Increases fixed cast time of all skills by `t` milliseconds
+bonus2 bSkillFixedCast,`sk`,`t`; | Increases fixed cast time of skill `sk` by `t` milliseconds
+bonus bVariableCastrate,`n`; | Increases variable cast time of all skills by `n`%
+bonus2 bVariableCastrate,`sk`,`n`; | Increases variable cast time of skill `sk` by `n`%
+bonus bVariableCast,`t`; | Increases variable cast time of all skills by `t` milliseconds
+bonus2 bSkillVariableCast,`sk`,`t`; | Increases variable cast time of skill `sk` by `t` milliseconds
+bonus bNoCastCancel,`n`; | Prevents casting from being interrupted when hit (does not work in GvG | `n` is meaningless)
+bonus bNoCastCancel2,`n`; | Prevents casting from being interrupted when hit (works even in GvG | `n` is meaningless)
+bonus bDelayrate,`n`; | Increases skill delay by `n`%
+bonus2 bSkillCooldown,`sk`,`t`; | Increases cooldown of skill `sk` by `t` milliseconds
+
+
+---------------
+
+### 3. Group-specific Bonuses
+
+Damage Modifiers | Description
+:----------------------------------- | :-------------------------
+bonus2 bAddSize,`s`,`n`; | +n% Physical damage against size `s`
+bonus2 bMagicAddSize,`s`,`n`; | +n% Magical damage against size `s`
+bonus2 bSubSize,`s`,`n`; | +n% Damage reduction against size `s`
+bonus2 bAddRaceTolerance,`r`,`n`; | +n% tolerance against race `r` (Renewal Only)
+bonus2 bAddRace,`r`,`n`; | +n% Physical damage against race `r`
+bonus2 bMagicAddRace,`n`,`x`; | +n% Magical damage against race `r`
+bonus2 bSubRace,`r`,`n`; | +n% Damage reduction against race `r`
+bonus2 bAddRace2,`mr`,`n`; | +n% Damage Against monster race `mr`
+bonus2 bSubRace2,`mr`,`n`; | +n% Damage reduction against monster race `mr`
+bonus2 bAddEle,`e`,`n`; | +n% Physical damage against element `e`
+bonus2 bMagicAddEle,`e`,`n`; | +n% Magical damage against element `e`
+bonus2 bMagicAtkEle,`e`,`n`; | Increases damage of element `e` magic by `n`%
+bonus3 bAddEle,`e`,`n`,`bf`; | +n% physical damage against element `e`
+bonus2 bSubEle,`e`,`n`; | +n% Damage reduction against element `e`
+bonus3 bSubEle,`e`,`n`,`bf`; | +n% Damage reduction against element `e`.
+bonus2 bAddDamageClass,`c`,`x`; | +n% extra physical damage against monsters of class `c`
+bonus2 bAddMagicDamageClass,`c`,`x`; | +n% extra magical damage against monsters of class `c`
+bonus2 bAddDefClass,`c`,`x`; | +n% physical damage reduction against monsters of class `c`
+bonus2 bAddMDefClass,`c`,`x`; | +n% magical damage reduction against monsters of class `c`
+bonus2 bCriticalAddRace,`r`,`n`; | +`n` Critical Against race `r`
+
+Attack/Def | Description
+:------------------------------------- | :-------------------------
+bonus bAtkEle,`e`; | Gives the player's attacks element `e`
+bonus bDefEle,`e`; | Gives the player's defense element `e`
+bonus bDefRatioAtkEle,`e`; | Deals more damage to enemies of element `e` with higher defense
+bonus bDefRatioAtkRace,`r`; | Deals more damage to enemies of race `r` with higher defense
+bonus4 bSetDefRace,`r`,`n`,`t`,`y`; | Set DEF to `y` of an enemy of race `r` at `n`/100% for `t` milliseconds with normal attack
+bonus4 bSetMDefRace,`r`,`n`,`t`,`y`; | Set MDEF to `y` of an enemy of race `r` at `n`/100% for `t` milliseconds with normal attack
+
+Ignore Def | Description
+:-------------------------------- | :-------------------------
+bonus bIgnoreDefRace,`r`; | Disregard DEF against enemies of race `r`
+bonus bIgnoreMDefRace,`r`; | Disregard MDEF against enemies of race `r`
+bonus bIgnoreDefEle,`e`; | Disregard DEF against enemies of element `e`
+bonus bIgnoreMDefEle,`e`; | Disregard MDEF against enemies of element `e`
+bonus2 bIgnoreDefRate,`r`,`n`; | Disregard `n`% of the target's DEF if the target belongs to race `r`
+bonus2 bIgnoreMdefRate,`r`,`n`; | Disregard `n`% of the target's MDEF if the target belongs to race `r`
+bonus bIgnoreMdefRate,`n`; | Disregard `n`% of the target's MDEF
+
+Experience | Description
+:-------------------------------- | :-------------------------
+bonus2 bExpAddRace,`r`,`n`; | +n% Experience from enemies of race `r`
+
+
+---------------
+
+### 4. Status-related Bonuses
+
+Status-related Bonuses | Description
+:------------------------------------------- | :-------------------------
+bonus2 bResEff,`e`,`n`; | Adds a `n`/100% tolerance to effect `e`
+bonus2 bAddEff,`eff`,`n`; | Adds a `n`/100% chance to cause effect `eff` to the target when attacking
+bonus2 bAddEff2,`eff`,`n`; | Adds a `n`/100% chance to cause effect `eff` on self when attacking.
+bonus3 bAddEff,`eff`,`n`,`abf`; | Adds a `n`/100% chance to cause effect `eff` to the target when attacking for target abf
+bonus4 bAddEff,`eff`,`n`,`abf`,`t`; | Adds a `n`/100% chance to cause effect `eff` to the target when attacking for target `abf` for `t` milliseconds <br/> (Note:The effect can't be avoided nor its duration reduced. Duration: 0-65535)
+bonus3 bAddEffOnSkill,`sk`,`eff`,`n`; | Adds a `n`/100% chance to cause effect `eff` on enemy when using skill `sk`
+bonus4 bAddEffOnSkill,`sk`,`eff`,`n`,`abf`; | Adds a `n`/100% chance to cause effect `eff` when using skill `sk`
+bonus2 bAddEffWhenHit,`eff`,`n`; | `n`/100% chance to cause effect `eff` to the enemy when being hit by physical damage
+bonus3 bAddEffWhenHit,`eff`,`n`,`abf`; | Adds a `n`/100% chance to cause effect `eff` to the enemy when being hit by physical damage
+bonus2 bWeaponComaRace,`r`,`n`; | Adds a `n`/100% chance to cause Coma when attacking a monster of race `r` with a weapon attack
+bonus2 bWeaponComaEle,`e`,`n`; | Adds a `n`/100% chance to cause Coma when attacking a monster of element `e` with weapon attack
+
+
+---------------
+
+### 5. AutoSpell Bonuses
+
+NOTES:
+ - For all AutoSpell bonuses, target must be within the spell's range to go off.
+ - By default, AutoSpell skills are casted on target unless it is a self or support skill (inf = 4/16).
+
+AutoSpell Bonuses | Description
+:------------------------------------------------- | :-------------------------
+bonus4 bAutoSpellOnSkill,`sk`,`x`,`y`,`n`; | Adds a `n`/10% chance to autospell skill `x` at level `y` when using skill `sk`
+bonus5 bAutoSpellOnSkill,`sk`,`x`,`y`,`n`,`i`; | Adds a `n`/10% chance to autospell skill `x` at level `y` when using skill `sk` <br/> i: <br/> Flags (bitfield)<br/> &1: Forces the skill to be casted on self, rather than on the target of skill `sk`<br/> &2: Random skill level between 1 and l is chosen.
+bonus4 bAutoSpell,`sk`,`y`,`n`,`i`; | `n`/10% chance to cast skill `sk` of level `y` when attacking
+bonus5 bAutoSpell,`sk`,`y`,`n`,`bf`,`i`; | `n`/10% chance to cast skill `sk` of level `y` when attacking
+bonus4 bAutoSpellWhenHit,`sk`,`y`,`n`,`i`; | `n`/10% chance to cast skill `sk` of level `y` when being hit by a direct attack
+bonus5 bAutoSpellWhenHit,`sk`,`y`,`n`,`bf`,`i`; | `n`/10% chance to cast skill `sk` of level `y` when being hit by a direct attack <br/>i: <br/>0 = cast on self <br/>1 = cast on enemy, not on self <br/>2 = use random skill lv in [1..y] <br/>3 = 1+2 (random lv on enemy)
+bonus3 bAutoSpellWhenHit,`sk`,`x`,`n`; | `n`/10% chance to cast skill `sk` of level `x` on attacker when being hit by a direct attack
+bonus3 bAutoSpell,`sk`,`x`,`n`; | Auto Spell casting on attack of spell `sk` at level `x` with `n`/10% chance
+
+
+---------------
+
+### 6. Misc Bonuses
+
+HP/SP Drain | Description
+:------------------------------------- | :-------------------------
+bonus bHPDrainValue,`n`; | Heals +`n` HP with weapon attack.
+bonus2 bHPDrainValue,`n`,`x`; | Heals +`n` HP with weapon attack. When `x` is non-zero, the HP is drained instead.
+bonus2 bHPDrainRate,`n`,`x`; | `n`/10% probability to drain `x`% HP when attacking
+bonus bSPDrainValue,`n`; | When hitting a monster by physical attack, you gain `n` SP
+bonus2 bSPDrainRate,`n`,`x`; | `n`/10% probability to drain `x`% SP when attacking
+bonus2 bSPDrainValue,`n`,`x`; | When hitting a monster by physical attack <br/> x: <br/> 0: Gain `n` SP <br/> 1: drain `n` SP from target
+bonus3 bSPDrainRate,`n`,`x`,`y`; | When attacking there is a `n`/10% chance to either gain SP equivalent to `x`% of damage dealt, OR drain the amount of sp from the enemy. <br/> y: <br/> 0: Gain SP <br/> 1: Drain SP from target
+bonus2 bHPDrainValueRace,`r`,`n`; | Heals +`n` HP when attacking a monster of race `r` with weapon attack.
+bonus2 bSPDrainValueRace,`r`,`n`; | Heals +`n` SP when attacking a monster of race `r` with weapon attack.
+bonus3 bHPDrainRateRace,`r`,`n`,`x`; | Adds a `n`/10% chance to receive `x`% of damage dealt as HP from a monster of race `r` with weapon attack.
+bonus3 bSPDrainRateRace,`r`,`n`,`x`; | Adds a `n`/10% chance to receive `x`% of damage dealt as SP from a monster of race `r` with weapon attack.
+
+HP/SP Vanish | Description
+:------------------------------------- | :-------------------------
+bonus2 bHPVanishRate,`n`,`x`; | Add the (`n`/10)% chance of decreasing enemy HP amount by `x`% when attacking
+bonus2 bSPVanishRate,`n`,`x`; | Add the (`n`/10)% chance of decreasing enemy SP amount by `x`% when attacking
+bonus3 bHPVanishRate,`n`,`x`,`bf`; | Add the (`n`/10)% chance of decreasing enemy HP amount by `x`% when attacking for criteria `bf`
+bonus3 bSPVanishRate,`n`,`x`,`bf`; | Add the (`n`/10)% chance of decreasing enemy SP amount by `x`% when attacking for criteria `bf`
+
+HP/SP Gain | Description
+:------------------------------------- | :-------------------------
+bonus bHPGainValue,`n`; | When killing a monster by physical attack, you gain `n` HP
+bonus bSPGainValue,`n`; | When killing a monster by physical attack, you gain `n` SP
+bonus bMagicHPGainValue,`n`; | Gains +`n` HP when killing an enemy with magic attack
+bonus bMagicSPGainValue,`n`; | Gains +`n` SP when killing an enemy with magic attack
+bonus2 bHPGainRaceAttack,`r`,`n`; | Heals `n` HP when attacking race `r` on every hit
+bonus2 bSPGainRaceAttack,`r`,`n`; | Heals `n` SP when attacking race `r` on every hit
+bonus2 bSPGainRace,`r`,`n`; | When killing a monster of race `r` by physical attack gain `n` SP
+
+Damage return | Description
+:------------------------------------- | :-------------------------
+bonus bMagicDamageReturn,`n`; | Adds a `n`% chance to reflect targetted magic spells back to the enemy that caused it
+bonus bShortWeaponDamageReturn,`n`; | Reflects `n`% of received melee damage back to the enemy that caused it
+bonus bLongWeaponDamageReturn,`n`; | Reflects `n`% of received ranged damage back to the enemy that caused it
+
+NOTE:
+ - `n` is meaningless if not mentioned.
+
+Strip/Break equipment | Description
+:--------------------------------------- | :-------------------------
+bonus bUnstripable,`n`; | Equipment cannot be taken off via strip skills
+bonus bUnstripableWeapon,`n`; | Weapon cannot be taken off via Strip skills
+bonus bUnstripableArmor,`n`; | Armor cannot be taken off via Strip skills
+bonus bUnstripableHelm,`n`; | Helm cannot be taken off via Strip skills
+bonus bUnstripableShield,`n`; | Shield cannot be taken off via Strip skills
+bonus bUnbreakable,`n`; | Reduces the break chance of all equipped equipment by `n`%.
+bonus bUnbreakableGarment,`n`; | Garment cannot be damaged/broken by any means
+bonus bUnbreakableWeapon,`n`; | Weapon cannot be damaged/broken by any means
+bonus bUnbreakableArmor,`n`; | Armor cannot be damaged/broken by any means
+bonus bUnbreakableHelm,`n`; | Helm cannot be damaged/broken by any means
+bonus bUnbreakableShield,`n`; | Shield cannot be damaged/broken by any means
+bonus bUnbreakableShoes,`n`; | Shoes cannot be damaged/broken by any means
+bonus bBreakWeaponRate,`n`; | Adds a `n`/100% chance to break enemy's weapon while attacking (Stackable)
+bonus bBreakArmorRate,`n`; | Adds a `n`/100% chance to break enemy's armor while attacking (Stackable)
+
+NOTE:
+ - `n` is meaningless if not mentioned.
+
+Monster Related | Description
+:----------------------------------------- | :-------------------------
+bonus3 bAddClassDropItem,`id`,`c`,`n`; | Adds a `n`/100% chance of dropping item id when killing monster mid
+bonus2 bAddMonsterDropItem,`id`,`n`; | Adds a `n`/100% chance for item id to be dropped, when killing any monster.
+bonus3 bAddMonsterDropItem,`id`,`r`,`n`; | Adds a `n`/100% chance for item id to be dropped, when killing any monster of race `r`. <br/> If `n` is negative value, then it's a part of formula <br/> `chance = -y*(killed_mob_level/10)+1`
+bonus bAddMonsterDropChainItem,`ic`; | Able to get Item of chain `ic` when you kill a monster
+bonus2 bAddMonsterDropChainItem,`ic`,`r`; | Able to get item of chain `ic` when you kill a monster of race `r`
+bonus2 bGetZenyNum,`x`,`n`; | When killing a monster, there is a `n`% chance of gaining 1~x zeny (only the highest among all is applied).
+bonus2 bAddGetZenyNum,`x`,`n`; | When killing a monster, there is a `n`% chance of gaining 1~x zeny (Stackable) <br/> x: <br/> < 0: Max Zeny gain is `(-x*monster_level)`
+
+Misc effects | Description
+:------------------------------------- | :-------------------------
+skill i,`n`; | Gives skill #i at level n
+bonus bDoubleRate,`n`; | Double Attack probability +n% (works with all weapons | only the highest among all is applied)
+bonus bDoubleAddRate,`n`; | Double Attack probability +n% (works with all weapons)
+bonus bSplashRange,`n`; | Splash attack radius +`n` (highest is applied)
+bonus bSplashAddRange,`n`; | Splash attack radius + `n` (e.g. `n`=1 makes a `3*3` cells area, `n`=2 a `5*5` area, etc) <br/> `n`: <br/> 1: 3*3 Area <br/> 2: 5*5 Area <br/> ...
+bonus bClassChange,`n`; | Gives a `n`/100% chance to change the attacked monster's class with normal attack.
+bonus bAddStealRate,`n`; | `n`/100% increase to Steal skill success chance
+bonus bRestartFullRecover,`n`; | When reviving, HP and SP are fully healed
+bonus bNoSizeFix,`n`; | The attack revision with the size of the monster is not received
+bonus bNoGemStone,`n`; | Skills requiring Gemstones do no require them (Hocus Pocus will still require 1 Yellow Gemstone)
+bonus bIntravision,`n`; | Always see Hiding and Cloaking players/mobs <br/> `n`: is meaningless
+bonus2 bAddSkillBlow,`sk`,`n`; | Knockbacks the target by `n` cells when using skill `sk`
+bonus bNoKnockback,`n`; | Character is no longer knocked back by enemy skills with such effect (`n` is meaningless)
+bonus bPerfectHide,`n`; | Hidden/cloaked character is no longer detected by monsters with 'detector' mode (`n` is meaningless).
+
diff --git a/server/items/item_bonus.txt b/server/items/item_bonus.txt
deleted file mode 100644
index dd176d9..0000000
--- a/server/items/item_bonus.txt
+++ /dev/null
@@ -1,444 +0,0 @@
-//===== Hercules Documentation ===============================
-//= Hercules Item Bonuses List
-//===== By: ==================================================
-//= Hercules Dev Team
-//===== Current Version: =====================================
-//= 20150624
-//===== Description: =========================================
-//= List of script instructions used in item bonuses,
-//= mainly bonus/bonus2/bonus3/bonus4/bonus5 arguments.
-//============================================================
-
-Constants
----------
-This list contains all available constants referenced in the 'bonus' commands.
-
-* Status effect (eff)
- Eff_Stone, Eff_Freeze, Eff_Stun, Eff_Sleep, Eff_Poison, Eff_Curse, Eff_Silence,
- Eff_Confusion, Eff_Blind, Eff_Bleeding, Eff_DPoison, Eff_Fear, Eff_Cold,
- Eff_Burning, Eff_Deepsleep
-
-* Element (e)
- Ele_Neutral, Ele_Water, Ele_Earth, Ele_Fire, Ele_Wind, Ele_Poison,
- Ele_Holy, Ele_Dark, Ele_Ghost, Ele_Undead, Ele_All
-
-* Race (r)
- RC_Formless, RC_Undead, RC_Brute, RC_Plant, RC_Insect, RC_Fish,
- RC_Demon, RC_DemiHuman, RC_Angel, RC_Dragon, RC_Player, RC_Boss,
- RC_NonBoss, RC_NonDemiHuman, RC_NonPlayer, RC_DemiPlayer,
- RC_NonDemiPlayer, RC_All
-
-* Monster Race (mr)
- RC2_Goblin, RC2_Kobold, RC2_Orc, RC2_Golem, RC2_Guardian, RC2_Ninja,
- RC2_Scaraba, RC2_Turtle
-
-* Size (s)
- Size_Small, Size_Medium, Size_Large
-
-* Trigger criteria (bf)
- BF_WEAPON: Trigger on weapon skills
- BF_MAGIC: Trigger on magic skills
- BF_MISC: Trigger on misc skills
- (Default: BF_WEAPON)
-
- BF_SHORT: Trigger on melee attacks
- BF_LONG: Trigger on ranged attacks
- (Default: BF_SHORT+BF_LONG)
-
- BF_NORMAL: Trigger on normal attacks
- BF_SKILL: Trigger on skills
- (Default: BF_SKILL if type is BF_MISC or BF_MAGIC, BF_NORMAL if type is BF_WEAPON)
-
-* Attack Trigger Criteria (abf)
- ATF_SELF: Trigger on self
- ATF_TARGET: Trigger on target
- (Default: ATF_TARGET)
-
- ATF_SHORT: Trigger on melee attack
- ATF_LONG: Trigger on ranged attack
- (Default: ATF_SHORT+ATF_LONG)
-
- ATF_WEAPON: Trigger on Weapon Skills
- ATF_MAGIC: Trigger on magic attacks
- ATF_MISC: Trigger on misc skills
- ATF_SKILL: Trigger on skill attack
- (Default: ATF_WEAPON)
-
-ATF_SELF: Trigger effect on self.
- ATF_TARGET: Trigger effect on target (default)
- ATF_SHORT: Trigger on melee attacks
- ATF_LONG: Trigger in ranged attacks (default: trigger on all attacks)
-* Other values:
- Skill (sk): see 'db/(pre-)re/skill_db.txt' (NOTE: Both skill IDs and names, with and without quotes, are supported.)
- Monster id (mid): see 'db/(pre-)re/mob_db.txt'
- Item id (id): see 'db/(pre-)re/item_db.conf'
- Item chain (ic): see 'db/(pre-)re/item_chain.conf' (Only Constants)
- Item group (ig): see 'db/(pre-)re/item_group.conf' (ItemID)
- Weapon type (w): see 'doc/item_db.txt' -> View -> Weapons
- Class (c): see 'db/(pre-re)/mob_db.txt' -> For Players, c = JobID
-
-Bonuses
--------
-The format of bonuses listed in this file is as follows:
- 1. Basic Bonuses
- 2. Extended Bonuses
- 3. Group-specific Bonuses
- 4. Status-related Bonuses
- 5. AutoSpell Bonuses
- 6. Misc Bonuses
-
-====================
-| 1. Basic Bonuses |
-====================
-
-Base Stats
-----------
-bonus bStr,n; STR + n
-bonus bAgi,n; AGI + n
-bonus bVit,n; VIT + n
-bonus bInt,n; INT + n
-bonus bDex,n; DEX + n
-bonus bLuk,n; LUK + n
-bonus bAgiVit,n; AGI + n, VIT + n
-bonus bAgiDexStr,n; STR + n, AGI + n, DEX + n
-bonus bAllStats,n; STR + n, AGI + n, VIT + n, INT + n, DEX + n, LUK + n
-
-HP/SP
------
-bonus bMaxHP,n; MaxHP + n
-bonus bMaxHPrate,n; MaxHP + n%
-bonus bMaxSP,n; MaxSP + n
-bonus bMaxSPrate,n; MaxSP + n%
-
-Attack/Def
-----------
-bonus bAtk,n; ATK + n
-bonus bAtk2,n; ATK2 + n
-bonus bAtkRate,n; Attack Power + n%
-bonus bBaseAtk,n; Basic Attack Power + n
-bonus bDef,n; Equipment DEF + n
-bonus bDef2,n; VIT based DEF + n
-bonus bDefRate,n; Equipment DEF + n%
-bonus bDef2Rate,n; VIT based DEF + n%
-
-Magic Attack/Def
-----------------
-bonus bMatk,n; Magical attack power + n
-bonus bMatkRate,n; Magical attack power + n%
-bonus bMdef,n; Equipment MDEF + n
-bonus bMdef2,n; INT based MDEF + n
-bonus bMdefRate,n; Equipment MDEF + n%
-bonus bMdef2Rate,n; INT based MDEF + n%
-
-Other Stats
------------
-bonus bHit,n; Hit + n
-bonus bHitRate,n; Hit + n%
-bonus bCritical,n; Critical + n
-bonus bCriticalRate,n; Critical + n%
-bonus bFlee,n; Flee + n
-bonus bFleeRate,n; Flee + n%
-bonus bFlee2,n; Perfect Dodge + n
-bonus bFlee2Rate,n; Perfect Dodge + n%
-bonus bPerfectHitRate,n; On-target impact attack probability n% (only the highest among all is applied)
-bonus bPerfectHitAddRate,n; On-target impact attack probability + n%
-bonus bSpeedRate,n; Moving speed + n% (only the highest among all is applied)
-bonus bSpeedAddRate,n; Moving speed + n%
-bonus bAspd,n; Attack speed + n
-bonus bAspdRate,n; Attack speed + n%
-bonus bAtkRange,n; Attack range + n
-bonus bAddMaxWeight,n; MaxWeight + n (in units of 0.1)
-
-=======================
-| 2. Extended Bonuses |
-=======================
-
-HP
---
-bonus bHPrecovRate,n; Natural HP recovery ratio + n%
-bonus2 bHPRegenRate,n,t; Gain n HP every t milliseconds
-bonus2 bHPLossRate,n,t; Lose n HP every t millisecond
-
-SP
---
-bonus bSPrecovRate,n; Natural SP recovery ratio + n%
-bonus2 bSPRegenRate,n,t; Gain n SP every t milliseconds
-bonus2 bSPLossRate,n,t; Lose n SP every t milliseconds
-bonus bUseSPrate,n; SP consumption + n%
-bonus2 bSkillUseSP,sk,n; Reduces SP consumption of skill sk by n.
-bonus2 bSkillUseSPrate,sk,n; Reduces SP consumption of skill sk by n%
-bonus bNoRegen,x; Stops regeneration for x (x: 1=HP, 2=SP)
-
-Attack/Def
-----------
-bonus bNearAtkDef,n; Adds n% damage reduction against melee physical attacks
-bonus bLongAtkDef,n; Adds n% damage reduction against ranged physical attacks
-bonus bMagicAtkDef,n; Adds n% damage reduction against magical attacks
-bonus bMiscAtkDef,n; Adds n% damage reduction against MISC attacks (traps, falcon, ...)
-bonus bCriticalDef,n; Decreases Chance of being hit by critical by n%
-
-bonus2 bSkillAtk,sk,n; Increase damage of skill sk by n%
-bonus2 bWeaponAtk,w,n; Adds n ATK when weapon of type w is equipped
-bonus2 bWeaponAtkRate,w,n; Adds n% damage to weapon attacks when weapon of type w is equipped
-bonus bLongAtkRate,n; Increases damage of ranged attacks by n%
-bonus bCritAtkRate,n; Increase critical damage by +n%
-
-bonus bNoWeaponDamage,n; Prevents from receiving n% physical damage
-bonus bNoMagicDamage,n; Prevents from receiving n% magical effect (Attack, Healing, Support spells are all blocked)
-bonus bNoMiscDamage,n; Adds n% reduction to received misc damage
-
-Heal
-----
-bonus bHealPower,n; Increase heal amount of all heal skills used by player on self by n%
-bonus bHealPower2,n; Increase heal amount if you are healed by any skills of others by n%
-
-bonus2 bSkillHeal,sk,n; Increase heal amount of skill sk by n%
-bonus2 bSkillHeal2,sk,n; Increase heal amount if you are healed by skill sk by n%
-
-bonus bAddItemHealRate,n; Increases HP recovered by n% for healing items.
-bonus2 bAddItemHealRate,id,n; Increases HP recovered by n% for item id/ig
-
-Skill Cast
-----------
-bonus bCastrate,n; Skill casting time rate + n%
-bonus2 bCastrate,sk,n; Adjust casting time of skill sk by n%
-
-bonus bFixedCastrate,n; Increases fixed cast time of all skills by n%
-bonus2 bFixedCastrate,s,n; Increases fixed cast time of skill sk by n%
-bonus bFixedCast,t; Increases fixed cast time of all skills by t milliseconds
-bonus2 bSkillFixedCast,sk,t; Increases fixed cast time of skill sk by t milliseconds
-
-bonus bVariableCastrate,n; Increases variable cast time of all skills by n%
-bonus2 bVariableCastrate,sk,n; Increases variable cast time of skill sk by n%
-bonus bVariableCast,t; Increases variable cast time of all skills by t milliseconds
-bonus2 bSkillVariableCast,sk,t; Increases variable cast time of skill sk by t milliseconds
-
-bonus bNoCastCancel,n; Prevents casting from being interrupted when hit (does not work in GvG | n is meaningless)
-bonus bNoCastCancel2,n; Prevents casting from being interrupted when hit (works even in GvG | n is meaningless)
-
-bonus bDelayrate,n; Increases skill delay by n%
-bonus2 bSkillCooldown,sk,t; Increases cooldown of skill sk by t milliseconds
-
-=============================
-| 3. Group-specific Bonuses |
-=============================
-
-Damage Modifiers
-----------------
-bonus2 bAddSize,s,n; +n% Physical damage against size s
-bonus2 bMagicAddSize,s,n; +n% Magical damage against size s
-bonus2 bSubSize,s,n; +n% Damage reduction against size s
-
-bonus2 bAddRaceTolerance,r,n; +n% tolerance against race r (Renewal Only)
-
-bonus2 bAddRace,r,n; +n% Physical damage against race r
-bonus2 bMagicAddRace,n,x; +n% Magical damage against race r
-bonus2 bSubRace,r,n; +n% Damage reduction against race r
-
-bonus2 bAddRace2,mr,n; +n% Damage Against monster race mr
-bonus2 bSubRace2,mr,n; +n% Damage reduction against monster race mr
-
-bonus2 bAddEle,e,n; +n% Physical damage against element e
-bonus2 bMagicAddEle,e,n; +n% Magical damage against element e
-bonus2 bMagicAtkEle,e,n; Increases damage of element e magic by n%
-bonus3 bAddEle,e,n,bf; +n% physical damage against element e
-bonus2 bSubEle,e,n; +n% Damage reduction against element e
-bonus3 bSubEle,e,n,bf; +n% Damage reduction against element e.
-
-bonus2 bAddDamageClass,c,x; +n% extra physical damage against monsters of class c
-bonus2 bAddMagicDamageClass,c,x; +n% extra magical damage against monsters of class c
-bonus2 bAddDefClass,c,x; +n% physical damage reduction against monsters of class c
-bonus2 bAddMDefClass,c,x; +n% magical damage reduction against monsters of class c
-bonus2 bCriticalAddRace,r,n; +n Critical Against race r
-
-Attack/Def
-----------
-bonus bAtkEle,e; Gives the player's attacks element e
-bonus bDefEle,e; Gives the player's defense element e
-
-bonus bDefRatioAtkEle,e; Deals more damage to enemies of element e with higher defense
-bonus bDefRatioAtkRace,r; Deals more damage to enemies of race r with higher defense
-
-bonus4 bSetDefRace,r,n,t,y; Set DEF to y of an enemy of race r at n/100% for t milliseconds with normal attack
-bonus4 bSetMDefRace,r,n,t,y; Set MDEF to y of an enemy of race r at n/100% for t milliseconds with normal attack
-
-Ignore Def
-----------
-bonus bIgnoreDefRace,r; Disregard DEF against enemies of race r
-bonus bIgnoreMDefRace,r; Disregard MDEF against enemies of race r
-
-bonus bIgnoreDefEle,e; Disregard DEF against enemies of element e
-bonus bIgnoreMDefEle,e; Disregard MDEF against enemies of element e
-
-bonus2 bIgnoreDefRate,r,n; Disregard n% of the target's DEF if the target belongs to race r
-bonus2 bIgnoreMdefRate,r,n; Disregard n% of the target's MDEF if the target belongs to race r
-
-bonus bIgnoreMdefRate,n; Disregard n% of the target's MDEF
-
-Experience
-----------
-bonus2 bExpAddRace,r,n; +n% Experience from enemies of race r
-
-=============================
-| 4. Status-related Bonuses |
-=============================
-bonus2 bResEff,e,n; Adds a n/100% tolerance to effect e
-bonus2 bAddEff,eff,n; Adds a n/100% chance to cause effect eff to the target when attacking
-bonus2 bAddEff2,eff,n; Adds a n/100% chance to cause effect eff on self when attacking.
-bonus3 bAddEff,eff,n,abf; Adds a n/100% chance to cause effect eff to the target when attacking for target abf
-bonus4 bAddEff,eff,n,abf,t; Adds a n/100% chance to cause effect eff to the target when attacking for target abf for t milliseconds
- (Note:The effect can't be avoided nor its duration reduced. Duration: 0-65535)
-bonus3 bAddEffOnSkill,sk,eff,n; Adds a n/100% chance to cause effect eff on enemy when using skill sk
-bonus4 bAddEffOnSkill,sk,eff,n,abf; Adds a n/100% chance to cause effect eff when using skill sk
-
-bonus2 bAddEffWhenHit,eff,n; n/100% chance to cause effect eff to the enemy when being hit by physical damage
-bonus3 bAddEffWhenHit,eff,n,abf; Adds a n/100% chance to cause effect eff to the enemy when being hit by physical damage
-
-bonus2 bWeaponComaRace,r,n; Adds a n/100% chance to cause Coma when attacking a monster of race r with a weapon attack
-bonus2 bWeaponComaEle,e,n; Adds a n/100% chance to cause Coma when attacking a monster of element e with weapon attack
-
-========================
-| 5. AutoSpell Bonuses |
-========================
-NOTES:
- - For all AutoSpell bonuses, target must be within the spell's range to go off.
- - By default, AutoSpell skills are casted on target unless it is a self or support skill (inf = 4/16).
-
-bonus4 bAutoSpellOnSkill,sk,x,y,n; Adds a n/10% chance to autospell skill x at level y when using skill sk
-bonus5 bAutoSpellOnSkill,sk,x,y,n,i; Adds a n/10% chance to autospell skill x at level y when using skill sk
- i: Flags (bitfield)
- &1: Forces the skill to be casted on self, rather than on the target of skill sk
- &2: Random skill level between 1 and l is chosen.
-
-bonus4 bAutoSpell,sk,y,n,i; n/10% chance to cast skill sk of level y when attacking
-bonus5 bAutoSpell,sk,y,n,bf,i; n/10% chance to cast skill sk of level y when attacking
-bonus4 bAutoSpellWhenHit,sk,y,n,i; n/10% chance to cast skill sk of level y when being hit by a direct attack
-bonus5 bAutoSpellWhenHit,sk,y,n,bf,i; n/10% chance to cast skill sk of level y when being hit by a direct attack
- i:
- 0 = cast on self
- 1 = cast on enemy, not on self
- 2 = use random skill lv in [1..y]
- 3 = 1+2 (random lv on enemy)
-
-bonus3 bAutoSpellWhenHit,sk,x,n; n/10% chance to cast skill sk of level x on attacker when being hit by a direct attack
-bonus3 bAutoSpell,sk,x,n; Auto Spell casting on attack of spell sk at level x with n/10% chance
-
-===================
-| 6. Misc Bonuses |
-===================
-
-HP/SP Drain
------------
-bonus bHPDrainValue,n; Heals +n HP with weapon attack.
-bonus2 bHPDrainValue,n,x; Heals +n HP with weapon attack. When x is non-zero, the HP is drained instead.
-bonus2 bHPDrainRate,n,x; n/10% probability to drain x% HP when attacking
-
-bonus bSPDrainValue,n; When hitting a monster by physical attack, you gain n SP
-bonus2 bSPDrainRate,n,x; n/10% probability to drain x% SP when attacking
-bonus2 bSPDrainValue,n,x; When hitting a monster by physical attack
- x:
- 0: Gain n SP
- 1: drain n SP from target
-bonus3 bSPDrainRate,n,x,y; When attacking there is a n/10% chance to either gain SP equivalent to x% of damage dealt,
- OR drain the amount of sp from the enemy.
- y:
- 0: Gain SP
- 1: Drain SP from target
-
-bonus2 bHPDrainValueRace,r,n; Heals +n HP when attacking a monster of race r with weapon attack.
-bonus2 bSPDrainValueRace,r,n; Heals +n SP when attacking a monster of race r with weapon attack.
-
-bonus3 bHPDrainRateRace,r,n,x; Adds a n/10% chance to receive x% of damage dealt as HP from a monster of race r with weapon attack.
-bonus3 bSPDrainRateRace,r,n,x; Adds a n/10% chance to receive x% of damage dealt as SP from a monster of race r with weapon attack.
-
-HP/SP Vanish
-------------
-bonus2 bHPVanishRate,n,x; Add the (n/10)% chance of decreasing enemy HP amount by x% when attacking
-bonus2 bSPVanishRate,n,x; Add the (n/10)% chance of decreasing enemy SP amount by x% when attacking
-
-bonus3 bHPVanishRate,n,x,bf; Add the (n/10)% chance of decreasing enemy HP amount by x% when attacking for criteria bf
-bonus3 bSPVanishRate,n,x,bf; Add the (n/10)% chance of decreasing enemy SP amount by x% when attacking for criteria bf
-
-HP/SP Gain
-----------
-bonus bHPGainValue,n; When killing a monster by physical attack, you gain n HP
-bonus bSPGainValue,n; When killing a monster by physical attack, you gain n SP
-
-bonus bMagicHPGainValue,n; Gains +n HP when killing an enemy with magic attack
-bonus bMagicSPGainValue,n; Gains +n SP when killing an enemy with magic attack
-
-bonus2 bHPGainRaceAttack,r,n; Heals n HP when attacking Race r on every hit
-bonus2 bSPGainRaceAttack,r,n; Heals n SP when attacking Race r on every hit
-
-bonus2 bSPGainRace,r,n; When killing a monster of race r by physical attack gain n SP
-
-Damage return
--------------
-bonus bMagicDamageReturn,n; Adds a n% chance to reflect targetted magic spells back to the enemy that caused it
-bonus bShortWeaponDamageReturn,n; Reflects n% of received melee damage back to the enemy that caused it
-bonus bLongWeaponDamageReturn,n; Reflects n% of received ranged damage back to the enemy that caused it
-
-Strip/Break equipment
----------------------
-NOTE:
- - n is meaningless if not mentioned.
-bonus bUnstripable,n; Equipment cannot be taken off via strip skills
-bonus bUnstripableWeapon,n; Weapon cannot be taken off via Strip skills
-bonus bUnstripableArmor,n; Armor cannot be taken off via Strip skills
-bonus bUnstripableHelm,n; Helm cannot be taken off via Strip skills
-bonus bUnstripableShield,n; Shield cannot be taken off via Strip skills
-
-bonus bUnbreakable,n; Reduces the break chance of all equipped equipment by n%.
-bonus bUnbreakableGarment,n; Garment cannot be damaged/broken by any means
-bonus bUnbreakableWeapon,n; Weapon cannot be damaged/broken by any means
-bonus bUnbreakableArmor,n; Armor cannot be damaged/broken by any means
-bonus bUnbreakableHelm,n; Helm cannot be damaged/broken by any means
-bonus bUnbreakableShield,n; Shield cannot be damaged/broken by any means
-bonus bUnbreakableShoes,n; Shoes cannot be damaged/broken by any means
-
-bonus bBreakWeaponRate,n; Adds a n/100% chance to break enemy's weapon while attacking (Stackable)
-bonus bBreakArmorRate,n; Adds a n/100% chance to break enemy's armor while attacking (Stackable)
-
-Monster Related
----------------
-bonus3 bAddClassDropItem,id,c,n; Adds a n/100% chance of dropping item id when killing monster mid
-
-bonus2 bAddMonsterDropItem,id,n; Adds a n/100% chance for item id to be dropped, when killing any monster.
-bonus3 bAddMonsterDropItem,id,r,n; Adds a n/100% chance for item id to be dropped, when killing any monster of race r.
- If 'n' is negative value, then it's a part of formula
- chance = -y*(killed_mob_level/10)+1
-
-bonus bAddMonsterDropChainItem,ic; Able to get Item of chain ic when you kill a monster
-bonus2 bAddMonsterDropChainItem,ic,r; Able to get item of chain ic when you kill a monster of race r
-
-bonus2 bGetZenyNum,x,n; When killing a monster, there is a n% chance of gaining 1~x zeny (only the highest among all is applied).
-bonus2 bAddGetZenyNum,x,n; When killing a monster, there is a n% chance of gaining 1~x zeny (Stackable)
- x:
- < 0: Max Zeny gain is (-x*monster_level)
-
-Misc effects
-------------
-skill i,n; Gives skill #i at level n
-
-bonus bDoubleRate,n; Double Attack probability +n% (works with all weapons | only the highest among all is applied)
-bonus bDoubleAddRate,n; Double Attack probability +n% (works with all weapons)
-
-bonus bSplashRange,n; Splash attack radius +n (highest is applied)
-bonus bSplashAddRange,n; Splash attack radius + n (e.g. n=1 makes a 3*3 cells area, n=2 a 5*5 area, etc)
- n:
- 1: 3*3 Area
- 2: 5*5 Area
- ...
-
-bonus bClassChange,n; Gives a n/100% chance to change the attacked monster's class with normal attack.
-bonus bAddStealRate,n; n/100% increase to Steal skill success chance
-bonus bRestartFullRecover,n; When reviving, HP and SP are fully healed
-bonus bNoSizeFix,n; The attack revision with the size of the monster is not received
-bonus bNoGemStone,n; Skills requiring Gemstones do no require them (Hocus Pocus will still require 1 Yellow Gemstone)
-bonus bIntravision,n; Always see Hiding and Cloaking players/mobs
- n: is meaningless
-
-bonus2 bAddSkillBlow,sk,n; Knockbacks the target by n cells when using skill sk
-bonus bNoKnockback,n; Character is no longer knocked back by enemy skills with such effect (n is meaningless)
-
-bonus bPerfectHide,n; Hidden/cloaked character is no longer detected by monsters with 'detector' mode (n is meaningless).
diff --git a/server/monsters/mob_db_mode_list.md b/server/monsters/mob_db_mode_list.md
new file mode 100644
index 0000000..a8ad4fa
--- /dev/null
+++ b/server/monsters/mob_db_mode_list.md
@@ -0,0 +1,72 @@
+# Hercules Monster Modes Reference
+
+<!--
+## Copyright
+> This file is part of Hercules.
+> http://herc.ws - http://github.com/HerculesWS/Hercules
+>
+> Copyright (C) 2012-2018 Hercules Dev Team
+> Copyright (C) Athena Dev Teams
+>
+> Hercules is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+>
+> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+> See the GNU General Public License for more details.
+>
+> You should have received a copy of the GNU General Public License along with this program.
+> If not, see <http://www.gnu.org/licenses/>.
+-->
+
+## Description
+A reference description of Hercules's mob_db.conf `mode` field.
+
+## Monster Mode Legend:
+Constant Name | Bits | Value | Description
+:-------------------- | :-----: | :------: | :----------------
+MD_CANMOVE | 0x00001 | 1 | Enables the mob to move/chase characters.
+MD_LOOTER | 0x00002 | 2 | The mob will loot up nearby items on the ground when it's on idle state.
+MD_AGGRESSIVE | 0x00004 | 4 | Normal aggressive mob, will look for a close-by player to attack.
+MD_ASSIST | 0x00008 | 8 | When a nearby mob of the same class attacks, assist types will join them.
+MD_CASTSENSOR_IDLE | 0x00010 | 16 | Will go after characters who start casting on them if idle or walking (without a target).
+MD_BOSS | 0x00020 | 32 | Special flag which makes mobs immune to certain status changes and skills.
+MD_PLANT | 0x00040 | 64 | Always receives 1 damage from attacks.
+MD_CANATTACK | 0x00080 | 128 | Enables the mob to attack/retaliate when you are within attack range. <br/>Note that this only enables them to use normal attacks, skills are always allowed.
+MD_DETECTOR | 0x00100 | 256 | Enables mob to detect and attack characters who are in hiding/cloak.
+MD_CASTSENSOR_CHASE | 0x00200 | 512 | Will go after characters who start casting on them if idle or chasing other players (they switch chase targets)
+MD_CHANGECHASE | 0x00400 | 1024 | Allows chasing mobs to switch targets if another player happens to be within attack range (handy on ranged attackers, for example)
+MD_ANGRY | 0x00800 | 2048 | These mobs are "hyper-active". Apart from "chase"/"attack", they have the states "follow"/"angry". </br>Once hit, they stop using these states and use the normal ones. The new states are used to determine a different skill-set for their "before attacked" and "after attacked" states. </br>Also, when "following", they automatically switch to whoever character is closest.
+MD_CHANGETARGET_MELEE | 0x01000 | 4096 | Enables a mob to switch targets when attacked while attacking someone else.
+MD_CHANGETARGET_CHASE | 0x02000 | 8192 | Enables a mob to switch targets when attacked while chasing another character.
+MD_TARGETWEAK | 0x04000 | 16384 | Allows aggressive monsters to only be aggressive against characters that are five levels below it's own level. </br>For example, a monster of level 104 will not pick fights with a level 99.
+MD_NOKNOCKBACK | 0x08000 | 32768 | Monsters will be immune to knockback's effect.
+MD_RANDOMTARGET | 0x10000 | 65536 | Picks a new random target in range on each attack/skill. (not implemented)
+
+## Aegis Mob Types:
+What Aegis has are mob-types, where each type represents an AI behavior that is mimicked by a group of eA mode bits.
+This is the table to convert from one to another:
+
+No. | Bits | Mob Type | Aegis/eA Description
+--: | :----: | :------: | :----------------
+ 01 | 0x0081 | Any | passive
+ 02 | 0x0083 | Any | passive, looter
+ 03 | 0x1089 | Any | passive, assist and change-target melee
+ 04 | 0x3885 | Any | angry, change-target melee/chase
+ 05 | 0x2085 | Any | aggressive, change-target chase
+ 06 | 0x0000 | Plants | passive, immobile, can't attack
+ 07 | 0x108B | Any | passive, looter, assist, change-target melee
+ 08 | 0x6085 | Any | aggressive, change-target chase, target weak enemies
+ 09 | 0x3095 | Guardian | aggressive, change-target melee/chase, cast sensor idle
+ 10 | 0x0084 | Any | aggressive, immobile
+ 11 | 0x0084 | Guardian | aggressive, immobile
+ 12 | 0x2085 | Guardian | aggressive, change-target chase
+ 13 | 0x308D | Any | aggressive, change-target melee/chase, assist
+ 17 | 0x0091 | Any | passive, cast sensor idle
+ 19 | 0x3095 | Any | aggressive, change-target melee/chase, cast sensor idle
+ 20 | 0x3295 | Any | aggressive, change-target melee/chase, cast sensor idle/chase
+ 21 | 0x3695 | Any | aggressive, change-target melee/chase, cast sensor idle/chase, chase-change target
+ 25 | 0x0001 | Pet | passive, can't attack
+ 26 | 0xB695 | Any | aggressive, change-target melee/chase, cast sensor idle/chase, chase-change target, random target
+ 27 | 0x8084 | Any | aggressive, immobile, random target
+
+- Note that the detector bit due to being Insect/Demon, Plant and Boss mode bits need to be added independently of this list.
+
diff --git a/server/monsters/mob_db_mode_list.txt b/server/monsters/mob_db_mode_list.txt
deleted file mode 100644
index 32e7a0e..0000000
--- a/server/monsters/mob_db_mode_list.txt
+++ /dev/null
@@ -1,113 +0,0 @@
-//===== Hercules Documentation ===============================
-//= Hercules Monster Modes Reference
-//===== By: ==================================================
-//= Hercules Dev Team
-//===== Current Version: =====================================
-//= 20120630
-//===== Description: =========================================
-//= A reference description of Hercules' mob_db 'mode' field.
-//============================================================
-
-Bit Legend:
--------------------------------------------------------------------------------
-
-MD_CANMOVE | 0x00001 | 1
-MD_LOOTER | 0x00002 | 2
-MD_AGGRESSIVE | 0x00004 | 4
-MD_ASSIST | 0x00008 | 8
-MD_CASTSENSOR_IDLE | 0x00010 | 16
-MD_BOSS | 0x00020 | 32
-MD_PLANT | 0x00040 | 64
-MD_CANATTACK | 0x00080 | 128
-MD_DETECTOR | 0x00100 | 256
-MD_CASTSENSOR_CHASE | 0x00200 | 512
-MD_CHANGECHASE | 0x00400 | 1024
-MD_ANGRY | 0x00800 | 2048
-MD_CHANGETARGET_MELEE | 0x01000 | 4096
-MD_CHANGETARGET_CHASE | 0x02000 | 8192
-MD_TARGETWEAK | 0x04000 | 16384
-MD_NOKNOCKBACK | 0x08000 | 32768
-MD_RANDOMTARGET | 0x10000 | 65536 (not implemented)
-
-Explanation for modes:
--------------------------------------------------------------------------------
-
-CanMove: Enables the mob to move/chase characters.
-
-CanAttack: Enables the mob to attack/retaliate when you are within attack
- range. Note that this only enables them to use normal attacks, skills are
- always allowed.
-
-Looter: The mob will loot up nearby items on the ground when it's on idle state.
-
-Aggressive: normal aggressive mob, will look for a close-by player to attack.
-
-Assist: When a nearby mob of the same class attacks, assist types will join them.
-
-Cast Sensor Idle: Will go after characters who start casting on them if idle
- or walking (without a target).
-
-Cast Sensor Chase: Will go after characters who start casting on them if idle
- or chasing other players (they switch chase targets)
-
-Boss: Special flag which makes mobs immune to certain status changes and skills.
-
-Plant: Always receives 1 damage from attacks.
-
-Detector: Enables mob to detect and attack characters who are in hiding/cloak.
-
-ChangeChase: Allows chasing mobs to switch targets if another player happens
- to be within attack range (handy on ranged attackers, for example)
-
-Angry: These mobs are "hyper-active". Apart from "chase"/"attack", they have
- the states "follow"/"angry". Once hit, they stop using these states and use
- the normal ones. The new states are used to determine a different skill-set
- for their "before attacked" and "after attacked" states. Also, when
- "following", they automatically switch to whoever character is closest.
-
-Change Target Melee: Enables a mob to switch targets when attacked while
- attacking someone else.
-
-Change Target Chase: Enables a mob to switch targets when attacked while
- chasing another character.
-
-Target Weak: Allows aggressive monsters to only be aggressive against
- characters that are five levels below it's own level.
- For example, a monster of level 104 will not pick fights with a level 99.
-
-NoKnockback: Monsters will be immune to Knockback's.
-
-Random Target: Picks a new random target in range on each attack / skill.
- (not implemented)
-
-Aegis Mob Types:
--------------------------------------------------------------------------------
-
-What Aegis has are mob-types, where each type represents an AI behavior that
-is mimicked by a group of eA mode bits. This is the table to convert from one
-to another:
-
-Aegis/eA (description)
-01: 0x0081 (passive)
-02: 0x0083 (passive, looter)
-03: 0x1089 (passive, assist and change-target melee)
-04: 0x3885 (angry, change-target melee/chase)
-05: 0x2085 (aggressive, change-target chase)
-06: 0x0000 (passive, immobile, can't attack) [plants]
-07: 0x108B (passive, looter, assist, change-target melee)
-08: 0x6085 (aggressive, change-target chase, target weak enemies)
-09: 0x3095 (aggressive, change-target melee/chase, cast sensor idle) [Guardian]
-10: 0x0084 (aggressive, immobile)
-11: 0x0084 (aggressive, immobile) [Guardian]
-12: 0x2085 (aggressive, change-target chase) [Guardian]
-13: 0x308D (aggressive, change-target melee/chase, assist)
-17: 0x0091 (passive, cast sensor idle)
-19: 0x3095 (aggressive, change-target melee/chase, cast sensor idle)
-20: 0x3295 (aggressive, change-target melee/chase, cast sensor idle/chase)
-21: 0x3695 (aggressive, change-target melee/chase, cast sensor idle/chase, chase-change target)
-25: 0x0001 (passive, can't attack) [Pet]
-26: 0xB695 (aggressive, change-target melee/chase, cast sensor idle/chase, chase-change target, random target)
-27: 0x8084 (aggressive, immobile, random target)
-
-- Note that the detector bit due to being Insect/Demon, plant and Boss mode
- bits need to be added independently of this list.
diff --git a/server/other/quest_variables.md b/server/other/quest_variables.md
new file mode 100644
index 0000000..2f8922c
--- /dev/null
+++ b/server/other/quest_variables.md
@@ -0,0 +1,262 @@
+# Quest Variables
+
+<!--
+## Copyright
+> This file is part of Hercules.
+> http://herc.ws - http://github.com/HerculesWS/Hercules
+>
+> Copyright (C) 2012-2018 Hercules Dev Team
+> Copyright (C) Athena Dev Teams
+>
+> Hercules is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+>
+> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+> See the GNU General Public License for more details.
+>
+> You should have received a copy of the GNU General Public License along with this program.
+> If not, see <http://www.gnu.org/licenses/>.
+-->
+
+## Description
+This file should help to understand and manage bit-wise quest variables.
+You can store up to 31 boolean value into a single variable.
+
+## Sample Variable: `MISC_QUEST`
+
+Quest # No | Sample Quest
+:-------------| :------------
+Description | How to assign a bit-wise value and check it.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| X;```
+Check Value | ```if (MISC_QUEST & X) { ... }```
+
+- Where `X` refer to the bit-wise value that could be used to represent the state/progress of a quest.
+
+--------------------------------------------------------------
+
+## Example
+
+Quest # 1 | Juice Maker Quest
+:-------------| :------------
+Description | How to make juices. This bit keeps final state of the quest.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 1;```
+Check Value | ```if (MISC_QUEST & 1) { ... }```
+
+Quest # 2 | Tempestra Quest
+:-------------| :------------
+Description | Determines if player has given a potion to Tempestra.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 2;```
+Check Value | ```if (MISC_QUEST & 2) { ... }```
+
+Quest # 3 | Morgenstein Quest
+:-------------| :------------
+Description | How to make Mixture & Counteragent. This bit keeps final state of the quest.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 4;```
+Check Value | ```if (MISC_QUEST & 4) { ... }```
+
+Quest # 4 | Prontera Culvert Quest
+:-------------| :------------
+Description | Determines if player can enter Prontera Culverts.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 8;```
+Check Value | ```if (MISC_QUEST & 8) { ... }```
+
+Quest # 5 | Edgar's Offer
+:-------------| :------------
+Description | Cheap ticket from Izlude to Alberta. This bit keeps final state of the quest.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 16;```
+Check Value | ```if (MISC_QUEST & 16) { ... }```
+
+Quest # 6 | Piano Quest
+:-------------| :------------
+Description | The only way from Niflheim to Umbala.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 32;```
+Check Value | ```if (MISC_QUEST & 32) { ... }```
+
+Quest # 7 | Bio Ethics Quest
+:-------------| :------------
+Description | Quest for homunculus skill for alchemists. This bit keeps final state of the quest.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 64;```
+Check Value | ```if (MISC_QUEST & 64) { ... }```
+
+Quest # 8 | DTS Warper
+:-------------| :------------
+Description | Determines if player has already voted.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 128;```
+Check Value | ```if (MISC_QUEST & 128) { ... }```
+
+Quest # 9 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 256;```
+Check Value | ```if (MISC_QUEST & 256) { ... }```
+
+Quest # 10 | Cube Room
+:-------------| :------------
+Description | Lighthalzen Cube Room quest (to enter Bio-Lab)
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 512;```
+Check Value | ```if (MISC_QUEST & 512) { ... }```
+
+Quest # 11 | Reset Skills Event
+:-------------| :------------
+Description | Yuno, Hypnotist Teacher
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 1024;```
+Check Value | ```if (MISC_QUEST & 1024) { ... }```
+
+Quest # 12 | Slotted Arm Guard Quest
+:-------------| :------------
+Description | Ninja Job Room, Boshuu
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 2048;```
+Check Value | ```if (MISC_QUEST & 2048) { ... }```
+
+Quest # 13 | Improved Arm Guard Quest
+:-------------| :------------
+Description | Ninja Job Room, Basshu
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 4096;```
+Check Value | ```if (MISC_QUEST & 4096) { ... }```
+
+Quest # 14 | Rachel Sanctuary Quest
+:-------------| :------------
+Description | Determines if player can access Rachel Santuary.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 8192;```
+Check Value | ```if (MISC_QUEST & 8192) { ... }```
+
+Quest # 15 | Message Delivery Quest
+:-------------| :------------
+Description | Send a message to Elly, in Niflheim from Erious.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 16384;```
+Check Value | ```if (MISC_QUEST & 16384) { ... }```
+
+Quest # 16 | Umbala Domestic Dispute?
+:-------------| :------------
+Description | Reward: 1 Yggdrasil Leaf.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 32768;```
+Check Value | ```if (MISC_QUEST & 32768) { ... }```
+
+Quest # 17 | Access to the Turtle Island
+:-------------| :------------
+Description | Reward: ~1 Old Card Album , Old Violet Box, GB.
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 65536;```
+Check Value | ```if (MISC_QUEST & 65536) { ... }```
+
+Quest # 18 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 131072;```
+Check Value | ```if (MISC_QUEST & 131072) { ... }```
+
+Quest # 19 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 262144;```
+Check Value | ```if (MISC_QUEST & 262144) { ... }```
+
+Quest # 20 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 524288;```
+Check Value | ```if (MISC_QUEST & 524288) { ... }```
+
+Quest # 21 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 1048576;```
+Check Value | ```if (MISC_QUEST & 1048576) { ... }```
+
+Quest # 22 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 2097152;```
+Check Value | ```if (MISC_QUEST & 2097152) { ... }```
+
+Quest # 23 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 4194304;```
+Check Value | ```if (MISC_QUEST & 4194304) { ... }```
+
+Quest # 24 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 8388608;```
+Check Value | ```if (MISC_QUEST & 8388608) { ... }```
+
+Quest # 25 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 16777216;```
+Check Value | ```if (MISC_QUEST & 16777216) { ... }```
+
+Quest # 26 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 33554432;```
+Check Value | ```if (MISC_QUEST & 33554432) { ... }```
+
+Quest # 27 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 67108864;```
+Check Value | ```if (MISC_QUEST & 67108864) { ... }```
+
+Quest # 28 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 134217728;```
+Check Value | ```if (MISC_QUEST & 134217728) { ... }```
+
+Quest # 29 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 268435456;```
+Check Value | ```if (MISC_QUEST & 268435456) { ... }```
+
+Quest # 30 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 536870912;```
+Check Value | ```if (MISC_QUEST & 536870912) { ... }```
+
+Quest # 31 | -
+:-------------| :------------
+Description | -
+Assign Value | ```MISC_QUEST = MISC_QUEST \| 1073741824;```
+Check Value | ```if (MISC_QUEST & 1073741824) { ... }```
+
+### Quest#32 and onwards
+You had to use a new variable to store it.
+The existing variable `MISC_QUEST`'s value may overflow as it already reaching the max value.
+Basically the cycle repeat every 32th quests, unless the limit has been lifted in the future.
+
+ No | Formulae | Bits Value | Accumulate
+:--:|:-----------:|-----------:|-------------:
+ 1 | 2 ^ 0 | 1 | 1
+ 2 | 2 ^ 1 | 2 | 3
+ 3 | 2 ^ 2 | 4 | 7
+ 4 | 2 ^ 3 | 8 | 15
+ 5 | 2 ^ 4 | 16 | 31
+ 6 | 2 ^ 5 | 32 | 63
+ 7 | 2 ^ 6 | 64 | 127
+ 8 | 2 ^ 7 | 128 | 255
+ 9 | 2 ^ 8 | 256 | 511
+ 10 | 2 ^ 9 | 512 | 1023
+ 11 | 2 ^ 10 | 1024 | 2047
+ 12 | 2 ^ 11 | 2048 | 4095
+ 13 | 2 ^ 12 | 4096 | 8191
+ 14 | 2 ^ 13 | 8192 | 16383
+ 15 | 2 ^ 14 | 16384 | 32767
+ 16 | 2 ^ 15 | 32768 | 65535
+ 17 | 2 ^ 16 | 65536 | 131071
+ 18 | 2 ^ 17 | 131072 | 262143
+ 19 | 2 ^ 18 | 262144 | 524287
+ 20 | 2 ^ 19 | 524288 | 1048575
+ 21 | 2 ^ 20 | 1048576 | 2097151
+ 22 | 2 ^ 21 | 2097152 | 4194303
+ 23 | 2 ^ 22 | 4194304 | 8388607
+ 24 | 2 ^ 23 | 8388608 | 16777215
+ 25 | 2 ^ 24 | 16777216 | 33554431
+ 26 | 2 ^ 25 | 33554432 | 67108863
+ 27 | 2 ^ 26 | 67108864 | 134217727
+ 28 | 2 ^ 27 | 134217728 | 268435455
+ 29 | 2 ^ 28 | 268435456 | 536870911
+ 30 | 2 ^ 29 | 536870912 | 1073741823
+ 31 | 2 ^ 30 | 1073741824 | 2147483647
+
diff --git a/server/other/quest_variables.txt b/server/other/quest_variables.txt
deleted file mode 100644
index 0be1441..0000000
--- a/server/other/quest_variables.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-//===== Hercules Documentation ===============================
-//= Permanent Quest Variables
-//===== By: ==================================================
-//= Lupus
-//===== Current Version: =====================================
-//= 20120826
-//===== Description: =========================================
-//= This file should help to understand and manage bit-wise
-//= quest variables. You can store up to 31 boolean value into
-//= a single variable.
-//============================================================
-
-Variable: MISC_QUEST
---------------------------------------------------------------
-
-Quest: Juice Maker Quest
-Info: How to make juices. This bit keeps final state of the quest.
-How to set: set MISC_QUEST, MISC_QUEST | 1;
-How to check: if (MISC_QUEST & 1) {}
-
-Quest: Tempestra Quest
-Info: Determines if player has given a potion to Tempestra.
-How to set: set MISC_QUEST, MISC_QUEST | 2;
-How to check: if (MISC_QUEST & 2) {}
-
-Quest: Morgenstein Quest
-Info: How to make Mixture & Counteragent. This bit keeps final state of the quest.
-How to set: set MISC_QUEST, MISC_QUEST | 4;
-How to check: if (MISC_QUEST & 4) {}
-
-Quest: Prontera Culvert Quest
-Info: Determines if player can enter Prontera Culverts.
-How to set: set MISC_QUEST, MISC_QUEST | 8;
-How to check: if (MISC_QUEST & 8) {}
-
-Quest: Edgar's Offer
-Info: Cheap ticket from Izlude to Alberta. This bit keeps final state of the quest.
-How to set: set MISC_QUEST, MISC_QUEST | 16;
-How to check: if (MISC_QUEST & 16) {}
-
-Quest: Piano Quest
-Info: The only way from Niflheim to Umbala.
-How to set: set MISC_QUEST, MISC_QUEST | 32;
-How to check: if (MISC_QUEST & 32) {}
-
-Quest: Bio Ethics Quest
-Info: Quest for homunculus skill for alchemists. This bit keeps final state of the quest.
-How to set: set MISC_QUEST, MISC_QUEST|64;
-How to check: if (MISC_QUEST & 64) {}
-
-Quest: DTS Warper
-Info: Determines if player has already voted.
-How to set: set MISC_QUEST, MISC_QUEST|128;
-How to check: if (MISC_QUEST & 128) {}
-
-Quest: -
-Info: -
-How to set: set MISC_QUEST, MISC_QUEST | 256;
-How to check: if (MISC_QUEST & 256) {}
-
-Quest: Cube Room
-Info: Lighthalzen Cube Room quest (to enter Bio-Lab)
-How to set: set MISC_QUEST, MISC_QUEST | 512;
-How to check: if (MISC_QUEST & 512) {}
-
-Quest: Reset Skills Event
-Info: Yuno, Hypnotist Teacher
-How to set: set MISC_QUEST, MISC_QUEST | 1024;
-How to check: if (MISC_QUEST & 1024) {}
-
-Quest: Slotted Arm Guard Quest
-Info: Ninja Job Room, Boshuu
-How to set: set MISC_QUEST, MISC_QUEST | 2048;
-How to check: if (MISC_QUEST & 2048) {}
-
-Quest: Improved Arm Guard Quest
-Info: Ninja Job Room, Basshu
-How to set: set MISC_QUEST, MISC_QUEST | 4096;
-How to check: if (MISC_QUEST & 4096) {}
-
-Quest: Rachel Sanctuary Quest
-Info: Determines if player can access Rachel Santuary.
-How to set: set MISC_QUEST, MISC_QUEST | 8192;
-How to check: if (MISC_QUEST & 8192) {}
-
-Quest: Message Delivery Quest
-Info: Send a message to Elly, in Niflheim from Erious.
-How to set: set MISC_QUEST, MISC_QUEST | 16384;
-How to check: if (MISC_QUEST & 16384) {}
-
-Quest: Umbala Domestic Dispute?
-Info: Reward: 1 Yggdrasil Leaf.
-How to set: set MISC_QUEST, MISC_QUEST | 32768;
-How to check: if (MISC_QUEST & 32768) {}
-
-Quest: Access to the Turtle Island
-Info: Reward: ~1 OCA, OVB, GB.
-How to set: set MISC_QUEST, MISC_QUEST | 65536;
-How to check: if (MISC_QUEST & 65536) {}
-
-
-Variable: MISC_QUEST2
---------------------------------------------------------------
-
-Quest: -
-Info: -
-How to set: set MISC_QUEST2, MISC_QUEST2 | ?;
-How to check: if (MISC_QUEST2 & ?) {}
diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt
index 33d1ee4..90d4d77 100644
--- a/server/scripts/script_commands.txt
+++ b/server/scripts/script_commands.txt
@@ -2579,15 +2579,12 @@ playerattached() to check for the character attached to the script.
---------------------------------------
-*getnpcid(<type>{, "<npc name>"})
+*getnpcid({"<npc name>"})
Retrieves IDs of the currently invoked NPC. If a unique npc name is given,
-IDs of that NPC are retrieved instead. Type specifies what ID to retrieve
-and can be one of the following:
+IDs of that NPC are retrieved instead.
- 0 - Unit ID (GID)
-
-If an invalid type is given or the NPC does not exist, 0 is returned.
+If the NPC does not exist, 0 is returned.
---------------------------------------
@@ -8604,6 +8601,18 @@ Example:
---------------------------------------
+*data_to_string(<data>)
+
+Returns a string representation of the given data, similar to the .toString()
+method in JavaScript.
+
+Example:
+
+ data_to_string(DATATYPE_VAR) // "DATATYPE_VAR"
+ data_to_string(.@foo) // ".@foo"
+
+---------------------------------------
+
*charisalpha("<string>", <position>)
This function will return true if the character number Position in the given