Browse Source

Overhaul of the mob mode system
* This rewrite allows for better adaptation from the Aegis Class and Attribute fields.
* Refactored the renewal level penalty function.
* Slaves are now properly assigned an official slave mode of CanWalk, CanAttack, and NoRandomWalk.
* Removed extra Boss checks and adjusted others to use their proper functions.
* Properly implemented Skill Immunity mode to match Aegis.
* Separated MVP and Boss modes.
-- MVP mode defines when mobs should give MEXP, MVP Drops, and show the MVP sign.
-- MVP now have their own item drop configurations.
* Updated the mob_db and mob_skill_db to match the new mode structure.
-- Included a Perl tool (tools/convert_monstermode.pl) to allow people to convert their custom mobs to the new mode structure.
Thanks to @Playtester and @Lemongrass3110 for help with debugging and information!

aleos89 9 years ago
parent
commit
55e4df14c2

+ 5 - 0
conf/battle/drops.conf

@@ -40,30 +40,35 @@ mvp_item_third_get_time: 2000
 // The rate the common items are dropped (Items that are in the ETC tab, besides card)
 item_rate_common: 100
 item_rate_common_boss: 100
+item_rate_common_mvp: 100
 item_drop_common_min: 1
 item_drop_common_max: 10000
 
 // The rate healing items are dropped (items that restore HP or SP)
 item_rate_heal: 100
 item_rate_heal_boss: 100
+item_rate_heal_mvp: 100
 item_drop_heal_min: 1
 item_drop_heal_max: 10000
 
 // The rate at which usable items (in the item tab) other then healing items are dropped.
 item_rate_use: 100
 item_rate_use_boss: 100
+item_rate_use_mvp: 100
 item_drop_use_min: 1
 item_drop_use_max: 10000
 
 // The rate at which equipment is dropped.
 item_rate_equip: 100
 item_rate_equip_boss: 100
+item_rate_equip_mvp: 100
 item_drop_equip_min: 1
 item_drop_equip_max: 10000
 
 // The rate at which cards are dropped
 item_rate_card: 100
 item_rate_card_boss: 100
+item_rate_card_mvp: 100
 item_drop_card_min: 1
 item_drop_card_max: 10000
 

+ 2 - 1
conf/battle/monster.conf

@@ -154,7 +154,8 @@ force_random_spawn: no
 // 1: Slaves are always aggressive.
 // 2: Slaves are always passive.
 // 3: Same as master's aggressive/passive state.
-slaves_inherit_mode: 2
+// 4: Mode is overwritten with slave mode (official)
+slaves_inherit_mode: 4
 
 // Do summon slaves have the same walking speed as their master?
 // NOTE: The default is 3 for official servers.

+ 3 - 1
conf/msg_conf/map_msg.conf

@@ -946,7 +946,9 @@
 1022: Please enter ban time and a player name (usage: %s <time> <char name>).
 1023: You are not allowed to alter the time of a ban.
 
-//1024: free
+// @rates
+1024: MVP Drop Rates: Common %.2fx / Healing %.2fx / Usable %.2fx / Equipment %.2fx / Card %.2fx
+
 //1025: free
 
 // @kick

File diff suppressed because it is too large
+ 362 - 362
db/pre-re/mob_db.txt


+ 8 - 2
db/pre-re/mob_race2_db.txt

@@ -1,7 +1,7 @@
 // Monster Racial Groups Database
 //
 // Structure of Database:
-// Race2ID,MobID1,MobID2,MobID3,...,MobID9
+// Race2ID,MobID1,MobID2,MobID3,...,MobID50
 
 // Goblins
 1,1122,1123,1124,1125,1126,1258,1299
@@ -12,6 +12,12 @@
 // Golems
 4,1040,1278,1366,1497,2024
 // Guardians
-5,1285,1286,1287
+5,1285,1286,1287,2081
 // Ninja Classes (Pirate's_Pride)
 6,1315,1364,1401,1560
+// GvG
+7,1143,1905,1906,1907
+// Battlefield
+8,1906,1909,1914,1915
+// Treasure Chests
+9,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1938,1939,1940,1941,1942,1943,1944,1945,1946

+ 59 - 59
db/pre-re/mob_skill_db.txt

@@ -1,4 +1,4 @@
-// Mob Skill Database 
+// Mob Skill Database
 // Based on Aegis Episode 11.3
 //
 // Structure of Database:
@@ -124,8 +124,8 @@
 1028,Skeleton Soldier@NPC_UNDEADATTACK,angry,347,1,2000,0,5000,yes,target,always,0,,,,,,,
 1029,Isis@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6,
 1029,Isis@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,,
-1029,Isis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1029,Isis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3195,,,,,
+1029,Isis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1029,Isis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3095,,,,,
 1030,Anacondaq@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,,
 1030,Anacondaq@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,,
 1031,Poporing@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,,
@@ -143,12 +143,12 @@
 1035,Hunter Fly@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,always,0,,,,,,,
 1035,Hunter Fly@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2,
 1035,Hunter Fly@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6,
-1035,Hunter Fly@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1035,Hunter Fly@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3985,,,,,
+1035,Hunter Fly@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1035,Hunter Fly@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3885,,,,,
 1035,Hunter Fly@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,,
 1035,Hunter Fly@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,2,
 1035,Hunter Fly@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,6,
-1035,Hunter Fly@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
+1035,Hunter Fly@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
 1035,Hunter Fly@NPC_WINDATTACK,angry,187,1,2000,0,5000,yes,target,always,0,,,,,,,
 1036,Ghoul@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,,
 1036,Ghoul@NPC_POISON,angry,176,3,500,800,5000,no,target,always,0,,,,,,,
@@ -489,8 +489,8 @@
 1099,Argiope@AS_VENOMDUST,attack,140,1,500,1500,5000,no,target,always,0,,,,,,,
 1099,Argiope@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,,
 1099,Argiope@NPC_POISONATTACK,attack,188,2,500,500,5000,no,target,always,0,,,,,,,
-1099,Argiope@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1099,Argiope@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3195,,,,,
+1099,Argiope@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1099,Argiope@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 1100,Argos@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,,
 1100,Argos@PF_SPIDERWEB,idle,405,1,3000,0,10000,yes,target,always,0,,,,,,,
 1100,Argos@PF_SPIDERWEB,attack,405,1,2000,0,10000,yes,target,always,0,,,,,,,
@@ -502,8 +502,8 @@
 1101,Baphomet Jr.@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,0,2,,,,,,
 1101,Baphomet Jr.@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,29,
 1101,Baphomet Jr.@NPC_HALLUCINATION,chase,207,1,500,500,5000,yes,target,always,0,,,,,,29,
-1101,Baphomet Jr.@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1101,Baphomet Jr.@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3795,,,,,
+1101,Baphomet Jr.@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1101,Baphomet Jr.@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1102,Bathory@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,,
 1102,Bathory@NPC_EMOTION,chase,197,1,2000,0,5000,yes,self,always,0,30,,,,,,
 1102,Bathory@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,30,
@@ -702,8 +702,8 @@
 1138,Magnolia@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,,
 1139,Mantis@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6,
 1139,Mantis@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6,
-1139,Mantis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1139,Mantis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3195,,,,,
+1139,Mantis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1139,Mantis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3095,,,,,
 1140,Marduk@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1140,Marduk@MG_FIREBOLT,attack,19,3,500,1500,5000,yes,target,always,0,,,,,,9,
 1140,Marduk@MG_FIREBOLT,chase,19,3,500,1500,5000,yes,target,always,0,,,,,,9,
@@ -759,8 +759,8 @@
 1148,Medusa@MG_STONECURSE,attack,16,10,500,1500,5000,no,target,always,0,,,,,,3,
 1148,Medusa@NPC_PETRIFYATTACK,attack,180,5,500,500,5000,no,target,always,0,,,,,,3,
 1148,Medusa@NPC_PETRIFYATTACK,chase,180,5,500,500,5000,no,target,always,0,,,,,,3,
-1148,Medusa@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1148,Medusa@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3795,,,,,
+1148,Medusa@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1148,Medusa@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1149,Minorous@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1149,Minorous@BS_HAMMERFALL,attack,110,3,500,1500,5000,no,target,always,0,,,,,,,
 1149,Minorous@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6,
@@ -919,8 +919,8 @@
 1179,Whisper@AS_CLOAKING,idle,135,1,2000,200,5000,yes,self,always,0,,,,,,,
 1179,Whisper@AS_CLOAKING,chase,135,1,2000,200,5000,yes,self,always,0,,,,,,,
 1179,Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,,,,,,
-1179,Whisper@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1179,Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,28,0x3195,,,,,
+1179,Whisper@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1179,Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,28,0x3095,,,,,
 1179,Whisper@MO_BODYRELOCATION,chase,264,1,2000,500,5000,no,target,always,0,,,,,,28,
 1180,Nine-Tail@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1180,Nine-Tail@NPC_ATTRICHANGE,attack,161,1,500,2000,5000,no,self,myhpltmaxrate,30,,,,,,,
@@ -970,8 +970,8 @@
 1193,Alarm@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcge,2,,,,,,6,
 1194,Arclouse@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1194,Arclouse@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,,
-1194,Arclouse@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1194,Arclouse@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3195,,,,,
+1194,Arclouse@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1194,Arclouse@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 1195,Rideword@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,,
 1195,Rideword@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2,
 1195,Rideword@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,2,
@@ -1334,8 +1334,8 @@
 1287,Guardian Soldier@SM_BASH,attack,5,10,2000,0,5000,yes,target,always,0,,,,,,,
 1289,Maya Purple@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1289,Maya Purple@KN_BRANDISHSPEAR,attack,57,10,500,1000,5000,no,target,always,0,,,,,,,
-1289,Maya Purple@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x1A1,,,,,
-1289,Maya Purple@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x37B5,,,,,
+1289,Maya Purple@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1289,Maya Purple@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3695,,,,,
 1289,Maya Purple@NPC_SUMMONSLAVE,idle,196,3,10000,2000,60000,no,self,slavele,0,1194,,,,,,
 1289,Maya Purple@WZ_HEAVENDRIVE,attack,91,5,500,1200,5000,yes,target,always,0,,,,,,,
 1289,Maya Purple@WZ_HEAVENDRIVE,chase,91,5,500,1200,5000,yes,target,always,0,,,,,,,
@@ -1353,8 +1353,8 @@
 1292,Mini Demon@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1292,Mini Demon@NPC_DARKBREATH,attack,202,2,500,800,5000,no,target,always,0,,,,,,29,
 1292,Mini Demon@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,,
-1292,Mini Demon@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1292,Mini Demon@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,18,0x3795,,,,,
+1292,Mini Demon@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1292,Mini Demon@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,18,0x3695,,,,,
 1292,Mini Demon@NPC_SUMMONSLAVE,attack,196,2,10000,2000,60000,no,self,slavele,0,1109,,,,,11,
 1292,Mini Demon@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1109,,,,,11,
 1292,Mini Demon@NPC_DARKTHUNDER,attack,341,5,500,1500,5000,yes,target,always,0,,,,,,29,
@@ -1372,16 +1372,16 @@
 1294,Killer Mantis@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,,
 1294,Killer Mantis@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6,
 1294,Killer Mantis@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6,
-1294,Killer Mantis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1294,Killer Mantis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3795,,,,,
+1294,Killer Mantis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1294,Killer Mantis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1294,Killer Mantis@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1139,,,,,,
 1295,Owl Baron@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1295,Owl Baron@MG_LIGHTNINGBOLT,attack,20,5,2000,0,5000,yes,target,always,0,,,,,,,
 1295,Owl Baron@MG_LIGHTNINGBOLT,chase,20,5,2000,0,5000,yes,target,always,0,,,,,,,
 1295,Owl Baron@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,32,,,,,,
 1295,Owl Baron@SA_DISPELL,attack,289,5,0,0,30000,yes,target,always,0,,,,,,5,
-1295,Owl Baron@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x1A1,,,,,
-1295,Owl Baron@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x37B5,,,,,
+1295,Owl Baron@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1295,Owl Baron@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1295,Owl Baron@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1320,,,,,,
 1296,Kobold Leader@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1296,Kobold Leader@BS_ADRENALINE,attack,111,10,500,1500,300000,no,self,always,0,,,,,,6,
@@ -1417,8 +1417,8 @@
 1302,Dark Illusion@WZ_METEOR,chase,83,5,500,1500,5000,yes,target,always,0,,,,,,,
 1303,Giant Hornet@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1303,Giant Hornet@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,6,
-1303,Giant Hornet@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1303,Giant Hornet@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3795,,,,,
+1303,Giant Hornet@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1303,Giant Hornet@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3695,,,,,
 1303,Giant Hornet@NPC_SILENCEATTACK,chase,178,3,500,700,5000,no,target,always,0,,,,,,,
 1303,Giant Hornet@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6,
 1303,Giant Hornet@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,6,
@@ -1426,8 +1426,8 @@
 1304,Giant Spider@AS_GRIMTOOTH,chase,137,5,2000,0,5000,yes,target,always,0,,,,,,,
 1304,Giant Spider@NPC_POISON,attack,176,5,500,800,5000,no,target,always,0,,,,,,,
 1304,Giant Spider@NPC_STOP,attack,342,1,500,0,30000,yes,target,always,0,,,,,,,
-1304,Giant Spider@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1304,Giant Spider@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3795,,,,,
+1304,Giant Spider@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1304,Giant Spider@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3695,,,,,
 1304,Giant Spider@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1100,,,,,,
 1305,Ancient Worm@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1305,Ancient Worm@AS_VENOMDUST,attack,140,1,500,1500,5000,no,target,always,0,,,,,,,
@@ -1546,8 +1546,8 @@
 1320,Owl Duke@MG_LIGHTNINGBOLT,attack,20,3,2000,0,5000,yes,target,always,0,,,,,,,
 1320,Owl Duke@MG_LIGHTNINGBOLT,chase,20,3,2000,0,5000,yes,target,always,0,,,,,,,
 1320,Owl Duke@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,32,,,,,,
-1320,Owl Duke@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x1A1,,,,,
-1320,Owl Duke@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x37B5,,,,,
+1320,Owl Duke@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1320,Owl Duke@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1321,Dragon Tail@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,,
 1321,Dragon Tail@NPC_SLEEPATTACK,attack,182,3,500,0,5000,yes,target,always,0,,,,,,,
 1321,Dragon Tail@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,,
@@ -3544,7 +3544,7 @@
 1689,Bacsojin@NPC_SUMMONSLAVE,chase,196,4,10000,0,5000,yes,self,slavele,2,1690,,,,,,
 1690,Spring Rabbit@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,0,2,,,,,,
 1690,Spring Rabbit@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,,
-1690,Spring Rabbit@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0xC3,,,,,
+1690,Spring Rabbit@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x83,,,,,
 1690,Spring Rabbit@SM_BASH,attack,5,10,500,0,5000,yes,target,always,0,,,,,,6,
 1690,Spring Rabbit@TF_THROWSTONE,chase,152,1,2000,0,5000,yes,target,always,0,,,,,,,
 1691,Kraben@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,19,
@@ -4237,7 +4237,7 @@
 1783,Galion@NPC_COMBOATTACK,attack,171,1,500,500,5000,no,target,always,0,,,,,,6,
 1783,Galion@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,0,
 1783,Galion@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,,
-1783,Galion@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x31B5,,,,,
+1783,Galion@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 1783,Galion@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1783,Galion@NPC_SUMMONSLAVE,attack,196,3,10000,1000,30000,no,self,slavele,3,1794,,,,,,
 1783,Galion@NPC_SUMMONSLAVE,idle,196,3,10000,1000,30000,no,self,slavele,3,1794,,,,,,
@@ -4298,7 +4298,7 @@
 1791,Galion@NPC_COMBOATTACK,attack,171,1,500,500,5000,no,target,always,0,,,,,,6,
 1791,Galion@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,0,
 1791,Galion@NPC_DARKNESSATTACK,attack,190,3,2000,0,5000,yes,target,always,0,,,,,,,
-1791,Galion@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x31B5,,,,,
+1791,Galion@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 1791,Galion@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1794,Roween@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,,
 1794,Roween@NPC_COMBOATTACK,attack,171,4,500,500,5000,no,target,always,0,,,,,,6,
@@ -4624,8 +4624,8 @@
 1867,Banshee@NPC_VAMPIRE_GIFT,attack,679,1,500,0,5000,yes,self,always,0,,,,,,,
 1867,Banshee@NPC_DARKNESSATTACK,attack,190,3,1000,0,5000,yes,target,always,0,,,,,,21,
 1867,Banshee@NPC_EVILLAND,attack,670,1,500,0,5000,yes,target,always,0,,,,,,,
-1867,Banshee@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,7,0x181,,,,,
-1867,Banshee@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,0x3795,,,,,
+1867,Banshee@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,7,0x81,,,,,
+1867,Banshee@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,0x3695,,,,,
 1868,Banshee@NPC_CURSEATTACK,chase,181,1,1000,800,5000,yes,target,always,0,,,,,,6,
 1868,Banshee@NPC_WIDECURSE,attack,677,1,500,800,5000,no,self,always,0,,,,,,,
 1868,Banshee@NPC_CRITICALWOUND,attack,673,2,500,0,5000,yes,target,always,0,,,,,,,
@@ -4633,8 +4633,8 @@
 1868,Banshee@NPC_DARKSTRIKE,attack,340,9,2000,0,5000,yes,target,always,0,,,,,,,
 1868,Banshee@NPC_VAMPIRE_GIFT,attack,679,1,500,0,5000,yes,self,always,0,,,,,,,
 1868,Banshee@NPC_DARKNESSATTACK,attack,190,3,1000,0,5000,yes,target,always,0,,,,,,21,
-1868,Banshee@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,7,0x181,,,,,
-1868,Banshee@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,0x3795,,,,,
+1868,Banshee@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,7,0x81,,,,,
+1868,Banshee@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,0x3695,,,,,
 1869,Flame Skull@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2,
 1869,Flame Skull@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,29,,,,,,
 1869,Flame Skull@MG_FIREBALL,chase,17,5,1500,500,5000,no,target,attackpcge,2,,,,,,,
@@ -5012,9 +5012,9 @@
 1921,Incarnation of Morroc@HP_ASSUMPTIO,idle,361,5,5000,1000,5000,no,friend,friendhpltmaxrate,90,,,,,,,
 1921,Incarnation of Morroc@HP_ASSUMPTIO,chase,361,5,5000,1000,10000,no,friend,friendhpltmaxrate,90,,,,,,,
 1921,Incarnation of Morroc@HP_ASSUMPTIO,attack,361,5,5000,1000,10000,no,friend,friendhpltmaxrate,90,,,,,,,
-1922,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
-1922,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
-1922,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
+1922,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1922,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1922,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
 1922,Incarnation of Morroc@NPC_SLOWCAST,attack,672,5,10000,0,30000,yes,self,always,0,,,,,,,
 1922,Incarnation of Morroc@NPC_PULSESTRIKE,chase,661,5,2000,0,30000,yes,self,always,0,,,,,,,
 1922,Incarnation of Morroc@NPC_PULSESTRIKE,attack,661,5,2000,0,30000,yes,self,always,0,,,,,,,
@@ -5029,9 +5029,9 @@
 1922,Incarnation of Morroc@WZ_VERMILION,attack,85,5,2000,700,25000,no,target,always,0,,,,,,,
 1922,Incarnation of Morroc@WZ_JUPITEL,chase,84,5,5000,1000,20000,no,target,always,0,,,,,,,
 1922,Incarnation of Morroc@WZ_JUPITEL,attack,84,5,3000,1000,20000,no,target,always,0,,,,,,,
-1923,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
-1923,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
-1923,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
+1923,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1923,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1923,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
 1923,Incarnation of Morroc@NPC_SUMMONSLAVE,chase,196,7,10000,1000,10000,no,self,slavele,0,1937,,,,,,
 1923,Incarnation of Morroc@NPC_SUMMONSLAVE,attack,196,7,10000,1000,10000,no,self,slavele,0,1937,,,,,,
 1923,Incarnation of Morroc@NPC_BLOODDRAIN,attack,199,1,3000,0,0,yes,target,always,0,,,,,,,
@@ -5039,18 +5039,18 @@
 1923,Incarnation of Morroc@NPC_WIDEBLEEDING,attack,665,2,10000,500,100000,no,self,always,0,,,,,,,
 1923,Incarnation of Morroc@NPC_EARTHQUAKE,attack,653,1,2000,700,100000,no,self,myhpltmaxrate,10,,,,,,,
 1923,Incarnation of Morroc@SM_MAGNUM,attack,7,25,2000,500,5000,no,self,always,0,,,,,,,
-1924,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
-1924,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
-1924,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
+1924,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1924,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1924,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
 1924,Incarnation of Morroc@NPC_CRITICALWOUND,attack,673,4,10000,0,5000,yes,target,always,0,,,,,,,
 1924,Incarnation of Morroc@NPC_CRITICALWOUND,idle,673,4,5000,0,5000,yes,target,always,0,,,,,,,
 1924,Incarnation of Morroc@NPC_CRITICALWOUND,chase,673,4,5000,0,5000,yes,target,always,0,,,,,,,
 1924,Incarnation of Morroc@NPC_ENERGYDRAIN,chase,200,1,3000,0,0,yes,target,always,0,,,,,,,
 1924,Incarnation of Morroc@NPC_WIDESILENCE,chase,663,2,10000,1000,20000,no,self,always,0,,,,,,36,
 1924,Incarnation of Morroc@NPC_WIDESILENCE,attack,663,2,10000,1000,20000,no,self,always,0,,,,,,36,
-1925,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
-1925,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
-1925,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x39A5,,,,,
+1925,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1925,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1925,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
 1925,Incarnation of Morroc@HP_ASSUMPTIO,idle,361,5,5000,1000,5000,yes,friend,friendhpltmaxrate,90,,,,,,,
 1925,Incarnation of Morroc@HP_ASSUMPTIO,chase,361,5,5000,1000,10000,yes,friend,friendhpltmaxrate,90,,,,,,,
 1925,Incarnation of Morroc@HP_ASSUMPTIO,attack,361,5,5000,1000,10000,yes,friend,friendhpltmaxrate,90,,,,,,,
@@ -5279,8 +5279,8 @@
 1974,Banshee Master@NPC_VAMPIRE_GIFT,attack,679,1,500,0,5000,yes,self,always,0,,,,,,,
 1974,Banshee Master@NPC_DARKNESSATTACK,attack,190,3,1000,0,5000,yes,target,always,0,,,,,,21,
 1974,Banshee Master@NPC_EVILLAND,attack,670,1,500,0,5000,yes,target,always,0,,,,,,,
-1974,Banshee Master@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,7,0x181,,,,,
-1974,Banshee Master@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,0x3795,,,,,
+1974,Banshee Master@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,7,0x81,,,,,
+1974,Banshee Master@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,0x3695,,,,,
 1974,Banshee Master@NPC_SUMMONSLAVE,idle,196,2,10000,0,0,no,self,onspawn,0,1868,,,,,,
 1975,Beholder Master@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1975,Beholder Master@MO_BODYRELOCATION,chase,264,1,2000,500,5000,no,target,always,0,,,,,,52,
@@ -5358,8 +5358,8 @@
 1987,Centipede@NPC_COMBOATTACK,attack,171,1,3000,0,5000,yes,target,always,0,,,,,,,
 1987,Centipede@WZ_QUAGMIRE,chase,92,5,500,700,5000,yes,target,always,0,,,,,,12,
 1987,Centipede@HW_GANBANTEIN,attack,483,1,3000,0,7000,no,target,always,0,,,,,,,
-1987,Centipede@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-1987,Centipede@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3195,,,,,
+1987,Centipede@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1987,Centipede@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 1988,Nepenthes@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,,
 1988,Nepenthes@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,30,
 1988,Nepenthes@NPC_ENERGYDRAIN,chase,200,1,500,0,5000,yes,target,always,0,,,,,,30,
@@ -5384,8 +5384,8 @@
 1990,Hardrock Mammoth@NPC_SUMMONSLAVE,attack,196,3,10000,0,30000,yes,self,slavele,0,1997,1997,1997,,,,
 1990,Hardrock Mammoth@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,self,always,0,,,,,,,
 1990,Hardrock Mammoth@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,,
-1990,Hardrock Mammoth@NPC_EMOTION,chase,197,1,10000,0,5000,yes,self,always,0,7,0x37B5,,,,,
-1990,Hardrock Mammoth@NPC_EMOTION,attack,197,1,1000,0,5000,yes,self,always,0,19,0x1A1,,,,,
+1990,Hardrock Mammoth@NPC_EMOTION,chase,197,1,10000,0,5000,yes,self,always,0,7,0x3695,,,,,
+1990,Hardrock Mammoth@NPC_EMOTION,attack,197,1,1000,0,5000,yes,self,always,0,19,0x81,,,,,
 1990,Hardrock Mammoth@WZ_WATERBALL,attack,86,10,2000,0,10000,yes,target,always,0,,,,,,,
 1990,Hardrock Mammoth@LK_SPIRALPIERCE,attack,397,1,500,3000,10000,no,target,always,0,,,,,,,
 1990,Hardrock Mammoth@KN_TWOHANDQUICKEN,attack,60,30,10000,0,120000,no,self,myhpltmaxrate,30,,,,,,6,
@@ -5405,8 +5405,8 @@
 1991,Tendrilion@AL_TELEPORT,walk,26,1,5000,0,5000,yes,self,rudeattacked,,,,,,,,
 1991,Tendrilion@SM_PROVOKE,chase,6,10,500,600,5000,yes,target,myhpltmaxrate,80,,,,,,,
 1991,Tendrilion@SM_PROVOKE,attack,6,10,500,600,5000,yes,target,myhpltmaxrate,80,,,,,,,
-1991,Tendrilion@NPC_EMOTION,chase,197,1,10000,0,5000,yes,self,always,0,7,0x37B5,,,,,
-1991,Tendrilion@NPC_EMOTION,attack,197,1,1000,0,10000,yes,self,always,0,19,0x39A5,,,,,
+1991,Tendrilion@NPC_EMOTION,chase,197,1,10000,0,5000,yes,self,always,0,7,0x3695,,,,,
+1991,Tendrilion@NPC_EMOTION,attack,197,1,1000,0,10000,yes,self,always,0,19,0x3885,,,,,
 1991,Tendrilion@NPC_CRITICALWOUND,chase,673,2,2000,500,60000,no,target,always,0,,,,,,,
 1991,Tendrilion@NPC_CRITICALWOUND,attack,673,2,2000,700,60000,no,target,always,0,,,,,,,
 1991,Tendrilion@MO_BODYRELOCATION,chase,264,1,2000,200,1000,yes,target,always,0,,,,,,,

