Converts the mob database to YAML (#5435)

* Combines mob_race2 and mob_drop databases into one.
* General cleanups and optimizations.
* Includes CSV2YAML conversion tool.
Thanks to @vstumpf, @lukasrmattos, and @Lemongrass3110!
This commit is contained in:
Aleos 2021-02-16 17:09:06 -05:00 committed by GitHub
parent 6ed0359522
commit 7992e0891b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
58 changed files with 136726 additions and 12811 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
/autom4te.cache/requests
/autom4te.cache/traces.0
#Global
.vscode
.Apple*
.DS_Store
.clang_complete

View File

@ -429,8 +429,8 @@
404: War of Emperium SE is currently in progress.
405: War of Emperium SE has been ended.
406: War of Emperium SE is currently not in progress.
//407: free
//chrif related
407: Char-Server disconnected
408: Need disconnection to perform change-sex request...
409: Your sex has been changed (need disconnection by the server)...
//410-411 used by cash shop

View File

@ -1,48 +0,0 @@
// Monsters Additional Database
//
// Structure of Database :
// ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
// rAthena Dev Team
//1900,VALARIS,Valaris,Valaris,99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1
//1901,VALARIS_WORSHIPPER,Valaris's Worshipper,Valaris's Worshipper,50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,0x1685,100,868,480,120,0,0,0,0,0,0,0,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,0,0,0,0,4129,1
//1902,MC_CAMERI,MC Cameri,MC Cameri,99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1
//1903,POKI,Poki#3,Poki#3,99,1349000,0,4093000,1526000,9,4892,9113,22,35,1,180,39,67,193,130,10,12,1,7,64,0x1973,120,500,672,480,92100,603,5500,617,3000,1723,1000,1228,100,1236,500,617,2500,1234,75,1237,125,1722,250,1724,100,1720,50,0,0,0,0
//1904,SENTRY,Sentry,Sentry,99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1
// Custom Hollow Poring (overrrides/collides with META_ANDRE)
//1237,HOLLOW_PORING,Hollow Poring,Hollow Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,512,150,619,20,0,0,0,0,4001,10
// Custom Fire Poring. Warning, Colides with META_DENIRO
//1239,FIRE_PORING,Fire Poring,Fire Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x131,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20
// Lunar New Year 2008 Event Monster overrides
// Uncomment if event is enabled, as these drops modifications are nessecary.
//1145,MARTIN,Martin,Martin,18,1109,0,134,86,1,52,63,0,5,12,18,30,15,15,5,10,12,0,2,42,0x81,300,1480,480,480,0,0,0,0,0,0,0,1017,9000,1018,500,1251,10,2225,5,5009,1,10010,10,2224,15,7869,1500,0,0,4046,1
//1175,TAROU,Tarou,Tarou,11,284,0,57,28,1,34,45,0,0,1,20,11,10,24,5,10,12,0,2,27,0x91,150,1744,1044,684,0,0,0,0,0,0,0,1016,9000,919,3000,949,800,528,1000,701,2,7869,2500,0,0,0,0,0,0,4028,1
//1209,CRAMP,Cramp,Cramp,56,4720,0,2300,1513,1,395,465,0,5,1,85,35,5,65,60,10,12,0,2,45,0x3095,100,1000,500,1000,0,0,0,0,0,0,0,7007,4656,528,1000,726,80,746,110,568,250,510,70,984,95,7869,1500,0,0,4296,1
// iRO St. Patricks Day 2008 Event Monster overrides
// Uncomment if event is enabled, as these drops modifications are nessecary.
//1841,G_SNAKE_,Snake Lord's Minon,Snake Lord's Minon,15,471,0,72,48,1,46,55,0,0,1,15,15,10,35,5,10,12,1,2,22,0x81,200,1576,576,576,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,7,0,0,0,0,0,0,0,0,0,0,0,0
//1842,G_ANACONDAQ_,Snake Lord's Minon,Snake Lord's Minon,23,1109,0,300,149,1,124,157,0,0,1,23,28,10,36,5,10,12,1,2,25,0x91,200,1576,576,576,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,7,0,0,0,0,0,0,0,0,0,0,0,0
//1843,SIDE_WINDER_,Snake Lord's Minon,Snake Lord's Minon,43,4929,0,1996,993,1,240,320,5,10,38,43,40,15,115,20,10,12,1,2,25,0x3095,200,1576,576,576,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,7,0,0,0,0,0,0,0,0,0,0,0,0
//1844,G_ISIS_,Snake Lord's Minon,Snake Lord's Minon,47,7003,0,3709,1550,1,423,507,10,35,38,65,43,50,66,15,10,12,2,6,27,0x3195,200,1384,768,336,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,8,0,0,0,0,0,0,0,0,0,0,0,0
// iRO Christmas 2008 Event
// Uncomment if event is enabled, as these drops modifications are nessecary.
//1244,JAKK_XMAS,Christmas Jakk,Christmas Jakk,38,3581,0,1113,688,1,315,382,5,30,1,38,38,43,75,45,10,12,1,0,43,0x81,200,1180,480,648,0,0,0,0,0,0,0,529,1000,530,1000,14546,1000,14550,1000,7174,1000,7175,1000,6092,1000,12355,1250,0,0,0,0
//1245,GOBLINE_XMAS,Christmas Goblin,Christmas Goblin,25,1176,0,282,171,1,118,140,10,5,1,53,25,20,38,45,10,12,1,7,24,0x81,100,1120,620,240,0,0,0,0,0,0,0,529,1000,530,1000,14546,1000,14550,1000,7174,1000,7175,1000,6092,1000,12355,1250,0,0,0,0
//1246,COOKIE_XMAS,Christmas Cookie,Christmas Cookie,28,2090,0,461,284,1,140,170,0,50,1,24,30,53,45,100,10,12,0,7,46,0x91,400,1248,1248,240,0,0,0,0,0,0,0,529,1000,530,1000,14546,1000,14550,1000,7174,1000,7175,1000,6092,1000,12355,1250,0,0,0,0
//1247,ANTONIO,Antonio,Antonio,10,10,0,3,2,1,13,20,100,0,1,1,1,50,100,100,10,12,1,3,66,0xC1,100,720,720,432,0,0,0,0,0,0,0,604,500,12354,500,14550,500,5136,500,12132,500,12225,500,5811,500,0,0,0,0,4243,1
// iRO Halloween 2009 Event
// Uncomment if event is enabled. Uncomment the skills for Halloween Whisper in mob_skill_db2.
//3014,HALLOWEEN_WHISPER,Halloween Whisper,Halloween Whisper,1,800,0,0,0,1,10,13,0,45,1,51,14,0,60,0,10,12,0,6,68,0x81,150,1960,960,504,0,0,0,0,0,0,0,12396,150,6299,5335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//3015,HALLOWEEN_DARK_LORD,Halloween Dark Lord,Halloween Dark Lord,1,45,0,0,0,1,10,13,0,45,1,51,14,0,60,0,10,12,2,6,89,0x81,100,868,768,480,0,0,0,0,0,0,0,12396,800,12397,5335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
// iRO Halloween 2008 Event
// Uncomment if event is enabled.
//3000,ZOMBIE,Zombie,Zombie,15,534,0,50,33,1,67,79,0,10,1,8,7,0,15,0,10,12,1,1,29,0x3885,400,2612,912,288,0,0,0,0,0,0,0,957,9000,724,5,938,1000,958,50,727,70,0,0,0,0,0,0,0,0,4038,1
//3001,GHOUL,Ghoul,Ghoul,40,5418,0,1088,622,1,420,500,5,20,1,20,29,0,45,20,10,12,1,1,49,0x3885,250,2456,912,504,0,0,0,0,0,0,0,958,6000,756,110,509,700,511,800,2609,60,934,150,1260,1,0,0,0,0,4110,1
//3002,ZOMBIE_MASTER,Zombie Master,Zombie Master,62,14211,0,7610,2826,1,824,1084,37,26,25,20,30,5,77,35,10,12,1,1,29,0x3695,175,2612,912,288,0,0,0,0,0,0,0,7071,4413,938,1500,958,1500,723,200,727,100,1260,1,2324,2,0,0,0,0,4274,1

1142
db/import-tmpl/mob_db.yml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +0,0 @@
// Monster Drop Database
// Add drop item to monster
//
// Structure:
// <mobid>,<itemid>,<rate>{,<randopt_groupid>,<flag>}
//
// <mobid> : Monster ID. See db/[pre-]re/mob_db.txt
// <itemid> : Item ID.
// <rate> : 1 = 0.01%
// 100 = 1%
// 10000 = 100%
// Just like rate in mob_db.txt, adjusted by battle_config.
// To remove original drop from monster, use 0 as rate.
// Optional:
// <randopt_groupid> : If set, the dropped item will be modified by Random Option Group based on db/[pre-]re/item_randomopt_group.txt
// <flag> : 1 - The item is protected from steal.
// 2 - As MVP Reward

View File

@ -1,5 +0,0 @@
// Monster Racial Groups Database
//
// Structure of Database:
// Race2ID,MobID1,MobID2,MobID3,...,MobID100

85
db/mob_db.yml Normal file
View File

@ -0,0 +1,85 @@
# This file is a part of rAthena.
# Copyright(C) 2020 rAthena Development Team
# https://rathena.org - https://github.com/rathena
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###########################################################################
# Monster Database
###########################################################################
#
# Monster Settings
#
###########################################################################
# - Id Monster ID.
# AegisName Server name to reference the monster in scripts and lookups, should use no spaces.
# Name Name in English.
# JapaneseName Name in Japanese. (Default: 'Name' value)
# Level Level. (Default: 1)
# Hp Total HP. (Default: 1)
# Sp Total SP. (Default: 1)
# BaseExp Base experience gained. (Default: 0)
# JobExp Job experience gained. (Default: 0)
# MvpExp MVP experience gained. (Default: 0)
# Attack Minimum attack in pre-renewal and base attack in renewal. (Default: 0)
# Attack2 Maximum attack in pre-renewal and base magic attack in renewal. (Default: 0)
# Defense Physical defense of the monster, reduces melee and ranged physical attack/skill damage. (Default: 0)
# MagicDefense Magic defense of the monster, reduces magical skill damage. (Default: 0)
# Str Strength which affects attack. (Default: 1)
# Agi Agility which affects flee. (Default: 1)
# Vit Vitality which affects defense. (Default: 1)
# Int Intelligence which affects magic attack. (Default: 1)
# Dex Dexterity which affects hit rate. (Default: 1)
# Luk Luck which affects perfect dodge/lucky flee/lerfect flee/lucky dodge rate. (Default: 1)
# AttackRange Attack range. (Default: 0)
# SkillRange Skill cast range. (Default: 0)
# ChaseRange Chase range. (Default: 0)
# Size Size. (Default: Small)
# Race Race. (Default: Formless)
# RaceGroups: List of secondary groups the monster may be part of. (Optional)
# <group>: <value> Group to toggle.
# Element Element. (Default: Neutral)
# ElementLevel Level of element. (Default: 1)
# WalkSpeed Walk speed. (Default: DEFAULT_WALK_SPEED)
# AttackDelay Attack speed. (Default: 0)
# AttackMotion Attack animation speed. (Default: 0)
# DamageMotion Damage animation speed. (Default: 0)
# Ai Aegis monster type AI behavior. (Default: 06)
# Class Aegis monster class. (Default: Normal)
# Modes: List of unique behavior not defined by AI, Class, or Attribute. (Optional)
# <mode>: <value> Mode to toggle.
# MvpDrops: List of possible MVP prize items. Max of MAX_MVP_DROP. (Optional)
# - Item Item name.
# Rate Drop rate of item. (Default: 1)
# RandomOptionGroup Random Option Group applied to item on drop. (Default: None)
# Index Index used for overwriting item. (Optional)
# Drops: List of possible normal item drops. Max of MAX_MOB_DROP. (Optional)
# - Item Item name.
# Rate Drop rate of item. (Default: 1)
# StealProtected If the item is shielded from TF_STEAL. (Default: false)
# RandomOptionGroup Random Option Group applied to item on drop. (Default: None)
# Index Index used for overwriting item. (Optional)
###########################################################################
Header:
Type: MOB_DB
Version: 1
Footer:
Imports:
- Path: db/pre-re/mob_db.yml
Mode: Prerenewal
- Path: db/re/mob_db.yml
Mode: Renewal
- Path: db/import/mob_db.yml

View File

@ -5529,7 +5529,11 @@ Body:
Flags:
BuyingStore: true
Script: |
bonus2 bSubRace2,RC2_Guardian,50;
bonus2 bAddDamageClass,1285,-50;
bonus2 bAddDamageClass,1286,-50;
bonus2 bAddDamageClass,1287,-50;
bonus2 bAddDamageClass,1899,-50;
bonus2 bAddDamageClass,1900,-50;
- Id: 4232
AegisName: Wild_Ginseng_Card
Name: Hermit Plant Card
@ -5797,7 +5801,11 @@ Body:
Flags:
BuyingStore: true
Script: |
bonus2 bAddRace2,RC2_Guardian,40;
bonus2 bAddDamageClass,1285,40;
bonus2 bAddDamageClass,1286,40;
bonus2 bAddDamageClass,1287,40;
bonus2 bAddDamageClass,1899,40;
bonus2 bAddDamageClass,1900,40;
- Id: 4252
AegisName: Alligator_Card
Name: Alligator Card

File diff suppressed because it is too large Load Diff

41226
db/pre-re/mob_db.yml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +0,0 @@
// Monster Drop Database
// Add drop item to monster
//
// Structure:
// <mobid>,<itemid>,<rate>{,<randopt_groupid>,<flag>}
//
// <mobid> : Monster ID. See db/[pre-]re/mob_db.txt
// <itemid> : Item ID.
// <rate> : 1 = 0.01%
// 100 = 1%
// 10000 = 100%
// Just like rate in mob_db.txt, adjusted by battle_config.
// To remove original drop from monster, use 0 as rate.
// Optional:
// <randopt_groupid> : If set, the dropped item will be modified by Random Option Group based on db/[pre-]re/item_randomopt_group.txt
// <flag> : 1 - The item is protected from steal.
// 2 - As MVP Reward

View File

@ -1,27 +0,0 @@
// Monster Racial Groups Database
//
// Structure of Database:
// Race2ID,MobID1,MobID2,MobID3,...,MobID100
// Goblins
RC2_GOBLIN,1122,1123,1124,1125,1126,1258,1299
// Kobolds
RC2_KOBOLD,1133,1134,1135,1282,1296
// Orcs
RC2_ORC,1023,1152,1153,1189,1213,1273
// Golems
RC2_GOLEM,1040,1278,1366,1497,2024
// Guardians
RC2_GUARDIAN,1285,1286,1287,2081
// Ninja Classes (Pirate's_Pride)
RC2_NINJA,1315,1364,1401,1560
// GvG
RC2_GVG,1288,1905,1907,1908
// Battlefield
RC2_BATTLEFIELD,1906,1909,1910,1911,1912,1913,1914,1915
// Treasure Chests
RC2_TREASURE,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
// Manuk
RC2_MANUK,1986,1987,1988,1989,1990,1997,1998,1999
// Splendide
RC2_SPLENDIDE,1991,1992,1993,1994,1995

View File

@ -5820,7 +5820,11 @@ Body:
BuyingStore: true
DropEffect: CLIENT
Script: |
bonus2 bSubRace2,RC2_Guardian,50;
bonus2 bAddDamageClass,1285,-50;
bonus2 bAddDamageClass,1286,-50;
bonus2 bAddDamageClass,1287,-50;
bonus2 bAddDamageClass,1899,-50;
bonus2 bAddDamageClass,1900,-50;
- Id: 4232
AegisName: Wild_Ginseng_Card
Name: Hermit Plant Card
@ -6108,7 +6112,11 @@ Body:
BuyingStore: true
DropEffect: CLIENT
Script: |
bonus2 bAddRace2,RC2_Guardian,40;
bonus2 bAddDamageClass,1285,40;
bonus2 bAddDamageClass,1286,40;
bonus2 bAddDamageClass,1287,40;
bonus2 bAddDamageClass,1899,40;
bonus2 bAddDamageClass,1900,40;
- Id: 4252
AegisName: Alligator_Card
Name: Alligator Card

File diff suppressed because it is too large Load Diff

87419
db/re/mob_db.yml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,123 +0,0 @@
// Monster Drop Database
// Add drop item to monster
//
// Structure:
// <mobid>,<itemid>,<rate>{,<randopt_groupid>,<flag>}
//
// <mobid> : Monster ID. See db/[pre-]re/mob_db.txt
// <itemid> : Item ID.
// <rate> : 1 = 0.01%
// 100 = 1%
// 10000 = 100%
// Just like rate in mob_db.txt, adjusted by battle_config.
// To remove original drop from monster, use 0 as rate.
// Optional:
// <randopt_groupid> : If set, the dropped item will be modified by Random Option Group based on db/[pre-]re/item_randomopt_group.txt
// <flag> : 1 - The item is protected from steal.
// 2 - As MVP Reward
1063,1102,100,None // LUNATIC
2770,1102,500,None // C2_LUNATIC
2771,1102,500,None // C3_LUNATIC
2072,1839,50,Group_5 // JAGUAR
1584,21015,50,Group_5 // TAMRUAN
2639,21015,250,Group_5 // C4_TAMRUAN
1154,13454,50,Group_5 // PASANA
1154,28705,50,Group_5 // PASANA
2719,13454,250,Group_5 // C1_PASANA
2719,28705,250,Group_5 // C1_PASANA
1117,28604,50,Group_5 // EVIL_DRUID
1517,16040,50,Group_5 // LI_ME_MANG_RYANG
2071,28007,50,Group_5 // HEADLESS_MULE
2778,16040,250,Group_5 // C5_LI_ME_MANG_RYANG
2838,28604,50,Group_5 // C5_EVIL_DRUID
1613,13127,50,None // METALING
1386,28705,50,Group_5 // SLEEPER
2655,28705,250,Group_5 // C5_SLEEPER
2656,28705,250,Group_5 // C1_SLEEPER
2755,13127,250,None // C2_METALING
2756,13127,250,None // C3_METALING
1631,1839,50,Group_5 // CHUNG_E_
1215,1443,50,Group_5 // STEM_WORM
2641,1443,250,Group_5 // C1_STEM_WORM
1404,1939,50,Group_5 // MIYABI_NINGYO
1628,13127,50,None // MOLE
1619,28705,50,Group_5 // PORCELLIO
2700,28705,250,Group_5 // C2_PORCELLIO
2745,13127,250,None // C2_MOLE
2746,1939,250,Group_5 // C3_MIYABI_NINGYO
1102,1680,50,None // BATHORY
1155,16040,50,Group_5 // PETIT
2714,16040,250,Group_5 // C1_PETIT
2715,16040,250,Group_5 // C2_PETIT
2885,1680,250,None // C4_BATHORY
2199,28705,50,Group_5 // SIORAVA
1143,16040,50,Group_5 // MARIONETTE
1413,1995,50,Group_5 // WILD_GINSENG
2761,16040,250,Group_5 // C3_MARIONETTE
1320,1498,50,Group_5 // OWL_DUKE
1320,2025,50,None // OWL_DUKE
1316,16040,50,Group_5 // SOLIDER
2647,16040,250,Group_5 // C2_SOLIDER
2721,1498,250,Group_5 // C3_OWL_DUKE
2721,2025,250,None // C3_OWL_DUKE
1408,1839,50,Group_5 // BLOOD_BUTTERFLY
2883,1839,250,Group_5 // C1_BLOOD_BUTTERFLY
1257,28007,50,Group_5 // INJUSTICE
2792,28007,250,Group_5 // C4_INJUSTICE
1302,21015,50,Group_5 // DARK_ILLUSION
1416,1939,50,Group_5 // WICKED_NYMPH
1416,1995,50,Group_5 // WICKED_NYMPH
2617,1939,250,Group_5 // C5_WICKED_NYMPH
2617,1995,250,Group_5 // C5_WICKED_NYMPH
1405,13327,50,Group_5 // TENGU
1030,1498,50,Group_5 // ANACONDAQ
2904,1498,250,Group_5 // C4_ANACONDAQ
1205,13454,50,Group_5 // EXECUTIONER
1135,28106,50,Group_5 // KOBOLD_3
1106,28705,50,Group_5 // DESERT_WOLF
1259,1498,250,Group_5 // GRYPHON
1310,28106,50,Group_5 // MAJORUROS
2767,28106,250,Group_5 // C4_MAJORUROS
1736,1839,50,Group_5 // ALIOT
1296,16040,50,Group_5 // KOBOLD_LEADER
1204,28705,50,Group_5 // TIRFING
1204,13454,50,Group_5 // TIRFING
1993,1443,50,Group_5 // NAGA
1390,1939,50,Group_5 // VIOLY
2621,1939,250,Group_5 // C5_VIOLY
2622,1939,250,Group_5 // C1_VIOLY
2623,1939,250,Group_5 // C2_VIOLY
1295,18130,50,None // OWL_BARON
1303,2025,50,None // GIANT_HONET
2821,2025,250,None // C3_GIANT_HONET
1702,21015,50,Group_5 // RETRIBUTION
2353,28106,50,Group_5 // N_MINOROUS
2684,21015,250,Group_5 // C4_RETRIBUTION
2685,21015,250,Group_5 // C5_RETRIBUTION
2686,21015,250,Group_5 // C1_RETRIBUTION
1219,21015,50,Group_5 // KNIGHT_OF_ABYSS
1703,1939,50,Group_5 // SOLACE
2650,1939,250,Group_5 // C5_SOLACE
2041,28705,50,Group_5 // MYSTELTAINN
2041,13454,50,Group_5 // MYSTELTAINN
2041,21015,50,Group_5 // MYSTELTAINN
1830,18130,50,None // BOW_GUARDIAN
1653,28705,50,Group_5 // WHIKEBAIN
1655,1839,50,Group_5 // EREND
1655,16040,50,Group_5 // EREND
1657,1680,50,None // RAWREL
1829,21015,50,Group_5 // SWORD_GUARDIAN
2692,1680,250,None // C3_RAWREL
1654,13454,50,Group_5 // ARMAIA
1654,28106,50,Group_5 // ARMAIA
1656,1939,50,Group_5 // KAVAC
1656,18130,50,None // KAVAC
1652,13454,50,Group_5 // YGNIZEM
1652,21015,50,Group_5 // YGNIZEM
1290,28705,50,Group_5 // SKELETON_GENERAL
2658,28705,250,Group_5 // C3_SKELETON_GENERAL
2659,28705,250,Group_5 // C4_SKELETON_GENERAL
1658,21015,500,Group_5 // B_YGNIZEM
1301,16040,50,Group_5 // AM_MUT
2362,28604,50,Group_5 // N_AMON_RA

View File

@ -1,57 +0,0 @@
// Monster Racial Groups Database
//
// Structure of Database:
// Race2ID,MobID1,MobID2,MobID3,...,MobID100
// Goblins
RC2_GOBLIN,1122,1123,1124,1125,1126,1258,1299
// Kobolds
RC2_KOBOLD,1133,1134,1135,1282,1296
// Orcs
RC2_ORC,1023,1152,1153,1189,1213,1273
// Golems
RC2_GOLEM,1040,1278,1366,1497,2024
// Guardians
RC2_GUARDIAN,1285,1286,1287,2081
// Ninja Classes (Pirate's_Pride)
RC2_NINJA,1315,1364,1401,1560
// GvG
RC2_GVG,1288,1905,1907,1908
// Battlefield
RC2_BATTLEFIELD,1906,1909,1910,1911,1912,1913,1914,1915
// Treasure Chests
RC2_TREASURE,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,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462
// Bio Labs
// TODO : Monsters in lhz_dun_n not implemented yet. [secretdataz]
RC2_BIOLAB,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241
// Manuk
RC2_MANUK,1986,1987,1988,1989,1990,1997,1998,1999
// Splendide
RC2_SPLENDIDE,1991,1992,1993,1994,1995
// Scaraba
RC2_SCARABA,2083,2084,2085,2086,2087,2088,2089,2090,2091,2144,2145,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2171,2172,2173,2304,2693,2799,2896
// Old Glast Heim - SC_GLASTHEIM_ATK/SC_GLASTHEIM_DEF
RC2_OGH_ATK_DEF,2475,2476
// Old Glast Heim - SC_GLASTHEIM_HIDDEN
RC2_OGH_HIDDEN,2337,2343//,2495
// Nightmare Biolab - SC_LHZ_DUN_N
RC2_BIO5_SWORDMAN_THIEF,1640,2228,3213,3219,3226,3233,1641,2232,3208,3214,3230,3237 // Swordman, Thief monsters
RC2_BIO5_ACOLYTE_MERCHANT,1643,2231,3209,3215,3229,3236,1642,2229,3212,3218,3227,3234 // Acolyte, Merchant monsters
RC2_BIO5_MAGE_ARCHER,1645,2230,3210,3216,3228,3235,3211,1644,2233,2234,3217,3231,3232,3238,3239 // Mage, Archer monsters
RC2_BIO5_MVP,3220,3221,3222,3223,3224,3225,3240,3241,3242,3243,3244,3245,3246 // MvPs
// THANATOS
RC2_THANATOS,1704,1705,1706,1707,1708,1709,1710,1711,1712
// Faceworm
RC2_FACEWORM,2528,2529,2530,2531,2532,2533,2534,2535,2536,2537,2539,2540,2541
// Clock Tower
RC2_CLOCKTOWER,1016,1023,1087,1101,1102,1109,1111,1131,1179,1189,1190,1191,1193,1195,1199,1203,1204,1205,1209,1213,1215,1216,1219,1269,1270,1275,1281,1377,1378,1622,1686,2478,2479,2916,2917,2918,2919,2920,2921,2923,3074
// Rock Ridge
RC2_ROCKRIDGE,1209,1279,1211,1783,3736,3737,3738,3739,3740,3742,3743,3747,3748,3749,3787,3788
// Heart Hunter
RC2_HEARTHUNTER,3454,3626,3627,3628
// Werner Laboratory
RC2_WERNER_LAB,1424,3621,3622,3631,3632,3633 // miss ID 3826 - YSF Seyren monster
// Temple of the Demon God
//RC2_TEMPLE_DEMON,3088,3089,3090,3091,3092,3096,3097,3098,3099,3105,3106
// Illusion of Vampire
//RC2_ILLUSION_VAMPIRE,3750,3751,3752,3753,3754,3755,3756,3757

View File

@ -1,15 +1,13 @@
//===== rAthena Documentation ================================
//= rAthena Monster Database Reference
//= Monster Database Structure
//===== By: ==================================================
//= rAthena Dev Team
//===== Last Updated: ========================================
//= 20140719
//= 20201006
//===== Description: =========================================
//= Explanation of the mob_db.txt file and structure.
//= Explanation of the mob_db.yml file and structure.
//============================================================
ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
---------------------------------------
ID: The ID of the monster.
@ -20,181 +18,211 @@ SpriteName: The sprite name of the monster (.act & .spr)
---------------------------------------
kROName: The name of the monster, this will be used when you use "--ja--".
Name: The name of the monster, this will be used when you use "--en--".
---------------------------------------
iROName: The name of the monster, this will be used when you use "--en--".
JapaneseName: The name of the monster, this will be used when you use "--ja--". Defaults to Name if not defined.
---------------------------------------
LV: The level of the monster.
Level: The level of the monster.
---------------------------------------
HP: The HP of the monster.
Hp: The HP of the monster.
---------------------------------------
SP: The SP of the monster.
Sp: The SP of the monster.
---------------------------------------
EXP: Base experience point of the monster.
BaseExp: Base experience point of the monster.
---------------------------------------
JEXP: Job experience point of the monster.
JobExp: Job experience point of the monster.
---------------------------------------
Range1: Range of the monster attack. If set to 1 or 2, it will be set to melee attack. If set to 3 or more, it will be set to ranged attack.
MvpExp: The MVP Experience point the monster gives to the player who got the MVP reward when it is defeated. This exp is a percentage of the exp the monster gives.
---------------------------------------
ATK1: The minimum attack of the monster.
Attack: The minimum attack of the monster (Pre-Renewal)
The base attack of the monster. (Renewal)
---------------------------------------
ATK2: The maximum attack of the monster. If undefined, the value of ATK1 will be used as the absolute attack.
Attack2: The maximum attack of the monster. If undefined, the value of Attack will be used as the absolute attack. (Pre-Renewal)
The base magic attack of the monster. (Renewal)
---------------------------------------
DEF: Physical defense of the monster, reduce melee & ranged physical attack/skill.
Defense: Physical defense of the monster, reduce melee and ranged physical attack/skill.
---------------------------------------
MDEF: Magic defense of the monster, reduce magical skill.
MagicDefense: Magic defense of the monster, reduce magical skill.
---------------------------------------
STR: Strength of the monster. Affects ATK.
Str: Strength of the monster. Affects ATK.
---------------------------------------
AGI: Agility of the monster. Affects FLEE.
Agi: Agility of the monster. Affects FLEE.
---------------------------------------
VIT: Vitality of the monster. Adds additional DEF.
Vit: Vitality of the monster. Adds additional DEF.
---------------------------------------
INT: Intelligence of the monster. Adds additional MATK.
Int: Intelligence of the monster. Adds additional MATK.
---------------------------------------
DEX: Dexterity of the monster. Affects HIT rate.
Dex: Dexterity of the monster. Affects HIT rate.
---------------------------------------
LUK: Luck of the monster. Affects Perfect dodge/Lucky flee/Perfect flee/Lucky dodge rate.
Luk: Luck of the monster. Affects Perfect dodge/Lucky flee/Perfect flee/Lucky dodge rate.
---------------------------------------
Range2: Maximum Skill Range.
AttackRange: Range of the monster attack. If set to 1 or 2, it will be set to melee attack. If set to 3 or more, it will be set to ranged attack.
---------------------------------------
Range3: Sight limit of the monster. If set to 1000 or beyond, the monster will follow you all over the map.
SkillRange: Maximum Skill Range.
---------------------------------------
Scale: Size of the monster
0 = Small
1 = Medium
2 = Large
ChaseRange: Sight limit of the monster. If set to 1000 or beyond, the monster will follow you all over the map.
---------------------------------------
Race: Race of the monster
Size: Size of the monster.
0 = Formless
1 = Undead
2 = Brute
3 = Plant
4 = Insect
5 = Fish
6 = Demon
7 = Demi-Human
8 = Angel
9 = Dragon.
10 = Player (default race for player)
Demi-Human is not same nor includes Player.
Small (Default)
Medium
Large
---------------------------------------
Element: Element of the monster, also for Element of db/elemental_db.txt, db/mercenary_db.txt, and db/[pre-]re/homunculus_db.txt
Race: Race of the monster.
+-----------+-------+-------+-------+-------+
| Type | Lv1 | Lv2 | Lv3 | Lv4 |
+-----------+-------+-------+-------+-------+
| Neutral | 20 | 40 | 60 | 80 |
| Water | 21 | 41 | 61 | 81 |
| Earth | 22 | 42 | 62 | 82 |
| Fire | 23 | 43 | 63 | 83 |
| Wind | 24 | 44 | 64 | 84 |
| Poison | 25 | 45 | 65 | 85 |
| Holy | 26 | 46 | 66 | 86 |
| Shadow | 27 | 47 | 67 | 87 |
| Ghost | 28 | 48 | 68 | 88 |
| Undead | 29 | 49 | 69 | 89 |
+-----------+-------+-------+-------+-------+
| For custom start from 30, 50, 70, and 90 |
+-----------+-------+-------+-------+-------+
Formless (Default)
Undead
Brute
Plant
Insect
Fish
Demon
Demihuman
Angel
Dragon
Demihuman is not same nor includes Player.
---------------------------------------
Mode: Behaviour of the monster. Full explanation can be found on 'doc/mob_db_mode_list.txt'
RaceGroups: Secondary race groups for special bonuses.
Goblin
Kobold
Orc
Golem
Guardian
Ninja
Gvg
Battlefield
Treasure
Biolab
Manuk
Splendide
Scaraba
Ogh_Atk_Def
Ogh_Hidden
Bio5_Swordman_Thief
Bio5_Acolyte_Merchant
Bio5_Mage_Archer
Bio5_Mvp
Clocktower
Thanatos
Faceworm
Hearthunter
Rockridge
Werner_Lab
Temple_Demon
Illusion_Vampire
---------------------------------------
Speed: Walk speed of the monster
Element: Element of the monster.
1 = Fastest
100 = Normal
1000 = Slowest
Neutral (Default)
Water
Earth
Fire
Wind
Poison
Holy
Shadow
Ghost
Undead
---------------------------------------
aDelay: Attack Delay of the monster, also known as ASPD. Low value means faster attack speed, but don't make it too low or it will lag when a player got mobbed by several of these mobs.
ElementLevel: Element level of the monster.
---------------------------------------
aMotion: Attack animation motion. Low value means monster's attack will be displayed in higher fps (making it shorter, too) (Thanks to Wallex for this)
WalkSpeed: Walk speed of the monster.
20 - Fastest (MIN_WALK_SPEED
150 - Normal (DEFAULT_WALK_SPEED)
1000 - Slowest (MAX_WALK_SPEED)
---------------------------------------
dMotion: Damage animation motion, same as aMotion but used to display the "I am hit" animation. Coincidentally, this same value is used to determine how long it is before the monster/player can move again. Endure is dMotion = 0, obviously.
AttackDelay: Attack Delay of the monster, also known as ASPD. Low value means faster attack speed, but don't make it too low or it will lag when a player got mobbed by several of these mobs.
---------------------------------------
MEXP: The MVP Experience point the monster gives when it is defeated (to the player who got the MVP reward) (This exp is a percentage of the exp the monster gives.)
AttackMotion: Attack animation motion. Low value means monster's attack will be displayed in higher FPS (making it shorter, too). (Thanks to Wallex for this)
---------------------------------------
MVP1-3id: The Item ID of the MVP drop goes here. Maximum of 3 items.
DamageMotion: Damage animation motion, same as aMotion but used to display the "I am hit" animation. Coincidentally, this same value is used to determine how long it is before the monster/player can move again. Endure is dMotion = 0, obviously.
---------------------------------------
MVP1-3per: The rate of the MVP item being dropped, n/10000.
Ai: Aegis Monster Type behavior. Full explanation can be found in 'doc/mob_db_mode_list.txt'.
---------------------------------------
Drop1-9id: The Item ID of the drop goes here. Maximum of 9 items.
Class: Aegis Monster Class Type behavior. Full explanation can be found in 'doc/mob_db_mode_list.txt'.
---------------------------------------
Drop1-9per: The rate of the item being dropped, n/10000.
Modes: Behaviour that isn't defined by AI or Class of the monster. Full explanation can be found in 'doc/mob_db_mode_list.txt'.
---------------------------------------
DropCardid: The Item ID of the monster's card (if any).
MvpDrops: List of items of the MVP drop. Maximum of 3 items (MAX_MVP_DROP). None of these items can be stolen by TF_STEAL.
- Item - Item name.
Rate - Drop rate of item, n/10000.
RandomOptionGroup - Random Option Group applied to item on drop. (Optional)
Index Index used for overwriting item. (Optional)
---------------------------------------
DropCardper: The rate of the card being dropped, n/10000.
---------------------------------------
Drops: List of items of the monster drop. Maximum of 10 items (MAX_MOB_DROP).
- Item Item name.
Rate Drop rate of item, n/10000.
StealProtected If the item is shielded from TF_STEAL. (Default: false)
RandomOptionGroup Random Option Group applied to item on drop. (Optional)
Index Index used for overwriting item. (Optional)

View File

@ -15,16 +15,16 @@ 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_CASTSENSORIDLE | 0x0000010 | 16
MD_NORANDOMWALK | 0x0000020 | 32
MD_NOCAST | 0x0000040 | 64
MD_CANATTACK | 0x0000080 | 128
FREE | 0x0000100 | 256
MD_CASTSENSOR_CHASE | 0x0000200 | 512
MD_CASTSENSORCHASE | 0x0000200 | 512
MD_CHANGECHASE | 0x0000400 | 1024
MD_ANGRY | 0x0000800 | 2048
MD_CHANGETARGET_MELEE | 0x0001000 | 4096
MD_CHANGETARGET_CHASE | 0x0002000 | 8192
MD_CHANGETARGETMELEE | 0x0001000 | 4096
MD_CHANGETARGETCHASE | 0x0002000 | 8192
MD_TARGETWEAK | 0x0004000 | 16384
MD_RANDOMTARGET | 0x0008000 | 32768
---------------------------------------------
@ -33,14 +33,14 @@ 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
MD_KNOCKBACKIMMUNE | 0x0200000 | 2097152
MD_TELEPORTBLOCK | 0x0400000 | 4194304
FREE | 0x0800000 | 8388608
---------------------------------------------
MD_FIXED_ITEMDROP | 0x1000000 | 16777216
MD_FIXEDITEMDROP | 0x1000000 | 16777216
MD_DETECTOR | 0x2000000 | 33554432
MD_STATUS_IMMUNE | 0x4000000 | 67108864
MD_SKILL_IMMUNE | 0x8000000 | 134217728
MD_STATUSIMMUNE | 0x4000000 | 67108864
MD_SKILLIMMUNE | 0x8000000 | 134217728
Explanation for modes
-------------------------------------------------------------------------------

56
doc/yaml/db/mob_db.yml Normal file
View File

@ -0,0 +1,56 @@
###########################################################################
# Monster Database
###########################################################################
#
# Monster Settings
#
###########################################################################
# - Id Monster ID.
# AegisName Server name to reference the monster in scripts and lookups, should use no spaces.
# Name Name in English.
# JapaneseName Name in Japanese. (Default: 'Name' value)
# Level Level. (Default: 1)
# Hp Total HP. (Default: 1)
# Sp Total SP. (Default: 1)
# BaseExp Base experience gained. (Default: 0)
# JobExp Job experience gained. (Default: 0)
# MvpExp MVP experience gained. (Default: 0)
# Attack Minimum attack in pre-renewal and base attack in renewal. (Default: 0)
# Attack2 Maximum attack in pre-renewal and base magic attack in renewal. (Default: 0)
# Defense Physical defense of the monster, reduces melee and ranged physical attack/skill damage. (Default: 0)
# MagicDefense Magic defense of the monster, reduces magical skill damage. (Default: 0)
# Str Strength which affects attack. (Default: 1)
# Agi Agility which affects flee. (Default: 1)
# Vit Vitality which affects defense. (Default: 1)
# Int Intelligence which affects magic attack. (Default: 1)
# Dex Dexterity which affects hit rate. (Default: 1)
# Luk Luck which affects perfect dodge/lucky flee/lerfect flee/lucky dodge rate. (Default: 1)
# AttackRange Attack range. (Default: 0)
# SkillRange Skill cast range. (Default: 0)
# ChaseRange Chase range. (Default: 0)
# Size Size. (Default: Small)
# Race Race. (Default: Formless)
# RaceGroups: List of secondary groups the monster may be part of. (Optional)
# <group>: <value> Group to toggle.
# Element Element. (Default: Neutral)
# ElementLevel Level of element. (Default: 1)
# WalkSpeed Walk speed. (Default: DEFAULT_WALK_SPEED)
# AttackDelay Attack speed. (Default: 0)
# AttackMotion Attack animation speed. (Default: 0)
# DamageMotion Damage animation speed. (Default: 0)
# Ai Aegis monster type AI behavior. (Default: 06)
# Class Aegis monster class. (Default: Normal)
# Modes: List of unique behavior not defined by AI, Class, or Attribute. (Optional)
# <mode>: <value> Mode to toggle.
# MvpDrops: List of possible MVP prize items. Max of MAX_MVP_DROP. (Optional)
# - Item Item name.
# Rate Drop rate of item.
# RandomOptionGroup Random Option Group applied to item on drop. (Default: None)
# Index Index used for overwriting item. (Optional)
# Drops: List of possible normal item drops. Max of MAX_MOB_DROP. (Optional)
# - Item Item name.
# Rate Drop rate of item.
# StealProtected If the item is shielded from TF_STEAL. (Default: false)
# RandomOptionGroup Random Option Group applied to item on drop. (Default: None)
# Index Index used for overwriting item. (Optional)
###########################################################################

157
doc/yaml/sql/mob_db.sql Normal file
View File

@ -0,0 +1,157 @@
#
# Table structure for table `mob_db`
#
DROP TABLE IF EXISTS `mob_db`;
CREATE TABLE `mob_db` (
`id` int(11) unsigned NOT NULL,
`name_aegis` varchar(24) NOT NULL,
`name_english` text NOT NULL,
`name_japanese` text DEFAULT NULL,
`level` smallint(6) unsigned DEFAULT NULL,
`hp` int(11) unsigned DEFAULT NULL,
`sp` mediumint(9) unsigned DEFAULT NULL,
`base_exp` int(11) unsigned DEFAULT NULL,
`job_exp` int(11) unsigned DEFAULT NULL,
`mvp_exp` int(11) unsigned DEFAULT NULL,
`attack` smallint(6) unsigned DEFAULT NULL,
`attack2` smallint(6) unsigned DEFAULT NULL,
`defense` smallint(6) unsigned DEFAULT NULL,
`magic_defense` smallint(6) unsigned DEFAULT NULL,
`str` smallint(6) unsigned DEFAULT NULL,
`agi` smallint(6) unsigned DEFAULT NULL,
`vit` smallint(6) unsigned DEFAULT NULL,
`int` smallint(6) unsigned DEFAULT NULL,
`dex` smallint(6) unsigned DEFAULT NULL,
`luk` smallint(6) unsigned DEFAULT NULL,
`attack_range` tinyint(4) unsigned DEFAULT NULL,
`skill_range` tinyint(4) unsigned DEFAULT NULL,
`chase_range` tinyint(4) unsigned DEFAULT NULL,
`size` varchar(24) DEFAULT NULL,
`race` varchar(24) DEFAULT NULL,
`racegroup_goblin` tinyint(1) unsigned DEFAULT NULL,
`racegroup_kobold` tinyint(1) unsigned DEFAULT NULL,
`racegroup_orc` tinyint(1) unsigned DEFAULT NULL,
`racegroup_golem` tinyint(1) unsigned DEFAULT NULL,
`racegroup_guardian` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ninja` tinyint(1) unsigned DEFAULT NULL,
`racegroup_gvg` tinyint(1) unsigned DEFAULT NULL,
`racegroup_battlefield` tinyint(1) unsigned DEFAULT NULL,
`racegroup_treasure` tinyint(1) unsigned DEFAULT NULL,
`racegroup_biolab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_manuk` tinyint(1) unsigned DEFAULT NULL,
`racegroup_splendide` tinyint(1) unsigned DEFAULT NULL,
`racegroup_scaraba` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_atk_def` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_hidden` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_swordman_thief` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_acolyte_merchant` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mage_archer` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mvp` tinyint(1) unsigned DEFAULT NULL,
`racegroup_clocktower` tinyint(1) unsigned DEFAULT NULL,
`racegroup_thanatos` tinyint(1) unsigned DEFAULT NULL,
`racegroup_faceworm` tinyint(1) unsigned DEFAULT NULL,
`racegroup_hearthunter` tinyint(1) unsigned DEFAULT NULL,
`racegroup_rockridge` tinyint(1) unsigned DEFAULT NULL,
`racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL,
`racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL,
`element` varchar(24) DEFAULT NULL,
`element_level` tinyint(4) unsigned DEFAULT NULL,
`walk_speed` smallint(6) unsigned DEFAULT NULL,
`attack_delay` smallint(6) unsigned DEFAULT NULL,
`attack_motion` smallint(6) unsigned DEFAULT NULL,
`damage_motion` smallint(6) unsigned DEFAULT NULL,
`ai` varchar(2) DEFAULT NULL,
`class` varchar(50) DEFAULT NULL,
`mode_canmove` tinyint(1) unsigned DEFAULT NULL,
`mode_looter` tinyint(1) unsigned DEFAULT NULL,
`mode_aggressive` tinyint(1) unsigned DEFAULT NULL,
`mode_assist` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensoridle` tinyint(1) unsigned DEFAULT NULL,
`mode_norandomwalk` tinyint(1) unsigned DEFAULT NULL,
`mode_nocast` tinyint(1) unsigned DEFAULT NULL,
`mode_canattack` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensorchase` tinyint(1) unsigned DEFAULT NULL,
`mode_changechase` tinyint(1) unsigned DEFAULT NULL,
`mode_angry` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetmelee` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetchase` tinyint(1) unsigned DEFAULT NULL,
`mode_targetweak` tinyint(1) unsigned DEFAULT NULL,
`mode_randomtarget` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremelee` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremagic` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoreranged` tinyint(1) unsigned DEFAULT NULL,
`mode_mvp` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremisc` tinyint(1) unsigned DEFAULT NULL,
`mode_knockbackimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_teleportblock` tinyint(1) unsigned DEFAULT NULL,
`mode_fixeditemdrop` tinyint(1) unsigned DEFAULT NULL,
`mode_detector` tinyint(1) unsigned DEFAULT NULL,
`mode_statusimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_skillimmune` tinyint(1) unsigned DEFAULT NULL,
`mvpdrop1_item` varchar(50) DEFAULT NULL,
`mvpdrop1_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop1_option` varchar(50) DEFAULT NULL,
`mvpdrop1_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop2_item` varchar(50) DEFAULT NULL,
`mvpdrop2_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop2_option` varchar(50) DEFAULT NULL,
`mvpdrop2_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop3_item` varchar(50) DEFAULT NULL,
`mvpdrop3_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop3_option` varchar(50) DEFAULT NULL,
`mvpdrop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop1_item` varchar(50) DEFAULT NULL,
`drop1_rate` smallint(9) unsigned DEFAULT NULL,
`drop1_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop1_option` varchar(50) DEFAULT NULL,
`drop1_index` tinyint(2) unsigned DEFAULT NULL,
`drop2_item` varchar(50) DEFAULT NULL,
`drop2_rate` smallint(9) unsigned DEFAULT NULL,
`drop2_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop2_option` varchar(50) DEFAULT NULL,
`drop2_index` tinyint(2) unsigned DEFAULT NULL,
`drop3_item` varchar(50) DEFAULT NULL,
`drop3_rate` smallint(9) unsigned DEFAULT NULL,
`drop3_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop3_option` varchar(50) DEFAULT NULL,
`drop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop4_item` varchar(50) DEFAULT NULL,
`drop4_rate` smallint(9) unsigned DEFAULT NULL,
`drop4_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop4_option` varchar(50) DEFAULT NULL,
`drop4_index` tinyint(2) unsigned DEFAULT NULL,
`drop5_item` varchar(50) DEFAULT NULL,
`drop5_rate` smallint(9) unsigned DEFAULT NULL,
`drop5_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop5_option` varchar(50) DEFAULT NULL,
`drop5_index` tinyint(2) unsigned DEFAULT NULL,
`drop6_item` varchar(50) DEFAULT NULL,
`drop6_rate` smallint(9) unsigned DEFAULT NULL,
`drop6_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop6_option` varchar(50) DEFAULT NULL,
`drop6_index` tinyint(2) unsigned DEFAULT NULL,
`drop7_item` varchar(50) DEFAULT NULL,
`drop7_rate` smallint(9) unsigned DEFAULT NULL,
`drop7_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop7_option` varchar(50) DEFAULT NULL,
`drop7_index` tinyint(2) unsigned DEFAULT NULL,
`drop8_item` varchar(50) DEFAULT NULL,
`drop8_rate` smallint(9) unsigned DEFAULT NULL,
`drop8_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop8_option` varchar(50) DEFAULT NULL,
`drop8_index` tinyint(2) unsigned DEFAULT NULL,
`drop9_item` varchar(50) DEFAULT NULL,
`drop9_rate` smallint(9) unsigned DEFAULT NULL,
`drop9_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop9_option` varchar(50) DEFAULT NULL,
`drop9_index` tinyint(2) unsigned DEFAULT NULL,
`drop10_item` varchar(50) DEFAULT NULL,
`drop10_rate` smallint(9) unsigned DEFAULT NULL,
`drop10_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop10_option` varchar(50) DEFAULT NULL,
`drop10_index` tinyint(2) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`name_aegis`)
) ENGINE=MyISAM;

157
doc/yaml/sql/mob_db2.sql Normal file
View File

@ -0,0 +1,157 @@
#
# Table structure for table `mob_db2`
#
DROP TABLE IF EXISTS `mob_db2`;
CREATE TABLE `mob_db2` (
`id` int(11) unsigned NOT NULL,
`name_aegis` varchar(24) NOT NULL,
`name_english` text NOT NULL,
`name_japanese` text DEFAULT NULL,
`level` smallint(6) unsigned DEFAULT NULL,
`hp` int(11) unsigned DEFAULT NULL,
`sp` mediumint(9) unsigned DEFAULT NULL,
`base_exp` int(11) unsigned DEFAULT NULL,
`job_exp` int(11) unsigned DEFAULT NULL,
`mvp_exp` int(11) unsigned DEFAULT NULL,
`attack` smallint(6) unsigned DEFAULT NULL,
`attack2` smallint(6) unsigned DEFAULT NULL,
`defense` smallint(6) unsigned DEFAULT NULL,
`magic_defense` smallint(6) unsigned DEFAULT NULL,
`str` smallint(6) unsigned DEFAULT NULL,
`agi` smallint(6) unsigned DEFAULT NULL,
`vit` smallint(6) unsigned DEFAULT NULL,
`int` smallint(6) unsigned DEFAULT NULL,
`dex` smallint(6) unsigned DEFAULT NULL,
`luk` smallint(6) unsigned DEFAULT NULL,
`attack_range` tinyint(4) unsigned DEFAULT NULL,
`skill_range` tinyint(4) unsigned DEFAULT NULL,
`chase_range` tinyint(4) unsigned DEFAULT NULL,
`size` varchar(24) DEFAULT NULL,
`race` varchar(24) DEFAULT NULL,
`racegroup_goblin` tinyint(1) unsigned DEFAULT NULL,
`racegroup_kobold` tinyint(1) unsigned DEFAULT NULL,
`racegroup_orc` tinyint(1) unsigned DEFAULT NULL,
`racegroup_golem` tinyint(1) unsigned DEFAULT NULL,
`racegroup_guardian` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ninja` tinyint(1) unsigned DEFAULT NULL,
`racegroup_gvg` tinyint(1) unsigned DEFAULT NULL,
`racegroup_battlefield` tinyint(1) unsigned DEFAULT NULL,
`racegroup_treasure` tinyint(1) unsigned DEFAULT NULL,
`racegroup_biolab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_manuk` tinyint(1) unsigned DEFAULT NULL,
`racegroup_splendide` tinyint(1) unsigned DEFAULT NULL,
`racegroup_scaraba` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_atk_def` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_hidden` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_swordman_thief` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_acolyte_merchant` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mage_archer` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mvp` tinyint(1) unsigned DEFAULT NULL,
`racegroup_clocktower` tinyint(1) unsigned DEFAULT NULL,
`racegroup_thanatos` tinyint(1) unsigned DEFAULT NULL,
`racegroup_faceworm` tinyint(1) unsigned DEFAULT NULL,
`racegroup_hearthunter` tinyint(1) unsigned DEFAULT NULL,
`racegroup_rockridge` tinyint(1) unsigned DEFAULT NULL,
`racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL,
`racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL,
`element` varchar(24) DEFAULT NULL,
`element_level` tinyint(4) unsigned DEFAULT NULL,
`walk_speed` smallint(6) unsigned DEFAULT NULL,
`attack_delay` smallint(6) unsigned DEFAULT NULL,
`attack_motion` smallint(6) unsigned DEFAULT NULL,
`damage_motion` smallint(6) unsigned DEFAULT NULL,
`ai` varchar(2) DEFAULT NULL,
`class` varchar(50) DEFAULT NULL,
`mode_canmove` tinyint(1) unsigned DEFAULT NULL,
`mode_looter` tinyint(1) unsigned DEFAULT NULL,
`mode_aggressive` tinyint(1) unsigned DEFAULT NULL,
`mode_assist` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensoridle` tinyint(1) unsigned DEFAULT NULL,
`mode_norandomwalk` tinyint(1) unsigned DEFAULT NULL,
`mode_nocast` tinyint(1) unsigned DEFAULT NULL,
`mode_canattack` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensorchase` tinyint(1) unsigned DEFAULT NULL,
`mode_changechase` tinyint(1) unsigned DEFAULT NULL,
`mode_angry` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetmelee` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetchase` tinyint(1) unsigned DEFAULT NULL,
`mode_targetweak` tinyint(1) unsigned DEFAULT NULL,
`mode_randomtarget` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremelee` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremagic` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoreranged` tinyint(1) unsigned DEFAULT NULL,
`mode_mvp` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremisc` tinyint(1) unsigned DEFAULT NULL,
`mode_knockbackimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_teleportblock` tinyint(1) unsigned DEFAULT NULL,
`mode_fixeditemdrop` tinyint(1) unsigned DEFAULT NULL,
`mode_detector` tinyint(1) unsigned DEFAULT NULL,
`mode_statusimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_skillimmune` tinyint(1) unsigned DEFAULT NULL,
`mvpdrop1_item` varchar(50) DEFAULT NULL,
`mvpdrop1_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop1_option` varchar(50) DEFAULT NULL,
`mvpdrop1_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop2_item` varchar(50) DEFAULT NULL,
`mvpdrop2_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop2_option` varchar(50) DEFAULT NULL,
`mvpdrop2_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop3_item` varchar(50) DEFAULT NULL,
`mvpdrop3_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop3_option` varchar(50) DEFAULT NULL,
`mvpdrop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop1_item` varchar(50) DEFAULT NULL,
`drop1_rate` smallint(9) unsigned DEFAULT NULL,
`drop1_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop1_option` varchar(50) DEFAULT NULL,
`drop1_index` tinyint(2) unsigned DEFAULT NULL,
`drop2_item` varchar(50) DEFAULT NULL,
`drop2_rate` smallint(9) unsigned DEFAULT NULL,
`drop2_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop2_option` varchar(50) DEFAULT NULL,
`drop2_index` tinyint(2) unsigned DEFAULT NULL,
`drop3_item` varchar(50) DEFAULT NULL,
`drop3_rate` smallint(9) unsigned DEFAULT NULL,
`drop3_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop3_option` varchar(50) DEFAULT NULL,
`drop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop4_item` varchar(50) DEFAULT NULL,
`drop4_rate` smallint(9) unsigned DEFAULT NULL,
`drop4_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop4_option` varchar(50) DEFAULT NULL,
`drop4_index` tinyint(2) unsigned DEFAULT NULL,
`drop5_item` varchar(50) DEFAULT NULL,
`drop5_rate` smallint(9) unsigned DEFAULT NULL,
`drop5_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop5_option` varchar(50) DEFAULT NULL,
`drop5_index` tinyint(2) unsigned DEFAULT NULL,
`drop6_item` varchar(50) DEFAULT NULL,
`drop6_rate` smallint(9) unsigned DEFAULT NULL,
`drop6_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop6_option` varchar(50) DEFAULT NULL,
`drop6_index` tinyint(2) unsigned DEFAULT NULL,
`drop7_item` varchar(50) DEFAULT NULL,
`drop7_rate` smallint(9) unsigned DEFAULT NULL,
`drop7_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop7_option` varchar(50) DEFAULT NULL,
`drop7_index` tinyint(2) unsigned DEFAULT NULL,
`drop8_item` varchar(50) DEFAULT NULL,
`drop8_rate` smallint(9) unsigned DEFAULT NULL,
`drop8_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop8_option` varchar(50) DEFAULT NULL,
`drop8_index` tinyint(2) unsigned DEFAULT NULL,
`drop9_item` varchar(50) DEFAULT NULL,
`drop9_rate` smallint(9) unsigned DEFAULT NULL,
`drop9_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop9_option` varchar(50) DEFAULT NULL,
`drop9_index` tinyint(2) unsigned DEFAULT NULL,
`drop10_item` varchar(50) DEFAULT NULL,
`drop10_rate` smallint(9) unsigned DEFAULT NULL,
`drop10_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop10_option` varchar(50) DEFAULT NULL,
`drop10_index` tinyint(2) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`name_aegis`)
) ENGINE=MyISAM;

157
doc/yaml/sql/mob_db2_re.sql Normal file
View File

@ -0,0 +1,157 @@
#
# Table structure for table `mob_db2_re`
#
DROP TABLE IF EXISTS `mob_db2_re`;
CREATE TABLE `mob_db2_re` (
`id` int(11) unsigned NOT NULL,
`name_aegis` varchar(24) NOT NULL,
`name_english` text NOT NULL,
`name_japanese` text DEFAULT NULL,
`level` smallint(6) unsigned DEFAULT NULL,
`hp` int(11) unsigned DEFAULT NULL,
`sp` mediumint(9) unsigned DEFAULT NULL,
`base_exp` int(11) unsigned DEFAULT NULL,
`job_exp` int(11) unsigned DEFAULT NULL,
`mvp_exp` int(11) unsigned DEFAULT NULL,
`attack` smallint(6) unsigned DEFAULT NULL,
`attack2` smallint(6) unsigned DEFAULT NULL,
`defense` smallint(6) unsigned DEFAULT NULL,
`magic_defense` smallint(6) unsigned DEFAULT NULL,
`str` smallint(6) unsigned DEFAULT NULL,
`agi` smallint(6) unsigned DEFAULT NULL,
`vit` smallint(6) unsigned DEFAULT NULL,
`int` smallint(6) unsigned DEFAULT NULL,
`dex` smallint(6) unsigned DEFAULT NULL,
`luk` smallint(6) unsigned DEFAULT NULL,
`attack_range` tinyint(4) unsigned DEFAULT NULL,
`skill_range` tinyint(4) unsigned DEFAULT NULL,
`chase_range` tinyint(4) unsigned DEFAULT NULL,
`size` varchar(24) DEFAULT NULL,
`race` varchar(24) DEFAULT NULL,
`racegroup_goblin` tinyint(1) unsigned DEFAULT NULL,
`racegroup_kobold` tinyint(1) unsigned DEFAULT NULL,
`racegroup_orc` tinyint(1) unsigned DEFAULT NULL,
`racegroup_golem` tinyint(1) unsigned DEFAULT NULL,
`racegroup_guardian` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ninja` tinyint(1) unsigned DEFAULT NULL,
`racegroup_gvg` tinyint(1) unsigned DEFAULT NULL,
`racegroup_battlefield` tinyint(1) unsigned DEFAULT NULL,
`racegroup_treasure` tinyint(1) unsigned DEFAULT NULL,
`racegroup_biolab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_manuk` tinyint(1) unsigned DEFAULT NULL,
`racegroup_splendide` tinyint(1) unsigned DEFAULT NULL,
`racegroup_scaraba` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_atk_def` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_hidden` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_swordman_thief` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_acolyte_merchant` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mage_archer` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mvp` tinyint(1) unsigned DEFAULT NULL,
`racegroup_clocktower` tinyint(1) unsigned DEFAULT NULL,
`racegroup_thanatos` tinyint(1) unsigned DEFAULT NULL,
`racegroup_faceworm` tinyint(1) unsigned DEFAULT NULL,
`racegroup_hearthunter` tinyint(1) unsigned DEFAULT NULL,
`racegroup_rockridge` tinyint(1) unsigned DEFAULT NULL,
`racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL,
`racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL,
`element` varchar(24) DEFAULT NULL,
`element_level` tinyint(4) unsigned DEFAULT NULL,
`walk_speed` smallint(6) unsigned DEFAULT NULL,
`attack_delay` smallint(6) unsigned DEFAULT NULL,
`attack_motion` smallint(6) unsigned DEFAULT NULL,
`damage_motion` smallint(6) unsigned DEFAULT NULL,
`ai` varchar(2) DEFAULT NULL,
`class` varchar(50) DEFAULT NULL,
`mode_canmove` tinyint(1) unsigned DEFAULT NULL,
`mode_looter` tinyint(1) unsigned DEFAULT NULL,
`mode_aggressive` tinyint(1) unsigned DEFAULT NULL,
`mode_assist` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensoridle` tinyint(1) unsigned DEFAULT NULL,
`mode_norandomwalk` tinyint(1) unsigned DEFAULT NULL,
`mode_nocast` tinyint(1) unsigned DEFAULT NULL,
`mode_canattack` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensorchase` tinyint(1) unsigned DEFAULT NULL,
`mode_changechase` tinyint(1) unsigned DEFAULT NULL,
`mode_angry` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetmelee` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetchase` tinyint(1) unsigned DEFAULT NULL,
`mode_targetweak` tinyint(1) unsigned DEFAULT NULL,
`mode_randomtarget` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremelee` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremagic` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoreranged` tinyint(1) unsigned DEFAULT NULL,
`mode_mvp` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremisc` tinyint(1) unsigned DEFAULT NULL,
`mode_knockbackimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_teleportblock` tinyint(1) unsigned DEFAULT NULL,
`mode_fixeditemdrop` tinyint(1) unsigned DEFAULT NULL,
`mode_detector` tinyint(1) unsigned DEFAULT NULL,
`mode_statusimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_skillimmune` tinyint(1) unsigned DEFAULT NULL,
`mvpdrop1_item` varchar(50) DEFAULT NULL,
`mvpdrop1_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop1_option` varchar(50) DEFAULT NULL,
`mvpdrop1_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop2_item` varchar(50) DEFAULT NULL,
`mvpdrop2_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop2_option` varchar(50) DEFAULT NULL,
`mvpdrop2_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop3_item` varchar(50) DEFAULT NULL,
`mvpdrop3_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop3_option` varchar(50) DEFAULT NULL,
`mvpdrop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop1_item` varchar(50) DEFAULT NULL,
`drop1_rate` smallint(9) unsigned DEFAULT NULL,
`drop1_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop1_option` varchar(50) DEFAULT NULL,
`drop1_index` tinyint(2) unsigned DEFAULT NULL,
`drop2_item` varchar(50) DEFAULT NULL,
`drop2_rate` smallint(9) unsigned DEFAULT NULL,
`drop2_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop2_option` varchar(50) DEFAULT NULL,
`drop2_index` tinyint(2) unsigned DEFAULT NULL,
`drop3_item` varchar(50) DEFAULT NULL,
`drop3_rate` smallint(9) unsigned DEFAULT NULL,
`drop3_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop3_option` varchar(50) DEFAULT NULL,
`drop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop4_item` varchar(50) DEFAULT NULL,
`drop4_rate` smallint(9) unsigned DEFAULT NULL,
`drop4_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop4_option` varchar(50) DEFAULT NULL,
`drop4_index` tinyint(2) unsigned DEFAULT NULL,
`drop5_item` varchar(50) DEFAULT NULL,
`drop5_rate` smallint(9) unsigned DEFAULT NULL,
`drop5_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop5_option` varchar(50) DEFAULT NULL,
`drop5_index` tinyint(2) unsigned DEFAULT NULL,
`drop6_item` varchar(50) DEFAULT NULL,
`drop6_rate` smallint(9) unsigned DEFAULT NULL,
`drop6_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop6_option` varchar(50) DEFAULT NULL,
`drop6_index` tinyint(2) unsigned DEFAULT NULL,
`drop7_item` varchar(50) DEFAULT NULL,
`drop7_rate` smallint(9) unsigned DEFAULT NULL,
`drop7_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop7_option` varchar(50) DEFAULT NULL,
`drop7_index` tinyint(2) unsigned DEFAULT NULL,
`drop8_item` varchar(50) DEFAULT NULL,
`drop8_rate` smallint(9) unsigned DEFAULT NULL,
`drop8_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop8_option` varchar(50) DEFAULT NULL,
`drop8_index` tinyint(2) unsigned DEFAULT NULL,
`drop9_item` varchar(50) DEFAULT NULL,
`drop9_rate` smallint(9) unsigned DEFAULT NULL,
`drop9_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop9_option` varchar(50) DEFAULT NULL,
`drop9_index` tinyint(2) unsigned DEFAULT NULL,
`drop10_item` varchar(50) DEFAULT NULL,
`drop10_rate` smallint(9) unsigned DEFAULT NULL,
`drop10_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop10_option` varchar(50) DEFAULT NULL,
`drop10_index` tinyint(2) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`name_aegis`)
) ENGINE=MyISAM;

157
doc/yaml/sql/mob_db_re.sql Normal file
View File

@ -0,0 +1,157 @@
#
# Table structure for table `mob_db_re`
#
DROP TABLE IF EXISTS `mob_db_re`;
CREATE TABLE `mob_db_re` (
`id` int(11) unsigned NOT NULL,
`name_aegis` varchar(24) NOT NULL,
`name_english` text NOT NULL,
`name_japanese` text DEFAULT NULL,
`level` smallint(6) unsigned DEFAULT NULL,
`hp` int(11) unsigned DEFAULT NULL,
`sp` mediumint(9) unsigned DEFAULT NULL,
`base_exp` int(11) unsigned DEFAULT NULL,
`job_exp` int(11) unsigned DEFAULT NULL,
`mvp_exp` int(11) unsigned DEFAULT NULL,
`attack` smallint(6) unsigned DEFAULT NULL,
`attack2` smallint(6) unsigned DEFAULT NULL,
`defense` smallint(6) unsigned DEFAULT NULL,
`magic_defense` smallint(6) unsigned DEFAULT NULL,
`str` smallint(6) unsigned DEFAULT NULL,
`agi` smallint(6) unsigned DEFAULT NULL,
`vit` smallint(6) unsigned DEFAULT NULL,
`int` smallint(6) unsigned DEFAULT NULL,
`dex` smallint(6) unsigned DEFAULT NULL,
`luk` smallint(6) unsigned DEFAULT NULL,
`attack_range` tinyint(4) unsigned DEFAULT NULL,
`skill_range` tinyint(4) unsigned DEFAULT NULL,
`chase_range` tinyint(4) unsigned DEFAULT NULL,
`size` varchar(24) DEFAULT NULL,
`race` varchar(24) DEFAULT NULL,
`racegroup_goblin` tinyint(1) unsigned DEFAULT NULL,
`racegroup_kobold` tinyint(1) unsigned DEFAULT NULL,
`racegroup_orc` tinyint(1) unsigned DEFAULT NULL,
`racegroup_golem` tinyint(1) unsigned DEFAULT NULL,
`racegroup_guardian` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ninja` tinyint(1) unsigned DEFAULT NULL,
`racegroup_gvg` tinyint(1) unsigned DEFAULT NULL,
`racegroup_battlefield` tinyint(1) unsigned DEFAULT NULL,
`racegroup_treasure` tinyint(1) unsigned DEFAULT NULL,
`racegroup_biolab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_manuk` tinyint(1) unsigned DEFAULT NULL,
`racegroup_splendide` tinyint(1) unsigned DEFAULT NULL,
`racegroup_scaraba` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_atk_def` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_hidden` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_swordman_thief` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_acolyte_merchant` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mage_archer` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mvp` tinyint(1) unsigned DEFAULT NULL,
`racegroup_clocktower` tinyint(1) unsigned DEFAULT NULL,
`racegroup_thanatos` tinyint(1) unsigned DEFAULT NULL,
`racegroup_faceworm` tinyint(1) unsigned DEFAULT NULL,
`racegroup_hearthunter` tinyint(1) unsigned DEFAULT NULL,
`racegroup_rockridge` tinyint(1) unsigned DEFAULT NULL,
`racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL,
`racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL,
`element` varchar(24) DEFAULT NULL,
`element_level` tinyint(4) unsigned DEFAULT NULL,
`walk_speed` smallint(6) unsigned DEFAULT NULL,
`attack_delay` smallint(6) unsigned DEFAULT NULL,
`attack_motion` smallint(6) unsigned DEFAULT NULL,
`damage_motion` smallint(6) unsigned DEFAULT NULL,
`ai` varchar(2) DEFAULT NULL,
`class` varchar(50) DEFAULT NULL,
`mode_canmove` tinyint(1) unsigned DEFAULT NULL,
`mode_looter` tinyint(1) unsigned DEFAULT NULL,
`mode_aggressive` tinyint(1) unsigned DEFAULT NULL,
`mode_assist` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensoridle` tinyint(1) unsigned DEFAULT NULL,
`mode_norandomwalk` tinyint(1) unsigned DEFAULT NULL,
`mode_nocast` tinyint(1) unsigned DEFAULT NULL,
`mode_canattack` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensorchase` tinyint(1) unsigned DEFAULT NULL,
`mode_changechase` tinyint(1) unsigned DEFAULT NULL,
`mode_angry` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetmelee` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetchase` tinyint(1) unsigned DEFAULT NULL,
`mode_targetweak` tinyint(1) unsigned DEFAULT NULL,
`mode_randomtarget` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremelee` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremagic` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoreranged` tinyint(1) unsigned DEFAULT NULL,
`mode_mvp` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremisc` tinyint(1) unsigned DEFAULT NULL,
`mode_knockbackimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_teleportblock` tinyint(1) unsigned DEFAULT NULL,
`mode_fixeditemdrop` tinyint(1) unsigned DEFAULT NULL,
`mode_detector` tinyint(1) unsigned DEFAULT NULL,
`mode_statusimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_skillimmune` tinyint(1) unsigned DEFAULT NULL,
`mvpdrop1_item` varchar(50) DEFAULT NULL,
`mvpdrop1_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop1_option` varchar(50) DEFAULT NULL,
`mvpdrop1_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop2_item` varchar(50) DEFAULT NULL,
`mvpdrop2_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop2_option` varchar(50) DEFAULT NULL,
`mvpdrop2_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop3_item` varchar(50) DEFAULT NULL,
`mvpdrop3_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop3_option` varchar(50) DEFAULT NULL,
`mvpdrop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop1_item` varchar(50) DEFAULT NULL,
`drop1_rate` smallint(9) unsigned DEFAULT NULL,
`drop1_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop1_option` varchar(50) DEFAULT NULL,
`drop1_index` tinyint(2) unsigned DEFAULT NULL,
`drop2_item` varchar(50) DEFAULT NULL,
`drop2_rate` smallint(9) unsigned DEFAULT NULL,
`drop2_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop2_option` varchar(50) DEFAULT NULL,
`drop2_index` tinyint(2) unsigned DEFAULT NULL,
`drop3_item` varchar(50) DEFAULT NULL,
`drop3_rate` smallint(9) unsigned DEFAULT NULL,
`drop3_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop3_option` varchar(50) DEFAULT NULL,
`drop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop4_item` varchar(50) DEFAULT NULL,
`drop4_rate` smallint(9) unsigned DEFAULT NULL,
`drop4_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop4_option` varchar(50) DEFAULT NULL,
`drop4_index` tinyint(2) unsigned DEFAULT NULL,
`drop5_item` varchar(50) DEFAULT NULL,
`drop5_rate` smallint(9) unsigned DEFAULT NULL,
`drop5_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop5_option` varchar(50) DEFAULT NULL,
`drop5_index` tinyint(2) unsigned DEFAULT NULL,
`drop6_item` varchar(50) DEFAULT NULL,
`drop6_rate` smallint(9) unsigned DEFAULT NULL,
`drop6_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop6_option` varchar(50) DEFAULT NULL,
`drop6_index` tinyint(2) unsigned DEFAULT NULL,
`drop7_item` varchar(50) DEFAULT NULL,
`drop7_rate` smallint(9) unsigned DEFAULT NULL,
`drop7_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop7_option` varchar(50) DEFAULT NULL,
`drop7_index` tinyint(2) unsigned DEFAULT NULL,
`drop8_item` varchar(50) DEFAULT NULL,
`drop8_rate` smallint(9) unsigned DEFAULT NULL,
`drop8_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop8_option` varchar(50) DEFAULT NULL,
`drop8_index` tinyint(2) unsigned DEFAULT NULL,
`drop9_item` varchar(50) DEFAULT NULL,
`drop9_rate` smallint(9) unsigned DEFAULT NULL,
`drop9_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop9_option` varchar(50) DEFAULT NULL,
`drop9_index` tinyint(2) unsigned DEFAULT NULL,
`drop10_item` varchar(50) DEFAULT NULL,
`drop10_rate` smallint(9) unsigned DEFAULT NULL,
`drop10_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop10_option` varchar(50) DEFAULT NULL,
`drop10_index` tinyint(2) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`name_aegis`)
) ENGINE=MyISAM;

