summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-06 15:21:25 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-06 15:21:25 +0000
commit59e98faf7bfc79b13cf1f2d006d19e1c08e8d5d1 (patch)
tree61eab22a7f17de14dfc078b8c91f432fcabbdb53
parent0769d6ded1ef403ed60d7d5d010ff4cec8b02c19 (diff)
downloadhercules-59e98faf7bfc79b13cf1f2d006d19e1c08e8d5d1.tar.gz
hercules-59e98faf7bfc79b13cf1f2d006d19e1c08e8d5d1.tar.bz2
hercules-59e98faf7bfc79b13cf1f2d006d19e1c08e8d5d1.tar.xz
hercules-59e98faf7bfc79b13cf1f2d006d19e1c08e8d5d1.zip
- Renamed createmercenary to mercenary_create.
- Added other required mercenary script commands for official script. - New Constants entries for this script. - Update to missing configuration on mercenary skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13195 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--db/const.txt4
-rw-r--r--db/item_db.txt76
-rw-r--r--db/skill_cast_db.txt2
-rw-r--r--db/skill_db.txt20
-rw-r--r--db/skill_unit_db.txt9
-rw-r--r--src/map/mercenary.c30
-rw-r--r--src/map/mercenary.h12
-rw-r--r--src/map/script.c130
8 files changed, 222 insertions, 61 deletions
diff --git a/db/const.txt b/db/const.txt
index 8d5cfdcf0..030a1e478 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -931,6 +931,10 @@ GUILD_AREA 20
GUILD_AREA_WOS 21
SELF 22
+ARCH_MERC_GUILD 0
+SPEAR_MERC_GUILD 1
+SWORD_MERC_GUILD 2
+
EF_HIT1 0
EF_HIT2 1
EF_HIT3 2
diff --git a/db/item_db.txt b/db/item_db.txt
index 7c8abc3d0..1b6fde392 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -3498,36 +3498,36 @@
12151,Bullet_Case_Silver,Silver Bullet Casing,2,2,,250,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13201,500; },{},{}
12152,Special_Present,Special Gift,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
// Mercenary Summon Scrolls
-12153,Bow_Mercenary_Scroll1,Archer Mercenary Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6017,1800000; },{},{}
-12154,Bow_Mercenary_Scroll2,Archer Mercenary Summon Scroll Level 2,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6018,1800000; },{},{}
-12155,Bow_Mercenary_Scroll3,Archer Mercenary Summon Scroll Level 3,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6019,1800000; },{},{}
-12156,Bow_Mercenary_Scroll4,Archer Mercenary Summon Scroll Level 4,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6020,1800000; },{},{}
-12157,Bow_Mercenary_Scroll5,Archer Mercenary Summon Scroll Level 5,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6021,1800000; },{},{}
-12158,Bow_Mercenary_Scroll6,Archer Mercenary Summon Scroll Level 6,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6022,1800000; },{},{}
-12159,Bow_Mercenary_Scroll7,Archer Mercenary Summon Scroll Level 7,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6023,1800000; },{},{}
-12160,Bow_Mercenary_Scroll8,Archer Mercenary Summon Scroll Level 8,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6024,1800000; },{},{}
-12161,Bow_Mercenary_Scroll9,Archer Mercenary Summon Scroll Level 9,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6025,1800000; },{},{}
-12162,Bow_Mercenary_Scroll10,Archer Mercenary Summon Scroll Level 10,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6026,1800000; },{},{}
-12163,SwordMercenary_Scroll1,Swordsman Mercenary Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6037,1800000; },{},{}
-12164,SwordMercenary_Scroll2,Swordsman Mercenary Summon Scroll Level 2,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6038,1800000; },{},{}
-12165,SwordMercenary_Scroll3,Swordsman Mercenary Summon Scroll Level 3,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6039,1800000; },{},{}
-12166,SwordMercenary_Scroll4,Swordsman Mercenary Summon Scroll Level 4,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6040,1800000; },{},{}
-12167,SwordMercenary_Scroll5,Swordsman Mercenary Summon Scroll Level 5,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6041,1800000; },{},{}
-12168,SwordMercenary_Scroll6,Swordsman Mercenary Summon Scroll Level 6,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6042,1800000; },{},{}
-12169,SwordMercenary_Scroll7,Swordsman Mercenary Summon Scroll Level 7,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6043,1800000; },{},{}
-12170,SwordMercenary_Scroll8,Swordsman Mercenary Summon Scroll Level 8,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6044,1800000; },{},{}
-12171,SwordMercenary_Scroll9,Swordsman Mercenary Summon Scroll Level 9,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6045,1800000; },{},{}
-12172,SwordMercenary_Scroll10,Swordsman Mercenary Summon Scroll Level 10,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6046,1800000; },{},{}
-12173,SpearMercenary_Scroll1,Spearman Mercenary Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6027,1800000; },{},{}
-12174,SpearMercenary_Scroll2,Spearman Mercenary Summon Scroll Level 2,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6028,1800000; },{},{}
-12175,SpearMercenary_Scroll3,Spearman Mercenary Summon Scroll Level 3,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6029,1800000; },{},{}
-12176,SpearMercenary_Scroll4,Spearman Mercenary Summon Scroll Level 4,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6030,1800000; },{},{}
-12177,SpearMercenary_Scroll5,Spearman Mercenary Summon Scroll Level 5,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6031,1800000; },{},{}
-12178,SpearMercenary_Scroll6,Spearman Mercenary Summon Scroll Level 6,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6032,1800000; },{},{}
-12179,SpearMercenary_Scroll7,Spearman Mercenary Summon Scroll Level 7,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6033,1800000; },{},{}
-12180,SpearMercenary_Scroll8,Spearman Mercenary Summon Scroll Level 8,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6034,1800000; },{},{}
-12181,SpearMercenary_Scroll9,Spearman Mercenary Summon Scroll Level 9,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6035,1800000; },{},{}
-12182,SpearMercenary_Scroll10,Spearman Mercenary Summon Scroll Level 10,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 6036,1800000; },{},{}
+12153,Bow_Mercenary_Scroll1,Archer Mercenary Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6017,1800000; },{},{}
+12154,Bow_Mercenary_Scroll2,Archer Mercenary Summon Scroll Level 2,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6018,1800000; },{},{}
+12155,Bow_Mercenary_Scroll3,Archer Mercenary Summon Scroll Level 3,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6019,1800000; },{},{}
+12156,Bow_Mercenary_Scroll4,Archer Mercenary Summon Scroll Level 4,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6020,1800000; },{},{}
+12157,Bow_Mercenary_Scroll5,Archer Mercenary Summon Scroll Level 5,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6021,1800000; },{},{}
+12158,Bow_Mercenary_Scroll6,Archer Mercenary Summon Scroll Level 6,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6022,1800000; },{},{}
+12159,Bow_Mercenary_Scroll7,Archer Mercenary Summon Scroll Level 7,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6023,1800000; },{},{}
+12160,Bow_Mercenary_Scroll8,Archer Mercenary Summon Scroll Level 8,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6024,1800000; },{},{}
+12161,Bow_Mercenary_Scroll9,Archer Mercenary Summon Scroll Level 9,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6025,1800000; },{},{}
+12162,Bow_Mercenary_Scroll10,Archer Mercenary Summon Scroll Level 10,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6026,1800000; },{},{}
+12163,SwordMercenary_Scroll1,Swordsman Mercenary Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6037,1800000; },{},{}
+12164,SwordMercenary_Scroll2,Swordsman Mercenary Summon Scroll Level 2,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6038,1800000; },{},{}
+12165,SwordMercenary_Scroll3,Swordsman Mercenary Summon Scroll Level 3,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6039,1800000; },{},{}
+12166,SwordMercenary_Scroll4,Swordsman Mercenary Summon Scroll Level 4,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6040,1800000; },{},{}
+12167,SwordMercenary_Scroll5,Swordsman Mercenary Summon Scroll Level 5,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6041,1800000; },{},{}
+12168,SwordMercenary_Scroll6,Swordsman Mercenary Summon Scroll Level 6,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6042,1800000; },{},{}
+12169,SwordMercenary_Scroll7,Swordsman Mercenary Summon Scroll Level 7,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6043,1800000; },{},{}
+12170,SwordMercenary_Scroll8,Swordsman Mercenary Summon Scroll Level 8,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6044,1800000; },{},{}
+12171,SwordMercenary_Scroll9,Swordsman Mercenary Summon Scroll Level 9,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6045,1800000; },{},{}
+12172,SwordMercenary_Scroll10,Swordsman Mercenary Summon Scroll Level 10,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6046,1800000; },{},{}
+12173,SpearMercenary_Scroll1,Spearman Mercenary Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6027,1800000; },{},{}
+12174,SpearMercenary_Scroll2,Spearman Mercenary Summon Scroll Level 2,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6028,1800000; },{},{}
+12175,SpearMercenary_Scroll3,Spearman Mercenary Summon Scroll Level 3,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6029,1800000; },{},{}
+12176,SpearMercenary_Scroll4,Spearman Mercenary Summon Scroll Level 4,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6030,1800000; },{},{}
+12177,SpearMercenary_Scroll5,Spearman Mercenary Summon Scroll Level 5,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6031,1800000; },{},{}
+12178,SpearMercenary_Scroll6,Spearman Mercenary Summon Scroll Level 6,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6032,1800000; },{},{}
+12179,SpearMercenary_Scroll7,Spearman Mercenary Summon Scroll Level 7,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6033,1800000; },{},{}
+12180,SpearMercenary_Scroll8,Spearman Mercenary Summon Scroll Level 8,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6034,1800000; },{},{}
+12181,SpearMercenary_Scroll9,Spearman Mercenary Summon Scroll Level 9,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6035,1800000; },{},{}
+12182,SpearMercenary_Scroll10,Spearman Mercenary Summon Scroll Level 10,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 6036,1800000; },{},{}
12183,Holy_Arrow_Quiver,Holy Arrow Quiver,2,2,,250,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1772,500; },{},{}
12184,Mercenary_Red_Potion,Mercenary's Red Potion,2,500,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_heal 1000,0; },{},{}
12185,Mercenary_Blue_Potion,Mercenary's Blue Potion,2,1000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_heal 0,100; },{},{}
@@ -3586,8 +3586,8 @@
12239,New_Year_Rice_Cake_2,New Year Rice Cake,0,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{}
12240,Old_Yellow_Box,Old Yellow Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem groupranditem(IG_YellowBox),1; },{},{}
12241,M_Center_Potion,Concentration Potion,2,800,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ASPDPOTION0,1800000,0; },{},{}
-12242,M_Awakening_Potion,Awakening Potion,2,1500,,150,,,,,0xFFFFFFFF,7,2,,,0,,,{ mercenary_sc_start SC_ASPDPOTION1,1800000,0; },{},{}
-12243,M_Berserk_Potion,Berserk Potion,2,3000,,200,,,,,0xFFFFFFFF,7,2,,,0,,,{ mercenary_sc_start SC_ASPDPOTION2,1800000,0; },{},{}
+12242,M_Awakening_Potion,Awakening Potion,2,1500,,150,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ASPDPOTION1,1800000,0; },{},{}
+12243,M_Berserk_Potion,Berserk Potion,2,3000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ASPDPOTION2,1800000,0; },{},{}
12244,Old_Gift_Box,Old Gift Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem groupranditem(IG_OldGiftBox),1; },{},{}
//St. Patrick's Day Event (2007)
12245,Green_Ale_US,Green Ale,0,5000,,500,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 100,0; },{},{}
@@ -3621,9 +3621,9 @@
12273,Military_Rations_C,Military Rations C,0,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCFLEE,600000,33; },{},{}
12274,Daehwandan,Daehwandan,0,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCMHPRATE,36000000,5; percentheal 10,0; },{},{}
12275,Taecheongdan,Taecheongdan,0,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCMSPRATE,36000000,5; percentheal 0,10; },{},{}
-12276,Mimic_Summon_Scroll,Mimic Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 1191,1800000; },{},{}
-12277,Disguise_Summon_Scroll,Disguise Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 1506,1800000; },{},{}
-12278,Alice_Summon_Scroll,Alice Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 1275,1800000; },{},{}
+12276,Mimic_Summon_Scroll,Mimic Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 1191,1800000; },{},{}
+12277,Disguise_Summon_Scroll,Disguise Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 1506,1800000; },{},{}
+12278,Alice_Summon_Scroll,Alice Summon Scroll Level 1,2,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 1275,1800000; },{},{}
12279,Undead_Element_Scroll,Shadow Armor Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20; },{},{}
12280,Holy_Element_Scroll,Holy Armor Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 91; sc_start SC_BENEDICTIO,300000,1; },{},{}
12281,Event_Treasure_Box,.Event Treasure Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
@@ -3639,9 +3639,9 @@
//Net Cafe Premium
12298,SP_Reduction_Potion,SP Reduction Potion,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SPCOST_RATE,36000000,15; },{},{}
12299,Status_Resist_Potion,Status Resistance Potion,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_COMMONSC_RESIST,36000000,10; },{},{}
-12300,Wild_Rose_Summoning_Book,Wild_Rose Summoning Book,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 1965,1800000; },{},{}
-12301,Doppeleganger_Summoning_Book,Doppleganger Summoning Book,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 1966,1800000; },{},{}
-12302,Egnigem_Cenia_Summoning_Book,Egnigem Cenia Summoning Book,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ createmercenary 1967,1800000; },{},{}
+12300,Wild_Rose_Summoning_Book,Wild_Rose Summoning Book,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 1965,1800000; },{},{}
+12301,Doppeleganger_Summoning_Book,Doppleganger Summoning Book,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 1966,1800000; },{},{}
+12302,Egnigem_Cenia_Summoning_Book,Egnigem Cenia Summoning Book,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 1967,1800000; },{},{}
12303,Blessing_Of_Water,Blessing Of Water,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
12304,Diary_Magic_Powder,Diary Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
12305,Mini_Heart_Magic_Powder,Mini Heart Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index 4f018fc9f..9a246ae9c 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -1076,7 +1076,7 @@
//-- MER_SIGHT
8224,0,0,0,10000,0
//-- MER_CRASH
-8225,1000,2000,0,0,0
+8225,1000,2000,0,0,5000
//-- MER_PROVOKE
8232,0,0,0,30000,0
//-- MER_DECAGI
diff --git a/db/skill_db.txt b/db/skill_db.txt
index fe1fc3145..92ccc52c7 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -700,17 +700,17 @@
8222,0,6,4,0,0x3,-1,5,1,yes,0,0,0,magic,0, MER_MAGNIFICAT,Magnificat
8223,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0, MER_QUICKEN,Two-Hand_Quicken
8224,0,6,4,3,0x3,3,1,1,yes,0,0,0,magic,0, MER_SIGHT,Sight
-8225,0,0,0,0,0x1,0,5,0,no,0,0,0,weapon,0, MER_CRASH,Crash
-8226,0,0,0,0,0x1,0,1,0,no,0,0,0,magic,0, MER_REGAIN,Regain
-8227,0,0,0,0,0x1,0,1,0,no,0,0,0,magic,0, MER_TENDER,Tender
-8228,0,0,0,0,0x1,0,1,0,no,0,0,0,magic,0, MER_BENEDICTION,Benediction
-8229,0,0,0,0,0x1,0,1,0,no,0,0,0,magic,0, MER_RECUPERATE,Recuperate
-8230,0,0,0,0,0x1,0,1,0,no,0,0,0,magic,0, MER_MENTALCURE,Mental_Cure
-8231,0,0,0,0,0x1,0,1,0,no,0,0,0,magic,0, MER_COMPRESS,Compress
-8232,9,6,1,0,1,0,10,1,no,0,0,0,none,0, MER_PROVOKE,Provoke
-8233,0,6,4,0,0x1,0,1,1,no,0,0x1,0,weapon,0, MER_AUTOBERSERK,Berserk
+8225,1,8,1,-1,0,0,5,3,no,0,0,0,weapon,0, MER_CRASH,Crash
+8226,9,6,16,0,0x1,0,1,1,yes,0,0x1000,0,magic,0, MER_REGAIN,Regain
+8227,9,6,16,0,0x1,0,1,1,yes,0,0x1000,0,magic,0, MER_TENDER,Tender
+8228,9,6,16,0,0x1,0,1,1,yes,0,0x1000,0,magic,0, MER_BENEDICTION,Benediction
+8229,9,6,16,0,0x1,0,1,1,yes,0,0x1000,0,magic,0, MER_RECUPERATE,Recuperate
+8230,9,6,16,0,0x1,0,1,1,yes,0,0x1000,0,magic,0, MER_MENTALCURE,Mental_Cure
+8231,9,6,16,0,0x1,0,1,1,yes,0,0x1000,0,magic,0, MER_COMPRESS,Compress
+8232,9,6,1,0,0x1,0,10,1,no,0,0,0,none,0, MER_PROVOKE,Provoke
+8233,0,6,4,0,0x1,0,1,1,no,0,0,0,weapon,0, MER_AUTOBERSERK,Berserk
8234,9,6,1,0,0x1,0,10,1,yes,0,0,0,magic,0, MER_DECAGI,Decrease_AGI
-8235,0,0,0,0,0,0,1,0,no,0,0,0,none,0, MER_SCAPEGOAT,Scapegoat
+8235,0,6,4,0,0x1,0,1,1,yes,0,0,0,none,0, MER_SCAPEGOAT,Scapegoat
8236,5,6,1,0,0x1,0,10,0,yes,0,0,0,magic,0, MER_LEXDIVINA,Lex_Divina
8237,9,6,1,0,0x1,0,1,1,yes,0,0,0,magic,0, MER_ESTIMATION,Sense
diff --git a/db/skill_unit_db.txt b/db/skill_unit_db.txt
index 768606ed7..de97ecaa4 100644
--- a/db/skill_unit_db.txt
+++ b/db/skill_unit_db.txt
@@ -95,7 +95,8 @@
535,0xbd, , -1, 0, 20,enemy, 0x010 //NJ_KAENSIN
538,0xbb, , 1:1:1:2:2:2:3:3:3:4,0,-1,all,0x010 //NJ_SUITON
670,0xc7, , 1, 4:7:10:13:16:19:22:25:28:31,1000,all,0x008 //NPC_EVILLAND
-8209,0x90, , 0, 1,1000,enemy, 0x002 //MA_SKIDTRAP
-8210,0x93, , 0, 0,1000,enemy, 0x002 //MA_LANDMINE
-8211,0x95, , 0, 1,1000,enemy, 0x002 //MA_SANDMAN
-8212,0x97, , 0, 1,1000,enemy, 0x002 //MA_FREEZINGTRAP
+8208,0x86, , 0, 2,1000,enemy, 0x080 //MA_SHOWER
+8209,0x90, , 0, 1,1000,enemy, 0x006 //MA_SKIDTRAP
+8210,0x93, , 0, 0,1000,enemy, 0x006 //MA_LANDMINE
+8211,0x95, , 0, 1,1000,enemy, 0x006 //MA_SANDMAN
+8212,0x97, , 0, 1,1000,enemy, 0x006 //MA_FREEZINGTRAP
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 4775f9beb..84974e906 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -94,6 +94,25 @@ int mercenary_get_lifetime(struct mercenary_data *md)
return (td != NULL) ? DIFF_TICK(td->tick, gettick()) : 0;
}
+int mercenary_get_guild(struct mercenary_data *md)
+{
+ int class_;
+
+ if( md == NULL || md->db == NULL )
+ return -1;
+
+ class_ = md->db->class_;
+
+ if( class_ >= 6017 && class_ <= 6026 )
+ return ARCH_MERC_GUILD;
+ if( class_ >= 6027 && class_ <= 6036 )
+ return SPEAR_MERC_GUILD;
+ if( class_ >= 6037 && class_ <= 6046 )
+ return SWORD_MERC_GUILD;
+
+ return -1;
+}
+
int mercenary_get_faith(struct mercenary_data *md)
{
struct map_session_data *sd;
@@ -110,8 +129,6 @@ int mercenary_get_faith(struct mercenary_data *md)
return sd->status.spear_faith;
if( class_ >= 6037 && class_ <= 6046 )
return sd->status.sword_faith;
- else
- return 0;
return 0;
}
@@ -158,8 +175,6 @@ int mercenary_get_calls(struct mercenary_data *md)
return sd->status.spear_calls;
if( class_ >= 6037 && class_ <= 6046 )
return sd->status.sword_calls;
- else
- return 0;
return 0;
}
@@ -231,6 +246,12 @@ int merc_delete(struct mercenary_data *md, int reply)
if( !sd )
return unit_free(&md->bl, 0);
+ if( md->devotion_flag )
+ {
+ md->devotion_flag = 0;
+ status_change_end(&sd->bl, SC_DEVOTION, -1);
+ }
+
switch( reply )
{
case 0: mercenary_set_faith(md, 1); break; // +1 Loyalty on Contract ends.
@@ -278,6 +299,7 @@ int merc_data_received(struct s_mercenary *merc, bool flag)
sd->md = md = (struct mercenary_data*)aCalloc(1,sizeof(struct mercenary_data));
md->bl.type = BL_MER;
md->bl.id = npc_get_new_npc_id();
+ md->devotion_flag = 0;
md->master = sd;
md->db = db;
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 826133660..1cc689208 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -7,6 +7,12 @@
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
+enum {
+ ARCH_MERC_GUILD,
+ SPEAR_MERC_GUILD,
+ SWORD_MERC_GUILD,
+};
+
struct s_mercenary_db {
int class_;
char sprite[NAME_LENGTH], name[NAME_LENGTH];
@@ -31,11 +37,12 @@ struct mercenary_data {
struct s_mercenary_db *db;
struct s_mercenary mercenary;
+ char blockskill[MAX_SKILL];
struct map_session_data *master;
int contract_timer;
-
- char blockskill[MAX_SKILL];
+
+ unsigned devotion_flag : 1;
};
bool merc_class(int class_);
@@ -53,6 +60,7 @@ int merc_delete(struct mercenary_data *md, int reply);
void merc_contract_stop(struct mercenary_data *md);
int mercenary_get_lifetime(struct mercenary_data *md);
+int mercenary_get_guild(struct mercenary_data *md);
int mercenary_get_faith(struct mercenary_data *md);
int mercenary_set_faith(struct mercenary_data *md, int value);
int mercenary_get_calls(struct mercenary_data *md);
diff --git a/src/map/script.c b/src/map/script.c
index d2a77036b..dc1a0fa6d 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12810,7 +12810,7 @@ BUILDIN_FUNC(setcell)
/*==========================================
* Mercenary Commands
*------------------------------------------*/
-BUILDIN_FUNC(createmercenary)
+BUILDIN_FUNC(mercenary_create)
{
struct map_session_data *sd;
int class_, contract_time;
@@ -12860,6 +12860,128 @@ BUILDIN_FUNC(mercenary_sc_start)
return 0;
}
+BUILDIN_FUNC(mercenary_get_calls)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ int guild;
+
+ if( sd == NULL )
+ return 0;
+
+ guild = script_getnum(st,2);
+ switch( guild )
+ {
+ case ARCH_MERC_GUILD:
+ script_pushint(st,sd->status.arch_calls);
+ break;
+ case SPEAR_MERC_GUILD:
+ script_pushint(st,sd->status.spear_calls);
+ break;
+ case SWORD_MERC_GUILD:
+ script_pushint(st,sd->status.sword_calls);
+ break;
+ default:
+ script_pushint(st,0);
+ break;
+ }
+
+ return 0;
+}
+
+BUILDIN_FUNC(mercenary_set_calls)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ int guild, value, *calls;
+
+ if( sd == NULL )
+ return 0;
+
+ guild = script_getnum(st,2);
+ value = script_getnum(st,3);
+
+ switch( guild )
+ {
+ case ARCH_MERC_GUILD:
+ calls = &sd->status.arch_calls;
+ break;
+ case SPEAR_MERC_GUILD:
+ calls = &sd->status.spear_calls;
+ break;
+ case SWORD_MERC_GUILD:
+ calls = &sd->status.sword_calls;
+ break;
+ default:
+ return 0; // Invalid Guild
+ }
+
+ *calls += value;
+ *calls = cap_value(*calls, 0, INT_MAX);
+
+ return 0;
+}
+
+BUILDIN_FUNC(mercenary_get_faith)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ int guild;
+
+ if( sd == NULL )
+ return 0;
+
+ guild = script_getnum(st,2);
+ switch( guild )
+ {
+ case ARCH_MERC_GUILD:
+ script_pushint(st,sd->status.arch_faith);
+ break;
+ case SPEAR_MERC_GUILD:
+ script_pushint(st,sd->status.spear_faith);
+ break;
+ case SWORD_MERC_GUILD:
+ script_pushint(st,sd->status.sword_faith);
+ break;
+ default:
+ script_pushint(st,0);
+ break;
+ }
+
+ return 0;
+}
+
+BUILDIN_FUNC(mercenary_set_faith)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ int guild, value, *calls;
+
+ if( sd == NULL )
+ return 0;
+
+ guild = script_getnum(st,2);
+ value = script_getnum(st,3);
+
+ switch( guild )
+ {
+ case ARCH_MERC_GUILD:
+ calls = &sd->status.arch_faith;
+ break;
+ case SPEAR_MERC_GUILD:
+ calls = &sd->status.spear_faith;
+ break;
+ case SWORD_MERC_GUILD:
+ calls = &sd->status.sword_faith;
+ break;
+ default:
+ return 0; // Invalid Guild
+ }
+
+ *calls += value;
+ *calls = cap_value(*calls, 0, INT_MAX);
+ if( mercenary_get_guild(sd->md) == guild )
+ clif_mercenary_updatestatus(sd,SP_MERCFAITH);
+
+ return 0;
+}
+
/******************
Questlog script commands
*******************/
@@ -13290,8 +13412,12 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(hasquest, "i"),
BUILDIN_DEF(setwall,"siiiiis"),
BUILDIN_DEF(delwall,"s"),
- BUILDIN_DEF(createmercenary,"ii"),
+ BUILDIN_DEF(mercenary_create,"ii"),
BUILDIN_DEF(mercenary_heal,"ii"),
BUILDIN_DEF(mercenary_sc_start,"iii"),
+ BUILDIN_DEF(mercenary_get_calls,"i"),
+ BUILDIN_DEF(mercenary_get_faith,"i"),
+ BUILDIN_DEF(mercenary_set_calls,"ii"),
+ BUILDIN_DEF(mercenary_set_faith,"ii"),
{NULL,NULL,NULL},
};