+ 37 - 37
db/re/level_penalty.txt

@@ -11,50 +11,50 @@
 // Note: RENEWAL_DROP and/or RENEWAL_EXP must be enabled.
 
 // EXP modifiers due to level difference
-1,0,16,40
-1,0,15,115
-1,0,14,120
-1,0,13,125
-1,0,12,130
-1,0,11,135
-1,0,10,140
-1,0,9,135
-1,0,8,130
-1,0,7,125
-1,0,6,120
-1,0,5,115
-1,0,4,110
-1,0,3,105
-1,0,0,100
-1,0,-1,100
-1,0,-6,95
-1,0,-11,90
-1,0,-16,85
-1,0,-21,60
-1,0,-26,35
-1,0,-31,10
+1,CLASS_NORMAL,16,40
+1,CLASS_NORMAL,15,115
+1,CLASS_NORMAL,14,120
+1,CLASS_NORMAL,13,125
+1,CLASS_NORMAL,12,130
+1,CLASS_NORMAL,11,135
+1,CLASS_NORMAL,10,140
+1,CLASS_NORMAL,9,135
+1,CLASS_NORMAL,8,130
+1,CLASS_NORMAL,7,125
+1,CLASS_NORMAL,6,120
+1,CLASS_NORMAL,5,115
+1,CLASS_NORMAL,4,110
+1,CLASS_NORMAL,3,105
+1,CLASS_NORMAL,0,100
+1,CLASS_NORMAL,-1,100
+1,CLASS_NORMAL,-6,95
+1,CLASS_NORMAL,-11,90
+1,CLASS_NORMAL,-16,85
+1,CLASS_NORMAL,-21,60
+1,CLASS_NORMAL,-26,35
+1,CLASS_NORMAL,-31,10
 
 // Boss Type
-1,1,0,100
+1,CLASS_BOSS,0,100
 
 // Guardian Type
-1,2,0,100
+1,CLASS_GUARDIAN,0,100
 
 // Drop rate modifiers due to level difference
-2,0,16,50
-2,0,13,60
-2,0,10,70
-2,0,7,80
-2,0,4,90
-2,0,0,100
-2,0,-4,90
-2,0,-7,80
-2,0,-10,70
-2,0,-13,60
-2,0,-16,50
+2,CLASS_NORMAL,16,50
+2,CLASS_NORMAL,13,60
+2,CLASS_NORMAL,10,70
+2,CLASS_NORMAL,7,80
+2,CLASS_NORMAL,4,90
+2,CLASS_NORMAL,0,100
+2,CLASS_NORMAL,-4,90
+2,CLASS_NORMAL,-7,80
+2,CLASS_NORMAL,-10,70
+2,CLASS_NORMAL,-13,60
+2,CLASS_NORMAL,-16,50
 
 // Boss Type
-2,1,0,100
+2,CLASS_BOSS,0,100
 
 // Guardian Type
-2,2,0,100
+2,CLASS_GUARDIAN,0,100

File diff suppressed because it is too large
+ 341 - 341
db/re/mob_db.txt


+ 8 - 2
db/re/mob_race2_db.txt

@@ -1,7 +1,7 @@
 // Monster Racial Groups Database
 //
 // Structure of Database:
-// Race2ID,MobID1,MobID2,MobID3,...,MobID9
+// Race2ID,MobID1,MobID2,MobID3,...,MobID50
 
 // Goblins
 1,1122,1123,1124,1125,1126,1258,1299
@@ -12,6 +12,12 @@
 // Golems
 4,1040,1278,1366,1497,2024
 // Guardians
-5,1285,1286,1287
+5,1285,1286,1287,2081
 // Ninja Classes (Pirate's_Pride)
 6,1315,1364,1401,1560
+// GvG
+7,1143,1905,1906,1907
+// Battlefield
+8,1906,1909,1914,1915
+// Treasure Chests
+9,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1938,1939,1940,1941,1942,1943,1944,1945,1946

+ 118 - 118
db/re/mob_skill_db.txt

@@ -1,4 +1,4 @@
-// Mob Skill Database 
+// Mob Skill Database
 // Based on Aegis Episode 11.3
 //
 // Structure of Database:
@@ -125,7 +125,7 @@
 1029,Isis@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6,
 1029,Isis@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,,
 1029,Isis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1029,Isis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3195,,,,,
+1029,Isis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3095,,,,,
 1030,Anacondaq@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,,
 1030,Anacondaq@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,,
 1031,Poporing@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,,
@@ -144,7 +144,7 @@
 1035,Hunter Fly@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2,
 1035,Hunter Fly@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6,
 1035,Hunter Fly@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1035,Hunter Fly@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3985,,,,,
+1035,Hunter Fly@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3885,,,,,
 1035,Hunter Fly@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,,
 1035,Hunter Fly@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,2,
 1035,Hunter Fly@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,6,
@@ -490,7 +490,7 @@
 1099,Argiope@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,,
 1099,Argiope@NPC_POISONATTACK,attack,188,2,500,500,5000,no,target,always,0,,,,,,,
 1099,Argiope@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1099,Argiope@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3795,,,,,
+1099,Argiope@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3695,,,,,
 1100,Argos@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,,
 1100,Argos@PF_SPIDERWEB,idle,405,1,3000,0,10000,yes,target,always,0,,,,,,,
 1100,Argos@PF_SPIDERWEB,attack,405,1,2000,0,10000,yes,target,always,0,,,,,,,
@@ -503,7 +503,7 @@
 1101,Baphomet Jr.@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,29,
 1101,Baphomet Jr.@NPC_HALLUCINATION,chase,207,1,500,500,5000,yes,target,always,0,,,,,,29,
 1101,Baphomet Jr.@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1101,Baphomet Jr.@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3795,,,,,
+1101,Baphomet Jr.@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1102,Bathory@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,,
 1102,Bathory@NPC_EMOTION,chase,197,1,2000,0,5000,yes,self,always,0,30,,,,,,
 1102,Bathory@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,30,
@@ -703,7 +703,7 @@
 1139,Mantis@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6,
 1139,Mantis@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6,
 1139,Mantis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1139,Mantis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3195,,,,,
+1139,Mantis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3095,,,,,
 1140,Marduk@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1140,Marduk@MG_FIREBOLT,attack,19,3,500,1500,5000,yes,target,always,0,,,,,,9,
 1140,Marduk@MG_FIREBOLT,chase,19,3,500,1500,5000,yes,target,always,0,,,,,,9,
@@ -760,7 +760,7 @@
 1148,Medusa@NPC_PETRIFYATTACK,attack,180,5,500,500,5000,no,target,always,0,,,,,,3,
 1148,Medusa@NPC_PETRIFYATTACK,chase,180,5,500,500,5000,no,target,always,0,,,,,,3,
 1148,Medusa@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1148,Medusa@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3795,,,,,
+1148,Medusa@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1149,Minorous@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1149,Minorous@BS_HAMMERFALL,attack,110,3,500,1500,5000,no,target,always,0,,,,,,,
 1149,Minorous@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6,
@@ -920,7 +920,7 @@
 1179,Whisper@AS_CLOAKING,chase,135,1,2000,200,5000,yes,self,always,0,,,,,,,
 1179,Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,,,,,,
 1179,Whisper@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1179,Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,28,0x3195,,,,,
+1179,Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,28,0x3095,,,,,
 1179,Whisper@MO_BODYRELOCATION,chase,264,1,2000,500,5000,no,target,always,0,,,,,,28,
 1180,Nine-Tail@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1180,Nine-Tail@NPC_ATTRICHANGE,attack,161,1,500,2000,5000,no,self,myhpltmaxrate,30,,,,,,,
@@ -971,7 +971,7 @@
 1194,Arclouse@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1194,Arclouse@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,,
 1194,Arclouse@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1194,Arclouse@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3195,,,,,
+1194,Arclouse@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 1195,Rideword@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,,
 1195,Rideword@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2,
 1195,Rideword@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,2,
@@ -1335,8 +1335,8 @@
 1287,Guardian Soldier@SM_BASH,attack,5,10,2000,0,5000,yes,target,always,0,,,,,,,
 1289,Maya Purple@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1289,Maya Purple@KN_BRANDISHSPEAR,attack,57,10,500,1000,5000,no,target,always,0,,,,,,,
-1289,Maya Purple@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0xA1,,,,,
-1289,Maya Purple@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x37B5,,,,,
+1289,Maya Purple@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1289,Maya Purple@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3695,,,,,
 1289,Maya Purple@NPC_SUMMONSLAVE,idle,196,3,10000,2000,60000,no,self,slavele,0,1194,,,,,,
 1289,Maya Purple@WZ_HEAVENDRIVE,attack,91,5,500,1200,5000,yes,target,always,0,,,,,,,
 1289,Maya Purple@WZ_HEAVENDRIVE,chase,91,5,500,1200,5000,yes,target,always,0,,,,,,,
@@ -1355,7 +1355,7 @@
 1292,Mini Demon@NPC_DARKBREATH,attack,202,2,500,800,5000,no,target,always,0,,,,,,29,
 1292,Mini Demon@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,,
 1292,Mini Demon@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1292,Mini Demon@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,18,0x3795,,,,,
+1292,Mini Demon@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,18,0x3695,,,,,
 1292,Mini Demon@NPC_SUMMONSLAVE,attack,196,2,10000,2000,60000,no,self,slavele,0,1109,,,,,11,
 1292,Mini Demon@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1109,,,,,11,
 1292,Mini Demon@NPC_DARKTHUNDER,attack,341,5,500,1500,5000,yes,target,always,0,,,,,,29,
@@ -1374,15 +1374,15 @@
 1294,Killer Mantis@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6,
 1294,Killer Mantis@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6,
 1294,Killer Mantis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1294,Killer Mantis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3795,,,,,
+1294,Killer Mantis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1294,Killer Mantis@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1139,,,,,,
 1295,Owl Baron@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1295,Owl Baron@MG_LIGHTNINGBOLT,attack,20,5,2000,0,5000,yes,target,always,0,,,,,,,
 1295,Owl Baron@MG_LIGHTNINGBOLT,chase,20,5,2000,0,5000,yes,target,always,0,,,,,,,
 1295,Owl Baron@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,32,,,,,,
 1295,Owl Baron@SA_DISPELL,attack,289,5,0,0,30000,yes,target,always,0,,,,,,5,
-1295,Owl Baron@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0xA1,,,,,
-1295,Owl Baron@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x37B5,,,,,
+1295,Owl Baron@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1295,Owl Baron@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1295,Owl Baron@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1320,,,,,,
 1296,Kobold Leader@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1296,Kobold Leader@BS_ADRENALINE,attack,111,10,500,1500,300000,no,self,always,0,,,,,,6,
@@ -1419,7 +1419,7 @@
 1303,Giant Hornet@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1303,Giant Hornet@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,6,
 1303,Giant Hornet@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1303,Giant Hornet@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3795,,,,,
+1303,Giant Hornet@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3695,,,,,
 1303,Giant Hornet@NPC_SILENCEATTACK,chase,178,3,500,700,5000,no,target,always,0,,,,,,,
 1303,Giant Hornet@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6,
 1303,Giant Hornet@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,6,
@@ -1428,7 +1428,7 @@
 1304,Giant Spider@NPC_POISON,attack,176,5,500,800,5000,no,target,always,0,,,,,,,
 1304,Giant Spider@NPC_STOP,attack,342,1,500,0,30000,yes,target,always,0,,,,,,,
 1304,Giant Spider@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1304,Giant Spider@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3795,,,,,
+1304,Giant Spider@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,9,0x3695,,,,,
 1304,Giant Spider@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1100,,,,,,
 1305,Ancient Worm@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1305,Ancient Worm@AS_VENOMDUST,attack,140,1,500,1500,5000,no,target,always,0,,,,,,,
@@ -1547,8 +1547,8 @@
 1320,Owl Duke@MG_LIGHTNINGBOLT,attack,20,3,2000,0,5000,yes,target,always,0,,,,,,,
 1320,Owl Duke@MG_LIGHTNINGBOLT,chase,20,3,2000,0,5000,yes,target,always,0,,,,,,,
 1320,Owl Duke@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,32,,,,,,
-1320,Owl Duke@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0xA1,,,,,
-1320,Owl Duke@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x37B5,,,,,
+1320,Owl Duke@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+1320,Owl Duke@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 1321,Dragon Tail@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,,
 1321,Dragon Tail@NPC_SLEEPATTACK,attack,182,3,500,0,5000,yes,target,always,0,,,,,,,
 1321,Dragon Tail@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,,
@@ -3545,7 +3545,7 @@
 1689,Bacsojin@NPC_SUMMONSLAVE,chase,196,4,10000,0,5000,yes,self,slavele,2,1690,,,,,,
 1690,Spring Rabbit@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,0,2,,,,,,
 1690,Spring Rabbit@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,,
-1690,Spring Rabbit@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0xC3,,,,,
+1690,Spring Rabbit@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x83,,,,,
 1690,Spring Rabbit@SM_BASH,attack,5,10,500,0,5000,yes,target,always,0,,,,,,6,
 1690,Spring Rabbit@TF_THROWSTONE,chase,152,1,2000,0,5000,yes,target,always,0,,,,,,,
 1691,Kraben@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,19,
@@ -4238,7 +4238,7 @@
 1783,Galion@NPC_COMBOATTACK,attack,171,1,500,500,5000,no,target,always,0,,,,,,6,
 1783,Galion@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,0,
 1783,Galion@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,,
-1783,Galion@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x31B5,,,,,
+1783,Galion@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 1783,Galion@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1783,Galion@NPC_SUMMONSLAVE,attack,196,3,10000,1000,30000,no,self,slavele,3,1794,,,,,,
 1783,Galion@NPC_SUMMONSLAVE,idle,196,3,10000,1000,30000,no,self,slavele,3,1794,,,,,,
@@ -4299,7 +4299,7 @@
 1791,Galion@NPC_COMBOATTACK,attack,171,1,500,500,5000,no,target,always,0,,,,,,6,
 1791,Galion@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,0,
 1791,Galion@NPC_DARKNESSATTACK,attack,190,3,2000,0,5000,yes,target,always,0,,,,,,,
-1791,Galion@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x31B5,,,,,
+1791,Galion@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 1791,Galion@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1794,Roween@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,,
 1794,Roween@NPC_COMBOATTACK,attack,171,4,500,500,5000,no,target,always,0,,,,,,6,
@@ -5013,9 +5013,9 @@
 1921,Incarnation of Morroc@HP_ASSUMPTIO,idle,361,5,5000,1000,5000,no,friend,friendhpltmaxrate,90,,,,,,,
 1921,Incarnation of Morroc@HP_ASSUMPTIO,chase,361,5,5000,1000,10000,no,friend,friendhpltmaxrate,90,,,,,,,
 1921,Incarnation of Morroc@HP_ASSUMPTIO,attack,361,5,5000,1000,10000,no,friend,friendhpltmaxrate,90,,,,,,,
-1922,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
-1922,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
-1922,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
+1922,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1922,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1922,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
 1922,Incarnation of Morroc@NPC_SLOWCAST,attack,672,5,10000,0,30000,yes,self,always,0,,,,,,,
 1922,Incarnation of Morroc@NPC_PULSESTRIKE,chase,661,5,2000,0,30000,yes,self,always,0,,,,,,,
 1922,Incarnation of Morroc@NPC_PULSESTRIKE,attack,661,5,2000,0,30000,yes,self,always,0,,,,,,,
@@ -5030,9 +5030,9 @@
 1922,Incarnation of Morroc@WZ_VERMILION,attack,85,5,2000,700,25000,no,target,always,0,,,,,,,
 1922,Incarnation of Morroc@WZ_JUPITEL,chase,84,5,5000,1000,20000,no,target,always,0,,,,,,,
 1922,Incarnation of Morroc@WZ_JUPITEL,attack,84,5,3000,1000,20000,no,target,always,0,,,,,,,
-1923,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
-1923,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
-1923,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
+1923,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1923,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1923,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
 1923,Incarnation of Morroc@NPC_SUMMONSLAVE,chase,196,7,10000,1000,10000,no,self,slavele,0,1937,,,,,,
 1923,Incarnation of Morroc@NPC_SUMMONSLAVE,attack,196,7,10000,1000,10000,no,self,slavele,0,1937,,,,,,
 1923,Incarnation of Morroc@NPC_BLOODDRAIN,attack,199,1,3000,0,0,yes,target,always,0,,,,,,,
@@ -5040,18 +5040,18 @@
 1923,Incarnation of Morroc@NPC_WIDEBLEEDING,attack,665,2,10000,500,100000,no,self,always,0,,,,,,,
 1923,Incarnation of Morroc@NPC_EARTHQUAKE,attack,653,1,2000,700,100000,no,self,myhpltmaxrate,10,,,,,,,
 1923,Incarnation of Morroc@SM_MAGNUM,attack,7,25,2000,500,5000,no,self,always,0,,,,,,,
-1924,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
-1924,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
-1924,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
+1924,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1924,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1924,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
 1924,Incarnation of Morroc@NPC_CRITICALWOUND,attack,673,4,10000,0,5000,yes,target,always,0,,,,,,,
 1924,Incarnation of Morroc@NPC_CRITICALWOUND,idle,673,4,5000,0,5000,yes,target,always,0,,,,,,,
 1924,Incarnation of Morroc@NPC_CRITICALWOUND,chase,673,4,5000,0,5000,yes,target,always,0,,,,,,,
 1924,Incarnation of Morroc@NPC_ENERGYDRAIN,chase,200,1,3000,0,0,yes,target,always,0,,,,,,,
 1924,Incarnation of Morroc@NPC_WIDESILENCE,chase,663,2,10000,1000,20000,no,self,always,0,,,,,,36,
 1924,Incarnation of Morroc@NPC_WIDESILENCE,attack,663,2,10000,1000,20000,no,self,always,0,,,,,,36,
-1925,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
-1925,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
-1925,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x38A5,,,,,
+1925,Incarnation of Morroc@NPC_EMOTION,idle,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1925,Incarnation of Morroc@NPC_EMOTION,chase,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
+1925,Incarnation of Morroc@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,9,0x3885,,,,,
 1925,Incarnation of Morroc@HP_ASSUMPTIO,idle,361,5,5000,1000,5000,yes,friend,friendhpltmaxrate,90,,,,,,,
 1925,Incarnation of Morroc@HP_ASSUMPTIO,chase,361,5,5000,1000,10000,yes,friend,friendhpltmaxrate,90,,,,,,,
 1925,Incarnation of Morroc@HP_ASSUMPTIO,attack,361,5,5000,1000,10000,yes,friend,friendhpltmaxrate,90,,,,,,,
@@ -5281,7 +5281,7 @@
 1974,Banshee Master@NPC_DARKNESSATTACK,attack,190,3,1000,0,5000,yes,target,always,0,,,,,,21,
 1974,Banshee Master@NPC_EVILLAND,attack,670,1,500,0,5000,yes,target,always,0,,,,,,,
 1974,Banshee Master@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,7,0x81,,,,,
-1974,Banshee Master@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,0x3795,,,,,
+1974,Banshee Master@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,0x3695,,,,,
 1974,Banshee Master@NPC_SUMMONSLAVE,idle,196,2,10000,0,0,no,self,onspawn,0,1868,,,,,,
 1975,Beholder Master@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 1975,Beholder Master@MO_BODYRELOCATION,chase,264,1,2000,500,5000,no,target,always,0,,,,,,52,
@@ -5360,7 +5360,7 @@
 1987,Centipede@WZ_QUAGMIRE,chase,92,5,500,700,5000,yes,target,always,0,,,,,,12,
 1987,Centipede@HW_GANBANTEIN,attack,483,1,3000,0,7000,no,target,always,0,,,,,,,
 1987,Centipede@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
-1987,Centipede@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3195,,,,,
+1987,Centipede@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 1988,Nepenthes@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,,
 1988,Nepenthes@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,30,
 1988,Nepenthes@NPC_ENERGYDRAIN,chase,200,1,500,0,5000,yes,target,always,0,,,,,,30,
@@ -5385,8 +5385,8 @@
 1990,Hardrock Mammoth@NPC_SUMMONSLAVE,attack,196,3,10000,0,30000,yes,self,slavele,0,1997,1997,1997,,,,
 1990,Hardrock Mammoth@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,self,always,0,,,,,,,
 1990,Hardrock Mammoth@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,,
-1990,Hardrock Mammoth@NPC_EMOTION,chase,197,1,10000,0,5000,yes,self,always,0,7,0x36B5,,,,,
-1990,Hardrock Mammoth@NPC_EMOTION,attack,197,1,1000,0,5000,yes,self,always,0,19,0xA1,,,,,
+1990,Hardrock Mammoth@NPC_EMOTION,chase,197,1,10000,0,5000,yes,self,always,0,7,0x3695,,,,,
+1990,Hardrock Mammoth@NPC_EMOTION,attack,197,1,1000,0,5000,yes,self,always,0,19,0x81,,,,,
 1990,Hardrock Mammoth@WZ_WATERBALL,attack,86,10,2000,0,10000,yes,target,always,0,,,,,,,
 1990,Hardrock Mammoth@LK_SPIRALPIERCE,attack,397,1,500,3000,10000,no,target,always,0,,,,,,,
 1990,Hardrock Mammoth@KN_TWOHANDQUICKEN,attack,60,30,10000,0,120000,no,self,myhpltmaxrate,30,,,,,,6,
@@ -5406,8 +5406,8 @@
 1991,Tendrilion@AL_TELEPORT,walk,26,1,5000,0,5000,yes,self,rudeattacked,,,,,,,,
 1991,Tendrilion@SM_PROVOKE,chase,6,10,500,600,5000,yes,target,myhpltmaxrate,80,,,,,,,
 1991,Tendrilion@SM_PROVOKE,attack,6,10,500,600,5000,yes,target,myhpltmaxrate,80,,,,,,,
-1991,Tendrilion@NPC_EMOTION,chase,197,1,10000,0,5000,yes,self,always,0,7,0x36B5,,,,,
-1991,Tendrilion@NPC_EMOTION,attack,197,1,1000,0,10000,yes,self,always,0,19,0x38A5,,,,,
+1991,Tendrilion@NPC_EMOTION,chase,197,1,10000,0,5000,yes,self,always,0,7,0x3695,,,,,
+1991,Tendrilion@NPC_EMOTION,attack,197,1,1000,0,10000,yes,self,always,0,19,0x3885,,,,,
 1991,Tendrilion@NPC_CRITICALWOUND,chase,673,2,2000,500,60000,no,target,always,0,,,,,,,
 1991,Tendrilion@NPC_CRITICALWOUND,attack,673,2,2000,700,60000,no,target,always,0,,,,,,,
 1991,Tendrilion@MO_BODYRELOCATION,chase,264,1,2000,200,1000,yes,target,always,0,,,,,,,
@@ -5858,15 +5858,15 @@
 2083,Scaraba@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,0,,,,,,,
 2083,Scaraba@NPC_COMBOATTACK,chase,171,2,500,700,5000,no,target,always,0,,,,,,,
 2083,Scaraba@NPC_STOP,attack,342,1,500,500,5000,no,target,always,0,,,,,,,
-2083,Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,19,0x181,,,,,
-2083,Scaraba@NPC_EMOTION,idle,197,1,3000,0,5000,yes,self,always,0,6,0x3195,,,,,
+2083,Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,19,0x81,,,,,
+2083,Scaraba@NPC_EMOTION,idle,197,1,3000,0,5000,yes,self,always,0,6,0x3095,,,,,
 2084,Scaraba@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,,
 2084,Scaraba@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,29,
 2084,Scaraba@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,0,,,,,,,
 2084,Scaraba@SM_BASH,attack,5,5,500,0,5000,yes,target,always,0,,,,,,,
 2084,Scaraba@NPC_STOP,attack,342,1,500,500,5000,no,target,always,0,,,,,,,
-2084,Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,19,0x181,,,,,
-2084,Scaraba@NPC_EMOTION,idle,197,1,3000,0,5000,yes,self,always,0,6,0x3195,,,,,
+2084,Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,19,0x81,,,,,
+2084,Scaraba@NPC_EMOTION,idle,197,1,3000,0,5000,yes,self,always,0,6,0x3095,,,,,
 2085,Antler Scaraba@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,0,,,,,,,
 2085,Antler Scaraba@BS_ADRENALINE,attack,111,10,500,1500,300000,no,self,always,0,,,,,,6,
 2085,Antler Scaraba@BS_ADRENALINE,chase,111,10,500,1500,300000,no,self,always,0,,,,,,6,
@@ -5884,8 +5884,8 @@
 2086,Rake Scaraba@NPC_STONESKIN,attack,675,3,10000,1000,30000,no,self,myhpltmaxrate,50,,,,,,6,
 2086,Rake Scaraba@NPC_STONESKIN,chase,675,3,10000,1000,30000,no,self,myhpltmaxrate,50,,,,,,6,
 2086,Rake Scaraba@PF_SPIDERWEB,chase,405,1,300,0,10000,yes,target,always,0,,,,,,7,
-2086,Rake Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,19,0x181,,,,,
-2086,Rake Scaraba@NPC_EMOTION,idle,197,1,3000,0,5000,yes,self,always,0,6,0x3195,,,,,
+2086,Rake Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,0,19,0x81,,,,,
+2086,Rake Scaraba@NPC_EMOTION,idle,197,1,3000,0,5000,yes,self,always,0,6,0x3095,,,,,
 2087,Queen Scaraba@AL_HEAL,attack,28,11,10000,0,5000,no,friend,friendhpltmaxrate,60,,,,,,3,
 2087,Queen Scaraba@AL_HEAL,attack,28,11,10000,0,5000,no,self,myhpltmaxrate,30,,,,,,3,
 2087,Queen Scaraba@AL_HEAL,chase,28,11,10000,0,5000,no,friend,friendhpltmaxrate,60,,,,,,3,