View File

@ -41,9 +41,9 @@ OnInit:
.@item_db$ = "item_db";
}
freeloop 1;
.@total = query_sql( "SELECT DISTINCT LEFT( `name_english`, 1 ) AS alphabets FROM `"+ .@item_db$ +"` WHERE `type` = " + IT_CARD + " AND `id` IN ( SELECT DISTINCT `dropcardid` FROM `"+ .@mob_db$ +"` WHERE ~(`MODE`) & " + MD_MVP + " ) ORDER BY alphabets;", .@alphabet$ );
.@total = query_sql( "SELECT DISTINCT LEFT( `name_english`, 1 ) AS alphabets FROM `"+ .@item_db$ +"` WHERE `type` = 'Card' AND `name_aegis` IN ( SELECT DISTINCT `drop10_item` FROM `"+ .@mob_db$ +"` WHERE `mode_mvp` = 0 ) ORDER BY alphabets;", .@alphabet$ );
for ( .@i = 0; .@i < .@total; .@i++ ) {
.@nb = query_sql( "SELECT `"+ .@item_db$ +"`.`id` FROM `"+ .@item_db$ +"` WHERE `type` = " + IT_CARD + " AND LEFT( `name_english`, 1 ) = '"+ .@alphabet$[.@i] +"' AND `id` IN ( SELECT DISTINCT `dropcardid` FROM `"+ .@mob_db$ +"` WHERE ~(`MODE`) & " + MD_MVP + " ) ORDER BY `name_english` LIMIT 128;", .@id );
.@nb = query_sql( "SELECT `"+ .@item_db$ +"`.`id` FROM `"+ .@item_db$ +"` WHERE `type` = 'Card' AND LEFT( `name_english`, 1 ) = '"+ .@alphabet$[.@i] +"' AND `name_aegis` IN ( SELECT DISTINCT `drop10_item` FROM `"+ .@mob_db$ +"` WHERE `mode_mvp` = 0 ) ORDER BY `name_english` LIMIT 128;", .@id );
if (.@nb > 0) {
.alphabet$[.@size_alphabet++] = .@alphabet$[.@i];
.alphabet_menu$ = .alphabet_menu$ + .@alphabet$[.@i] +" Cards:";

View File

@ -515,7 +515,7 @@ REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`wei
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_accessory`,`location_left_accessory`,`flag_buyingstore`,`script`) VALUES (4228,'Sleeper_Card','Sleeper Card','Card',20,10,true,true,true,'bonus3 bAddMonsterDropItem,12031,RC_Fish,100;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_head_top`,`location_head_mid`,`location_head_low`,`flag_buyingstore`,`script`) VALUES (4229,'C_Tower_Manager_Card','Tower Keeper Card','Card',20,10,true,true,true,true,'bonus bInt,1;\nbonus bCastrate,-5;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_accessory`,`location_left_accessory`,`flag_buyingstore`,`script`) VALUES (4230,'Shinobi_Card','Shinobi Card','Card',20,10,true,true,true,'bonus bAgi,1;\nbonus3 bAutoSpellWhenHit,"AS_CLOAKING",5,100;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`script`) VALUES (4231,'Increase_Soil_Card','Mi Gao Card','Card',20,10,true,true,'bonus2 bSubRace2,RC2_Guardian,50;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`script`) VALUES (4231,'Increase_Soil_Card','Mi Gao Card','Card',20,10,true,true,'bonus2 bAddDamageClass,1285,-50;\nbonus2 bAddDamageClass,1286,-50;\nbonus2 bAddDamageClass,1287,-50;\nbonus2 bAddDamageClass,1899,-50;\nbonus2 bAddDamageClass,1900,-50;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_accessory`,`location_left_accessory`,`flag_buyingstore`,`script`) VALUES (4232,'Wild_Ginseng_Card','Hermit Plant Card','Card',20,10,true,true,true,'bonus2 bAddItemGroupHealRate,IG_Herb,50;\nbonus3 bAddMonsterDropItem,507,RC_Plant,300;\nbonus3 bAddMonsterDropItem,508,RC_Plant,200;\nbonus3 bAddMonsterDropItem,509,RC_Plant,100;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_armor`,`flag_buyingstore`,`script`) VALUES (4233,'Baby_Leopard_Card','Baby Leopard Card','Card',20,10,true,true,'bonus bLuk,3;\nif (BaseClass == Job_Merchant)\n bonus bUnbreakableArmor;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_armor`,`flag_buyingstore`,`script`) VALUES (4234,'Anolian_Card','Anolian Card','Card',20,10,true,true,'bonus3 bAutoSpellWhenHit,"AC_CONCENTRATION",1+9*(getskilllv("AC_CONCENTRATION") == 10),30;');
@ -535,7 +535,7 @@ REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`wei
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`script`) VALUES (4248,'Ancient_Mummy_Card','Ancient Mummy Card','Card',20,10,true,true,'bonus3 bAutoSpellWhenHit,"AL_CRUCIS",5,30;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_shoes`,`flag_buyingstore`,`script`) VALUES (4249,'Ancient_Worm_Card','Ancient Worm Card','Card',20,10,true,true,'bonus2 bSubRace,RC_Demon,-20;\nbonus2 bExpAddRace,RC_Demon,10;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`script`) VALUES (4250,'Executioner_Card','Executioner Card','Card',20,10,true,true,'bonus2 bSubSize,Size_Large,25;\nbonus bDef,1;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_hand`,`flag_buyingstore`,`script`) VALUES (4251,'Elder_Card','Elder Card','Card',20,10,true,true,'bonus2 bAddRace2,RC2_Guardian,40;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_hand`,`flag_buyingstore`,`script`) VALUES (4251,'Elder_Card','Elder Card','Card',20,10,true,true,'bonus2 bAddDamageClass,1285,40;\nbonus2 bAddDamageClass,1286,40;\nbonus2 bAddDamageClass,1287,40;\nbonus2 bAddDamageClass,1899,40;\nbonus2 bAddDamageClass,1900,40;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_accessory`,`location_left_accessory`,`flag_buyingstore`,`script`) VALUES (4252,'Alligator_Card','Alligator Card','Card',20,10,true,true,true,'bonus bLongAtkDef,5;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`script`) VALUES (4253,'Alice_Card','Alice Card','Card',20,10,true,true,'bonus2 bSubClass,Class_Boss,40;\nbonus2 bSubClass,Class_Normal,-40;');
REPLACE INTO `item_db` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`script`) VALUES (4254,'Tirfing_Card','Ogretooth Card','Card',20,10,true,true,'bonus2 bSubSize,Size_Medium,25;\nbonus bDef,1;');

View File

@ -516,7 +516,7 @@ REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_accessory`,`location_left_accessory`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4228,'Sleeper_Card','Sleeper Card','Card',20,10,true,true,true,'CLIENT','bonus3 bAddMonsterDropItem,12031,RC_Fish,100;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_head_top`,`location_head_mid`,`location_head_low`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4229,'C_Tower_Manager_Card','Tower Keeper Card','Card',20,10,true,true,true,true,'CLIENT','bonus bInt,1;\nbonus bVariableCastrate,-5;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_accessory`,`location_left_accessory`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4230,'Shinobi_Card','Shinobi Card','Card',20,10,true,true,true,'CLIENT','bonus bAgi,1;\nbonus3 bAutoSpellWhenHit,"AS_CLOAKING",5,100;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4231,'Increase_Soil_Card','Mi Gao Card','Card',20,10,true,true,'CLIENT','bonus2 bSubRace2,RC2_Guardian,50;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4231,'Increase_Soil_Card','Mi Gao Card','Card',20,10,true,true,'CLIENT','bonus2 bAddDamageClass,1285,-50;\nbonus2 bAddDamageClass,1286,-50;\nbonus2 bAddDamageClass,1287,-50;\nbonus2 bAddDamageClass,1899,-50;\nbonus2 bAddDamageClass,1900,-50;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_accessory`,`location_left_accessory`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4232,'Wild_Ginseng_Card','Hermit Plant Card','Card',20,10,true,true,true,'CLIENT','bonus2 bAddItemGroupHealRate,IG_Herb,50;\nbonus3 bAddMonsterDropItem,507,RC_Plant,300;\nbonus3 bAddMonsterDropItem,508,RC_Plant,200;\nbonus3 bAddMonsterDropItem,509,RC_Plant,100;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_armor`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4233,'Baby_Leopard_Card','Baby Leopard Card','Card',20,10,true,true,'CLIENT','bonus bLuk,3;\nif (BaseClass == Job_Merchant)\n bonus bUnbreakableArmor;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_armor`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4234,'Anolian_Card','Anolian Card','Card',20,10,true,true,'CLIENT','bonus3 bAutoSpellWhenHit,"AC_CONCENTRATION",1+9*(getskilllv("AC_CONCENTRATION") == 10),30;');
@ -536,7 +536,7 @@ REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4248,'Ancient_Mummy_Card','Ancient Mummy Card','Card',20,10,true,true,'CLIENT','bonus3 bAutoSpellWhenHit,"AL_CRUCIS",5,30;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_shoes`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4249,'Ancient_Worm_Card','Ancient Worm Card','Card',20,10,true,true,'CLIENT','bonus2 bSubRace,RC_Demon,-20;\nbonus2 bExpAddRace,RC_Demon,10;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4250,'Executioner_Card','Executioner Card','Card',20,10,true,true,'CLIENT','bonus2 bSubSize,Size_Large,25;\nbonus bDef,1;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_hand`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4251,'Elder_Card','Elder Card','Card',20,10,true,true,'CLIENT','bonus2 bAddRace2,RC2_Guardian,40;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_hand`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4251,'Elder_Card','Elder Card','Card',20,10,true,true,'CLIENT','bonus2 bAddDamageClass,1285,40;\nbonus2 bAddDamageClass,1286,40;\nbonus2 bAddDamageClass,1287,40;\nbonus2 bAddDamageClass,1899,40;\nbonus2 bAddDamageClass,1900,40;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_right_accessory`,`location_left_accessory`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4252,'Alligator_Card','Alligator Card','Card',20,10,true,true,true,'CLIENT','bonus bLongAtkDef,5;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4253,'Alice_Card','Alice Card','Card',20,10,true,true,'CLIENT','bonus2 bSubClass,Class_Boss,40;\nbonus2 bSubClass,Class_Normal,-40;');
REPLACE INTO `item_db_re` (`id`,`name_aegis`,`name_english`,`type`,`price_buy`,`weight`,`location_left_hand`,`flag_buyingstore`,`flag_dropeffect`,`script`) VALUES (4254,'Tirfing_Card','Ogretooth Card','Card',20,10,true,true,'CLIENT','bonus2 bSubSize,Size_Medium,25;\nbonus bDef,1;');

File diff suppressed because it is too large Load Diff

View File

@ -4,112 +4,197 @@
DROP TABLE IF EXISTS `mob_db2`;
CREATE TABLE `mob_db2` (
`ID` mediumint(9) unsigned NOT NULL default '0',
`Sprite` varchar(24) NOT NULL,
`kName` text NOT NULL,
`iName` text NOT NULL,
`LV` tinyint(6) unsigned NOT NULL default '0',
`HP` int(9) unsigned NOT NULL default '0',
`SP` mediumint(9) unsigned NOT NULL default '0',
`EXP` mediumint(9) unsigned NOT NULL default '0',
`JEXP` mediumint(9) unsigned NOT NULL default '0',
`Range1` tinyint(4) unsigned NOT NULL default '0',
`ATK1` smallint(6) unsigned NOT NULL default '0',
`ATK2` smallint(6) unsigned NOT NULL default '0',
`DEF` smallint(6) unsigned NOT NULL default '0',
`MDEF` smallint(6) unsigned NOT NULL default '0',
`STR` smallint(6) unsigned NOT NULL default '0',
`AGI` smallint(6) unsigned NOT NULL default '0',
`VIT` smallint(6) unsigned NOT NULL default '0',
`INT` smallint(6) unsigned NOT NULL default '0',
`DEX` smallint(6) unsigned NOT NULL default '0',
`LUK` smallint(6) unsigned NOT NULL default '0',
`Range2` tinyint(4) unsigned NOT NULL default '0',
`Range3` tinyint(4) unsigned NOT NULL default '0',
`Scale` tinyint(4) unsigned NOT NULL default '0',
`Race` tinyint(4) unsigned NOT NULL default '0',
`Element` tinyint(4) unsigned NOT NULL default '0',
`Mode` int(11) unsigned NOT NULL default '0',
`Speed` smallint(6) unsigned NOT NULL default '0',
`aDelay` smallint(6) unsigned NOT NULL default '0',
`aMotion` smallint(6) unsigned NOT NULL default '0',
`dMotion` smallint(6) unsigned NOT NULL default '0',
`MEXP` mediumint(9) unsigned NOT NULL default '0',
`MVP1id` int(10) unsigned NOT NULL default '0',
`MVP1per` smallint(9) unsigned NOT NULL default '0',
`MVP2id` int(10) unsigned NOT NULL default '0',
`MVP2per` smallint(9) unsigned NOT NULL default '0',
`MVP3id` int(10) unsigned NOT NULL default '0',
`MVP3per` smallint(9) unsigned NOT NULL default '0',
`Drop1id` int(10) unsigned NOT NULL default '0',
`Drop1per` smallint(9) unsigned NOT NULL default '0',
`Drop2id` int(10) unsigned NOT NULL default '0',
`Drop2per` smallint(9) unsigned NOT NULL default '0',
`Drop3id` int(10) unsigned NOT NULL default '0',
`Drop3per` smallint(9) unsigned NOT NULL default '0',
`Drop4id` int(10) unsigned NOT NULL default '0',
`Drop4per` smallint(9) unsigned NOT NULL default '0',
`Drop5id` int(10) unsigned NOT NULL default '0',
`Drop5per` smallint(9) unsigned NOT NULL default '0',
`Drop6id` int(10) unsigned NOT NULL default '0',
`Drop6per` smallint(9) unsigned NOT NULL default '0',
`Drop7id` int(10) unsigned NOT NULL default '0',
`Drop7per` smallint(9) unsigned NOT NULL default '0',
`Drop8id` int(10) unsigned NOT NULL default '0',
`Drop8per` smallint(9) unsigned NOT NULL default '0',
`Drop9id` int(10) unsigned NOT NULL default '0',
`Drop9per` smallint(9) unsigned NOT NULL default '0',
`DropCardid` int(10) unsigned NOT NULL default '0',
`DropCardper` smallint(9) unsigned NOT NULL default '0',
PRIMARY KEY (`ID`),
UNIQUE KEY (`Sprite`)
`id` int(11) unsigned NOT NULL,
`name_aegis` varchar(24) NOT NULL,
`name_english` text NOT NULL,
`name_japanese` text DEFAULT NULL,
`level` smallint(6) unsigned DEFAULT NULL,
`hp` int(11) unsigned DEFAULT NULL,
`sp` mediumint(9) unsigned DEFAULT NULL,
`base_exp` int(11) unsigned DEFAULT NULL,
`job_exp` int(11) unsigned DEFAULT NULL,
`mvp_exp` int(11) unsigned DEFAULT NULL,
`attack` smallint(6) unsigned DEFAULT NULL,
`attack2` smallint(6) unsigned DEFAULT NULL,
`defense` smallint(6) unsigned DEFAULT NULL,
`magic_defense` smallint(6) unsigned DEFAULT NULL,
`str` smallint(6) unsigned DEFAULT NULL,
`agi` smallint(6) unsigned DEFAULT NULL,
`vit` smallint(6) unsigned DEFAULT NULL,
`int` smallint(6) unsigned DEFAULT NULL,
`dex` smallint(6) unsigned DEFAULT NULL,
`luk` smallint(6) unsigned DEFAULT NULL,
`attack_range` tinyint(4) unsigned DEFAULT NULL,
`skill_range` tinyint(4) unsigned DEFAULT NULL,
`chase_range` tinyint(4) unsigned DEFAULT NULL,
`size` varchar(24) DEFAULT NULL,
`race` varchar(24) DEFAULT NULL,
`racegroup_goblin` tinyint(1) unsigned DEFAULT NULL,
`racegroup_kobold` tinyint(1) unsigned DEFAULT NULL,
`racegroup_orc` tinyint(1) unsigned DEFAULT NULL,
`racegroup_golem` tinyint(1) unsigned DEFAULT NULL,
`racegroup_guardian` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ninja` tinyint(1) unsigned DEFAULT NULL,
`racegroup_gvg` tinyint(1) unsigned DEFAULT NULL,
`racegroup_battlefield` tinyint(1) unsigned DEFAULT NULL,
`racegroup_treasure` tinyint(1) unsigned DEFAULT NULL,
`racegroup_biolab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_manuk` tinyint(1) unsigned DEFAULT NULL,
`racegroup_splendide` tinyint(1) unsigned DEFAULT NULL,
`racegroup_scaraba` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_atk_def` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_hidden` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_swordman_thief` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_acolyte_merchant` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mage_archer` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mvp` tinyint(1) unsigned DEFAULT NULL,
`racegroup_clocktower` tinyint(1) unsigned DEFAULT NULL,
`racegroup_thanatos` tinyint(1) unsigned DEFAULT NULL,
`racegroup_faceworm` tinyint(1) unsigned DEFAULT NULL,
`racegroup_hearthunter` tinyint(1) unsigned DEFAULT NULL,
`racegroup_rockridge` tinyint(1) unsigned DEFAULT NULL,
`racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL,
`racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL,
`element` varchar(24) DEFAULT NULL,
`element_level` tinyint(4) unsigned DEFAULT NULL,
`walk_speed` smallint(6) unsigned DEFAULT NULL,
`attack_delay` smallint(6) unsigned DEFAULT NULL,
`attack_motion` smallint(6) unsigned DEFAULT NULL,
`damage_motion` smallint(6) unsigned DEFAULT NULL,
`ai` varchar(2) DEFAULT NULL,
`class` varchar(50) DEFAULT NULL,
`mode_canmove` tinyint(1) unsigned DEFAULT NULL,
`mode_looter` tinyint(1) unsigned DEFAULT NULL,
`mode_aggressive` tinyint(1) unsigned DEFAULT NULL,
`mode_assist` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensoridle` tinyint(1) unsigned DEFAULT NULL,
`mode_norandomwalk` tinyint(1) unsigned DEFAULT NULL,
`mode_nocast` tinyint(1) unsigned DEFAULT NULL,
`mode_canattack` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensorchase` tinyint(1) unsigned DEFAULT NULL,
`mode_changechase` tinyint(1) unsigned DEFAULT NULL,
`mode_angry` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetmelee` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetchase` tinyint(1) unsigned DEFAULT NULL,
`mode_targetweak` tinyint(1) unsigned DEFAULT NULL,
`mode_randomtarget` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremelee` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremagic` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoreranged` tinyint(1) unsigned DEFAULT NULL,
`mode_mvp` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremisc` tinyint(1) unsigned DEFAULT NULL,
`mode_knockbackimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_teleportblock` tinyint(1) unsigned DEFAULT NULL,
`mode_fixeditemdrop` tinyint(1) unsigned DEFAULT NULL,
`mode_detector` tinyint(1) unsigned DEFAULT NULL,
`mode_statusimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_skillimmune` tinyint(1) unsigned DEFAULT NULL,
`mvpdrop1_item` varchar(50) DEFAULT NULL,
`mvpdrop1_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop1_option` varchar(50) DEFAULT NULL,
`mvpdrop1_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop2_item` varchar(50) DEFAULT NULL,
`mvpdrop2_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop2_option` varchar(50) DEFAULT NULL,
`mvpdrop2_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop3_item` varchar(50) DEFAULT NULL,
`mvpdrop3_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop3_option` varchar(50) DEFAULT NULL,
`mvpdrop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop1_item` varchar(50) DEFAULT NULL,
`drop1_rate` smallint(9) unsigned DEFAULT NULL,
`drop1_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop1_option` varchar(50) DEFAULT NULL,
`drop1_index` tinyint(2) unsigned DEFAULT NULL,
`drop2_item` varchar(50) DEFAULT NULL,
`drop2_rate` smallint(9) unsigned DEFAULT NULL,
`drop2_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop2_option` varchar(50) DEFAULT NULL,
`drop2_index` tinyint(2) unsigned DEFAULT NULL,
`drop3_item` varchar(50) DEFAULT NULL,
`drop3_rate` smallint(9) unsigned DEFAULT NULL,
`drop3_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop3_option` varchar(50) DEFAULT NULL,
`drop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop4_item` varchar(50) DEFAULT NULL,
`drop4_rate` smallint(9) unsigned DEFAULT NULL,
`drop4_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop4_option` varchar(50) DEFAULT NULL,
`drop4_index` tinyint(2) unsigned DEFAULT NULL,
`drop5_item` varchar(50) DEFAULT NULL,
`drop5_rate` smallint(9) unsigned DEFAULT NULL,
`drop5_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop5_option` varchar(50) DEFAULT NULL,
`drop5_index` tinyint(2) unsigned DEFAULT NULL,
`drop6_item` varchar(50) DEFAULT NULL,
`drop6_rate` smallint(9) unsigned DEFAULT NULL,
`drop6_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop6_option` varchar(50) DEFAULT NULL,
`drop6_index` tinyint(2) unsigned DEFAULT NULL,
`drop7_item` varchar(50) DEFAULT NULL,
`drop7_rate` smallint(9) unsigned DEFAULT NULL,
`drop7_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop7_option` varchar(50) DEFAULT NULL,
`drop7_index` tinyint(2) unsigned DEFAULT NULL,
`drop8_item` varchar(50) DEFAULT NULL,
`drop8_rate` smallint(9) unsigned DEFAULT NULL,
`drop8_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop8_option` varchar(50) DEFAULT NULL,
`drop8_index` tinyint(2) unsigned DEFAULT NULL,
`drop9_item` varchar(50) DEFAULT NULL,
`drop9_rate` smallint(9) unsigned DEFAULT NULL,
`drop9_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop9_option` varchar(50) DEFAULT NULL,
`drop9_index` tinyint(2) unsigned DEFAULT NULL,
`drop10_item` varchar(50) DEFAULT NULL,
`drop10_rate` smallint(9) unsigned DEFAULT NULL,
`drop10_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop10_option` varchar(50) DEFAULT NULL,
`drop10_index` tinyint(2) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`name_aegis`)
) ENGINE=MyISAM;
# Monster Additional Database
#
# Structure of Database :
#REPLACE INTO `mob_db2` VALUES ( ID,'Sprite_Name','kROName','iROName',LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper);
# rAthena Dev Team
#REPLACE INTO `mob_db2` VALUES (1900,'VALARIS','Valaris','Valaris',99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1);
#REPLACE INTO `mob_db2` VALUES (1901,'VALARIS_WORSHIPPER','Valaris\'s Worshipper','Valaris\'s Worshipper',50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,0x1685,100,868,480,120,0,0,0,0,0,0,0,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,0,0,0,0,4129,1);
#REPLACE INTO `mob_db2` VALUES (1902,'MC_CAMERI','MC Cameri','MC Cameri',99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1);
#REPLACE INTO `mob_db2` VALUES (1903,'POKI','Poki#3','Poki#3',99,1349000,0,4093000,1526000,9,4892,9113,22,35,1,180,39,67,193,130,10,12,1,7,64,0x1973,120,500,672,480,92100,603,5500,617,3000,1723,1000,1228,100,1236,500,617,2500,1234,75,1237,125,1722,250,1724,100,1720,50,0,0,0,0);
#REPLACE INTO `mob_db2` VALUES (1904,'SENTRY','Sentry','Sentry',99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`mvp_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_looter`,`mode_castsensoridle`,`mode_norandomwalk`,`mode_nocast`,`mode_angry`,`mode_changetargetmelee`,`mvpdrop1_item`,`mvpdrop1_rate`,`mvpdrop2_item`,`mvpdrop2_rate`,`mvpdrop3_item`,`mvpdrop3_rate`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1900,'VALARIS','Valaris','Valaris',99,668000,107250,37895,13000,3220,4040,35,45,152,96,85,120,95,2,10,10,'Large','Demon','Dark',3,100,1068,768,576,'25',true,true,true,true,true,true,'Seed_Of_Yggdrasil',1000,'Baphomet_Doll',400,'Evil_Horn',3800,'Crescent_Scythe',200,'Magestic_Goat',200,'Clip',800,'Emperium',500,'Old_Violet_Box',3000,'Oridecon',4300,'Elunium',5600,'Baphomet_Card',1,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_canmove`,`mode_castsensorchase`,`mode_changechase`,`mode_changetargetmelee`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1901,'VALARIS_WORSHIPPER','Valaris\'s Worshipper','Valaris\'s Worshipper',50,8578,2706,1480,487,590,15,25,75,55,93,45,1,10,12,'Small','Demon','Dark',1,100,868,480,120,'10',true,true,true,true,'Evil_Horn',500,'Oridecon',63,'Halberd_',2,'Yggdrasilberry',50,'Leaf_Of_Yggdrasil',100,'Yellow_Potion',300,'Boots',50,'Baphomet__Card',1,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`mvp_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_looter`,`mode_castsensoridle`,`mode_norandomwalk`,`mode_nocast`,`mode_angry`,`mode_changetargetmelee`,`mvpdrop1_item`,`mvpdrop1_rate`,`mvpdrop2_item`,`mvpdrop2_rate`,`mvpdrop3_item`,`mvpdrop3_rate`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1902,'MC_CAMERI','MC Cameri','MC Cameri',99,668000,107250,37895,13000,3220,4040,35,45,152,96,85,120,95,2,10,10,'Large','Demon','Dark',3,100,1068,768,576,'25',true,true,true,true,true,true,'Seed_Of_Yggdrasil',1000,'Baphomet_Doll',400,'Evil_Horn',3800,'Crescent_Scythe',200,'Magestic_Goat',200,'Clip',800,'Emperium',500,'Old_Violet_Box',3000,'Oridecon',4300,'Elunium',5600,'Baphomet_Card',1,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`mvp_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_looter`,`mode_castsensoridle`,`mode_norandomwalk`,`mode_nocast`,`mode_angry`,`mode_changetargetmelee`,`mvpdrop1_item`,`mvpdrop1_rate`,`mvpdrop2_item`,`mvpdrop2_rate`,`mvpdrop3_item`,`mvpdrop3_rate`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1903,'POKI','Poki#3','Poki#3',99,1349000,4093000,1526000,92100,4892,9113,22,35,180,39,67,193,130,9,10,12,'Medium','Demihuman','Wind',3,120,500,672,480,'25',true,true,true,true,true,true,'Old_Blue_Box',5500,'Old_Violet_Box',3000,'Luna_Bow',1000,'Combat_Knife',100,'Sucsamad',500,'Old_Violet_Box',2500,'Moonlight_Sword',75,'Grimtooth_',125,'Balistar',250,'Dragon_Wing',100,'Bow_Of_Rudra',50,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`mvp_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_looter`,`mode_castsensoridle`,`mode_norandomwalk`,`mode_nocast`,`mode_angry`,`mode_changetargetmelee`,`mvpdrop1_item`,`mvpdrop1_rate`,`mvpdrop2_item`,`mvpdrop2_rate`,`mvpdrop3_item`,`mvpdrop3_rate`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1904,'SENTRY','Sentry','Sentry',99,668000,107250,37895,13000,3220,4040,35,45,152,96,85,120,95,2,10,10,'Large','Demon','Dark',3,100,1068,768,576,'25',true,true,true,true,true,true,'Seed_Of_Yggdrasil',1000,'Baphomet_Doll',400,'Evil_Horn',3800,'Crescent_Scythe',200,'Magestic_Goat',200,'Clip',800,'Emperium',500,'Old_Violet_Box',3000,'Oridecon',4300,'Elunium',5600,'Baphomet_Card',1,true);
# Custom Hollow Poring (overrrides/collides with META_ANDRE)
#REPLACE INTO `mob_db2` VALUES (1237,'HOLLOW_PORING','Hollow Poring','Hollow Poring',1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,512,150,619,20,0,0,0,0,4001,10);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1237,'HOLLOW_PORING','Hollow Poring','Hollow Poring',1,50,2,1,7,10,5,6,30,1,10,12,'Medium','Plant','Water',1,400,1872,672,480,'02','Jellopy',7000,'Knife_',100,'Sticky_Mucus',400,'Apple',1000,'Empty_Bottle',1500,'Apple',150,'Unripe_Apple',20,'Poring_Card',10,true);
# Custom Fire Poring. Warning, Colides with META_DENIRO
#REPLACE INTO `mob_db2` VALUES (1239,'FIRE_PORING','Fire Poring','Fire Poring',1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x131,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_castsensoridle`,`mode_norandomwalk`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1239,'FIRE_PORING','Fire Poring','Fire Poring',1,50,2,1,7,10,5,6,30,1,10,12,'Medium','Plant','Water',1,400,1872,672,480,'25',true,true,'Jellopy',7000,'Knife_',100,'Sticky_Mucus',400,'Apple',1000,'Empty_Bottle',1500,'Poring_Doll',5,'Unripe_Apple',20,'Poring_Card',20,true);
# Lunar New Year 2008 Event Monster overrides
# Uncomment if event is enabled, as these drops modifications are nessecary.
#REPLACE INTO `mob_db2` VALUES (1145,'MARTIN','Martin','Martin',18,1109,0,134,86,1,52,63,0,5,12,18,30,15,15,5,10,12,0,2,42,0x81,300,1480,480,480,0,0,0,0,0,0,0,1017,9000,1018,500,1251,10,2225,5,5009,1,10010,10,2224,15,7869,1500,0,0,4046,1);
#REPLACE INTO `mob_db2` VALUES (1175,'TAROU','Tarou','Tarou',11,284,0,57,28,1,34,45,0,0,1,20,11,10,24,5,10,12,0,2,27,0x91,150,1744,1044,684,0,0,0,0,0,0,0,1016,9000,919,3000,949,800,528,1000,701,2,7869,2500,0,0,0,0,0,0,4028,1);
#REPLACE INTO `mob_db2` VALUES (1209,'CRAMP','Cramp','Cramp',56,4720,0,2300,1513,1,395,465,0,5,1,85,35,5,65,60,10,12,0,2,45,0x3095,100,1000,500,1000,0,0,0,0,0,0,0,7007,4656,528,1000,726,80,746,110,568,250,510,70,984,95,7869,1500,0,0,4296,1);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`,`drop9_item`,`drop9_rate`,`drop9_nosteal`) VALUES (1145,'MARTIN','Martin','Martin',18,1109,134,86,52,63,5,12,18,30,15,15,5,1,10,12,'Small','Brute','Earth',2,300,1480,480,480,'01','Moustache_Of_Mole',9000,'Nail_Of_Mole',500,'Jur_',10,'Goggle_',5,'Safety_Helmet',1,'Battered_Pot',10,'Goggle',15,'RicePouch',1500,true,'Martin_Card',1,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop7_nosteal`) VALUES (1175,'TAROU','Tarou','Tarou',11,284,57,28,34,45,20,11,10,24,5,1,10,12,'Small','Brute','Dark',1,150,1744,1044,684,'17','Rat_Tail',9000,'Animal\'s_Skin',3000,'Feather',800,'Monster\'s_Feed',1000,'Ora_Ora',2,'RicePouch',2500,'Tarou_Card',1,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`,`drop9_item`,`drop9_rate`,`drop9_nosteal`) VALUES (1209,'CRAMP','Cramp','Cramp',56,4720,2300,1513,395,465,5,85,35,5,65,60,1,10,12,'Small','Brute','Poison',2,100,1000,500,1000,'09','Claw_Of_Rat',4656,'Monster\'s_Feed',1000,'Blue_Jewel',80,'Glass_Bead',110,'Lemon',250,'Blue_Herb',70,'Oridecon',95,'RicePouch',1500,true,'Cramp_Card',1,true);
# iRO St. Patricks Day 2008 Event Monster overrides
# Uncomment if event is enabled, as these drops modifications are nessecary.
#REPLACE INTO `mob_db2` VALUES (1841,'G_SNAKE_','Snake Lord\'s Minon','Snake Lord\'s Minon',15,471,0,72,48,1,46,55,0,0,1,15,15,10,35,5,10,12,1,2,22,0x81,200,1576,576,576,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,7,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2` VALUES (1842,'G_ANACONDAQ_','Snake Lord\'s Minon','Snake Lord\'s Minon',23,1109,0,300,149,1,124,157,0,0,1,23,28,10,36,5,10,12,1,2,25,0x91,200,1576,576,576,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,7,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2` VALUES (1843,'SIDE_WINDER_','Snake Lord\'s Minon','Snake Lord\'s Minon',43,4929,0,1996,993,1,240,320,5,10,38,43,40,15,115,20,10,12,1,2,25,0x3095,200,1576,576,576,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,7,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2` VALUES (1844,'G_ISIS_','Snake Lord\'s Minon','Snake Lord\'s Minon',47,7003,0,3709,1550,1,423,507,10,35,38,65,43,50,66,15,10,12,2,6,27,0x3195,200,1384,768,336,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,8,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`) VALUES (1841,'G_SNAKE_','Snake Lord\'s Minon','Snake Lord\'s Minon',15,471,72,48,46,55,15,15,10,35,5,1,10,12,'Medium','Brute','Earth',1,200,1576,576,576,'01','Copper_Coin_',1000,'Silver_Coin_',100,'Gold_Coin_US',30,'Black_Treasure_Box',7);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`) VALUES (1842,'G_ANACONDAQ_','Snake Lord\'s Minon','Snake Lord\'s Minon',23,1109,300,149,124,157,23,28,10,36,5,1,10,12,'Medium','Brute','Poison',1,200,1576,576,576,'17','Copper_Coin_',1000,'Silver_Coin_',100,'Gold_Coin_US',30,'Black_Treasure_Box',7);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`) VALUES (1843,'SIDE_WINDER_','Snake Lord\'s Minon','Snake Lord\'s Minon',43,4929,1996,993,240,320,5,10,38,43,40,15,115,20,1,10,12,'Medium','Brute','Poison',1,200,1576,576,576,'09','Copper_Coin_',1000,'Silver_Coin_',100,'Gold_Coin_US',30,'Black_Treasure_Box',7);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`) VALUES (1844,'G_ISIS_','Snake Lord\'s Minon','Snake Lord\'s Minon',47,7003,3709,1550,423,507,10,35,38,65,43,50,66,15,1,10,12,'Large','Demon','Dark',1,200,1384,768,336,'09','Copper_Coin_',1000,'Silver_Coin_',100,'Gold_Coin_US',30,'Black_Treasure_Box',8);
# iRO Christmas 2008 Event
# Uncomment if event is enabled, as these drops modifications are nessecary.
#REPLACE INTO `mob_db2` VALUES (1244,'JAKK_XMAS','Christmas Jakk','Christmas Jakk',38,3581,0,1113,688,1,315,382,5,30,1,38,38,43,75,45,10,12,1,0,43,0x81,200,1180,480,648,0,0,0,0,0,0,0,529,1000,530,1000,14546,1000,14550,1000,7174,1000,7175,1000,6092,1000,12355,1250,0,0,0,0);
#REPLACE INTO `mob_db2` VALUES (1245,'GOBLINE_XMAS','Christmas Goblin','Christmas Goblin',25,1176,0,282,171,1,118,140,10,5,1,53,25,20,38,45,10,12,1,7,24,0x81,100,1120,620,240,0,0,0,0,0,0,0,529,1000,530,1000,14546,1000,14550,1000,7174,1000,7175,1000,6092,1000,12355,1250,0,0,0,0);
#REPLACE INTO `mob_db2` VALUES (1246,'COOKIE_XMAS','Christmas Cookie','Christmas Cookie',28,2090,0,461,284,1,140,170,0,50,1,24,30,53,45,100,10,12,0,7,46,0x91,400,1248,1248,240,0,0,0,0,0,0,0,529,1000,530,1000,14546,1000,14550,1000,7174,1000,7175,1000,6092,1000,12355,1250,0,0,0,0);
#REPLACE INTO `mob_db2` VALUES (1247,'ANTONIO','Antonio','Antonio',10,10,0,3,2,1,13,20,100,0,1,1,1,50,100,100,10,12,1,3,66,0xC1,100,720,720,432,0,0,0,0,0,0,0,604,500,12354,500,14550,500,5136,500,12132,500,12225,500,5811,500,0,0,0,0,4243,1);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1244,'JAKK_XMAS','Christmas Jakk','Christmas Jakk',38,3581,1113,688,315,382,5,30,38,38,43,75,45,1,10,12,'Medium','Formless','Fire',2,200,1180,480,648,'01','Candy',1000,'Candy_Striper',1000,'Fire_Cracker_Love',1000,'Fire_Cracker_Xmas',1000,'Packing_Ribbon',1000,'Packing_Paper',1000,'Singing_Crystal_Piece',1000,'Xmas_Gift',1250,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1245,'GOBLINE_XMAS','Christmas Goblin','Christmas Goblin',25,1176,282,171,118,140,10,5,53,25,20,38,45,1,10,12,'Medium','Demihuman','Wind',1,100,1120,620,240,'01','Candy',1000,'Candy_Striper',1000,'Fire_Cracker_Love',1000,'Fire_Cracker_Xmas',1000,'Packing_Ribbon',1000,'Packing_Paper',1000,'Singing_Crystal_Piece',1000,'Xmas_Gift',1250,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1246,'COOKIE_XMAS','Christmas Cookie','Christmas Cookie',28,2090,461,284,140,170,50,24,30,53,45,100,1,10,12,'Small','Demihuman','Holy',2,400,1248,1248,240,'17','Candy',1000,'Candy_Striper',1000,'Fire_Cracker_Love',1000,'Fire_Cracker_Xmas',1000,'Packing_Ribbon',1000,'Packing_Paper',1000,'Singing_Crystal_Piece',1000,'Xmas_Gift',1250,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_nocast`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1247,'ANTONIO','Antonio','Antonio',10,10,3,2,13,20,100,50,100,100,1,10,12,'Medium','Plant','Holy',3,100,720,720,432,'01',true,'Branch_Of_Dead_Tree',500,'Buche_De_Noel',500,'Fire_Cracker_Xmas',500,'Santa\'s_Hat_',500,'Red_Bag',500,'Sweet_Candy_Striper',500,'Santa_Beard',500,'Antonio_Card',1,true);
# iRO Halloween 2009 Event
# Uncomment if event is enabled. Uncomment the skills for Halloween Whisper in mob_skill_db2.
#REPLACE INTO `mob_db2` VALUES (3014,'HALLOWEEN_WHISPER','Halloween Whisper','Halloween Whisper',1,800,0,0,0,1,10,13,0,45,1,51,14,0,60,0,10,12,0,6,68,0x81,150,1960,960,504,0,0,0,0,0,0,0,12396,150,6299,5335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2` VALUES (3015,'HALLOWEEN_DARK_LORD','Halloween Dark Lord','Halloween Dark Lord',1,45,0,0,0,1,10,13,0,45,1,51,14,0,60,0,10,12,2,6,89,0x81,100,868,768,480,0,0,0,0,0,0,0,12396,800,12397,5335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`dex`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`) VALUES (3014,'HALLOWEEN_WHISPER','Halloween Whisper','Halloween Whisper',1,800,10,13,45,51,14,60,1,10,12,'Small','Demon','Ghost',3,150,1960,960,504,'01','Fools_Day_Box',150,'Worn_Cloth_Piece',5335);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`dex`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`) VALUES (3015,'HALLOWEEN_DARK_LORD','Halloween Dark Lord','Halloween Dark Lord',1,45,10,13,45,51,14,60,1,10,12,'Large','Demon','Undead',4,100,868,768,480,'01','Fools_Day_Box',800,'Fools_Day_Box2',5335);
# iRO Halloween 2008 Event
# Uncomment if event is enabled.
#REPLACE INTO `mob_db2` VALUES (3000,'ZOMBIE','Zombie','Zombie',15,534,0,50,33,1,67,79,0,10,1,8,7,0,15,0,10,12,1,1,29,0x3885,400,2612,912,288,0,0,0,0,0,0,0,957,9000,724,5,938,1000,958,50,727,70,0,0,0,0,0,0,0,0,4038,1);
#REPLACE INTO `mob_db2` VALUES (3001,'GHOUL','Ghoul','Ghoul',40,5418,0,1088,622,1,420,500,5,20,1,20,29,0,45,20,10,12,1,1,49,0x3885,250,2456,912,504,0,0,0,0,0,0,0,958,6000,756,110,509,700,511,800,2609,60,934,150,1260,1,0,0,0,0,4110,1);
#REPLACE INTO `mob_db2` VALUES (3002,'ZOMBIE_MASTER','Zombie Master','Zombie Master',62,14211,0,7610,2826,1,824,1084,37,26,25,20,30,5,77,35,10,12,1,1,29,0x3695,175,2612,912,288,0,0,0,0,0,0,0,7071,4413,938,1500,958,1500,723,200,727,100,1260,1,2324,2,0,0,0,0,4274,1);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`dex`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop6_nosteal`) VALUES (3000,'ZOMBIE','Zombie','Zombie',15,534,50,33,67,79,10,8,7,15,1,10,12,'Medium','Undead','Undead',1,400,2612,912,288,'04','Decayed_Nail',9000,'Cardinal_Jewel_',5,'Sticky_Mucus',1000,'Horrendous_Mouth',50,'White_Jewel',70,'Zombie_Card',1,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (3001,'GHOUL','Ghoul','Ghoul',40,5418,1088,622,420,500,5,20,20,29,45,20,1,10,12,'Medium','Undead','Undead',2,250,2456,912,504,'04','Horrendous_Mouth',6000,'Oridecon_Stone',110,'White_Herb',700,'Green_Herb',800,'Skul_Ring',60,'Mementos',150,'Ghoul_Leg',1,'Ghoul_Card',1,true);
#REPLACE INTO `mob_db2` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (3002,'ZOMBIE_MASTER','Zombie Master','Zombie Master',62,14211,7610,2826,824,1084,37,26,25,20,30,5,77,35,1,10,12,'Medium','Undead','Undead',1,175,2612,912,288,'21','Tatters_Clothes',4413,'Sticky_Mucus',1500,'Horrendous_Mouth',1500,'Cardinal_Jewel',200,'White_Jewel',100,'Ghoul_Leg',1,'Scapulare_',2,'Zombie_Master_Card',1,true);

View File

@ -4,112 +4,197 @@
DROP TABLE IF EXISTS `mob_db2_re`;
CREATE TABLE `mob_db2_re` (
`ID` mediumint(9) unsigned NOT NULL default '0',
`Sprite` varchar(24) NOT NULL,
`kName` text NOT NULL,
`iName` text NOT NULL,
`LV` tinyint(6) unsigned NOT NULL default '0',
`HP` int(9) unsigned NOT NULL default '0',
`SP` mediumint(9) unsigned NOT NULL default '0',
`EXP` mediumint(9) unsigned NOT NULL default '0',
`JEXP` mediumint(9) unsigned NOT NULL default '0',
`Range1` tinyint(4) unsigned NOT NULL default '0',
`ATK1` smallint(6) unsigned NOT NULL default '0',
`ATK2` smallint(6) unsigned NOT NULL default '0',
`DEF` smallint(6) unsigned NOT NULL default '0',
`MDEF` smallint(6) unsigned NOT NULL default '0',
`STR` smallint(6) unsigned NOT NULL default '0',
`AGI` smallint(6) unsigned NOT NULL default '0',
`VIT` smallint(6) unsigned NOT NULL default '0',
`INT` smallint(6) unsigned NOT NULL default '0',
`DEX` smallint(6) unsigned NOT NULL default '0',
`LUK` smallint(6) unsigned NOT NULL default '0',
`Range2` tinyint(4) unsigned NOT NULL default '0',
`Range3` tinyint(4) unsigned NOT NULL default '0',
`Scale` tinyint(4) unsigned NOT NULL default '0',
`Race` tinyint(4) unsigned NOT NULL default '0',
`Element` tinyint(4) unsigned NOT NULL default '0',
`Mode` int(11) unsigned NOT NULL default '0',
`Speed` smallint(6) unsigned NOT NULL default '0',
`aDelay` smallint(6) unsigned NOT NULL default '0',
`aMotion` smallint(6) unsigned NOT NULL default '0',
`dMotion` smallint(6) unsigned NOT NULL default '0',
`MEXP` mediumint(9) unsigned NOT NULL default '0',
`MVP1id` int(10) unsigned NOT NULL default '0',
`MVP1per` smallint(9) unsigned NOT NULL default '0',
`MVP2id` int(10) unsigned NOT NULL default '0',
`MVP2per` smallint(9) unsigned NOT NULL default '0',
`MVP3id` int(10) unsigned NOT NULL default '0',
`MVP3per` smallint(9) unsigned NOT NULL default '0',
`Drop1id` int(10) unsigned NOT NULL default '0',
`Drop1per` smallint(9) unsigned NOT NULL default '0',
`Drop2id` int(10) unsigned NOT NULL default '0',
`Drop2per` smallint(9) unsigned NOT NULL default '0',
`Drop3id` int(10) unsigned NOT NULL default '0',
`Drop3per` smallint(9) unsigned NOT NULL default '0',
`Drop4id` int(10) unsigned NOT NULL default '0',
`Drop4per` smallint(9) unsigned NOT NULL default '0',
`Drop5id` int(10) unsigned NOT NULL default '0',
`Drop5per` smallint(9) unsigned NOT NULL default '0',
`Drop6id` int(10) unsigned NOT NULL default '0',
`Drop6per` smallint(9) unsigned NOT NULL default '0',
`Drop7id` int(10)unsigned NOT NULL default '0',
`Drop7per` smallint(9) unsigned NOT NULL default '0',
`Drop8id` int(10) unsigned NOT NULL default '0',
`Drop8per` smallint(9) unsigned NOT NULL default '0',
`Drop9id` int(10) unsigned NOT NULL default '0',
`Drop9per` smallint(9) unsigned NOT NULL default '0',
`DropCardid` int(10) unsigned NOT NULL default '0',
`DropCardper` smallint(9) unsigned NOT NULL default '0',
PRIMARY KEY (`ID`),
UNIQUE KEY (`Sprite`)
`id` int(11) unsigned NOT NULL,
`name_aegis` varchar(24) NOT NULL,
`name_english` text NOT NULL,
`name_japanese` text DEFAULT NULL,
`level` smallint(6) unsigned DEFAULT NULL,
`hp` int(11) unsigned DEFAULT NULL,
`sp` mediumint(9) unsigned DEFAULT NULL,
`base_exp` int(11) unsigned DEFAULT NULL,
`job_exp` int(11) unsigned DEFAULT NULL,
`mvp_exp` int(11) unsigned DEFAULT NULL,
`attack` smallint(6) unsigned DEFAULT NULL,
`attack2` smallint(6) unsigned DEFAULT NULL,
`defense` smallint(6) unsigned DEFAULT NULL,
`magic_defense` smallint(6) unsigned DEFAULT NULL,
`str` smallint(6) unsigned DEFAULT NULL,
`agi` smallint(6) unsigned DEFAULT NULL,
`vit` smallint(6) unsigned DEFAULT NULL,
`int` smallint(6) unsigned DEFAULT NULL,
`dex` smallint(6) unsigned DEFAULT NULL,
`luk` smallint(6) unsigned DEFAULT NULL,
`attack_range` tinyint(4) unsigned DEFAULT NULL,
`skill_range` tinyint(4) unsigned DEFAULT NULL,
`chase_range` tinyint(4) unsigned DEFAULT NULL,
`size` varchar(24) DEFAULT NULL,
`race` varchar(24) DEFAULT NULL,
`racegroup_goblin` tinyint(1) unsigned DEFAULT NULL,
`racegroup_kobold` tinyint(1) unsigned DEFAULT NULL,
`racegroup_orc` tinyint(1) unsigned DEFAULT NULL,
`racegroup_golem` tinyint(1) unsigned DEFAULT NULL,
`racegroup_guardian` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ninja` tinyint(1) unsigned DEFAULT NULL,
`racegroup_gvg` tinyint(1) unsigned DEFAULT NULL,
`racegroup_battlefield` tinyint(1) unsigned DEFAULT NULL,
`racegroup_treasure` tinyint(1) unsigned DEFAULT NULL,
`racegroup_biolab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_manuk` tinyint(1) unsigned DEFAULT NULL,
`racegroup_splendide` tinyint(1) unsigned DEFAULT NULL,
`racegroup_scaraba` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_atk_def` tinyint(1) unsigned DEFAULT NULL,
`racegroup_ogh_hidden` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_swordman_thief` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_acolyte_merchant` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mage_archer` tinyint(1) unsigned DEFAULT NULL,
`racegroup_bio5_mvp` tinyint(1) unsigned DEFAULT NULL,
`racegroup_clocktower` tinyint(1) unsigned DEFAULT NULL,
`racegroup_thanatos` tinyint(1) unsigned DEFAULT NULL,
`racegroup_faceworm` tinyint(1) unsigned DEFAULT NULL,
`racegroup_hearthunter` tinyint(1) unsigned DEFAULT NULL,
`racegroup_rockridge` tinyint(1) unsigned DEFAULT NULL,
`racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL,
`racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL,
`racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL,
`element` varchar(24) DEFAULT NULL,
`element_level` tinyint(4) unsigned DEFAULT NULL,
`walk_speed` smallint(6) unsigned DEFAULT NULL,
`attack_delay` smallint(6) unsigned DEFAULT NULL,
`attack_motion` smallint(6) unsigned DEFAULT NULL,
`damage_motion` smallint(6) unsigned DEFAULT NULL,
`ai` varchar(2) DEFAULT NULL,
`class` varchar(50) DEFAULT NULL,
`mode_canmove` tinyint(1) unsigned DEFAULT NULL,
`mode_looter` tinyint(1) unsigned DEFAULT NULL,
`mode_aggressive` tinyint(1) unsigned DEFAULT NULL,
`mode_assist` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensoridle` tinyint(1) unsigned DEFAULT NULL,
`mode_norandomwalk` tinyint(1) unsigned DEFAULT NULL,
`mode_nocast` tinyint(1) unsigned DEFAULT NULL,
`mode_canattack` tinyint(1) unsigned DEFAULT NULL,
`mode_castsensorchase` tinyint(1) unsigned DEFAULT NULL,
`mode_changechase` tinyint(1) unsigned DEFAULT NULL,
`mode_angry` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetmelee` tinyint(1) unsigned DEFAULT NULL,
`mode_changetargetchase` tinyint(1) unsigned DEFAULT NULL,
`mode_targetweak` tinyint(1) unsigned DEFAULT NULL,
`mode_randomtarget` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremelee` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremagic` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoreranged` tinyint(1) unsigned DEFAULT NULL,
`mode_mvp` tinyint(1) unsigned DEFAULT NULL,
`mode_ignoremisc` tinyint(1) unsigned DEFAULT NULL,
`mode_knockbackimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_teleportblock` tinyint(1) unsigned DEFAULT NULL,
`mode_fixeditemdrop` tinyint(1) unsigned DEFAULT NULL,
`mode_detector` tinyint(1) unsigned DEFAULT NULL,
`mode_statusimmune` tinyint(1) unsigned DEFAULT NULL,
`mode_skillimmune` tinyint(1) unsigned DEFAULT NULL,
`mvpdrop1_item` varchar(50) DEFAULT NULL,
`mvpdrop1_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop1_option` varchar(50) DEFAULT NULL,
`mvpdrop1_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop2_item` varchar(50) DEFAULT NULL,
`mvpdrop2_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop2_option` varchar(50) DEFAULT NULL,
`mvpdrop2_index` tinyint(2) unsigned DEFAULT NULL,
`mvpdrop3_item` varchar(50) DEFAULT NULL,
`mvpdrop3_rate` smallint(9) unsigned DEFAULT NULL,
`mvpdrop3_option` varchar(50) DEFAULT NULL,
`mvpdrop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop1_item` varchar(50) DEFAULT NULL,
`drop1_rate` smallint(9) unsigned DEFAULT NULL,
`drop1_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop1_option` varchar(50) DEFAULT NULL,
`drop1_index` tinyint(2) unsigned DEFAULT NULL,
`drop2_item` varchar(50) DEFAULT NULL,
`drop2_rate` smallint(9) unsigned DEFAULT NULL,
`drop2_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop2_option` varchar(50) DEFAULT NULL,
`drop2_index` tinyint(2) unsigned DEFAULT NULL,
`drop3_item` varchar(50) DEFAULT NULL,
`drop3_rate` smallint(9) unsigned DEFAULT NULL,
`drop3_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop3_option` varchar(50) DEFAULT NULL,
`drop3_index` tinyint(2) unsigned DEFAULT NULL,
`drop4_item` varchar(50) DEFAULT NULL,
`drop4_rate` smallint(9) unsigned DEFAULT NULL,
`drop4_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop4_option` varchar(50) DEFAULT NULL,
`drop4_index` tinyint(2) unsigned DEFAULT NULL,
`drop5_item` varchar(50) DEFAULT NULL,
`drop5_rate` smallint(9) unsigned DEFAULT NULL,
`drop5_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop5_option` varchar(50) DEFAULT NULL,
`drop5_index` tinyint(2) unsigned DEFAULT NULL,
`drop6_item` varchar(50) DEFAULT NULL,
`drop6_rate` smallint(9) unsigned DEFAULT NULL,
`drop6_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop6_option` varchar(50) DEFAULT NULL,
`drop6_index` tinyint(2) unsigned DEFAULT NULL,
`drop7_item` varchar(50) DEFAULT NULL,
`drop7_rate` smallint(9) unsigned DEFAULT NULL,
`drop7_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop7_option` varchar(50) DEFAULT NULL,
`drop7_index` tinyint(2) unsigned DEFAULT NULL,
`drop8_item` varchar(50) DEFAULT NULL,
`drop8_rate` smallint(9) unsigned DEFAULT NULL,
`drop8_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop8_option` varchar(50) DEFAULT NULL,
`drop8_index` tinyint(2) unsigned DEFAULT NULL,
`drop9_item` varchar(50) DEFAULT NULL,
`drop9_rate` smallint(9) unsigned DEFAULT NULL,
`drop9_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop9_option` varchar(50) DEFAULT NULL,
`drop9_index` tinyint(2) unsigned DEFAULT NULL,
`drop10_item` varchar(50) DEFAULT NULL,
`drop10_rate` smallint(9) unsigned DEFAULT NULL,
`drop10_nosteal` tinyint(1) unsigned DEFAULT NULL,
`drop10_option` varchar(50) DEFAULT NULL,
`drop10_index` tinyint(2) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`name_aegis`)
) ENGINE=MyISAM;
# Monsters Additional Database
#
# Structure of Database :
#REPLACE INTO `mob_db2_re` VALUES ( ID,'Sprite_Name','kROName','iROName',LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper);
# rAthena Dev Team
#REPLACE INTO `mob_db2_re` VALUES (1900,'VALARIS','Valaris','Valaris',99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1);
#REPLACE INTO `mob_db2_re` VALUES (1901,'VALARIS_WORSHIPPER','Valaris\'s Worshipper','Valaris\'s Worshipper',50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,0x1685,100,868,480,120,0,0,0,0,0,0,0,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,0,0,0,0,4129,1);
#REPLACE INTO `mob_db2_re` VALUES (1902,'MC_CAMERI','MC Cameri','MC Cameri',99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1);
#REPLACE INTO `mob_db2_re` VALUES (1903,'POKI','Poki#3','Poki#3',99,1349000,0,4093000,1526000,9,4892,9113,22,35,1,180,39,67,193,130,10,12,1,7,64,0x1973,120,500,672,480,92100,603,5500,617,3000,1723,1000,1228,100,1236,500,617,2500,1234,75,1237,125,1722,250,1724,100,1720,50,0,0,0,0);
#REPLACE INTO `mob_db2_re` VALUES (1904,'SENTRY','Sentry','Sentry',99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`mvp_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_looter`,`mode_castsensoridle`,`mode_norandomwalk`,`mode_nocast`,`mode_angry`,`mode_changetargetmelee`,`mvpdrop1_item`,`mvpdrop1_rate`,`mvpdrop2_item`,`mvpdrop2_rate`,`mvpdrop3_item`,`mvpdrop3_rate`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1900,'VALARIS','Valaris','Valaris',99,668000,107250,37895,13000,3220,4040,35,45,152,96,85,120,95,2,10,10,'Large','Demon','Dark',3,100,1068,768,576,'25',true,true,true,true,true,true,'Seed_Of_Yggdrasil',1000,'Baphomet_Doll',400,'Evil_Horn',3800,'Crescent_Scythe',200,'Magestic_Goat',200,'Clip',800,'Emperium',500,'Old_Violet_Box',3000,'Oridecon',4300,'Elunium',5600,'Baphomet_Card',1,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_canmove`,`mode_castsensorchase`,`mode_changechase`,`mode_changetargetmelee`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1901,'VALARIS_WORSHIPPER','Valaris\'s Worshipper','Valaris\'s Worshipper',50,8578,2706,1480,487,590,15,25,75,55,93,45,1,10,12,'Small','Demon','Dark',1,100,868,480,120,'10',true,true,true,true,'Evil_Horn',500,'Oridecon',63,'Halberd_',2,'Yggdrasilberry',50,'Leaf_Of_Yggdrasil',100,'Yellow_Potion',300,'Boots',50,'Baphomet__Card',1,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`mvp_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_looter`,`mode_castsensoridle`,`mode_norandomwalk`,`mode_nocast`,`mode_angry`,`mode_changetargetmelee`,`mvpdrop1_item`,`mvpdrop1_rate`,`mvpdrop2_item`,`mvpdrop2_rate`,`mvpdrop3_item`,`mvpdrop3_rate`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1902,'MC_CAMERI','MC Cameri','MC Cameri',99,668000,107250,37895,13000,3220,4040,35,45,152,96,85,120,95,2,10,10,'Large','Demon','Dark',3,100,1068,768,576,'25',true,true,true,true,true,true,'Seed_Of_Yggdrasil',1000,'Baphomet_Doll',400,'Evil_Horn',3800,'Crescent_Scythe',200,'Magestic_Goat',200,'Clip',800,'Emperium',500,'Old_Violet_Box',3000,'Oridecon',4300,'Elunium',5600,'Baphomet_Card',1,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`mvp_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_looter`,`mode_castsensoridle`,`mode_norandomwalk`,`mode_nocast`,`mode_angry`,`mode_changetargetmelee`,`mvpdrop1_item`,`mvpdrop1_rate`,`mvpdrop2_item`,`mvpdrop2_rate`,`mvpdrop3_item`,`mvpdrop3_rate`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1903,'POKI','Poki#3','Poki#3',99,1349000,4093000,1526000,92100,4892,9113,22,35,180,39,67,193,130,9,10,12,'Medium','Demihuman','Wind',3,120,500,672,480,'25',true,true,true,true,true,true,'Old_Blue_Box',5500,'Old_Violet_Box',3000,'Luna_Bow',1000,'Combat_Knife',100,'Sucsamad',500,'Old_Violet_Box',2500,'Moonlight_Sword',75,'Grimtooth_',125,'Balistar',250,'Dragon_Wing',100,'Bow_Of_Rudra',50,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`mvp_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_looter`,`mode_castsensoridle`,`mode_norandomwalk`,`mode_nocast`,`mode_angry`,`mode_changetargetmelee`,`mvpdrop1_item`,`mvpdrop1_rate`,`mvpdrop2_item`,`mvpdrop2_rate`,`mvpdrop3_item`,`mvpdrop3_rate`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1904,'SENTRY','Sentry','Sentry',99,668000,107250,37895,13000,3220,4040,35,45,152,96,85,120,95,2,10,10,'Large','Demon','Dark',3,100,1068,768,576,'25',true,true,true,true,true,true,'Seed_Of_Yggdrasil',1000,'Baphomet_Doll',400,'Evil_Horn',3800,'Crescent_Scythe',200,'Magestic_Goat',200,'Clip',800,'Emperium',500,'Old_Violet_Box',3000,'Oridecon',4300,'Elunium',5600,'Baphomet_Card',1,true);
# Custom Hollow Poring (overrrides/collides with META_ANDRE)
#REPLACE INTO `mob_db2_re` VALUES (1237,'HOLLOW_PORING','Hollow Poring','Hollow Poring',1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,512,150,619,20,0,0,0,0,4001,10);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1237,'HOLLOW_PORING','Hollow Poring','Hollow Poring',1,50,2,1,7,10,5,6,30,1,10,12,'Medium','Plant','Water',1,400,1872,672,480,'02','Jellopy',7000,'Knife_',100,'Sticky_Mucus',400,'Apple',1000,'Empty_Bottle',1500,'Apple',150,'Unripe_Apple',20,'Poring_Card',10,true);
# Custom Fire Poring. Warning, Colides with META_DENIRO
#REPLACE INTO `mob_db2_re` VALUES (1239,'FIRE_PORING','Fire Poring','Fire Poring',1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x131,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_castsensoridle`,`mode_norandomwalk`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1239,'FIRE_PORING','Fire Poring','Fire Poring',1,50,2,1,7,10,5,6,30,1,10,12,'Medium','Plant','Water',1,400,1872,672,480,'25',true,true,'Jellopy',7000,'Knife_',100,'Sticky_Mucus',400,'Apple',1000,'Empty_Bottle',1500,'Poring_Doll',5,'Unripe_Apple',20,'Poring_Card',20,true);
# Lunar New Year 2008 Event Monster overrides
# Uncomment if event is enabled, as these drops modifications are nessecary.
#REPLACE INTO `mob_db2_re` VALUES (1145,'MARTIN','Martin','Martin',18,1109,0,134,86,1,52,63,0,5,12,18,30,15,15,5,10,12,0,2,42,0x81,300,1480,480,480,0,0,0,0,0,0,0,1017,9000,1018,500,1251,10,2225,5,5009,1,10010,10,2224,15,7869,1500,0,0,4046,1);
#REPLACE INTO `mob_db2_re` VALUES (1175,'TAROU','Tarou','Tarou',11,284,0,57,28,1,34,45,0,0,1,20,11,10,24,5,10,12,0,2,27,0x91,150,1744,1044,684,0,0,0,0,0,0,0,1016,9000,919,3000,949,800,528,1000,701,2,7869,2500,0,0,0,0,0,0,4028,1);
#REPLACE INTO `mob_db2_re` VALUES (1209,'CRAMP','Cramp','Cramp',56,4720,0,2300,1513,1,395,465,0,5,1,85,35,5,65,60,10,12,0,2,45,0x3095,100,1000,500,1000,0,0,0,0,0,0,0,7007,4656,528,1000,726,80,746,110,568,250,510,70,984,95,7869,1500,0,0,4296,1);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`,`drop9_item`,`drop9_rate`,`drop9_nosteal`) VALUES (1145,'MARTIN','Martin','Martin',18,1109,134,86,52,63,5,12,18,30,15,15,5,1,10,12,'Small','Brute','Earth',2,300,1480,480,480,'01','Moustache_Of_Mole',9000,'Nail_Of_Mole',500,'Jur_',10,'Goggle_',5,'Safety_Helmet',1,'Battered_Pot',10,'Goggle',15,'RicePouch',1500,true,'Martin_Card',1,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop7_nosteal`) VALUES (1175,'TAROU','Tarou','Tarou',11,284,57,28,34,45,20,11,10,24,5,1,10,12,'Small','Brute','Dark',1,150,1744,1044,684,'17','Rat_Tail',9000,'Animal\'s_Skin',3000,'Feather',800,'Monster\'s_Feed',1000,'Ora_Ora',2,'RicePouch',2500,'Tarou_Card',1,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`,`drop9_item`,`drop9_rate`,`drop9_nosteal`) VALUES (1209,'CRAMP','Cramp','Cramp',56,4720,2300,1513,395,465,5,85,35,5,65,60,1,10,12,'Small','Brute','Poison',2,100,1000,500,1000,'09','Claw_Of_Rat',4656,'Monster\'s_Feed',1000,'Blue_Jewel',80,'Glass_Bead',110,'Lemon',250,'Blue_Herb',70,'Oridecon',95,'RicePouch',1500,true,'Cramp_Card',1,true);
# iRO St. Patricks Day 2008 Event Monster overrides
# Uncomment if event is enabled, as these drops modifications are nessecary.
#REPLACE INTO `mob_db2_re` VALUES (1841,'G_SNAKE_','Snake Lord\'s Minon','Snake Lord\'s Minon',15,471,0,72,48,1,46,55,0,0,1,15,15,10,35,5,10,12,1,2,22,0x81,200,1576,576,576,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,7,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2_re` VALUES (1842,'G_ANACONDAQ_','Snake Lord\'s Minon','Snake Lord\'s Minon',23,1109,0,300,149,1,124,157,0,0,1,23,28,10,36,5,10,12,1,2,25,0x91,200,1576,576,576,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,7,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2_re` VALUES (1843,'SIDE_WINDER_','Snake Lord\'s Minon','Snake Lord\'s Minon',43,4929,0,1996,993,1,240,320,5,10,38,43,40,15,115,20,10,12,1,2,25,0x3095,200,1576,576,576,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,7,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2_re` VALUES (1844,'G_ISIS_','Snake Lord\'s Minon','Snake Lord\'s Minon',47,7003,0,3709,1550,1,423,507,10,35,38,65,43,50,66,15,10,12,2,6,27,0x3195,200,1384,768,336,0,0,0,0,0,0,0,7915,1000,7916,100,7720,30,12715,8,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`) VALUES (1841,'G_SNAKE_','Snake Lord\'s Minon','Snake Lord\'s Minon',15,471,72,48,46,55,15,15,10,35,5,1,10,12,'Medium','Brute','Earth',1,200,1576,576,576,'01','Copper_Coin_',1000,'Silver_Coin_',100,'Gold_Coin_US',30,'Black_Treasure_Box',7);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`) VALUES (1842,'G_ANACONDAQ_','Snake Lord\'s Minon','Snake Lord\'s Minon',23,1109,300,149,124,157,23,28,10,36,5,1,10,12,'Medium','Brute','Poison',1,200,1576,576,576,'17','Copper_Coin_',1000,'Silver_Coin_',100,'Gold_Coin_US',30,'Black_Treasure_Box',7);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`) VALUES (1843,'SIDE_WINDER_','Snake Lord\'s Minon','Snake Lord\'s Minon',43,4929,1996,993,240,320,5,10,38,43,40,15,115,20,1,10,12,'Medium','Brute','Poison',1,200,1576,576,576,'09','Copper_Coin_',1000,'Silver_Coin_',100,'Gold_Coin_US',30,'Black_Treasure_Box',7);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`) VALUES (1844,'G_ISIS_','Snake Lord\'s Minon','Snake Lord\'s Minon',47,7003,3709,1550,423,507,10,35,38,65,43,50,66,15,1,10,12,'Large','Demon','Dark',1,200,1384,768,336,'09','Copper_Coin_',1000,'Silver_Coin_',100,'Gold_Coin_US',30,'Black_Treasure_Box',8);
# iRO Christmas 2008 Event
# Uncomment if event is enabled, as these drops modifications are nessecary.
#REPLACE INTO `mob_db2_re` VALUES (1244,'JAKK_XMAS','Christmas Jakk','Christmas Jakk',38,3581,0,1113,688,1,315,382,5,30,1,38,38,43,75,45,10,12,1,0,43,0x81,200,1180,480,648,0,0,0,0,0,0,0,529,1000,530,1000,14546,1000,14550,1000,7174,1000,7175,1000,6092,1000,12355,1250,0,0,0,0);
#REPLACE INTO `mob_db2_re` VALUES (1245,'GOBLINE_XMAS','Christmas Goblin','Christmas Goblin',25,1176,0,282,171,1,118,140,10,5,1,53,25,20,38,45,10,12,1,7,24,0x81,100,1120,620,240,0,0,0,0,0,0,0,529,1000,530,1000,14546,1000,14550,1000,7174,1000,7175,1000,6092,1000,12355,1250,0,0,0,0);
#REPLACE INTO `mob_db2_re` VALUES (1246,'COOKIE_XMAS','Christmas Cookie','Christmas Cookie',28,2090,0,461,284,1,140,170,0,50,1,24,30,53,45,100,10,12,0,7,46,0x91,400,1248,1248,240,0,0,0,0,0,0,0,529,1000,530,1000,14546,1000,14550,1000,7174,1000,7175,1000,6092,1000,12355,1250,0,0,0,0);
#REPLACE INTO `mob_db2_re` VALUES (1247,'ANTONIO','Antonio','Antonio',10,10,0,3,2,1,13,20,100,0,1,1,1,50,100,100,10,12,1,3,66,0xC1,100,720,720,432,0,0,0,0,0,0,0,604,500,12354,500,14550,500,5136,500,12132,500,12225,500,5811,500,0,0,0,0,4243,1);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1244,'JAKK_XMAS','Christmas Jakk','Christmas Jakk',38,3581,1113,688,315,382,5,30,38,38,43,75,45,1,10,12,'Medium','Formless','Fire',2,200,1180,480,648,'01','Candy',1000,'Candy_Striper',1000,'Fire_Cracker_Love',1000,'Fire_Cracker_Xmas',1000,'Packing_Ribbon',1000,'Packing_Paper',1000,'Singing_Crystal_Piece',1000,'Xmas_Gift',1250,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1245,'GOBLINE_XMAS','Christmas Goblin','Christmas Goblin',25,1176,282,171,118,140,10,5,53,25,20,38,45,1,10,12,'Medium','Demihuman','Wind',1,100,1120,620,240,'01','Candy',1000,'Candy_Striper',1000,'Fire_Cracker_Love',1000,'Fire_Cracker_Xmas',1000,'Packing_Ribbon',1000,'Packing_Paper',1000,'Singing_Crystal_Piece',1000,'Xmas_Gift',1250,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1246,'COOKIE_XMAS','Christmas Cookie','Christmas Cookie',28,2090,461,284,140,170,50,24,30,53,45,100,1,10,12,'Small','Demihuman','Holy',2,400,1248,1248,240,'17','Candy',1000,'Candy_Striper',1000,'Fire_Cracker_Love',1000,'Fire_Cracker_Xmas',1000,'Packing_Ribbon',1000,'Packing_Paper',1000,'Singing_Crystal_Piece',1000,'Xmas_Gift',1250,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`mode_nocast`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (1247,'ANTONIO','Antonio','Antonio',10,10,3,2,13,20,100,50,100,100,1,10,12,'Medium','Plant','Holy',3,100,720,720,432,'01',true,'Branch_Of_Dead_Tree',500,'Buche_De_Noel',500,'Fire_Cracker_Xmas',500,'Santa\'s_Hat_',500,'Red_Bag',500,'Sweet_Candy_Striper',500,'Santa_Beard',500,'Antonio_Card',1,true);
# iRO Halloween 2009 Event
# Uncomment if event is enabled. Uncomment the skills for Halloween Whisper in mob_skill_db2.
#REPLACE INTO `mob_db2_re` VALUES (3014,'HALLOWEEN_WHISPER','Halloween Whisper','Halloween Whisper',1,800,0,0,0,1,10,13,0,45,1,51,14,0,60,0,10,12,0,6,68,0x81,150,1960,960,504,0,0,0,0,0,0,0,12396,150,6299,5335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2_re` VALUES (3015,'HALLOWEEN_DARK_LORD','Halloween Dark Lord','Halloween Dark Lord',1,45,0,0,0,1,10,13,0,45,1,51,14,0,60,0,10,12,2,6,89,0x81,100,868,768,480,0,0,0,0,0,0,0,12396,800,12397,5335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`dex`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`) VALUES (3014,'HALLOWEEN_WHISPER','Halloween Whisper','Halloween Whisper',1,800,10,13,45,51,14,60,1,10,12,'Small','Demon','Ghost',3,150,1960,960,504,'01','Fools_Day_Box',150,'Worn_Cloth_Piece',5335);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`dex`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`) VALUES (3015,'HALLOWEEN_DARK_LORD','Halloween Dark Lord','Halloween Dark Lord',1,45,10,13,45,51,14,60,1,10,12,'Large','Demon','Undead',4,100,868,768,480,'01','Fools_Day_Box',800,'Fools_Day_Box2',5335);
# iRO Halloween 2008 Event
# Uncomment if event is enabled.
#REPLACE INTO `mob_db2_re` VALUES (3000,'ZOMBIE','Zombie','Zombie',15,534,0,50,33,1,67,79,0,10,1,8,7,0,15,0,10,12,1,1,29,0x3885,400,2612,912,288,0,0,0,0,0,0,0,957,9000,724,5,938,1000,958,50,727,70,0,0,0,0,0,0,0,0,4038,1);
#REPLACE INTO `mob_db2_re` VALUES (3001,'GHOUL','Ghoul','Ghoul',40,5418,0,1088,622,1,420,500,5,20,1,20,29,0,45,20,10,12,1,1,49,0x3885,250,2456,912,504,0,0,0,0,0,0,0,958,6000,756,110,509,700,511,800,2609,60,934,150,1260,1,0,0,0,0,4110,1);
#REPLACE INTO `mob_db2_re` VALUES (3002,'ZOMBIE_MASTER','Zombie Master','Zombie Master',62,14211,0,7610,2826,1,824,1084,37,26,25,20,30,5,77,35,10,12,1,1,29,0x3695,175,2612,912,288,0,0,0,0,0,0,0,7071,4413,938,1500,958,1500,723,200,727,100,1260,1,2324,2,0,0,0,0,4274,1);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`magic_defense`,`agi`,`vit`,`dex`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop6_nosteal`) VALUES (3000,'ZOMBIE','Zombie','Zombie',15,534,50,33,67,79,10,8,7,15,1,10,12,'Medium','Undead','Undead',1,400,2612,912,288,'04','Decayed_Nail',9000,'Cardinal_Jewel_',5,'Sticky_Mucus',1000,'Horrendous_Mouth',50,'White_Jewel',70,'Zombie_Card',1,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`agi`,`vit`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (3001,'GHOUL','Ghoul','Ghoul',40,5418,1088,622,420,500,5,20,20,29,45,20,1,10,12,'Medium','Undead','Undead',2,250,2456,912,504,'04','Horrendous_Mouth',6000,'Oridecon_Stone',110,'White_Herb',700,'Green_Herb',800,'Skul_Ring',60,'Mementos',150,'Ghoul_Leg',1,'Ghoul_Card',1,true);
#REPLACE INTO `mob_db2_re` (`id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`base_exp`,`job_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`,`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`ai`,`drop1_item`,`drop1_rate`,`drop2_item`,`drop2_rate`,`drop3_item`,`drop3_rate`,`drop4_item`,`drop4_rate`,`drop5_item`,`drop5_rate`,`drop6_item`,`drop6_rate`,`drop7_item`,`drop7_rate`,`drop8_item`,`drop8_rate`,`drop8_nosteal`) VALUES (3002,'ZOMBIE_MASTER','Zombie Master','Zombie Master',62,14211,7610,2826,824,1084,37,26,25,20,30,5,77,35,1,10,12,'Medium','Undead','Undead',1,175,2612,912,288,'21','Tatters_Clothes',4413,'Sticky_Mucus',1500,'Horrendous_Mouth',1500,'Cardinal_Jewel',200,'White_Jewel',100,'Ghoul_Leg',1,'Scapulare_',2,'Zombie_Master_Card',1,true);

File diff suppressed because it is too large Load Diff

View File

@ -129,6 +129,10 @@ public:
return rathena::util::umap_random( this->data );
}
void erase(keytype key) {
this->data.erase(key);
}
};
template <typename keytype, typename datatype> class TypesafeCachedYamlDatabase : public TypesafeYamlDatabase<keytype, datatype>{

View File

@ -196,16 +196,16 @@ enum e_mode {
MD_LOOTER = 0x0000002,
MD_AGGRESSIVE = 0x0000004,
MD_ASSIST = 0x0000008,
MD_CASTSENSOR_IDLE = 0x0000010,
MD_NORANDOM_WALK = 0x0000020,
MD_NOCAST_SKILL = 0x0000040,
MD_CASTSENSORIDLE = 0x0000010,
MD_NORANDOMWALK = 0x0000020,
MD_NOCAST = 0x0000040,
MD_CANATTACK = 0x0000080,
//FREE = 0x0000100,
MD_CASTSENSOR_CHASE = 0x0000200,
MD_CASTSENSORCHASE = 0x0000200,
MD_CHANGECHASE = 0x0000400,
MD_ANGRY = 0x0000800,
MD_CHANGETARGET_MELEE = 0x0001000,
MD_CHANGETARGET_CHASE = 0x0002000,
MD_CHANGETARGETMELEE = 0x0001000,
MD_CHANGETARGETCHASE = 0x0002000,
MD_TARGETWEAK = 0x0004000,
MD_RANDOMTARGET = 0x0008000,
MD_IGNOREMELEE = 0x0010000,
@ -213,13 +213,13 @@ enum e_mode {
MD_IGNORERANGED = 0x0040000,
MD_MVP = 0x0080000,
MD_IGNOREMISC = 0x0100000,
MD_KNOCKBACK_IMMUNE = 0x0200000,
MD_TELEPORT_BLOCK = 0x0400000,
MD_KNOCKBACKIMMUNE = 0x0200000,
MD_TELEPORTBLOCK = 0x0400000,
//FREE = 0x0800000,
MD_FIXED_ITEMDROP = 0x1000000,
MD_FIXEDITEMDROP = 0x1000000,
MD_DETECTOR = 0x2000000,
MD_STATUS_IMMUNE = 0x4000000,
MD_SKILL_IMMUNE = 0x8000000,
MD_STATUSIMMUNE = 0x4000000,
MD_SKILLIMMUNE = 0x8000000,
};
#define MD_MASK 0x000FFFF

View File

@ -170,7 +170,7 @@ namespace rathena {
* @param value: Value wanted
* @return True on success or false on failure
*/
template <typename K, typename V> bool vector_exists(std::vector<K> &vec, V value) {
template <typename K, typename V> bool vector_exists(const std::vector<K> &vec, V value) {
auto it = std::find(vec.begin(), vec.end(), value);
if (it != vec.end())

View File

@ -25,6 +25,7 @@
#include "intif.hpp"
#include "itemdb.hpp"
#include "map.hpp"
#include "mob.hpp"
#include "npc.hpp"
#include "pc.hpp"
#include "script.hpp"
@ -156,7 +157,7 @@ uint64 AchievementDatabase::parseBodyNode(const YAML::Node &node){
return 0;
}
if( mob_db( mob_id ) == nullptr ){
if( mob_db.find( mob_id ) == nullptr ){
this->invalidWarning( targetNode["MobID"], "Unknown monster ID %d, skipping.\n", mob_id );
return 0;
}

View File

@ -2852,18 +2852,29 @@ ACMD_FUNC(makeegg) {
pet = pet_db_search( nameid, PET_EGG );
}
int res(-1);
if (pet != nullptr) {
sd->catch_target_class = pet->class_;
struct mob_db* mdb = mob_db(pet->class_);
intif_create_pet(sd->status.account_id, sd->status.char_id, pet->class_, mdb->lv, pet->EggID, 0, pet->intimate, 100, 0, 1, mdb->jname);
} else {
clif_displaymessage(fd, msg_txt(sd,180)); // The monster/egg name/id doesn't exist.
return -1;
std::shared_ptr<s_mob_db> mdb = mob_db.find(pet->class_);
if(mdb){
sd->catch_target_class = pet->class_;
if(intif_create_pet(sd->status.account_id, sd->status.char_id, pet->class_, mdb->lv, pet->EggID, 0, pet->intimate, 100, 0, 1, mdb->jname.c_str())){
res = 0;
} else {
res = -2; //char server down
}
}
}
switch(res){
case -1:
clif_displaymessage(fd, msg_txt(sd,180)); // The monster/egg name/id doesn't exist.
break;
case -2:
clif_displaymessage(fd, msg_txt(sd,407)); //charserver link broken
break;
}
return 0;
return res;
}
/*==========================================
@ -6712,32 +6723,35 @@ ACMD_FUNC(sound)
*------------------------------------------*/
ACMD_FUNC(mobsearch)
{
char mob_name[100];
int mob_id;
int number = 0;
struct s_mapiterator* it;
nullpo_retr(-1, sd);
char mob_name[100]={0};
if (!message || !*message || sscanf(message, "%99[^\n]", mob_name) < 1) {
clif_displaymessage(fd, msg_txt(sd,1218)); // Please enter a monster name (usage: @mobsearch <monster name>).
return -1;
}
if ((mob_id = atoi(mob_name)) == 0)
int mob_id = strtol(mob_name, nullptr, 10);
if (mob_id == 0)
mob_id = mobdb_searchname(mob_name);
if( mobdb_checkid(mob_id) == 0){
std::shared_ptr<s_mob_db> mob = mob_db.find(mob_id);
if (mob == nullptr || mobdb_checkid(mob_id) == 0) {
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd,1219),mob_name); // Invalid mob ID %s!
clif_displaymessage(fd, atcmd_output);
return -1;
}
strcpy(mob_name,mob_db(mob_id)->jname); // --ja--
// strcpy(mob_name,mob_db(mob_id)->name); // --en--
strcpy(mob_name, mob->jname.c_str()); // --ja--
// strcpy(mob_name, mob->name.c_str()); // --en--
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd,1220), mob_name, mapindex_id2name(sd->mapindex)); // Mob Search... %s %s
clif_displaymessage(fd, atcmd_output);
it = mapit_geteachmob();
s_mapiterator* it = mapit_geteachmob();
int number = 0;
for(;;)
{
TBL_MOB* md = (TBL_MOB*)mapit_next(it);
@ -7362,7 +7376,6 @@ ACMD_FUNC(mobinfo)
unsigned char melement[ELE_ALL][8] = { "Neutral", "Water", "Earth", "Fire", "Wind", "Poison", "Holy", "Dark", "Ghost", "Undead" };
char atcmd_output2[CHAT_SIZE_MAX];
struct item_data *item_data;
struct mob_db *mob;
uint16 mob_ids[MAX_SEARCH];
int count;
int i, k;
@ -7394,7 +7407,11 @@ ACMD_FUNC(mobinfo)
count = MAX_SEARCH;
}
for (k = 0; k < count; k++) {
mob = mob_db(mob_ids[k]);
std::shared_ptr<s_mob_db> mob = mob_db.find(mob_ids[k]);
if (mob == nullptr)
continue;
t_exp base_exp = mob->base_exp;
t_exp job_exp = mob->job_exp;
@ -7412,9 +7429,9 @@ ACMD_FUNC(mobinfo)
#endif
// stats
if( mob->get_bosstype() == BOSSTYPE_MVP )
sprintf(atcmd_output, msg_txt(sd,1240), mob->name, mob->jname, mob->sprite, mob->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d)
sprintf(atcmd_output, msg_txt(sd,1240), mob->name.c_str(), mob->jname.c_str(), mob->sprite.c_str(), mob->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d)
else
sprintf(atcmd_output, msg_txt(sd,1241), mob->name, mob->jname, mob->sprite, mob->vd.class_); // Monster: '%s'/'%s'/'%s' (%d)
sprintf(atcmd_output, msg_txt(sd,1241), mob->name.c_str(), mob->jname.c_str(), mob->sprite.c_str(), mob->vd.class_); // Monster: '%s'/'%s'/'%s' (%d)
clif_displaymessage(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(sd,1242), mob->lv, mob->status.max_hp, base_exp, job_exp, MOB_HIT(mob), MOB_FLEE(mob)); // Lv:%d HP:%d Base EXP:%llu Job EXP:%llu HIT:%d FLEE:%d
clif_displaymessage(fd, atcmd_output);
@ -7522,22 +7539,25 @@ ACMD_FUNC(showmobs)
if(sscanf(message, "%99[^\n]", mob_name) < 0)
return -1;
if((mob_id = atoi(mob_name)) == 0)
if((mob_id = strtol(mob_name, nullptr, 10)) == 0)
mob_id = mobdb_searchname(mob_name);
if(mobdb_checkid(mob_id) == 0){
std::shared_ptr<s_mob_db> mob = mob_db.find(mob_id);
if (mob == nullptr || mobdb_checkid(mob_id) == 0) {
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd,1250),mob_name); // Invalid mob id %s!
clif_displaymessage(fd, atcmd_output);
return 0;
}
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.
if(status_has_mode(&mob->status,MD_STATUSIMMUNE) && !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;
}
if(mob_id == atoi(mob_name) && mob_db(mob_id)->jname[0])
strcpy(mob_name,mob_db(mob_id)->jname); // --ja--
//strcpy(mob_name,mob_db(mob_id)->name); // --en--
if(mob_id == strtol(mob_name, nullptr, 10) && !mob->jname.empty())
strcpy(mob_name, mob->jname.c_str()); // --ja--
//strcpy(mob_name, mob->name.c_str()); // --en--
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd,1252), // Mob Search... %s %s
mob_name, mapindex_id2name(sd->mapindex));
@ -7980,14 +8000,16 @@ ACMD_FUNC(whodrops)
for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++)
{
int dropchance = item_data->mob[j].chance;
std::shared_ptr<s_mob_db> mob = mob_db.find(item_data->mob[j].id);
if(!mob) continue;
#ifdef RENEWAL_DROP
if( battle_config.atcommand_mobinfo_type )
dropchance = dropchance * pc_level_penalty_mod( sd, PENALTY_DROP, mob_db( item_data->mob[j].id ) ) / 100;
dropchance = dropchance * pc_level_penalty_mod( sd, PENALTY_DROP, mob ) / 100;
#endif
if (pc_isvip(sd)) // Display item rate increase for VIP
dropchance += (dropchance * battle_config.vip_drop_increase) / 100;
sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.);
sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob->jname.c_str(), item_data->mob[j].id, dropchance/100.);
clif_displaymessage(fd, atcmd_output);
}
}
@ -8028,9 +8050,10 @@ ACMD_FUNC(whereis)
for (int i = 0; i < count; i++) {
uint16 mob_id = mob_ids[i];
struct mob_db * mob = mob_db(mob_id);
std::shared_ptr<s_mob_db> mob = mob_db.find(mob_id);
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd,1289), mob->jname); // %s spawns in:
if(!mob) continue;
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd,1289), mob->jname.c_str()); // %s spawns in:
clif_displaymessage(fd, atcmd_output);
const std::vector<spawn_info> spawns = mob_get_spawns(mob_id);

