From 53a59a6135eb43e1db0cf82d0d367e4258ff6b86 Mon Sep 17 00:00:00 2001 From: zephyrus Date: Wed, 18 Mar 2009 02:50:39 +0000 Subject: - Implemented new item and bonuses for Kreiger Von Midgard rewards. * Execute script on skill (bonusautoscript3) * Add effect on skill (bAddEffOnSkill) * Execute skill on skill (bAutoSpellOnSkill) - Fixed some boxes Rental time according to item descriptions. - Implemented SC_ITEMSCRIPT, a status that gives you temporally the effect of an item. Check items 14597 to 14605 if you want to get the idea. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13596 54d463be-8e91-2dee-dedb-b68131a5f0ec --- db/const.txt | 3 ++ db/item_db.txt | 120 +++++++++++++++++++++++++++++++++++++------------------ src/map/map.h | 8 ++-- src/map/pc.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++------ src/map/pc.h | 15 +++++-- src/map/script.c | 50 ++++++++++++++++++++--- src/map/skill.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++----- src/map/status.c | 13 +++++- src/map/status.h | 5 ++- src/map/unit.c | 1 + 10 files changed, 366 insertions(+), 77 deletions(-) diff --git a/db/const.txt b/db/const.txt index d96f3b2b6..cccd33ce5 100644 --- a/db/const.txt +++ b/db/const.txt @@ -382,6 +382,7 @@ bSPDrainRateRace 1085 bIgnoreMdefRate 1086 bIgnoreDefRate 1087 bSkillHeal2 1088 +bAddEffOnSkill 1089 bRestartFullRecover 2000 bNoCastCancel 2001 @@ -403,6 +404,7 @@ bAddEffWhenHit 2016 bAutoSpellWhenHit 2017 bSkillAtk 2018 bUnstripable 2019 +bAutoSpellOnSkill 2020 bSPGainValue 2021 bHPRegenRate 2022 @@ -808,6 +810,7 @@ SC_SKILLCASTRATE 285 SC_DEFRATIOATK 286 SC_HPDRAIN 287 SC_SKILLATKBONUS 288 +SC_ITEMSCRIPT 289 e_gasp 0 e_what 1 diff --git a/db/item_db.txt b/db/item_db.txt index e67328f9e..e63e75276 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -546,6 +546,7 @@ 1184,Valorous_Assaulter's_Katzbalger,Valorous Assaulter's Katzbalger,4,,,0,200,,1,0,0x00004082,7,2,34,3,80,1,3,{ bonus bCritical,20; bonus2 bAddRace,RC_DemiHuman,55; bonus bCritAtkRate,20; bonus bUnbreakableWeapon,0; },{},{} 1185,Violet_Fear,Violet Fear,4,,,2200,275,,1,2,0x00004082,2,2,34,4,80,1,3,{ bonus3 bAutoSpell,"WZ_METEOR",3,10; bonus3 bAutoSpell,"WZ_FROSTNOVA",5,10; },{},{} //1186#Invoker_Of_Death# +1187,Glorious_Claymore,Glorious Claymore,4,0,,0,220,,1,0,0x00004082,7,2,34,4,80,1,3,{ bonus2 bAddRace,RC_DemiHuman,70; bonus2 bIgnoreDefRate,RC_DemiHuman,25; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus3 bAutoSpell,"LK_CONCENTRATION",1,50; bonus3 bAutoSpell,"LK_AURABLADE",1,50; } },{},{} // Daggers 1201,Knife,Knife,4,50,,400,17,,1,3,0xFE9F7EEF,7,2,2,1,1,1,1,{},{},{} 1202,Knife_,Knife,4,50,,400,17,,1,4,0xFE9F7EEF,7,2,2,1,1,1,1,{},{},{} @@ -628,6 +629,8 @@ 1278,Katar_Of_Piercing_Wind_,Katar of Piercing Wind,4,45000,,1200,105,,1,3,0x00001000,7,2,34,3,55,1,16,{ bonus bAtkEle,Ele_Wind; bonus2 bAddEff,Eff_Sleep,500; },{},{} 1279,Brave_Carnage_Katar,Brave Carnage Katar,4,,,0,130,,1,0,0x00001000,7,2,34,3,80,1,16,{ bonus bStr,1; bonus bDex,1; bonus bLuk,1; bonus2 bAddRace,RC_DemiHuman,70; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{} 1280,Valorous_Carnage_Katar,Valorous Carnage Katar,4,,,0,130,,1,0,0x00001000,7,2,34,3,80,1,16,{ bonus bStr,1; bonus bDex,1; bonus bLuk,1; bonus2 bAddRace,RC_DemiHuman,70; bonus bCritAtkRate,20; bonus bAspdRate,5; bonus bUnbreakableWeapon,0; },{},{} +1281,Glorious_Roar,Glorious Roar,4,0,,0,140,,1,0,0x00001000,7,2,34,4,80,1,16,{ bonus2 bAddRace,RC_DemiHuman,70; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) bonusautoscript "{ sc_start SC_INCASPDRATE,3000,100; }",50; },{},{} +1282,Glorious_Jamadhar,Glorious Jamadhar,4,0,,0,140,,1,0,0x00001000,7,2,34,4,80,1,16,{ bonus2 bAddRace,RC_DemiHuman,70; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus bCritAtkRate,5; if(getrefine() > 8) bonusautoscript "{ sc_start SC_INCASPDRATE,3000,100; }",50; },{},{} // 1-Handed Axes 1301,Axe,Axe,4,500,,800,38,,1,3,0x000654E3,7,2,2,1,3,1,6,{},{},{} 1302,Axe_,Axe,4,500,,800,38,,1,4,0x000654E3,7,2,2,1,3,1,6,{},{},{} @@ -638,6 +641,7 @@ 1307,Windhawk,Windhawk,4,18000,,1500,115,,1,0,0x000444A2,7,2,2,2,14,1,6,{ bonus bAtkEle,Ele_Wind; bonus bAspdRate,5; },{},{} 1308,Golden_Axe,Golden Axe,4,20,,3000,170,,1,0,0x00000001,7,2,2,4,45,1,6,{},{},{} 1309,Orcish_Axe_,Orcish Axe,4,20,,1500,75,,1,4,0x000454A3,7,2,2,3,3,1,6,{},{},{} +1310,Glorious_Cleaver,Glorious Cleaver,4,0,,0,130,,1,0,0x000444A2,7,2,2,4,80,1,6,{ bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) { bonus2 bIgnoreDefRate,RC_DemiHuman,5; bonus bAspd,5; } if(getrefine() > 8) { bonus bAspd,5; bonus3 bAutoSpell,"NPC_CRITICALWOUND",1,50; bonus4 bAutoSpellOnSkill,"MC_MAMMONITE","NPC_CRITICALWOUND",2,100; } },{},{} // 2-Handed Axes 1351,Battle_Axe,Battle Axe,4,5400,,1500,80,,1,3,0x000444A2,7,2,34,1,3,1,7,{},{},{} 1352,Battle_Axe_,Battle Axe,4,5400,,1500,80,,1,4,0x000444A2,7,2,34,1,3,1,7,{},{},{} @@ -670,6 +674,7 @@ 1379,Valorous_Insane_Battle_Axe,Valorous Insane Battle Axe,4,,,0,200,,1,0,0x000444A2,7,2,34,3,80,1,7,{ bonus bStr,3; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{} 1380,Brave_Insane_Battle_Axe,Brave Insane Battle Axe,4,,,0,200,,1,0,0x000444A2,7,2,34,3,80,1,7,{ bonus bStr,3; bonus2 bAddRace,RC_DemiHuman,55; bonusautoscript "{ sc_start SC_STRIPARMOR,3000,0; }",50,BF_WEAPON,1; bonus bUnbreakableWeapon,0; },{},{} 1381,Novice_Battle_Axe,Novice Battle Axe,4,1,,0,100,,1,0,0x000444A3,7,2,34,1,1,0,7,{},{},{} +1382,Glorious_Axe,Glorious Axe,4,0,,0,220,,1,0,0x000444A2,7,2,34,4,80,1,7,{ bonus2 bAddRace,RC_DemiHuman,70; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) { bonus2 bIgnoreDefRate,RC_DemiHuman,5; bonus3 bAutoSpell,"NPC_CRITICALWOUND",1,50; } if(getrefine() > 8) { bonus3 bAutoSpell,"NPC_CRITICALWOUND",1,50; bonus4 bAutoSpellOnSkill,"MC_MAMMONITE","NPC_CRITICALWOUND",2,100; bonus4 bAutoSpellOnSkill,"WS_CARTTERMINATION","NPC_CRITICALWOUND",2,100; } },{},{} // 1-Handed Spears 1401,Javelin,Javelin,4,150,,700,28,,3,3,0x00004082,7,2,2,1,4,1,4,{},{},{} 1402,Javelin_,Javelin,4,150,,700,28,,3,4,0x00004082,7,2,2,1,4,1,4,{},{},{} @@ -696,6 +701,7 @@ 1423,Pole_XO,Pole XO,4,20,,0,120,,3,0,0x00004082,7,2,2,1,1,0,4,{ bonus2 bAddRace,RC_Boss,50; bonus2 bAddRace,RC_NonBoss,50; },{},{} 1424,Skewer_C,Refined Brocca,4,1,,0,149,,3,0,0x00004082,7,2,2,4,1,0,4,{ bonus bIgnoreDefRace,RC_NonBoss; bonus2 bAddSize,1,20; },{},{} 1425,Assaulter's_Spear,Assaulter Spear,4,,,0,60,,3,0,0x00004082,7,2,2,3,80,1,4,{ bonus bStr,2; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if (BaseJob == Job_Crusader) bonus bAspdRate,20; },{},{} +1426,Glorious_Spear,Glorious Spear,4,0,,0,130,,3,0,0x00004082,7,2,2,4,80,1,4,{ bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus bAspd,5; if(BaseJob == Job_Knight) bonus4 bAutoSpellOnSkill,"KN_PIERCE","NPC_CRITICALWOUND",2,100; else if(BaseJob == Job_Crusader) bonus3 bAutoSpell,"PA_PRESSURE",1,50; } },{},{} // 2-Handed Spears 1451,Guisarme,Guisarme,4,13000,,1000,84,,3,2,0x00004082,7,2,34,2,18,1,5,{},{},{} 1452,Guisarme_,Guisarme,4,13000,,1000,84,,3,3,0x00004082,7,2,34,2,18,1,5,{},{},{} @@ -734,6 +740,7 @@ 1483,Ivory_Lance,Ivory Lance,4,,,1000,160,,3,0,0x00004082,7,2,34,3,50,1,5,{ bonus bAgi,2; bonus bAspdRate,3; bonus2 bAddEff,Eff_Bleeding,100; bonus3 bAutoSpell,"LK_JOINTBEAT",1,100; skill 58,5; },{},{} //1484#Carled# //1485#Battle_Fork# +1486,Glorious_Lance,Glorious Lance,4,0,,0,220,,3,0,0x00004082,7,2,34,4,80,1,5,{ bonus2 bAddRace,RC_DemiHuman,70; bonus2 bIgnoreDefRate,RC_DemiHuman,25; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus bAspd,5; if(BaseJob == Job_Knight) bonus4 bAutoSpellOnSkill,"KN_PIERCE","NPC_CRITICALWOUND",2,100; else if(BaseJob == Job_Crusader) bonus3 bAutoSpell,"PA_PRESSURE",1,50; } },{},{} // Maces 1501,Club,Club,4,120,,700,23,,1,3,0x0004C5B3,7,2,2,1,2,1,8,{},{},{} 1502,Club_,Club,4,120,,700,23,,1,4,0x0004C5B3,7,2,2,1,2,1,8,{},{},{} @@ -780,6 +787,7 @@ 1543,Brave_Battlefield_Morning_Star,Brave Battlefield Morning Star,4,0,,0,105,,1,0,0x0004C5B3,7,2,2,3,80,1,8,{ bonus bStr,1; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bUnbreakableWeapon,0; bonusautoscript "{ sc_start SC_STUN,6000,0; }",50,BF_WEAPON,1; },{},{} //1544#Luna_Kaleet# 1545,Novice_Mace,Novice Mace,4,1,,0,57,,1,0,0x0004C5B3,7,2,2,1,2,0,8,{},{},{} +1546,Glorious_Morning_Star,Glorious Morning Star,4,0,,0,130,,1,0,0x0004C5B3,7,2,2,4,80,1,8,{ bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) { bonus2 bIgnoreDefRate,RC_DemiHuman,5; bonus bAspd,5; } if(getrefine() > 8) { bonus2 bAddEff,Eff_Stun,2000; bonus bAspd,5; } },{},{} // Books 1550,Book,Book,4,30000,,600,85,,1,3,0x00410100,7,2,2,2,14,1,15,{},{},{} 1551,Bible,Bible,4,60000,,1000,115,,1,2,0x00410100,7,2,2,3,27,1,15,{ bonus bInt,2; },{},{} @@ -807,6 +815,8 @@ 1573,Ancient_Magic,Ancient Magic,4,20,,700,30,,1,2,0x00410100,7,2,2,3,70,1,15,{ bonus bMatkRate,15; if (isequipped(2334) || isequipped(2372)) { bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; }; },{},{} 1574,Brave_Battle_Strategy_Book,Brave Battle Strategy Book,4,0,,0,90,,1,0,0x00410100,7,2,2,3,80,1,15,{ bonus bStr,2; bonus bInt,1; bonus bMatkRate,15; bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{} 1575,Valorous_Battle_Strategy_Book,Valorous Battle Strategy Book,4,0,,0,90,,1,0,0x00410100,7,2,2,3,80,1,15,{ bonus bStr,1; bonus bInt,2; bonus bMatkRate,15; bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,25; bonus2 bIgnoreMdefRate,RC_DemiHuman,25; bonus bUnbreakableWeapon,0; },{},{} +1576,Glorious_Tablet,Glorious Tablet,4,0,,0,90,,1,0,0x00410100,7,2,2,4,80,1,15,{ bonus bMatkRate,15; bonus2 bAddRace,RC_DemiHuman,80; bonus2 bIgnoreDefRate,RC_DemiHuman,25; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) bonusautoscript "{ sc_start SC_ATKPOTION,3000,200; }",50; },{},{} +1577,Glorious_Apocalipse,Glorious Apocalipse,4,0,,0,90,,1,0,0x00410100,7,2,2,4,80,1,15,{ bonus bMatkRate,15; bonus2 bAddRace,RC_DemiHuman,80; bonus2 bIgnoreDefRate,RC_DemiHuman,25; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus bMatkRate,5; bonus bCastrate,-5; bonus bDelayRate,-5; } },{},{} 1599,Angra_Manyu,Angra Manyu,4,1,,10,200,,2,0,0xFFFFFFFF,7,2,2,1,1,1,8,{ bonus bAllStats,50; bonus bBaseAtk,3800; bonus2 bHPDrainRate,1000,100; },{},{} // Staffs 1601,Rod,Rod,4,50,,400,15,,1,3,0x00818315,7,2,2,1,1,1,10,{ bonus bMatkRate,15; },{},{} @@ -848,6 +858,8 @@ //1637#Eraser# 1638,Healing_Staff_,Healing Staff,4,20,,400,10,,1,0,0x00008110,7,2,2,3,55,1,10,{ bonus bAtkEle,Ele_Holy; bonus bMatkRate,15; bonus2 bSkillAtk,"AL_HEAL",(getrefine()*3/2); bonus2 bSkillHeal,"AL_HEAL",(getrefine()*3/2); bonus2 bSkillAtk,"PR_SANCTUARY",(getrefine()*3/2); bonus2 bSkillHeal,"PR_SANCTUARY",(getrefine()*3/2); },{},{} 1639,Novice_Rod,Novice_Rod,4,1,,0,15,,1,0,0x00818315,7,2,2,1,1,0,10,{ bonus bMatkRate,16; },{},{} +1640,Glorious_Arc_Wand,Glorious Arc Wand,4,0,,0,70,,1,0,0x00018314,7,2,2,4,80,1,10,{ bonus bMatkRate,15 + getrefine(); bonus2 bMagicAddRace,RC_DemiHuman,15; bonus2 bIgnoreMdefRate,RC_DemiHuman,25; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreMdefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus bMatkRate,5; bonus bCastrate,-5; bonus bDelayRate,-5; } },{},{} +1641,Glorious_Staff_of_Recovery,Glorious Staff of Recovery,4,0,,0,70,,1,0,0x00018314,7,2,2,4,80,1,10,{ bonus bMatkRate,15; bonus2 bSkillAtk,"AL_HEAL",14; bonus2 bSkillHeal,"AL_HEAL",14; bonus2 bSkillAtk,"PR_SANCTUARY",14; bonus2 bSkillHeal,"PR_SANCTUARY",14; bonus bDelayRate,-10; bonus bUnbreakableWeapon,0; if(getrefine() > 5) { bonus2 bSkillAtk,"AL_HEAL",5; bonus2 bSkillHeal,"AL_HEAL",5; bonus2 bSkillAtk,"PR_SANCTUARY",5; bonus2 bSkillHeal,"PR_SANCTUARY",5; } if(getrefine() > 8) bonus5 bAutoSpellOnSkill,"AL_HEAL","AL_HEAL",10,100,1; if(getrefine() > 9) { bonus2 bSkillAtk,"AL_HEAL",10; bonus2 bSkillHeal,"AL_HEAL",10; bonus2 bSkillAtk,"PR_SANCTUARY",10; bonus2 bSkillHeal,"PR_SANCTUARY",10; } },{},{} // Bows 1701,Bow,Bow,4,1000,,500,15,,5,3,0x000A0848,7,2,34,1,4,1,11,{},{},{} 1702,Bow_,Bow,4,1000,,500,15,,5,4,0x000A0848,7,2,34,1,4,1,11,{},{},{} @@ -890,6 +902,7 @@ //1740#Nepentis_Bow# //1741#Cursed_Dryer# 1742,Novice_Composite_Bow,Novice Composite Bow,4,1,,0,49,,5,0,0x000A0848,7,2,34,1,4,0,11,{},{},{} +1743,Glorious_Hunter_Bow,Glorious Hunter Bow,4,0,,0,100,,5,0,0x001A0848,7,2,34,4,80,1,11,{ bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bCritAtkRate,getrefine() * 2; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) bonus2 bSkillAtk,"AC_DOUBLE",20; },{},{} // Arrows 1750,Arrow,Arrow,10,1,,1,25,,,,0x000A1848,7,2,32768,,1,,1,{},{},{} 1751,Silver_Arrow,Silver Arrow,10,3,,2,30,,,,0x000A1848,7,2,32768,,1,,1,{ bonus bAtkEle,Ele_Holy; },{},{} @@ -938,8 +951,10 @@ 1821,Seismic_Fist,Seismic Fist,4,20,,650,80,,1,3,0x00008100,7,2,2,3,75,1,12,{ bonus3 bAutoSpell,"SA_SEISMICWEAPON",5,10; },{},{} 1822,Combo_Battle_Glove,Barrage Fist,4,20,,500,30,,1,4,0x00008100,7,2,2,3,60,1,12,{ bonus2 bSkillAtk,"MO_TRIPLEATTACK",15; bonus2 bSkillAtk,"MO_CHAINCOMBO",15; bonus2 bSkillAtk,"MO_COMBOFINISH",20; },{},{} 1823,Valorous_Battle_Fist,Valorous Battle Fist,4,0,,0,30,,1,0,0x00008100,7,2,2,3,80,1,12,{ bonus bStr,2; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus4 bAutoSpell,"CH_SOULCOLLECT",1,50,0; bonus bUnbreakableWeapon,0; },{},{} -1824,Brave_Battle_Fist,Brave Battle Fist,4,0,,0,30,,1,0,0x00008100,7,2,2,3,80,1,12,{ bonus bStr,2; bonus bInt,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bCastrate,271,-25; bonusautoscript "{ sc_start4 SC_SKILLCASTRATE,6000,271,-100,0,0; }",50,BF_WEAPON; bonus bUnbreakableWeapon,0; },{},{} +1824,Brave_Battle_Fist,Brave Battle Fist,4,0,,0,30,,1,0,0x00008100,7,2,2,3,80,1,12,{ bonus bStr,2; bonus bInt,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bCastrate,271,-25; bonusautoscript "{ sc_start4 SC_SKILLCASTRATE,6000,271,0,0,-100; }",50,BF_WEAPON; bonus bUnbreakableWeapon,0; },{},{} //1825#Soul_Of_Hels_Leon# +1826,Glorious_Claw,Glorious Claw,4,0,,0,30,,1,0,0x00008100,7,2,2,4,80,1,12,{ bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus3 bAutoSpell,"MO_INVESTIGATE",1,50; bonus3 bAutoSpell,"AL_DECAGI",1,50; } },{},{} +1827,Glorious_Fist,Glorious Fist,4,0,,0,30,,1,0,0x00008100,7,2,2,4,80,1,12,{ bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) bonusautoscript3 "{ sc_start4 SC_SKILLCASTRATE,6000,271,401,0,-100; }",500,"MO_EXPLOSIONSPIRITS"; },{},{} // Instruments 1901,Violin,Violin,4,4000,,700,50,,1,3,0x00080000,7,1,2,1,2,1,13,{},{},{} 1902,Violin_,Violin,4,4000,,700,50,,1,4,0x00080000,7,1,2,1,2,1,13,{},{},{} @@ -967,6 +982,7 @@ 1924,Brave_Battlefield_Guitar,Brave Battlefield Guitar,4,0,,0,50,,1,0,0x00080000,7,1,2,3,80,1,13,{ bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bSkillAtk,"CG_ARROWVULCAN",20; bonus bUnbreakableWeapon,0; },{},{} //1925#Chello# //1926#Harp_Of_Nepentis# +1927,Glorious_Guitar,Glorious Guitar,4,0,,0,50,,1,0,0x00180000,7,1,2,4,80,1,13,{ bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) bonus4 bAutoSpellOnSkill,"CG_ARROWVULCAN","CG_TAROTCARD",5,100; },{},{} // Whips 1950,Rope,Rope,4,2500,,400,45,,2,3,0x00080000,7,0,2,1,3,1,14,{},{},{} 1951,Rope_,Rope,4,2500,,400,45,,2,4,0x00080000,7,0,2,1,3,1,14,{},{},{} @@ -999,9 +1015,11 @@ 1978,Brave_Battle_Lariat,Brave Battle Lariat,4,0,,0,50,,2,0,0x00080000,7,0,2,3,80,1,14,{ bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bSkillAtk,"CG_ARROWVULCAN",20; bonus bUnbreakableWeapon,0; },{},{} //1979#Stem_Of_Nepentis# //1980#Rope_Of_Unbalance# +1981,Glorious_Lariat,Glorious Lariat,4,0,,0,50,,2,0,0x00180000,7,0,2,4,80,1,14,{ bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) bonus4 bAutoSpellOnSkill,"CG_ARROWVULCAN","CG_TAROTCARD",5,100; },{},{} // Additional 2-Handed Staffs 2000,Destruction_Rod,Staff of Destruction,4,20,,2500,130,,1,1,0x00000200,2,2,34,4,80,1,10,{ bonus bMatkRate,25+getrefine()/2; bonus bInt,3; bonus bAgi,10; bonus bUseSPrate,(getrefine()*2); bonus5 bAutoSpellWhenHit,"WZ_JUPITEL",5,(getrefine()*20),BF_WEAPON,1; bonus2 bCastrate,366,-50; },{},{} 2001,Divine_Cross,Divine Cross,4,20,,1500,120,,1,0,0x00008100,7,2,34,4,70,1,10,{ bonus bAtkEle,Ele_Holy; bonus bMatkRate,15; bonus bDex,4; bonus2 bSubRace,RC_Demon,15; bonus2 bSubRace,RC_Undead,15; if (isequipped(2677) || isequipped(2711)) { bonus bMatkRate,10; bonus bDex,2; bonus2 bSubRace,RC_Demon,10; bonus2 bSubRace,RC_Undead,10; }; },{},{} +2002,Glorious_Staff_Of_Destruction,Glorious Staff Of Destruction,4,0,,0,70,,1,0,0x00018314,7,2,34,4,80,1,10,{ bonus bMatkRate,15 + getrefine(); bonus2 bMagicAddRace,RC_DemiHuman,15; bonus2 bIgnoreMdefRate,RC_DemiHuman,25; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus bMatkRate,5; if(getrefine() > 8) { bonus5 bAutoSpellOnSkill,"WZ_STORMGUST","MG_SAFETYWALL",10,100,1; bonus5 bAutoSpellOnSkill,"WZ_METEOR","MG_SAFETYWALL",10,100,1; bonus5 bAutoSpellOnSkill,"WZ_VERMILION","MG_SAFETYWALL",10,100,1; } },{},{} // Shields //=================================================================== 2101,Guard,Guard,5,500,,300,,3,,0,0xFFFFFFFF,7,2,32,,0,1,1,{},{},{} @@ -1238,6 +1256,9 @@ 2391,Life_Link,Life Link,5,20,,3500,,9,,1,0x00004082,2,2,16,,82,1,0,{ bonus bVit,2; bonus bMdef,5; bonus bHPrecovRate,50; },{},{} //2392,Old_Green_Pantie,Old Green Pantie 2393,Novice_Adventure_Suit,Novice Adventure Suit,5,1,,0,,8,,1,0x00000001,7,2,16,,0,0,0,{},{},{} +2394,Glorious_Suit,Glorious Suit,5,0,,0,,0,,0,0xFFFFFFFE,7,2,16,,81,1,0,{ bonus bMaxHPRate,20; bonus2 bSubRace,RC_DemiHuman,7; if( isequipped(2444) && isequipped(2549) ) { bonus bAtkRate,5; bonus bMatkRate,5; bonus2 bResEff,Eff_Freeze,10000; bonus2 bSkillHeal2,"AM_POTIONPITCHER",3; bonus2 bSkillHeal2,"AL_HEAL",3; bonus2 bSkillHeal2,"PR_SANCTUARY",3; } },{},{} +2395,Glorious_Basic_Suit_(A),Glorious Basic Suit (A),5,0,,0,,0,,0,0xFFFFFFFE,7,2,16,,61,1,0,{ bonus bMaxHP,600; bonus bSPrecovRate,10; },{},{} +2396,Glorious_Basic_Suit_(B),Glorious Basic Suit (B),5,0,,0,,0,,0,0xFFFFFFFE,7,2,16,,61,1,0,{ bonus bMaxHP,500; },{},{} // Footgears //=================================================================== 2401,Sandals,Sandals,5,400,,200,,1,,0,0xFFFFFFFF,7,2,64,,0,1,0,{},{},{} @@ -1282,6 +1303,9 @@ 2440,Sprint_Shoes,Sprint Shoes,5,20,,300,,2,,0,0x00CFDF80,2,2,64,,0,1,0,{ bonus bAGI,1; bonus bSPrecovRate,5; if (isequipped(2387)) { bonus bMaxHPRate,7; bonus bMaxSPRate,7; bonus bCastRate,-3; bonus bDelayRate,-15; }; },{},{} 2441,Beach_Sandals,Beach Sandals,5,20,,200,,0,,0,0xFFFFFFFF,7,2,64,,0,1,0,{ bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus2 bSubEle,Ele_Fire,10; if (isequipped(2546)) bonus bFlee,5; },{},{} //2442#Red_Stocking_Boots# +2444,Glorious_Shoes,Glorious Shoes,5,0,,0,,0,,0,0xFFFFFFFE,7,2,64,,81,1,0,{ bonus bMaxHPRate,10; bonus2 bSubRace,RC_DemiHuman,4; },{},{} +2445,Glorious_Basic_Shoes_(A),Glorious Basic Shoes (A),5,0,,0,,0,,0,0xFFFFFFFE,7,2,64,,61,1,0,{ bonus bMaxHPRate,5; bonus bMaxSPRate,5; },{},{} +2446,Glorious_Basic_Shoes_(B),Glorious Basic Shoes (B),5,0,,0,,0,,0,0xFFFFFFFE,7,2,64,,61,1,0,{ bonus bMaxHPRate,5; },{},{} // Garments //=================================================================== 2501,Hood,Hood,5,1000,,200,,1,,0,0xFFFFFFFF,7,2,4,,0,1,0,{},{},{} @@ -1332,6 +1356,7 @@ 2546,Beach_Manteau,Beach Manteau,5,20,,600,,0,,1,0xFFFFFFFF,7,2,4,,0,1,0,{ bonus bStr,1; bonus bInt,1; bonus2 bSubEle,Ele_Fire,10; },{},{} //2547#Cheap_Undershirt# //2548#Muffler# +2549,Glorious_Muffler,Glorious Muffler,5,0,,0,,0,,0,0xFFFFFFFE,7,2,4,,81,1,0,{ bonus bMaxHPRate,5; bonus2 bSubRace,RC_DemiHuman,5; },{},{} // Accessories //=================================================================== 2601,Ring,Ring,5,30000,,100,,0,,0,0xFFFFFFFE,7,2,136,,20,0,0,{ bonus bStr,2; },{},{} @@ -1501,6 +1526,9 @@ 2769,Archer_Figure,Archer Figure,5,0,,0,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bDex,1; if(Class == Job_Archer) bonus bBaseAtk,10; },{},{} 2770,Thief_Figure,Thief Figure,5,0,,0,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bAgi,1; if(Class == Job_Thief) bonus bAspdRate,3; },{},{} 2771,Merchant_Figure,Merchant Figure,5,0,,0,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bStr,1; if(Class == Job_Merchant) bonus bCritical,5; },{},{} +2772,Glorious_Ring,Glorious Ring,5,0,,0,,0,,0,0xFFFFFFFE,7,2,136,,81,0,0,{ bonus bMaxHP,300; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus bAspd,5; bonus bCastrate,-3; bonus2 bSkillHeal2,"AM_POTIONPITCHER",3; bonus2 bSkillHeal2,"AL_HEAL",3; bonus2 bSkillHeal2,"PR_SANCTUARY",3; if( isequipped(2720) || isequipped(2721) || isequipped(2722) || isequipped(2723) || isequipped(2724) || isequipped(2725) || isequipped(2733) ) { bonus bAtkRate,5; bonus bMatkRate,3; bonus2 bSkillHeal2,"AM_POTIONPITCHER",5; bonus2 bSkillHeal2,"AL_HEAL",5; bonus2 bSkillHeal2,"PR_SANCTUARY",5; } },{},{} +2773,Glorious_Basic_Ring_(A),Glorious Basic Ring (A),5,0,,0,,0,,0,0xFFFFFFFE,7,2,136,,61,0,0,{ bonus bAllStats,2; },{},{} +2774,Glorious_Basic_Ring_(B),Glorious Basic Ring (B),5,0,,0,,0,,0,0xFFFFFFFE,7,2,136,,61,0,0,{ bonus bAllStats,1; },{},{} // Cards //=================================================================== 4001,Poring_Card,Poring Card,6,20,,10,,,,,,,,16,,,,,{ bonus bLuk,2; bonus bFlee2,1; },{},{} @@ -3891,6 +3919,7 @@ //13039#Ivory_Knife# 13040,Novice_Cutter,Novice Cutter,4,1,,0,50,,1,0,0xFE9F7EEF,7,2,2,1,1,0,1,{},{},{} 13041,Novice_Main_Gauche,Novice Main Gauche,4,1,,0,65,,1,0,0xFE9F7EEF,7,2,2,1,1,0,1,{},{},{} +13042,Glorious_Damascus,Glorious Damascus,4,0,,0,120,,1,0,0x021F5EEF,7,2,2,4,80,1,1,{ bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus3 bAutoSpell,"PR_LEXDIVINA",1,50; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) bonus4 bAutoSpellOnSkill,"RG_BACKSTAP","NPC_WIDEBLEEDING",2,100; },{},{} // Guns 13100,Six_Shooter,Six Shooter,4,4500,,400,30,,7,1,0x01000000,7,2,34,1,10,1,17,{ bonus bHit,-10; },{},{} 13101,Six_Shooter_,Six Shooter,4,4500,,400,30,,7,2,0x01000000,7,2,34,1,10,1,17,{ bonus bHit,-10; },{},{} @@ -3901,6 +3930,7 @@ 13106,Gold_Lux,Gold Lux,4,100000,,500,20,,7,0,0x01000000,7,2,34,3,12,1,17,{ bonus bHit,-10; if(getskilllv("GS_GLITTERING")>0) bonus3 bAutoSpell,"GS_GLITTERING",getskilllv("GS_GLITTERING"),100; },{},{} 13107,Wasteland_Outlaw,Western Outlaw,4,20,,580,68,,7,2,0x01000000,7,2,34,3,70,1,17,{ bonus bHit,readparam(bAgi)/10; bonus bAspdRate,readparam(bAgi)/14; },{},{} 13108,Soldier_Revolver,Soldier Revolver,4,0,,0,70,,7,0,0x01000000,7,2,34,3,80,1,17,{ bonus bDex,2; bonus bHit,-10; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonusautoscript "{ sc_start SC_INCASPDRATE,3000,100; }",50; bonus bUnbreakableWeapon,0; },{},{} +13110,Glorious_Revolver,Glorious Revolver,4,0,,0,80,,7,0,0x01000000,7,2,34,4,80,1,17,{ bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus4 bAutoSpellOnSkill,"GS_RAPIDSHOWER","GS_GLITTERING",1,1000; bonus2 bSkillAtk,"GS_RAPIDSHOWER",getrefine(); } },{},{} 13150,Branch,Branch,4,3000,,500,50,,9,3,0x01000000,7,2,34,1,1,1,18,{},{},{} 13151,The_Cyclone,Cyclone,4,17500,,700,120,,9,1,0x01000000,7,2,34,2,24,1,18,{ bonus bHit,10; bonus bCritical,10; },{},{} 13152,The_Cyclone_,Cyclone,4,17500,,700,120,,9,2,0x01000000,7,2,34,2,24,1,18,{ bonus bHit,10; bonus bCritical,10; },{},{} @@ -3926,6 +3956,10 @@ 13172,Soldier_Gatling_Gun,Soldier Gatling Gun,4,0,,0,80,,9,0,0x01000000,7,2,34,3,80,1,19,{ bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,35; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonusautoscript "{ sc_start SC_INCBASEATK,6000,80; sc_start4 SC_HPDRAIN,6000,120,1,0,0; }",50; bonus bUnbreakableWeapon,0; },{},{} 13173,Soldier_Shotgun,Soldier Shotgun,4,0,,0,100,,9,0,0x01000000,7,2,34,3,80,1,20,{ bonus bDex,2; bonus bSplashRange,1; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonusautoscript "{ sc_start SC_INCBASEATK,6000,80; sc_start4 SC_HPDRAIN,6000,100,1,0,0; }",50; bonus bUnbreakableWeapon,0; },{},{} 13174,Soldier_Grenade_Launcher,Soldier Grenade Launcher,4,0,,0,300,,9,0,0x01000000,7,2,34,3,80,1,21,{ bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,35; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonusautoscript "{ sc_start SC_INCBASEATK,6000,80; sc_start4 SC_HPDRAIN,6000,120,1,0,0; }",50; bonus bUnbreakableWeapon,0; },{},{} +13176,Glorious_Rifle,Glorious Rifle,4,0,,0,90,,9,0,0x01000000,7,2,34,4,80,1,18,{ bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus2 bSkillAtk,"GS_TRIPLEACTION",30; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus2 bCastrate,"GS_TRACKING",-25; bonus2 bSkillAtk,"GS_TRACKING",getrefine() * 3; } },{},{} +13177,Glorious_Gatling_Gun,Glorious Gatling Gun,4,0,,0,90,,9,0,0x01000000,7,2,34,4,80,1,19,{ bonus2 bAddRace,RC_DemiHuman,35; bonus2 bIgnoreDefRate,RC_DemiHuman,25; bonus2 bSkillAtk,"GS_TRIPLEACTION",30; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) bonus2 bAddRace,RC_DemiHuman,getrefine(); },{},{} +13178,Glorious_Shotgun,Glorious Shotgun,4,0,,0,110,,9,0,0x01000000,7,2,34,4,80,1,20,{ bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bSplashRange,1; bonus2 bSkillAtk,"GS_TRIPLEACTION",30; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus2 bSkillAtk,"GS_SPREADATTACK",getrefine() * 2; bonus3 bAddEffOnSkill,"GS_SPREADATTACK",Eff_Stun,5000; } },{},{} +13179,Glorious_Grenade_Launcher,Glorious Grenade Launcher,4,0,,0,330,,9,0,0x01000000,7,2,34,4,80,1,21,{ bonus2 bAddRace,RC_DemiHuman,35; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus2 bSkillAtk,"GS_TRIPLEACTION",30; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus2 bSkillAtk,"GS_GROUNDDRIFT",getrefine() * 2; bonusautoscript "{ sc_start SC_INCASPDRATE,3000,20; }",50; } },{},{} // Bullets 13200,Bullet,Bullet,10,1,,2,10,,,,0x01000000,7,2,32768,,1,,3,{},{},{} 13201,Silver_Bullet,Silver Bullet,10,15,,2,15,,,,0x01000000,7,2,32768,,1,,3,{ bonus bAtkEle,Ele_Holy; },{},{} @@ -3954,6 +3988,7 @@ 13304,Huuma_Calm_Mind,Spirit of Kamaitachi,4,20,,1550,112,,1,2,0x02000000,7,2,34,3,70,1,22,{ bonus2 bSkillAtk,"NJ_HUUMA",30; bonus bNoCastCancel,0; },{},{} 13305,Brave_Huuma_Front_Shuriken,Brave Huuma Front Shuriken,4,0,,0,55,,1,0,0x02000000,7,2,34,3,80,1,22,{ bonus bStr,2; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{} 13306,Valorous_Huuma_Front_Shuriken,Valorous Huuma Front Shuriken,4,0,,0,55,,1,0,0x02000000,7,2,34,3,80,1,22,{ bonus bStr,2; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,95; bonusautoscript "{ sc_start4 SC_SKILLATKBONUS,10000,525,544,0,10; }",50; bonus bUnbreakableWeapon,0; },{},{} +13307,Glorious_Huuma_Shuriken,Glorious Huuma Shuriken,4,0,,0,55,,1,0,0x02000000,7,2,34,4,80,1,22,{ bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bMatkRate,15; bonusautoscript "{ sc_start4 SC_SKILLATKBONUS,10000,525,544,0,10; }",50; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 8) { bonus4 bAutoSpellOnSkill,"NJ_ISSEN","AL_HEAL",10,800; bonus4 bAutoSpellOnSkill,"NJ_HUUMA","NPC_CRITICALWOUND",2,100; } },{},{} 13400,Cutlas_,Cutlus,4,20,,900,150,,1,1,0x000654E2,7,2,2,4,40,1,2,{ skill "SM_BASH",5; bonus bStr,2; bonus bDef,1; },{},{} 13401,Excalibur_C,Refined Excalibur,4,,,0,199,,1,0,0x000654E2,7,2,2,4,1,0,2,{ bonus bInt,10; bonus bLuk,10; bonus bAtkEle,Ele_Holy; },{},{} 13402,Cutlas_C,Refined Cutlus,4,,,0,185,,1,0,0x000654E2,7,2,2,4,1,0,2,{ skill "SM_BASH",5; bonus bStr,2; bonus bDef,1; },{},{} @@ -3970,12 +4005,15 @@ 13413,Naght_Seiger_Twin_Edge_,Twin Edge of Naght Sieger,4,0,,1500,160,,1,3,0x000654E2,2,2,2,4,75,1,2,{ bonus bAtkEle,Ele_Fire; skill "WZ_METEOR",3; },{},{} //13414#Elemental_Sword# 13415,Novice_Falchion,Novice Falchion,4,1,,0,59,,1,0,0x000654E3,7,2,2,1,1,0,2,{},{},{} +13416,Glorious_Flamberge,Glorious Flamberge,4,0,,0,130,,1,0,0x000654E3,7,2,2,4,80,1,2,{ bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus3 bAutoSpell,"PR_LEXDIVINA",1,50; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus2 bIgnoreDefRate,RC_DemiHuman,5; if(getrefine() > 6) bonus bAspd,10; if(getrefine() > 8) bonus4 bAutoSpellOnSkill,"MS_BASH","NPC_CRITICALWOUND",2,100; },{},{} +13417,Glorious_Rapier,Glorious Rapier,4,0,,0,130,,1,0,0x000654E3,7,2,2,4,80,1,2,{ bonus bInt,getrefine() + 1; bonus bMatkRate,10; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus bUseSPrate,-10; if(getrefine() > 8) bonus bInt,5; },{},{} +13418,Glorious_Avenger,Glorious Avenger,4,0,,0,130,,1,0,0x000444A2,7,2,2,4,80,1,2,{ bonus bInt,getrefine() + 1; bonus bMatkRate,10; bonus bUnbreakableWeapon,0; if(getrefine() > 5) bonus bUseSPrate,-10; if(getrefine() > 8) bonus4 bAutoSpellOnSkill,"PA_PRESSURE","PR_LEXDIVINA",1,100; if(getrefine() > 9) bonus bInt,5; },{},{} // More Cash Shop Items 13500,Insurance60_Box,Insurance60 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14500,10; },{},{} 13501,Assorted_Scroll_Box,Assorted Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -13502,Drooping_Kitty_Box,Refined Drooping Cat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5279,1209600; },{},{} -13503,Magestic_Goat_Box,Refined Majestic Goat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5280,1209600; },{},{} -13504,Deviruchi_Hat_Box,Refined Deviruchi Hat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5281,1209600; },{},{} +13502,Drooping_Kitty_Box,Refined Drooping Cat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5279,604800; },{},{} +13503,Magestic_Goat_Box,Refined Majestic Goat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5280,604800; },{},{} +13504,Deviruchi_Hat_Box,Refined Deviruchi Hat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5281,604800; },{},{} 13505,Executioner_Box,Refined Executioner Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1174,604800; },{},{} 13506,Brood_Axe_Box,Refined Bloody Axe Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1373,604800; },{},{} 13507,Tomahawk_Box,Refined Tomahawk Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1374,604800; },{},{} @@ -4256,25 +4294,25 @@ 13782,Corsair_Box,Refined Corsair Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5331,1209600; },{},{} 13783,Bloodied_Shackle_Ball_Box,Refined Bloodied Shackle Ball Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2710,604800; },{},{} 13784,Spiritual_Ring_Box,Refined Spiritual Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2711,604800; },{},{} -13785,Nagan_Box1,Refined Nagan Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13407,604800; },{},{} -13786,Brocca_Box1,Refined Brocca Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1424,604800; },{},{} -13787,Survival_Rod_Box1,Refined Survivor's Rod Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1628,604800; },{},{} -13788,Quadrille_Box1,Refined Quadrille Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1537,604800; },{},{} -13789,Great_Axe_Box1,Refined Great Axe Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1378,604800; },{},{} -13790,Bloody_Roar_Box1,Refined Bloody Roar Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1273,604800; },{},{} -13791,Hardcover_Book_Box1,Refined Hardcover Book Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1567,604800; },{},{} -13792,Fireblend_Box1,Refined Fireblend Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13408,604800; },{},{} -13793,Immaterial_Sword_Box1,Refined Immaterial Sword Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13409,604800; },{},{} -13794,Unholy_Touch_Box1,Refined Unholy Touch Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12742,604800; },{},{} -13795,Cloak_Of_Survival_Box1,Refined Survivor's Manteau Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2535,1209600; },{},{} -13796,Masquerade_Box1,Refined Masquerade Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5326,1209600; },{},{} -13797,Orc_Hero_Helm_Box1,Refined Helmet of Orc Hero Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5327,1209600; },{},{} -13798,Evil_Wing_Ear_Box1,Refined Wing of Diablo Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5328,1209600; },{},{} -13799,Dark_Blindfold_Box1,Refined Dark Blinder Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5329,1209600; },{},{} -13800,kRO_Drooping_Kitty_Box1,Refined Drooping Cat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5330,1209600; },{},{} -13801,Corsair_Box1,Refined Corsair Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5331,1209600; },{},{} -13802,Bloodied_Shackle_Ball_Box1,Refined Bloodied Shackle Ball Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2710,604800; },{},{} -13803,Spiritual_Ring_Box1,Refined Spiritual Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2711,604800; },{},{} +13785,Nagan_Box1,Refined Nagan Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13407,86400; },{},{} +13786,Brocca_Box1,Refined Brocca Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1424,86400; },{},{} +13787,Survival_Rod_Box1,Refined Survivor's Rod Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1628,86400; },{},{} +13788,Quadrille_Box1,Refined Quadrille Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1537,86400; },{},{} +13789,Great_Axe_Box1,Refined Great Axe Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1378,86400; },{},{} +13790,Bloody_Roar_Box1,Refined Bloody Roar Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1273,86400; },{},{} +13791,Hardcover_Book_Box1,Refined Hardcover Book Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1567,86400; },{},{} +13792,Fireblend_Box1,Refined Fireblend Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13408,86400; },{},{} +13793,Immaterial_Sword_Box1,Refined Immaterial Sword Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13409,86400; },{},{} +13794,Unholy_Touch_Box1,Refined Unholy Touch Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1274,86400; },{},{} +13795,Cloak_Of_Survival_Box1,Refined Survivor's Manteau Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2535,86400; },{},{} +13796,Masquerade_Box1,Refined Masquerade Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5326,86400; },{},{} +13797,Orc_Hero_Helm_Box1,Refined Helmet of Orc Hero Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5327,86400; },{},{} +13798,Evil_Wing_Ear_Box1,Refined Wing of Diablo Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5328,86400; },{},{} +13799,Dark_Blindfold_Box1,Refined Dark Blinder Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5329,86400; },{},{} +13800,kRO_Drooping_Kitty_Box1,Refined Drooping Cat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5330,86400; },{},{} +13801,Corsair_Box1,Refined Corsair Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5331,86400; },{},{} +13802,Bloodied_Shackle_Ball_Box1,Refined Bloodied Shackle Ball Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2710,86400; },{},{} +13803,Spiritual_Ring_Box1,Refined Spiritual Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2711,86400; },{},{} 13804,Firecracker_Love_Box,Love You Firecracker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14546,10; },{},{} 13805,Firecracker_Wday_Box,White Day Firecracker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14547,10; },{},{} 13806,Firecracker_Vday_Box,Valentine's Day Firecracker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14548,10; },{},{} @@ -4409,13 +4447,13 @@ 13950,Br_ThiefPackage,Brazil Thief Package,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2336,1; getitem 2104,1; getitem 2406,1; getitem 2506,1; getitem 4097,1; getitem 4102,1; getitem 2607,2; getitem 2274,1; },{},{} 13951,Wasteland_Outlaw_Box,Wasteland Outlaw Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13107,1; },{},{} 13952,Lever_Action_Rifle_Box,Lever Action Rifle Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13170,1; },{},{} -13953,All_In_One_Ring_Box,All In One Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2741,1; },{},{} -13954,Spiritual_Tunic_Box,Spiritual Tunic Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2384,1; },{},{} -13955,Recuperative_Armor_Box,Recuvative Armor Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2385,1; },{},{} -13956,Shell_Of_Resistance_Box,Shell Of Resistance Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2132,1; },{},{} -13957,Sylph_Manteau_Box,Silf Manteau Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2543,1; },{},{} -13958,Refresh_Shoes_Box,Refresh Shoes Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2439,1; },{},{} -13959,Well_Baked_Toast_Box,Crunch Toast Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5107,1; },{},{} +13953,All_In_One_Ring_Box,All In One Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2741,604800; },{},{} +13954,Spiritual_Tunic_Box,Spiritual Tunic Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2384,604800; },{},{} +13955,Recuperative_Armor_Box,Recuvative Armor Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2385,604800; },{},{} +13956,Shell_Of_Resistance_Box,Shell Of Resistance Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2132,604800; },{},{} +13957,Sylph_Manteau_Box,Silf Manteau Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2543,604800; },{},{} +13958,Refresh_Shoes_Box,Refresh Shoes Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2439,604800; },{},{} +13959,Well_Baked_Toast_Box,Crunch Toast Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5391,604800; },{},{} // // 13962,Deporte_Doll_Hat_Box,Deporte Doll Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5340,1; },{},{} @@ -4473,13 +4511,13 @@ 14014,Gogo_Magic_Powder_Box4,Gogo Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13917,1; },{},{} 14015,Wasteland_Outlaw_Box2,Wasteland Outlaw Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13107,1; },{},{} 14016,Lever_Action_Rifle_Box2,Lever Action Rifle Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13170,1; },{},{} -14017,All_In_One_Ring_Box2,All In One Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2741,1; },{},{} -14018,Spiritual_Tunic_Box2,Spiritual Tunic Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2384,1; },{},{} -14019,Recuperative_Armor_Box2,Recuvative Armor Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2385,1; },{},{} -14020,Shell_Of_Resistance_Box2,Shell Of Resistance Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2132,1; },{},{} -14021,Sylph_Manteau_Box2,Silf Manteau Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2543,1; },{},{} -14022,Refresh_Shoes_Box2,Refresh Shoes Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2439,1; },{},{} -14023,Well_Baked_Toast_Box2,Crunch Toast Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5107,1; },{},{} +14017,All_In_One_Ring_Box2,All In One Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2741,604800; },{},{} +14018,Spiritual_Tunic_Box2,Spiritual Tunic Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2384,604800; },{},{} +14019,Recuperative_Armor_Box2,Recuvative Armor Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2385,604800; },{},{} +14020,Shell_Of_Resistance_Box2,Shell Of Resistance Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2132,604800; },{},{} +14021,Sylph_Manteau_Box2,Silf Manteau Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2543,604800; },{},{} +14022,Refresh_Shoes_Box2,Refresh Shoes Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2439,604800; },{},{} +14023,Well_Baked_Toast_Box2,Crunch Toast Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5107,604800; },{},{} 14024,Robo_Eye_Box,Robo Eye Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5325,1; },{},{} 14025,Maiden's_Twin_Ribbon_Box,Maiden's Twin Ribbon Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5187,1; },{},{} //14026,Diadem_Box,Diadem Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5313,1; },{},{} @@ -4847,5 +4885,9 @@ 14594,Quagmire_scroll,Quagmire scroll,11,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "WZ_QUAGMIRE",5; },{},{} //14595,...,...,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 14596,Pierre_Treasure_Box,Pierre's Treasure Box,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -14597,Phreeoni_Scroll,Phreeoni Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCHIT,60000,100; },{},{} -14598,Ghostring_Scroll,Ghostring Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_ELEMENTALCHANGE,60000,1,Ele_Ghost,1,0; },{},{} +14597,Phreeoni_Scroll,Phreeoni Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000,4121; },{},{} +14598,Ghostring_Scroll,Ghostring Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,60000,4047; },{},{} +14602,Tao_Gunka_Scroll,Tao Gunka Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000,4302; },{},{} +14603,Mistress_Scroll,Mistress Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000,4132; },{},{} +14604,Orc_Hero_Scroll,Orc Hero Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,60000,4143; },{},{} +14605,Orc_Lord_Scroll,Orc Lord Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000,4135; },{},{} diff --git a/src/map/map.h b/src/map/map.h index f96ae8db9..519138d1c 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -307,15 +307,14 @@ enum _sp { SP_HP_DRAIN_VALUE,SP_SP_DRAIN_VALUE, // 1079-1080 SP_WEAPON_ATK,SP_WEAPON_ATK_RATE, // 1081-1082 SP_DELAYRATE,SP_HP_DRAIN_RATE_RACE,SP_SP_DRAIN_RATE_RACE, // 1083-1085 - SP_IGNORE_MDEF_RATE,SP_IGNORE_DEF_RATE,SP_SKILL_HEAL2, //1086-1088 - - + SP_IGNORE_MDEF_RATE,SP_IGNORE_DEF_RATE,SP_SKILL_HEAL2,SP_ADDEFF_ONSKILL, //1086-1089 + SP_RESTART_FULL_RECOVER=2000,SP_NO_CASTCANCEL,SP_NO_SIZEFIX,SP_NO_MAGIC_DAMAGE,SP_NO_WEAPON_DAMAGE,SP_NO_GEMSTONE, // 2000-2005 SP_NO_CASTCANCEL2,SP_NO_MISC_DAMAGE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR, SP_UNBREAKABLE_HELM, // 2006-2010 SP_UNBREAKABLE_SHIELD, SP_LONG_ATK_RATE, // 2011-2012 SP_CRIT_ATK_RATE, SP_CRITICAL_ADDRACE, SP_NO_REGEN, SP_ADDEFF_WHENHIT, SP_AUTOSPELL_WHENHIT, // 2013-2017 - SP_SKILL_ATK, SP_UNSTRIPABLE, SP_FREE, // 2018-2020 + SP_SKILL_ATK, SP_UNSTRIPABLE, SP_AUTOSPELL_ONSKILL, // 2018-2020 SP_SP_GAIN_VALUE, SP_HP_REGEN_RATE, SP_HP_LOSS_RATE, SP_ADDRACE2, SP_HP_GAIN_VALUE, // 2021-2025 SP_SUBSIZE, SP_HP_DRAIN_VALUE_RACE, SP_ADD_ITEM_HEAL_RATE, SP_SP_DRAIN_VALUE_RACE, SP_EXP_ADDRACE, // 2026-2030 SP_SP_GAIN_RACE, SP_SUBRACE2, SP_FREE2, // 2031-2033 @@ -323,7 +322,6 @@ enum _sp { SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040 SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE //2041 //Before adding new bonuses, reuse the currently free slots: - //2020 (SP_FREE) (previously SP_ADD_DAMAGE_BY_CLASS) //2033 (SP_FREE2) (previously SP_ADDEFF_WHENHIT_SHORT) //1050 (SP_FREE3) (previously SP_ADD_SPEED) }; diff --git a/src/map/pc.c b/src/map/pc.c index 7de528cac..9e0157041 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1398,7 +1398,7 @@ int pc_disguise(struct map_session_data *sd, int class_) return 1; } -int pc_autoscript_add(struct s_autoscript *scripts, int max, short rate, short flag, short target, struct script_code *script) +int pc_autoscript_add(struct s_autoscript *scripts, int max, short rate, short flag, short target, struct script_code *script, bool onskill) { int i; ARR_FIND(0, max, i, scripts[i].script == NULL); @@ -1411,17 +1411,20 @@ int pc_autoscript_add(struct s_autoscript *scripts, int max, short rate, short f scripts[i].script = script; scripts[i].rate = rate; scripts[i].target = target; // 0 = Script on Self 1 = Script on Target - //Auto-update flag value. - if( !(flag&BF_RANGEMASK) ) - flag|=BF_SHORT|BF_LONG; //No range defined? Use both. - if( !(flag&BF_WEAPONMASK) ) - flag|=BF_WEAPON; //No attack type defined? Use weapon. - if( !(flag&BF_SKILLMASK) ) - { - if( flag&(BF_MAGIC|BF_MISC) ) - flag|=BF_SKILL; //These two would never trigger without BF_SKILL - if( flag&BF_WEAPON ) - flag|=BF_NORMAL|BF_SKILL; + + if( !onskill ) + { // Auto-update flag value. + if( !(flag&BF_RANGEMASK) ) + flag|=BF_SHORT|BF_LONG; //No range defined? Use both. + if( !(flag&BF_WEAPONMASK) ) + flag|=BF_WEAPON; //No attack type defined? Use weapon. + if( !(flag&BF_SKILLMASK) ) + { + if( flag&(BF_MAGIC|BF_MISC) ) + flag|=BF_SKILL; //These two would never trigger without BF_SKILL + if( flag&BF_WEAPON ) + flag|=BF_NORMAL|BF_SKILL; + } } scripts[i].flag = flag; return 1; @@ -1501,6 +1504,36 @@ static int pc_bonus_autospell(struct s_autospell *spell, int max, short id, shor return 1; } +static int pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id) +{ + int i; + if( rate < 0 ) + return pc_bonus_autospell_del(spell, max, id, lv, -rate, card_id); + + for( i = 0; i < max && spell[i].id; i++ ) + { + if( spell[i].flag == src_skill && spell[i].id == id && spell[i].lv == lv && spell[i].card_id == card_id ) + { + if( !battle_config.autospell_stacking ) + rate += spell[i].rate; + break; + } + } + + if( i == max ) + { + ShowWarning("pc_bonus: Reached max (%d) number of autospells per character!\n", max); + return 0; + } + + spell[i].flag = src_skill; + spell[i].id = id; + spell[i].lv = lv; + spell[i].rate = rate; + spell[i].card_id = card_id; + return 1; +} + static int pc_bonus_addeff(struct s_addeffect* effect, int max, enum sc_type id, short rate, short arrow_rate, unsigned char flag) { int i; @@ -1530,6 +1563,28 @@ static int pc_bonus_addeff(struct s_addeffect* effect, int max, enum sc_type id, return 1; } +static int pc_bonus_addeff_onskill(struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill, unsigned char target) +{ + int i; + for( i = 0; i < max && effect[i].skill; i++ ) + { + if( effect[i].id == id && effect[i].skill == skill && effect[i].target == target ) + { + effect[i].rate += rate; + return 1; + } + } + if( i == max ) { + ShowWarning("pc_bonus: Reached max (%d) number of add effects on skill per character!\n", max); + return 0; + } + effect[i].id = id; + effect[i].rate = rate; + effect[i].skill = skill; + effect[i].target = target; + return 1; +} + static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) { int i; @@ -2673,6 +2728,15 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val) pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), (sc_type)type2, type3, 0, val); break; + case SP_ADDEFF_ONSKILL: + if( type3 > SC_MAX ) { + ShowWarning("pc_bonus3 (Add Effect on skill): %d is not supported.\n", type3); + break; + } + if( sd->state.lr_flag != 2 ) + pc_bonus_addeff_onskill(sd->addeff3, ARRAYLENGTH(sd->addeff3), (sc_type)type3, val, type2, 2); + break; + default: ShowWarning("pc_bonus3: unknown type %d %d %d %d!\n",type,type2,type3,val); break; @@ -2695,6 +2759,26 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4 if(sd->state.lr_flag != 2) pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), (val&1?type2:-type2), (val&2?-type3:type3), type4, 0, current_equip_card_id); break; + + case SP_AUTOSPELL_ONSKILL: + if(sd->state.lr_flag != 2) + { + int target = skill_get_inf(type2); //Support or Self (non-auto-target) skills should pick self. + target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill_get_inf2(type2)&INF2_NO_TARGET_SELF)); + + pc_bonus_autospell_onskill(sd->autospell3, ARRAYLENGTH(sd->autospell3), type2, target?-type3:type3, type4, val, current_equip_card_id); + } + break; + + case SP_ADDEFF_ONSKILL: + if( type2 > SC_MAX ) { + ShowWarning("pc_bonus3 (Add Effect on skill): %d is not supported.\n", type2); + break; + } + if( sd->state.lr_flag != 2 ) + pc_bonus_addeff_onskill(sd->addeff3, ARRAYLENGTH(sd->addeff3), (sc_type)type3, type4, type2, val); + break; + default: ShowWarning("pc_bonus4: unknown type %d %d %d %d %d!\n",type,type2,type3,type4,val); break; @@ -2717,6 +2801,12 @@ int pc_bonus5(struct map_session_data *sd,int type,int type2,int type3,int type4 if(sd->state.lr_flag != 2) pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), (val&1?type2:-type2), (val&2?-type3:type3), type4, type5, current_equip_card_id); break; + + case SP_AUTOSPELL_ONSKILL: + if(sd->state.lr_flag != 2) + pc_bonus_autospell_onskill(sd->autospell3, ARRAYLENGTH(sd->autospell3), type2, (val&1?-type3:type3), (val&2?-type4:type4), type5, current_equip_card_id); + break; + default: ShowWarning("pc_bonus5: unknown type %d %d %d %d %d %d!\n",type,type2,type3,type4,type5,val); break; diff --git a/src/map/pc.h b/src/map/pc.h index 8a100f092..deedc4d70 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -56,6 +56,12 @@ struct s_addeffect { unsigned char flag; }; +struct s_addeffectonskill { + enum sc_type id; + short rate, skill; + unsigned char target; +}; + struct s_add_drop { short id, group; int race, rate; @@ -116,6 +122,7 @@ struct map_session_data { bool changemap; struct guild *gmaster_flag; unsigned int bg_id; + unsigned skillonskill : 1; } state; struct { unsigned char no_weapon_damage, no_magic_damage, no_misc_damage; @@ -208,8 +215,10 @@ struct map_session_data { short sp_gain_race[RC_MAX]; // zeroed arrays end here. // zeroed structures start here - struct s_autospell autospell[15], autospell2[15]; + struct s_autospell autospell[15], autospell2[15], autospell3[15]; struct s_addeffect addeff[MAX_PC_BONUS], addeff2[MAX_PC_BONUS]; + struct s_addeffectonskill addeff3[MAX_PC_BONUS]; + struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills. unsigned short id; short val; @@ -229,7 +238,7 @@ struct map_session_data { } itemhealrate[MAX_PC_BONUS]; // zeroed structures end here // manually zeroed structures start here. - struct s_autoscript autoscript[10], autoscript2[10]; //Auto script on attack, when attacked + struct s_autoscript autoscript[10], autoscript2[10], autoscript3[10]; //Auto script on attack, when attacked, on skill usage // manually zeroed structures end here. // zeroed vars start here. int arrow_atk,arrow_ele,arrow_cri,arrow_hit; @@ -556,7 +565,7 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, int pc_updateweightstatus(struct map_session_data *sd); -int pc_autoscript_add(struct s_autoscript *scripts, int max, short rate, short flag, short target, struct script_code *script); +int pc_autoscript_add(struct s_autoscript *scripts, int max, short rate, short flag, short target, struct script_code *script, bool onskill); void pc_autoscript_clear(struct s_autoscript *scripts, int max); int pc_bonus(struct map_session_data*,int,int); diff --git a/src/map/script.c b/src/map/script.c index 5c1836c97..82c8079d1 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -6519,11 +6519,13 @@ BUILDIN_FUNC(bonus) { case SP_AUTOSPELL: case SP_AUTOSPELL_WHENHIT: + case SP_AUTOSPELL_ONSKILL: case SP_SKILL_ATK: case SP_SKILL_HEAL: case SP_SKILL_HEAL2: case SP_ADD_SKILL_BLOW: case SP_CASTRATE: + case SP_ADDEFF_ONSKILL: // these bonuses support skill names val1 = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) ); break; @@ -6547,13 +6549,21 @@ BUILDIN_FUNC(bonus) pc_bonus3(sd, type, val1, val2, val3); break; case 4: - val2 = script_getnum(st,4); + if( type == SP_AUTOSPELL_ONSKILL && script_isstring(st,4) ) + val2 = skill_name2id(script_getstr(st,4)); // 2nd value can be skill name + else + val2 = script_getnum(st,4); + val3 = script_getnum(st,5); val4 = script_getnum(st,6); pc_bonus4(sd, type, val1, val2, val3, val4); break; case 5: - val2 = script_getnum(st,4); + if( type == SP_AUTOSPELL_ONSKILL && script_isstring(st,4) ) + val2 = skill_name2id(script_getstr(st,4)); // 2nd value can be skill name + else + val2 = script_getnum(st,4); + val3 = script_getnum(st,5); val4 = script_getnum(st,6); val5 = script_getnum(st,7); @@ -6588,7 +6598,7 @@ BUILDIN_FUNC(bonusautoscript) script = parse_script(str, "autoscript bonus", 0, 0); if( !script ) return 1; - if( !pc_autoscript_add(sd->autoscript, ARRAYLENGTH(sd->autoscript), rate, flag, target, script) ) + if( !pc_autoscript_add(sd->autoscript, ARRAYLENGTH(sd->autoscript), rate, flag, target, script, false) ) { script_free_code(script); return 1; @@ -6616,13 +6626,40 @@ BUILDIN_FUNC(bonusautoscript2) script = parse_script(str, "autoscript2 bonus", 0, 0); if (!script) return 1; - if (!pc_autoscript_add(sd->autoscript2, ARRAYLENGTH(sd->autoscript2), rate, flag, target, script)) + if (!pc_autoscript_add(sd->autoscript2, ARRAYLENGTH(sd->autoscript2), rate, flag, target, script, false)) { script_free_code(script); return 1; } return 0; } +/// Bonus script that has a chance of being executed when used a skill +BUILDIN_FUNC(bonusautoscript3) +{ + int rate, skill, target = 0; + const char *str; + struct script_code *script; + TBL_PC* sd; + + sd = script_rid2sd(st); + if( sd == NULL ) + return 0;// no player attached, report source + + str = script_getstr(st,2); + rate = script_getnum(st,3); + skill = ( script_isstring(st,4) ? skill_name2id(script_getstr(st,4)) : script_getnum(st,4) ); + if( script_hasdata(st,5) ) + target = script_getnum(st,5); + script = parse_script(str, "autoscript3 bonus", 0, 0); + if( !script ) + return 1; + if( !pc_autoscript_add(sd->autoscript3, ARRAYLENGTH(sd->autoscript3), rate, skill, target, script, true) ) + { + script_free_code(script); + return 1; + } + return 0; +} /// Changes the level of a player skill. /// defaults to 1 @@ -13649,10 +13686,11 @@ struct script_function buildin_func[] = { BUILDIN_DEF(bonus,"iv"), BUILDIN_DEF2(bonus,"bonus2","ivi"), BUILDIN_DEF2(bonus,"bonus3","ivii"), - BUILDIN_DEF2(bonus,"bonus4","iviii"), - BUILDIN_DEF2(bonus,"bonus5","iviiii"), + BUILDIN_DEF2(bonus,"bonus4","ivvii"), + BUILDIN_DEF2(bonus,"bonus5","ivviii"), BUILDIN_DEF(bonusautoscript,"si??"), BUILDIN_DEF(bonusautoscript2,"si??"), + BUILDIN_DEF(bonusautoscript3,"siv?"), BUILDIN_DEF(skill,"vi?"), BUILDIN_DEF(addtoskill,"vi?"), // [Valaris] BUILDIN_DEF(guildskill,"vi"), diff --git a/src/map/skill.c b/src/map/skill.c index 78d29cb40..61749e058 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -880,6 +880,24 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int } } + if( sd && skillid ) + { // Trigger status effects on skills + enum sc_type type; + int i; + for( i = 0; i < ARRAYLENGTH(sd->addeff3) && sd->addeff3[i].skill; i++ ) + { + if( skillid != sd->addeff3[i].skill || !sd->addeff3[i].rate ) + continue; + type = sd->addeff3[i].id; + skill = skill_get_time2(status_sc2skill(type),7); + + if( sd->addeff3[i].target&ATF_TARGET ) + status_change_start(bl,type,sd->addeff3[i].rate,7,0,0,0,skill,0); + if( sd->addeff3[i].target&ATF_SELF ) + status_change_start(src,type,sd->addeff3[i].rate,7,0,0,0,skill,0); + } + } + if (md && battle_config.summons_trigger_autospells && md->master_id && md->special_state.ai) { //Pass heritage to Master for status causing effects. [Skotlex] sd = map_id2sd(md->master_id); @@ -887,7 +905,8 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int } // Autospell when attacking - if(sd && !status_isdead(bl) && src != bl && sd->autospell[0].id) { + if( sd && !status_isdead(bl) && src != bl && sd->autospell[0].id ) + { struct block_list *tbl; struct unit_data *ud; int i, skilllv; @@ -980,6 +999,64 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int return 0; } +int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int skillid, unsigned int tick) +{ + int skill, skilllv, i; + struct block_list *tbl; + + if( sd == NULL || skillid <= 0 ) + return 0; + + sd->state.skillonskill = 1; + for( i = 0; i < ARRAYLENGTH(sd->autospell3) && sd->autospell3[i].flag; i++ ) + { + if( sd->autospell3[i].flag != skillid ) + continue; + skill = (sd->autospell3[i].id > 0) ? sd->autospell3[i].id : -sd->autospell3[i].id; + if( skillnotok(skill, sd) ) + continue; + + skilllv = sd->autospell3[i].lv ? sd->autospell3[i].lv : 1; + if( skilllv < 0 ) skilllv = 1 + rand()%(-skilllv); + + if( sd->autospell3[i].id >= 0 && bl == NULL ) + continue; // No target + if( rand()%1000 > sd->autospell3[i].rate ) + continue; + + if( sd->autospell3[i].id < 0 ) + tbl = &sd->bl; + else + tbl = bl; + + switch( skill_get_casttype(skill) ) + { + case CAST_GROUND: skill_castend_pos2(&sd->bl, tbl->x, tbl->y, skill, skilllv, tick, 0); break; + case CAST_NODAMAGE: skill_castend_nodamage_id(&sd->bl, tbl, skill, skilllv, tick, 0); break; + case CAST_DAMAGE: skill_castend_damage_id(&sd->bl, tbl, skill, skilllv, tick, 0); break; + } + break; + } + + if( sd->autoscript3[0].script ) + { + for( i = 0; i < ARRAYLENGTH(sd->autoscript3) && sd->autoscript3[i].script; i++ ) + { + if( sd->autoscript3[i].flag != skillid ) + continue; + if( sd->autoscript3[i].target && bl == NULL ) + continue; + if( rand()%1000 > sd->autoscript3[i].rate ) + continue; + run_script(sd->autoscript3[i].script,0,sd->bl.id,0); + break; + } + } + + sd->state.skillonskill = 0; + return 1; +} + /* Splitted off from skill_additional_effect, which is never called when the * attack skill kills the enemy. Place in this function counter status effects * when using skills (eg: Asura's sp regen penalty, or counter-status effects @@ -2888,8 +2965,14 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int map_freeblock_unlock(); - if (sd && !(flag&1) && sd->state.arrow_atk) //Consume arrow on last invocation to this skill. - battle_consume_ammo(sd, skillid, skilllv); + if( sd && !(flag&1) ) + { + if( sd->state.arrow_atk ) //Consume arrow on last invocation to this skill. + battle_consume_ammo(sd, skillid, skilllv); + if( !sd->state.skillonskill ) + skill_onskillusage(sd, bl, skillid, tick); + } + return 0; } @@ -5408,8 +5491,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in mobskill_event(dstmd, src, tick, MSC_SKILLUSED|(skillid<<16)); } - if (sd && !(flag&1) && sd->state.arrow_atk) //Consume arrow on last invocation to this skill. - battle_consume_ammo(sd, skillid, skilllv); + if( sd && !(flag&1) ) + { + if( sd->state.arrow_atk ) //Consume arrow on last invocation to this skill. + battle_consume_ammo(sd, skillid, skilllv); + if( !sd->state.skillonskill ) + skill_onskillusage(sd, bl, skillid, tick); + } map_freeblock_unlock(); return 0; @@ -6182,9 +6270,15 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk if (sc && sc->data[SC_MAGICPOWER]) status_change_end(src,SC_MAGICPOWER,-1); - if (sd && !(flag&1) && sd->state.arrow_atk) //Consume arrow if a ground skill was not invoked. [Skotlex] - battle_consume_ammo(sd, skillid, skilllv); - + if( sd ) + { + if( sd->state.arrow_atk && !(flag&1) ) //Consume arrow if a ground skill was not invoked. [Skotlex] + battle_consume_ammo(sd, skillid, skilllv); + + if( !sd->state.skillonskill ) + skill_onskillusage(sd, NULL, skillid, tick); + } + return 0; } @@ -8547,8 +8641,8 @@ int skill_castfix (struct block_list *bl, int skill_id, int skill_lv) } } - if( sc && sc->count && sc->data[SC_SKILLCASTRATE] && sc->data[SC_SKILLCASTRATE]->val1 == skill_id ) - time += time * sc->data[SC_SKILLCASTRATE]->val2 / 100; + if( sc && sc->count && sc->data[SC_SKILLCASTRATE] && (sc->data[SC_SKILLCASTRATE]->val1 == skill_id || sc->data[SC_SKILLCASTRATE]->val2 == skill_id || sc->data[SC_SKILLCASTRATE]->val3 == skill_id) ) + time += time * sc->data[SC_SKILLCASTRATE]->val4 / 100; // config cast time multiplier if (battle_config.cast_rate != 100) diff --git a/src/map/status.c b/src/map/status.c index 10eb77053..ae0da921f 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -193,7 +193,7 @@ void initChangeTables(void) set_sc( MG_ENERGYCOAT , SC_ENERGYCOAT , SI_ENERGYCOAT , SCB_NONE ); set_sc( NPC_EMOTION , SC_MODECHANGE , SI_BLANK , SCB_MODE ); add_sc( NPC_EMOTION_ON , SC_MODECHANGE ); - set_sc( NPC_ATTRICHANGE , SC_ELEMENTALCHANGE , SI_BLANK , SCB_DEF_ELE ); + set_sc( NPC_ATTRICHANGE , SC_ELEMENTALCHANGE , SI_ARMOR_RESIST , SCB_DEF_ELE ); add_sc( NPC_CHANGEWATER , SC_ELEMENTALCHANGE ); add_sc( NPC_CHANGEGROUND , SC_ELEMENTALCHANGE ); add_sc( NPC_CHANGEFIRE , SC_ELEMENTALCHANGE ); @@ -529,6 +529,7 @@ void initChangeTables(void) StatusChangeFlagTable[SC_ARMOR_RESIST] |= SCB_PC; StatusChangeFlagTable[SC_SPCOST_RATE] |= SCB_PC; StatusChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED; + StatusChangeFlagTable[SC_ITEMSCRIPT] |= SCB_PC; // Mercenary Bonus Effects StatusChangeFlagTable[SC_MERC_FLEEUP] |= SCB_FLEE; StatusChangeFlagTable[SC_MERC_ATKUP] |= SCB_WATK; @@ -1749,8 +1750,10 @@ int status_calc_pc(struct map_session_data* sd,int first) //zero up structures... memset(&sd->autospell,0,sizeof(sd->autospell) + sizeof(sd->autospell2) + + sizeof(sd->autospell3) + sizeof(sd->addeff) + sizeof(sd->addeff2) + + sizeof(sd->addeff3) + sizeof(sd->skillatk) + sizeof(sd->skillheal) + sizeof(sd->skillheal2) @@ -1769,6 +1772,7 @@ int status_calc_pc(struct map_session_data* sd,int first) // clear autoscripts... pc_autoscript_clear(sd->autoscript, ARRAYLENGTH(sd->autoscript)); pc_autoscript_clear(sd->autoscript2, ARRAYLENGTH(sd->autoscript2)); + pc_autoscript_clear(sd->autoscript3, ARRAYLENGTH(sd->autoscript3)); // vars zeroing. ints, shorts, chars. in that order. memset (&sd->arrow_atk, 0,sizeof(sd->arrow_atk) @@ -1966,6 +1970,13 @@ int status_calc_pc(struct map_session_data* sd,int first) } } + if( sc->count && sc->data[SC_ITEMSCRIPT] ) + { + struct item_data *data = itemdb_exists(sc->data[SC_ITEMSCRIPT]->val1); + if( data && data->script ) + run_script(data->script,0,sd->bl.id,0); + } + if( sd->pd ) { // Pet Bonus struct pet_data *pd = sd->pd; diff --git a/src/map/status.h b/src/map/status.h index d3301bd37..0ac17016f 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -309,6 +309,7 @@ typedef enum sc_type { SC_DEFRATIOATK, SC_HPDRAIN, SC_SKILLATKBONUS, + SC_ITEMSCRIPT, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; @@ -488,7 +489,9 @@ enum si_type { SI_INCHEALRATE = 293, SI_HPREGEN = 294, // 295 Sword ? - SI_SPCOST_RATE = 300, + // 296 4 chars up ? + SI_SPCOST_RATE = 298, + // 300 Stars ? SI_COMMONSC_RESIST = 301, SI_ARMOR_RESIST = 302, }; diff --git a/src/map/unit.c b/src/map/unit.c index dce211fc9..194145e58 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1932,6 +1932,7 @@ int unit_free(struct block_list *bl, int clrtype) pc_delinvincibletimer(sd); pc_autoscript_clear(sd->autoscript, ARRAYLENGTH(sd->autoscript)); pc_autoscript_clear(sd->autoscript2, ARRAYLENGTH(sd->autoscript2)); + pc_autoscript_clear(sd->autoscript3, ARRAYLENGTH(sd->autoscript3)); if( sd->followtimer != -1 ) pc_stop_following(sd); -- cgit v1.2.3-70-g09d2