@@ -8183,8 +8183,8 @@
 2357,Nightmare Mimic@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,,
 2358,Nightmare Arclouse@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 2358,Nightmare Arclouse@NPC_GROUNDATTACK,attack,185,3,2000,0,5000,yes,target,always,0,,,,,,,
-2358,Nightmare Arclouse@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x181,,,,,
-2358,Nightmare Arclouse@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3195,,,,,
+2358,Nightmare Arclouse@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
+2358,Nightmare Arclouse@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,7,0x3095,,,,,
 2359,Nightmare Arclouse@NPC_GROUNDATTACK,angry,185,1,2000,0,5000,yes,target,always,0,,,,,,,
 2359,Nightmare Arclouse@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,,
 2360,Nightmare Ancient Mummy@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
@@ -8467,7 +8467,7 @@
 2618,Solid Whisper@AS_CLOAKING,idle,135,1,2000,200,5000,yes,self,always,,,,,,,,
 2618,Solid Whisper@AS_CLOAKING,chase,135,1,2000,200,5000,yes,self,always,,,,,,,,
 2618,Solid Whisper@MO_BODYRELOCATION,chase,264,1,2000,500,5000,no,target,always,,,,,,,28,
-2618,Solid Whisper@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2618,Solid Whisper@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2618,Solid Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,28,0x3095,,,,,
 2618,Solid Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,,,,,,,
 2619,Weak Skeleton Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,2405,,,,,,
@@ -8500,7 +8500,7 @@
 2624,Venomous Ringleader@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,skillused,173,,,,,,23,
 2624,Venomous Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1621,,,,,,
 2625,Furious Venatu@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
-2625,Furious Venatu@NPC_EMOTION,chase,197,1,100,0,5000,yes,self,always,,7,0x0081,,,,,
+2625,Furious Venatu@NPC_EMOTION,chase,197,1,100,0,5000,yes,self,always,,7,0x81,,,,,
 2625,Furious Venatu@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,,0x3695,,,,,
 2625,Furious Venatu@NPC_GUIDEDATTACK,attack,172,3,500,1000,20000,no,target,always,,,,,,,6,
 2625,Furious Venatu@NPC_SLEEPATTACK,attack,182,3,500,0,5000,yes,target,always,,,,,,,,
@@ -8529,7 +8529,7 @@
 2629,Ungoliant Ringleader@NPC_PETRIFYATTACK,attack,180,2,1000,500,5000,no,target,always,,,,,,,3,
 2629,Ungoliant Ringleader@NPC_POISONATTACK,attack,188,3,1000,0,5000,yes,target,always,,,,,,,,
 2629,Ungoliant Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,1618,,,,,,
-2630,Furious Toucan@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2630,Furious Toucan@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2630,Furious Toucan@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2630,Furious Toucan@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,,2,,,,,,
 2630,Furious Toucan@NPC_SILENCEATTACK,attack,178,3,500,700,5000,no,target,always,,,,,,,,
@@ -8564,7 +8564,7 @@
 2637,Solid Tatacho@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 2637,Solid Tatacho@BS_HAMMERFALL,attack,110,3,500,1500,5000,no,target,always,,,,,,,,
 2637,Solid Tatacho@HW_GANBANTEIN,attack,483,1,2000,0,7000,no,target,always,,,,,,,,
-2637,Solid Tatacho@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2637,Solid Tatacho@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2637,Solid Tatacho@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3095,,,,,
 2637,Solid Tatacho@NPC_STUNATTACK,attack,179,3,500,1000,5000,yes,target,always,,,,,,,19,
 2638,Tarou Ringleader@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,,,,,,,,
@@ -8575,7 +8575,7 @@
 2639,Furious Tamruan@NPC_SILENCEATTACK,attack,178,5,2000,700,5000,no,target,always,,,,,,,9,
 2640,Elusive Sting@AM_POTIONPITCHER,idle,231,4,10000,0,5000,yes,self,mystatuson,hiding,,,,,,,
 2640,Elusive Sting@KN_SPEARSTAB,attack,58,10,500,800,5000,no,target,always,,,,,,,11,
-2640,Elusive Sting@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2640,Elusive Sting@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2640,Elusive Sting@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,20,0x3695,,,,,
 2640,Elusive Sting@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,,,,,,,,
 2640,Elusive Sting@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,,,,,,,12,
@@ -8594,7 +8594,7 @@
 2644,Furious Stalactic Golem@BS_HAMMERFALL,attack,110,5,500,1500,5000,no,target,always,,,,,,,,
 2644,Furious Stalactic Golem@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,,,,,,,,
 2644,Furious Stalactic Golem@CR_AUTOGUARD,chase,249,5,2000,0,300000,yes,self,longrangeattacked,,,,,,,,
-2644,Furious Stalactic Golem@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x0091,,,,,
+2644,Furious Stalactic Golem@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x91,,,,,
 2644,Furious Stalactic Golem@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,,6,0x3885,,,,,
 2644,Furious Stalactic Golem@NPC_STUNATTACK,attack,179,4,500,1500,5000,no,target,always,,,,,,,6,
 2644,Furious Stalactic Golem@SM_ENDURE,chase,8,1,5000,0,10000,yes,self,longrangeattacked,,,,,,,6,
@@ -8609,7 +8609,7 @@
 2646,Swift Spore@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,,,,,,,,
 2647,Solid Solider@CR_AUTOGUARD,attack,249,2,500,0,300000,yes,self,always,,,,,,,,
 2647,Solid Solider@CR_AUTOGUARD,chase,249,2,2000,0,300000,yes,self,longrangeattacked,,,,,,,,
-2647,Solid Solider@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0091,,,,,
+2647,Solid Solider@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x91,,,,,
 2647,Solid Solider@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,,9,,,,,,
 2647,Solid Solider@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,,,,,,,6,
 2647,Solid Solider@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcge,2,,,,,,,
@@ -8766,7 +8766,7 @@
 2667,Solid Cecil Damon@NPC_STUNATTACK,attack,179,5,1000,0,5000,yes,target,always,,,,,,,,
 2667,Solid Cecil Damon@NPC_WINDATTACK,attack,187,5,1000,0,5000,yes,target,always,,,,,,,,
 2667,Solid Cecil Damon@SN_SHARPSHOOTING,attack,382,5,2000,500,1500,no,target,always,,,,,,,,
-2668,Sea Otter Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2668,Sea Otter Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2668,Sea Otter Ringleader@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,22,0x3095,,,,,
 2668,Sea Otter Ringleader@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,22,,,,,,
 2668,Sea Otter Ringleader@NPC_WATERATTACK,attack,184,3,2000,0,5000,yes,target,always,,,,,,,,
@@ -8893,14 +8893,14 @@
 2693,Furious Rake Scaraba@BS_HAMMERFALL,attack,110,5,500,1500,5000,no,target,always,,,,,,,,
 2693,Furious Rake Scaraba@MC_MAMMONITE,attack,42,5,500,800,5000,no,target,always,,,,,,,8,
 2693,Furious Rake Scaraba@NPC_CRITICALWOUND,attack,673,1,2000,0,30000,yes,target,always,,,,,,,,
-2693,Furious Rake Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,,19,0x0081,,,,,
+2693,Furious Rake Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,,19,0x81,,,,,
 2693,Furious Rake Scaraba@NPC_EMOTION,idle,197,1,3000,0,5000,yes,self,always,,6,0x3695,,,,,
 2693,Furious Rake Scaraba@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,,,,,,,6,
 2693,Furious Rake Scaraba@NPC_STONESKIN,attack,675,3,10000,1000,30000,no,self,myhpltmaxrate,50,,,,,,6,
 2693,Furious Rake Scaraba@NPC_STONESKIN,chase,675,3,10000,1000,30000,no,self,myhpltmaxrate,50,,,,,,6,
 2693,Furious Rake Scaraba@PF_SPIDERWEB,chase,405,1,300,0,10000,yes,target,always,,,,,,,7,
 2694,Elusive Raggler@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,,,,,,,6,
-2694,Elusive Raggler@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2694,Elusive Raggler@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2694,Elusive Raggler@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3695,,,,,
 2694,Elusive Raggler@NPC_WINDATTACK,attack,187,3,2000,0,5000,yes,target,always,,,,,,,,
 2696,Poring Ringleader@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,,2,,,,,,
@@ -8933,8 +8933,8 @@
 2704,Swift Poisonous Toad@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,,,,,,
 2704,Swift Poisonous Toad@NPC_POISON,attack,176,3,500,800,5000,no,target,always,,,,,,,,
 2704,Swift Poisonous Toad@NPC_POISONATTACK,attack,188,3,2000,0,5000,yes,target,always,,,,,,,,
-2705,Solid Poison Spore@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
-2705,Solid Poison Spore@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2705,Solid Poison Spore@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
+2705,Solid Poison Spore@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2705,Solid Poison Spore@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,1,0x3885,,,,,
 2705,Solid Poison Spore@NPC_POISON,angry,176,3,500,800,5000,no,target,always,,,,,,,6,
 2705,Solid Poison Spore@NPC_POISON,attack,176,2,500,800,5000,no,target,always,,,,,,,6,
@@ -8968,7 +8968,7 @@
 2710,Solid Dark Pinguicula@AL_HEAL,idle,28,9,10000,3000,5000,yes,friend,friendhpltmaxrate,50,,,,,,,
 2710,Solid Dark Pinguicula@AL_HEAL,idle,28,9,5000,500,5000,yes,self,myhpltmaxrate,40,,,,,,19,
 2710,Solid Dark Pinguicula@NPC_BLOODDRAIN,attack,199,1,5000,500,5000,yes,target,myhpltmaxrate,40,,,,,,19,
-2710,Solid Dark Pinguicula@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2710,Solid Dark Pinguicula@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2710,Solid Dark Pinguicula@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3885,,,,,
 2710,Solid Dark Pinguicula@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,,,,,,,,
 2710,Solid Dark Pinguicula@NPC_SLEEPATTACK,attack,182,3,1000,1500,5000,no,target,always,,,,,,,,
@@ -8977,7 +8977,7 @@
 2710,Solid Dark Pinguicula@NPC_STUNATTACK,attack,179,3,1000,1500,5000,no,target,always,,,,,,,,
 2711,Pinguicula Ringleader@AL_HEAL,idle,28,9,10000,3000,5000,yes,friend,friendhpltmaxrate,50,,,,,,,
 2711,Pinguicula Ringleader@AL_HEAL,idle,28,9,5000,500,5000,yes,self,myhpltmaxrate,40,,,,,,19,
-2711,Pinguicula Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2711,Pinguicula Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2711,Pinguicula Ringleader@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3885,,,,,
 2711,Pinguicula Ringleader@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,,,,,,,,
 2711,Pinguicula Ringleader@NPC_SLEEPATTACK,attack,182,3,1000,1500,5000,no,target,always,,,,,,,,
@@ -8991,13 +8991,13 @@
 2713,Elusive Phen@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,,,,,,,19,
 2714,Swift Petite@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2714,Swift Petite@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
-2714,Swift Petite@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2714,Swift Petite@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2714,Swift Petite@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2714,Swift Petite@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,,2,,,,,,
 2714,Swift Petite@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,,,,,,,6,
 2714,Swift Petite@NPC_TELEKINESISATTACK,chase,191,5,500,0,5000,yes,target,always,,,,,,,,
 2714,Swift Petite@SM_BASH,attack,5,5,500,0,5000,yes,target,always,,,,,,,,
-2715,Solid Petite@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2715,Solid Petite@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2715,Solid Petite@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2715,Solid Petite@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,,2,,,,,,
 2715,Solid Petite@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,,,,,,,6,
@@ -9020,7 +9020,7 @@
 2719,Swift Pasana@NPC_BLEEDING,attack,660,2,2000,0,3000,yes,target,always,,,,,,,32,
 2719,Swift Pasana@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,,,,,,,,
 2719,Swift Pasana@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,,,,,,,29,
-2719,Swift Pasana@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2719,Swift Pasana@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2719,Swift Pasana@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x3095,,,,,
 2719,Swift Pasana@SM_BASH,attack,5,5,500,0,5000,yes,target,always,,,,,,,,
 2720,Solid Parasite@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,,,,,,,9,
@@ -9033,14 +9033,14 @@
 2721,Owl Duke Ringleader@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 2721,Owl Duke Ringleader@MG_LIGHTNINGBOLT,attack,20,3,2000,0,5000,yes,target,always,,,,,,,,
 2721,Owl Duke Ringleader@MG_LIGHTNINGBOLT,chase,20,3,2000,0,5000,yes,target,always,,,,,,,,
-2721,Owl Duke Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2721,Owl Duke Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2721,Owl Duke Ringleader@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3695,,,,,
 2721,Owl Duke Ringleader@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,32,,,,,,
 2721,Owl Duke Ringleader@PR_LEXDIVINA,attack,76,3,500,1000,5000,yes,target,always,,,,,,,2,
 2721,Owl Duke Ringleader@PR_LEXDIVINA,chase,76,3,500,1000,5000,yes,target,always,,,,,,,2,
 2721,Owl Duke Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,1320,,,,,,
-2722,Furious Orc Warrior@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
-2722,Furious Orc Warrior@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2722,Furious Orc Warrior@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
+2722,Furious Orc Warrior@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2722,Furious Orc Warrior@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,32,0x3885,,,,,
 2722,Furious Orc Warrior@NPC_EMOTION,follow,197,1,2000,0,5000,yes,self,always,,27,,,,,,
 2722,Furious Orc Warrior@NPC_EMOTION,chase,197,1,2000,0,5000,yes,self,always,,,,,,,,
@@ -9177,14 +9177,14 @@
 2739,Swift Mummy@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2739,Swift Mummy@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,,,,,,,9,
 2739,Swift Mummy@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,,,,,,,9,
-2739,Swift Mummy@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
-2739,Swift Mummy@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2739,Swift Mummy@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
+2739,Swift Mummy@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2739,Swift Mummy@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x3885,,,,,
 2739,Swift Mummy@NPC_UNDEADATTACK,attack,347,3,2000,0,5000,yes,target,always,,,,,,,,
 2740,Solid Mummy@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,,,,,,,9,
 2740,Solid Mummy@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,,,,,,,9,
-2740,Solid Mummy@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
-2740,Solid Mummy@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2740,Solid Mummy@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
+2740,Solid Mummy@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2740,Solid Mummy@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x3885,,,,,
 2740,Solid Mummy@NPC_UNDEADATTACK,attack,347,3,2000,0,5000,yes,target,always,,,,,,,,
 2741,Muka Ringleader@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,,,,,,,6,
@@ -9249,13 +9249,13 @@
 2746,Miyabi Doll Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,1404,,,,,,
 2747,Furious Minorous@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 2747,Furious Minorous@BS_HAMMERFALL,attack,110,3,500,1500,5000,no,target,always,,,,,,,,
-2747,Furious Minorous@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2747,Furious Minorous@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2747,Furious Minorous@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3095,,,,,
 2747,Furious Minorous@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,,,,,,,6,
 2747,Furious Minorous@WZ_HEAVENDRIVE,attack,91,3,500,1200,5000,yes,target,always,,,,,,,19,
 2748,Elusive Minorous@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 2748,Elusive Minorous@BS_HAMMERFALL,attack,110,3,500,1500,5000,no,target,always,,,,,,,,
-2748,Elusive Minorous@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2748,Elusive Minorous@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2748,Elusive Minorous@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3095,,,,,
 2748,Elusive Minorous@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,,,,,,,6,
 2748,Elusive Minorous@WZ_HEAVENDRIVE,attack,91,3,500,1200,5000,yes,target,always,,,,,,,19,
@@ -9263,7 +9263,7 @@
 2749,Swift Minorous@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2749,Swift Minorous@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2749,Swift Minorous@BS_HAMMERFALL,attack,110,3,500,1500,5000,no,target,always,,,,,,,,
-2749,Swift Minorous@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2749,Swift Minorous@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2749,Swift Minorous@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3095,,,,,
 2749,Swift Minorous@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,,,,,,,6,
 2749,Swift Minorous@WZ_HEAVENDRIVE,attack,91,3,500,1200,5000,yes,target,always,,,,,,,19,
@@ -9316,7 +9316,7 @@
 2756,Metaling Ringleader@RG_STRIPWEAPON,attack,215,3,500,0,10000,no,target,always,,,,,,,18,
 2756,Metaling Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,1613,,,,,,
 2757,Furious Merman@KN_PIERCE,attack,56,5,500,700,5000,no,target,always,,,,,,,,
-2757,Furious Merman@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2757,Furious Merman@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2757,Furious Merman@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3695,,,,,
 2757,Furious Merman@NPC_RANGEATTACK,chase,160,1,500,0,5000,yes,target,always,,,,,,,,
 2757,Furious Merman@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,,,,,,,6,
@@ -9328,7 +9328,7 @@
 2759,Swift Medusa@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2759,Swift Medusa@MG_STONECURSE,attack,16,10,500,1500,5000,no,target,always,,,,,,,3,
 2759,Swift Medusa@NPC_BLEEDING,attack,660,5,2000,0,3000,yes,target,always,,,,,,,32,
-2759,Swift Medusa@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2759,Swift Medusa@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2759,Swift Medusa@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3695,,,,,
 2759,Swift Medusa@NPC_PETRIFYATTACK,attack,180,5,500,500,5000,no,target,always,,,,,,,3,
 2759,Swift Medusa@NPC_PETRIFYATTACK,chase,180,5,500,500,5000,no,target,always,,,,,,,3,
@@ -9353,7 +9353,7 @@
 2764,Swift Mantis@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2764,Swift Mantis@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2764,Swift Mantis@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,,,,,,,6,
-2764,Swift Mantis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2764,Swift Mantis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2764,Swift Mantis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x3095,,,,,
 2764,Swift Mantis@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,,,,,,,6,
 2765,Solid Mandragora@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,,,,,,,,
@@ -9368,7 +9368,7 @@
 2766,Manananggal Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,2311,,,,,,
 2767,Furious Majoruros@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 2767,Furious Majoruros@BS_HAMMERFALL,attack,110,5,500,1500,5000,no,target,always,,,,,,,,
-2767,Furious Majoruros@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2767,Furious Majoruros@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2767,Furious Majoruros@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x3695,,,,,
 2767,Furious Majoruros@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,,,,,,,6,
 2767,Furious Majoruros@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1149,,,,,,
@@ -9437,7 +9437,7 @@
 2779,Swift Lesavka@NPC_COMBOATTACK,attack,171,2,3000,700,5000,no,target,always,,,,,,,,
 2779,Swift Lesavka@NPC_POISON,attack,176,2,1000,0,5000,yes,target,always,,,,,,,,
 2780,Solid Leib Olmai@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
-2780,Solid Leib Olmai@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2780,Solid Leib Olmai@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2780,Solid Leib Olmai@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3695,,,,,
 2780,Solid Leib Olmai@NPC_GROUNDATTACK,attack,185,3,2000,0,5000,yes,target,always,,,,,,,,
 2780,Solid Leib Olmai@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,,,,,,,6,
@@ -9454,7 +9454,7 @@
 2784,Swift Kobold Archer@AC_DOUBLE,attack,46,3,500,1000,5000,no,target,always,,,,,,,6,
 2784,Swift Kobold Archer@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,20,,,,,,
 2784,Swift Kobold Archer@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,,,,,,,6,
-2785,Solid Kobold@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2785,Solid Kobold@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2785,Solid Kobold@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x308D,,,,,
 2785,Solid Kobold@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,22,,,,,,
 2785,Solid Kobold@NPC_WINDATTACK,attack,187,5,500,500,5000,no,target,always,,,,,,,6,
@@ -9491,7 +9491,7 @@
 2789,Swift Karakasa@WZ_WATERBALL,chase,86,1,500,500,5000,yes,target,always,,,,,,,6,
 2790,Solid Isis@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,,,,,,,6,
 2790,Solid Isis@NPC_DARKNESSATTACK,attack,190,3,2000,0,5000,yes,target,always,,,,,,,,
-2790,Solid Isis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2790,Solid Isis@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2790,Solid Isis@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3095,,,,,
 2791,Isilla Ringleader@AL_HEAL,attack,28,5,3000,0,5000,yes,friend,friendhpltmaxrate,50,,,,,,3,
 2791,Isilla Ringleader@AL_HEAL,idle,28,5,3000,0,5000,yes,friend,friendhpltmaxrate,50,,,,,,3,
@@ -9537,8 +9537,8 @@
 2797,Furious Hunter Fly@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,,,,,,,2,
 2797,Furious Hunter Fly@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,,,,,,,6,
 2797,Furious Hunter Fly@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,,,,,,,6,
-2797,Furious Hunter Fly@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
-2797,Furious Hunter Fly@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2797,Furious Hunter Fly@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
+2797,Furious Hunter Fly@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2797,Furious Hunter Fly@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x3885,,,,,
 2797,Furious Hunter Fly@NPC_WINDATTACK,angry,187,2,2000,0,5000,yes,target,always,,,,,,,,
 2797,Furious Hunter Fly@NPC_WINDATTACK,attack,187,2,2000,0,5000,yes,target,always,,,,,,,,
@@ -9551,7 +9551,7 @@
 2799,Swift Uni-Horn Scaraba@NPC_BLEEDING,attack,660,2,500,700,5000,no,target,always,,,,,,,,
 2799,Swift Uni-Horn Scaraba@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,,,,,,,,
 2799,Swift Uni-Horn Scaraba@NPC_COMBOATTACK,chase,171,2,500,700,5000,no,target,always,,,,,,,,
-2799,Swift Uni-Horn Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,,19,0x0081,,,,,
+2799,Swift Uni-Horn Scaraba@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,,19,0x81,,,,,
 2799,Swift Uni-Horn Scaraba@NPC_PIERCINGATT,attack,158,3,1000,0,5000,yes,target,always,,,,,,,,
 2799,Swift Uni-Horn Scaraba@NPC_STOP,attack,342,1,500,500,5000,no,target,always,,,,,,,,
 2800,Solid Horn@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,,,,,,,,
@@ -9580,7 +9580,7 @@
 2804,Swift Hill Wind@WZ_JUPITEL,attack,84,3,500,1500,5000,yes,target,always,,,,,,,6,
 2804,Swift Hill Wind@WZ_JUPITEL,chase,84,3,500,1500,5000,yes,target,always,,,,,,,6,
 2805,Solid High Orc@CR_SHIELDCHARGE,attack,250,2,500,0,5000,no,target,always,,,,,,,,
-2805,Solid High Orc@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2805,Solid High Orc@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2805,Solid High Orc@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x3695,,,,,
 2805,Solid High Orc@NPC_EMOTION,chase,197,1,2000,0,5000,yes,self,always,,6,,,,,,
 2805,Solid High Orc@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,,,,,,,6,
@@ -9616,13 +9616,13 @@
 2809,Swift Greatest General@WZ_EARTHSPIKE,idle,90,3,5000,1500,5000,no,target,casttargeted,,,,,,,6,
 2809,Swift Greatest General@WZ_EARTHSPIKE,idle,90,3,5000,1500,5000,no,target,longrangeattacked,,,,,,,6,
 2810,Solid Grand Peco@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,,,,,,,6,
-2810,Solid Grand Peco@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x0081,,,,,
-2810,Solid Grand Peco@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2810,Solid Grand Peco@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x81,,,,,
+2810,Solid Grand Peco@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2810,Solid Grand Peco@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,,6,0x3885,,,,,
 2810,Solid Grand Peco@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,,,,,,,6,
 2811,Grand Peco Ringleader@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,,,,,,,6,
-2811,Grand Peco Ringleader@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x0081,,,,,
-2811,Grand Peco Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2811,Grand Peco Ringleader@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x81,,,,,
+2811,Grand Peco Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2811,Grand Peco Ringleader@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,,6,0x3885,,,,,
 2811,Grand Peco Ringleader@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,,,,,,,6,
 2811,Grand Peco Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,1369,,,,,,
@@ -9631,13 +9631,13 @@
 2812,Furious Golem@CR_SHIELDCHARGE,attack,250,2,500,1500,5000,no,target,always,,,,,,,9,
 2812,Furious Golem@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,,,,,,
 2812,Furious Golem@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,,,,,,,6,
-2813,Elusive Goblin@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2813,Elusive Goblin@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2813,Elusive Goblin@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,2,0x308D,,,,,
 2813,Elusive Goblin@NPC_EMOTION,chase,197,1,2000,0,5000,yes,self,always,,18,,,,,,
 2813,Elusive Goblin@NPC_WINDATTACK,attack,187,5,500,500,5000,no,target,always,,,,,,,,
 2814,Swift Goblin@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2814,Swift Goblin@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
-2814,Swift Goblin@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2814,Swift Goblin@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2814,Swift Goblin@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,2,0x308D,,,,,
 2814,Swift Goblin@NPC_EMOTION,chase,197,1,2000,0,5000,yes,self,always,,18,,,,,,
 2814,Swift Goblin@NPC_WINDATTACK,attack,187,5,500,500,5000,no,target,always,,,,,,,,
@@ -9654,11 +9654,11 @@
 2816,Goat Ringleader@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcge,2,,,,,,,
 2816,Goat Ringleader@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,,,,,,,6,
 2816,Goat Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,1372,,,,,,
-2817,Furious Dark Hammer Kobold@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2817,Furious Dark Hammer Kobold@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2817,Furious Dark Hammer Kobold@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x308D,,,,,
 2817,Furious Dark Hammer Kobold@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,22,,,,,,
 2817,Furious Dark Hammer Kobold@NPC_POISONATTACK,attack,188,5,500,500,5000,no,target,always,,,,,,,6,
-2818,Elusive Dark Hammer Kobold@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2818,Elusive Dark Hammer Kobold@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2818,Elusive Dark Hammer Kobold@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x308D,,,,,
 2818,Elusive Dark Hammer Kobold@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,22,,,,,,
 2818,Elusive Dark Hammer Kobold@NPC_POISONATTACK,attack,188,5,500,500,5000,no,target,always,,,,,,,6,
@@ -9673,7 +9673,7 @@
 2820,Solid Dark Shadow@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,,,,,,
 2820,Solid Dark Shadow@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,,,,,,,,
 2821,Giant Hornet Ringleader@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
-2821,Giant Hornet Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2821,Giant Hornet Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2821,Giant Hornet Ringleader@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,9,0x3695,,,,,
 2821,Giant Hornet Ringleader@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,,,,,,,6,
 2821,Giant Hornet Ringleader@NPC_SILENCEATTACK,chase,178,3,500,700,5000,no,target,always,,,,,,,,