View File

@ -646,7 +646,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
short cardfix = 1000;
int s_class, ///< Attacker class
t_class; ///< Target class
enum e_race2 s_race2, /// Attacker Race2
std::vector<e_race2> s_race2, /// Attacker Race2
t_race2; ///< Target Race2
enum e_element s_defele; ///< Attacker Element (not a weapon or skill element!)
struct status_data *sstatus, ///< Attacker status data
@ -675,7 +675,11 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
case BF_MAGIC:
// Affected by attacker ATK bonuses
if( sd && !nk[NK_IGNOREATKCARD] ) {
cardfix = cardfix * (100 + sd->indexed_bonus.magic_addrace[tstatus->race] + sd->indexed_bonus.magic_addrace[RC_ALL] + sd->indexed_bonus.magic_addrace2[t_race2]) / 100;
int32 race2_val = 0;
for (const auto &raceit : t_race2)
race2_val += sd->indexed_bonus.magic_addrace2[raceit];
cardfix = cardfix * (100 + sd->indexed_bonus.magic_addrace[tstatus->race] + sd->indexed_bonus.magic_addrace[RC_ALL] + race2_val) / 100;
if( !nk[NK_IGNOREELEMENT] ) { // Affected by Element modifier bonuses
cardfix = cardfix * (100 + sd->indexed_bonus.magic_addele[tstatus->def_ele] + sd->indexed_bonus.magic_addele[ELE_ALL] +
sd->indexed_bonus.magic_addele_script[tstatus->def_ele] + sd->indexed_bonus.magic_addele_script[ELE_ALL]) / 100;
@ -714,8 +718,13 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
}
cardfix = cardfix * (100 - tsd->indexed_bonus.subsize[sstatus->size] - tsd->indexed_bonus.subsize[SZ_ALL]) / 100;
cardfix = cardfix * (100 - tsd->indexed_bonus.magic_subsize[sstatus->size] - tsd->indexed_bonus.magic_subsize[SZ_ALL]) / 100;
cardfix = cardfix * (100 - tsd->indexed_bonus.subrace2[s_race2]) / 100;
int race_fix = tsd->indexed_bonus.subrace[sstatus->race] + tsd->indexed_bonus.subrace[RC_ALL];
int32 race_fix = 0;
for (const auto &raceit : s_race2)
race_fix += tsd->indexed_bonus.subrace2[raceit];
cardfix = cardfix * (100 - race_fix) / 100;
race_fix = tsd->indexed_bonus.subrace[sstatus->race] + tsd->indexed_bonus.subrace[RC_ALL];
for (const auto &it : tsd->subrace3) {
if (it.race != sstatus->race)
continue;
@ -774,7 +783,12 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
}
cardfix = cardfix * (100 + sd->right_weapon.addsize[tstatus->size] + sd->indexed_bonus.arrow_addsize[tstatus->size] +
sd->right_weapon.addsize[SZ_ALL] + sd->indexed_bonus.arrow_addsize[SZ_ALL]) / 100;
cardfix = cardfix * (100 + sd->right_weapon.addrace2[t_race2]) / 100;
int32 race_fix = 0;
for (const auto &raceit : t_race2)
race_fix += sd->right_weapon.addrace2[raceit];
cardfix = cardfix * (100 + race_fix) / 100;
cardfix = cardfix * (100 + sd->right_weapon.addclass[tstatus->class_] + sd->indexed_bonus.arrow_addclass[tstatus->class_] +
sd->right_weapon.addclass[CLASS_ALL] + sd->indexed_bonus.arrow_addclass[CLASS_ALL]) / 100;
} else { // Melee attack
@ -799,7 +813,8 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
cardfix = cardfix * (100 + ele_fix) / 100;
}
cardfix = cardfix * (100 + sd->right_weapon.addsize[tstatus->size] + sd->right_weapon.addsize[SZ_ALL]) / 100;
cardfix = cardfix * (100 + sd->right_weapon.addrace2[t_race2]) / 100;
for (const auto &raceit : t_race2)
cardfix = cardfix * (100 + sd->right_weapon.addrace2[raceit]) / 100;
cardfix = cardfix * (100 + sd->right_weapon.addclass[tstatus->class_] + sd->right_weapon.addclass[CLASS_ALL]) / 100;
if( left&1 ) { // Left-handed weapon
@ -819,7 +834,8 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
cardfix_ = cardfix_ * (100 + ele_fix_lh) / 100;
}
cardfix_ = cardfix_ * (100 + sd->left_weapon.addsize[tstatus->size] + sd->left_weapon.addsize[SZ_ALL]) / 100;
cardfix_ = cardfix_ * (100 + sd->left_weapon.addrace2[t_race2]) / 100;
for (const auto &raceit : t_race2)
cardfix_ = cardfix_ * (100 + sd->left_weapon.addrace2[raceit]) / 100;
cardfix_ = cardfix_ * (100 + sd->left_weapon.addclass[tstatus->class_] + sd->left_weapon.addclass[CLASS_ALL]) / 100;
}
}
@ -854,7 +870,8 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
sd->right_weapon.addrace[RC_ALL] + sd->left_weapon.addrace[RC_ALL]) / 100;
cardfix = cardfix * (100 + sd->right_weapon.addsize[tstatus->size] + sd->left_weapon.addsize[tstatus->size] +
sd->right_weapon.addsize[SZ_ALL] + sd->left_weapon.addsize[SZ_ALL]) / 100;
cardfix = cardfix * (100 + sd->right_weapon.addrace2[t_race2] + sd->left_weapon.addrace2[t_race2]) / 100;
for (const auto &raceit : t_race2)
cardfix = cardfix * (100 + sd->right_weapon.addrace2[raceit] + sd->left_weapon.addrace2[raceit]) / 100;
cardfix = cardfix * (100 + sd->right_weapon.addclass[tstatus->class_] + sd->left_weapon.addclass[tstatus->class_] +
sd->right_weapon.addclass[CLASS_ALL] + sd->left_weapon.addclass[CLASS_ALL]) / 100;
}
@ -922,9 +939,14 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
cardfix = cardfix * (100 - tsd->indexed_bonus.subdefele[s_defele] - tsd->indexed_bonus.subdefele[ELE_ALL]) / 100;
}
int32 race_fix = 0;
cardfix = cardfix * (100 - tsd->indexed_bonus.subsize[sstatus->size] - tsd->indexed_bonus.subsize[SZ_ALL]) / 100;
cardfix = cardfix * (100 - tsd->indexed_bonus.subrace2[s_race2]) / 100;
int race_fix = tsd->indexed_bonus.subrace[sstatus->race] + tsd->indexed_bonus.subrace[RC_ALL];
for (const auto &raceit : s_race2)
race_fix += tsd->indexed_bonus.subrace2[raceit];
cardfix = cardfix * (100 - race_fix) / 100;
race_fix = tsd->indexed_bonus.subrace[sstatus->race] + tsd->indexed_bonus.subrace[RC_ALL];
for (const auto &it : tsd->subrace3) {
if (it.race != sstatus->race)
continue;
@ -982,9 +1004,11 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
race_fix += it.rate;
}
cardfix = cardfix * (100 - race_fix) / 100;
cardfix = cardfix * (100 - tsd->indexed_bonus.subsize[sstatus->size] - tsd->indexed_bonus.subsize[SZ_ALL]) / 100;
cardfix = cardfix * (100 - tsd->indexed_bonus.subrace2[s_race2]) / 100;
race_fix = 0;
for (const auto &raceit : s_race2)
race_fix += tsd->indexed_bonus.subrace2[raceit];
cardfix = cardfix * (100 - race_fix) / 100;
cardfix = cardfix * (100 - tsd->indexed_bonus.subclass[sstatus->class_] - tsd->indexed_bonus.subclass[CLASS_ALL]) / 100;
cardfix = cardfix * (100 - tsd->bonus.misc_def_rate) / 100;
if( flag&BF_SHORT )
@ -1158,7 +1182,7 @@ bool battle_status_block_damage(struct block_list *src, struct block_list *targe
#else
(sc->data[SC_BASILICA]
#endif
&& !status_bl_has_mode(src, MD_STATUS_IMMUNE) && skill_id != SP_SOULEXPLOSION) ||
&& !status_bl_has_mode(src, MD_STATUSIMMUNE) && skill_id != SP_SOULEXPLOSION) ||
(sc->data[SC_ZEPHYR] && !(flag&BF_MAGIC && skill_id) && !(skill_get_inf(skill_id)&(INF_GROUND_SKILL | INF_SELF_SKILL))) ||
sc->data[SC__MANHOLE] ||
sc->data[SC_KINGS_GRACE] ||
@ -1514,23 +1538,44 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
// Compressed code, fixed by map.hpp [Epoque]
if (src->type == BL_MOB) {
enum e_race2 race2 = status_get_race2(src);
if (race2 == RC2_MANUK && (sce = sc->data[SC_MANU_DEF]))
damage -= damage * sce->val1 / 100;
if (race2 == RC2_SPLENDIDE && (sce = sc->data[SC_SPL_DEF]))
damage -= damage * sce->val1 / 100;
if (race2 == RC2_OGH_ATK_DEF && sc->data[SC_GLASTHEIM_DEF])
return 0;
if (race2 == RC2_OGH_HIDDEN && (sce = sc->data[SC_GLASTHEIM_HIDDEN]))
damage -= damage * sce->val1 / 100;
if (race2 == RC2_BIO5_ACOLYTE_MERCHANT && (sce = sc->data[SC_LHZ_DUN_N1]))
damage -= damage * sce->val2 / 100;
if (race2 == RC2_BIO5_MAGE_ARCHER && (sce = sc->data[SC_LHZ_DUN_N2]))
damage -= damage * sce->val2 / 100;
if (race2 == RC2_BIO5_SWORDMAN_THIEF && (sce = sc->data[SC_LHZ_DUN_N3]))
damage -= damage * sce->val2 / 100;
if (race2 == RC2_BIO5_MVP && (sce = sc->data[SC_LHZ_DUN_N4]))
damage -= damage * sce->val2 / 100;
std::vector<e_race2> race2 = status_get_race2(src);
for (const auto &raceit : race2) {
switch (raceit) {
case RC2_MANUK:
if (sce = sc->data[SC_MANU_DEF])
damage -= damage * sce->val1 / 100;
break;
case RC2_SPLENDIDE:
if (sce = sc->data[SC_SPL_DEF])
damage -= damage * sce->val1 / 100;
break;
case RC2_OGH_ATK_DEF:
if (sc->data[SC_GLASTHEIM_DEF])
return 0;
break;
case RC2_OGH_HIDDEN:
if (sce = sc->data[SC_GLASTHEIM_HIDDEN])
damage -= damage * sce->val1 / 100;
break;
case RC2_BIO5_ACOLYTE_MERCHANT:
if (sce = sc->data[SC_LHZ_DUN_N1])
damage -= damage * sce->val2 / 100;
break;
case RC2_BIO5_MAGE_ARCHER:
if (sce = sc->data[SC_LHZ_DUN_N2])
damage -= damage * sce->val2 / 100;
break;
case RC2_BIO5_SWORDMAN_THIEF:
if (sce = sc->data[SC_LHZ_DUN_N3])
damage -= damage * sce->val2 / 100;
break;
case RC2_BIO5_MVP:
if (sce = sc->data[SC_LHZ_DUN_N4])
damage -= damage * sce->val2 / 100;
break;
}
}
}
if((sce=sc->data[SC_ARMOR]) && //NPC_DEFENDER
@ -1635,21 +1680,40 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
// [Epoque]
if (bl->type == BL_MOB) {
if ((flag&BF_WEAPON) || (flag&BF_MAGIC)) {
enum e_race2 race2 = status_get_race2(bl);
if (race2 == RC2_MANUK && (sce = sc->data[SC_MANU_ATK]))
damage += damage * sce->val1 / 100;
if (race2 == RC2_SPLENDIDE && (sce = sc->data[SC_SPL_ATK]))
damage += damage * sce->val1 / 100;
if (race2 == RC2_OGH_ATK_DEF && sc->data[SC_GLASTHEIM_ATK])
damage <<= 1;
if (race2 == RC2_BIO5_SWORDMAN_THIEF && (sce = sc->data[SC_LHZ_DUN_N1]))
damage += damage * sce->val1 / 100;
if (race2 == RC2_BIO5_ACOLYTE_MERCHANT && (sce = sc->data[SC_LHZ_DUN_N2]))
damage += damage * sce->val1 / 100;
if (race2 == RC2_BIO5_MAGE_ARCHER && (sce = sc->data[SC_LHZ_DUN_N3]))
damage += damage * sce->val1 / 100;
if (race2 == RC2_BIO5_MVP && (sce = sc->data[SC_LHZ_DUN_N4]))
damage += damage * sce->val1 / 100;
std::vector<e_race2> race2 = status_get_race2(bl);
for (const auto &raceit : race2) {
switch (raceit) {
case RC2_MANUK:
if (sce = sc->data[SC_MANU_ATK])
damage += damage * sce->val1 / 100;
break;
case RC2_SPLENDIDE:
if (sce = sc->data[SC_SPL_ATK])
damage += damage * sce->val1 / 100;
break;
case RC2_OGH_ATK_DEF:
if (sc->data[SC_GLASTHEIM_ATK])
damage <<= 1;
break;
case RC2_BIO5_SWORDMAN_THIEF:
if (sce = sc->data[SC_LHZ_DUN_N1])
damage += damage * sce->val1 / 100;
break;
case RC2_BIO5_ACOLYTE_MERCHANT:
if (sce = sc->data[SC_LHZ_DUN_N2])
damage += damage * sce->val1 / 100;
break;
case RC2_BIO5_MAGE_ARCHER:
if (sce = sc->data[SC_LHZ_DUN_N3])
damage += damage * sce->val1 / 100;
break;
case RC2_BIO5_MVP:
if (sce = sc->data[SC_LHZ_DUN_N4])
damage += damage * sce->val1 / 100;
break;
}
}
}
}
/* Self Buff that destroys the armor of any target hit with melee or ranged physical attacks */
@ -1752,7 +1816,7 @@ bool battle_can_hit_bg_target(struct block_list *src, struct block_list *bl, uin
if (ud && ud->immune_attack)
return false;
if (md && md->bg_id) {
if (status_bl_has_mode(bl, MD_SKILL_IMMUNE) && flag&BF_SKILL) //Skill immunity.
if (status_bl_has_mode(bl, MD_SKILLIMMUNE) && flag&BF_SKILL) //Skill immunity.
return false;
if (src->type == BL_PC) {
struct map_session_data *sd = map_id2sd(src->id);
@ -1823,7 +1887,7 @@ bool battle_can_hit_gvg_target(struct block_list *src,struct block_list *bl,uint
if (ud && ud->immune_attack)
return false;
if(md && (md->guardian_data || md->special_state.ai == AI_GUILD)) {
if ((status_bl_has_mode(bl,MD_SKILL_IMMUNE) || (class_ == MOBID_EMPERIUM && !skill_get_inf2(skill_id, INF2_TARGETEMPERIUM))) && flag&BF_SKILL) //Skill immunity.
if ((status_bl_has_mode(bl,MD_SKILLIMMUNE) || (class_ == MOBID_EMPERIUM && !skill_get_inf2(skill_id, INF2_TARGETEMPERIUM))) && flag&BF_SKILL) //Skill immunity.
return false;
if( src->type != BL_MOB || mob_is_clone( ((struct mob_data*)src)->mob_id ) ){
struct guild *g = src->type == BL_PC ? ((TBL_PC *)src)->guild : guild_search(status_get_guild_id(src));
@ -4123,7 +4187,7 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
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_HUMAN || tstatus->race == RC_PLAYER_DORAM) && !status_has_mode(tstatus,MD_STATUS_IMMUNE))
if((tstatus->race == RC_BRUTE || tstatus->race == RC_DEMIHUMAN || tstatus->race == RC_PLAYER_HUMAN || tstatus->race == RC_PLAYER_DORAM) && !status_has_mode(tstatus,MD_STATUSIMMUNE))
skillratio += 400;
break;
case GS_TRACKING:
@ -5742,7 +5806,7 @@ void battle_do_reflect(int attack_type, struct Damage *wd, struct block_list* sr
return;
// Calculate skill reflect damage separately
if ((ud && !ud->immune_attack) || !status_bl_has_mode(target, MD_SKILL_IMMUNE))
if ((ud && !ud->immune_attack) || !status_bl_has_mode(target, MD_SKILLIMMUNE))
rdamage = battle_calc_return_damage(target, src, &damage, wd->flag, skill_id,true);
if( rdamage > 0 ) {
struct block_list *d_bl = battle_check_devotion(src);
@ -6235,7 +6299,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_STATUS_IMMUNE))
if(rnd()%1000 < i && !status_has_mode(tstatus,MD_STATUSIMMUNE))
ad.damage = tstatus->hp;
else {
#ifdef RENEWAL
@ -6760,7 +6824,11 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
if(sd) {
i = sd->indexed_bonus.ignore_mdef_by_race[tstatus->race] + sd->indexed_bonus.ignore_mdef_by_race[RC_ALL];
i += sd->indexed_bonus.ignore_mdef_by_class[tstatus->class_] + sd->indexed_bonus.ignore_mdef_by_class[CLASS_ALL];
i += sd->indexed_bonus.ignore_mdef_by_race2[status_get_race2(target)];
std::vector<e_race2> race2 = status_get_race2(target);
for (const auto &raceit : race2)
i += sd->indexed_bonus.ignore_mdef_by_race2[raceit];
if (i)
{
if (i > 100) i = 100;
@ -7091,7 +7159,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
case RL_B_TRAP:
// kRO 2014-02-12: Damage: Caster's DEX, Target's current HP, Skill Level
md.damage = status_get_dex(src) * 10 + (skill_lv * 3 * status_get_hp(target)) / 100;
if (status_bl_has_mode(target, MD_STATUS_IMMUNE))
if (status_bl_has_mode(target, MD_STATUSIMMUNE))
md.damage /= 10;
break;
case NPC_MAXPAIN_ATK:
@ -7372,7 +7440,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 && !status_bl_has_mode(src,MD_STATUS_IMMUNE)) {
if (sc->data[SC_DEATHBOUND] && skill_id != WS_CARTTERMINATION && skill_id != GN_HELLS_PLANT_ATK && !status_bl_has_mode(src,MD_STATUSIMMUNE)) {
if (distance_bl(src,bl) <= 0 || !map_check_dir(map_calc_dir(bl,src->x,src->y), unit_getdir(bl))) {
int64 rd1 = 0;
@ -7385,7 +7453,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 && !status_bl_has_mode(src,MD_STATUS_IMMUNE) ){
if( sc->data[SC_SHIELDSPELL_DEF] && sc->data[SC_SHIELDSPELL_DEF]->val1 == 2 && !status_bl_has_mode(src,MD_STATUSIMMUNE) ){
rdamage += damage * sc->data[SC_SHIELDSPELL_DEF]->val2 / 100;
rdamage = i64max(rdamage, 1);
}
@ -7555,7 +7623,7 @@ int battle_damage_area(struct block_list *bl, va_list ap) {
dmotion = va_arg(ap,int);
damage = va_arg(ap,int);
if (status_bl_has_mode(bl, MD_SKILL_IMMUNE) || status_get_class(bl) == MOBID_EMPERIUM)
if (status_bl_has_mode(bl, MD_SKILLIMMUNE) || status_get_class(bl) == MOBID_EMPERIUM)
return 0;
if( bl != src && battle_check_target(src,bl,BCT_ENEMY) > 0 ) {
map_freeblock_lock();

View File

@ -10024,7 +10024,7 @@ void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int cl
if( pcdb_checkid(class_) ) {
clif_starskill(sd, job_name(class_), class_, hate_level, type ? 10 : 11);
} else if( mobdb_checkid(class_) ) {
clif_starskill(sd, mob_db(class_)->jname, class_, hate_level, type ? 10 : 11);
clif_starskill(sd, mob_db.find(class_)->jname.c_str(), class_, hate_level, type ? 10 : 11);
} else {
ShowWarning("clif_hate_info: Received invalid class %d for this packet (char_id=%d, hate_level=%u, type=%u).\n", class_, sd->status.char_id, (unsigned int)hate_level, (unsigned int)type);
}
@ -10035,7 +10035,7 @@ void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int cl
*------------------------------------------*/
void clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char progress)
{
clif_starskill(sd, mob_db(mob_id)->jname, mob_id, progress, 20);
clif_starskill(sd, mob_db.find(mob_id)->jname.c_str(), mob_id, progress, 20);
}
/*==========================================
@ -14475,7 +14475,6 @@ void clif_parse_GM_Item_Monster(int fd, struct map_session_data *sd)
struct s_packet_db* info = &packet_db[RFIFOW(fd,0)];
int mob_id = 0;
struct item_data *id = NULL;
struct mob_db *mob = NULL;
StringBuf command;
char *str;
//#if PACKETVER >= 20131218
@ -14520,9 +14519,11 @@ void clif_parse_GM_Item_Monster(int fd, struct map_session_data *sd)
if ((mob_id = mobdb_searchname(str)) == 0)
mob_id = mobdb_checkid(atoi(str));
if( (mob = mob_db(mob_id)) ) {
std::shared_ptr<s_mob_db> mob = mob_db.find(mob_id);
if( mob != nullptr ) {
StringBuf_Init(&command);
StringBuf_Printf(&command, "%cmonster %s", atcommand_symbol, mob->sprite);
StringBuf_Printf(&command, "%cmonster %s", atcommand_symbol, mob->sprite.c_str());
is_atcommand(fd, sd, StringBuf_Value(&command), 1);
StringBuf_Destroy(&command);
return;
@ -17060,7 +17061,7 @@ void clif_bossmapinfo(struct map_session_data *sd, struct mob_data *md, enum e_b
}
if (md != NULL)
safestrncpy(WFIFOCP(fd,19), md->db->jname, NAME_LENGTH);
safestrncpy(WFIFOCP(fd,19), md->db->jname.c_str(), NAME_LENGTH);
WFIFOSET(fd,70);
}
@ -17280,10 +17281,10 @@ void clif_quest_send_list(struct map_session_data *sd)
offset += 2;
if (!qi->objectives.empty()) {
struct mob_db *mob;
std::shared_ptr<s_mob_db> mob;
for (int j = 0; j < qi->objectives.size(); j++) {
mob = mob_db(qi->objectives[j]->mob_id);
mob = mob_db.find(qi->objectives[j]->mob_id);
e_race race = qi->objectives[j]->race;
e_size size = qi->objectives[j]->size;
@ -17308,7 +17309,7 @@ void clif_quest_send_list(struct map_session_data *sd)
WFIFOW(fd, offset) = qi->objectives[j]->count;
offset += 2;
if (mob && qi->objectives[j]->mob_id > 0)
safestrncpy(WFIFOCP(fd,offset), mob->jname, NAME_LENGTH);
safestrncpy(WFIFOCP(fd,offset), mob->jname.c_str(), NAME_LENGTH);
else
safestrncpy(WFIFOCP(fd,offset), clif_quest_string(qi->objectives[j]).c_str(), NAME_LENGTH);
offset += NAME_LENGTH;
@ -17361,12 +17362,12 @@ void clif_quest_send_mission(struct map_session_data *sd)
WFIFOW(fd, i*104+20) = static_cast<uint16>(qi->objectives.size());
for (int j = 0 ; j < qi->objectives.size(); j++) {
struct mob_db *mob = mob_db(qi->objectives[j]->mob_id);
std::shared_ptr<s_mob_db> mob = mob_db.find(qi->objectives[j]->mob_id);
WFIFOL(fd, i*104+22+j*30) = (mob ? qi->objectives[j]->mob_id : MOBID_PORING);
WFIFOW(fd, i*104+26+j*30) = sd->quest_log[i].count[j];
if (mob && qi->objectives[j]->mob_id > 0)
safestrncpy(WFIFOCP(fd, i*104+28+j*30), mob->jname, NAME_LENGTH);
safestrncpy(WFIFOCP(fd, i*104+28+j*30), mob->jname.c_str(), NAME_LENGTH);
else
safestrncpy(WFIFOCP(fd, i*104+28+j*30), clif_quest_string(qi->objectives[j]).c_str(), NAME_LENGTH);
}
@ -17404,7 +17405,7 @@ void clif_quest_add(struct map_session_data *sd, struct quest *qd)
WFIFOW(fd, 15) = static_cast<uint16>(qi->objectives.size());
for (int i = 0, offset = 17; i < qi->objectives.size(); i++) {
struct mob_db *mob = mob_db(qi->objectives[i]->mob_id);
std::shared_ptr<s_mob_db> mob = mob_db.find(qi->objectives[i]->mob_id);
e_race race = qi->objectives[i]->race;
e_size size = qi->objectives[i]->size;
e_element element = qi->objectives[i]->element;
@ -17426,7 +17427,7 @@ void clif_quest_add(struct map_session_data *sd, struct quest *qd)
WFIFOW(fd, offset) = qd->count[i];
offset += 2;
if (mob && qi->objectives[i]->mob_id > 0)
safestrncpy(WFIFOCP(fd,offset), mob->jname, NAME_LENGTH);
safestrncpy(WFIFOCP(fd,offset), mob->jname.c_str(), NAME_LENGTH);
else
safestrncpy(WFIFOCP(fd,offset), clif_quest_string(qi->objectives[i]).c_str(), NAME_LENGTH);
offset += NAME_LENGTH;
@ -20526,10 +20527,10 @@ void clif_broadcast_obtain_special_item( const char *char_name, t_itemid nameid,
safestrncpy( p.Name, name, sizeof( p.Name ) );
if( type == ITEMOBTAIN_TYPE_MONSTER_ITEM ){
struct mob_db *db = mob_db( container );
std::shared_ptr<s_mob_db> db = mob_db.find( container );
p.monsterNameLen = NAME_LENGTH;
safestrncpy( p.monsterName, db->name, NAME_LENGTH );
safestrncpy( p.monsterName, db->name.c_str(), NAME_LENGTH );
}else{
p.monsterNameLen = 0;
p.monsterName[0] = '\0';

View File

@ -95,7 +95,7 @@ struct map_session_data *inter_search_sd(uint32 account_id, uint32 char_id)
* @param pet_name
* @return
*/
int intif_create_pet(uint32 account_id,uint32 char_id,short pet_class,short pet_lv, t_itemid pet_egg_id, t_itemid pet_equip,short intimate,short hungry,char rename_flag,char incubate,char *pet_name)
int intif_create_pet(uint32 account_id,uint32 char_id,short pet_class,short pet_lv, t_itemid pet_egg_id, t_itemid pet_equip,short intimate,short hungry,char rename_flag,char incubate,const char *pet_name)
{
if (CheckForCharServer())
return 0;

View File

@ -70,7 +70,7 @@ int intif_guild_castle_datasave(int castle_id, int index, int value);
void intif_itembound_guild_retrieve(uint32 char_id, uint32 account_id, int guild_id);
#endif
int intif_create_pet(uint32 account_id, uint32 char_id, short pet_type, short pet_lv, t_itemid pet_egg_id, t_itemid pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
int intif_create_pet(uint32 account_id, uint32 char_id, short pet_type, short pet_lv, t_itemid pet_egg_id, t_itemid pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
int intif_request_petdata(uint32 account_id, uint32 char_id, int pet_id);
int intif_save_petdata(uint32 account_id, struct s_pet *p);
int intif_delete_petdata(int pet_id);

View File

@ -341,13 +341,11 @@
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_branch.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_branch.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_chat_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_chat_db.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_classchange.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_classchange.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_db.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_drop.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_drop.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_db.yml" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_db.yml')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_item_ratio.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_item_ratio.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_poring.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_poring.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_mission.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_mission.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_pouch.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_pouch.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_race2_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_race2_db.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_random_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_random_db.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_skill_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_skill_db.txt')" />
<Copy SourceFiles="$(SolutionDir)db\import-tmpl\pet_db.yml" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\pet_db.yml')" />

View File

@ -292,26 +292,16 @@ enum e_race : int8{
RC_MAX //auto upd enum for array size
};
enum e_classAE : int8{
CLASS_NONE = -1, //don't give us bonus
CLASS_NORMAL = 0,
CLASS_BOSS,
CLASS_GUARDIAN,
CLASS_BATTLEFIELD,
CLASS_ALL,
CLASS_MAX //auto upd enum for array len
};
enum e_race2 : uint8{
RC2_NONE = 0,
RC2_GOBLIN,
RC2_KOBOLD,
RC2_ORC,
RC2_GOLEM,
RC2_GUARDIAN,
RC2_GUARDIAN, // Deprecated to CLASS_GUARDIAN
RC2_NINJA,
RC2_GVG,
RC2_BATTLEFIELD,
RC2_BATTLEFIELD, // Deprecated to CLASS_BATTLEFIELD
RC2_TREASURE,
RC2_BIOLAB,
RC2_MANUK,

File diff suppressed because it is too large Load Diff

View File

@ -28,9 +28,6 @@ struct guardian_data;
#define MAX_MVP_DROP_ADD 2
#define MAX_MOB_DROP_TOTAL (MAX_MOB_DROP+MAX_MOB_DROP_ADD)
#define MAX_MVP_DROP_TOTAL (MAX_MVP_DROP+MAX_MVP_DROP_ADD)
#define MAX_STEAL_DROP 7
#define MAX_RACE2_MOBS 100
//Min time between AI executions
const t_tick MIN_MOBTHINKTIME = 100;
@ -136,7 +133,50 @@ enum e_mob_bosstype : uint8{
BOSSTYPE_MVP
};
struct mob_skill {
/// Monster Aegis AI types
enum e_aegis_monstertype : uint16 {
MONSTER_TYPE_01 = 0x81,
MONSTER_TYPE_02 = 0x83,
MONSTER_TYPE_03 = 0x1089,
MONSTER_TYPE_04 = 0x3885,
MONSTER_TYPE_05 = 0x2085,
MONSTER_TYPE_06 = 0,
MONSTER_TYPE_07 = 0x108B,
MONSTER_TYPE_08 = 0x7085,
MONSTER_TYPE_09 = 0x3095,
MONSTER_TYPE_10 = 0x84,
MONSTER_TYPE_11 = 0x84,
MONSTER_TYPE_12 = 0x2085,
MONSTER_TYPE_13 = 0x308D,
//MONSTER_TYPE_14
//MONSTER_TYPE_15
//MONSTER_TYPE_16
MONSTER_TYPE_17 = 0x91,
//MONSTER_TYPE_18
MONSTER_TYPE_19 = 0x3095,
MONSTER_TYPE_20 = 0x3295,
MONSTER_TYPE_21 = 0x3695,
//MONSTER_TYPE_22
//MONSTER_TYPE_23
MONSTER_TYPE_24 = 0xA1,
MONSTER_TYPE_25 = 0x1,
MONSTER_TYPE_26 = 0xB695,
MONSTER_TYPE_27 = 0x8084,
};
/// Aegis monster class types
enum e_aegis_monsterclass : int8 {
CLASS_NONE = -1,
CLASS_NORMAL = 0,
CLASS_BOSS,
CLASS_GUARDIAN,
CLASS_BATTLEFIELD = 4,
CLASS_EVENT,
CLASS_ALL,
CLASS_MAX,
};
struct s_mob_skill {
enum MobSkillState state;
uint16 skill_id,skill_lv;
short permillage;
@ -174,24 +214,39 @@ struct s_mob_drop {
bool steal_protected;
};
struct mob_db {
char sprite[NAME_LENGTH],name[NAME_LENGTH],jname[NAME_LENGTH];
struct s_mob_db {
std::string sprite, name, jname;
t_exp base_exp;
t_exp job_exp;
t_exp mexp;
short range2,range3;
enum e_race2 race2; // celest
unsigned short lv;
struct s_mob_drop dropitem[MAX_MOB_DROP_TOTAL], mvpitem[MAX_MVP_DROP_TOTAL];
struct status_data status;
struct view_data vd;
unsigned int option;
int maxskill;
struct mob_skill skill[MAX_MOBSKILL];
uint16 range2, range3;
std::vector<e_race2> race2; // celest
uint16 lv;
s_mob_drop dropitem[MAX_MOB_DROP_TOTAL], mvpitem[MAX_MVP_DROP_TOTAL];
status_data status;
view_data vd;
uint32 option;
std::vector<std::shared_ptr<s_mob_skill>> skill;
e_mob_bosstype get_bosstype();
};
class MobDatabase : public TypesafeCachedYamlDatabase <uint32, s_mob_db> {
private:
bool parseDropNode(std::string nodeName, YAML::Node node, uint8 max, s_mob_drop *drops);
public:
MobDatabase() : TypesafeCachedYamlDatabase("MOB_DB", 1) {
}
const std::string getDefaultLocation();
uint64 parseBodyNode(const YAML::Node &node);
void loadingFinished();
};
extern MobDatabase mob_db;
struct mob_data {
struct block_list bl;
struct unit_data ud;
@ -199,7 +254,7 @@ struct mob_data {
bool vd_changed;
struct status_data status, *base_status; //Second one is in case of leveling up mobs, or tiny/large mobs.
struct status_change sc;
struct mob_db *db; //For quick data access (saves doing mob_db(md->mob_id) all the time) [Skotlex]
std::shared_ptr<s_mob_db> db; //For quick data access (saves doing mob_db(md->mob_id) all the time) [Skotlex]
char name[NAME_LENGTH];
struct s_specialState {
unsigned int size : 2; //Small/Big monsters.
@ -329,9 +384,8 @@ struct item_drop_list {
struct item_drop* item; // linked list of drops
};
struct mob_db *mob_db(int mob_id);
uint16 mobdb_searchname(const char * const str);
struct mob_db* mobdb_search_aegisname( const char* str );
std::shared_ptr<s_mob_db> mobdb_search_aegisname( const char* str );
int mobdb_searchname_array(const char *str, uint16 * out, int size);
int mobdb_checkid(const int id);
struct view_data* mob_get_viewdata(int mob_id);

View File

@ -1401,7 +1401,7 @@ void run_tomb(struct map_session_data* sd, struct npc_data* nd)
strftime(time, sizeof(time), "%H:%M", localtime(&nd->u.tomb.kill_time));
// TODO: Find exact color?
snprintf(buffer, sizeof(buffer), msg_txt(sd,657), nd->u.tomb.md->db->name);
snprintf(buffer, sizeof(buffer), msg_txt(sd,657), nd->u.tomb.md->db->name.c_str());
clif_scriptmes(sd, nd->bl.id, buffer);
clif_scriptmes(sd, nd->bl.id, msg_txt(sd,658));

View File

@ -5909,7 +5909,7 @@ bool pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 ski
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_STATUS_IMMUNE) || status_get_race2(&md->bl) == RC2_TREASURE ||
if (md->master_id || status_has_mode(md_status, MD_STATUSIMMUNE) || util::vector_exists(status_get_race2(&md->bl), RC2_TREASURE) ||
map_getmapflag(bl->m, MF_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)
@ -5931,14 +5931,14 @@ bool pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 ski
// Try dropping one item, in the order from first to last possible slot.
// Droprate is affected by the skill success rate.
for( i = 0; i < MAX_STEAL_DROP; i++ )
for( i = 0; i < MAX_MOB_DROP; i++ )
if( md->db->dropitem[i].nameid > 0 && !md->db->dropitem[i].steal_protected && itemdb_exists(md->db->dropitem[i].nameid) && rnd() % 10000 < md->db->dropitem[i].rate
#ifndef RENEWAL
* rate/100.
#endif
)
break;
if( i == MAX_STEAL_DROP )
if( i == MAX_MOB_DROP )
return false;
itemid = md->db->dropitem[i].nameid;
@ -5968,7 +5968,7 @@ bool pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 ski
struct item_data *i_data;
char message[128];
i_data = itemdb_search(itemid);
sprintf (message, msg_txt(sd,542), (sd->status.name[0])?sd->status.name :"GM", md->db->jname, i_data->ename.c_str(), (float)md->db->dropitem[i].rate / 100);
sprintf (message, msg_txt(sd,542), (sd->status.name[0])?sd->status.name :"GM", md->db->jname.c_str(), i_data->ename.c_str(), (float)md->db->dropitem[i].rate / 100);
//MSG: "'%s' stole %s's %s (chance: %0.02f%%)"
intif_broadcast(message, strlen(message) + 1, BC_DEFAULT);
}
@ -5992,7 +5992,7 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
md = (TBL_MOB*)target;
target_lv = status_get_lv(target);
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)
if (md->state.steal_coin_flag || md->sc.data[SC_STONE] || md->sc.data[SC_FREEZE] || status_bl_has_mode(target,MD_STATUSIMMUNE) || util::vector_exists(status_get_race2(&md->bl), RC2_TREASURE))
return 0;
rate = sd->battle_status.dex / 2 + 2 * (sd->status.base_level - target_lv) + (10 * pc_checkskill(sd, RG_STEALCOIN)) + sd->battle_status.luk / 2;
@ -11804,7 +11804,7 @@ void pc_delspiritcharm(struct map_session_data *sd, int count, int type)
* @param type: 1 - EXP, 2 - Item Drop
* @return Penalty rate
*/
uint16 pc_level_penalty_mod( struct map_session_data* sd, e_penalty_type type, struct mob_db* mob, mob_data* md ){
uint16 pc_level_penalty_mod( struct map_session_data* sd, e_penalty_type type, std::shared_ptr<s_mob_db> mob, mob_data* md ){
// No player was attached, we don't use any modifier (100 = rates are not touched)
if( sd == nullptr ){
return 100;
@ -11821,7 +11821,7 @@ uint16 pc_level_penalty_mod( struct map_session_data* sd, e_penalty_type type, s
return 100;
}
if( ( type == PENALTY_DROP || type == PENALTY_MVP_DROP ) && status_has_mode( &mob->status, MD_FIXED_ITEMDROP ) ){
if( ( type == PENALTY_DROP || type == PENALTY_MVP_DROP ) && status_has_mode( &mob->status, MD_FIXEDITEMDROP ) ){
return 100;
}

View File

@ -1459,7 +1459,7 @@ void pc_show_questinfo_reinit(struct map_session_data *sd);
bool pc_job_can_entermap(enum e_job jobid, int m, int group_lv);
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
uint16 pc_level_penalty_mod( struct map_session_data* sd, e_penalty_type type, struct mob_db* mob, mob_data* md = nullptr );
uint16 pc_level_penalty_mod( struct map_session_data* sd, e_penalty_type type, std::shared_ptr<s_mob_db> mob, mob_data* md = nullptr );
#endif
bool pc_attendance_enabled();

View File

@ -46,7 +46,7 @@ uint64 PetDatabase::parseBodyNode( const YAML::Node &node ){
return 0;
}
struct mob_db* mob = mobdb_search_aegisname( mob_name.c_str() );
std::shared_ptr<s_mob_db> mob = mobdb_search_aegisname( mob_name.c_str() );
if( mob == nullptr ){
this->invalidWarning( node["Target"], "Mob %s does not exist and cannot be used as a pet.\n", mob_name.c_str() );
@ -412,7 +412,7 @@ uint64 PetDatabase::parseBodyNode( const YAML::Node &node ){
return 0;
}
struct mob_db* mob = mobdb_search_aegisname( target_name.c_str() );
std::shared_ptr<s_mob_db> mob = mobdb_search_aegisname( target_name.c_str() );
if( mob == nullptr ){
this->invalidWarning( evolutionNode["Target"], "Evolution target %s does not exist.\n", target_name.c_str() );
@ -553,7 +553,7 @@ static int pet_reload_sub( struct map_session_data *sd, va_list args ){
pet_clear_support_bonuses(sd);
// Relink the pet to the new database entry
pd->db = mob_db( pet_db_ptr->class_ );
pd->db = mob_db.find( pet_db_ptr->class_ );
if( battle_config.pet_status_support ){
run_script( pet_db_ptr->pet_support_script, 0, sd->bl.id, 0 );
@ -666,7 +666,7 @@ bool pet_create_egg(struct map_session_data *sd, t_itemid item_id)
if (!pet)
return false; //No pet egg here.
struct mob_db* mdb = mob_db(pet->class_);
std::shared_ptr<s_mob_db> mdb = mob_db.find(pet->class_);
if( mdb == nullptr ){
return false;
@ -676,7 +676,7 @@ bool pet_create_egg(struct map_session_data *sd, t_itemid item_id)
return false; // Inventory full
sd->catch_target_class = pet->class_;
intif_create_pet(sd->status.account_id, sd->status.char_id, pet->class_, mdb->lv, pet->EggID, 0, pet->intimate, 100, 0, 1, mdb->jname);
intif_create_pet(sd->status.account_id, sd->status.char_id, pet->class_, mdb->lv, pet->EggID, 0, pet->intimate, 100, 0, 1, mdb->jname.c_str());
return true;
}
@ -1026,7 +1026,7 @@ bool pet_data_init(struct map_session_data *sd, struct s_pet *pet)
pd->bl.id = npc_get_new_npc_id();
pd->master = sd;
pd->db = mob_db(pet->class_);
pd->db = mob_db.find(pet->class_);
memcpy(&pd->pet, pet, sizeof(struct s_pet));
status_set_viewdata(&pd->bl, pet->class_);
unit_dataset(&pd->bl);
@ -1066,7 +1066,7 @@ bool pet_data_init(struct map_session_data *sd, struct s_pet *pet)
pd->masterteleport_timer = INVALID_TIMER;
if( !pet->rename_flag ){
safestrncpy( sd->pd->pet.name, pd->db->jname, NAME_LENGTH );
safestrncpy( sd->pd->pet.name, pd->db->jname.c_str(), NAME_LENGTH );
}
return true;
@ -1254,7 +1254,7 @@ int pet_catch_process2(struct map_session_data* sd, int target_id)
// If the target is a valid pet, we have a few exceptions
if( pet ){
//catch_target_class == PET_CATCH_UNIVERSAL is used for universal lures (except bosses for now). [Skotlex]
if (sd->catch_target_class == PET_CATCH_UNIVERSAL && !status_has_mode(&md->status,MD_STATUS_IMMUNE)){
if (sd->catch_target_class == PET_CATCH_UNIVERSAL && !status_has_mode(&md->status,MD_STATUSIMMUNE)){
sd->catch_target_class = md->mob_id;
//catch_target_class == PET_CATCH_UNIVERSAL_ITEM is used for catching any monster required the lure item used
}else if (sd->catch_target_class == PET_CATCH_UNIVERSAL_ITEM && sd->itemid == pet->itemID){
@ -1284,9 +1284,9 @@ int pet_catch_process2(struct map_session_data* sd, int target_id)
status_kill(&md->bl);
clif_pet_roulette(sd,1);
struct mob_db *mdb = mob_db(pet->class_);
std::shared_ptr<s_mob_db> mdb = mob_db.find(pet->class_);
intif_create_pet(sd->status.account_id, sd->status.char_id, pet->class_, mdb->lv, pet->EggID, 0, pet->intimate, 100, 0, 1, mdb->jname);
intif_create_pet(sd->status.account_id, sd->status.char_id, pet->class_, mdb->lv, pet->EggID, 0, pet->intimate, 100, 0, 1, mdb->jname.c_str());
} else {
clif_pet_roulette(sd,0);
sd->catch_target_class = PET_CATCH_FAIL;
@ -2270,9 +2270,9 @@ void pet_evolution(struct map_session_data *sd, int16 pet_id) {
sd->pd->pet.egg_id = new_data->EggID;
pet_set_intimate(sd->pd, new_data->intimate);
if( !sd->pd->pet.rename_flag ){
struct mob_db* mdb = mob_db( pet_id );
std::shared_ptr<s_mob_db> mdb = mob_db.find( pet_id );
safestrncpy(sd->pd->pet.name, mdb->jname, NAME_LENGTH);
safestrncpy(sd->pd->pet.name, mdb->jname.c_str(), NAME_LENGTH);
}
status_set_viewdata(&sd->pd->bl, pet_id);

View File

@ -148,7 +148,7 @@ struct pet_data {
struct view_data vd;
struct s_pet pet;
struct status_data status;
struct mob_db *db;
std::shared_ptr<s_mob_db> db;
int pet_hungry_timer;
int target_id;
struct {

View File

@ -121,7 +121,7 @@ uint64 QuestDatabase::parseBodyNode(const YAML::Node &node) {
if (!this->asString(targetNode, "Mob", mob_name))
return 0;
struct mob_db *mob = mobdb_search_aegisname(mob_name.c_str());
std::shared_ptr<s_mob_db> mob = mobdb_search_aegisname(mob_name.c_str());
if (!mob) {
this->invalidWarning(targetNode["Mob"], "Mob %s does not exist, skipping.\n", mob_name.c_str());
@ -331,7 +331,7 @@ uint64 QuestDatabase::parseBodyNode(const YAML::Node &node) {
if (!this->asString(dropNode, "Mob", mob_name))
return 0;
struct mob_db *mob = mobdb_search_aegisname(mob_name.c_str());
std::shared_ptr<s_mob_db> mob = mobdb_search_aegisname(mob_name.c_str());
if (!mob) {
this->invalidWarning(dropNode["Mob"], "Mob %s does not exist, skipping.\n", mob_name.c_str());

View File

@ -10467,9 +10467,9 @@ BUILDIN_FUNC(makepet)
sd->catch_target_class = mob_id;
struct mob_db* mdb = mob_db(pet->class_);
std::shared_ptr<s_mob_db> mdb = mob_db.find(pet->class_);
intif_create_pet( sd->status.account_id, sd->status.char_id, pet->class_, mdb->lv, pet->EggID, 0, pet->intimate, 100, 0, 1, mdb->jname );
intif_create_pet( sd->status.account_id, sd->status.char_id, pet->class_, mdb->lv, pet->EggID, 0, pet->intimate, 100, 0, 1, mdb->jname.c_str() );
return SCRIPT_CMD_SUCCESS;
}
@ -10619,7 +10619,6 @@ BUILDIN_FUNC(getmobdrops)
{
int class_ = script_getnum(st,2);
int i, j = 0;
struct mob_db *mob;
if( !mobdb_checkid(class_) )
{
@ -10627,7 +10626,7 @@ BUILDIN_FUNC(getmobdrops)
return SCRIPT_CMD_SUCCESS;
}
mob = mob_db(class_);
std::shared_ptr<s_mob_db> mob = mob_db.find(class_);
for( i = 0; i < MAX_MOB_DROP_TOTAL; i++ )
{
@ -13774,14 +13773,16 @@ BUILDIN_FUNC(strmobinfo)
return SCRIPT_CMD_SUCCESS;
}
std::shared_ptr<s_mob_db> mob = mob_db.find(class_);
switch (num) {
case 1: script_pushstrcopy(st,mob_db(class_)->name); break;
case 2: script_pushstrcopy(st,mob_db(class_)->jname); break;
case 3: script_pushint(st,mob_db(class_)->lv); break;
case 4: script_pushint(st,mob_db(class_)->status.max_hp); break;
case 5: script_pushint(st,mob_db(class_)->status.max_sp); break;
case 6: script_pushint(st,mob_db(class_)->base_exp); break;
case 7: script_pushint(st,mob_db(class_)->job_exp); break;
case 1: script_pushstrcopy(st,mob->name.c_str()); break;
case 2: script_pushstrcopy(st, mob->jname.c_str()); break;
case 3: script_pushint(st,mob->lv); break;
case 4: script_pushint(st,mob->status.max_hp); break;
case 5: script_pushint(st,mob->status.max_sp); break;
case 6: script_pushint(st,mob->base_exp); break;
case 7: script_pushint(st,mob->job_exp); break;
default:
script_pushint(st,0);
break;
@ -17443,13 +17444,13 @@ BUILDIN_FUNC(setitemscript)
*-------------------------------------------------------*/
BUILDIN_FUNC(addmonsterdrop)
{
struct mob_db *mob;
std::shared_ptr<s_mob_db> mob;
int rate;
if(script_isstring(st, 2))
mob = mob_db(mobdb_searchname(script_getstr(st,2)));
mob = mob_db.find(mobdb_searchname(script_getstr(st,2)));
else
mob = mob_db(script_getnum(st,2));
mob = mob_db.find(script_getnum(st,2));
t_itemid item_id=script_getnum(st,3);
rate=script_getnum(st,4);
@ -17497,12 +17498,12 @@ BUILDIN_FUNC(addmonsterdrop)
*-------------------------------------------------------*/
BUILDIN_FUNC(delmonsterdrop)
{
struct mob_db *mob;
std::shared_ptr<s_mob_db> mob;
if(script_isstring(st, 2))
mob = mob_db(mobdb_searchname(script_getstr(st,2)));
mob = mob_db.find(mobdb_searchname(script_getstr(st,2)));
else
mob = mob_db(script_getnum(st,2));
mob = mob_db.find(script_getnum(st,2));
t_itemid item_id=script_getnum(st,3);
@ -17539,7 +17540,6 @@ BUILDIN_FUNC(delmonsterdrop)
*------------------------------------------*/
BUILDIN_FUNC(getmonsterinfo)
{
struct mob_db *mob;
int mob_id;
mob_id = script_getnum(st,2);
@ -17551,9 +17551,11 @@ BUILDIN_FUNC(getmonsterinfo)
script_pushint(st,-1);
return SCRIPT_CMD_SUCCESS;
}
mob = mob_db(mob_id);
std::shared_ptr<s_mob_db> mob = mob_db.find(mob_id);
switch ( script_getnum(st,3) ) {
case MOB_NAME: script_pushstrcopy(st,mob->jname); break;
case MOB_NAME: script_pushstrcopy(st,mob->jname.c_str()); break;
case MOB_LV: script_pushint(st,mob->lv); break;
case MOB_MAXHP: script_pushint(st,mob->status.max_hp); break;
case MOB_BASEEXP: script_pushint(st,mob->base_exp); break;

View File

@ -3743,10 +3743,10 @@
export_constant(RC2_KOBOLD);
export_constant(RC2_ORC);
export_constant(RC2_GOLEM);
export_constant(RC2_GUARDIAN);
export_deprecated_constant(RC2_GUARDIAN);
export_constant(RC2_NINJA);
export_constant(RC2_GVG);
export_constant(RC2_BATTLEFIELD);
export_deprecated_constant(RC2_BATTLEFIELD);
export_constant(RC2_TREASURE);
export_constant(RC2_BIOLAB);
export_constant(RC2_MANUK);
@ -3768,12 +3768,38 @@
export_constant(RC2_ILLUSION_VAMPIRE);
export_constant(RC2_MAX);
/* monster ai */
export_constant(MONSTER_TYPE_01);
export_constant(MONSTER_TYPE_02);
export_constant(MONSTER_TYPE_03);
export_constant(MONSTER_TYPE_04);
export_constant(MONSTER_TYPE_05);
export_constant(MONSTER_TYPE_06);
export_constant(MONSTER_TYPE_07);
export_constant(MONSTER_TYPE_08);
export_constant(MONSTER_TYPE_09);
export_constant(MONSTER_TYPE_10);
export_constant(MONSTER_TYPE_11);
export_constant(MONSTER_TYPE_12);
export_constant(MONSTER_TYPE_13);
export_constant(MONSTER_TYPE_17);
export_constant(MONSTER_TYPE_19);
export_constant(MONSTER_TYPE_20);
export_constant(MONSTER_TYPE_21);
export_constant(MONSTER_TYPE_24);
export_constant(MONSTER_TYPE_25);
export_constant(MONSTER_TYPE_26);
export_constant(MONSTER_TYPE_27);
/* classes */
export_constant(CLASS_NONE);
export_constant(CLASS_NORMAL);
export_constant(CLASS_BOSS);
export_constant(CLASS_GUARDIAN);
export_constant(CLASS_BATTLEFIELD);
export_constant(CLASS_EVENT);
export_constant(CLASS_ALL);
export_constant(CLASS_MAX);
/* sizes */
export_constant2("Size_Small",SZ_SMALL);
@ -7607,15 +7633,15 @@
export_constant(MD_LOOTER);
export_constant(MD_AGGRESSIVE);
export_constant(MD_ASSIST);
export_constant(MD_CASTSENSOR_IDLE);
export_constant(MD_NORANDOM_WALK);
export_constant(MD_NOCAST_SKILL);
export_constant(MD_CASTSENSORIDLE);
export_constant(MD_NORANDOMWALK);
export_constant(MD_NOCAST);
export_constant(MD_CANATTACK);
export_constant(MD_CASTSENSOR_CHASE);
export_constant(MD_CASTSENSORCHASE);
export_constant(MD_CHANGECHASE);
export_constant(MD_ANGRY);
export_constant(MD_CHANGETARGET_MELEE);
export_constant(MD_CHANGETARGET_CHASE);
export_constant(MD_CHANGETARGETMELEE);
export_constant(MD_CHANGETARGETCHASE);
export_constant(MD_TARGETWEAK);
export_constant(MD_RANDOMTARGET);
export_constant(MD_IGNOREMELEE);
@ -7623,12 +7649,24 @@
export_constant(MD_IGNORERANGED);
export_constant(MD_MVP);
export_constant(MD_IGNOREMISC);
export_constant(MD_KNOCKBACK_IMMUNE);
export_constant(MD_TELEPORT_BLOCK);
export_constant(MD_FIXED_ITEMDROP);
export_constant(MD_KNOCKBACKIMMUNE);
export_constant(MD_TELEPORTBLOCK);
export_constant(MD_FIXEDITEMDROP);
export_constant(MD_DETECTOR);
export_constant(MD_STATUS_IMMUNE);
export_constant(MD_SKILL_IMMUNE);
export_constant(MD_STATUSIMMUNE);
export_constant(MD_SKILLIMMUNE);
export_deprecated_constant3("MD_CASTSENSOR_IDLE", MD_CASTSENSORIDLE, "MD_CASTSENSORIDLE");
export_deprecated_constant3("MD_NORANDOM_WALK", MD_NORANDOMWALK, "MD_NORANDOMWALK");
export_deprecated_constant3("MD_NOCAST_SKILL", MD_NOCAST, "MD_NOCAST");
export_deprecated_constant3("MD_CASTSENSOR_CHASE", MD_CASTSENSORCHASE, "MD_CASTSENSORCHASE");
export_deprecated_constant3("MD_CHANGETARGET_MELEE", MD_CHANGETARGETMELEE, "MD_CHANGETARGETMELEE");
export_deprecated_constant3("MD_CHANGETARGET_CHASE", MD_CHANGETARGETCHASE, "MD_CHANGETARGETCHASE");
export_deprecated_constant3("MD_KNOCKBACK_IMMUNE", MD_KNOCKBACKIMMUNE, "MD_KNOCKBACKIMMUNE");
export_deprecated_constant3("MD_TELEPORT_BLOCK", MD_TELEPORTBLOCK, "MD_TELEPORTBLOCK");
export_deprecated_constant3("MD_FIXED_ITEMDROP", MD_FIXEDITEMDROP, "MD_FIXEDITEMDROP");
export_deprecated_constant3("MD_STATUS_IMMUNE", MD_STATUSIMMUNE, "MD_STATUSIMMUNE");
export_deprecated_constant3("MD_SKILL_IMMUNE", MD_SKILLIMMUNE, "MD_SKILLIMMUNE");
/* guild storage flags */
export_constant(GSTORAGE_OPEN);

View File

@ -1602,7 +1602,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
case LK_SPIRALPIERCE:
case ML_SPIRALPIERCE:
if( dstsd || ( dstmd && status_bl_has_mode(bl,MD_STATUS_IMMUNE) ) ) //Does not work on status immune
if( dstsd || ( dstmd && status_bl_has_mode(bl,MD_STATUSIMMUNE) ) ) //Does not work on status immune
sc_start(src,bl,SC_STOP,100,0,skill_get_time2(skill_id,skill_lv));
break;
@ -2099,7 +2099,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
}
// Coma
if (sd && sd->special_state.bonus_coma && (!md || status_get_race2(&md->bl) != RC2_GVG || status_get_class(&md->bl) != CLASS_BATTLEFIELD)) {
if (sd && sd->special_state.bonus_coma && (!md || util::vector_exists(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_NODAMAGE)) {
@ -2284,7 +2284,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_STATUS_IMMUNE) &&
dstmd && !status_has_mode(tstatus,MD_STATUSIMMUNE) &&
(rnd()%10000 < sd->bonus.classchange))
{
int class_ = mob_get_random_id(MOBG_Branch_Of_Dead_Tree, RMF_DB_RATE, 0);
@ -3305,7 +3305,7 @@ 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_inf2(skill_id, INF2_TARGETEMPERIUM)))
if (status_bl_has_mode(bl,MD_SKILLIMMUNE) || (status_get_class(bl) == MOBID_EMPERIUM && !skill_get_inf2(skill_id, INF2_TARGETEMPERIUM)))
return 0;
if (src != dsrc) {
@ -3765,7 +3765,7 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list *
}
}
if(damage > 0 && !status_has_mode(tstatus,MD_STATUS_IMMUNE)) {
if(damage > 0 && !status_has_mode(tstatus,MD_STATUSIMMUNE)) {
if( skill_id == RG_INTIMIDATE ) {
int rate = 50 + skill_lv * 5;
rate = rate + (status_get_lv(src) - status_get_lv(bl));
@ -6561,7 +6561,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
heal = 0;
if( tsc && tsc->count ) {
if( tsc->data[SC_KAITE] && !status_has_mode(sstatus,MD_STATUS_IMMUNE) ) { //Bounce back heal
if( tsc->data[SC_KAITE] && !status_has_mode(sstatus,MD_STATUSIMMUNE) ) { //Bounce back heal
if (--tsc->data[SC_KAITE]->val2 <= 0)
status_change_end(bl, SC_KAITE, INVALID_TIMER);
if (src == bl)
@ -6809,14 +6809,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
{
int class_;
if ( sd && status_has_mode(&dstmd->status,MD_STATUS_IMMUNE) ) {
if ( sd && status_has_mode(&dstmd->status,MD_STATUSIMMUNE) ) {
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
class_ = (skill_id == SA_MONOCELL ? MOBID_PORING : mob_get_random_id(MOBG_ClassChange, RMF_DB_RATE, 0));
clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
mob_class_change(dstmd,class_);
if( tsc && status_has_mode(&dstmd->status,MD_STATUS_IMMUNE) ) {
if( tsc && status_has_mode(&dstmd->status,MD_STATUSIMMUNE) ) {
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);
@ -6826,7 +6826,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_STATUS_IMMUNE) ) {
if ( sd && dstmd && status_has_mode(&dstmd->status,MD_STATUSIMMUNE) ) {
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
@ -7265,7 +7265,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_STATUS_IMMUNE) || battle_check_undead(tstatus->race,tstatus->def_ele) ) {
if( status_has_mode(tstatus,MD_STATUSIMMUNE) || battle_check_undead(tstatus->race,tstatus->def_ele) ) {
map_freeblock_unlock();
return 1;
}
@ -7444,7 +7444,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_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]
} else if (dstmd && !status_has_mode(tstatus,MD_STATUSIMMUNE) && 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);
} else {
@ -7855,7 +7855,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_HUMAN || tstatus->race == RC_PLAYER_DORAM || tstatus->race == RC_ANGEL)
&& !status_has_mode(tstatus,MD_STATUS_IMMUNE) )
&& !status_has_mode(tstatus,MD_STATUSIMMUNE) )
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
{
@ -7914,7 +7914,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_STATUS_IMMUNE)) {
if (status_has_mode(tstatus,MD_STATUSIMMUNE)) {
if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
@ -8597,7 +8597,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_STATUS_IMMUNE)) { //Only 10% success chance against status immune. [Skotlex]
if (status_has_mode(tstatus,MD_STATUSIMMUNE)) { //Only 10% success chance against status immune. [Skotlex]
if (rnd()%100 < 90)
{
if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
@ -8682,7 +8682,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 || status_has_mode(tstatus,MD_STATUS_IMMUNE))) // Only works on monsters (Except status immune monsters).
if (sd && (!dstmd || status_has_mode(tstatus,MD_STATUSIMMUNE))) // Only works on monsters (Except status immune monsters).
break;
case NPC_ATTRICHANGE:
case NPC_CHANGEWATER:
@ -8737,7 +8737,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case NPC_SUMMONMONSTER:
case NPC_DEATHSUMMON:
if(md && md->skill_idx >= 0)
mob_summonslave(md,md->db->skill[md->skill_idx].val,skill_lv,skill_id);
mob_summonslave(md,md->db->skill[md->skill_idx]->val,skill_lv,skill_id);
break;
case NPC_CALLSLAVE:
@ -8788,9 +8788,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case NPC_TRANSFORMATION:
case NPC_METAMORPHOSIS:
if(md && md->skill_idx >= 0) {
int class_ = mob_random_class (md->db->skill[md->skill_idx].val,0);
int class_ = mob_random_class (md->db->skill[md->skill_idx]->val,0);
if (skill_lv > 1) //Multiply the rest of mobs. [Skotlex]
mob_summonslave(md,md->db->skill[md->skill_idx].val,skill_lv-1,skill_id);
mob_summonslave(md,md->db->skill[md->skill_idx]->val,skill_lv-1,skill_id);
if (class_) mob_class_change(md, class_);
}
break;
@ -8805,19 +8805,19 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
//val[4] if set, asks to delete the previous mode change.
if(md && md->skill_idx >= 0 && tsc)
{
clif_emotion(bl, md->db->skill[md->skill_idx].val[0]);
if(md->db->skill[md->skill_idx].val[4] && tsce)
clif_emotion(bl, md->db->skill[md->skill_idx]->val[0]);
if(md->db->skill[md->skill_idx]->val[4] && tsce)
status_change_end(bl, type, INVALID_TIMER);
//If mode gets set by NPC_EMOTION then the target should be reset [Playtester]
if(!battle_config.npc_emotion_behavior && skill_id == NPC_EMOTION && md->db->skill[md->skill_idx].val[1])
if(!battle_config.npc_emotion_behavior && skill_id == NPC_EMOTION && md->db->skill[md->skill_idx]->val[1])
mob_unlocktarget(md,tick);
if(md->db->skill[md->skill_idx].val[1] || md->db->skill[md->skill_idx].val[2])
if(md->db->skill[md->skill_idx]->val[1] || md->db->skill[md->skill_idx]->val[2])
sc_start4(src,src, type, 100, skill_lv,
md->db->skill[md->skill_idx].val[1],
md->db->skill[md->skill_idx].val[2],
md->db->skill[md->skill_idx].val[3],
md->db->skill[md->skill_idx]->val[1],
md->db->skill[md->skill_idx]->val[2],
md->db->skill[md->skill_idx]->val[3],
skill_get_time(skill_id, skill_lv));
//Reset aggressive state depending on resulting mode
@ -9067,7 +9067,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_STATUS_IMMUNE)
if( status_has_mode(tstatus,MD_STATUSIMMUNE)
// Renewal dropped the 3/4 hp requirement
#ifndef RENEWAL
|| tstatus-> hp > tstatus->max_hp*3/4
@ -9086,7 +9086,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case PF_MINDBREAKER:
{
if(status_has_mode(tstatus,MD_STATUS_IMMUNE) || battle_check_undead(tstatus->race,tstatus->def_ele)) {
if(status_has_mode(tstatus,MD_STATUSIMMUNE) || battle_check_undead(tstatus->race,tstatus->def_ele)) {
map_freeblock_unlock();
return 1;
}
@ -11250,7 +11250,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.
|| status_bl_has_mode(bl,MD_STATUS_IMMUNE) ) ){ // Does not work on status immune monsters.
|| status_bl_has_mode(bl,MD_STATUSIMMUNE) ) ){ // Does not work on status immune monsters.
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
@ -11674,7 +11674,7 @@ static int8 skill_castend_id_check(struct block_list *src, struct block_list *ta
int inf = skill->inf;
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->inf2[INF2_TARGETEMPERIUM])) && skill_get_casttype(skill_id) == CAST_NODAMAGE)
if (src != target && (status_bl_has_mode(target,MD_SKILLIMMUNE) || (status_get_class(target) == MOBID_EMPERIUM && !skill->inf2[INF2_TARGETEMPERIUM])) && 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) {
@ -11922,8 +11922,8 @@ TIMER_FUNC(skill_castend_id){
if(md) {
md->last_thinktime=tick +MIN_MOBTHINKTIME;
if(md->skill_idx >= 0 && md->db->skill[md->skill_idx].emotion >= 0)
clif_emotion(src, md->db->skill[md->skill_idx].emotion);
if(md->skill_idx >= 0 && md->db->skill[md->skill_idx]->emotion >= 0)
clif_emotion(src, md->db->skill[md->skill_idx]->emotion);
}
if (src != target && battle_config.skill_add_range &&
@ -11952,7 +11952,7 @@ TIMER_FUNC(skill_castend_id){
break;
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_inf2(ud->skill_id, INF2_TARGETEMPERIUM))) && skill_get_casttype(ud->skill_id) == CAST_DAMAGE) {
if (src != target && (status_bl_has_mode(target,MD_SKILLIMMUNE) || (status_get_class(target) == MOBID_EMPERIUM && !skill_get_inf2(ud->skill_id, INF2_TARGETEMPERIUM))) && 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)
}
@ -12180,8 +12180,8 @@ TIMER_FUNC(skill_castend_pos){
if(md) {
md->last_thinktime=tick +MIN_MOBTHINKTIME;
if(md->skill_idx >= 0 && md->db->skill[md->skill_idx].emotion >= 0)
clif_emotion(src, md->db->skill[md->skill_idx].emotion);
if(md->skill_idx >= 0 && md->db->skill[md->skill_idx]->emotion >= 0)
clif_emotion(src, md->db->skill[md->skill_idx]->emotion);
}
if(battle_config.skill_log && battle_config.skill_log&src->type)
@ -14794,7 +14794,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
}
break;
case UNT_NETHERWORLD:
if (!status_bl_has_mode(bl,MD_STATUS_IMMUNE) || (!map_flag_gvg2(ss->m) && battle_check_target(&unit->bl,bl,BCT_PARTY) < 0)) {
if (!status_bl_has_mode(bl,MD_STATUSIMMUNE) || (!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);
@ -14824,7 +14824,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
case UNT_WALLOFTHORN:
if (unit->val2-- <= 0) // Max hit reached
break;
if (status_bl_has_mode(bl,MD_STATUS_IMMUNE))
if (status_bl_has_mode(bl,MD_STATUSIMMUNE))
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), unit_getdir(bl), BLOWN_IGNORE_NO_KNOCKBACK);
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);
@ -18409,7 +18409,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_STATUS_IMMUNE))
if (status_bl_has_mode(bl,MD_STATUSIMMUNE))
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);

View File

@ -2396,13 +2396,13 @@ 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_STATUS_IMMUNE)
&& !status_has_mode(status,MD_STATUSIMMUNE)
&& (src->type != BL_PC || ((TBL_PC*)src)->skillitem != skill_id))
return false;
break;
case SC_MANHOLE:
// Skill is disabled against special racial grouped monsters(GvG and Battleground)
if (target && ( status_get_race2(target) == RC2_GVG || status_get_race2(target) == RC2_BATTLEFIELD ) )
if (target && ( util::vector_exists(status_get_race2(target), RC2_GVG) || util::vector_exists(status_get_race2(target), RC2_BATTLEFIELD) ) )
return false;
default:
break;
@ -2415,7 +2415,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_STATUS_IMMUNE) && ( // Applies to after cast completion only and doesn't apply to Boss monsters.
if (flag == 1 && !status_has_mode(status,MD_STATUSIMMUNE) && ( // 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.
)) {
@ -3848,7 +3848,7 @@ int status_calc_pc_sub(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 = static_cast<e_mode>(MD_MASK&~(MD_STATUS_IMMUNE|MD_IGNOREMELEE|MD_IGNOREMAGIC|MD_IGNORERANGED|MD_IGNOREMISC|MD_DETECTOR|MD_ANGRY|MD_TARGETWEAK));
base_status->mode = static_cast<e_mode>(MD_MASK&~(MD_STATUSIMMUNE|MD_IGNOREMELEE|MD_IGNOREMAGIC|MD_IGNORERANGED|MD_IGNOREMISC|MD_DETECTOR|MD_ANGRY|MD_TARGETWEAK));
base_status->size = (sd->class_&JOBL_BABY) ? SZ_SMALL : (((sd->class_&MAPID_BASEMASK) == MAPID_SUMMONER) ? battle_config.summoner_size : SZ_MEDIUM);
if (battle_config.character_size && pc_isriding(sd)) { // [Lupus]
@ -5529,10 +5529,13 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
if(flag&SCB_MODE) {
status->mode = status_calc_mode(bl, sc, b_status->mode);
// Only switch between Normal and Boss classes as the others are determined by the race value
if (status->class_ == CLASS_NORMAL && status_has_mode(status, MD_STATUS_IMMUNE|MD_KNOCKBACK_IMMUNE|MD_DETECTOR))
if (status->class_ != CLASS_BATTLEFIELD && status_has_mode(status, MD_STATUSIMMUNE|MD_SKILLIMMUNE))
status->class_ = CLASS_BATTLEFIELD;
else if (status->class_ != CLASS_BOSS && status_has_mode(status, MD_STATUSIMMUNE|MD_KNOCKBACKIMMUNE|MD_DETECTOR))
status->class_ = CLASS_BOSS;
else if (status->class_ == CLASS_BOSS && !status_has_mode(status, MD_STATUS_IMMUNE|MD_KNOCKBACK_IMMUNE|MD_DETECTOR))
else if (status->class_ != CLASS_GUARDIAN && status_has_mode(status, MD_STATUSIMMUNE))
status->class_ = CLASS_GUARDIAN;
else if (status->class_ != CLASS_NORMAL)
status->class_ = CLASS_NORMAL;
// Since mode changed, reset their state.
@ -8000,7 +8003,7 @@ void status_calc_slave_mode(struct mob_data *md, struct mob_data *mmd)
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);
sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, MD_CANMOVE|MD_NORANDOMWALK|MD_CANATTACK, 0, 0, 0);
break;
default: //Copy master
if (status_has_mode(&mmd->status,MD_AGGRESSIVE))
@ -8308,15 +8311,15 @@ int status_get_emblem_id(struct block_list *bl)
* @param bl: Object whose race2 to get [MOB|PET]
* @return race2
*/
enum e_race2 status_get_race2(struct block_list *bl)
std::vector<e_race2> status_get_race2(struct block_list *bl)
{
nullpo_retr(RC2_NONE,bl);
nullpo_retr(std::vector<e_race2>(),bl);
if (bl->type == BL_MOB)
return ((struct mob_data *)bl)->db->race2;
if (bl->type == BL_PET)
return ((struct pet_data *)bl)->db->race2;
return RC2_NONE;
return std::vector<e_race2>();
}
/**
@ -8723,7 +8726,7 @@ t_tick status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_
sc_def2 = status->mdef*100;
break;
case SC_ANKLE:
if(status_has_mode(status,MD_STATUS_IMMUNE)) // Lasts 5 times less on bosses
if(status_has_mode(status,MD_STATUSIMMUNE)) // Lasts 5 times less on bosses
tick /= 5;
sc_def = status->agi*50;
break;
@ -9106,7 +9109,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
// 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 (util::vector_exists(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.
@ -9563,7 +9566,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
}
// Check for resistances
if(status_has_mode(status,MD_STATUS_IMMUNE) && !(flag&SCSTART_NOAVOID)) {
if(status_has_mode(status,MD_STATUSIMMUNE) && !(flag&SCSTART_NOAVOID)) {
if (type>=SC_COMMON_MIN && type <= SC_COMMON_MAX)
return 0;
switch (type) {
@ -11079,7 +11082,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_STATUS_IMMUNE))
if(status_has_mode(status,MD_STATUSIMMUNE))
tick /= 5; // !TODO: Reduce skill's duration. But for how long?
break;
case SC_ARMOR:
@ -11792,7 +11795,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_STATUS_IMMUNE)) {
if (!status_bl_has_mode(bl,MD_STATUSIMMUNE)) {
val2 = 50;
if (status_get_race(bl) == RC_PLANT) // plant type
val3 = 50;
@ -15191,7 +15194,7 @@ int status_change_spread(struct block_list *src, struct block_list *bl, bool typ
tick = gettick();
// Status Immunity resistance
if (status_bl_has_mode(src,MD_STATUS_IMMUNE) || status_bl_has_mode(bl,MD_STATUS_IMMUNE))
if (status_bl_has_mode(src,MD_STATUSIMMUNE) || status_bl_has_mode(bl,MD_STATUSIMMUNE))
return 0;
for( i = SC_COMMON_MIN; i < SC_MAX; i++ ) {

View File

@ -2732,7 +2732,7 @@ unsigned char status_calc_attack_element(struct block_list *bl, struct status_ch
int status_get_party_id(struct block_list *bl);
int status_get_guild_id(struct block_list *bl);
int status_get_emblem_id(struct block_list *bl);
enum e_race2 status_get_race2(struct block_list *bl);
std::vector<e_race2> status_get_race2(struct block_list *bl);
struct view_data *status_get_viewdata(struct block_list *bl);
void status_set_viewdata(struct block_list *bl, int class_);

View File

@ -412,7 +412,7 @@ static TIMER_FUNC(unit_walktoxy_timer)
case BL_MOB:
md = BL_CAST(BL_MOB, bl);
if (status_has_mode(&md->status,MD_STATUS_IMMUNE))
if (status_has_mode(&md->status,MD_STATUSIMMUNE))
icewall_walk_block = battle_config.boss_icewall_walk_block;
else
icewall_walk_block = battle_config.mob_icewall_walk_block;
@ -1216,7 +1216,7 @@ enum e_unit_blown unit_blown_immune(struct block_list* bl, uint8 flag)
switch (bl->type) {
case BL_MOB:
// Immune can't be knocked back
if (((flag&0x1) && status_bl_has_mode(bl,MD_KNOCKBACK_IMMUNE))
if (((flag&0x1) && status_bl_has_mode(bl,MD_KNOCKBACKIMMUNE))
&& ((flag&0x2) || !(battle_config.skill_trap_type&0x2)))
return UB_MD_KNOCKBACK_IMMUNE;
break;
@ -1488,8 +1488,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_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)))) {
if(md && ((status_has_mode(&md->status,MD_STATUSIMMUNE) && battle_config.boss_icewall_walk_block == 1 && map_getcell(bl->m,bl->x,bl->y,CELL_CHKICEWALL))
|| (!status_has_mode(&md->status,MD_STATUSIMMUNE) && 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;
}
@ -1541,7 +1541,7 @@ int unit_set_walkdelay(struct block_list *bl, t_tick tick, t_tick delay, int typ
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_STATUS_IMMUNE))
if(bl->type == BL_MOB && status_has_mode(status_get_status_data(bl),MD_STATUSIMMUNE))
return 0;
//Make sure walk delay is not decreased
if (DIFF_TICK(ud->canmove_tick, tick+delay) > 0)
@ -1965,11 +1965,11 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
mobskill_event(md, src, tick, -1); // Cast targetted skill event.
if ((status_has_mode(tstatus,MD_CASTSENSOR_IDLE) || status_has_mode(tstatus,MD_CASTSENSOR_CHASE)) && battle_check_target(target, src, BCT_ENEMY) > 0) {
if ((status_has_mode(tstatus,MD_CASTSENSORIDLE) || status_has_mode(tstatus,MD_CASTSENSORCHASE)) && battle_check_target(target, src, BCT_ENEMY) > 0) {
switch (md->state.skillstate) {
case MSS_RUSH:
case MSS_FOLLOW:
if (!status_has_mode(tstatus,MD_CASTSENSOR_CHASE))
if (!status_has_mode(tstatus,MD_CASTSENSORCHASE))
break;
md->target_id = src->id;
@ -1978,7 +1978,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
break;
case MSS_IDLE:
case MSS_WALK:
if (!status_has_mode(tstatus,MD_CASTSENSOR_IDLE))
if (!status_has_mode(tstatus,MD_CASTSENSORIDLE))
break;
md->target_id = src->id;

View File

@ -17,6 +17,7 @@
#include <stdio.h>
#endif
#include <math.h>
#include <yaml-cpp/yaml.h>
#include "../common/cbasetypes.hpp"
@ -190,6 +191,14 @@ static std::unordered_map<std::string, equip_pos> um_equipnames {
{ "Shadow_Left_Accessory", EQP_SHADOW_ACC_L },
};
struct s_mob_drop_csv : s_mob_drop {
std::string group_string;
bool mvp;
};
std::unordered_map<uint16, std::vector<uint32>> mob_race2;
std::map<uint32, std::vector<s_mob_drop_csv>> mob_drop;
// Forward declaration of conversion functions
static bool guild_read_guildskill_tree_db( char* split[], int columns, int current );
static bool pet_read_db( const char* file );
@ -219,6 +228,9 @@ static bool itemdb_read_randomopt_group(char *str[], int columns, int current);
static bool itemdb_randomopt_group_yaml(void);
static bool pc_readdb_levelpenalty(char* fields[], int columns, int current);
static bool pc_levelpenalty_yaml();
static bool mob_readdb_race2(char *fields[], int columns, int current);
static bool mob_readdb_drop(char *str[], int columns, int current);
static bool mob_readdb_sub(char *fields[], int columns, int current);
// Constants for conversion
std::unordered_map<t_itemid, std::string> aegis_itemnames;
@ -229,7 +241,7 @@ std::unordered_map<const char*, int64> constants;
// Forward declaration of constant loading functions
static bool parse_item_constants_txt( const char* path );
static bool parse_mob_constants( char* split[], int columns, int current );
static bool parse_mob_constants_txt( char* split[], int columns, int current );
static bool parse_skill_constants_txt( char* split[], int columns, int current );
static void init_random_option_constants();
@ -285,6 +297,17 @@ static void item_txt_data(const std::string& modePath, const std::string& fixedP
sv_readdb(modePath.c_str(), "item_trade.txt", ',', 3, 3, -1, &itemdb_read_itemtrade, false);
}
// Mob database data to memory
static void mob_txt_data(const std::string &modePath, const std::string &fixedPath) {
mob_race2.clear();
mob_drop.clear();
if (fileExists(modePath + "/mob_race2_db.txt"))
sv_readdb(modePath.c_str(), "mob_race2_db.txt", ',', 2, 100, -1, mob_readdb_race2, false);
if (fileExists(modePath + "/mob_drop.txt"))
sv_readdb(modePath.c_str(), "mob_drop.txt", ',', 3, 5, -1, mob_readdb_drop, false);
}
YAML::Emitter body;
// Implement the function instead of including the original version by linking
@ -429,8 +452,12 @@ int do_init( int argc, char** argv ){
parse_item_constants_txt( ( path_db_mode + "item_db.txt" ).c_str() );
parse_item_constants_txt( ( path_db_import + "item_db.txt" ).c_str() );
}
sv_readdb( path_db_mode.c_str(), "mob_db.txt", ',', 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, -1, &parse_mob_constants, false );
sv_readdb( path_db_import.c_str(), "mob_db.txt", ',', 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, -1, &parse_mob_constants, false );
if (fileExists(mob_db.getDefaultLocation())) {
mob_db.load();
} else {
sv_readdb(path_db_mode.c_str(), "mob_db.txt", ',', 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, -1, &parse_mob_constants_txt, false);
sv_readdb(path_db_import.c_str(), "mob_db.txt", ',', 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, -1, &parse_mob_constants_txt, false);
}
if (fileExists(skill_db.getDefaultLocation())) {
skill_db.load();
} else {
@ -555,6 +582,20 @@ int do_init( int argc, char** argv ){
}
#endif
mob_txt_data(path_db_mode, path_db);
if (!process("MOB_DB", 1, { path_db_mode }, "mob_db", [](const std::string &path, const std::string &name_ext) -> bool {
return sv_readdb(path.c_str(), name_ext.c_str(), ',', 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, -1, &mob_readdb_sub, false);
})) {
return 0;
}
mob_txt_data(path_db_import, path_db_import);
if (!process("MOB_DB", 1, { path_db_import }, "mob_db", [](const std::string &path, const std::string &name_ext) -> bool {
return sv_readdb(path.c_str(), name_ext.c_str(), ',', 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, 31 + 2 * MAX_MVP_DROP + 2 * MAX_MOB_DROP, -1, &mob_readdb_sub, false);
})) {
return 0;
}
// TODO: add implementations ;-)
return 0;
@ -786,7 +827,7 @@ void ItemDatabase::loadingFinished(){
ItemDatabase item_db;
static bool parse_mob_constants( char* split[], int columns, int current ){
static bool parse_mob_constants_txt( char* split[], int columns, int current ){
uint16 mob_id = atoi( split[0] );
char* name = trim( split[1] );
@ -795,6 +836,32 @@ static bool parse_mob_constants( char* split[], int columns, int current ){
return true;
}
const std::string MobDatabase::getDefaultLocation(){
return std::string( db_path ) + "/mob_db.yml";
}
uint64 MobDatabase::parseBodyNode(const YAML::Node& node) {
uint16 mob_id;
if (!this->asUInt16(node, "Id", mob_id))
return 0;
if (this->nodeExists(node, "AegisName")) {
std::string name;
if (!this->asString(node, "AegisName", name))
return 0;
aegis_mobnames[mob_id] = name;
}
return 1;
}
void MobDatabase::loadingFinished() {};
MobDatabase mob_db;
static bool parse_skill_constants_txt( char* split[], int columns, int current ){
uint16 skill_id = atoi( split[0] );
char* name = trim( split[16] );
@ -3843,3 +3910,446 @@ void init_random_option_constants() {
#undef export_constant2
}
// mob_db.yml function
//--------------------
static bool mob_readdb_race2(char *fields[], int columns, int current) {
int64 race;
if (ISDIGIT(fields[0][0]))
race = strtoll(fields[0], nullptr, 10);
else if ((race = constant_lookup_int(fields[0])) == -100) {
ShowWarning("mob_readdb_race2: Unknown race2 constant \"%s\".\n", fields[0]);
return false;
}
std::vector<uint32> mobs;
for (uint16 i = 1; i < columns; i++) {
uint32 mob_id = strtol(fields[i], nullptr, 10);
std::string *mob_name = util::umap_find(aegis_mobnames, static_cast<uint16>(mob_id));
if (!mob_name) {
ShowWarning("mob_readdb_race2: Unknown mob id %d for race2 %lld.\n", mob_id, race);
continue;
}
mobs.push_back(mob_id);
}
mob_race2.insert({ static_cast<uint16>(race), mobs });
return true;
}
// mob_db.yml function
//--------------------
static bool mob_readdb_drop(char *str[], int columns, int current) {
uint32 mob_id = strtoul(str[0], nullptr, 10);
std::string *mob_name = util::umap_find(aegis_mobnames, static_cast<uint16>(mob_id));
if (!mob_name) {
ShowWarning("mob_readdb_drop: Unknown mob ID %s.\n", str[0]);
return false;
}
t_itemid nameid = strtoul(str[1], nullptr, 10);
std::string *item_name = util::umap_find(aegis_itemnames, nameid);
if (!item_name) {
ShowWarning("mob_readdb_drop: Invalid item ID %s.\n", str[1]);
return false;
}
int32 rate = atoi(str[2]);
s_mob_drop_csv entry = {};
uint8 flag = 0;
if (columns > 4)
flag = atoi(str[4]);
entry.nameid = nameid;
entry.rate = rate;
entry.steal_protected = (flag & 1) ? 1 : 0;
entry.mvp = (flag & 2) ? true : false;
if (columns > 3)
entry.group_string = trim(str[3]);
const auto &exists = mob_drop.find(mob_id);
if (exists != mob_drop.end())
exists->second.push_back(entry);
else {
std::vector<s_mob_drop_csv> drop;
drop.push_back(entry);
mob_drop.insert({ mob_id, drop });
}
return true;
}
// Copied and adjusted from mob.cpp
static bool mob_readdb_sub(char *fields[], int columns, int current) {
uint32 mob_id = strtoul(fields[0], nullptr, 10);
body << YAML::BeginMap;
body << YAML::Key << "Id" << YAML::Value << mob_id;
body << YAML::Key << "AegisName" << YAML::Value << fields[1];
body << YAML::Key << "Name" << YAML::Value << fields[3];
if (strcmp(fields[3], fields[2]) != 0)
body << YAML::Key << "JapaneseName" << YAML::Value << fields[2];
if (strtol(fields[4], nullptr, 10) > 0)
body << YAML::Key << "Level" << YAML::Value << fields[4];
if (strtol(fields[5], nullptr, 10) > 1)
body << YAML::Key << "Hp" << YAML::Value << fields[5];
if (strtol(fields[6], nullptr, 10) > 1)
body << YAML::Key << "Sp" << YAML::Value << fields[6];
if (strtol(fields[7], nullptr, 10) > 0)
body << YAML::Key << "BaseExp" << YAML::Value << fields[7];
if (strtol(fields[8], nullptr, 10) > 0)
body << YAML::Key << "JobExp" << YAML::Value << fields[8];
if (strtol(fields[30], nullptr, 10) > 0)
body << YAML::Key << "MvpExp" << YAML::Value << fields[30];
if (strtol(fields[10], nullptr, 10) > 0)
body << YAML::Key << "Attack" << YAML::Value << fields[10];
if (strtol(fields[11], nullptr, 10) > 0)
body << YAML::Key << "Attack2" << YAML::Value << fields[11];
if (strtol(fields[12], nullptr, 10) > 0)
body << YAML::Key << "Defense" << YAML::Value << cap_value(std::stoi(fields[12]), DEFTYPE_MIN, DEFTYPE_MAX);
if (strtol(fields[13], nullptr, 10) > 0)
body << YAML::Key << "MagicDefense" << YAML::Value << cap_value(std::stoi(fields[13]), DEFTYPE_MIN, DEFTYPE_MAX);
if (strtol(fields[14], nullptr, 10) > 1)
body << YAML::Key << "Str" << YAML::Value << fields[14];
if (strtol(fields[15], nullptr, 10) > 1)
body << YAML::Key << "Agi" << YAML::Value << fields[15];
if (strtol(fields[16], nullptr, 10) > 1)
body << YAML::Key << "Vit" << YAML::Value << fields[16];
if (strtol(fields[17], nullptr, 10) > 1)
body << YAML::Key << "Int" << YAML::Value << fields[17];
if (strtol(fields[18], nullptr, 10) > 1)
body << YAML::Key << "Dex" << YAML::Value << fields[18];
if (strtol(fields[19], nullptr, 10) > 1)
body << YAML::Key << "Luk" << YAML::Value << fields[19];
if (strtol(fields[9], nullptr, 10) > 0)
body << YAML::Key << "AttackRange" << YAML::Value << fields[9];
if (strtol(fields[20], nullptr, 10) > 0)
body << YAML::Key << "SkillRange" << YAML::Value << fields[20];
if (strtol(fields[21], nullptr, 10) > 0)
body << YAML::Key << "ChaseRange" << YAML::Value << fields[21];
if (fields[22])
body << YAML::Key << "Size" << YAML::Value << constant_lookup(strtol(fields[22], nullptr, 10), "Size_") + 5;
if (fields[23])
body << YAML::Key << "Race" << YAML::Value << name2Upper(constant_lookup(strtol(fields[23], nullptr, 10), "RC_") + 3);
std::string class_ = "Normal";
bool header = false;
for (const auto &race2 : mob_race2) {
for (const auto &mobit : race2.second) {
if (mobit == mob_id) {
// These two races are now Class types
if (race2.first == RC2_GUARDIAN) {
class_ = "Guardian";
continue;
} else if (race2.first == RC2_BATTLEFIELD) {
class_ = "Battlefield";
continue;
}
if (!header) {
body << YAML::Key << "RaceGroups";
body << YAML::BeginMap;
}
body << YAML::Key << name2Upper(constant_lookup(race2.first, "RC2_") + 4) << YAML::Value << "true";
if (!header) {
body << YAML::EndMap;
header = true;
}
}
}
}
if (fields[24]) {
int ele = strtol(fields[24], nullptr, 10);
body << YAML::Key << "Element" << YAML::Value << name2Upper(constant_lookup(ele % 20, "ELE_") + 4);
body << YAML::Key << "ElementLevel" << YAML::Value << floor(ele / 20.);
}
if (strtol(fields[26], nullptr, 10) > 0)
body << YAML::Key << "WalkSpeed" << YAML::Value << cap_value(std::stoi(fields[26]), MIN_WALK_SPEED, MAX_WALK_SPEED);
if (strtol(fields[27], nullptr, 10) > 0)
body << YAML::Key << "AttackDelay" << YAML::Value << fields[27];
if (strtol(fields[28], nullptr, 10) > 0)
body << YAML::Key << "AttackMotion" << YAML::Value << fields[28];
if (strtol(fields[29], nullptr, 10) > 0)
body << YAML::Key << "DamageMotion" << YAML::Value << fields[29];
if (fields[25]) {
uint32 mode = static_cast<e_mode>(strtoul(fields[25], nullptr, 0));
std::string ai = "06";
if ((mode & 0xC000000) == 0xC000000) {
mode &= ~0xC000000;
class_ = "Battlefield";
} else if (class_.compare("Normal") == 0 && (mode & 0x6200000) == 0x6200000) { // Check for normal because class would have been changed above in RaceGroups
mode &= ~0x6200000;
class_ = "Boss";
} else if ((mode & 0x4000000) == 0x4000000) {
mode &= ~0x4000000;
class_ = "Guardian";
} else if ((mode & 0x1000000) == 0x1000000) {
mode &= ~0x1000000;
class_ = "Event";
}
if ((mode & MONSTER_TYPE_26) == MONSTER_TYPE_26) {
mode &= ~MONSTER_TYPE_26;
ai = "26";
} else if ((mode & MONSTER_TYPE_27) == MONSTER_TYPE_27) {
mode &= ~MONSTER_TYPE_27;
ai = "27";
} else if ((mode & MONSTER_TYPE_08) == MONSTER_TYPE_08) {
mode &= ~MONSTER_TYPE_08;
ai = "08";
} else if ((mode & MONSTER_TYPE_04) == MONSTER_TYPE_04) {
mode &= ~MONSTER_TYPE_04;
ai = "04";
} else if ((mode & MONSTER_TYPE_21) == MONSTER_TYPE_21) {
mode &= ~MONSTER_TYPE_21;
ai = "21";
} else if ((mode & MONSTER_TYPE_20) == MONSTER_TYPE_20) {
mode &= ~MONSTER_TYPE_20;
ai = "20";
} else if ((mode & MONSTER_TYPE_09) == MONSTER_TYPE_09) { // 9, 19
mode &= ~MONSTER_TYPE_09;
ai = "09";
} else if ((mode & MONSTER_TYPE_13) == MONSTER_TYPE_13) {
mode &= ~MONSTER_TYPE_13;
ai = "13";
} else if ((mode & MONSTER_TYPE_05) == MONSTER_TYPE_05) { // 5, 12
mode &= ~MONSTER_TYPE_05;
ai = "05";
} else if ((mode & MONSTER_TYPE_07) == MONSTER_TYPE_07) {
mode &= ~MONSTER_TYPE_07;
ai = "07";
} else if ((mode & MONSTER_TYPE_03) == MONSTER_TYPE_03) {
mode &= ~MONSTER_TYPE_03;
ai = "03";
} else if ((mode & MONSTER_TYPE_24) == MONSTER_TYPE_24) {
mode &= ~MONSTER_TYPE_24;
ai = "24";
} else if ((mode & MONSTER_TYPE_17) == MONSTER_TYPE_17) {
mode &= ~MONSTER_TYPE_17;
ai = "17";
} else if ((mode & MONSTER_TYPE_10) == MONSTER_TYPE_10) { // 10, 11
mode &= ~MONSTER_TYPE_10;
ai = "10";
} else if ((mode & MONSTER_TYPE_02) == MONSTER_TYPE_02) {
mode &= ~MONSTER_TYPE_02;
ai = "02";
} else if ((mode & MONSTER_TYPE_01) == MONSTER_TYPE_01) {
mode &= ~MONSTER_TYPE_01;
ai = "01";
} else if ((mode & MONSTER_TYPE_25) == MONSTER_TYPE_25) {
mode &= ~MONSTER_TYPE_25;
ai = "25";
} else if ((mode & MONSTER_TYPE_06) == MONSTER_TYPE_06)
ai = "06";
if (ai.compare("06") != 0)
body << YAML::Key << "Ai" << YAML::Value << ai;
if (class_.compare("Normal") != 0)
body << YAML::Key << "Class" << YAML::Value << class_;
if (mode > 0) {
body << YAML::Key << "Modes";
body << YAML::BeginMap;
if (mode & 0x1)
body << YAML::Key << "CanMove" << YAML::Value << "true";
if (mode & 0x80)
body << YAML::Key << "CanAttack" << YAML::Value << "true";
if (mode & 0x40)
body << YAML::Key << "NoCast" << YAML::Value << "true";
if (mode & 0x2)
body << YAML::Key << "Looter" << YAML::Value << "true";
if (mode & 0x4)
body << YAML::Key << "Aggressive" << YAML::Value << "true";
if (mode & 0x8)
body << YAML::Key << "Assist" << YAML::Value << "true";
if (mode & 0x20)
body << YAML::Key << "NoRandomWalk" << YAML::Value << "true";
if (mode & 0x200)
body << YAML::Key << "CastSensorChase" << YAML::Value << "true";
if (mode & 0x10)
body << YAML::Key << "CastSensorIdle" << YAML::Value << "true";
if (mode & 0x800)
body << YAML::Key << "Angry" << YAML::Value << "true";
if (mode & 0x400)
body << YAML::Key << "ChangeChase" << YAML::Value << "true";
if (mode & 0x1000)
body << YAML::Key << "ChangeTargetMelee" << YAML::Value << "true";
if (mode & 0x2000)
body << YAML::Key << "ChangeTargetChase" << YAML::Value << "true";
if (mode & 0x4000)
body << YAML::Key << "TargetWeak" << YAML::Value << "true";
if (mode & 0x8000)
body << YAML::Key << "RandomTarget" << YAML::Value << "true";
if (mode & 0x20000)
body << YAML::Key << "IgnoreMagic" << YAML::Value << "true";
if (mode & 0x10000)
body << YAML::Key << "IgnoreMelee" << YAML::Value << "true";
if (mode & 0x100000)
body << YAML::Key << "IgnoreMisc" << YAML::Value << "true";
if (mode & 0x40000)
body << YAML::Key << "IgnoreRanged" << YAML::Value << "true";
if (mode & 0x400000)
body << YAML::Key << "TeleportBlock" << YAML::Value << "true";
if (mode & 0x1000000)
body << YAML::Key << "FixedItemDrop" << YAML::Value << "true";
if (mode & 0x2000000)
body << YAML::Key << "Detector" << YAML::Value << "true";
if (mode & 0x200000)
body << YAML::Key << "KnockBackImmune" << YAML::Value << "true";
if (mode & 0x4000000)
body << YAML::Key << "StatusImmune" << YAML::Value << "true";
if (mode & 0x8000000)
body << YAML::Key << "SkillImmune" << YAML::Value << "true";
if (mode & 0x80000)
body << YAML::Key << "Mvp" << YAML::Value << "true";
body << YAML::EndMap;
}
}
bool has_mvp_drops = false;
for (uint8 d = 31; d < (31 + MAX_MVP_DROP * 2); d += 2) {
if (strtoul(fields[d], nullptr, 10) > 0) {
has_mvp_drops = true;
break;
}
}
if (has_mvp_drops) {
body << YAML::Key << "MvpDrops";
body << YAML::BeginSeq;
for (uint8 i = 0; i < MAX_MVP_DROP; i++) {
t_itemid nameid = strtoul(fields[31 + i * 2], nullptr, 10);
if (nameid > 0) {
std::string *item_name = util::umap_find(aegis_itemnames, nameid);
if (!item_name) {
ShowWarning("Monster \"%s\"(id: %d) is dropping an unknown item \"%u\"(MVP-Drop %d)\n", fields[1], mob_id, nameid, (i / 2) + 1);
continue;
}
body << YAML::BeginMap;
body << YAML::Key << "Item" << YAML::Value << *item_name;
body << YAML::Key << "Rate" << YAML::Value << cap_value(std::stoi(fields[32 + i * 2]), 1, 10000);
body << YAML::EndMap;
}
if (i < MAX_MVP_DROP - 1)
continue;
// Insert at end
for (const auto &it : mob_drop) {
if (it.first != mob_id)
continue;
for (const auto &drop : it.second) {
if (drop.mvp) {
std::string *item_name = util::umap_find(aegis_itemnames, drop.nameid);
if (!item_name) {
ShowWarning("Monster \"%s\"(id: %d) is dropping an unknown item \"%u\"(MVP-Drop %d)\n", fields[1], mob_id, drop.nameid, (i / 2) + 1);
continue;
}
body << YAML::BeginMap;
body << YAML::Key << "Item" << YAML::Value << *item_name;
body << YAML::Key << "Rate" << YAML::Value << cap_value(drop.rate, 1, 10000);
body << YAML::Key << "RandomOptionGroup" << YAML::Value << drop.group_string;
body << YAML::EndMap;
}
}
}
}
body << YAML::EndSeq;
}
bool has_drops = false;
for (uint8 d = 31 + MAX_MVP_DROP * 2; d < ((31 + MAX_MVP_DROP * 2) + MAX_MOB_DROP * 2); d += 2) {
if (strtoul(fields[d], nullptr, 10) > 0) {
has_drops = true;
break;
}
}
if (has_drops) {
body << YAML::Key << "Drops";
body << YAML::BeginSeq;
for (uint8 i = 0; i < MAX_MOB_DROP; i++) {
int k = 31 + MAX_MVP_DROP * 2 + i * 2;
t_itemid nameid = strtoul(fields[k], nullptr, 10);
if (nameid > 0) {
std::string *item_name = util::umap_find(aegis_itemnames, nameid);
if (!item_name) {
ShowWarning("Monster \"%s\"(id: %d) is dropping an unknown item \"%s\"\n", fields[1], mob_id, fields[k]);
continue;
}
body << YAML::BeginMap;
body << YAML::Key << "Item" << YAML::Value << *item_name;
body << YAML::Key << "Rate" << YAML::Value << cap_value(std::stoi(fields[k + 1]), 1, 10000);
if (i > 6) // Slots 8, 9, and 10 are inherently protected
body << YAML::Key << "StealProtected" << YAML::Value << "true";
body << YAML::EndMap;
}
if (i < MAX_MOB_DROP - 2 || i == MAX_MOB_DROP - 1)
continue;
// Insert before card
for (const auto &it : mob_drop) {
if (it.first != mob_id)
continue;
for (const auto &drop : it.second) {
if (!drop.mvp) {
std::string *item_name = util::umap_find(aegis_itemnames, drop.nameid);
if (!item_name) {
ShowWarning("Monster \"%s\"(id: %d) is dropping an unknown item \"%u\"\n", fields[1], mob_id, drop.nameid);
continue;
}
body << YAML::BeginMap;
body << YAML::Key << "Item" << YAML::Value << *item_name;
body << YAML::Key << "Rate" << YAML::Value << cap_value(drop.rate, 1, 10000);
body << YAML::Key << "RandomOptionGroup" << YAML::Value << drop.group_string;
if (drop.steal_protected == 1)
body << YAML::Key << "StealProtected" << YAML::Value << "true";
body << YAML::EndMap;
}
}
}
}
body << YAML::EndSeq;
}
body << YAML::EndMap;
return true;
}

View File

@ -31,6 +31,24 @@
#include "../common/winapi.hpp"
#endif
// Only for constants - do not use functions of it or linking will fail
#include "../map/achievement.hpp"
#include "../map/battle.hpp"
#include "../map/battleground.hpp"
#include "../map/channel.hpp"
#include "../map/chat.hpp"
#include "../map/date.hpp"
#include "../map/instance.hpp"
#include "../map/mercenary.hpp"
#include "../map/mob.hpp"
#include "../map/npc.hpp"
#include "../map/pc.hpp"
#include "../map/pet.hpp"
#include "../map/quest.hpp"
#include "../map/script.hpp"
#include "../map/skill.hpp"
#include "../map/storage.hpp"
using namespace rathena;
#ifndef WIN32
@ -47,8 +65,12 @@ int getch( void ){
}
#endif
// Constants for conversion
std::unordered_map<const char *, int64> constants;
// Forward declaration of conversion functions
static bool item_db_yaml2sql(const std::string &file, const std::string &table);
static bool mob_db_yaml2sql(const std::string &file, const std::string &table);
bool fileExists( const std::string& path );
bool askConfirmation( const char* fmt, ... );
@ -56,6 +78,38 @@ bool askConfirmation( const char* fmt, ... );
YAML::Node inNode;
std::ofstream out;
// Implement the function instead of including the original version by linking
void script_set_constant_(const char *name, int64 value, const char *constant_name, bool isparameter, bool deprecated) {
constants[name] = value;
}
const char *constant_lookup(int32 value, const char *prefix) {
if (prefix == nullptr)
return nullptr;
for (auto const &pair : constants) {
// Same prefix group and same value
if (strncasecmp(pair.first, prefix, strlen(prefix)) == 0 && pair.second == value) {
return pair.first;
}
}
return nullptr;
}
int64 constant_lookup_int(const char *constant) {
if (constant == nullptr)
return -100;
for (auto const &pair : constants) {
if (strlen(pair.first) == strlen(constant) && strncasecmp(pair.first, constant, strlen(constant)) == 0) {
return pair.second;
}
}
return -100;
}
void copyFileIfExists( std::ofstream& file,const std::string& name ){
std::string path = "doc/yaml/sql/" + name + ".sql";
@ -136,9 +190,13 @@ int do_init( int argc, char** argv ){
#ifdef RENEWAL
const std::string item_table_name = "item_db_re";
const std::string item_import_table_name = "item_db2_re";
const std::string mob_table_name = "mob_db_re";
const std::string mob_import_table_name = "mob_db2_re";
#else
const std::string item_table_name = "item_db";
const std::string item_import_table_name = "item_db2";
const std::string mob_table_name = "mob_db";
const std::string mob_import_table_name = "mob_db2";
#endif
std::vector<std::string> item_table_suffixes = {
"usable",
@ -146,6 +204,9 @@ int do_init( int argc, char** argv ){
"etc"
};
// Load constants
#include "../map/script_constants.hpp"
for( const std::string& suffix : item_table_suffixes ){
if (!process("ITEM_DB", 1, { path_db_mode }, "item_db_" + suffix, item_table_name + "_" + suffix, item_table_name, [](const std::string& path, const std::string& name_ext, const std::string& table) -> bool {
return item_db_yaml2sql(path + name_ext, table);
@ -160,6 +221,18 @@ int do_init( int argc, char** argv ){
return 0;
}
if (!process("MOB_DB", 1, { path_db_mode }, "mob_db", mob_table_name, mob_table_name, [](const std::string &path, const std::string &name_ext, const std::string &table) -> bool {
return mob_db_yaml2sql(path + name_ext, table);
})) {
return 0;
}
if (!process("MOB_DB", 1, { path_db_import }, "mob_db", mob_import_table_name, mob_import_table_name, [](const std::string &path, const std::string &name_ext, const std::string &table) -> bool {
return mob_db_yaml2sql(path + name_ext, table);
})) {
return 0;
}
// TODO: add implementations ;-)
return 0;
@ -638,3 +711,200 @@ static bool item_db_yaml2sql(const std::string &file, const std::string &table)
return true;
}
// Copied and adjusted from mob.cpp
static bool mob_db_yaml2sql(const std::string &file, const std::string &table) {
size_t entries = 0;
for (const YAML::Node &input : inNode["Body"]) {
std::string column = "", value = "";
if (appendEntry(input["Id"], value))
column.append("`id`,");
if (appendEntry(input["AegisName"], value, true))
column.append("`name_aegis`,");
if (appendEntry(input["Name"], value, true))
column.append("`name_english`,");
if (appendEntry(input["Name"], value, true))
column.append("`name_japanese`,");
if (appendEntry(input["Level"], value))
column.append("`level`,");
if (appendEntry(input["Hp"], value))
column.append("`hp`,");
if (appendEntry(input["Sp"], value))
column.append("`sp`,");
if (appendEntry(input["BaseExp"], value))
column.append("`base_exp`,");
if (appendEntry(input["JobExp"], value))
column.append("`job_exp`,");
if (appendEntry(input["MvpExp"], value))
column.append("`mvp_exp`,");
if (appendEntry(input["Attack"], value))
column.append("`attack`,");
if (appendEntry(input["Attack2"], value))
column.append("`attack2`,");
if (appendEntry(input["Defense"], value))
column.append("`defense`,");
if (appendEntry(input["MagicDefense"], value))
column.append("`magic_defense`,");
if (appendEntry(input["Str"], value))
column.append("`str`,");
if (appendEntry(input["Agi"], value))
column.append("`agi`,");
if (appendEntry(input["Vit"], value))
column.append("`vit`,");
if (appendEntry(input["Int"], value))
column.append("`int`,");
if (appendEntry(input["Dex"], value))
column.append("`dex`,");
if (appendEntry(input["Luk"], value))
column.append("`luk`,");
if (appendEntry(input["AttackRange"], value))
column.append("`attack_range`,");
if (appendEntry(input["SkillRange"], value))
column.append("`skill_range`,");
if (appendEntry(input["ChaseRange"], value))
column.append("`chase_range`,");
if (appendEntry(input["Size"], value, true))
column.append("`size`,");
if (appendEntry(input["Race"], value, true))
column.append("`race`,");
const YAML::Node &racegroups = input["RaceGroups"];
if (racegroups) {
for (uint16 i = 1; i < RC2_MAX; i++) {
std::string constant = constant_lookup(i, "RC2_");
constant.erase(0, 4);
if (appendEntry(racegroups[name2Upper(constant)], value)) {
std::transform(constant.begin(), constant.end(), constant.begin(), ::tolower);
column.append("`racegroup_" + constant + "`,");
}
}
}
if (appendEntry(input["Element"], value, true))
column.append("`element`,");
if (appendEntry(input["ElementLevel"], value))
column.append("`element_level`,");
if (appendEntry(input["WalkSpeed"], value))
column.append("`walk_speed`,");
if (appendEntry(input["AttackDelay"], value))
column.append("`attack_delay`,");
if (appendEntry(input["AttackMotion"], value))
column.append("`attack_motion`,");
if (appendEntry(input["DamageMotion"], value))
column.append("`damage_motion`,");
if (appendEntry(input["Ai"], value, true))
column.append("`ai`,");
if (appendEntry(input["Class"], value, true))
column.append("`class`,");
const YAML::Node &modes = input["Modes"];
if (modes) {
if (appendEntry(modes["CanMove"], value))
column.append("`mode_canmove`,");
if (appendEntry(modes["Looter"], value))
column.append("`mode_looter`,");
if (appendEntry(modes["Aggressive"], value))
column.append("`mode_aggressive`,");
if (appendEntry(modes["Assist"], value))
column.append("`mode_assist`,");
if (appendEntry(modes["CastSensorIdle"], value))
column.append("`mode_castsensoridle`,");
if (appendEntry(modes["NoRandomWalk"], value))
column.append("`mode_norandomwalk`,");
if (appendEntry(modes["NoCast"], value))
column.append("`mode_nocast`,");
if (appendEntry(modes["CanAttack"], value))
column.append("`mode_canattack`,");
if (appendEntry(modes["CastSensorChase"], value))
column.append("`mode_castsensorchase`,");
if (appendEntry(modes["ChangeChase"], value))
column.append("`mode_changechase`,");
if (appendEntry(modes["Angry"], value))
column.append("`mode_angry`,");
if (appendEntry(modes["ChangeTargetMelee"], value))
column.append("`mode_changetargetmelee`,");
if (appendEntry(modes["ChangeTargetChase"], value))
column.append("`mode_changetargetchase`,");
if (appendEntry(modes["TargetWeak"], value))
column.append("`mode_targetweak`,");
if (appendEntry(modes["RandomTarget"], value))
column.append("`mode_randomtarget`,");
if (appendEntry(modes["IgnoreMelee"], value))
column.append("`mode_ignoremelee`,");
if (appendEntry(modes["IgnoreMagic"], value))
column.append("`mode_ignoremagic`,");
if (appendEntry(modes["IgnoreRanged"], value))
column.append("`mode_ignoreranged`,");
if (appendEntry(modes["Mvp"], value))
column.append("`mode_mvp`,");
if (appendEntry(modes["IgnoreMisc"], value))
column.append("`mode_ignoremisc`,");
if (appendEntry(modes["KnockBackImmune"], value))
column.append("`mode_knockbackimmune`,");
if (appendEntry(modes["TeleportBlock"], value))
column.append("`mode_teleportblock`,");
if (appendEntry(modes["FixedItemDrop"], value))
column.append("`mode_fixeditemdrop`,");
if (appendEntry(modes["Detector"], value))
column.append("`mode_detector`,");
if (appendEntry(modes["StatusImmune"], value))
column.append("`mode_statusimmune`,");
if (appendEntry(modes["SkillImmune"], value))
column.append("`mode_skillimmune`,");
}
for (uint16 i = 0; i < MAX_MVP_DROP; i++) {
if (!input["MvpDrops"].IsDefined())
continue;
const YAML::Node &mvpdrops = input["MvpDrops"][i];
if (mvpdrops) {
if (appendEntry(mvpdrops["Item"], value, true))
column.append("`mvpdrop" + std::to_string(i + 1) + "_item`,");
if (appendEntry(mvpdrops["Rate"], value))
column.append("`mvpdrop" + std::to_string(i + 1) + "_rate`,");
if (appendEntry(mvpdrops["RandomOptionGroup"], value, true))
column.append("`mvpdrop" + std::to_string(i + 1) + "_option`,");
if (appendEntry(mvpdrops["Index"], value))
column.append("`mvpdrop" + std::to_string(i + 1) + "_index`,");
}
}
for (uint16 i = 0; i < MAX_MOB_DROP; i++) {
if (!input["Drops"].IsDefined())
continue;
const YAML::Node &drops = input["Drops"][i];
if (drops) {
if (appendEntry(drops["Item"], value, true))
column.append("`drop" + std::to_string(i + 1) + "_item`,");
if (appendEntry(drops["Rate"], value))
column.append("`drop" + std::to_string(i + 1) + "_rate`,");
if (appendEntry(drops["StealProtected"], value))
column.append("`drop" + std::to_string(i + 1) + "_nosteal`,");
if (appendEntry(drops["RandomOptionGroup"], value, true))
column.append("`drop" + std::to_string(i + 1) + "_option`,");
if (appendEntry(drops["Index"], value))
column.append("`drop" + std::to_string(i + 1) + "_index`,");
}
}
column.pop_back(); // Remove last ','
value.pop_back(); // Remove last ','
out << "REPLACE INTO `" + table + "` (" + column + ") VALUES (" + value + ");\n";
entries++;
}
ShowStatus("Done converting '" CL_WHITE "%d" CL_RESET "' mobs in '" CL_WHITE "%s" CL_RESET "'.\n", entries, file.c_str());
return true;
}