@@ -9714,20 +9714,20 @@
 2829,Swift Seal@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2829,Swift Seal@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2829,Swift Seal@NPC_COMBOATTACK,attack,171,2,500,700,5000,yes,target,always,,,,,,,6,
-2829,Swift Seal@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2829,Swift Seal@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2829,Swift Seal@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,1,0x3095,,,,,
 2829,Swift Seal@NPC_WATERATTACK,attack,184,5,500,500,5000,yes,target,always,,,,,,,6,
 2830,Solid Freezer@MG_COLDBOLT,attack,14,3,500,1500,5000,yes,target,always,,,,,,,,
 2830,Solid Freezer@MG_COLDBOLT,chase,14,3,500,1500,5000,yes,target,always,,,,,,,,
 2830,Solid Freezer@MG_FROSTDIVER,attack,15,9,500,1000,5000,yes,target,always,,,,,,,,
-2830,Solid Freezer@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2830,Solid Freezer@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2830,Solid Freezer@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3695,,,,,
 2830,Solid Freezer@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,,20,,,,,,
 2830,Solid Freezer@NPC_WATERATTACK,attack,184,3,500,500,5000,yes,target,always,,,,,,,6,
 2831,Freezer Ringleader@MG_COLDBOLT,attack,14,3,500,1500,5000,yes,target,always,,,,,,,,
 2831,Freezer Ringleader@MG_COLDBOLT,chase,14,3,500,1500,5000,yes,target,always,,,,,,,,
 2831,Freezer Ringleader@MG_FROSTDIVER,attack,15,9,500,1000,5000,yes,target,always,,,,,,,,
-2831,Freezer Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2831,Freezer Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2831,Freezer Ringleader@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3695,,,,,
 2831,Freezer Ringleader@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,,20,,,,,,
 2831,Freezer Ringleader@NPC_WATERATTACK,attack,184,3,500,500,5000,yes,target,always,,,,,,,6,
@@ -9785,12 +9785,12 @@
 2839,Swift Elder Willow@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2839,Swift Elder Willow@MG_FIREBOLT,attack,19,3,500,1500,5000,yes,target,always,,,,,,,,
 2839,Swift Elder Willow@MG_FIREBOLT,chase,19,3,500,1500,5000,yes,target,always,,,,,,,,
-2839,Swift Elder Willow@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2839,Swift Elder Willow@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2839,Swift Elder Willow@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2839,Swift Elder Willow@NPC_FIREATTACK,attack,186,3,500,500,5000,yes,target,always,,,,,,,6,
 2840,Solid Elder Willow@MG_FIREBOLT,attack,19,3,500,1500,5000,yes,target,always,,,,,,,,
 2840,Solid Elder Willow@MG_FIREBOLT,chase,19,3,500,1500,5000,yes,target,always,,,,,,,,
-2840,Solid Elder Willow@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2840,Solid Elder Willow@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2840,Solid Elder Willow@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2840,Solid Elder Willow@NPC_FIREATTACK,attack,186,3,500,500,5000,yes,target,always,,,,,,,6,
 2841,Echio Ringleader@AS_SONICBLOW,attack,136,5,1000,800,5000,yes,target,always,,,,,,,,
@@ -9946,20 +9946,20 @@
 2867,Elusive Comodo@NPC_POISONATTACK,attack,188,5,2000,0,5000,yes,target,always,,,,,,,,
 2868,Swift Coco@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2868,Swift Coco@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
-2868,Swift Coco@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2868,Swift Coco@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2868,Swift Coco@NPC_GROUNDATTACK,attack,185,3,2000,0,5000,yes,target,always,,,,,,,,
 2868,Swift Coco@TF_THROWSTONE,chase,152,1,2000,0,5000,yes,target,always,,,,,,,6,
-2869,Solid Coco@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2869,Solid Coco@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2869,Solid Coco@NPC_GROUNDATTACK,attack,185,3,2000,0,5000,yes,target,always,,,,,,,,
 2869,Solid Coco@TF_THROWSTONE,chase,152,1,2000,0,5000,yes,target,always,,,,,,,6,
 2870,Clock Ringleader@NPC_CURSEATTACK,attack,181,4,500,800,5000,yes,target,always,,,,,,,6,
-2870,Clock Ringleader@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x0091,,,,,
+2870,Clock Ringleader@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x91,,,,,
 2870,Clock Ringleader@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,,6,0x3885,,,,,
 2870,Clock Ringleader@NPC_GROUNDATTACK,attack,185,4,500,500,5000,yes,target,always,,,,,,,6,
 2870,Clock Ringleader@NPC_STUNATTACK,attack,179,3,500,1500,5000,yes,target,always,,,,,,,6,
 2870,Clock Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,1269,,,,,,
 2871,Furious Clock@NPC_CURSEATTACK,attack,181,4,500,800,5000,yes,target,always,,,,,,,6,
-2871,Furious Clock@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x0091,,,,,
+2871,Furious Clock@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x91,,,,,
 2871,Furious Clock@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,,6,0x3885,,,,,
 2871,Furious Clock@NPC_GROUNDATTACK,attack,185,4,500,500,5000,yes,target,always,,,,,,,6,
 2871,Furious Clock@NPC_STUNATTACK,attack,179,3,500,1500,5000,yes,target,always,,,,,,,6,
@@ -9971,13 +9971,13 @@
 2873,Swift Centipede@AS_VENOMDUST,attack,140,1,500,1500,5000,no,around1,always,,,,,,,,
 2873,Swift Centipede@HW_GANBANTEIN,attack,483,1,3000,0,7000,no,target,always,,,,,,,,
 2873,Swift Centipede@NPC_COMBOATTACK,attack,171,1,3000,0,5000,yes,target,always,,,,,,,,
-2873,Swift Centipede@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2873,Swift Centipede@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2873,Swift Centipede@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2873,Swift Centipede@NPC_POISON,attack,176,3,500,800,5000,no,target,always,,,,,,,,
 2873,Swift Centipede@NPC_POISONATTACK,attack,188,2,500,500,5000,no,target,always,,,,,,,,
 2873,Swift Centipede@WZ_QUAGMIRE,chase,92,5,500,700,5000,yes,target,always,,,,,,,12,
 2874,Solid Cenere@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,,,,,,,,
-2874,Solid Cenere@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2874,Solid Cenere@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2874,Solid Cenere@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2874,Solid Cenere@NPC_PETRIFYATTACK,attack,180,3,500,500,5000,no,target,always,,,,,,,7,
 2874,Solid Cenere@NPC_WINDATTACK,attack,187,2,2000,0,5000,yes,target,always,,,,,,,,
@@ -10048,7 +10048,7 @@
 2881,Furious Breeze@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,,,,,,,6,
 2882,Elusive Bradium Golem@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,,,,,,,,
 2882,Elusive Bradium Golem@CR_AUTOGUARD,chase,249,5,2000,0,300000,yes,self,longrangeattacked,,,,,,,,
-2882,Elusive Bradium Golem@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x0091,,,,,
+2882,Elusive Bradium Golem@NPC_EMOTION,idle,197,1,200,0,30000,yes,self,always,,9,0x91,,,,,
 2882,Elusive Bradium Golem@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,,6,0x3885,,,,,
 2882,Elusive Bradium Golem@NPC_STUNATTACK,attack,179,4,500,1500,5000,no,target,always,,,,,,,6,
 2882,Elusive Bradium Golem@SM_ENDURE,chase,8,1,5000,0,10000,yes,self,longrangeattacked,,,,,,,6,
@@ -10060,7 +10060,7 @@
 2883,Swift Bloody Butterfly@NPC_SLEEPATTACK,chase,182,5,500,0,5000,yes,target,always,,,,,,,7,
 2884,Bigfoot Ringleader@NPC_EMOTION,chase,197,1,2000,0,5000,yes,self,always,,6,,,,,,
 2884,Bigfoot Ringleader@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,,,,,,,,
-2884,Bigfoot Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2884,Bigfoot Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2884,Bigfoot Ringleader@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,,,,,,,,
 2884,Bigfoot Ringleader@SM_ENDURE,chase,8,1,5000,0,10000,yes,self,longrangeattacked,,,,,,,6,
 2884,Bigfoot Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,1060,,,,,,
@@ -10076,7 +10076,7 @@
 2886,Elusive Banshee Master@NPC_DARKNESSATTACK,attack,190,3,1000,0,5000,yes,target,always,,,,,,,21,
 2886,Elusive Banshee Master@NPC_DARKSTRIKE,attack,340,9,2000,0,5000,yes,target,always,,,,,,,,
 2886,Elusive Banshee Master@NPC_DARKSTRIKE,chase,340,9,2000,0,5000,yes,target,always,,,,,,,,
-2886,Elusive Banshee Master@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,,7,0x0081,,,,,
+2886,Elusive Banshee Master@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,,7,0x81,,,,,
 2886,Elusive Banshee Master@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,,0x3695,,,,,
 2886,Elusive Banshee Master@NPC_EVILLAND,attack,670,1,500,0,5000,yes,self,always,,,,,,,,
 2886,Elusive Banshee Master@NPC_VAMPIRE_GIFT,attack,679,1,500,0,5000,yes,self,always,,,,,,,,
@@ -10088,7 +10088,7 @@
 2887,Swift Banshee@NPC_DARKNESSATTACK,attack,190,3,1000,0,5000,yes,target,always,,,,,,,21,
 2887,Swift Banshee@NPC_DARKSTRIKE,attack,340,9,2000,0,5000,yes,target,always,,,,,,,,
 2887,Swift Banshee@NPC_DARKSTRIKE,chase,340,9,2000,0,5000,yes,target,always,,,,,,,,
-2887,Swift Banshee@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,,7,0x0081,,,,,
+2887,Swift Banshee@NPC_EMOTION,chase,197,1,1000,0,5000,yes,self,always,,7,0x81,,,,,
 2887,Swift Banshee@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,,0x3695,,,,,
 2887,Swift Banshee@NPC_EVILLAND,attack,670,1,500,0,5000,yes,self,always,,,,,,,,
 2887,Swift Banshee@NPC_VAMPIRE_GIFT,attack,679,1,500,0,5000,yes,self,always,,,,,,,,
@@ -10103,7 +10103,7 @@
 2889,Assaulter Ringleader@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,,,,,,,,
 2889,Assaulter Ringleader@MO_BODYRELOCATION,chase,264,1,2000,500,5000,no,target,always,,,,,,,,
 2889,Assaulter Ringleader@NPC_EMOTION,attack,197,1,2000,0,600000,yes,self,myhpltmaxrate,20,23,,,,,,
-2889,Assaulter Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2889,Assaulter Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2889,Assaulter Ringleader@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3695,,,,,
 2889,Assaulter Ringleader@NPC_WINDATTACK,attack,187,5,500,500,5000,no,target,always,,,,,,,6,
 2889,Assaulter Ringleader@NPC_COMBOATTACK,attack,171,1,1500,700,5000,no,target,always,,,,,,,24,
@@ -10117,22 +10117,22 @@
 2891,Elusive Argiope@AS_VENOMDUST,attack,140,1,500,1500,5000,no,target,always,,,,,,,,
 2891,Elusive Argiope@NPC_POISON,attack,176,3,1500,800,5000,no,target,always,,,,,,,,
 2891,Elusive Argiope@NPC_POISONATTACK,attack,188,2,500,500,5000,no,target,always,,,,,,,,
-2891,Elusive Argiope@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2891,Elusive Argiope@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2891,Elusive Argiope@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2892,Swift Argiope@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2892,Swift Argiope@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,50,,,,,,,
 2892,Swift Argiope@AS_VENOMDUST,attack,140,1,500,1500,5000,no,target,always,,,,,,,,
 2892,Swift Argiope@NPC_POISON,attack,176,3,1500,800,5000,no,target,always,,,,,,,,
 2892,Swift Argiope@NPC_POISONATTACK,attack,188,2,500,500,5000,no,target,always,,,,,,,,
-2892,Swift Argiope@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2892,Swift Argiope@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2892,Swift Argiope@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2893,Solid Arclouze@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 2893,Solid Arclouze@NPC_GROUNDATTACK,attack,185,3,2000,0,5000,yes,target,always,,,,,,,,
-2893,Solid Arclouze@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2893,Solid Arclouze@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2893,Solid Arclouze@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2894,Arclouze Ringleader@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 2894,Arclouze Ringleader@NPC_GROUNDATTACK,attack,185,3,2000,0,5000,yes,target,always,,,,,,,,
-2894,Arclouze Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2894,Arclouze Ringleader@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2894,Arclouze Ringleader@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,7,0x3095,,,,,
 2894,Arclouze Ringleader@NPC_SUMMONSLAVE,idle,196,2,10000,700,30000,no,self,slavele,0,1194,,,,,,
 2895,Furious Apocalypse@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,,,,,,,,
@@ -10161,7 +10161,7 @@
 2899,Furious Anolian@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,22,,,,,,
 2899,Furious Anolian@NPC_WATERATTACK,attack,184,3,2000,0,5000,yes,target,always,,,,,,,,
 2899,Furious Anolian@SM_BASH,attack,5,7,500,800,5000,no,target,always,,,,,,,2,
-2899,Furious Anolian@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2899,Furious Anolian@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2899,Furious Anolian@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,2,0x3695,,,,,
 2900,Elusive Angra Mantis@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,,,,,,,,
 2900,Elusive Angra Mantis@CR_AUTOGUARD,attack,249,2,700,0,300000,yes,self,always,,,,,,,,
@@ -10197,7 +10197,7 @@
 2906,Swift Rafflesia Arnoldi@NPC_POISONATTACK,attack,188,5,2000,0,5000,yes,target,always,,,,,,,,
 2907,Solid Alligator@NPC_WATERATTACK,attack,184,4,1000,500,5000,no,target,always,,,,,,,6,
 2907,Solid Alligator@NPC_CRITICALSLASH,attack,170,2,500,500,5000,no,target,always,,,,,,,6,
-2907,Solid Alligator@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0091,,,,,
+2907,Solid Alligator@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x91,,,,,
 2908,Aliza Ringleader@AL_HEAL,attack,28,5,5000,1000,5000,yes,friend,friendhpltmaxrate,80,,,,,,3,
 2908,Aliza Ringleader@AL_HEAL,idle,28,5,5000,1000,5000,yes,friend,friendhpltmaxrate,80,,,,,,3,
 2908,Aliza Ringleader@AL_HEAL,walk,28,5,5000,1000,5000,yes,friend,friendhpltmaxrate,80,,,,,,3,
@@ -10213,7 +10213,7 @@
 2909,Furious Alicel@NPC_GUIDEDATTACK,attack,172,1,1000,1000,20000,no,target,always,,,,,,,,
 2910,Elusive Alarm@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,,,,,,,,
 2910,Elusive Alarm@NPC_DARKBREATH,attack,202,2,500,800,5000,no,target,always,,,,,,,7,
-2910,Elusive Alarm@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x0081,,,,,
+2910,Elusive Alarm@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,,19,0x81,,,,,
 2910,Elusive Alarm@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,,6,0x3695,,,,,
 2910,Elusive Alarm@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcge,2,,,,,,6,
 2911,Swift Agav@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,50,,,,,,,

+ 56 - 55
doc/mob_db_mode_list.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= rAthena Dev Team
 //===== Last Updated: ========================================
-//= 20160130
+//= 20160402
 //===== Description: =========================================
 //= A reference description of rAthena's mob_db 'mode' field.
 //============================================================
@@ -11,40 +11,41 @@
 Bit Legend
 -------------------------------------------------------------------------------
 
-MD_CANMOVE            | 0x0000001 |        1
-MD_LOOTER             | 0x0000002 |        2
-MD_AGGRESSIVE         | 0x0000004 |        4
-MD_ASSIST             | 0x0000008 |        8
-MD_CASTSENSOR_IDLE    | 0x0000010 |       16
-MD_BOSS               | 0x0000020 |       32
-MD_PLANT              | 0x0000040 |       64
-MD_CANATTACK          | 0x0000080 |      128
-MD_DETECTOR           | 0x0000100 |      256
-MD_CASTSENSOR_CHASE   | 0x0000200 |      512
-MD_CHANGECHASE        | 0x0000400 |     1024
-MD_ANGRY              | 0x0000800 |     2048
-MD_CHANGETARGET_MELEE | 0x0001000 |     4096
-MD_CHANGETARGET_CHASE | 0x0002000 |     8192
-MD_TARGETWEAK         | 0x0004000 |    16384
-MD_RANDOMTARGET       | 0x0008000 |    32768
-MD_IGNOREMELEE        | 0x0010000 |    65536
-MD_IGNOREMAGIC        | 0x0020000 |   131072
-MD_IGNORERANGED       | 0x0040000 |   262144
-MD_MVP                | 0x0080000 |   524288
-MD_IGNOREMISC         | 0x0100000 |  1048576
-MD_KNOCKBACK_IMMUNE   | 0x0200000 |  2097152
-MD_NORANDOM_WALK      | 0x0400000 |  4194304
-MD_NOCAST_SKILL       | 0x0800000 |  8388608
-MD_FIXED_ITEMDROP     | 0x1000000 | 16777216
+MD_CANMOVE            | 0x0000001 |         1
+MD_LOOTER             | 0x0000002 |         2
+MD_AGGRESSIVE         | 0x0000004 |         4
+MD_ASSIST             | 0x0000008 |         8
+MD_CASTSENSOR_IDLE    | 0x0000010 |        16
+MD_NORANDOM_WALK      | 0x0000020 |        32
+MD_NOCAST_SKILL       | 0x0000040 |        64
+MD_CANATTACK          | 0x0000080 |       128
+FREE                  | 0x0000100 |       256
+MD_CASTSENSOR_CHASE   | 0x0000200 |       512
+MD_CHANGECHASE        | 0x0000400 |      1024
+MD_ANGRY              | 0x0000800 |      2048
+MD_CHANGETARGET_MELEE | 0x0001000 |      4096
+MD_CHANGETARGET_CHASE | 0x0002000 |      8192
+MD_TARGETWEAK         | 0x0004000 |     16384
+MD_RANDOMTARGET       | 0x0008000 |     32768
+---------------------------------------------
+MD_IGNOREMELEE        | 0x0010000 |     65536
+MD_IGNOREMAGIC        | 0x0020000 |    131072
+MD_IGNORERANGED       | 0x0040000 |    262144
+MD_MVP                | 0x0080000 |    524288
+MD_IGNOREMISC         | 0x0100000 |   1048576
+MD_KNOCKBACK_IMMUNE   | 0x0200000 |   2097152
+MD_TELEPORT_BLOCK     | 0x0400000 |   4194304
+FREE                  | 0x0800000 |   8388608
+---------------------------------------------
+MD_FIXED_ITEMDROP     | 0x1000000 |  16777216
+MD_DETECTOR           | 0x2000000 |  33554432
+MD_STATUS_IMMUNE      | 0x4000000 |  67108864
+MD_SKILL_IMMUNE       | 0x8000000 | 134217728
 
 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.
+Can Move: Enables the mob to move/chase characters.
 
 Looter: The mob will loot up nearby items on the ground when it's on idle state.
 
@@ -55,14 +56,17 @@ 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)
+No Random Walk: The mob will not randomly walk around while in the
+	idle state.
 
-Boss: Special flag which makes mobs immune to certain status changes and skills.
+No Cast Skill: The mob will be unable to cast skills.
 
-Plant: Always receives 1 damage from attacks.
+Can Attack: 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.
 
-Detector: Enables mob to detect and attack characters who are in hiding/cloak.
+Cast Sensor Chase: Will go after characters who start casting on them if idle
+	or chasing other players (they switch chase targets)
 
 Change Chase: Allows chasing mobs to switch targets if another player happens
 	to be within attack range (handy on ranged attackers, for example)
@@ -91,19 +95,23 @@ Ignore Magic: The mob will take 1 HP damage from magic attacks.
 
 Ignore Range: The mob will take 1 HP damage from ranged attacks.
 
-MVP: Flagged as MVP which makes mobs resistant to Coma.
+MVP: Flagged as MVP which makes mobs resistant to Coma. Also displays the
+	MVP sign and gives players MVP EXP or MVP items.
 
 Ignore Misc: The mob will take 1 HP damage from "none" attack type.
 
 Knockback Immune: The mob will be unable to be knocked back.
 
-No Random Walk: The mob will not randomly walk around while in the
-	idle state.
-
-No Cast Skill: The mob will be unable to cast skills.
+Teleport Block: Not implemented yet.
 
 Fixed Item Drop: The mob's drops are not affected by item drop modifiers.
 
+Detector: Enables mob to detect and attack characters who are in hiding/cloak.
+
+Status Immune: Immune to being affected by statuses.
+
+Skill Immune: Immune to being affected by skills.
+
 Aegis Mob Types
 -------------------------------------------------------------------------------
 
@@ -129,14 +137,11 @@ Aegis/rA (description)
 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)
-24: 0x400081 (passive, does not walk randomly) [Slave]
+24: 0x00A1 (passive, does not walk randomly) [Slave]
 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 (also see below).
-
 Aegis Class Types
 -------------------------------------------------------------------------------
 
@@ -146,13 +151,13 @@ Add the mode listed here to the mode above.
 
 Aegis/rA
 00: 0x0000000 (normal monster)
-01: 0x0000120 (boss class, immune to status changes, immune to knockback, detector)
-02: ? (guardian class, immune to status changes)
-04: ? (battleground class, immune to status changes, completely ignores all skills)
+01: 0x6200000 (boss class, immune to status changes, immune to knockback, detector)
+02: 0x4000000 (guardian class, immune to status changes)
+04: 0xC000000 (battlefield class, immune to status changes, completely ignores all skills)
 05: 0x1000000 (event class, ignores all drop rate adjustments)
 
-- Guardian and battleground classes are currently not 100% possible with
-  rA mode bits, it is recommended to use MD_BOSS (0x0000020) for now
+- Note that the detector bit for Insect/Demon monsters need to be added
+  independently.
 
 Aegis Attr Types
 -------------------------------------------------------------------------------
@@ -167,9 +172,5 @@ Aegis/rA
 04: 0x040000 (takes 1 damage from ranged attacks)
 08: 0x080000 (MVP, gives MVP rewards, immune to instant death/coma effects)
 16: 0x100000 (takes 1 damage from misc attacks)
-23: 0x000040 (plant mode)
 32: 0x200000 (cannot be knocked back)
-64: ? (teleport block)
-
-- Note that if attr=23 (1+2+4+16), it's better to use 0x40 (plant mode) for
-  easier reading
+64: 0x400000 (teleport block)

+ 18 - 6
src/map/atcommand.c

@@ -3804,14 +3804,19 @@ ACMD_FUNC(reload) {
 		if( prev_config.item_rate_mvp          != battle_config.item_rate_mvp
 		||  prev_config.item_rate_common       != battle_config.item_rate_common
 		||  prev_config.item_rate_common_boss  != battle_config.item_rate_common_boss
+		||  prev_config.item_rate_common_mvp   != battle_config.item_rate_common_mvp
 		||  prev_config.item_rate_card         != battle_config.item_rate_card
 		||  prev_config.item_rate_card_boss    != battle_config.item_rate_card_boss
+		||  prev_config.item_rate_card_mvp     != battle_config.item_rate_card_mvp
 		||  prev_config.item_rate_equip        != battle_config.item_rate_equip
 		||  prev_config.item_rate_equip_boss   != battle_config.item_rate_equip_boss
+		||  prev_config.item_rate_equip_mvp    != battle_config.item_rate_equip_mvp
 		||  prev_config.item_rate_heal         != battle_config.item_rate_heal
 		||  prev_config.item_rate_heal_boss    != battle_config.item_rate_heal_boss
+		||  prev_config.item_rate_heal_mvp     != battle_config.item_rate_heal_mvp
 		||  prev_config.item_rate_use          != battle_config.item_rate_use
 		||  prev_config.item_rate_use_boss     != battle_config.item_rate_use_boss
+		||  prev_config.item_rate_use_mvp      != battle_config.item_rate_use_mvp
 		||  prev_config.item_rate_treasure     != battle_config.item_rate_treasure
 		||  prev_config.item_rate_adddrop      != battle_config.item_rate_adddrop
 		||  prev_config.logarithmic_drops      != battle_config.logarithmic_drops
@@ -7066,8 +7071,8 @@ ACMD_FUNC(mobinfo)
 
 #ifdef RENEWAL_EXP
 		if( battle_config.atcommand_mobinfo_type ) {
-			base_exp = base_exp * pc_level_penalty_mod(sd, mob->lv, mob->status.class_, mob->status.mode, 1) / 100;
-			job_exp = job_exp * pc_level_penalty_mod(sd, mob->lv, mob->status.class_, mob->status.mode, 1) / 100;
+			base_exp = base_exp * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 1) / 100;
+			job_exp = job_exp * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 1) / 100;
 		}
 #endif
 #ifdef VIP_ENABLE
@@ -7107,9 +7112,9 @@ ACMD_FUNC(mobinfo)
 
 #ifdef RENEWAL_DROP
 			if( battle_config.atcommand_mobinfo_type ) {
-				droprate = droprate * pc_level_penalty_mod(sd, mob->lv, mob->status.class_, mob->status.mode, 2) / 100;
+				droprate = droprate * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 2) / 100;
 				if (droprate <= 0 && !battle_config.drop_rate0item)
-						droprate = 1;
+					droprate = 1;
 			}
 #endif
 #ifdef VIP_ENABLE
@@ -7196,7 +7201,7 @@ ACMD_FUNC(showmobs)
 		return 0;
 	}
 
-	if(status_has_mode(&mob_db(mob_id)->status,MD_BOSS) && !pc_has_permission(sd, PC_PERM_SHOW_BOSS)){	// If player group does not have access to boss mobs.
+	if(status_has_mode(&mob_db(mob_id)->status,MD_STATUS_IMMUNE) && !pc_has_permission(sd, PC_PERM_SHOW_BOSS)){	// If player group does not have access to boss mobs.
 		clif_displaymessage(fd, msg_txt(sd,1251)); // Can't show boss mobs!
 		return 0;
 	}
@@ -7650,7 +7655,7 @@ ACMD_FUNC(whodrops)
 
 #ifdef RENEWAL_DROP
 				if( battle_config.atcommand_mobinfo_type )
-					dropchance = dropchance * pc_level_penalty_mod(sd, mob_db(item_data->mob[j].id)->lv, mob_db(item_data->mob[j].id)->status.class_, mob_db(item_data->mob[j].id)->status.mode, 2) / 100;
+					dropchance = dropchance * pc_level_penalty_mod(mob_db(item_data->mob[j].id)->lv - sd->status.base_level, mob_db(item_data->mob[j].id)->status.class_, mob_db(item_data->mob[j].id)->status.mode, 2) / 100;
 #endif
 #ifdef VIP_ENABLE
 				// Display item rate increase for VIP.
@@ -7796,6 +7801,13 @@ ACMD_FUNC(rates)
 		(battle_config.item_rate_equip_boss + (pc_isvip(sd) ? (battle_config.vip_drop_increase * battle_config.item_rate_equip_boss) / 100 : 0)) / 100.,
 		(battle_config.item_rate_card_boss + (pc_isvip(sd) ? (battle_config.vip_drop_increase * battle_config.item_rate_card_boss) / 100 : 0)) / 100.);
 	clif_displaymessage(fd, buf);
+	snprintf(buf, CHAT_SIZE_MAX, msg_txt(sd,1024), // MVP Drop Rates: Common %.2fx / Healing %.2fx / Usable %.2fx / Equipment %.2fx / Card %.2fx
+		(battle_config.item_rate_common_mvp + (pc_isvip(sd) ? (battle_config.vip_drop_increase * battle_config.item_rate_common_mvp) / 100 : 0)) / 100.,
+		(battle_config.item_rate_heal_mvp + (pc_isvip(sd) ? (battle_config.vip_drop_increase * battle_config.item_rate_heal_mvp) / 100 : 0)) / 100.,
+		(battle_config.item_rate_use_mvp + (pc_isvip(sd) ? (battle_config.vip_drop_increase * battle_config.item_rate_use_mvp) / 100 : 0)) / 100.,
+		(battle_config.item_rate_equip_mvp + (pc_isvip(sd) ? (battle_config.vip_drop_increase * battle_config.item_rate_equip_mvp) / 100 : 0)) / 100.,
+		(battle_config.item_rate_card_mvp + (pc_isvip(sd) ? (battle_config.vip_drop_increase * battle_config.item_rate_card_mvp) / 100 : 0)) / 100.);
+	clif_displaymessage(fd, buf);
 	snprintf(buf, CHAT_SIZE_MAX, msg_txt(sd,1301), // Other Drop Rates: MvP %.2fx / Card-Based %.2fx / Treasure %.2fx
 		(battle_config.item_rate_mvp + (pc_isvip(sd) ? (battle_config.vip_drop_increase * battle_config.item_rate_mvp) / 100 : 0)) / 100.,
 		(battle_config.item_rate_adddrop + (pc_isvip(sd) ? (battle_config.vip_drop_increase * battle_config.item_rate_adddrop) / 100 : 0)) / 100.,

+ 22 - 27
src/map/battle.c

@@ -1035,7 +1035,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
 		return damage; //These skills bypass everything else.
 
 	if( sc && sc->count ) { // SC_* that reduce damage to 0.
-		if( sc->data[SC_BASILICA] && !status_bl_has_mode(src,MD_BOSS) ) {
+		if( sc->data[SC_BASILICA] && !status_bl_has_mode(src,MD_STATUS_IMMUNE) ) {
 			d->dmg_lv = ATK_BLOCK;
 			return 0;
 		}
@@ -1574,12 +1574,6 @@ int64 battle_calc_bg_damage(struct block_list *src, struct block_list *bl, int64
 	if( !damage )
 		return 0;
 
-	if( bl->type == BL_MOB ) {
-		struct mob_data* md = BL_CAST(BL_MOB, bl);
-		if( map[bl->m].flag.battleground && (md->mob_id == MOBID_BLUE_CRYST || md->mob_id == MOBID_PINK_CRYST) && flag&BF_SKILL )
-			return 0; // Crystal cannot receive skill damage on battlegrounds
-	}
-
 	if(skill_get_inf2(skill_id)&INF2_NO_BG_DMG)
 		return damage; //skill that ignore bg map reduction
 
@@ -1615,7 +1609,7 @@ bool battle_can_hit_gvg_target(struct block_list *src,struct block_list *bl,uint
 	int class_ = status_get_class(bl);
 
 	if(md && md->guardian_data) {
-		if(class_ == MOBID_EMPERIUM && flag&BF_SKILL && !(skill_get_inf3(skill_id)&INF3_HIT_EMP)) //Skill immunity.
+		if ((status_bl_has_mode(bl,MD_SKILL_IMMUNE) || (class_ == MOBID_EMPERIUM && !(skill_get_inf3(skill_id)&INF3_HIT_EMP))) && flag&BF_SKILL) //Skill immunity.
 			return false;
 		if(src->type != BL_MOB) {
 			struct guild *g = src->type == BL_PC ? ((TBL_PC *)src)->guild : guild_search(status_get_guild_id(src));
@@ -2088,7 +2082,7 @@ static int battle_skill_damage_skill(struct block_list *src, struct block_list *
 			case BL_PC:
 				return damage->pc;
 			case BL_MOB:
-				if (is_boss(target))
+				if (status_get_class_(target) == CLASS_BOSS)
 					return damage->boss;
 				else
 					return damage->mob;
@@ -2124,7 +2118,7 @@ static int battle_skill_damage_map(struct block_list *src, struct block_list *ta
 				rate = mapd->adjust.damage.pc;
 				break;
 			case BL_MOB:
-				if (is_boss(target))
+				if (status_get_class_(target) == CLASS_BOSS)
 					rate = mapd->adjust.damage.boss;
 				else
 					rate = mapd->adjust.damage.mob;
@@ -2148,7 +2142,7 @@ static int battle_skill_damage_map(struct block_list *src, struct block_list *ta
 					rate += mapd->skill_damage.entries[i]->pc;
 					break;
 				case BL_MOB:
-					if (is_boss(target))
+					if (status_get_class_(target) == CLASS_BOSS)
 						rate += mapd->skill_damage.entries[i]->boss;
 					else
 						rate += mapd->skill_damage.entries[i]->mob;
@@ -2229,8 +2223,7 @@ bool is_infinite_defense(struct block_list *target, int flag)
 		return true;
 	if(status_has_mode(tstatus,MD_IGNOREMISC) && flag&(BF_MISC) )
 		return true;
-	if(status_has_mode(tstatus,MD_PLANT) )
-		return true;
+
 	return false;
 }
 
@@ -3635,7 +3628,7 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s
 			break;
 		case GS_BULLSEYE:
 			//Only works well against brute/demihumans non bosses.
-			if((tstatus->race == RC_BRUTE || tstatus->race == RC_DEMIHUMAN || tstatus->race == RC_PLAYER) && !status_has_mode(tstatus,MD_BOSS))
+			if((tstatus->race == RC_BRUTE || tstatus->race == RC_DEMIHUMAN || tstatus->race == RC_PLAYER) && !status_has_mode(tstatus,MD_STATUS_IMMUNE))
 				skillratio += 400;
 			break;
 		case GS_TRACKING:
@@ -4769,11 +4762,8 @@ struct Damage battle_calc_attack_plant(struct Damage wd, struct block_list *src,
 
 	if (attack_hits && target->type == BL_MOB) {
 		struct status_change *sc = status_get_sc(target);
-		struct mob_data *md = BL_CAST(BL_MOB,target);
-		if (sc &&
-			class_ != MOBID_EMPERIUM && !mob_is_battleground(md) &&
-			!battle_check_sc(src, target, sc, &wd, 1, skill_id, skill_lv))
-		{
+
+		if (sc && !battle_check_sc(src, target, sc, &wd, 1, skill_id, skill_lv)) {
 			wd.damage = wd.damage2 = 0;
 			return wd;
 		}
@@ -4977,7 +4967,7 @@ struct Damage battle_calc_weapon_final_atk_modifiers(struct Damage wd, struct bl
 			status_change_end(target, SC_REJECTSWORD, INVALID_TIMER);
 	}
 
-	if( tsc && tsc->data[SC_CRESCENTELBOW] && !is_boss(src) && wd.flag&BF_SHORT && rnd()%100 < tsc->data[SC_CRESCENTELBOW]->val2 ) {
+	if( tsc && tsc->data[SC_CRESCENTELBOW] && wd.flag&BF_SHORT && rnd()%100 < tsc->data[SC_CRESCENTELBOW]->val2 ) {
 		//ATK [{(Target HP / 100) x Skill Level} x Caster Base Level / 125] % + [Received damage x {1 + (Skill Level x 0.2)}]
 		int64 rdamage = 0;
 		int ratio = (int64)(status_get_hp(src) / 100) * tsc->data[SC_CRESCENTELBOW]->val1 * status_get_lv(target) / 125;
@@ -5663,7 +5653,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
 #endif
 				if(i > 700)
 					i = 700;
-				if(rnd()%1000 < i && !status_has_mode(tstatus,MD_BOSS))
+				if(rnd()%1000 < i && !status_has_mode(tstatus,MD_STATUS_IMMUNE))
 					ad.damage = tstatus->hp;
 				else {
 #ifdef RENEWAL
@@ -6472,7 +6462,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
 				md.damage = (skill_id == NJ_ZENYNAGE ? rnd()%md.damage + md.damage : md.damage * rnd_value(50,100)) / (skill_id == NJ_ZENYNAGE ? 1 : 100);
 				if (sd && skill_id == KO_MUCHANAGE && !pc_checkskill(sd, NJ_TOBIDOUGU))
 					md.damage = md.damage / 2;
-				if (is_boss(target))
+				if (status_get_class_(target) == CLASS_BOSS) // Specific to Boss Class
 					md.damage = md.damage / (skill_id == NJ_ZENYNAGE ? 3 : 2);
 				else if (tsd && skill_id == NJ_ZENYNAGE)
 					md.damage = md.damage / 2;
@@ -6755,7 +6745,7 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i
 					}
 				}
 
-				if (sc->data[SC_DEATHBOUND] && skill_id != WS_CARTTERMINATION && skill_id != GN_HELLS_PLANT_ATK && !(src->type == BL_MOB && is_boss(src))) {
+				if (sc->data[SC_DEATHBOUND] && skill_id != WS_CARTTERMINATION && skill_id != GN_HELLS_PLANT_ATK && !status_bl_has_mode(src,MD_STATUS_IMMUNE)) {
 					if (distance_bl(src,bl) <= 0 || !map_check_dir(map_calc_dir(bl,src->x,src->y), unit_getdir(bl))) {
 						int64 rd1 = 0;
 
@@ -6768,7 +6758,7 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i
 					}
 				}
 
-				if( sc->data[SC_SHIELDSPELL_DEF] && sc->data[SC_SHIELDSPELL_DEF]->val1 == 2 && !(src->type == BL_MOB && is_boss(src)) ){
+				if( sc->data[SC_SHIELDSPELL_DEF] && sc->data[SC_SHIELDSPELL_DEF]->val1 == 2 && !status_bl_has_mode(src,MD_STATUS_IMMUNE) ){
 						rdamage += damage * sc->data[SC_SHIELDSPELL_DEF]->val2 / 100;
 						if (rdamage < 1) rdamage = 1;
 				}
@@ -6966,7 +6956,7 @@ int battle_damage_area(struct block_list *bl, va_list ap) {
 	dmotion = va_arg(ap,int);
 	damage = va_arg(ap,int);
 
-	if( bl->type == BL_MOB && ((TBL_MOB*)bl)->mob_id == MOBID_EMPERIUM )
+	if (status_bl_has_mode(bl,MD_SKILL_IMMUNE))
 		return 0;
 	if( bl != src && battle_check_target(src,bl,BCT_ENEMY) > 0 ) {
 		map_freeblock_lock();
@@ -7077,7 +7067,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
 		}
 	}
 
-	if( tsc && tsc->data[SC_BLADESTOP_WAIT] && !is_boss(src) && (src->type == BL_PC || tsd == NULL || distance_bl(src, target) <= (tsd->status.weapon == W_FIST ? 1 : 2)) )
+	if( tsc && tsc->data[SC_BLADESTOP_WAIT] && status_get_class_(src) != CLASS_BOSS && (src->type == BL_PC || tsd == NULL || distance_bl(src, target) <= (tsd->status.weapon == W_FIST ? 1 : 2)) )
 	{
 		uint16 skill_lv = tsc->data[SC_BLADESTOP_WAIT]->val1;
 		int duration = skill_get_time2(MO_BLADESTOP,skill_lv);
@@ -7929,7 +7919,7 @@ static const struct _battle_data {
 	{ "boss_spawn_delay",                   &battle_config.boss_spawn_delay,                100,    0,      INT_MAX,        },
 	{ "no_spawn_on_player",                 &battle_config.no_spawn_on_player,              0,      0,      100,            },
 	{ "force_random_spawn",                 &battle_config.force_random_spawn,              0,      0,      1,              },
-	{ "slaves_inherit_mode",                &battle_config.slaves_inherit_mode,             2,      0,      3,              },
+	{ "slaves_inherit_mode",                &battle_config.slaves_inherit_mode,             4,      0,      4,              },
 	{ "slaves_inherit_speed",               &battle_config.slaves_inherit_speed,            3,      0,      3,              },
 	{ "summons_trigger_autospells",         &battle_config.summons_trigger_autospells,      1,      0,      1,              },
 	{ "pc_damage_walk_delay_rate",          &battle_config.pc_walk_delay_rate,              20,     0,      INT_MAX,        },
@@ -8083,14 +8073,19 @@ static const struct _battle_data {
 	{ "item_rate_mvp",                      &battle_config.item_rate_mvp,                   100,    0,      1000000,        },
 	{ "item_rate_common",                   &battle_config.item_rate_common,                100,    0,      1000000,        },
 	{ "item_rate_common_boss",              &battle_config.item_rate_common_boss,           100,    0,      1000000,        },
+	{ "item_rate_common_mvp",               &battle_config.item_rate_common_mvp,            100,    0,      1000000,        },
 	{ "item_rate_equip",                    &battle_config.item_rate_equip,                 100,    0,      1000000,        },
 	{ "item_rate_equip_boss",               &battle_config.item_rate_equip_boss,            100,    0,      1000000,        },
+	{ "item_rate_equip_mvp",                &battle_config.item_rate_equip_mvp,             100,    0,      1000000,        },
 	{ "item_rate_card",                     &battle_config.item_rate_card,                  100,    0,      1000000,        },
 	{ "item_rate_card_boss",                &battle_config.item_rate_card_boss,             100,    0,      1000000,        },
+	{ "item_rate_card_mvp",                 &battle_config.item_rate_card_mvp,              100,    0,      1000000,        },
 	{ "item_rate_heal",                     &battle_config.item_rate_heal,                  100,    0,      1000000,        },
 	{ "item_rate_heal_boss",                &battle_config.item_rate_heal_boss,             100,    0,      1000000,        },
+	{ "item_rate_heal_mvp",                 &battle_config.item_rate_heal_mvp,              100,    0,      1000000,        },
 	{ "item_rate_use",                      &battle_config.item_rate_use,                   100,    0,      1000000,        },
 	{ "item_rate_use_boss",                 &battle_config.item_rate_use_boss,              100,    0,      1000000,        },
+	{ "item_rate_use_mvp",                  &battle_config.item_rate_use_mvp,               100,    0,      1000000,        },
 	{ "item_rate_adddrop",                  &battle_config.item_rate_adddrop,               100,    0,      1000000,        },
 	{ "item_rate_treasure",                 &battle_config.item_rate_treasure,              100,    0,      1000000,        },
 	{ "prevent_logout",                     &battle_config.prevent_logout,                  10000,  0,      60000,          },

+ 1 - 2
src/map/battle.h

@@ -111,8 +111,6 @@ struct block_list* battle_getenemy(struct block_list *target, int type, int rang
 int battle_gettarget(struct block_list *bl);
 int battle_getcurrentskill(struct block_list *bl);
 
-#define	is_boss(bl)	( status_get_class_(bl) == CLASS_BOSS )	// Can refine later [Aru]
-
 int battle_check_undead(int race,int element);
 int battle_check_target(struct block_list *src, struct block_list *target,int flag);
 bool battle_check_range(struct block_list *src,struct block_list *bl,int range);
@@ -318,6 +316,7 @@ extern struct Battle_Config
 	int item_rate_mvp, item_rate_common, item_rate_common_boss, item_rate_card, item_rate_card_boss,
 		item_rate_equip, item_rate_equip_boss, item_rate_heal, item_rate_heal_boss, item_rate_use,
 		item_rate_use_boss, item_rate_treasure, item_rate_adddrop;
+	int item_rate_common_mvp, item_rate_heal_mvp, item_rate_use_mvp, item_rate_equip_mvp, item_rate_card_mvp;
 
 	int logarithmic_drops;
 	int item_drop_common_min,item_drop_common_max;	// Added by TyrNemesis^

+ 2 - 4
src/map/itemdb.c

@@ -1713,10 +1713,8 @@ void itemdb_reload(void) {
 	//Epoque's awesome @reloaditemdb fix - thanks! [Ind]
 	//- Fixes the need of a @reloadmobdb after a @reloaditemdb to re-link monster drop data
 	for( i = 0; i < MAX_MOB_DB; i++ ) {
-		struct mob_db *entry;
-		if( !((i < MOBID_TREAS01 || i > MOBID_TREAS40) && (i < MOBID_TREAS41 || i > MOBID_TREAS49)) )
-			continue;
-		entry = mob_db(i);
+		struct mob_db *entry = mob_db(i);
+
 		for(d = 0; d < MAX_MOB_DROP; d++) {
 			struct item_data *id;
 			if( !entry->dropitem[d].nameid )

+ 4 - 57
src/map/map.h

@@ -51,63 +51,6 @@ void map_msg_reload(void);
 #define MAX_VENDING 12
 #define MAX_MAP_SIZE 512*512 	// Wasn't there something like this already? Can't find it.. [Shinryo]
 
-/** Added definitions for WoESE objects and other [L0ne_W0lf], [aleos] */
-enum MOBID {
-	MOBID_PORING			= 1002,
-	MOBID_RED_PLANT			= 1078,
-	MOBID_BLACK_MUSHROOM	= 1084,
-	MOBID_GOBLIN_1			= 1122,
-	MOBID_GOBLIN_2,
-	MOBID_GOBLIN_3,
-	MOBID_GOBLIN_4,
-	MOBID_GOBLIN_5,
-	MOBID_MARINE_SPHERE		= 1142,
-	MOBID_A_GUARDIAN		= 1285,
-	MOBID_K_GUARDIAN,
-	MOBID_S_GUARDIAN,
-	MOBID_EMPERIUM,
-	MOBID_TREAS01			= 1324,
-	MOBID_TREAS40			= 1363,
-	MOBID_G_PARASITE		= 1555,
-	MOBID_G_FLORA			= 1575,
-	MOBID_G_HYDRA			= 1579,
-	MOBID_G_MANDRAGORA		= 1589,
-	MOBID_G_GEOGRAPHER		= 1590,
-	MOBID_S_GUARDIAN_		= 1899,
-	MOBID_A_GUARDIAN_,
-	MOBID_BARRICADE1		= 1905,
-	MOBID_BARRICADE2,
-	MOBID_GUARDIAN_STONE1,
-	MOBID_GUARDIAN_STONE2,
-	MOBID_FOOD_STOR,
-	MOBID_BLUE_CRYST		= 1914,
-	MOBID_PINK_CRYST,
-	MOBID_TREAS41			= 1938,
-	MOBID_TREAS49			= 1946,
-	MOBID_TATACHO			= 1986,
-	MOBID_CENTIPEDE,
-	MOBID_NEPENTHES,
-	MOBID_HILLSRION,
-	MOBID_HARDROCK_MOMMOTH,
-	MOBID_TENDRILRION,
-	MOBID_CORNUS,
-	MOBID_NAGA,
-	MOBID_LUCIOLA_VESPA,
-	MOBID_PINGUICULA,
-	MOBID_G_TATACHO			= 1997,
-	MOBID_G_HILLSRION,
-	MOBID_CENTIPEDE_LARVA,
-	MOBID_SILVERSNIPER		= 2042,
-	MOBID_MAGICDECOY_FIRE,
-	MOBID_MAGICDECOY_WATER,
-	MOBID_MAGICDECOY_EARTH,
-	MOBID_MAGICDECOY_WIND,
-	MOBID_ZANZOU			= 2308,
-	MOBID_S_HORNET			= 2158,
-	MOBID_S_GIANT_HORNET,
-	MOBID_S_LUCIOLA_VESPA,
-};
-
 //The following system marks a different job ID system used by the map server,
 //which makes a lot more sense than the normal one. [Skotlex]
 //
@@ -337,6 +280,7 @@ enum e_classAE {
 	CLASS_NORMAL = 0,
 	CLASS_BOSS,
 	CLASS_GUARDIAN,
+	CLASS_BATTLEFIELD,
 	CLASS_ALL,
 	CLASS_MAX //auto upd enum for array len
 };
@@ -349,6 +293,9 @@ enum e_race2 {
 	RC2_GOLEM,
 	RC2_GUARDIAN,
 	RC2_NINJA,
+	RC2_GVG,
+	RC2_BATTLEFIELD,
+	RC2_TREASURE,
 	RC2_MAX
 };
 

+ 48 - 62
src/map/mob.c

@@ -326,9 +326,9 @@ struct mob_data* mob_spawn_dataset(struct spawn_data *data)
  * flag:
  * &1 : Apply the summon success chance found in the list (otherwise get any monster from the db)
  * &2 : Apply a monster check level.
- * &4 : Selected monster should not be a boss type (MD_BOSS) (except from MOBG_Bloody_Dead_Branch /swt)
+ * &4 : Selected monster should not be a boss type (except those from MOBG_Bloody_Dead_Branch)
  * &8 : Selected monster must have normal spawn.
- * &16: Selected monster should not be a plant type (MD_PLANT)
+ * &16: Selected monster should not be a plant type
  * lv: Mob level to check against
  *------------------------------------------*/
 int mob_get_random_id(int type, int flag, int lv)
@@ -360,9 +360,9 @@ int mob_get_random_id(int type, int flag, int lv)
 		mob_is_clone(mob_id) ||
 		(flag&0x01 && (entry->rate < 1000000 && entry->rate <= rnd() % 1000000)) ||
 		(flag&0x02 && lv < mob->lv) ||
-		(flag&0x04 && status_has_mode(&mob->status,MD_BOSS) ) ||
+		(flag&0x04 && status_has_mode(&mob->status,MD_STATUS_IMMUNE) ) ||
 		(flag&0x08 && mob->spawn[0].qty < 1) ||
-		(flag&0x10 && status_has_mode(&mob->status,MD_PLANT) )
+		(flag&0x10 && status_has_mode(&mob->status,MD_IGNOREMELEE|MD_IGNOREMAGIC|MD_IGNORERANGED|MD_IGNOREMISC) )
 	) && (i++) < MAX_MOB_DB && msummon->count > 1);
 
 	if (i >= MAX_MOB_DB && &msummon->list[0])  // no suitable monster found, use fallback for given list
@@ -885,7 +885,6 @@ int mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data)
 int mob_setdelayspawn(struct mob_data *md)
 {
 	unsigned int spawntime;
-	enum e_mode mode;
 	struct mob_db *db;
 
 	if (!md->spawn) //Doesn't has respawn data!
@@ -897,14 +896,13 @@ int mob_setdelayspawn(struct mob_data *md)
 
 	//Apply the spawn delay fix [Skotlex]
 	db = mob_db(md->spawn->id);
-	mode = db->status.mode;
-	if (mode & MD_BOSS) {	//Bosses
+	if (status_has_mode(&db->status,MD_STATUS_IMMUNE)) { // Status Immune
 		if (battle_config.boss_spawn_delay != 100) {
 			// Divide by 100 first to prevent overflows
 			//(precision loss is minimal as duration is in ms already)
 			spawntime = spawntime/100*battle_config.boss_spawn_delay;
 		}
-	} else if (mode&MD_PLANT) {	//Plants
+	} else if (status_has_mode(&db->status,MD_IGNOREMELEE|MD_IGNOREMAGIC|MD_IGNORERANGED|MD_IGNOREMISC)) { // Plant type
 		if (battle_config.plant_spawn_delay != 100) {
 			spawntime = spawntime/100*battle_config.plant_spawn_delay;
 		}
@@ -1121,7 +1119,7 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
 	{
 	case BL_PC:
 		if (((TBL_PC*)bl)->state.gangsterparadise &&
-			!status_has_mode(&md->status,MD_BOSS))
+			!status_has_mode(&md->status,MD_STATUS_IMMUNE))
 			return 0; //Gangster paradise protection.
 	default:
 		if (battle_config.hom_setting&HOMSET_FIRST_TARGET &&
@@ -1550,7 +1548,7 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick)
 			(md->ud.walktimer != INVALID_TIMER && !(battle_config.mob_ai&0x1) && !check_distance_bl(&md->bl, tbl, md->min_chase)) ||
 			(
 				tbl->type == BL_PC &&
-				((((TBL_PC*)tbl)->state.gangsterparadise && !(mode&MD_BOSS)) ||
+				((((TBL_PC*)tbl)->state.gangsterparadise && !(mode&MD_STATUS_IMMUNE)) ||
 				((TBL_PC*)tbl)->invincible_timer != INVALID_TIMER)
 		)) {	//No valid target
 			if (mob_warpchase(md, tbl))
@@ -1848,7 +1846,7 @@ static int mob_ai_sub_lazy(struct mob_data *md, va_list args)
 
 	if(battle_config.mob_active_time &&
 		md->last_pcneartime &&
- 		!status_has_mode(&md->status,MD_BOSS) &&
+ 		!status_has_mode(&md->status,MD_STATUS_IMMUNE) &&
 		DIFF_TICK(tick,md->last_thinktime) > MIN_MOBTHINKTIME)
 	{
 		if (DIFF_TICK(tick,md->last_pcneartime) < battle_config.mob_active_time)
@@ -1858,7 +1856,7 @@ static int mob_ai_sub_lazy(struct mob_data *md, va_list args)
 
 	if(battle_config.boss_active_time &&
 		md->last_pcneartime &&
-		status_has_mode(&md->status,MD_BOSS) &&
+		status_has_mode(&md->status,MD_STATUS_IMMUNE) &&
 		DIFF_TICK(tick,md->last_thinktime) > MIN_MOBTHINKTIME)
 	{
 		if (DIFF_TICK(tick,md->last_pcneartime) < battle_config.boss_active_time)
@@ -2453,7 +2451,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 				if(base_exp || job_exp) {
 					if( md->dmglog[i].flag != MDLF_PET || battle_config.pet_attack_exp_to_master ) {
 #ifdef RENEWAL_EXP
-						int rate = pc_level_penalty_mod(tmpsd[i], md->level, md->status.class_, md->status.mode, 1);
+						int rate = pc_level_penalty_mod(md->level - tmpsd[i]->status.base_level, md->status.class_, md->status.mode, 1);
 						if (rate != 100) {
 							if (base_exp)
 								base_exp = (unsigned int)cap_value(apply_rate(base_exp, rate), 1, UINT_MAX);
@@ -2488,10 +2486,10 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 		struct item_data* it = NULL;
 		int drop_rate;
 #ifdef RENEWAL_DROP
-		int drop_modifier = mvp_sd    ? pc_level_penalty_mod(mvp_sd, md->level, md->status.class_, md->status.mode, 2)   :
-							second_sd ? pc_level_penalty_mod(second_sd, md->level, md->status.class_, md->status.mode, 2):
-							third_sd  ? pc_level_penalty_mod(third_sd, md->level, md->status.class_, md->status.mode, 2) :
-							100;/* no player was attached, we dont use any modifier (100 = rates are not touched) */
+		int drop_modifier = mvp_sd    ? pc_level_penalty_mod(md->level - mvp_sd->status.base_level, md->status.class_, md->status.mode, 2)   :
+							second_sd ? pc_level_penalty_mod(md->level - second_sd->status.base_level, md->status.class_, md->status.mode, 2):
+							third_sd  ? pc_level_penalty_mod(md->level - third_sd->status.base_level, md->status.class_, md->status.mode, 2) :
+							100; // No player was attached, we don't use any modifier (100 = rates are not touched)
 #endif
 		dlist->m = md->bl.m;
 		dlist->x = md->bl.x;
@@ -2764,8 +2762,10 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 		}
 
 		if( sd ) {
+			struct mob_data *mission_md = map_id2md(sd->mission_mobid);
+
 			if( sd->mission_mobid == md->mob_id ||
-				( battle_config.taekwon_mission_mobname == 1 && mob_is_goblin(md, sd->mission_mobid) ) ||
+				( battle_config.taekwon_mission_mobname == 1 && status_get_race2(&md->bl) == RC2_GOBLIN && status_get_race2(&mission_md->bl) == RC2_GOBLIN && mission_md ) ||
 				( battle_config.taekwon_mission_mobname == 2 && mob_is_samename(md, sd->mission_mobid) ) )
 			{ //TK_MISSION [Skotlex]
 				if( ++sd->mission_count >= 100 && (temp = mob_get_random_id(MOBG_Branch_Of_Dead_Tree, 0xE, sd->status.base_level)) )
@@ -2951,7 +2951,7 @@ int mob_class_change (struct mob_data *md, int mob_id)
 	if (md->guardian_data)
 		return 0; //Guardians/Emperium
 
-	if( mob_is_treasure(md) )
+	if (status_get_race2(&md->bl) == RC2_TREASURE)
 		return 0; //Treasure Boxes
 
 	if( md->special_state.ai > AI_ATTACK )
@@ -3149,25 +3149,7 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,uint16 skill_id)
 			md->status.hp = md->status.max_hp*hp_rate/100;
 
 		//Inherit the aggressive mode of the master.
-		if (battle_config.slaves_inherit_mode && md->master_id)
-		{
-			switch (battle_config.slaves_inherit_mode) {
-			case 1: //Always aggressive
-				if (!status_has_mode(&md->status,MD_AGGRESSIVE))
-					sc_start4(NULL,&md->bl, SC_MODECHANGE, 100,1,0, MD_AGGRESSIVE, 0, 0);
-				break;
-			case 2: //Always passive
-				if (status_has_mode(&md->status,MD_AGGRESSIVE))
-					sc_start4(NULL,&md->bl, SC_MODECHANGE, 100,1,0, 0, MD_AGGRESSIVE, 0);
-				break;
-			default: //Copy master.
-				if (status_has_mode(&md2->status,MD_AGGRESSIVE))
-					sc_start4(NULL,&md->bl, SC_MODECHANGE, 100,1,0, MD_AGGRESSIVE, 0, 0);
-				else
-					sc_start4(NULL,&md->bl, SC_MODECHANGE, 100,1,0, 0, MD_AGGRESSIVE, 0);
-				break;
-			}
-		}
+		status_calc_slave_mode(md, md2);
 
 		if (md2->state.copy_master_mode)
 			md->status.mode = md2->status.mode;
@@ -3960,11 +3942,9 @@ static bool mob_parse_dbrow(char** str)
 	if (!battle_config.monster_active_enable)
 		status->mode &= ~MD_AGGRESSIVE;
 
-	if( status_has_mode(status,MD_BOSS) )
+	if (status_has_mode(status,MD_STATUS_IMMUNE|MD_KNOCKBACK_IMMUNE|MD_DETECTOR))
 		status->class_ = CLASS_BOSS;
-	else if( mob_is_guardian(mob_id) )
-		status->class_ = CLASS_GUARDIAN;
-	else
+	else // Store as Normal and overwrite in mob_race2_db for special Class
 		status->class_ = CLASS_NORMAL;
 
 	status->speed = atoi(str[26]);
@@ -4642,21 +4622,25 @@ static bool mob_readdb_race2(char* fields[], int columns, int current)
 
 	race = atoi(fields[0]);
 
-	if (!CHK_RACE2(race))
-	{
+	if (!CHK_RACE2(race)) {
 		ShowWarning("mob_readdb_race2: Unknown race2 %d.\n", race);
 		return false;
 	}
 
-	for(i = 1; i<columns; i++)
-	{
-		int mobid = atoi(fields[i]);
-		if (mob_db(mobid) == mob_dummy)
-		{
-			ShowWarning("mob_readdb_race2: Unknown mob id %d for race2 %d.\n", mobid, race);
+	for(i = 1; i < columns; i++) {
+		int mob_id = atoi(fields[i]);
+
+		if (mob_db(mob_id) == mob_dummy) {
+			ShowWarning("mob_readdb_race2: Unknown mob id %d for race2 %d.\n", mob_id, race);
 			continue;
 		}
-		mob_db_data[mobid]->race2 = (enum e_race2)race;
+		mob_db_data[mob_id]->race2 = (enum e_race2)race;
+
+		// Apply Aegis Class
+		if (race == RC2_GUARDIAN)
+			mob_db_data[mob_id]->status.class_ = CLASS_GUARDIAN;
+		else if (race == RC2_BATTLEFIELD)
+			mob_db_data[mob_id]->status.class_ = CLASS_BATTLEFIELD;
 	}
 	return true;
 }
@@ -4792,43 +4776,45 @@ static void mob_drop_ratio_adjust(void){
 			}
 
 			// Treasure box drop rates [Skotlex]
-			if( ( mob_id >= MOBID_TREAS01 && mob_id <= MOBID_TREAS40 ) || ( mob_id >= MOBID_TREAS41 && mob_id <= MOBID_TREAS49 ) ){
+			if (mob->race2 == RC2_TREASURE) {
 				is_treasurechest = true;
 
 				rate_adjust = battle_config.item_rate_treasure;
 				ratemin = battle_config.item_drop_treasure_min;
 				ratemax = battle_config.item_drop_treasure_max;
-			}else{
-				bool is_boss = status_has_mode(&mob->status,MD_BOSS);
+			} else {
+				bool is_mvp = status_has_mode(&mob->status,MD_MVP);
+				bool is_boss = (mob->status.class_ == CLASS_BOSS);
+
 				is_treasurechest = false;
 
 				 // Added suport to restrict normal drops of MVP's [Reddozen]
 				switch( id->type ){
 					case IT_HEALING:
-						rate_adjust = is_boss ? battle_config.item_rate_heal_boss : battle_config.item_rate_heal;
+						rate_adjust = is_mvp ? battle_config.item_rate_heal_mvp : (is_boss ? battle_config.item_rate_heal_boss : battle_config.item_rate_heal);
 						ratemin = battle_config.item_drop_heal_min;
 						ratemax = battle_config.item_drop_heal_max;
 						break;
 					case IT_USABLE:
 					case IT_CASH:
-						rate_adjust = is_boss ? battle_config.item_rate_use_boss : battle_config.item_rate_use;
+						rate_adjust = is_mvp ? battle_config.item_rate_use_mvp : (is_boss ? battle_config.item_rate_use_boss : battle_config.item_rate_use);
 						ratemin = battle_config.item_drop_use_min;
 						ratemax = battle_config.item_drop_use_max;
 						break;
 					case IT_WEAPON:
 					case IT_ARMOR:
 					case IT_PETARMOR:
-						rate_adjust = is_boss ? battle_config.item_rate_equip_boss : battle_config.item_rate_equip;
+						rate_adjust = is_mvp ? battle_config.item_rate_equip_mvp : (is_boss ? battle_config.item_rate_equip_boss : battle_config.item_rate_equip);
 						ratemin = battle_config.item_drop_equip_min;
 						ratemax = battle_config.item_drop_equip_max;
 						break;
 					case IT_CARD:
-						rate_adjust = is_boss ? battle_config.item_rate_card_boss : battle_config.item_rate_card;
+						rate_adjust = is_mvp ? battle_config.item_rate_card_mvp : (is_boss ? battle_config.item_rate_card_boss : battle_config.item_rate_card);
 						ratemin = battle_config.item_drop_card_min;
 						ratemax = battle_config.item_drop_card_max;
 						break;
 					default:
-						rate_adjust = is_boss ? battle_config.item_rate_common_boss : battle_config.item_rate_common;
+						rate_adjust = is_mvp ? battle_config.item_rate_common_mvp : (is_boss ? battle_config.item_rate_common_boss : battle_config.item_rate_common);
 						ratemin = battle_config.item_drop_common_min;
 						ratemax = battle_config.item_drop_common_max;
 						break;
@@ -4914,8 +4900,8 @@ static void mob_skill_db_set_single(struct s_mob_skill *skill) {
 			mob = mob_db(i);
 			if (mob == mob_dummy)
 				continue;
-			if (   (!(id&1) && status_has_mode(&mob->status,MD_BOSS)) // Bosses
-				|| (!(id&2) && !status_has_mode(&mob->status,MD_BOSS)) // Normal monsters
+			if (   (!(id&1) && status_has_mode(&mob->status,MD_STATUS_IMMUNE)) // Bosses
+				|| (!(id&2) && !status_has_mode(&mob->status,MD_STATUS_IMMUNE)) // Normal monsters
 				)
 				continue;
 			mob_skill_db_set_single_sub(mob, skill);
@@ -5004,7 +4990,7 @@ static void mob_load(void)
 		}
 
 		sv_readdb(dbsubpath1, "mob_avail.txt", ',', 2, 12, -1, &mob_readdb_mobavail, i);
-		sv_readdb(dbsubpath2, "mob_race2_db.txt", ',', 2, 20, -1, &mob_readdb_race2, i);
+		sv_readdb(dbsubpath2, "mob_race2_db.txt", ',', 2, MAX_RACE2_MOBS, -1, &mob_readdb_race2, i);
 		sv_readdb(dbsubpath1, "mob_item_ratio.txt", ',', 2, 2+MAX_ITEMRATIO_MOBS, -1, &mob_readdb_itemratio, i);
 		sv_readdb(dbsubpath1, "mob_chat_db.txt", '#', 3, 3, MAX_MOB_CHAT, &mob_parse_row_chatdb, i);
 		mob_read_randommonster(dbsubpath2, i);

+ 43 - 5
src/map/mob.h

@@ -21,6 +21,8 @@
 #define MAX_MVP_DROP 3
 #define MAX_STEAL_DROP 7
 
+#define MAX_RACE2_MOBS 50
+
 //Min time between AI executions
 #define MIN_MOBTHINKTIME 100
 //Min time before mobs do a check to call nearby friends for help (or for slaves to support their master)
@@ -42,6 +44,47 @@
 extern const int mob_manuk[8];
 extern const int mob_splendide[5];
 
+/**
+ * Mob constants
+ * Added definitions for WoE:SE objects and other [L0ne_W0lf], [aleos]
+ */
+enum MOBID {
+	MOBID_PORING			= 1002,
+	MOBID_RED_PLANT			= 1078,
+	MOBID_BLACK_MUSHROOM	= 1084,
+	MOBID_MARINE_SPHERE		= 1142,
+	MOBID_EMPERIUM			= 1288,
+	MOBID_G_PARASITE		= 1555,
+	MOBID_G_FLORA			= 1575,
+	MOBID_G_HYDRA			= 1579,
+	MOBID_G_MANDRAGORA		= 1589,
+	MOBID_G_GEOGRAPHER		= 1590,
+	MOBID_GUARDIAN_STONE1	= 1907,
+	MOBID_GUARDIAN_STONE2,
+	MOBID_TATACHO			= 1986,
+	MOBID_CENTIPEDE,
+	MOBID_NEPENTHES,
+	MOBID_HILLSRION,
+	MOBID_HARDROCK_MOMMOTH,
+	MOBID_TENDRILRION,
+	MOBID_CORNUS,
+	MOBID_NAGA,
+	MOBID_LUCIOLA_VESPA,
+	MOBID_PINGUICULA,
+	MOBID_G_TATACHO			= 1997,
+	MOBID_G_HILLSRION,
+	MOBID_CENTIPEDE_LARVA,
+	MOBID_SILVERSNIPER		= 2042,
+	MOBID_MAGICDECOY_FIRE,
+	MOBID_MAGICDECOY_WATER,
+	MOBID_MAGICDECOY_EARTH,
+	MOBID_MAGICDECOY_WIND,
+	MOBID_ZANZOU			= 2308,
+	MOBID_S_HORNET			= 2158,
+	MOBID_S_GIANT_HORNET,
+	MOBID_S_LUCIOLA_VESPA,
+};
+
 ///Mob skill states.
 enum MobSkillState {
 	MSS_ANY = -1,
@@ -294,11 +337,6 @@ void mob_heal(struct mob_data *md,unsigned int heal);
 
 #define mob_stop_walking(md, type) unit_stop_walking(&(md)->bl, type)
 #define mob_stop_attack(md) unit_stop_attack(&(md)->bl)
-#define mob_is_battleground(md) ( map[(md)->bl.m].flag.battleground && ((md)->mob_id == MOBID_BARRICADE2 || ((md)->mob_id >= MOBID_FOOD_STOR && (md)->mob_id <= MOBID_PINK_CRYST)) )
-#define mob_is_gvg(md) (map[(md)->bl.m].flag.gvg_castle && ( (md)->mob_id == MOBID_EMPERIUM || (md)->mob_id == MOBID_BARRICADE1 || (md)->mob_id == MOBID_GUARDIAN_STONE1 || (md)->mob_id == MOBID_GUARDIAN_STONE2) )
-#define mob_is_treasure(md) (((md)->mob_id >= MOBID_TREAS01 && (md)->mob_id <= MOBID_TREAS40) || ((md)->mob_id >= MOBID_TREAS41 && (md)->mob_id <= MOBID_TREAS49))
-#define mob_is_guardian(mob_id) ((mob_id >= MOBID_A_GUARDIAN && mob_id <= MOBID_S_GUARDIAN) || mob_id == MOBID_S_GUARDIAN_ || mob_id == MOBID_A_GUARDIAN_)
-#define mob_is_goblin(md, mid) (((md)->mob_id >= MOBID_GOBLIN_1 && (md)->mob_id <= MOBID_GOBLIN_5) && (mid >= MOBID_GOBLIN_1 && mid <= MOBID_GOBLIN_5))
 #define mob_is_samename(md, mid) (strcmp(mob_db((md)->mob_id)->jname, mob_db(mid)->jname) == 0)
 
 void mob_clear_spawninfo();

+ 1 - 1
src/map/party.c

@@ -1071,7 +1071,7 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b
 			if (!md)
 				return 0;
 
-			rate = pc_level_penalty_mod(sd[i], md->db->lv, md->db->status.class_, md->db->status.mode, 1);
+			rate = pc_level_penalty_mod(md->db->lv - sd[i]->status.base_level, md->db->status.class_, md->db->status.mode, 1);
 			base_exp = (unsigned int)cap_value(base_exp_bonus * rate / 100, 1, UINT_MAX);
 			job_exp = (unsigned int)cap_value(job_exp_bonus * rate / 100, 1, UINT_MAX);
 		}

+ 17 - 28
src/map/pc.c

@@ -5122,7 +5122,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
 	sd_status= status_get_status_data(&sd->bl);
 	md_status= status_get_status_data(bl);
 
-	if( md->master_id || status_has_mode(md_status,MD_BOSS) || mob_is_treasure(md) ||
+	if (md->master_id || status_has_mode(md_status, MD_STATUS_IMMUNE) || status_get_race2(&md->bl) == RC2_TREASURE ||
 		map[bl->m].flag.nomobloot || // check noloot map flag [Lorky]
 		(battle_config.skill_steal_max_tries && //Reached limit of steal attempts. [Lupus]
 			md->state.steal_flag++ >= battle_config.skill_steal_max_tries)
@@ -5193,10 +5193,8 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
 		return 0;
 
 	md = (TBL_MOB*)target;
-	if( md->state.steal_coin_flag || md->sc.data[SC_STONE] || md->sc.data[SC_FREEZE] || status_has_mode(&md->status,MD_BOSS) )
-		return 0;
 
-	if( mob_is_treasure(md) )
+	if (md->state.steal_coin_flag || md->sc.data[SC_STONE] || md->sc.data[SC_FREEZE] || status_bl_has_mode(target,MD_STATUS_IMMUNE) || status_get_race2(&md->bl) == RC2_TREASURE)
 		return 0;
 
 	// FIXME: This formula is either custom or outdated.
@@ -10501,37 +10499,28 @@ void pc_delspiritcharm(struct map_session_data *sd, int count, int type)
 }
 
 #if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
-/*==========================================
- * Renewal EXP/Itemdrop rate modifier base on level penalty
- * 1=exp 2=itemdrop
- *------------------------------------------*/
-int pc_level_penalty_mod(struct map_session_data *sd, int mob_level, uint32 mob_class, enum e_mode mode, int type)
+/**
+ * Renewal EXP/Item Drop rate modifier based on level penalty
+ * @param level_diff: Monster and Player level difference
+ * @param mob_class: Monster class
+ * @param mode: Monster mode
+ * @param type: 1 - EXP, 2 - Item Drop
+ * @return Penalty rate
+ */
+int pc_level_penalty_mod(int level_diff, uint32 mob_class, enum e_mode mode, int type)
 {
-	int diff, rate = 100, i;
-	int tmp;
-
-	nullpo_ret(sd);
+	int rate = 100;
 
 	if (type == 2 && (mode&MD_FIXED_ITEMDROP))
 		return rate;
 
-	diff = mob_level - sd->status.base_level;
+	if (level_diff < 0)
+		level_diff = MAX_LEVEL + (~level_diff + 1);
 
-	if( diff < 0 )
-		diff = MAX_LEVEL + ( ~diff + 1 );
-
-	if((tmp = level_penalty[type][mob_class][diff] ) > 0 ) //use mobclass directly
-		return tmp;
-	
-	// TODO: Fix this [lighta]
-	for( i = 0; i < CLASS_ALL; i++ ) {
-		if( ( tmp = level_penalty[type][i][diff] ) > 0 ) {
-			rate = tmp;
-			break;
-		}
-	}
+	if ((rate = level_penalty[type][mob_class][level_diff]) > 0) // Monster class found, return rate
+		return rate;
 
-	return rate;
+	return 100; // Penalty not found, return default
 }
 #endif
 

+ 1 - 1
src/map/pc.h

@@ -1239,6 +1239,6 @@ void pc_show_questinfo(struct map_session_data *sd);
 void pc_show_questinfo_reinit(struct map_session_data *sd);
 
 #if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
-int pc_level_penalty_mod(struct map_session_data *sd, int mob_level, uint32 mob_class, enum e_mode mode, int type);
+int pc_level_penalty_mod(int level_diff, uint32 mob_class, enum e_mode mode, int type);
 #endif
 #endif /* _PC_H_ */

+ 1 - 1
src/map/pet.c

@@ -652,7 +652,7 @@ int pet_catch_process2(struct map_session_data* sd, int target_id)
 	i = search_petDB_index(md->mob_id,PET_CLASS);
 
 	//catch_target_class == 0 is used for universal lures (except bosses for now). [Skotlex]
-	if (sd->catch_target_class == 0 && !status_has_mode(&md->status,MD_BOSS))
+	if (sd->catch_target_class == 0 && !status_has_mode(&md->status,MD_STATUS_IMMUNE))
 		sd->catch_target_class = md->mob_id;
 
 	if(i < 0 || sd->catch_target_class != md->mob_id) {

+ 4 - 0
src/map/script_constants.h

@@ -2411,11 +2411,15 @@
 	export_constant(RC2_GOLEM);
 	export_constant(RC2_GUARDIAN);
 	export_constant(RC2_NINJA);
+	export_constant(RC2_GVG);
+	export_constant(RC2_BATTLEFIELD);
+	export_constant(RC2_TREASURE);
 
 	/* classes */
 	export_constant(CLASS_NORMAL);
 	export_constant(CLASS_BOSS);
 	export_constant(CLASS_GUARDIAN);
+	export_constant(CLASS_BATTLEFIELD);
 	export_constant(CLASS_ALL);
 
 	/* sizes */

+ 77 - 72
src/map/skill.c

@@ -1340,7 +1340,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
 
 	case LK_SPIRALPIERCE:
 	case ML_SPIRALPIERCE:
-		if( dstsd || ( dstmd && !is_boss(bl) ) ) //Does not work on bosses
+		if( dstsd || ( dstmd && status_bl_has_mode(bl,MD_STATUS_IMMUNE) ) ) //Does not work on status immune
 			sc_start(src,bl,SC_STOP,100,0,skill_get_time2(skill_id,skill_lv));
 		break;
 
@@ -1576,7 +1576,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
 	case SR_WINDMILL:
 		if( dstsd )
 			skill_addtimerskill(src,tick+status_get_amotion(src),bl->id,0,0,skill_id,skill_lv,BF_WEAPON,0);
-		else if( dstmd && !is_boss(bl) )
+		else if( dstmd )
 			sc_start(src,bl, SC_STUN, 100, skill_lv, 1000 + 1000 * (rnd() %3));
 		break;
 	case SR_GENTLETOUCH_QUIET:  //  [(Skill Level x 5) + (Caster?s DEX + Caster?s Base Level) / 10]
@@ -1874,8 +1874,8 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
 	}
 
 	// Coma
-	if (sd && sd->special_state.bonus_coma && (!md || !mob_is_gvg(md) || !mob_is_battleground(md))) {
-		rate = 0;		
+	if (sd && sd->special_state.bonus_coma && (!md || status_get_race2(&md->bl) != RC2_GVG || status_get_class(&md->bl) != CLASS_BATTLEFIELD)) {
+		rate = 0;
 		//! TODO: Filter the skills that shouldn't inflict coma bonus, to avoid some non-damage skills inflict coma. [Cydh]
 		if (!skill_id || !(skill_get_nk(skill_id)&NK_NO_DAMAGE)) {
 			rate += sd->coma_class[tstatus->class_] + sd->coma_class[CLASS_ALL];
@@ -2082,7 +2082,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
 
 	//Polymorph
 	if(sd && sd->bonus.classchange && attack_type&BF_WEAPON &&
-		dstmd && !status_has_mode(tstatus,MD_BOSS) &&
+		dstmd && !status_has_mode(tstatus,MD_STATUS_IMMUNE) &&
 		(rnd()%10000 < sd->bonus.classchange))
 	{
 		int class_ = mob_get_random_id(MOBG_Branch_Of_Dead_Tree, 1, 0);
@@ -2467,7 +2467,7 @@ int skill_break_equip(struct block_list *src, struct block_list *bl, unsigned sh
 				where&=~where_list[i];
 			else if (rnd()%10000 >= rate)
 				where&=~where_list[i];
-			else if (!sd && !status_bl_has_mode(bl,MD_BOSS)) //Cause Strip effect.
+			else if (!sd) //Cause Strip effect.
 				sc_start(src,bl,scatk[i],100,0,skill_get_time(status_sc2skill(scatk[i]),1));
 		}
 	}
@@ -2541,19 +2541,19 @@ int skill_strip_equip(struct block_list *src,struct block_list *bl, unsigned sho
 }
 
 /**
- Used to knock back players, monsters, traps, etc
+ * Used to knock back players, monsters, traps, etc
  * @param src Object that give knock back
  * @param target Object that receive knock back
  * @param count Number of knock back cell requested
  * @param dir Direction indicates the way OPPOSITE to the knockback direction (or -1 for default behavior)
  * @param flag
-		0x01 - position update packets must not be sent;
-		0x02 - ignores players' special_state.no_knockback;
+		0x01 - position update packets must not be sent
+		0x02 - ignores players' special_state.no_knockback
 		These flags "return 'count' instead of 0 if target is cannot be knocked back":
-		0x04 - at WOE/BG map;
-		0x08 - if target is MD_KNOCKBACK_IMMUNE|MD_BOSS;
-		0x10 - if target has 'special_state.no_knockback';
-		0x20 - if target is in Basilica area;
+		0x04 - at WOE/BG map
+		0x08 - if target is MD_KNOCKBACK_IMMUNE
+		0x10 - if target has 'special_state.no_knockback'
+		0x20 - if target is in Basilica area
  * @return Number of knocked back cells done
  */
 short skill_blown(struct block_list* src, struct block_list* target, char count, int8 dir, unsigned char flag)
@@ -2573,18 +2573,17 @@ short skill_blown(struct block_list* src, struct block_list* target, char count,
 		checkflag |= 0x1; // Offensive
 	if(!(flag&0x2))
 		checkflag |= 0x2; // Knockback type
-	if(is_boss(src))
+	if(status_get_class_(src) == CLASS_BOSS)
 		checkflag |= 0x4; // Boss attack
 
 	// Get reason and check for flags
 	reason = unit_blown_immune(target, checkflag);
 	switch(reason) {
 		case 1: return ((flag&0x04) ? count : 0); // No knocking back in WoE / BG
-		case 2: return count; // Emperium can't be knocked back
-		case 3: return ((flag&0x08) ? count : 0); // Bosses or immune can't be knocked back
-		case 4: return ((flag&0x20) ? count : 0); // Basilica caster can't be knocked-back by normal monsters.
-		case 5: return ((flag&0x10) ? count : 0); // Target has special_state.no_knockback (equip)
-		case 6: return count; // Trap cannot be knocked back
+		case 2: return ((flag&0x08) ? count : 0); // Immune can't be knocked back
+		case 3: return ((flag&0x20) ? count : 0); // Basilica caster can't be knocked-back by normal monsters.
+		case 4: return ((flag&0x10) ? count : 0); // Target has special_state.no_knockback (equip)
+		case 5: return count; // Trap cannot be knocked back
 	}
 
 	if (dir == -1) // <optimized>: do the computation here instead of outside
@@ -2621,7 +2620,7 @@ static int skill_magic_reflect(struct block_list* src, struct block_list* bl, in
 	if (sc && sc->data[SC_MAGICMIRROR] && rnd()%100 < sc->data[SC_MAGICMIRROR]->val2)
 		return 1;
 
-	if( is_boss(src) )
+	if( status_get_class_(src) == CLASS_BOSS )
 		return 0;
 
 	// status-based reflection
@@ -3027,6 +3026,9 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list *
 	nullpo_ret(dsrc);	//dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src.
 	nullpo_ret(bl);		//Target to be attacked.
 
+	if (status_bl_has_mode(bl,MD_SKILL_IMMUNE) || (status_get_class(bl) == MOBID_EMPERIUM && !(skill_get_inf3(skill_id)&INF3_HIT_EMP)))
+		return 0;
+
 	if (src != dsrc) {
 		//When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]
 		if (!status_check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skill_id, 2))
@@ -3447,7 +3449,7 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list *
 		}
 	}
 
-	if(damage > 0 && !status_has_mode(tstatus,MD_BOSS)) {
+	if(damage > 0 && !status_has_mode(tstatus,MD_STATUS_IMMUNE)) {
 		if( skill_id == RG_INTIMIDATE ) {
 			int rate = 50 + skill_lv * 5;
 			rate = rate + (status_get_lv(src) - status_get_lv(bl));
@@ -5953,11 +5955,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		{
 			int heal = skill_calc_heal(src, bl, skill_id, skill_lv, true);
 			int heal_get_jobexp;
-			if (status_isimmune(bl) || (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || mob_is_battleground(dstmd))))
+
+			if (status_isimmune(bl) || (dstmd && (status_get_class(bl) == MOBID_EMPERIUM || status_get_class_(bl) == CLASS_BATTLEFIELD)))
 				heal = 0;
 
 			if( tsc && tsc->count ) {
-				if( tsc->data[SC_KAITE] && !status_has_mode(sstatus,MD_BOSS) ) { //Bounce back heal
+				if( tsc->data[SC_KAITE] && !status_has_mode(sstatus,MD_STATUS_IMMUNE) ) { //Bounce back heal
 					if (--tsc->data[SC_KAITE]->val2 <= 0)
 						status_change_end(bl, SC_KAITE, INVALID_TIMER);
 					if (src == bl)
@@ -6191,16 +6194,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		if (dstmd)
 		{
 			int class_;
-			if ( sd && status_has_mode(&dstmd->status,MD_BOSS) )
-			{
+
+			if ( sd && status_has_mode(&dstmd->status,MD_STATUS_IMMUNE) ) {
 				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
 				break;
 			}
 			class_ = (skill_id == SA_MONOCELL ? MOBID_PORING : mob_get_random_id(MOBG_ClassChange, 1, 0));
 			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
 			mob_class_change(dstmd,class_);
-			if( tsc && status_has_mode(&dstmd->status,MD_BOSS) )
-			{
+			if( tsc && status_has_mode(&dstmd->status,MD_STATUS_IMMUNE) ) {
 				const enum sc_type scs[] = { SC_QUAGMIRE, SC_PROVOKE, SC_ROKISWEIL, SC_GRAVITATION, SC_SUITON, SC_STRIPWEAPON, SC_STRIPSHIELD, SC_STRIPARMOR, SC_STRIPHELM, SC_BLADESTOP };
 				for (i = SC_COMMON_MIN; i <= SC_COMMON_MAX; i++)
 					if (tsc->data[i]) status_change_end(bl, (sc_type)i, INVALID_TIMER);
@@ -6210,8 +6212,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		}
 		break;
 	case SA_DEATH:
-		if ( sd && dstmd && status_has_mode(&dstmd->status,MD_BOSS) )
-		{
+		if ( sd && dstmd && status_has_mode(&dstmd->status,MD_STATUS_IMMUNE) ) {
 			clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
 			break;
 		}
@@ -6625,8 +6626,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	case SM_PROVOKE:
 	case SM_SELFPROVOKE:
 	case MER_PROVOKE:
-		if( status_has_mode(tstatus,MD_BOSS) || battle_check_undead(tstatus->race,tstatus->def_ele) )
-		{
+		if( status_has_mode(tstatus,MD_STATUS_IMMUNE) || battle_check_undead(tstatus->race,tstatus->def_ele) ) {
 			map_freeblock_unlock();
 			return 1;
 		}
@@ -6766,7 +6766,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 				i += dstsd->spiritcharm * 7;
 				pc_delspiritcharm(dstsd,dstsd->spiritcharm,dstsd->spiritcharm_type);
 			}
-		} else if (dstmd && !status_has_mode(tstatus,MD_BOSS) && rnd() % 100 < 20) { // check if target is a monster and not a Boss, for the 20% chance to absorb 2 SP per monster's level [Reddozen]
+		} else if (dstmd && !status_has_mode(tstatus,MD_STATUS_IMMUNE) && rnd() % 100 < 20) { // check if target is a monster and not status immune, for the 20% chance to absorb 2 SP per monster's level [Reddozen]
 			i = 2 * dstmd->level;
 			mob_target(dstmd,src,0);
 		}
@@ -7097,7 +7097,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		{
 			if( status_get_lv(src) > status_get_lv(bl)
 			&&  (tstatus->race == RC_DEMON || tstatus->race == RC_DEMIHUMAN || tstatus->race == RC_PLAYER || tstatus->race == RC_ANGEL)
-			&&  !status_has_mode(tstatus,MD_BOSS) )
+			&&  !status_has_mode(tstatus,MD_STATUS_IMMUNE) )
 				clif_skill_nodamage(src,bl,skill_id,skill_lv, sc_start2(src,bl,type,70,skill_lv,src->id,skill_get_time(skill_id,skill_lv)));
 			else
 			{
@@ -7133,7 +7133,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	case MG_STONECURSE:
 		{
 			int brate = 0;
-			if (status_has_mode(tstatus,MD_BOSS)) {
+			if (status_has_mode(tstatus,MD_STATUS_IMMUNE)) {
 				if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
 				break;
 			}
@@ -7259,8 +7259,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 			clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
 			break;
 		}
-		if( dstmd && dstmd->mob_id == MOBID_EMPERIUM )
-			break; // Cannot be Used on Emperium
 
 		clif_skill_nodamage(src, bl, skill_id, skill_lv, 1);
 		clif_skill_estimation(sd, bl);
@@ -7813,8 +7811,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 					break; //Nothing to cancel.
 				bl_skill_id = ud->skill_id;
 				bl_skill_lv = ud->skill_lv;
-				if (status_has_mode(tstatus,MD_BOSS))
-				{	//Only 10% success chance against bosses. [Skotlex]
+				if (status_has_mode(tstatus,MD_STATUS_IMMUNE)) { //Only 10% success chance against status immune. [Skotlex]
 					if (rnd()%100 < 90)
 					{
 						if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
@@ -7894,9 +7891,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	case SA_ELEMENTFIRE:
 	case SA_ELEMENTGROUND:
 	case SA_ELEMENTWIND:
-		if(sd && !dstmd) //Only works on monsters.
-			break;
-		if(status_has_mode(tstatus,MD_BOSS))
+		if (sd && !dstmd && status_has_mode(tstatus,MD_STATUS_IMMUNE)) // Only works on non-immune monsters.
 			break;
 	case NPC_ATTRICHANGE:
 	case NPC_CHANGEWATER:
@@ -8217,7 +8212,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		break;
 
 	case AS_SPLASHER:
-		if( status_has_mode(tstatus,MD_BOSS)
+		if( status_has_mode(tstatus,MD_STATUS_IMMUNE)
 		// Renewal dropped the 3/4 hp requirement
 #ifndef RENEWAL
 			|| tstatus-> hp > tstatus->max_hp*3/4
@@ -8236,8 +8231,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 
 	case PF_MINDBREAKER:
 		{
-			if(status_has_mode(tstatus,MD_BOSS) || battle_check_undead(tstatus->race,tstatus->def_ele))
-			{
+			if(status_has_mode(tstatus,MD_STATUS_IMMUNE) || battle_check_undead(tstatus->race,tstatus->def_ele)) {
 				map_freeblock_unlock();
 				return 1;
 			}
@@ -8305,7 +8299,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	// Slim Pitcher
 	case CR_SLIMPITCHER:
 		// Updated to block Slim Pitcher from working on barricades and guardian stones.
-		if( dstmd && (dstmd->mob_id == MOBID_EMPERIUM || (dstmd->mob_id >= MOBID_BARRICADE1 && dstmd->mob_id <= MOBID_GUARDIAN_STONE2)) )
+		if (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || status_get_class_(bl) == CLASS_BATTLEFIELD))
 			break;
 		if (potion_hp || potion_sp) {
 			int hp = potion_hp, sp = potion_sp;
@@ -8382,7 +8376,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		{
 			int count = -1;
 			if( rnd() % 100 > skill_lv * 8 || (tsc && tsc->data[SC_BASILICA]) ||
-			(dstmd && ((dstmd->guardian_data && dstmd->mob_id == MOBID_EMPERIUM) || mob_is_battleground(dstmd))) ) {
+			(dstmd && ((dstmd->guardian_data && dstmd->mob_id == MOBID_EMPERIUM) || status_get_class_(bl) == CLASS_BATTLEFIELD)) ) {
 				if( sd )
 					clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
 
@@ -9261,7 +9255,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		break;
 
 	case WL_WHITEIMPRISON:
-		if( (src == bl || battle_check_target(src, bl, BCT_ENEMY)>0) && !is_boss(bl) )// Should not work with bosses.
+		if( (src == bl || battle_check_target(src, bl, BCT_ENEMY)>0) && status_get_class_(bl) != CLASS_BOSS ) // Should not work with Bosses.
 		{
 			int rate = ( sd? sd->status.job_level : 50 ) / 4;
 
@@ -9549,7 +9543,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		if( !(tsc && tsc->data[type]) ) {
 			int rate;
 
-			if (is_boss(bl))
+			if (status_get_class_(bl) == CLASS_BOSS)
 				break;
 			rate = status_get_lv(src) / 10 + rnd_value(sstatus->dex / 12, sstatus->dex / 4) + ( sd ? sd->status.job_level : 50 ) + 10 * skill_lv
 					   - (status_get_lv(bl) / 10 + rnd_value(tstatus->agi / 6, tstatus->agi / 3) + tstatus->luk / 10 + ( dstsd ? (dstsd->max_weight / 10 - dstsd->weight / 10 ) / 100 : 0));
@@ -9563,7 +9557,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		if( !(tsc && tsc->data[type]) ) {
 			int rate;
 
-			if (is_boss(bl))
+			if (status_get_class_(bl) == CLASS_BOSS)
 				break;
 			rate = status_get_lv(src) / 10 + rnd_value(sstatus->dex / 12, sstatus->dex / 4) + ( sd ? sd->status.job_level : 50 ) + 10 * skill_lv
 					   - (status_get_lv(bl) / 10 + rnd_value(tstatus->agi / 6, tstatus->agi / 3) + tstatus->luk / 10 + ( dstsd ? (dstsd->max_weight / 10 - dstsd->weight / 10 ) / 100 : 0));
@@ -9733,7 +9727,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		break;
 	case SR_CURSEDCIRCLE:
 		if( flag&1 ) {
-			if( is_boss(bl) ) break;
+			if( status_get_class_(bl) == CLASS_BOSS )
+				break;
 			if( sc_start2(src,bl, type, 100, skill_lv, src->id, skill_get_time(skill_id, skill_lv))) {
 				if( bl->type == BL_MOB )
 					mob_unlocktarget((TBL_MOB*)bl,gettick());
@@ -9800,7 +9795,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		{
 			unsigned int heal;
 
-			if (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || mob_is_battleground(dstmd)))
+			if (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || status_get_class_(bl) == CLASS_BATTLEFIELD))
 				heal = 0;
 			else {
 				heal = (120 * skill_lv) + (status_get_max_hp(bl) * skill_lv / 100);
@@ -10485,7 +10480,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 			clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
 		break;
 	case KO_GENWAKU:
-		if ((dstsd || dstmd) && !status_has_mode(tstatus,MD_PLANT) && battle_check_target(src,bl,BCT_ENEMY) > 0) {
+		if ((dstsd || dstmd) && !status_has_mode(tstatus,MD_IGNOREMELEE|MD_IGNOREMAGIC|MD_IGNORERANGED|MD_IGNOREMISC) && battle_check_target(src,bl,BCT_ENEMY) > 0) {
 			int x = src->x, y = src->y;
 
 			if (sd && rnd()%100 > ((45+5*skill_lv) - status_get_int(bl)/10)) { //[(Base chance of success) - (Intelligence Objectives / 10)]%.
@@ -10495,13 +10490,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 
 			// Confusion is still inflicted (but rate isn't reduced), no matter map type.
 			status_change_start(src, src, SC_CONFUSION, 2500, skill_lv, 0, 0, 0, skill_get_time(skill_id, skill_lv), SCSTART_NORATEDEF);
-			if (!is_boss(bl))
-				status_change_start(src, bl, SC_CONFUSION, 7500, skill_lv, 0, 0, 0, skill_get_time(skill_id, skill_lv), SCSTART_NORATEDEF);
+			status_change_start(src, bl, SC_CONFUSION, 7500, skill_lv, 0, 0, 0, skill_get_time(skill_id, skill_lv), SCSTART_NORATEDEF);
 
 			if (skill_check_unit_movepos(5,src,bl->x,bl->y,0,0)) {
 				clif_skill_nodamage(src, src, skill_id, skill_lv, 1);
 				clif_blown(src);
-				if (!is_boss(bl) && unit_movepos(bl,x,y,0,0)) {
+				if (!unit_blown_immune(bl, 0x1)) {
+					unit_movepos(bl,x,y,0,0);
 					if (bl->type == BL_PC && pc_issit((TBL_PC*)bl))
 						clif_sitting(bl); //Avoid sitting sync problem
 					clif_blown(bl);
@@ -10512,7 +10507,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	case OB_AKAITSUKI:
 	case OB_OBOROGENSOU:
 		if( sd && ( (skill_id == OB_OBOROGENSOU && bl->type == BL_MOB) // This skill does not work on monsters.
-			|| is_boss(bl) ) ){ // Does not work on Boss monsters.
+			|| status_bl_has_mode(bl,MD_STATUS_IMMUNE) ) ){ // Does not work on status immune monsters.
 			clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
 			break;
 		}
@@ -10793,7 +10788,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	{
 		unsigned int heal;
 
-		if (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || mob_is_battleground(dstmd)))
+		if (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || status_get_class_(bl) == CLASS_BATTLEFIELD))
 			heal = 0;
 		else {
 			heal = ((2 * skill_lv - 1) * 10) * status_get_max_hp(bl) / 100;
@@ -10860,6 +10855,9 @@ static int8 skill_castend_id_check(struct block_list *src, struct block_list *ta
 	int inf2 = skill_get_inf2(skill_id);
 	struct status_change *tsc = status_get_sc(target);
 
+	if (src != target && (status_bl_has_mode(target,MD_SKILL_IMMUNE) || (status_get_class(target) == MOBID_EMPERIUM && !(skill_get_inf3(skill_id)&INF3_HIT_EMP))) && skill_get_casttype(skill_id) == CAST_NODAMAGE)
+		return USESKILL_FAIL_MAX; // Don't show a skill fail message (NoDamage type doesn't consume requirements)
+
 	switch (skill_id) {
 		case AL_HEAL:
 		case AL_INCAGI:
@@ -10936,6 +10934,7 @@ static int8 skill_castend_id_check(struct block_list *src, struct block_list *ta
 
 	switch (skill_id) {
 		// Cannot be casted to Emperium
+		case WZ_ESTIMATION:
 		case SL_SKE:
 		case SL_SKA:
 			if (target->type == BL_MOB && ((TBL_MOB*)target)->mob_id == MOBID_EMPERIUM)
@@ -11118,8 +11117,13 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
 		{
 			if( !skill_check_condition_castend(sd, ud->skill_id, ud->skill_lv) )
 				break;
-			else
+			else {
 				skill_consume_requirement(sd,ud->skill_id,ud->skill_lv,1);
+				if (src != target && (status_bl_has_mode(target,MD_SKILL_IMMUNE) || (status_get_class(target) == MOBID_EMPERIUM && !(skill_get_inf3(ud->skill_id)&INF3_HIT_EMP))) && skill_get_casttype(ud->skill_id) == CAST_DAMAGE) {
+					clif_skill_fail(sd, ud->skill_id, USESKILL_FAIL_LEVEL, 0);
+					break; // Show a skill fail message (Damage type consumes requirements)
+				}
+			}
 		}
 
 		if( (src->type == BL_MER || src->type == BL_HOM) && !skill_check_condition_mercenary(src, ud->skill_id, ud->skill_lv, 1) )
@@ -13212,8 +13216,8 @@ static int skill_unit_onplace(struct skill_unit *unit, struct block_list *bl, un
 		case UNT_BASILICA:
 			{
 				int i = battle_check_target(bl, bl, BCT_ENEMY);
-				if( i > 0 && !status_bl_has_mode(bl,MD_BOSS) )
-				{ // knock-back any enemy except Boss
+
+				if (i > 0) {
 					skill_blown(ss, bl, skill_get_blewcount(skill_id, sg->skill_lv), unit_getdir(bl), 0);
 					break;
 				}
@@ -13287,7 +13291,7 @@ static int skill_unit_onplace(struct skill_unit *unit, struct block_list *bl, un
 			break;
 
 		case UNT_CATNIPPOWDER:
-			if (sg->src_id == bl->id || status_bl_has_mode(bl,MD_BOSS))
+			if (sg->src_id == bl->id)
 				break; // Does not affect the caster or Boss.
 			if (!sce && battle_check_target(&unit->bl, bl, BCT_ENEMY) > 0)
 				sc_start(ss, bl, type, 100, sg->skill_lv, skill_get_time(sg->skill_id, sg->skill_lv));
@@ -13469,11 +13473,12 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
 			} else {
 				int heal = skill_calc_heal(ss,bl,sg->skill_id,sg->skill_lv,true);
 				struct mob_data *md = BL_CAST(BL_MOB, bl);
+
 #ifdef RENEWAL
-				if( md && md->mob_id == MOBID_EMPERIUM )
+				if (md && md->mob_id == MOBID_EMPERIUM)
 					break;
 #endif
-				if( md && mob_is_battleground(md) )
+				if (md && status_get_class_(bl) == CLASS_BATTLEFIELD)
 					break;
 				if( tstatus->hp >= tstatus->max_hp )
 					break;
@@ -13563,7 +13568,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
 
 		case UNT_ELECTRICSHOCKER:
 			if( bl->id != ss->id ) {
-				if( status_bl_has_mode(bl,MD_BOSS) )
+				if( status_bl_has_mode(bl,MD_STATUS_IMMUNE) )
 					break;
 				if( status_change_start(ss, bl,type,10000,sg->skill_lv,sg->group_id,0,0,skill_get_time2(sg->skill_id, sg->skill_lv), SCSTART_NORATEDEF) ) {
 					map_moveblock(bl, unit->bl.x, unit->bl.y, tick);
@@ -13776,8 +13781,8 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
 		case UNT_BASILICA:
 			{
 				int i = battle_check_target(&unit->bl, bl, BCT_ENEMY);
-				if( i > 0 && !status_bl_has_mode(bl,MD_BOSS) )
-				{ // knock-back any enemy except Boss
+
+				if (i > 0) {
 					skill_blown(&unit->bl, bl, skill_get_blewcount(skill_id, sg->skill_lv), unit_getdir(bl), 0);
 					break;
 				}
@@ -13860,7 +13865,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
 				skill_attack(BF_WEAPON,ss,&unit->bl,bl,WM_SEVERE_RAINSTORM_MELEE,sg->skill_lv,tick,0);
 			break;
 		case UNT_NETHERWORLD:
-			if (!status_bl_has_mode(bl,MD_BOSS) || (!map_flag_gvg2(ss->m) && battle_check_target(&unit->bl,bl,BCT_PARTY) < 0)) {
+			if (!status_bl_has_mode(bl,MD_STATUS_IMMUNE) || (!map_flag_gvg2(ss->m) && battle_check_target(&unit->bl,bl,BCT_PARTY) < 0)) {
 				if (!(tsc && tsc->data[type])) {
 					sc_start(ss, bl, type, 100, sg->skill_lv, skill_get_time2(sg->skill_id,sg->skill_lv));
 					sg->limit = DIFF_TICK(tick,sg->tick);
@@ -13890,7 +13895,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
 		case UNT_WALLOFTHORN:
 			if (unit->val2-- <= 0) // Max hit reached
 				break;
-			if (status_bl_has_mode(bl,MD_BOSS))
+			if (status_bl_has_mode(bl,MD_STATUS_IMMUNE))
 				break; // This skill doesn't affect to Boss monsters. [iRO Wiki]
 			skill_blown(&unit->bl, bl, skill_get_blewcount(sg->skill_id, sg->skill_lv), -1, 0);
 			skill_addtimerskill(ss, tick + 100, bl->id, unit->bl.x, unit->bl.y, sg->skill_id, sg->skill_lv, skill_get_type(sg->skill_id), 4|SD_LEVEL);
@@ -13979,7 +13984,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
 			break;
 
 		case UNT_BANDING:
-			if( battle_check_target(&unit->bl, bl, BCT_ENEMY) > 0 && !status_bl_has_mode(bl,MD_BOSS) && !(tsc && tsc->data[SC_BANDING_DEFENCE]) )
+			if( battle_check_target(&unit->bl, bl, BCT_ENEMY) > 0 && !(tsc && tsc->data[SC_BANDING_DEFENCE]) )
 				sc_start(ss, bl, SC_BANDING_DEFENCE, (status_get_lv(&unit->bl) / 5) + (sg->skill_lv * 5) - (status_get_agi(bl) / 10), 90, skill_get_time2(sg->skill_id, sg->skill_lv));
 			break;
 
@@ -14065,7 +14070,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
 			break;
 
 		case UNT_SV_ROOTTWIST:
-			if (status_bl_has_mode(bl,MD_BOSS))
+			if (status_bl_has_mode(bl,MD_STATUS_IMMUNE))
 				break;
 			if (tsc) {
 				if (!sg->val2) {
@@ -17210,7 +17215,7 @@ static int skill_trap_splash(struct block_list *bl, va_list ap)
 			break;
 		case UNT_ELECTRICSHOCKER:
 			if (bl->id != ss->id) {
-				if (status_bl_has_mode(bl,MD_BOSS))
+				if (status_bl_has_mode(bl,MD_STATUS_IMMUNE))
 					break;
 				if (status_change_start(ss, bl, SC_ELECTRICSHOCKER, 10000, sg->skill_lv, sg->group_id, 0, 0, skill_get_time2(sg->skill_id, sg->skill_lv), SCSTART_NORATEDEF)) {
 					map_moveblock(bl, unit->bl.x, unit->bl.y, tick);
@@ -17223,7 +17228,7 @@ static int skill_trap_splash(struct block_list *bl, va_list ap)
 		case UNT_COBALTTRAP:
 		case UNT_MAIZETRAP:
 		case UNT_VERDURETRAP:
-			if( bl->type != BL_PC && !is_boss(bl) )
+			if( bl->type != BL_PC && status_get_class_(bl) != CLASS_BOSS )
 				sc_start2(ss,bl,SC_ELEMENTALCHANGE,100,sg->skill_lv,skill_get_ele(sg->skill_id,sg->skill_lv),skill_get_time2(sg->skill_id,sg->skill_lv));
 			break;
 		case UNT_REVERBERATION: // For proper skill delay animation when used with Dominion Impulse

+ 71 - 39
src/map/status.c

@@ -1952,7 +1952,7 @@ bool status_check_skilluse(struct block_list *src, struct block_list *target, ui
 		case ALL_ODINS_POWER:
 			// Should fail when used on top of Land Protector [Skotlex]
 			if (src && map_getcell(src->m, src->x, src->y, CELL_CHKLANDPROTECTOR)
-				&& !status_has_mode(status,MD_BOSS)
+				&& !status_has_mode(status,MD_STATUS_IMMUNE)
 				&& (src->type != BL_PC || ((TBL_PC*)src)->skillitem != skill_id))
 				return false;
 			break;
@@ -1967,7 +1967,7 @@ bool status_check_skilluse(struct block_list *src, struct block_list *target, ui
 		if (sc->data[SC_ALL_RIDING])
 			return false; //You can't use skills while in the new mounts (The client doesn't let you, this is to make cheat-safe)
 
-		if (flag == 1 && !status_has_mode(status,MD_BOSS) && ( // Applies to after cast completion only and doesn't apply to Boss monsters.
+		if (flag == 1 && !status_has_mode(status,MD_STATUS_IMMUNE) && ( // Applies to after cast completion only and doesn't apply to Boss monsters.
 			(sc->data[SC_ASH] && rnd()%2) || // Volcanic Ash has a 50% chance of causing skills to fail.
 			(sc->data[SC_KYOMU] && rnd()%100 < 25) // Kyomu has a 25% chance of causing skills fail.
 		)) {
@@ -2093,7 +2093,7 @@ bool status_check_skilluse(struct block_list *src, struct block_list *target, ui
 	switch( target->type ) {
 		case BL_PC: {
 				struct map_session_data *tsd = (TBL_PC*)target;
-				bool is_boss = status_has_mode(status,MD_BOSS);
+				bool is_boss = (status_get_class_(src) == CLASS_BOSS);
 				bool is_detect = status_has_mode(status,MD_DETECTOR);
 
 				if (pc_isinvisible(tsd))
@@ -2102,13 +2102,11 @@ bool status_check_skilluse(struct block_list *src, struct block_list *target, ui
 					if ((tsc->option&hide_flag) && !is_boss && (tsd->special_state.perfect_hiding || !is_detect))
 						return false;
 					if (tsc->data[SC_CLOAKINGEXCEED] && !is_boss && (tsd->special_state.perfect_hiding || is_detect))
-						return false;
+						return false; // Works against insect and demon but not against bosses
 					if (tsc->data[SC__FEINTBOMB] && (is_boss || is_detect))
-						return false;
-					if (tsc->data[SC_CAMOUFLAGE] && !(is_boss || is_detect) && (!skill_id || (!flag && src)))
-						return false;
-					if (( tsc->data[SC_STEALTHFIELD] || tsc->data[SC_SUHIDE]) && !(is_boss || is_detect))
-						return false;
+						return false; // Works against all
+					if ((tsc->data[SC_CAMOUFLAGE] || tsc->data[SC_STEALTHFIELD] || tsc->data[SC_SUHIDE]) && !(is_boss || is_detect) && (!skill_id || (!flag && src)))
+						return false; // Insect, demon, and boss can detect
 				}
 			}
 			break;
@@ -2129,7 +2127,7 @@ bool status_check_skilluse(struct block_list *src, struct block_list *target, ui
 		default:
 			// Check for chase-walk/hiding/cloaking opponents.
 			if( tsc ) {
-				if( tsc->option&hide_flag && !status_has_mode(status,MD_BOSS|MD_DETECTOR))
+				if( tsc->option&hide_flag && !status_has_mode(status,MD_DETECTOR))
 					return false;
 			}
 	}
@@ -2166,7 +2164,7 @@ int status_check_visibility(struct block_list *src, struct block_list *target)
 		return 1;
 
 	if (tsc) {
-		bool is_boss = status_has_mode(status,MD_BOSS);
+		bool is_boss = (status_get_class_(src) == CLASS_BOSS);
 		bool is_detector = status_has_mode(status,MD_DETECTOR);
 
 		switch (target->type) {	// Check for chase-walk/hiding/cloaking opponents.
@@ -2529,6 +2527,9 @@ int status_calc_mob_(struct mob_data* md, enum e_status_calc_opt opt)
 	if (md->master_id && md->special_state.ai>AI_ATTACK)
 		flag|=16;
 
+	if (md->master_id && battle_config.slaves_inherit_mode)
+		flag |= 32;
+
 	if (!flag) { // No special status required.
 		if (md->base_status) {
 			aFree(md->base_status);
@@ -2557,6 +2558,9 @@ int status_calc_mob_(struct mob_data* md, enum e_status_calc_opt opt)
 			status->speed = 2;
 	}
 
+	if (flag&32)
+		status_calc_slave_mode(md, map_id2md(md->master_id));
+
 	if (flag&1) { // Increase from mobs leveling up [Valaris]
 		int diff = md->level - md->db->lv;
 
@@ -3134,7 +3138,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
 
 	// !FIXME: Most of these stuff should be calculated once, but how do I fix the memset above to do that? [Skotlex]
 	// Give them all modes except these (useful for clones)
-	base_status->mode = MD_MASK&~(MD_BOSS|MD_PLANT|MD_DETECTOR|MD_ANGRY|MD_TARGETWEAK);
+	base_status->mode = MD_MASK&~(MD_STATUS_IMMUNE|MD_IGNOREMELEE|MD_IGNOREMAGIC|MD_IGNORERANGED|MD_IGNOREMISC|MD_DETECTOR|MD_ANGRY|MD_TARGETWEAK);
 
 	base_status->size = (sd->class_&JOBL_BABY || (sd->class_&MAPID_BASEMASK) == MAPID_SUMMONER) ? SZ_SMALL : SZ_MEDIUM;
 	if (battle_config.character_size && pc_isriding(sd)) { // [Lupus]
@@ -6687,7 +6691,7 @@ static unsigned short status_calc_dmotion(struct block_list *bl, struct status_c
 		return cap_value(dmotion,0,USHRT_MAX);
 
 	/// It has been confirmed on official servers that MvP mobs have no dmotion even without endure
-	if( sc->data[SC_ENDURE] || ( bl->type == BL_MOB && status_has_mode(status_get_status_data(bl),MD_BOSS) ) )
+	if( sc->data[SC_ENDURE] || ( bl->type == BL_MOB && status_get_class_(bl) == CLASS_BOSS ) )
 		return 0;
 	if( sc->data[SC_RUN] || sc->data[SC_WUGDASH] )
 		return 0;
@@ -6836,7 +6840,7 @@ unsigned char status_calc_attack_element(struct block_list *bl, struct status_ch
  * @param bl: Object whose mode to change [PC|MOB|PET|HOM|NPC]
  * @param sc: Object's status change data
  * @param mode: Original mode
- * @return mode with cap_value(mode,0,USHRT_MAX)
+ * @return mode with cap_value(mode, 0, INT_MAX)
  */
 static enum e_mode status_calc_mode(struct block_list *bl, struct status_change *sc, enum e_mode mode)
 {
@@ -6844,7 +6848,7 @@ static enum e_mode status_calc_mode(struct block_list *bl, struct status_change
 		return cap_value(mode, 0, INT_MAX);
 	if(sc->data[SC_MODECHANGE]) {
 		if (sc->data[SC_MODECHANGE]->val2)
-			mode = sc->data[SC_MODECHANGE]->val2; // Set mode
+			mode = (mode&~MD_MASK)|sc->data[SC_MODECHANGE]->val2; // Set mode
 		if (sc->data[SC_MODECHANGE]->val3)
 			mode|= sc->data[SC_MODECHANGE]->val3; // Add mode
 		if (sc->data[SC_MODECHANGE]->val4)
@@ -6853,6 +6857,34 @@ static enum e_mode status_calc_mode(struct block_list *bl, struct status_change
 	return cap_value(mode, 0, INT_MAX);
 }
 
+/**
+ * Changes the mode of a slave mob
+ * @param md: Slave mob whose mode to change
+ * @param mmd: Master of slave mob
+ */
+void status_calc_slave_mode(struct mob_data *md, struct mob_data *mmd)
+{
+	switch (battle_config.slaves_inherit_mode) {
+		case 1: //Always aggressive
+			if (!status_has_mode(&md->status,MD_AGGRESSIVE))
+				sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 0);
+			break;
+		case 2: //Always passive
+			if (status_has_mode(&md->status,MD_AGGRESSIVE))
+				sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, 0, MD_AGGRESSIVE, 0);
+			break;
+		case 4: // Overwrite with slave mode
+			sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, MD_CANMOVE|MD_NORANDOM_WALK|MD_CANATTACK, 0, 0, 0);
+			break;
+		default: //Copy master
+			if (status_has_mode(&mmd->status,MD_AGGRESSIVE))
+				sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 0);
+			else
+				sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, 0, MD_AGGRESSIVE, 0);
+			break;
+	}
+}
+
 /**
  * Gets the name of the given bl
  * @param bl: Object whose name to get [PC|MOB|PET|HOM|NPC]
@@ -7146,16 +7178,17 @@ int status_get_emblem_id(struct block_list *bl)
 }
 
 /**
- * Gets the race of a mob or pet
+ * Gets the race2 of a mob or pet
  * @param bl: Object whose race2 to get [MOB|PET]
  * @return race2
  */
 enum e_race2 status_get_race2(struct block_list *bl)
 {
 	nullpo_retr(RC2_NONE,bl);
-	if(bl->type == BL_MOB)
+
+	if (bl->type == BL_MOB)
 		return ((struct mob_data *)bl)->db->race2;
-	if(bl->type == BL_PET)
+	if (bl->type == BL_PET)
 		return ((struct pet_data *)bl)->db->race2;
 	return RC2_NONE;
 }
@@ -7574,7 +7607,7 @@ int status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_typ
 			sc_def2 = status->mdef*100;
 			break;
 		case SC_ANKLE:
-			if(status_has_mode(status,MD_BOSS)) // Lasts 5 times less on bosses
+			if(status_has_mode(status,MD_STATUS_IMMUNE)) // Lasts 5 times less on bosses
 				tick /= 5;
 			sc_def = status->agi*50;
 			break;
@@ -7854,13 +7887,9 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 	if (status_change_isDisabledOnMap(type, bl->m))
 		return 0;
 
-	if( bl->type == BL_MOB) {
-		struct mob_data *md = BL_CAST(BL_MOB,bl);
-		if(md && (md->mob_id == MOBID_EMPERIUM || mob_is_battleground(md)) && type != SC_SAFETYWALL && type != SC_PNEUMA)
-			return 0; // Emperium/BG Monsters can't be afflicted by status changes
-		// Uncomment to prevent status adding hp to gvg mob (like bloodylust=hp*3 etc...
-		// if(md && mob_is_gvg(md) && status_sc2scb_flag(type)&SCB_MAXHP) return 0;
-	}
+	// Uncomment to prevent status adding hp to gvg mob (like bloodylust=hp*3 etc...
+//	if (bl->type == BL_MOB)
+//		if (status_get_race2(bl) == RC2_GVG && status_sc2scb_flag(type)&SCB_MAXHP) return 0;
 
 	if( sc->data[SC_REFRESH] ) {
 		if( type >= SC_COMMON_MIN && type <= SC_COMMON_MAX) // Confirmed.
@@ -8067,7 +8096,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			val3 |= sc->data[type]->val3;
 			val4 |= sc->data[type]->val4;
 		}
-		mode = val2?val2:bstatus->mode; // Base mode
+		mode = val2 ? ((val2&~MD_MASK)|val2) : bstatus->mode; // Base mode
 		if (val4) mode&=~val4; // Del mode
 		if (val3) mode|= val3; // Add mode
 		if (mode == bstatus->mode) { // No change.
@@ -8266,8 +8295,8 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 		break;
 	}
 
-	// Check for BOSS resistances
-	if(status_has_mode(status,MD_BOSS) && !(flag&SCSTART_NOAVOID)) {
+	// Check for resistances
+	if(status_has_mode(status,MD_STATUS_IMMUNE) && !(flag&SCSTART_NOAVOID)) {
 		if (type>=SC_COMMON_MIN && type <= SC_COMMON_MAX)
 			return 0;
 		switch (type) {
@@ -8277,9 +8306,15 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			case SC_COMA:
 			case SC_GRAVITATION:
 			case SC_SUITON:
+			case SC_STRIPWEAPON:
+			case SC_STRIPARMOR:
+			case SC_STRIPSHIELD:
+			case SC_STRIPHELM:
 			case SC_RICHMANKIM:
 			case SC_ROKISWEIL:
 			case SC_FOGWALL:
+			case SC_WHITEIMPRISON:
+			case SC_FEAR:
 			case SC_FREEZING:
 			case SC_BURNING:
 			case SC_MARSHOFABYSS:
@@ -8287,12 +8322,6 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			case SC_PARALYSIS:
 			case SC_DEEPSLEEP:
 			case SC_CRYSTALIZE:
-			case SC__ENERVATION:
-			case SC__GROOMY:
-			case SC__IGNORANCE:
-			case SC__LAZINESS:
-			case SC__UNLUCKY:
-			case SC__WEAKNESS:
 			case SC_TEARGAS:
 			case SC_TEARGAS_SOB:
 			case SC_PYREXIA:
@@ -8303,11 +8332,14 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			case SC_MAGICMUSHROOM:
 			case SC_OBLIVIONCURSE:
 			case SC_LEECHESEND:
+			case SC_BANDING_DEFENCE:
 			case SC_BITE:
 			case SC_ELECTRICSHOCKER:
 			case SC_MAGNETICFIELD:
 			case SC_NETHERWORLD:
+			case SC_CRESCENTELBOW:
 			case SC_VACUUM_EXTREME:
+			case SC_CATNIPPOWDER:
 			case SC_SV_ROOTTWIST:
 			case SC_BITESCAR:
 			case SC_FRESHSHRIMP:
@@ -9563,7 +9595,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			val3= 20*val1; // Int increase
 			break;
 		case SC_SWOO:
-			if(status_has_mode(status,MD_BOSS))
+			if(status_has_mode(status,MD_STATUS_IMMUNE))
 				tick /= 5; // !TODO: Reduce skill's duration. But for how long?
 			break;
 		case SC_SPIDERWEB:
@@ -10267,7 +10299,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			val2 = 0; // hit % reduc
 			val3 = 0; // def % reduc
 			val4 = 0; // atk flee & reduc
-			if (!status_bl_has_mode(bl,MD_BOSS)) {
+			if (!status_bl_has_mode(bl,MD_STATUS_IMMUNE)) {
 				val2 = 50;
 				if (status_get_race(bl) == RC_PLANT) // plant type
 					val3 = 50;
@@ -13062,8 +13094,8 @@ int status_change_spread(struct block_list *src, struct block_list *bl, bool typ
 
 	tick = gettick();
 
-	//Boss monsters resistance
-	if( status_bl_has_mode(src,MD_BOSS) || status_bl_has_mode(bl,MD_BOSS) )
+	// Status Immunity resistance
+	if (status_bl_has_mode(src,MD_STATUS_IMMUNE) || status_bl_has_mode(bl,MD_STATUS_IMMUNE))
 		return 0;
 
 	for( i = SC_COMMON_MIN; i < SC_MAX; i++ ) {

+ 15 - 8
src/map/status.h

@@ -1710,10 +1710,10 @@ enum e_mode {
 	MD_AGGRESSIVE			= 0x0000004,
 	MD_ASSIST				= 0x0000008,
 	MD_CASTSENSOR_IDLE		= 0x0000010,
-	MD_BOSS					= 0x0000020,
-	MD_PLANT				= 0x0000040,
+	MD_NORANDOM_WALK		= 0x0000020,
+	MD_NOCAST_SKILL			= 0x0000040,
 	MD_CANATTACK			= 0x0000080,
-	MD_DETECTOR				= 0x0000100,
+	//FREE					= 0x0000100,
 	MD_CASTSENSOR_CHASE		= 0x0000200,
 	MD_CHANGECHASE			= 0x0000400,
 	MD_ANGRY				= 0x0000800,
@@ -1727,12 +1727,17 @@ enum e_mode {
 	MD_MVP					= 0x0080000,
 	MD_IGNOREMISC			= 0x0100000,
 	MD_KNOCKBACK_IMMUNE		= 0x0200000,
-	MD_NORANDOM_WALK		= 0x0400000,
-	MD_NOCAST_SKILL			= 0x0800000,
+	MD_TELEPORT_BLOCK		= 0x0400000,
+	//FREE					= 0x0800000,
 	MD_FIXED_ITEMDROP		= 0x1000000,
+	MD_DETECTOR				= 0x2000000,
+	MD_STATUS_IMMUNE		= 0x4000000,
+	MD_SKILL_IMMUNE			= 0x8000000,
 };
-#define MD_MASK 0x00FFFF
-#define ATR_MASK 0xFF0000
+
+#define MD_MASK 0x000FFFF
+#define ATR_MASK 0x0FF0000
+#define CL_MASK 0xF000000
 
 //Status change option definitions (options are what makes status changes visible to chars
 //who were not on your field of sight when it happened)
@@ -2173,7 +2178,7 @@ unsigned char status_calc_attack_element(struct block_list *bl, struct status_ch
 #define status_get_class_(bl) status_get_status_data(bl)->class_
 #define status_get_size(bl) status_get_status_data(bl)->size
 #define status_get_mode(bl) status_get_status_data(bl)->mode
-#define status_has_mode(status,md) ((status)->mode&(md))
+#define status_has_mode(status,md) (((status)->mode&(md)) == (md))
 #define status_bl_has_mode(bl,md) status_has_mode(status_get_status_data((bl)),(md))
 
 #define status_get_homstr(bl) (status->str + ((TBL_HOM*)bl)->homunculus.str_value)
@@ -2234,6 +2239,8 @@ void status_calc_misc(struct block_list *bl, struct status_data *status, int lev
 void status_calc_regen(struct block_list *bl, struct status_data *status, struct regen_data *regen);
 void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, struct status_change *sc);
 
+void status_calc_slave_mode(struct mob_data *md, struct mob_data *mmd);
+
 bool status_check_skilluse(struct block_list *src, struct block_list *target, uint16 skill_id, int flag);
 int status_check_visibility(struct block_list *src, struct block_list *target);
 

+ 16 - 20
src/map/unit.c

@@ -362,8 +362,8 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data
 	dx = dirx[(int)dir];
 	dy = diry[(int)dir];
 
-	//Get icewall walk block depending on boss mode (players can't be trapped)
-	if(md && status_has_mode(&md->status,MD_BOSS))
+	// Get icewall walk block depending on Status Immune mode (players can't be trapped)
+	if(md && status_has_mode(&md->status,MD_STATUS_IMMUNE))
 		icewall_walk_block = battle_config.boss_icewall_walk_block;
 	else if(md)
 		icewall_walk_block = battle_config.mob_icewall_walk_block;
@@ -1100,12 +1100,11 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
  *		0x4 - Boss attack
  * @return reason for immunity
  *		0 - can be knocked back / stopped
- *		1 - at WOE/BG map;
- *		2 - target is emperium
- *		3 - target is MD_KNOCKBACK_IMMUNE|MD_BOSS;
- *		4 - target is in Basilica area;
- *		5 - target has 'special_state.no_knockback';
- *		6 - target is trap that cannot be knocked back
+ *		1 - at WOE/BG map
+ *		2 - target is MD_KNOCKBACK_IMMUNE
+ *		3 - target is in Basilica area
+ *		4 - target has 'special_state.no_knockback'
+ *		5 - target is trap that cannot be knocked back
  */
 uint8 unit_blown_immune(struct block_list* bl, uint8 flag)
 {
@@ -1117,30 +1116,27 @@ uint8 unit_blown_immune(struct block_list* bl, uint8 flag)
 	switch (bl->type) {
 		case BL_MOB: {
 				struct mob_data* md = BL_CAST(BL_MOB, bl);
-				// Emperium can't be knocked back
-				if( md->mob_id == MOBID_EMPERIUM )
-					return 2;
-				// Bosses or immune can't be knocked back
-				if((flag&0x1) && status_bl_has_mode(bl,MD_KNOCKBACK_IMMUNE|MD_BOSS)
+				// Immune can't be knocked back
+				if (((flag&0x1) && status_bl_has_mode(bl,MD_KNOCKBACK_IMMUNE))
 					&& ((flag&0x2) || !(battle_config.skill_trap_type&0x2)))
-					return 3;
+					return 2;
 			}
 			break;
 		case BL_PC: {
 				struct map_session_data *sd = BL_CAST(BL_PC, bl);
 				// Basilica caster can't be knocked-back by normal monsters.
 				if( !(flag&0x4) && &sd->sc && sd->sc.data[SC_BASILICA] && sd->sc.data[SC_BASILICA]->val4 == sd->bl.id)
-					return 4;
+					return 3;
 				// Target has special_state.no_knockback (equip)
 				if( (flag&(0x1|0x2)) && sd->special_state.no_knockback )
-					return 5;
+					return 4;
 			}
 			break;
 		case BL_SKILL: {
 				struct skill_unit* su = (struct skill_unit *)bl;
 				// Trap cannot be knocked back
 				if (su && su->group && skill_get_unit_flag(su->group->skill_id)&UF_NOKNOCKBACK)
-					return 6;
+					return 5;
 			}
 			break;
 	}
@@ -1380,8 +1376,8 @@ int unit_can_move(struct block_list *bl) {
 	// Icewall walk block special trapped monster mode
 	if(bl->type == BL_MOB) {
 		struct mob_data *md = BL_CAST(BL_MOB, bl);
-		if(md && ((status_has_mode(&md->status,MD_BOSS) && battle_config.boss_icewall_walk_block == 1 && map_getcell(bl->m,bl->x,bl->y,CELL_CHKICEWALL))
-			|| (!status_has_mode(&md->status,MD_BOSS) && battle_config.mob_icewall_walk_block == 1 && map_getcell(bl->m,bl->x,bl->y,CELL_CHKICEWALL)))) {
+		if(md && ((status_has_mode(&md->status,MD_STATUS_IMMUNE) && battle_config.boss_icewall_walk_block == 1 && map_getcell(bl->m,bl->x,bl->y,CELL_CHKICEWALL))
+			|| (!status_has_mode(&md->status,MD_STATUS_IMMUNE) && battle_config.mob_icewall_walk_block == 1 && map_getcell(bl->m,bl->x,bl->y,CELL_CHKICEWALL)))) {
 			md->walktoxy_fail_count = 1; //Make sure rudeattacked skills are invoked
 			return 0;
 		}
@@ -1434,7 +1430,7 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int
 
 	if (type) {
 		//Bosses can ignore skill induced walkdelay (but not damage induced)
-		if(bl->type == BL_MOB && status_has_mode(status_get_status_data(bl),MD_BOSS))
+		if(bl->type == BL_MOB && status_has_mode(status_get_status_data(bl),MD_STATUS_IMMUNE))
 			return 0;
 		//Make sure walk delay is not decreased
 		if (DIFF_TICK(ud->canmove_tick, tick+delay) > 0)

+ 142 - 0
tools/convert_monstermode.pl

@@ -0,0 +1,142 @@
+#!/usr/bin/perl
+# rAthena Monster Mode Converter
+# Upgrades monster's mode to the new structure.
+# 
+
+use strict;
+use warnings;
+use Getopt::Long;
+use File::Basename;
+use Scalar::Util qw(looks_like_number);
+
+my $sFileins;
+my @aFilein = ("../db/re/mob_db.txt","../db/pre-re/mob_db.txt","../db/mob_db2.txt");
+my $sFileouts;
+my @aFileout = ("../db/re/mob_db.txt","../db/pre-re/mob_db.txt","../db/mob_db2.txt");
+my $sHelp = 0;
+
+Main();
+
+sub convertmode {
+	my $bits = hex(shift);
+	my $mexp = shift;
+
+	if ($bits&32) { # MD_BOSS
+		$bits -= 32;
+		$bits |= 69206016; # Doesn't include MD_DETECTOR
+	}
+
+	if ($bits&64) { # MD_PLANT
+		$bits -= 64;
+		$bits |= 1507328;
+	}
+
+	if ($bits&256) { # MD_DETECTOR
+		$bits -= 256;
+		$bits |= 33554432;
+	}
+
+	if ($bits&4194304) { # MD_NORANDOM_WALK
+		$bits -= 4194304;
+		$bits |= 32;
+	}
+
+	if ($bits&8388608) { # MD_NOCAST_SKILL
+		$bits -= 8388608;
+		$bits |= 64;
+	}
+
+	if ($mexp > 0) # MD_MVP
+		$bits |= 524288;
+
+	return $bits;
+}
+
+sub GetArgs {
+	GetOptions(
+	'i=s' => \$sFileins, #Output file name.
+	'o=s' => \$sFileouts, #Input file name.
+	'help!' => \$sHelp,
+	) or $sHelp=1; #Display help if invalid options are supplied.
+
+	if( $sHelp ) {
+		print "Incorrect option specified. Available options:\n"
+			."\t --o=filename => Output file name. (file must be separate by coma if multiple) \n"
+			."\t --i=filenames => Input files name. (file must be separate by coma if multiple) \n";
+		exit;
+	}
+	if($sFileins){
+		chomp($sFileins);
+		@aFilein = split(",",$sFileins);
+	}
+	if($sFileouts){
+		chomp($sFileouts);
+		@aFileout = split(",",$sFileouts);
+	}
+	unless(scalar(@aFileout)==scalar(@aFilein)){
+		print "ERROR: Number of input files doesn't match number of output files. You must specify an output for each input:\n"
+			."afilein = [ @aFilein ] \n"
+			."afileout = [ @aFileout ] \n";
+		exit;
+	}
+}
+
+sub Main {
+	my $sI=0;
+	my($filename, $dir, $suffix) = fileparse($0);
+	chdir $dir; #put ourself like was called in tool folder
+	GetArgs();
+	print "Running rAthena's Monster Mode Converter...\n";
+	print "Files to be converted: '@aFilein' into '@aFileout'.\n";
+	foreach my $sFile (@aFilein){
+		my $sReplace=0; #should we replace file when finished
+		my $sFileouttmp=$aFileout[$sI];
+		if($sFile eq $sFileouttmp){
+			$sReplace=1;
+			$sFileouttmp = $sFileouttmp.".out";
+			print "Asking to replace file tmp fileout= $sFileouttmp \n";
+		}
+		unless(open FHIN,"$sFile"){
+			print "ERROR: Can't read or locate $sFile.\n";
+			next;
+		}
+		unless(open FHOUT,">$sFileouttmp"){
+		   print "ERROR: Can't write or locate $aFileout[$sI].\n";
+		   next;
+		}
+		$sI++;
+		while (<FHIN>){
+			if( $_ =~ /^\s*$/) {  #ignore empty line
+				print FHOUT $_; 
+				next;  
+			} 
+			my @champ = split(",",$_);
+			my $sDoconvertion=0; #should this comment be converted
+			if( $_ =~ /^\/\// ) { # // line
+				if(scalar(@champ)>0){
+					$champ[0] =~ s!\/\/!!g;
+					$sDoconvertion=looks_like_number($champ[0]);
+					$champ[0] = "//".$champ[0]; #recomment it
+				}
+				if($sDoconvertion==0) {
+					print FHOUT $_;
+					next; 
+				}
+			}
+			if(scalar(@champ>0)){
+				$mode = $champ[25];
+				$mexp = $champ[30];
+				$champ[25] = sprintf("0x%X", convertmode($mode, $mexp));
+				my $newline = join(",",@champ);
+				print FHOUT $newline;
+			}
+			else { print FHOUT $_; }
+		}
+		close FHOUT;
+		close FHIN;
+		if($sReplace){
+			unlink $sFile;
+			rename $sFileouttmp, $sFile;
+		}
+	}
+}

Some files were not shown because too many files changed in this diff