From 524291493e64196d8ce02f4b637ea0ee1a176d0a Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Mon, 4 Feb 2013 00:32:19 -0200 Subject: Merged some commits from rAthena. --- db/re/item_combo_db.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'db/re/item_combo_db.txt') diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt index 81acb7f0d..f6bd7dc01 100644 --- a/db/re/item_combo_db.txt +++ b/db/re/item_combo_db.txt @@ -24,7 +24,7 @@ 1573:2334,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2372,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2716:2717,{ bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } -1615:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } +1615:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1616:2515,{ bonus bSpeedRate,25; } 1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } 1618:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } @@ -32,7 +32,7 @@ 1620:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } 1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getrefine(); } 1631:2129,{ bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } -1636:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } +1636:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1657:2471:2569:15029,{ bonus bHealPower,25; } 1660:2471:2569:15029,{ bonus bHealPower,45; bonus3 bAutoSpellWhenHit,"AB_SILENTIUM",1,10; } 1718:1774,{ bonus bLongAtkRate,50; } @@ -117,7 +117,7 @@ 2475:2574:2883:15036,{ bonus bMaxHPRate,14; bonus2 bSkillAtk,"RK_HUNDREDSPEAR",50; skill "CR_AUTOGUARD",1; } 2476:2575:2884:15037,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus2 bSkillAtk,"RK_SONICWAVE",100; bonus2 bSkillAtk,"RK_WINDCUTTER",100; autobonus "{ sc_start SC_CONCENTRATION,10000,getskilllv(\"LK_CONCENTRATION\")?getskilllv(\"LK_CONCENTRATION\"):1; bonus bAspd,2; }",1,10000,BF_WEAPON,"{}"; } 2477:2577:2886:15038,{ bonus bCritical,15; bonus bFlee,10; bonus bCritAtkRate,40; bonus2 bSkillAtk,"GC_CROSSIMPACT",20; } -2478:2578:2887:15039,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; /* bonus bEquipmentMatk,10; */ if(readparam(bStr)>119) { bonus bBaseAtk,30; } bonus3 bAutoSpell,"ASC_BREAKER",getskilllv("ASC_BREAKER"),10; bonus bCritical,-20; } +2478:2578:2887:15039,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus bMatk,10; if(readparam(bStr)>119) { bonus bBaseAtk,30; } bonus3 bAutoSpell,"ASC_BREAKER",getskilllv("ASC_BREAKER"),10; bonus bCritical,-20; } 2479:2580:2890:15042,{ bonus bAspd,2; bonus bLongAtkRate,30; bonus3 bAutoSpell,"AC_DOUBLE",3,10; bonus2 bSkillAtk,"RA_ARROWSTORM",50; } 2480:2581:2891:15043,{ bonus bMaxHPRate,15; bonus2 bSkillAtk,"RA_CLUSTERBOMB",20; bonus bFlee2,20; bonus bLongAtkRate,-30; bonus bAspd,-7; } 2483:2586:15046,{ bonus2 bSubRace,RC_DemiHuman,15; } @@ -147,7 +147,7 @@ 2725:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } 2726:2727,{ bonus bUseSPrate,-25; } 2733:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } -2747:13061,{ bonus bHit,5; /* bonus bEquipmentMatk,5; */ } +2747:13061,{ bonus bHit,5; bonus bMatk,5; } 2777:2778:5479,{ bonus bMaxHP,300; bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,5; } 2779:2780:5482,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } 2779:2780:5577,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } -- cgit v1.2.3-70-g09d2 From c6882c741f314f633e681066adb018738e5bb585 Mon Sep 17 00:00:00 2001 From: Streusel Date: Mon, 18 Feb 2013 17:58:19 -0800 Subject: -Updated map_cache.dat -Updated Izlude -Added Fly Wing to Lunatic & Poring -Added new Quests (Thanks Flaid) --Expanded MAX_QUEST_DB for the newly added quests Signed-off-by: Streusel --- conf/maps.conf | 21 +- db/job_db2.txt | 10 +- db/map_index.txt | 15 +- db/pre-re/map_cache.dat | Bin 2096346 -> 2114399 bytes db/pre-re/skill_cast_db.txt | 68 +++--- db/quest_db.txt | 114 ++++++++++ db/re/item_combo_db.txt | 2 +- db/re/map_cache.dat | Bin 2099548 -> 2114399 bytes db/re/mob_db.txt | 4 +- db/re/skill_cast_db.txt | 4 +- db/re/skill_db.txt | 6 +- doc/script_commands.txt | 4 +- npc/guild/agit_controller.txt | 9 +- npc/merchants/shops.txt | 5 +- npc/pre-re/cities/izlude.txt | 8 +- npc/pre-re/merchants/shops.txt | 9 +- npc/pre-re/quests/monstertamer.txt | 15 ++ npc/pre-re/quests/quests_13_1.txt | 17 ++ npc/pre-re/quests/quests_nameless.txt | 391 ++++++++++++++++++++++++++++++++++ npc/pre-re/scripts_athena.conf | 3 + npc/quests/monstertamers.txt | 9 +- npc/quests/quests_13_1.txt | 14 +- npc/quests/quests_nameless.txt | 381 +-------------------------------- npc/re/airports/izlude.txt | 3 +- npc/re/cities/jawaii.txt | 6 +- npc/re/merchants/shops.txt | 9 +- npc/re/quests/monstertamers.txt | 15 ++ npc/re/quests/quests_13_1.txt | 17 ++ npc/re/quests/quests_lighthalzen.txt | 9 +- npc/re/scripts_athena.conf | 4 +- npc/warps/pvp.txt | 7 +- src/common/mmo.h | 2 +- 32 files changed, 705 insertions(+), 476 deletions(-) create mode 100644 npc/pre-re/quests/monstertamer.txt create mode 100644 npc/pre-re/quests/quests_13_1.txt create mode 100644 npc/pre-re/quests/quests_nameless.txt create mode 100644 npc/re/quests/monstertamers.txt create mode 100644 npc/re/quests/quests_13_1.txt (limited to 'db/re/item_combo_db.txt') diff --git a/conf/maps.conf b/conf/maps.conf index c34b05adf..6d142e634 100644 --- a/conf/maps.conf +++ b/conf/maps.conf @@ -1052,6 +1052,8 @@ map: ecl_tdun03 map: ecl_tdun04 map: ecl_hub01 map: que_avan01 + +// Pyramids Basement Nightmare Mode map: moc_prydn1 map: moc_prydn2 @@ -1059,6 +1061,7 @@ map: moc_prydn2 // New Maps added 2013-02-10 (Thanks Streusel!) // Credits to Baneado for reporting some // =============================== +// Izlude Novice Academy & Tutorial map: iz_int map: iz_int01 map: iz_int02 @@ -1081,10 +1084,13 @@ map: izlude_d map: izlude_c map: izlude_b map: izlude_a + map: prt_fild08d map: prt_fild08c map: prt_fild08b map: prt_fild08a + +// War of Emperium - Third Edition (TE) map: te_prt_gld map: te_prtcas01 map: te_prtcas02 @@ -1099,14 +1105,27 @@ map: te_aldecas2 map: te_aldecas3 map: te_aldecas4 map: te_aldecas5 + +// Glast Heim Memorial & Nightmare map: gl_cas02_ map: gl_chyard_ -map: 2@gl_k map: 1@gl_k +map: 2@gl_k + map: silk_lair + +//Wave Mode Memorial Dungeon +map: 1@def01 map: 1@def02 map: 1@def03 +// Heroes' Trails - Part 1 +map: 1@gef +map: 1@face +map: 1@sara +map: 1@gef_in +map: dali + //------------------------- Clone Maps --------------------------- //------------------------- Extra Maps --------------------------- diff --git a/db/job_db2.txt b/db/job_db2.txt index ef1b4edbd..1880808fa 100644 --- a/db/job_db2.txt +++ b/db/job_db2.txt @@ -212,7 +212,7 @@ // Sura (Regular) 4070,2,5,0,1,1,0,0,0,1,2,5,0,0,3,3,1,0,0,3,1,0,0,2,2,5,0,0,4,4,1,3,0,0,0,2,5,5,0,0,0,4,3,2,2,0,0,0,4,5,5 // Genetic (Regular) -4071,4,4,5,0,0,5,4,2,0,0,0,4,5,0,0,0,0,3,5,2,0,0,4,3,3,0,0,5,2,0,6,0,0,0,4,4,1,0,5,2,4,0,0,4,4,0,2,0,0,4 +4071,4,4,5,0,0,5,4,2,0,0,0,4,5,3,0,0,0,3,5,2,0,0,4,3,3,0,0,5,2,0,6,0,0,1,4,4,0,0,5,2,4,0,0,4,4,0,2,0,0,4 // Shadow Chaser (Regular) 4072,6,1,0,0,1,0,6,2,5,4,0,0,4,6,0,0,2,0,3,3,4,5,0,0,3,6,0,0,3,0,1,1,3,6,0,0,4,4,0,0,0,3,3,1,1,0,0,5,2,0 // Royal Guard (Trans) @@ -226,7 +226,7 @@ // Sura (Trans) 4077,2,5,0,1,1,0,0,0,1,2,5,0,0,3,3,1,0,0,3,1,0,0,2,2,5,0,0,4,4,1,3,0,0,0,2,5,5,0,0,0,4,3,2,2,0,0,0,4,5,5 // Genetic (Trans) -4078,4,4,5,0,0,5,4,2,0,0,0,4,5,0,0,0,0,3,5,2,0,0,4,3,3,0,0,5,2,0,6,0,0,0,4,4,1,0,5,2,4,0,0,4,4,0,2,0,0,4 +4078,4,4,5,0,0,5,4,2,0,0,0,4,5,3,0,0,0,3,5,2,0,0,4,3,3,0,0,5,2,0,6,0,0,1,4,4,0,0,5,2,4,0,0,4,4,0,2,0,0,4 // Shadow Chaser (Trans) 4079,6,1,0,0,1,0,6,2,5,4,0,0,4,6,0,0,2,0,3,3,4,5,0,0,3,6,0,0,3,0,1,1,3,6,0,0,4,4,0,0,0,3,3,1,1,0,0,5,2,0 // Rune Knight (Dragon) (Regular) @@ -268,7 +268,7 @@ // Baby Sura 4106,2,5,0,1,1,0,0,0,1,2,5,0,0,3,3,1,0,0,3,1,0,0,2,2,5,0,0,4,4,1,3,0,0,0,2,5,5,0,0,0,4,3,2,2,0,0,0,4,5,5 // Baby Genetic -4107,4,4,5,0,0,5,4,2,0,0,0,4,5,0,0,0,0,3,5,2,0,0,4,3,3,0,0,5,2,0,6,0,0,0,4,4,1,0,5,2,4,0,0,4,4,0,2,0,0,4 +4107,4,4,5,0,0,5,4,2,0,0,0,4,5,3,0,0,0,3,5,2,0,0,4,3,3,0,0,5,2,0,6,0,0,1,4,4,0,0,5,2,4,0,0,4,4,0,2,0,0,4 // Baby Shadow Chaser 4108,6,1,0,0,1,0,6,2,5,4,0,0,4,6,0,0,2,0,3,3,4,5,0,0,3,6,0,0,3,0,1,1,3,6,0,0,4,4,0,0,0,3,3,1,1,0,0,5,2,0 // Baby Rune Knight (Dragon) @@ -285,6 +285,6 @@ 4191,1,2,0,3,0,4,5,0,6,0,1,2,0,3,0,4,5,0,6,0,1,2,0,3,0,4,5,0,6,0,1,2,0,3,0,4,5,0,6,0,1,2,0,3,0,4,5,0,6,0 // Note: Kagerou and Oboro will temporarly use Ninja stat bonuses until official ones are known. // Kagerou -4211,2,2,0,0,5,2,0,0,0,4,2,5,0,4,6,2,5,0,0,6,2,4,5,0,0,0,0,0,0,4,2,6,5,0,0,0,0,0,1,3,2,4,5,6,0,0,0,0,0,0 +4211,5,0,4,0,2,3,0,1,6,0,5,1,2,0,4,6,3,0,1,5,2,0,6,3,4,0,5,0,2,0,1,4,0,5,4,0,3,5,1,0,2,4,1,0,5,6,2,1,0,5 // Oboro -4212,2,2,0,0,5,2,0,0,0,4,2,5,0,4,6,2,5,0,0,6,2,4,5,0,0,0,0,0,0,4,2,6,5,0,0,0,0,0,1,3,2,4,5,6,0,0,0,0,0,0 +4212,5,0,4,0,2,3,0,1,6,0,5,1,2,0,4,6,3,0,1,5,2,0,6,3,4,0,5,0,2,0,1,4,0,5,4,0,3,5,1,0,2,4,1,0,5,6,2,1,0,5 \ No newline at end of file diff --git a/db/map_index.txt b/db/map_index.txt index e2ed76848..d0464356d 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -862,11 +862,6 @@ ecl_hub01 que_avan01 moc_prydn1 moc_prydn2 - -// =============================== -// New Maps added 2013-02-10 (Thanks Streusel!) -// Credits also to Baneado for reporting some -// =============================== iz_int iz_int01 iz_int02 @@ -907,13 +902,19 @@ te_aldecas2 te_aldecas3 te_aldecas4 te_aldecas5 +1@gl_k +2@gl_k gl_cas02_ gl_chyard_ -2@gl_k -1@gl_k silk_lair +1@def01 1@def02 1@def03 +1@gef +1@face +1@sara +1@gef_in +dali // Only add maps under this line if they are not standard maps! diff --git a/db/pre-re/map_cache.dat b/db/pre-re/map_cache.dat index 645961065..dea34f052 100644 Binary files a/db/pre-re/map_cache.dat and b/db/pre-re/map_cache.dat differ diff --git a/db/pre-re/skill_cast_db.txt b/db/pre-re/skill_cast_db.txt index 892ce938e..90f579a8c 100644 --- a/db/pre-re/skill_cast_db.txt +++ b/db/pre-re/skill_cast_db.txt @@ -1072,75 +1072,75 @@ //========================================== //===== Rune Knight ======================== -//-- RK_ENCHANTBLADE +//-- RK_ENCHANTBLADE 2001,1000,0,0,300000,0,0 -//-- RK_SONICWAVE +//-- RK_SONICWAVE 2002,0,1000,0,0,0,2000 -//-- RK_DEATHBOUND +//-- RK_DEATHBOUND 2003,0,2000,0,2000,0,3000 -//-- RK_HUNDREDSPEAR +//-- RK_HUNDREDSPEAR 2004,1000:900:800:700:600:500:400:300:200:100,500,0,0,0,3000 -//-- RK_WINDCUTTER -2005,0,2000,0,0,0,2000 -//-- RK_IGNITIONBREAK +//-- RK_WINDCUTTER +2005,0,0,0,15000,0,2000 +//-- RK_IGNITIONBREAK 2006,1000,0,0,0,0,2000 -//-- RK_DRAGONBREATH +//-- RK_DRAGONBREATH 2008,0:0:0:1000:1000:1000:1500:1500:2000:2000,2000,0,10000,0,0 -//-- RK_DRAGONHOWLING +//-- RK_DRAGONHOWLING 2009,0,0,0,15000,0,10000 -//-- RK_MILLENNIUMSHIELD +//-- RK_MILLENNIUMSHIELD 2011,0,1000,0,180000,0,60000 -//-- RK_CRUSHSTRIKE +//-- RK_CRUSHSTRIKE 2012,0,0,0,180000,0,30000 -//-- RK_REFRESH +//-- RK_REFRESH 2013,0,0,0,60000,0,120000 -//-- RK_GIANTGROWTH +//-- RK_GIANTGROWTH 2014,0,0,0,180000,0,0 -//-- RK_STONEHARDSKIN +//-- RK_STONEHARDSKIN 2015,0,0,0,180000,10000,0 -//-- RK_VITALITYACTIVATION +//-- RK_VITALITYACTIVATION 2016,0,0,0,180000,0,0 -//-- RK_STORMBLAST -2017,0,0,0,0,0,0 -//-- RK_FIGHTINGSPIRIT +//-- RK_STORMBLAST +2017,0,2000,0,0,0,0 +//-- RK_FIGHTINGSPIRIT 2018,0,0,0,180000,0,0 -//-- RK_ABUNDANCE +//-- RK_ABUNDANCE 2019,0,0,0,180000,0,0 //========================================== //===== Gillotine Cross ==================== -//-- GC_VENOMIMPRESS +//-- GC_VENOMIMPRESS 2021,0,3000:2500:2000:1500:1000,0,10000:20000:30000:40000:50000,0,0 -//-- GC_CROSSIMPACT +//-- GC_CROSSIMPACT 2022,0,2500:2000:1500:1000:500,0,0,0,0 -//-- GC_DARKILLUSION +//-- GC_DARKILLUSION 2023,0,1500,0,0,0,0 -//-- GC_CREATENEWPOISON +//-- GC_CREATENEWPOISON 2025,0,500,0,0,0,0 -//-- GC_ANTIDOTE +//-- GC_ANTIDOTE 2026,0,0,0,0,0,0 -//-- GC_POISONINGWEAPON +//-- GC_POISONINGWEAPON 2027,0,1000,0,60000:120000:180000:240000:300000,300000,0 -//-- GC_WEAPONBLOCKING +//-- GC_WEAPONBLOCKING 2028,0,2000,0,180000,0,0 -//-- GC_COUNTERSLASH +//-- GC_COUNTERSLASH 2029,0,2000,0,0,0,0 -//-- GC_WEAPONCRUSH +//-- GC_WEAPONCRUSH 2030,0,1000,0,60000,0,0 -//-- GC_VENOMPRESSURE +//-- GC_VENOMPRESSURE 2031,0,1000,0,0,0,0 -//-- GC_POISONSMOKE +//-- GC_POISONSMOKE 2032,0,2000,0,6000:8000:10000:12000:14000,0,0 -//-- GC_CLOAKINGEXCEED +//-- GC_CLOAKINGEXCEED 2033,0,2000,0,0,0,0 -//-- GC_PHANTOMMENACE +//-- GC_PHANTOMMENACE 2034,0,1000,0,0,0,0 -//-- GC_HALLUCINATIONWALK +//-- GC_HALLUCINATIONWALK 2035,0,0,0,30000:35000:40000:45000:50000,25000,300000 -//-- GC_ROLLINGCUTTER +//-- GC_ROLLINGCUTTER 2036,0,200,0,3000,0,0 //-- GC_CROSSRIPPERSLASHER 2037,0,1000,0,0,0,0 diff --git a/db/quest_db.txt b/db/quest_db.txt index 50dcc1dc4..7dcf6735b 100644 --- a/db/quest_db.txt +++ b/db/quest_db.txt @@ -2219,3 +2219,117 @@ 60353,0,0,0,0,0,0,0,"Bathroom Ghost" 60354,0,0,0,0,0,0,0,"Bathroom Ghost" 60355,0,0,0,0,0,0,0,"Bathroom Ghost" + +// Mora +// Mora Quests +// Misty Forest Labyrinth +7211,9000,0,0,0,0,0,0,"Misty Forest Labyrinth Exploration" +7212,0,0,0,0,0,0,0,"Loki's Search" +7213,0,0,0,0,0,0,0,"Wandering Protector" + +// New Sapha's Honor Quest +7206,0,0,0,0,0,0,0,"New Day for Cheshire" +7207,0,0,0,0,0,0,0,"Cheshire's Box" +7208,82800,0,0,0,0,0,0,"Wait for Cheshire?" + +// Roast Beef Quest +11182,180,0,0,0,0,0,0,"Teohre's Report" +11183,0,0,0,0,0,0,0,"Teohre's Favor" +// Theo +11184,0,0,0,0,0,0,0,"Runaway Laphine" +11185,0,0,0,0,0,0,0,"Pouch" +11186,0,0,0,0,0,0,0,"Pouch" +11187,0,0,0,0,0,0,0,"Pouch" +11188,0,0,0,0,0,0,0,"Pouch" +11189,0,0,0,0,0,0,0,"Roast Beef" +11190,0,0,0,0,0,0,0,"Roast Beef" +11191,0,0,0,0,0,0,0,"Shortage of Roast Beef" + +11198,0,0,0,0,0,0,0,"Mora Village..." +11199,0,0,0,0,0,0,0,"Theo's Friend" +// Sonya +11192,0,0,0,0,0,0,0,"Mora Village..." +11193,0,0,0,0,0,0,0,"Sonya's Friend" + +11194,0,0,0,0,0,0,0,"Runaway Laphine" +11195,0,0,0,0,0,0,0,"Pouch" +11196,0,0,0,0,0,0,0,"Pouch" +11197,0,0,0,0,0,0,0,"Pouch" +// +11200,0,0,0,0,0,0,0,"Pouch" +11201,0,0,0,0,0,0,0,"Roast Beef" +11202,0,0,0,0,0,0,0,"Roast Beef" +11203,0,0,0,0,0,0,0,"Shortage of Roast Beef" + +11206,0,0,0,0,0,0,0,"Quick Delivery Yoneseu" +11207,0,0,0,0,0,0,0,"A Very Heavy Burden" +11208,0,0,0,0,0,0,0,"Daphne" + +// Ropewa & Yuridi Quest +1109,0,0,0,0,0,0,0,"Ropewa & Yuridi - Survivors of the Labyrinth" +1110,0,0,0,0,0,0,0,"Ropewa & Yuridi - Victims of the Labyrinth" +1111,0,0,0,0,0,0,0,"Ropewa & Yuridi - Maze in the Labyrinth" +1112,0,0,0,0,0,0,0,"Ropewa & Yuridi - Lost in the Labyrinth" +1113,0,0,0,0,0,0,0,"Ropewa & Yuridi - Torn Apart" +1114,0,0,0,0,0,0,0,"Ropewa & Yuridi - The Cost of Restoration" +1115,0,0,0,0,0,0,0,"Ropewa & Yuridi - Song of the Abyss" +1116,0,0,0,0,0,0,0,"Ropewa & Yuridi - Dead Man's Song" +1117,0,0,0,0,0,0,0,"Ropewa & Yuridi - Eternal Promise, Broken Ring" + +// Ropewa Clue Quest +1118,0,0,0,0,0,0,0,"Neighborhood Knight - I Need Clues" + +// Researcher's Quest +5016,0,0,0,0,0,0,0,"Bring me a Research Tool Bag" +5017,0,0,0,0,0,0,0,"Revenge of the Reseacher" +5018,0,0,0,0,0,0,0,"Revenge of the Reseacher" +5019,0,0,0,0,0,0,0,"Bathroom Sample Studying" +5020,86400,0,0,0,0,0,0,"Sample Researching" +5021,0,0,0,0,0,0,0,"Sample Collecting" +5022,0,0,0,0,0,0,0,"Sample Collecting" +5023,21600,0,0,0,0,0,0,"Inspection of the Sample" +5024,0,0,0,0,0,0,0,"Eastern Pool Research" +5025,0,0,0,0,0,0,0,"Western Pool Research" +5026,0,0,0,0,0,0,0,"Southern Pool Research" +5027,0,0,0,0,0,0,0,"Northern Pool Research" +5028,43200,0,0,0,0,0,0,"Inspection of the Sample" +5029,3600,0,0,0,0,0,0,"Unidentified Creature" + +// Mora Coin Daily Quests +12225,0,2132,3,0,0,0,0,"Pom Spider Hunting" +12226,0,2133,4,0,0,0,0,"Angra Mantis Hunting" +12227,0,2134,5,0,0,0,0,"Parus Hunting" +12228,0,2136,6,0,0,0,0,"Little Fatam Hunting" +12229,0,2137,7,0,0,0,0,"Miming Hunting" +12230,82800,0,0,0,0,0,0,"Mora Monster Hunt" +12231,0,0,0,0,0,0,0,"Insect Feeler Collecting" +12232,0,0,0,0,0,0,0,"Immortal Heart Collecting" +12233,0,0,0,0,0,0,0,"Rotten Bandage Collecting" +12234,0,0,0,0,0,0,0,"Orcish Voucher Collecting" +12235,0,0,0,0,0,0,0,"Skeleton Bone Collecting" +12236,0,0,0,0,0,0,0,"Memento Collecting" +12237,0,0,0,0,0,0,0,"Shell Collecting" +12238,0,0,0,0,0,0,0,"Scale Shell Collecting" +12239,0,0,0,0,0,0,0,"Venom Canine Collecting" +12240,0,0,0,0,0,0,0,"Sticky Mucus Collecting" +12241,82800,0,0,0,0,0,0,"Mora Item Request 1" +12242,82800,0,0,0,0,0,0,"Mora Item Request 2" + +// Missing Person Quests +12243,0,0,0,0,0,0,0,"Missing Information on Tajareu" +12244,0,0,0,0,0,0,0,"Missing Information on Tokenizer" +12245,0,0,0,0,0,0,0,"Missing Information on Mesile" +12246,0,0,0,0,0,0,0,"Missing Information on Noir" +12247,0,0,0,0,0,0,0,"Missing Information on Pajama God" +12248,0,0,0,0,0,0,0,"Missing Information on Mendel" +12249,0,0,0,0,0,0,0,"Missing Information on Miles" +12250,0,0,0,0,0,0,0,"Missing Information on Kunmune" +12251,0,0,0,0,0,0,0,"Missing Information on Chayihokin" +12252,0,0,0,0,0,0,0,"Missing Information on Tuale" +12253,82800,0,0,0,0,0,0,"Missing Person Search Time Limit" + +// New Novice Ground +2299,0,0,0,0,0,0,0,"Training Center: Talk to Lisa" +2300,0,0,0,0,0,0,0,"Training Center: Talk to General Reindeer" +2301,0,0,0,0,0,0,0,"Training Center: Leave the boat" +2302,0,0,0,0,0,0,0,"Training Center: Formation" \ No newline at end of file diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt index f6bd7dc01..d921689c3 100644 --- a/db/re/item_combo_db.txt +++ b/db/re/item_combo_db.txt @@ -147,7 +147,7 @@ 2725:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } 2726:2727,{ bonus bUseSPrate,-25; } 2733:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } -2747:13061,{ bonus bHit,5; bonus bMatk,5; } +2747:13061,{ bonus bHit,5; bonus bMatk,5; bonus2 bSkillUseSP,"SC_ENERVATION",20; bonus2 bSkillUseSP,"SC_GROOMY",20;} 2777:2778:5479,{ bonus bMaxHP,300; bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,5; } 2779:2780:5482,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } 2779:2780:5577,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } diff --git a/db/re/map_cache.dat b/db/re/map_cache.dat index cd79556d3..dea34f052 100644 Binary files a/db/re/map_cache.dat and b/db/re/map_cache.dat differ diff --git a/db/re/mob_db.txt b/db/re/mob_db.txt index 597547e68..462e2fb26 100644 --- a/db/re/mob_db.txt +++ b/db/re/mob_db.txt @@ -5,7 +5,7 @@ // Note: Keep the Sprite_Name field as it is in the game client. 1001,SCORPION,Scorpion,Scorpion,16,153,1,108,81,1,33,40,16,5,12,15,10,5,19,5,10,12,0,4,23,0x3191,200,1564,864,576,0,0,0,0,0,0,0,990,70,904,5500,757,57,943,210,7041,100,508,200,625,20,0,0,0,0,4068,1 -1002,PORING,Poring,Poring,1,60,1,27,20,1,8,9,2,5,6,1,1,0,6,5,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,1 +1002,PORING,Poring,Poring,1,60,1,27,20,1,8,9,2,5,6,1,1,0,6,5,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,601,20,0,0,4001,1 //1003,TESTEGG,Test Egg,Test Egg,2,100000,0,10,10,0,3,9,99,0,1,99,1,1,1,1,10,12,0,4,22,0,512,0,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1004,HORNET,Hornet,Hornet,11,90,1,81,60,1,13,16,7,1,12,24,4,5,6,5,10,12,0,4,24,0x1181,150,1292,792,216,0,0,0,0,0,0,0,992,80,939,9000,909,3500,1208,15,511,350,518,150,0,0,0,0,0,0,4019,1 1005,FARMILIAR,Familiar,Familiar,24,427,1,144,162,1,68,77,26,5,15,19,20,5,20,1,10,12,0,2,27,0x3881,150,1276,576,384,0,0,0,0,0,0,0,913,5500,1105,20,2209,15,601,50,514,100,507,700,645,50,0,0,0,0,4020,1 @@ -66,7 +66,7 @@ 1060,BIGFOOT,Bigfoot,Bigfoot,29,587,1,180,203,1,50,62,55,7,18,4,7,0,12,0,10,12,2,2,22,0x91,300,1260,192,192,0,0,0,0,0,0,0,948,9000,2289,5,919,5000,740,80,516,1500,518,450,756,43,0,0,0,0,4074,1 1061,NIGHTMARE,Nightmare,Nightmare,69,2872,1,501,1032,1,283,345,116,15,57,32,20,15,70,15,10,12,2,6,68,0x3395,150,1816,816,432,0,0,0,0,0,0,0,944,6000,510,500,2608,2,603,30,505,100,1261,1,984,60,0,0,0,0,4127,1 1062,PORING_,Santa Poring,Santa Poring,3,69,1,4,5,1,12,16,0,0,1,14,3,10,12,90,10,12,1,3,26,0x81,400,1672,672,480,0,0,0,0,0,0,0,529,2000,530,1000,507,1000,512,1000,2236,100,512,7,0,0,0,0,0,0,4005,1 -1063,LUNATIC,Lunatic,Lunatic,3,55,1,36,27,1,11,12,18,0,10,3,3,0,8,5,10,12,0,2,60,0x81,200,1456,456,336,0,0,0,0,0,0,0,705,6500,949,1000,2262,4,512,2000,507,600,515,1100,622,20,0,0,0,0,4006,1 +1063,LUNATIC,Lunatic,Lunatic,3,55,1,36,27,1,11,12,18,0,10,3,3,0,8,5,10,12,0,2,60,0x81,200,1456,456,336,0,0,0,0,0,0,0,705,6500,949,1000,2262,4,512,2000,507,600,515,1100,622,20,601,20,0,0,4006,1 1064,MEGALODON,Megalodon,Megalodon,46,1335,1,342,386,1,117,149,52,28,35,24,30,28,29,15,10,12,1,1,29,0x81,200,2492,792,432,0,0,0,0,0,0,0,959,5500,932,1500,510,80,717,120,719,10,603,2,624,20,0,0,0,0,4067,1 1065,STROUF,Strouf,Strouf,61,3052,1,626,705,1,162,192,67,21,49,16,31,20,33,20,10,12,2,5,61,0x3885,150,1872,672,384,0,0,0,0,0,0,0,951,5335,756,115,2315,2,1461,2,949,3000,720,20,956,1500,0,0,0,0,4111,1 1066,VADON,Vadon,Vadon,45,1252,1,342,386,1,78,103,54,21,35,21,28,20,33,15,10,12,0,5,21,0x91,300,1632,432,540,0,0,0,0,0,0,0,991,40,960,9000,910,3000,2313,5,943,100,757,40,717,50,0,0,0,0,4049,1 diff --git a/db/re/skill_cast_db.txt b/db/re/skill_cast_db.txt index 5b83447bf..0b7a905cf 100644 --- a/db/re/skill_cast_db.txt +++ b/db/re/skill_cast_db.txt @@ -1080,7 +1080,7 @@ //-- RK_HUNDREDSPEAR 2004,1000:900:800:700:600:500:400:300:200:100,500,0,0,0,3000,-1 //-- RK_WINDCUTTER -2005,0,2000,0,0,0,2000,-1 +2005,0,0,0,15000,0,2000,-1 //-- RK_IGNITIONBREAK 2006,1000,0,0,0,0,2000,-1 @@ -1102,7 +1102,7 @@ //-- RK_VITALITYACTIVATION 2016,0,0,0,180000,0,0,-1 //-- RK_STORMBLAST -2017,0,0,0,0,0,0,2000 +2017,0,2000,0,0,0,0,-1 //-- RK_FIGHTINGSPIRIT 2018,0,0,0,180000,0,0,-1 //-- RK_ABUNDANCE diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt index acb879442..1659d9aac 100644 --- a/db/re/skill_db.txt +++ b/db/re/skill_db.txt @@ -678,15 +678,15 @@ //**** // RK Rune Knight //**** -2001,1,6,4,0,0x1,0,5,1,yes,0,0,0,none,0, RK_ENCHANTBLADE,Enchant Blade +2001,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0, RK_ENCHANTBLADE,Enchant Blade 2002,7:8:9:10:11,6,1,-1,0,0,5,1,no,0,0,0,weapon,0, RK_SONICWAVE,Sonic Wave 2003,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0, RK_DEATHBOUND,Death Bound 2004,1,8,1,-1,0,0,10,-5,no,0,0,0,weapon,0, RK_HUNDREDSPEAR,Hundred Spear 2005,1,6,2,4,0x2,2,5,1,no,0,0,0,weapon,3, RK_WINDCUTTER,Wind Cutter 2006,0,6,4,-1,0x2,5,5,1,no,0,0,0,weapon,0, RK_IGNITIONBREAK,Ignition Break 2007,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0, RK_DRAGONTRAINING,Dragon Training -2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0, RK_DRAGONBREATH,Dragon Breath //CHECK May have to change this back to a weapon type attack. -2009,0,6,4,0,0x3,3:4:5:6:7,5,1,yes,0,0,0,weapon,0, RK_DRAGONHOWLING,Dragon Howling +2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0, RK_DRAGONBREATH,Dragon Breath +2009,0,6,4,0,0x3,3:4:5:6:7,5,1,yes,0,0,0,none,0, RK_DRAGONHOWLING,Dragon Howling 2010,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RK_RUNEMASTERY,Rune Mastery 2011,0,6,4,0,0x1,0,1,1,yes,0,0,0,none,0, RK_MILLENNIUMSHIELD,Millenium Shield 2012,1,6,4,-1,0,0x8,1,1,yes,0,0,0,weapon,0, RK_CRUSHSTRIKE,Crush Strike diff --git a/doc/script_commands.txt b/doc/script_commands.txt index e1759966f..a5ba6e065 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -1,4 +1,4 @@ -//===== Hercules Documentation ================================ +//===== Hercules Documentation ================================ //= Hercules Script Commands //===== By: ================================================== //= Hercules Dev Team @@ -6435,7 +6435,7 @@ placement of the illustration and takes following values: 3 - middle of screen in a movable window with an empty title bar 4 - middle of screen without the window header, but still movable -The picture is read from data\texture\???????\illust, from both the GRF archive +The picture is read from data\texture\유저인터페이스\illust, from both the GRF archive and data folder, and is required to be a bitmap. The file extension .bmp can be omitted. Magenta color (#ff00ff) is considered transparent. There is no limit placed on the size of the illustrations by the client, although loading of large diff --git a/npc/guild/agit_controller.txt b/npc/guild/agit_controller.txt index 57f1fe4d7..283807a46 100644 --- a/npc/guild/agit_controller.txt +++ b/npc/guild/agit_controller.txt @@ -4,7 +4,7 @@ //= kalen (1.0) //= 1.1 by Akaru and ho|yAnge| //===== Current Version: ===================================== -//= 2.0 +//= 2.0a //===== Description: ========================================= //= Auto Start for War of Emperium //============================================= @@ -29,6 +29,7 @@ //= 1.9 Rearranged the time-checks so they no longer use goto. [L0ne_W0lf] //= Removed treasure spawning function calls. (No longer needed) //= 2.0 Added WoE Battle Log support for broadcasts. [L0ne_W0lf] +//= 2.0a Removed some brackets //============================================================ //| To know how to set up WoE times, go to doc\woe_time_explanation.txt // WoE Start/Stop times @@ -71,12 +72,10 @@ S_DisplayOwners: setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05"; setarray .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; for( set .@i, 0; .@i <= 19; set .@i, .@i+1 ) { - if (GetCastleData(.@maps$[.@i],1)) { + if (GetCastleData(.@maps$[.@i],1)) Announce "The [" + GetCastleName(.@maps$[.@i]) + "] castle has been conquered by the [" + GetGuildName(GetCastleData(.@maps$[.@i],1)) + "] guild.",bc_all|bc_woe; - } - else { + else Announce "The [" + GetCastleName(.@maps$[.@i]) + "] castle is currently unoccupied.",bc_all|bc_woe; - } } end; } diff --git a/npc/merchants/shops.txt b/npc/merchants/shops.txt index 50bc9b610..b9c47b659 100644 --- a/npc/merchants/shops.txt +++ b/npc/merchants/shops.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= rAthena Dev Team //===== Current Version: ===================================== -//= 3.3 +//= 3.4 //===== Description: ========================================= //= Town shop NPCs. //===== Additional Comments: ================================= @@ -35,6 +35,7 @@ //= 3.1 Moved some merchants to a separate renewal file. [Kenpachi] //= 3.2 Added Missing Items to the pet Groomers in prontera, payon, and yuno. BugReport:6680[Spre] //= 3.3 Moved more shops to Renewal file. [Euphy] +//= 3.4 Removed some Izlude shops [Streusel] //============================================================ //======================================================= @@ -141,8 +142,6 @@ hu_in01,94,313,3 shop Armor Dealer#hu 86,2224:-1,2232:-1,2226:-1,2101:-1,2103:-1 //======================================================= izlude_in,60,127,4 shop Weapon Dealer#iz 72,1750:-1,1751:-1,1701:-1,1601:-1,1201:-1,1204:-1,1207:-1,1101:-1,1104:-1,1107:-1,1116:-1,1151:-1,1154:-1,1157:-1,1160:-1,1301:-1 izlude_in,70,127,4 shop Armor Dealer#iz 62,2103:-1,2105:-1,2403:-1,2405:-1,2503:-1,2505:-1,2226:-1,2228:-1,2303:-1,2305:-1,2328:-1,2307:-1,2309:-1,2312:-1,2314:-1,2316:-1,2628:-1 -izlude_in,115,61,0 shop Tool Dealer#iz 47,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1,1750:-1 -izlude_in,121,64,3 shop Trading Merchant#iz 900,13200:-1,13201:-1,13202:-1,13150:-1,13102:-1,13151:-1,13154:-1,13155:-1,13163:-1,13165:-1,13168:-1 //======================================================= // Jawaii diff --git a/npc/pre-re/cities/izlude.txt b/npc/pre-re/cities/izlude.txt index 0c304adaa..950f19abd 100644 --- a/npc/pre-re/cities/izlude.txt +++ b/npc/pre-re/cities/izlude.txt @@ -1,16 +1,17 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Izlude Town Pre-Renewal //===== By: ================================================== //= Daegaladh //===== Current Version: ===================================== -//= 1.1 +//= 1.2 //===== Compatible With: ===================================== -//= rAthena SVN +//= Hercules GIT //===== Description: ========================================= //= Izlude town NPCs. //===== Additional Comments: ================================= //= 1.0 First Version. //= 1.1 Added bullet NPC duplicates. [Euphy] +//= 1.2 Added Dorian duplicate [Streusel] //============================================================ izlude,201,181,2 duplicate(Sailor_izlude) Sailor#izlude 100 @@ -24,3 +25,4 @@ izlude,58,126,2 duplicate(Cebalis_izlude) Cebalis#izlude 98 izlude,124,178,2 duplicate(Soldier_izlude) Soldier#izlude 105 izlude,171,133,3 duplicate(bdt) Bullet Dealer Tony#iz 86 izlude,171,127,3 duplicate(mdk) Magazine Dealer Kenny 83 +izlude_in,110,64,3 duplicate(Dorian) Dorian#izlude 878,2,2,{ \ No newline at end of file diff --git a/npc/pre-re/merchants/shops.txt b/npc/pre-re/merchants/shops.txt index d8fd1d96a..124ea0ef3 100644 --- a/npc/pre-re/merchants/shops.txt +++ b/npc/pre-re/merchants/shops.txt @@ -1,15 +1,16 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Shops //===== By: ================================================== //= Daegaladh //===== Current Version: ===================================== -//= 1.0 +//= 1.1 //===== Compatible With: ===================================== -//= rAthena SVN +//= Hercules GIT //===== Description: ========================================= //= Pre-renewal-specific town shop NPCs. //===== Additional Comments: ================================= //= 1.0 First version. +//= 1.1 Added Tool Dealer & Trading Merchant [Streusel] //============================================================ //======================================================= @@ -19,3 +20,5 @@ izlude,105,99,0 shop Butcher#iz 54,517:-1 izlude,94,98,4 shop Fruit Gardener#iz 53,512:-1,513:-1,515:-1,516:-1 izlude,105,92,7 shop Vendor from Milk Ranch#i 90,519:-1 izlude,164,138,4 shop Pet Groomer#iz 124,537:-1,643:-1,10013:-1,10014:-1,554:-1,6113:-1,6114:-1,6115:-1 +izlude_in,115,61,0 shop Tool Dealer#iz 47,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1,1750:-1 +izlude_in,121,64,3 shop Trading Merchant#iz 900,13200:-1,13201:-1,13202:-1,13150:-1,13102:-1,13151:-1,13154:-1,13155:-1,13163:-1,13165:-1,13168:-1 \ No newline at end of file diff --git a/npc/pre-re/quests/monstertamer.txt b/npc/pre-re/quests/monstertamer.txt new file mode 100644 index 000000000..86f118f5a --- /dev/null +++ b/npc/pre-re/quests/monstertamer.txt @@ -0,0 +1,15 @@ +//===== Hercules Script ======================================= +//= Monster Tamers +//===== By: ================================================== +//= Streusel +//===== Current Version: ===================================== +//= 1.0 +//===== Compatible With: ===================================== +//= Hercules +//===== Description: ========================================= +//= Cute pet quest items +//===== Additional Comments: ================================= +//= 1.0 Duplicates for Monster Tamer [Streusel] +//============================================================ + +izlude_in,129,64,4 duplicate(Monster_Tamer#izu) Monster Tamer#izlude 125 \ No newline at end of file diff --git a/npc/pre-re/quests/quests_13_1.txt b/npc/pre-re/quests/quests_13_1.txt new file mode 100644 index 000000000..b98aa2b95 --- /dev/null +++ b/npc/pre-re/quests/quests_13_1.txt @@ -0,0 +1,17 @@ +//===== Hercules Script ====================================== +//= Quest NPCs related to Ash-Vacuum +//===== By: ================================================== +//= Streusel +//===== Current Version: ===================================== +//= 1.0 +//===== Description: ========================================= +//= [Official Conversion] +//= Contains: +//= Promotional Staff Duplicate for pre-renewal +//===== Additional Comments: ================================= +//= 1.0 First Version. [Streusel] +//============================================================ + +// Onward to the New World +//============================================================ +izlude,101,173,6 duplicate(Promotional Staff#iz) Promotional Staff#izlude 100 \ No newline at end of file diff --git a/npc/pre-re/quests/quests_nameless.txt b/npc/pre-re/quests/quests_nameless.txt new file mode 100644 index 000000000..ab5d816dc --- /dev/null +++ b/npc/pre-re/quests/quests_nameless.txt @@ -0,0 +1,391 @@ +//===== Hercules Script ====================================== +//= Nameless Island Quests +//===== By: ================================================== +//= Streusel +//===== Current Version: ===================================== +//= 1.0 +//===== Description: ========================================= +//= Contains: +//= Part of Muff's Loan: +//- - Help Muff clear his Debt and get his collateral back. +//= - prerequisite Quest to "Broken Diamond" +//= - Variable in use: diamond_edq (Max: 14) +//===== Additional Comments: ================================= +//= 1.0 First version. +//============================================================ + +izlude_in,113,66,0 script Strange Machine 111,{ + if (checkweight(907,200) == 0) { + mes "[Dorian]"; + mes "Ugh, just like a member"; + mes "of the working class:"; + mes "hoarding all your items"; + mes "like a packrat? Have the"; + mes "decency to relocate your"; + mes "goods to Kafra Storage, please."; + close; + } + if (diamond_edq) == 10 { + set .@bolt_rand,rand(2,5); + mes "^3355FFThis must be Dorian's"; + mes "Mystic Dryer de Elegance."; + mes "What do you want to do?^000000"; + next; + while(1) { + set .@switch_sound,rand(1,4); + switch(select("Check the Machine:Replace the Engine:Tighten the Screw:Press a Switch")) { + case 1: + if (.@hit_status == 0) { + mes "^3355FFThere's no power"; + mes "in this behemoth"; + mes "of a machine.^000000"; + next; + } + break; + case 2: + if (.@engine == 0) { + mes "^3355FFYou replace the rough"; + mes "ruby in the ruby engine"; + mes "with a new rough ruby."; + mes "It clicks into place"; + mes "inside the engine core.^000000"; + next; + set .@engine,.@engine+1; + } + else if (engine > 0) { + mes "^3355FFThe ruby in the"; + mes "engine has already"; + mes "been replaced.^000000"; + next; + } + break; + case 3: + if (.@engine < 1) { + mes "^3355FFYou probably need"; + mes "to replace the ruby"; + mes "in the engine first.^000000"; + next; + } + else if ((.@engine == 1) && (.@bolt < .@bolt_rand)) { + mes "^3355FF*Krrrr-Krrrrr*^000000"; + mes "^3355FF*Krrrr-Krrrrr*^000000"; + next; + set .@bolt,.@bolt+1; + } + else if ((.@engine == 1) && (.@bolt == .@bolt_rand)) { + mes "^3355FF*Krrrr-Krrrrr*^000000"; + mes "^0000FF*Click*^000000"; + next; + set .@bolt,.@bolt+1; + set .@bolt_suc,.@bolt_suc+1; + } + else if ((.@engine == 1) && (.@bolt > .@bolt_rand)) { + mes "^3355FF*Krrrr-Krrrrr*^000000"; + mes "^3355FF*KrrICK-ICK-ICK-KOOM*^000000"; + next; + mes "^3355FFYou tightened the"; + mes "screw too tightly!"; + mes "The joint is broken..."; + mes "You should go back"; + mes "to Dorian for help.^000000"; + setquest 3106; + set diamond_edq,11; + close; + } + else { + mes "^3355FFSomething must have"; + mes "gone wrong. You'd be"; + mes "better off starting"; + mes "from the beginning...^000000"; + close; + } + break; + case 4: + if ((.@engine < 1) && (.@bolt_suc < 1)) { + mes "^3355FFYou need to replace"; + mes "the engine's ruby and"; + mes "tighten the main screw"; + mes "before you mess with"; + mes "these switches.^000000"; + next; + } + else if ((.@engine == 1) && (.@bolt_suc < 1)) { + mes "^3355FFYou need to tighten"; + mes "the scren before you can"; + mes "start the engine safely."; + next; + } + else if ((.@red >= 1) && (.@blue >= 1) && (.@yellow >= 1) && (.@green >= 1)) { + mes "^3355FFThe Mystic Dryer de"; + mes "Elegance started with"; + mes "a mighty buzz, and the"; + mes "sound lowers to a calm"; + mes "hum as it stabilizes."; + mes "It looks like you fixed it!^000000"; + next; + mes "^3355FFYou should tell Dorian"; + mes "first so that you can"; + mes "use this machine.^000000"; + setquest 3107; + set diamond_edq,12; + close; + } + else if ((.@engine == 1) && (.@bolt_suc == 1)) { + if (.@switch_sound == 1) { + mes "^3355FF*Buzz Buzz*^000000"; + mes "^3355FF*Buzz Buzz*^000000"; + mes "^3355FFThe machine is"; + mes "vibrating weakly."; + mes "Which switch do"; + mes "you want to press?^000000"; + next; + switch(select("Red Switch:Blue Switch:Yellow Switch:Green Switch")) { + default: + mes "^3355FF*Whiz Whiz*^000000"; + mes "^3355FF*Whiz Whiz*^000000"; + next; + mes "^3355FFThe machine made some"; + mes "violent, erratic sounds,"; + mes "and vibrated violently"; + mes "before coming to a sudden"; + mes "stop. That was the wrong"; + mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; + setquest 3106; + set diamond_edq,11; + close; + case 1: + if (.@red >= 0) { + mes "^3355FF*Buzzz Buzzz*^000000"; + mes "^3355FF*Clang...!*^000000"; + next; + mes "^3355FFThe machine's"; + mes "vibrations have"; + mes "grown stronger."; + mes "It looks like you"; + mes "chose the right switch.^000000"; + next; + set .@red,.@red+1; + } + else { + mes "^3355FF*Whiz Whiz*^000000"; + mes "^3355FF*Whiz Whiz*^000000"; + next; + mes "^3355FFThe machine made some"; + mes "violent, erratic sounds,"; + mes "and vibrated violently"; + mes "before coming to a sudden"; + mes "stop. That was the wrong"; + mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; + setquest 3106; + set diamond_edq,11; + close; + } + break; + } + } + else if (.@switch_sound == 2) { + mes "^3355FF*Purr Purr*^000000"; + mes "^3355FF*Purr Purr*^000000"; + mes "^3355FFThe machine is vibrating"; + mes "a little bit more strongly."; + mes "Which switch will"; + mes "you try now?^000000"; + next; + switch(select("Red Switch:Blue Switch:Yellow Switch:Green Switch")) { + default: + mes "^3355FF*Whiz Whiz*^000000"; + mes "^3355FF*Whiz Whiz*^000000"; + next; + mes "^3355FFThe machine made some"; + mes "violent, erratic sounds,"; + mes "and vibrated violently"; + mes "before coming to a sudden"; + mes "stop. That was the wrong"; + mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; + setquest 3106; + set diamond_edq,11; + close; + case 2: + if (.@blue >= 0) { + mes "^3355FF*Purrr Purr*^000000"; + mes "^3355FF*Clang...!*^000000"; + next; + mes "^3355FFThe machine's"; + mes "vibrations have"; + mes "grown stronger."; + mes "It looks like you"; + mes "chose the right switch.^000000"; + next; + set .@blue,.@blue+1; + } + else { + mes "^3355FF*Whiz Whiz*^000000"; + mes "^3355FF*Whiz Whiz*^000000"; + next; + mes "^3355FFThe machine made some"; + mes "violent, erratic sounds,"; + mes "and vibrated violently"; + mes "before coming to a sudden"; + mes "stop. That was the wrong"; + mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; + setquest 3106; + set diamond_edq,11; + close; + } + break; + } + } + else if (.@switch_sound == 3) { + mes "^3355FF*Bzzz Bzzz*"; + mes "*Bzzz Bzzz*"; + mes "The machine's vibrations"; + mes "are a bit more stable now."; + mes "Which switch will you try?^000000"; + next; + switch(select("Red Switch:Blue Switch:Yellow Switch:Green Switch")) { + default: + mes "^3355FF*Whiz Whiz*^000000"; + mes "^3355FF*Whiz Whiz*^000000"; + next; + mes "^3355FFThe machine made some"; + mes "violent, erratic sounds,"; + mes "and vibrated violently"; + mes "before coming to a sudden"; + mes "stop. That was the wrong"; + mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; + setquest 3106; + set diamond_edq,11; + close; + case 3: + if (.@yellow >= 0) { + mes "^3355FF*Bzzzz Bzzzz*^000000"; + mes "^3355FF*Clang...!*^000000"; + next; + mes "^3355FFThe machine's"; + mes "vibrations have"; + mes "grown stronger."; + mes "It looks like you"; + mes "chose the right switch.^000000"; + next; + set .@yellow,.@yellow+1; + } + else { + mes "^3355FF*Whiz Whiz*^000000"; + mes "^3355FF*Whiz Whiz*^000000"; + next; + mes "^3355FFThe machine made some"; + mes "violent, erratic sounds,"; + mes "and vibrated violently"; + mes "before coming to a sudden"; + mes "stop. That was the wrong"; + mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; + setquest 3106; + set diamond_edq,11; + close; + } + break; + } + } + else if (.@switch_sound == 4) { + next; + mes "^3355FF*Pzzzz Pzzz*"; + mes "*Pzzzz Pzzz*"; + mes "The machine is vibrating"; + mes "fairly strongly now. Which"; + mes "switch will you try?^000000"; + next; + switch(select("Red Switch:Blue Switch:Yellow Switch:Green Switch")) { + default: + mes "^3355FF*Whiz Whiz*^000000"; + mes "^3355FF*Whiz Whiz*^000000"; + next; + mes "^3355FFThe machine made some"; + mes "violent, erratic sounds,"; + mes "and vibrated violently"; + mes "before coming to a sudden"; + mes "stop. That was the wrong"; + mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; + setquest 3106; + set diamond_edq,11; + close; + case 4: + if (.@green >= 0) { + mes "^3355FFPzzzzz Pzzzz*^000000"; + mes "^3355FF*Clang...!*^000000"; + next; + mes "^3355FFThe machine's"; + mes "vibrations have"; + mes "grown stronger."; + mes "It looks like you"; + mes "chose the right switch.^000000"; + next; + set .@green,.@green+1; + } + else { + mes "^3355FF*Whiz Whiz*^000000"; + mes "^3355FF*Whiz Whiz*^000000"; + next; + mes "^3355FFThe machine made some"; + mes "violent, erratic sounds,"; + mes "and vibrated violently"; + mes "before coming to a sudden"; + mes "stop. That was the wrong"; + mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; + setquest 3106; + set diamond_edq,11; + close; + } + break; + } + } + } + } + } + } + if (diamond_edq == 12) { + mes "[Dorian]"; + mes "It sounds like you're"; + mes "done fixing my Mystic"; + mes "Dryer de Elegance."; + mes "Why don't you come"; + mes "back so I can explain"; + mes "how you can use it?"; + close; + } + if ((diamond_edq == 13) && (countitem(7722) < 1)) { + mes "^3355FFYou lift the main"; + mes "operational switch,"; + mes "turning on a light and"; + mes "opening a convenient"; + mes "slot. You insert the"; + mes "wet bond of debt.^000000"; + next; + mes "^3355FFThe engine's pistons"; + mes "and cylinders churn"; + mes "with a lively din, and"; + mes "when the heater stops,"; + mes "the slot reopens.^000000"; + next; + mes "[" + strcharinfo(0) + "]"; + mes "So this is the original"; + mes "bond of debt that Muff"; + mes "lost? It looks... Perfect!"; + changequest 3108,3109; + getitem 7722,1; //Debt_Note + close; + } + else if ((diamond_edq == 13) && (countitem(7722) > 0)) { + mes "You already used this"; + mes "machine to restore the"; + mes "bond of debt. There's no"; + mes "need to mess around"; + mes "with it any longer."; + close; + } + mes "[Dorian]"; + mes "Who are you?"; + mes "Don't you dare lay"; + mes "a hand on my precious"; + mes "masterpiece inventions! "; + close; +} \ No newline at end of file diff --git a/npc/pre-re/scripts_athena.conf b/npc/pre-re/scripts_athena.conf index 875900bda..fa2d6de8f 100644 --- a/npc/pre-re/scripts_athena.conf +++ b/npc/pre-re/scripts_athena.conf @@ -79,3 +79,6 @@ npc: npc/pre-re/other/mercenary_rent.txt npc: npc/pre-re/quests/mrsmile.txt npc: npc/pre-re/quests/quests_izlude.txt npc: npc/pre-re/quests/quests_lighthalzen.txt +npc: npc/pre-re/quests/monstertamers.txt +npc: npc/pre-re/quests/quests_nameless.txt +npc: npc/pre-re/quests/quests_13_1.txt \ No newline at end of file diff --git a/npc/quests/monstertamers.txt b/npc/quests/monstertamers.txt index 75bc84b1b..b5fa9a8a9 100644 --- a/npc/quests/monstertamers.txt +++ b/npc/quests/monstertamers.txt @@ -1,11 +1,11 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Monster Tamers //===== By: ================================================== //= kobra_k88, Darkchild, x[tsk] //===== Current Version: ===================================== -//= 1.4b +//= 1.5 //===== Compatible With: ===================================== -//= rAthena 1.0 +//= Hercules //===== Description: ========================================= //= Cute pet quest items //===== Additional Comments: ================================= @@ -16,6 +16,7 @@ //= 1.4 Updated Monster taming item quests. [L0ne_W0lf] //= 1.4a FIXED item requirement for stellar hairpin. [L0ne_W0lf] //= 1.4b Fixed the delitem assosiated with the last uptate. [L0ne_W0lf] +//= 1.5 Renamed Izlude Monster Tamer to function with Renewal [Streusel] //============================================================ alberta_in,173,76,4 script Monster Tamer#alb 125,{ @@ -464,7 +465,7 @@ aldeba_in,168,175,4 script Monster Tamer#alde 125,{ } } -izlude_in,129,64,4 script Monster Tamer#izu 125,{ +- script ::Monster_Tamer#izu -1,{ mes "[Shogo]"; mes "Are you pre-occupied with"; mes "gathering items for monsters"; diff --git a/npc/quests/quests_13_1.txt b/npc/quests/quests_13_1.txt index c8cc1d29a..1fe7d0bb9 100644 --- a/npc/quests/quests_13_1.txt +++ b/npc/quests/quests_13_1.txt @@ -1,10 +1,10 @@ //===== Hercules Script ====================================== //= Quest NPCs related to Ash-Vacuum -//===== By: ================================================== +//===== By: ================================================== //= L0ne_W0lf -//===== Current Version: ===================================== +//===== Current Version: ===================================== //= 2.7 -//===== Description: ========================================= +//===== Description: ========================================= //= [Official Conversion] //= Contains Quests: //= Onward to the Other World @@ -22,7 +22,7 @@ //= - Contains Custom translated dialog. // Persuing Rayan Moore //= - Contains Custom translated dialog. -//===== Additional Comments: ================================= +//===== Additional Comments: ================================= //= 1.0 First Version. [L0ne_W0lf] //= 1.1 I missed an end in one of the lhz guards. [L0ne_W0lf] //= 1.2 Fixed missing ends, wrong label and some typos [Gepard] @@ -44,10 +44,10 @@ //= 2.6 Disabled "Ash Vacuum Warper" as it's no longer in iRO. [Euphy] //= 2.6a Added 'npcskill' command. [Euphy] //= 2.7 Updated incorrect EXP values & added checkre() checks -//============================================================ +//============================================================ // Onward to the New World -//============================================================ +//============================================================ prontera,163,53,3 script Promotional Staff#prt 100,{ mes "[Promotional Staff]"; mes "We are looking for adventurers who are super curious and extremely brave."; @@ -679,7 +679,7 @@ geffen,90,67,3 script Promotional Staff#gef 100,{ } } -izlude,101,173,6 script Promotional Staff#iz 100,{ +- script ::Promotional Staff#iz -1,{ if (ep13_ryu > 8) { mes "[Promotional Staff]"; mes "I bless you for your future! May it be full of happiness!"; diff --git a/npc/quests/quests_nameless.txt b/npc/quests/quests_nameless.txt index b6e740a93..ae37edcea 100644 --- a/npc/quests/quests_nameless.txt +++ b/npc/quests/quests_nameless.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 2.2a +//= 2.3 //===== Description: ========================================= //= [Aegis Conversion] //= Collection of Nameless Island Quests @@ -58,6 +58,7 @@ //= - Broken Diamond //= - Z-Gang Quest //= 2.2a Fixed a few job constant typos. [Euphy] +//= 2.3 Removed Strange Machine [Streusel] //============================================================ // Nameless Island and Cursed Monestary Access Quest @@ -3642,7 +3643,7 @@ cmd_fild01,55,160,0 script Heap of Earth 844,{ close; } -izlude_in,110,64,3 script Dorian 878,2,2,{ +- script ::Dorian -1,{ if (checkweight(907,200) == 0) { mes "[Dorian]"; mes "Ugh, just like a member"; @@ -4148,382 +4149,6 @@ OnTouch: end; } -izlude_in,113,66,0 script Strange Machine 111,{ - if (checkweight(907,200) == 0) { - mes "[Dorian]"; - mes "Ugh, just like a member"; - mes "of the working class:"; - mes "hoarding all your items"; - mes "like a packrat? Have the"; - mes "decency to relocate your"; - mes "goods to Kafra Storage, please."; - close; - } - if (diamond_edq) == 10 { - set .@bolt_rand,rand(2,5); - mes "^3355FFThis must be Dorian's"; - mes "Mystic Dryer de Elegance."; - mes "What do you want to do?^000000"; - next; - while(1) { - set .@switch_sound,rand(1,4); - switch(select("Check the Machine:Replace the Engine:Tighten the Screw:Press a Switch")) { - case 1: - if (.@hit_status == 0) { - mes "^3355FFThere's no power"; - mes "in this behemoth"; - mes "of a machine.^000000"; - next; - } - break; - case 2: - if (.@engine == 0) { - mes "^3355FFYou replace the rough"; - mes "ruby in the ruby engine"; - mes "with a new rough ruby."; - mes "It clicks into place"; - mes "inside the engine core.^000000"; - next; - set .@engine,.@engine+1; - } - else if (engine > 0) { - mes "^3355FFThe ruby in the"; - mes "engine has already"; - mes "been replaced.^000000"; - next; - } - break; - case 3: - if (.@engine < 1) { - mes "^3355FFYou probably need"; - mes "to replace the ruby"; - mes "in the engine first.^000000"; - next; - } - else if ((.@engine == 1) && (.@bolt < .@bolt_rand)) { - mes "^3355FF*Krrrr-Krrrrr*^000000"; - mes "^3355FF*Krrrr-Krrrrr*^000000"; - next; - set .@bolt,.@bolt+1; - } - else if ((.@engine == 1) && (.@bolt == .@bolt_rand)) { - mes "^3355FF*Krrrr-Krrrrr*^000000"; - mes "^0000FF*Click*^000000"; - next; - set .@bolt,.@bolt+1; - set .@bolt_suc,.@bolt_suc+1; - } - else if ((.@engine == 1) && (.@bolt > .@bolt_rand)) { - mes "^3355FF*Krrrr-Krrrrr*^000000"; - mes "^3355FF*KrrICK-ICK-ICK-KOOM*^000000"; - next; - mes "^3355FFYou tightened the"; - mes "screw too tightly!"; - mes "The joint is broken..."; - mes "You should go back"; - mes "to Dorian for help.^000000"; - setquest 3106; - set diamond_edq,11; - close; - } - else { - mes "^3355FFSomething must have"; - mes "gone wrong. You'd be"; - mes "better off starting"; - mes "from the beginning...^000000"; - close; - } - break; - case 4: - if ((.@engine < 1) && (.@bolt_suc < 1)) { - mes "^3355FFYou need to replace"; - mes "the engine's ruby and"; - mes "tighten the main screw"; - mes "before you mess with"; - mes "these switches.^000000"; - next; - } - else if ((.@engine == 1) && (.@bolt_suc < 1)) { - mes "^3355FFYou need to tighten"; - mes "the scren before you can"; - mes "start the engine safely."; - next; - } - else if ((.@red >= 1) && (.@blue >= 1) && (.@yellow >= 1) && (.@green >= 1)) { - mes "^3355FFThe Mystic Dryer de"; - mes "Elegance started with"; - mes "a mighty buzz, and the"; - mes "sound lowers to a calm"; - mes "hum as it stabilizes."; - mes "It looks like you fixed it!^000000"; - next; - mes "^3355FFYou should tell Dorian"; - mes "first so that you can"; - mes "use this machine.^000000"; - setquest 3107; - set diamond_edq,12; - close; - } - else if ((.@engine == 1) && (.@bolt_suc == 1)) { - if (.@switch_sound == 1) { - mes "^3355FF*Buzz Buzz*^000000"; - mes "^3355FF*Buzz Buzz*^000000"; - mes "^3355FFThe machine is"; - mes "vibrating weakly."; - mes "Which switch do"; - mes "you want to press?^000000"; - next; - switch(select("Red Switch:Blue Switch:Yellow Switch:Green Switch")) { - default: - mes "^3355FF*Whiz Whiz*^000000"; - mes "^3355FF*Whiz Whiz*^000000"; - next; - mes "^3355FFThe machine made some"; - mes "violent, erratic sounds,"; - mes "and vibrated violently"; - mes "before coming to a sudden"; - mes "stop. That was the wrong"; - mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; - setquest 3106; - set diamond_edq,11; - close; - case 1: - if (.@red >= 0) { - mes "^3355FF*Buzzz Buzzz*^000000"; - mes "^3355FF*Clang...!*^000000"; - next; - mes "^3355FFThe machine's"; - mes "vibrations have"; - mes "grown stronger."; - mes "It looks like you"; - mes "chose the right switch.^000000"; - next; - set .@red,.@red+1; - } - else { - mes "^3355FF*Whiz Whiz*^000000"; - mes "^3355FF*Whiz Whiz*^000000"; - next; - mes "^3355FFThe machine made some"; - mes "violent, erratic sounds,"; - mes "and vibrated violently"; - mes "before coming to a sudden"; - mes "stop. That was the wrong"; - mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; - setquest 3106; - set diamond_edq,11; - close; - } - break; - } - } - else if (.@switch_sound == 2) { - mes "^3355FF*Purr Purr*^000000"; - mes "^3355FF*Purr Purr*^000000"; - mes "^3355FFThe machine is vibrating"; - mes "a little bit more strongly."; - mes "Which switch will"; - mes "you try now?^000000"; - next; - switch(select("Red Switch:Blue Switch:Yellow Switch:Green Switch")) { - default: - mes "^3355FF*Whiz Whiz*^000000"; - mes "^3355FF*Whiz Whiz*^000000"; - next; - mes "^3355FFThe machine made some"; - mes "violent, erratic sounds,"; - mes "and vibrated violently"; - mes "before coming to a sudden"; - mes "stop. That was the wrong"; - mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; - setquest 3106; - set diamond_edq,11; - close; - case 2: - if (.@blue >= 0) { - mes "^3355FF*Purrr Purr*^000000"; - mes "^3355FF*Clang...!*^000000"; - next; - mes "^3355FFThe machine's"; - mes "vibrations have"; - mes "grown stronger."; - mes "It looks like you"; - mes "chose the right switch.^000000"; - next; - set .@blue,.@blue+1; - } - else { - mes "^3355FF*Whiz Whiz*^000000"; - mes "^3355FF*Whiz Whiz*^000000"; - next; - mes "^3355FFThe machine made some"; - mes "violent, erratic sounds,"; - mes "and vibrated violently"; - mes "before coming to a sudden"; - mes "stop. That was the wrong"; - mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; - setquest 3106; - set diamond_edq,11; - close; - } - break; - } - } - else if (.@switch_sound == 3) { - mes "^3355FF*Bzzz Bzzz*"; - mes "*Bzzz Bzzz*"; - mes "The machine's vibrations"; - mes "are a bit more stable now."; - mes "Which switch will you try?^000000"; - next; - switch(select("Red Switch:Blue Switch:Yellow Switch:Green Switch")) { - default: - mes "^3355FF*Whiz Whiz*^000000"; - mes "^3355FF*Whiz Whiz*^000000"; - next; - mes "^3355FFThe machine made some"; - mes "violent, erratic sounds,"; - mes "and vibrated violently"; - mes "before coming to a sudden"; - mes "stop. That was the wrong"; - mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; - setquest 3106; - set diamond_edq,11; - close; - case 3: - if (.@yellow >= 0) { - mes "^3355FF*Bzzzz Bzzzz*^000000"; - mes "^3355FF*Clang...!*^000000"; - next; - mes "^3355FFThe machine's"; - mes "vibrations have"; - mes "grown stronger."; - mes "It looks like you"; - mes "chose the right switch.^000000"; - next; - set .@yellow,.@yellow+1; - } - else { - mes "^3355FF*Whiz Whiz*^000000"; - mes "^3355FF*Whiz Whiz*^000000"; - next; - mes "^3355FFThe machine made some"; - mes "violent, erratic sounds,"; - mes "and vibrated violently"; - mes "before coming to a sudden"; - mes "stop. That was the wrong"; - mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; - setquest 3106; - set diamond_edq,11; - close; - } - break; - } - } - else if (.@switch_sound == 4) { - next; - mes "^3355FF*Pzzzz Pzzz*"; - mes "*Pzzzz Pzzz*"; - mes "The machine is vibrating"; - mes "fairly strongly now. Which"; - mes "switch will you try?^000000"; - next; - switch(select("Red Switch:Blue Switch:Yellow Switch:Green Switch")) { - default: - mes "^3355FF*Whiz Whiz*^000000"; - mes "^3355FF*Whiz Whiz*^000000"; - next; - mes "^3355FFThe machine made some"; - mes "violent, erratic sounds,"; - mes "and vibrated violently"; - mes "before coming to a sudden"; - mes "stop. That was the wrong"; - mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; - setquest 3106; - set diamond_edq,11; - close; - case 4: - if (.@green >= 0) { - mes "^3355FFPzzzzz Pzzzz*^000000"; - mes "^3355FF*Clang...!*^000000"; - next; - mes "^3355FFThe machine's"; - mes "vibrations have"; - mes "grown stronger."; - mes "It looks like you"; - mes "chose the right switch.^000000"; - next; - set .@green,.@green+1; - } - else { - mes "^3355FF*Whiz Whiz*^000000"; - mes "^3355FF*Whiz Whiz*^000000"; - next; - mes "^3355FFThe machine made some"; - mes "violent, erratic sounds,"; - mes "and vibrated violently"; - mes "before coming to a sudden"; - mes "stop. That was the wrong"; - mes "switch. You'd better ask Dorian... ^FFFFFF ^000000"; - setquest 3106; - set diamond_edq,11; - close; - } - break; - } - } - } - } - } - } - if (diamond_edq == 12) { - mes "[Dorian]"; - mes "It sounds like you're"; - mes "done fixing my Mystic"; - mes "Dryer de Elegance."; - mes "Why don't you come"; - mes "back so I can explain"; - mes "how you can use it?"; - close; - } - if ((diamond_edq == 13) && (countitem(7722) < 1)) { - mes "^3355FFYou lift the main"; - mes "operational switch,"; - mes "turning on a light and"; - mes "opening a convenient"; - mes "slot. You insert the"; - mes "wet bond of debt.^000000"; - next; - mes "^3355FFThe engine's pistons"; - mes "and cylinders churn"; - mes "with a lively din, and"; - mes "when the heater stops,"; - mes "the slot reopens.^000000"; - next; - mes "[" + strcharinfo(0) + "]"; - mes "So this is the original"; - mes "bond of debt that Muff"; - mes "lost? It looks... Perfect!"; - changequest 3108,3109; - getitem 7722,1; //Debt_Note - close; - } - else if ((diamond_edq == 13) && (countitem(7722) > 0)) { - mes "You already used this"; - mes "machine to restore the"; - mes "bond of debt. There's no"; - mes "need to mess around"; - mes "with it any longer."; - close; - } - mes "[Dorian]"; - mes "Who are you?"; - mes "Don't you dare lay"; - mes "a hand on my precious"; - mes "masterpiece inventions! "; - close; -} - // Broken Diamond //============================================================ moc_ruins,152,147,5 script Ibrahim 732,3,3,{ diff --git a/npc/re/airports/izlude.txt b/npc/re/airports/izlude.txt index 42ec73fe8..bf5cabdf3 100644 --- a/npc/re/airports/izlude.txt +++ b/npc/re/airports/izlude.txt @@ -7,6 +7,7 @@ //===== Additional Comments: ================================= //= Official NPCs. //= Updated to match the new Izlude Map. [Masao] +//= Updated to Official coordinates //============================================================ -izlude,204,75,3 duplicate(Airship_Staff_izlude) Airship Staff#izlude 90 +izlude,202,75,3 duplicate(Airship_Staff_izlude) Airship Staff#izlude 90 diff --git a/npc/re/cities/jawaii.txt b/npc/re/cities/jawaii.txt index f6e6f70ec..a4b584d3a 100644 --- a/npc/re/cities/jawaii.txt +++ b/npc/re/cities/jawaii.txt @@ -1,11 +1,11 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Jawaii Town Renewal //===== By: ================================================== //= Daegaladh, Masao //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== -//= rAthena SVN +//= Hercules GIT //===== Description: ========================================= //= Jawaii town NPCs. //===== Additional Comments: ================================= @@ -13,4 +13,4 @@ //= 1.1 Changed to Official coordinates [Streusel] //============================================================ -izlude,180,224,6 duplicate(Honeymoon_Helper_Izlude) Honeymoon Helper#Izlude 71 +izlude,180,224,6 duplicate(Honeymoon_Helper_Izlude) Honeymoon Helper#Izlude 71 \ No newline at end of file diff --git a/npc/re/merchants/shops.txt b/npc/re/merchants/shops.txt index 9c0692bdb..77f1f8d68 100644 --- a/npc/re/merchants/shops.txt +++ b/npc/re/merchants/shops.txt @@ -11,6 +11,7 @@ //= 1.1 Added Dicastes merchants. [Joseph] //= 1.2 Moved more shops to Renewal file. [Euphy] //= 1.3 Added Malangdo tool dealer. [Euphy] +//= 1.4 Moved Izlude merchants to Official coordinates [Streusel] //============================================================ //======================================================= @@ -33,10 +34,12 @@ dicastes01,207,200,6 shop Points Merchant#dic 66,6360:-1,6361:-1,6362:-1,6363:-1 //======================================================= // Izlude //======================================================= -izlude,97,146,0 shop Butcher#iz 54,517:-1 +izlude,160,186,0 shop Butcher#iz 54,517:-1 izlude,124,165,4 shop Fruit Gardener#iz 53,512:-1,513:-1,515:-1,516:-1 -izlude,95,145,6 shop Vendor from Milk Ranch#i 90,519:-1 -izlude,174,164,4 shop Pet Groomer#iz 124,537:-1,643:-1,10013:-1,10014:-1,554:-1,6113:-1,6114:-1,6115:-1 +izlude,128,158,6 shop Vendor from Milk Ranch#i 90,519:-1 +izlude_in,72,98,3 shop Pet Groomer#iz 124,537:-1,643:-1,10013:-1,10014:-1,554:-1,6113:-1,6114:-1,6115:-1 +izlude_in,57,109,0 shop Tool Dealer#iz 47,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1,1750:-1 +izlude_in,72,110,3 shop Trading Merchant#iz 900,13200:-1,13201:-1,13202:-1,13150:-1,13102:-1,13151:-1,13154:-1,13155:-1,13163:-1,13165:-1,13168:-1 //======================================================= // Juno diff --git a/npc/re/quests/monstertamers.txt b/npc/re/quests/monstertamers.txt new file mode 100644 index 000000000..cc95d3749 --- /dev/null +++ b/npc/re/quests/monstertamers.txt @@ -0,0 +1,15 @@ +//===== Hercules Script ======================================= +//= Monster Tamers +//===== By: ================================================== +//= Streusel +//===== Current Version: ===================================== +//= 1.0 +//===== Compatible With: ===================================== +//= Hercules +//===== Description: ========================================= +//= Cute pet quest items +//===== Additional Comments: ================================= +//= 1.0 Duplicates for Monster Tamer +//============================================================ + +izlude_in,55,105,4 duplicate(Monster_Tamer#izu) Monster Tamer#izlude 125 \ No newline at end of file diff --git a/npc/re/quests/quests_13_1.txt b/npc/re/quests/quests_13_1.txt new file mode 100644 index 000000000..107b7c029 --- /dev/null +++ b/npc/re/quests/quests_13_1.txt @@ -0,0 +1,17 @@ +//===== Hercules Script ====================================== +//= Quest NPCs related to Ash-Vacuum +//===== By: ================================================== +//= Streusel +//===== Current Version: ===================================== +//= 1.0 +//===== Description: ========================================= +//= [Official Conversion] +//= Contains: +//= Promotional Staff Duplicate for Renewal +//===== Additional Comments: ================================= +//= 1.0 First Version. +//============================================================ + +// Onward to the New World +//============================================================ +izlude,102,171,6 duplicate(Promotional Staff#iz) Promotional Staff#izlude 100 \ No newline at end of file diff --git a/npc/re/quests/quests_lighthalzen.txt b/npc/re/quests/quests_lighthalzen.txt index a68fcb632..3f029f7f4 100644 --- a/npc/re/quests/quests_lighthalzen.txt +++ b/npc/re/quests/quests_lighthalzen.txt @@ -1,21 +1,22 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Quest NPCs located in Lighthalzen //===== By: ================================================== //= Ziu, Heris (translation) //===== Current Version: ===================================== -//= 1.1 +//= 1.1a //===== Compatible With: ===================================== -//= rAthena SVN +//= Hercules GIT //===== Description: ========================================= //= Quests related to Lighthalzen City. //===== Additional Comments: ================================= //= 1.0 Updated to match the new Izlude Map. [Masao] //= 1.1 Added Somatology Laboratory F4 quest. [Euphy] +//= 1.1a Coordinate update //============================================================ // Renewal split [Daegaladh] //============================================================ -izlude,171,73,6 duplicate(Scamp) Scamp#2 853 +izlude,172,73,6 duplicate(Scamp) Scamp#2 853 // Somatology Laboratory F4 //============================================================ diff --git a/npc/re/scripts_athena.conf b/npc/re/scripts_athena.conf index cc12ddceb..30bf67476 100644 --- a/npc/re/scripts_athena.conf +++ b/npc/re/scripts_athena.conf @@ -80,4 +80,6 @@ npc: npc/re/quests/quests_dicastes.txt npc: npc/re/quests/quests_izlude.txt npc: npc/re/quests/quests_lighthalzen.txt npc: npc/re/quests/quests_malangdo.txt -npc: npc/re/quests/quests_veins.txt \ No newline at end of file +npc: npc/re/quests/quests_veins.txt +npc: npc/re/quests/monstertamers.txt +npc: npc/re/quests/quests_13_1.txt \ No newline at end of file diff --git a/npc/warps/pvp.txt b/npc/warps/pvp.txt index e9440aeb9..c0e6b09a3 100644 --- a/npc/warps/pvp.txt +++ b/npc/warps/pvp.txt @@ -1,11 +1,11 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Prontera Arena & PvP Warp Script //===== By: ================================================== //= Athena (any) //===== Current Version: ===================================== -//= 1.3 +//= 1.4 //===== Compatible With: ===================================== -//= Any Athena Version +//= Hercules GIT //===== Description: ========================================= //= Warp Points for Prontera Arena and PvP Maps //===== Additional Comments: ================================= @@ -13,6 +13,7 @@ //= 1.1 Fixed Prontera Arena warp [Yor] //= 1.2 Added addition warps for PvP Nightmare Mode maps. //= 1.3 Fixed duplicate warp names [Timexy] +//= 1.4 Disabled removed maps ordeal_*-3 and ordeal_*-4 [Streusel] //============================================================ //Battle Ordeal Mode diff --git a/src/common/mmo.h b/src/common/mmo.h index 2ef9789f2..7b492bc90 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -97,7 +97,7 @@ #define MAX_GUILDSKILL 15 // increased max guild skills because of new skills [Sara-chan] #define MAX_GUILDLEVEL 50 #define MAX_GUARDIANS 8 //Local max per castle. [Skotlex] -#define MAX_QUEST_DB 2200 //Max quests that the server will load +#define MAX_QUEST_DB 2300 //Max quests that the server will load #define MAX_QUEST_OBJECTIVES 3 //Max quest objectives for a quest // for produce -- cgit v1.2.3-70-g09d2 From 19b8cbb835e867febb597b34187f6bbca48cbe7b Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 22 Apr 2013 18:28:18 -0300 Subject: Hercules April 22 MEGA-ULTRA-LONG Patch~! http://hercules.ws/board/topic/470-hercules-april-22-patch/ Signed-off-by: shennetsind --- conf/atcommand.conf | 7 + conf/channels.conf | 22 +- conf/map-server.conf | 9 +- db/cashshop_db.conf | 55 + db/cashshop_db.txt | 45 - db/const.txt | 2 - db/pre-re/item_combo_db.txt | 14 +- db/pre-re/item_trade.txt | 4 +- db/pre-re/map_zone_db.conf | 34 +- db/pre-re/skill_db.txt | 1 - db/re/item_combo_db.txt | 14 +- db/re/item_trade.txt | 4 +- db/re/map_zone_db.conf | 34 +- db/re/skill_db.txt | 1 - doc/script_commands.txt | Bin 593352 -> 289408 bytes src/char/char.c | 28 +- src/config/const.h | 4 +- src/config/core.h | 16 +- src/map/Makefile.in | 4 +- src/map/atcommand.c | 4914 ++++++++++++------------ src/map/atcommand.h | 98 +- src/map/battle.c | 95 +- src/map/buyingstore.c | 31 +- src/map/buyingstore.h | 31 +- src/map/clif.c | 1217 +++--- src/map/clif.h | 22 +- src/map/guild.c | 8 +- src/map/intif.c | 2 +- src/map/irc-bot.c | 272 ++ src/map/irc-bot.h | 58 + src/map/itemdb.c | 31 +- src/map/itemdb.h | 1 + src/map/log.c | 608 ++- src/map/log.h | 84 +- src/map/mail.c | 2 +- src/map/map.c | 465 ++- src/map/map.h | 51 +- src/map/mob.c | 63 +- src/map/npc.c | 4 +- src/map/packets_struct.h | 324 ++ src/map/party.c | 2 +- src/map/pc.c | 82 +- src/map/pc.h | 11 +- src/map/pc_groups.c | 40 +- src/map/pc_groups.h | 5 +- src/map/pet.c | 4 +- src/map/script.c | 6873 ++++++++++++++++------------------ src/map/script.h | 4 - src/map/searchstore.c | 201 +- src/map/searchstore.h | 42 +- src/map/skill.c | 6 +- src/map/skill.h | 1 - src/map/sql/CMakeLists.txt | 4 +- src/map/status.c | 4 + src/map/trade.c | 4 +- src/map/unit.c | 4 +- src/map/vending.c | 183 +- src/map/vending.h | 31 +- vcproj-10/map-server.vcxproj | 2 + vcproj-10/map-server.vcxproj.filters | 6 + vcproj-12/map-server.vcxproj | 2 + vcproj-12/map-server.vcxproj.filters | 6 + vcproj-9/map-server.vcproj | 8 + 63 files changed, 8590 insertions(+), 7614 deletions(-) create mode 100644 db/cashshop_db.conf delete mode 100644 db/cashshop_db.txt create mode 100644 src/map/irc-bot.c create mode 100644 src/map/irc-bot.h (limited to 'db/re/item_combo_db.txt') diff --git a/conf/atcommand.conf b/conf/atcommand.conf index 67af3b91f..6e35d5327 100644 --- a/conf/atcommand.conf +++ b/conf/atcommand.conf @@ -59,6 +59,13 @@ aliases: { channel: ["main"] } +/* list of commands that should not be logged at all */ +/* add as many commands as you like */ +nolog: { + iteminfo: 1 + mobinfo: 1 +} + /* Commands help file */ help: { @include "conf/help.txt" diff --git a/conf/channels.conf b/conf/channels.conf index b12d2da8b..3584fc2ea 100644 --- a/conf/channels.conf +++ b/conf/channels.conf @@ -1,3 +1,14 @@ +//==================================================== +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//= +//= http://hercules.ws/board/ +//==================================================== +//= http://hercules.ws/board/topic/316-introducing-hercules-channel-system/ chsys: ( { /* default channels (available on boot) */ @@ -18,6 +29,7 @@ chsys: ( Cyan: "0x00b89d" Yellow: "0xffff90" Green: "0x28bf00" + Light_Green: "0x3dff98" Normal: "0x00ff00" /* as many colors as you like */ } @@ -33,7 +45,15 @@ chsys: ( ally_channel_enabled: true ally_channel_name: "ally" /* available as #ally */ ally_channel_color: "Green" - ally_channel_autojoin: true + ally_channel_autojoin: true /* will members autojoin to their respective #ally chats when they log-in? */ + /* "irc_channel" is a special channel connected to a specific chat room in any irc network */ + irc_channel_enabled: false + irc_channel_name: "irc" /* available as #irc */ + irc_channel_color: "Light_Green" + irc_channel_network: "irc.rizon.net:6665" /* network to connect to (:and port) */ + irc_channel_channel: "#Hercules" /* channel in the network above to join */ + irc_channel_nick: "Hercules_chSysBot" /* nick the bot will use */ + irc_channel_nick_pw: "" /* password to this nick (if any) to identify to nick server on the irc network */ } ) diff --git a/conf/map-server.conf b/conf/map-server.conf index b251e69ec..cac5421e6 100644 --- a/conf/map-server.conf +++ b/conf/map-server.conf @@ -89,18 +89,19 @@ minsave_time: 100 // Apart from the autosave_time, players will also get saved when involved // in the following (add as needed): -// 1: after every successful trade -// 2: after every vending transaction -// 4: after closing storage/guild storage. +// 1: After every successful trade +// 2: After every vending transaction +// 4: After closing storage/guild storage. // 8: After hatching/returning to egg a pet. // 16: After successfully sending a mail with attachment // 32: After successfully submitting an item for auction // 64: After successfully get/delete/complete a quest +// 128: After every buying store transaction // NOTE: These settings decrease the chance of dupes/lost items when there's a // server crash at the expense of increasing the map/char server lag. If your // server rarely crashes, but experiences interserver lag, you may want to set // these off. -save_settings: 127 +save_settings: 255 // Message of the day file, when a character logs on, this message is displayed. motd_txt: conf/motd.txt diff --git a/db/cashshop_db.conf b/db/cashshop_db.conf new file mode 100644 index 000000000..381d898e0 --- /dev/null +++ b/db/cashshop_db.conf @@ -0,0 +1,55 @@ +//==================================================== +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//= +//= http://hercules.ws/board/ +//==================================================== +//= http://hercules.ws/board/topic/367-introducing-cash-shop-support/ + +cash_shop: ( +{ + cat_0: { //New + Apple:100 + ID531:250 + } + + cat_1: { //Popular + ID513:100 + Banana_Juice:250 + } + + cat_2: { //Limited + Grape:100 + ID533:250 + } + + cat_3: { //Rental + ID515:100 + Carrot_Juice:250 + } + + cat_4: { //Permanent + Green_Herb:100 + ID510:250 + } + + cat_5: { //Scroll + ID501:100 + ID502:250 + } + + cat_6: { //Usable + White_Potion:150 + Blue_Potion:500 + } + + cat_7: { //Other + ID909:400 + ID907:500 + } +} +) \ No newline at end of file diff --git a/db/cashshop_db.txt b/db/cashshop_db.txt deleted file mode 100644 index fc6a803c7..000000000 --- a/db/cashshop_db.txt +++ /dev/null @@ -1,45 +0,0 @@ -// Hercules Cash Shop Database -// Format: -// Tab ID or Tab Name, ItemID or Item Name, Price -// -// Tabs: -// 0 = New -// 1 = Popular -// 2 = Limited -// 3 = Rental -// 4 = Permanent -// 5 = Scroll -// 6 = Usable -// 7 = Other - -//New -New,Apple,100 -0,531,250 - -//Popular -1,513,100 -Popular,Banana_Juice,250 - -//Limited -2,Grape,100 -Limited,533,250 - -//Rental -Rental,515,100 -3,Carrot_Juice,250 - -//Permanent -4,Green_Herb,100 -Permanent,510,250 - -//Scroll -5,501,100 -5,502,250 - -//Usable -usable,White_Potion,150 -usable,Blue_Potion,500 - -//Other -7,909,400 -7,907,500 \ No newline at end of file diff --git a/db/const.txt b/db/const.txt index d3d5991ab..ec051c4b0 100644 --- a/db/const.txt +++ b/db/const.txt @@ -333,8 +333,6 @@ mf_snow 16 mf_fog 17 mf_sakura 18 mf_leaves 19 -mf_rain 20 -mf_nogo 22 mf_clouds 23 mf_clouds2 24 mf_fireworks 25 diff --git a/db/pre-re/item_combo_db.txt b/db/pre-re/item_combo_db.txt index c1eb3c039..f745d25b7 100644 --- a/db/pre-re/item_combo_db.txt +++ b/db/pre-re/item_combo_db.txt @@ -9,10 +9,10 @@ 1421:2133,{ bonus2 bAddRace,RC_NonBoss,4; bonus2 bAddRace,RC_Boss,4; bonus bDef,2; } 1422:2133,{ bonus2 bAddRace,RC_NonBoss,4; bonus2 bAddRace,RC_Boss,4; bonus bDef,2; } 1428:2115,{ bonus3 bAutoSpellWhenHit,"HP_ASSUMPTIO",2,5; } -1472:2677,{ bonus bMatkRate,6; bonus bDex,2; bonus bCastrate,-getrefine(); } -1472:2711,{ bonus bMatkRate,6; bonus bDex,2; bonus bCastrate,-getrefine(); } -1473:2677,{ bonus bMatkRate,6; bonus bDex,2; bonus bCastrate,-getrefine(); } -1473:2711,{ bonus bMatkRate,6; bonus bDex,2; bonus bCastrate,-getrefine(); } +1472:2677,{ bonus bMatkRate,6; bonus bDex,2; bonus bCastrate,-getequiprefinerycnt(EQI_HAND_R); } +1472:2711,{ bonus bMatkRate,6; bonus bDex,2; bonus bCastrate,-getequiprefinerycnt(EQI_HAND_R); } +1473:2677,{ bonus bMatkRate,6; bonus bDex,2; bonus bCastrate,-getequiprefinerycnt(EQI_HAND_R); } +1473:2711,{ bonus bMatkRate,6; bonus bDex,2; bonus bCastrate,-getequiprefinerycnt(EQI_HAND_R); } 1474:2527,{ bonus2 bAddRace,RC_Dragon,5; } 1477:2700,{ bonus2 bResEff,Eff_Confusion,9500; } 1479:2700,{ bonus2 bResEff,Eff_Confusion,9500; } @@ -23,11 +23,11 @@ 1573:2716:2717,{ bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } 1615:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } 1616:2515,{ bonus bSpeedRate,25; } -1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } +1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getequiprefinerycnt(EQI_HAND_R)*3; } 1618:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } -1620:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } +1620:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getequiprefinerycnt(EQI_HAND_R)*3; } 1620:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } -1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getrefine(); } +1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R); } 1631:2129,{ bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } 1636:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } 1723:2718,{ bonus bDex,1; bonus bMaxSP,50; bonus bSPrecovRate,10; } diff --git a/db/pre-re/item_trade.txt b/db/pre-re/item_trade.txt index b5fedbd62..84b0220f5 100644 --- a/db/pre-re/item_trade.txt +++ b/db/pre-re/item_trade.txt @@ -1,6 +1,6 @@ //Item Trading Restrictions File //Specify here special rules for item trading. -//Item ID, TradeMask, GM-Level Override +//Item ID, TradeMask, Group-Level Override //Trading mask values: //1:Item can't be droped //2:Item can't be traded (nor vended) @@ -13,7 +13,7 @@ //256:Item can't be auctioned //Example: //1161,67,50 //Balmung: No drop, No trade, No Guild Store (1+2+64 =67), -//only GMs of GM-level 50 and up can override the setting. +//only groups of group-level 50 and up can override the setting. // Wedding Related items 2634,507,100 // Wedding Ring diff --git a/db/pre-re/map_zone_db.conf b/db/pre-re/map_zone_db.conf index 36689ac57..6fb18084b 100644 --- a/db/pre-re/map_zone_db.conf +++ b/db/pre-re/map_zone_db.conf @@ -16,10 +16,41 @@ //= maps can be linked to a specific zone through the zone mapflag //= 'mapflagzone' //== available types for 'disabled_skills': -//= PLAYER, HOMUN, MERCENARY, MONSTER, ALL and NONE +//= PLAYER, HOMUN, MERCENARY, MONSTER, PET, ELEMENTAL, ALL and NONE //== More on //= http://hercules.ws/board/topic/302-introducing-hercules-map-zone-database/ +//= (TODO: replace with wiki link and detail the wiki page in a decent format ^) zones: ( +{ + /* All zone is a dynamic (very special) zone that is forcebly inherited by ALL maps automatically */ + name: "All" /* changing this name requires MAP_ZONE_ALL_NAME to also be changed in src/map/map.h file */ + + disabled_skills: { + //both examples below disable napalm beat (id 11) to players + //MG_NAPALMBEAT: "PLAYER" + //ID11: "PLAYER" + } + + disabled_items: { + //Both examples below disable apple (id 501) + //Apple: true + //ID501: true + } + + mapflags: ( ) + + /* "command:min-group-lv-to-override" e.g. "heal: 70" */ + disabled_commands: { + //Example Below makes @heal be used in maps within this zone only by those group lv 70 and above + //heal: 70 + } + skill_damage_cap: { + //Exemple Below caps firebolt damage in maps within this zone to a maximum 50 damage, + // (depends on HMAP_ZONE_DAMAGE_CAP_TYPE in src/config/core.h) + // to players and monsters. + //MG_FIREBOLT: (50,"PLAYER | MONSTER") + } +}, { /* Normal zone is applied to all maps that are not pkable (where players cant fight each other) */ /* However, it wont be applied to maps with its own zones (specified thru mapflag) */ @@ -37,6 +68,7 @@ zones: ( } mapflags: ( ) + }, { /* PvP zone is applied to all maps with a pvp mapflag */ diff --git a/db/pre-re/skill_db.txt b/db/pre-re/skill_db.txt index 806bb4d11..df52ec439 100644 --- a/db/pre-re/skill_db.txt +++ b/db/pre-re/skill_db.txt @@ -38,7 +38,6 @@ // 0x1000- disable usage on enemies (for non-offensive skills). // 0x2000- skill ignores land protector (e.g. arrow shower) // 0x4000- chorus skill -// 0x8000- skill wont be passed to clones // 13 maxcount: max amount of skill instances to place on the ground when // player_land_skill_limit/monster_land_skill_limit is enabled. For skills // that attack using a path, this is the path length to be used. diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt index d921689c3..26b955d9b 100644 --- a/db/re/item_combo_db.txt +++ b/db/re/item_combo_db.txt @@ -12,10 +12,10 @@ 1422:2133,{ bonus2 bAddRace,RC_NonBoss,4; bonus2 bAddRace,RC_Boss,4; bonus bDef,2; } 1428:2115,{ bonus3 bAutoSpellWhenHit,"HP_ASSUMPTIO",2,5; } 1433:2153,{ bonus2 bSkillAtk,"CR_GRANDCROSS",10; bonus2 bSkillAtk,"LG_RAYOFGENESIS",10; } -1472:2677,{ bonus bMatkRate,6; bonus bDex,2; bonus bVariableCastrate,-getrefine(); } -1472:2711,{ bonus bMatkRate,6; bonus bDex,2; bonus bVariableCastrate,-getrefine(); } -1473:2677,{ bonus bMatkRate,6; bonus bDex,2; bonus bVariableCastrate,-getrefine(); } -1473:2711,{ bonus bMatkRate,6; bonus bDex,2; bonus bVariableCastrate,-getrefine(); } +1472:2677,{ bonus bMatkRate,6; bonus bDex,2; bonus bVariableCastrate,-getequiprefinerycnt(EQI_HAND_R); } +1472:2711,{ bonus bMatkRate,6; bonus bDex,2; bonus bVariableCastrate,-getequiprefinerycnt(EQI_HAND_R); } +1473:2677,{ bonus bMatkRate,6; bonus bDex,2; bonus bVariableCastrate,-getequiprefinerycnt(EQI_HAND_R); } +1473:2711,{ bonus bMatkRate,6; bonus bDex,2; bonus bVariableCastrate,-getequiprefinerycnt(EQI_HAND_R); } 1474:2527,{ bonus2 bAddRace,RC_Dragon,5; } 1477:2700,{ bonus2 bResEff,Eff_Confusion,9500; } 1479:2700,{ bonus2 bResEff,Eff_Confusion,9500; } @@ -26,11 +26,11 @@ 1573:2716:2717,{ bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } 1615:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1616:2515,{ bonus bSpeedRate,25; } -1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } +1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getequiprefinerycnt(EQI_HAND_R)*3; } 1618:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } -1620:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } +1620:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getequiprefinerycnt(EQI_HAND_R)*3; } 1620:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } -1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getrefine(); } +1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R); } 1631:2129,{ bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } 1636:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1657:2471:2569:15029,{ bonus bHealPower,25; } diff --git a/db/re/item_trade.txt b/db/re/item_trade.txt index 9ad2a8c65..c6faa991b 100644 --- a/db/re/item_trade.txt +++ b/db/re/item_trade.txt @@ -1,6 +1,6 @@ //Item Trading Restrictions File //Specify here special rules for item trading. -//Item ID, TradeMask, GM-Level Override +//Item ID, TradeMask, Group-Level Override //Trading mask values: //1:Item can't be droped //2:Item can't be traded (nor vended) @@ -13,7 +13,7 @@ //256:Item can't be auctioned //Example: //1161,67,50 //Balmung: No drop, No trade, No Guild Store (1+2+64 =67), -//only GMs of GM-level 50 and up can override the setting. +//only groups of group-level 50 and up can override the setting. // Wedding Related items 2634,507,100 // Wedding Ring diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf index 36689ac57..6fb18084b 100644 --- a/db/re/map_zone_db.conf +++ b/db/re/map_zone_db.conf @@ -16,10 +16,41 @@ //= maps can be linked to a specific zone through the zone mapflag //= 'mapflagzone' //== available types for 'disabled_skills': -//= PLAYER, HOMUN, MERCENARY, MONSTER, ALL and NONE +//= PLAYER, HOMUN, MERCENARY, MONSTER, PET, ELEMENTAL, ALL and NONE //== More on //= http://hercules.ws/board/topic/302-introducing-hercules-map-zone-database/ +//= (TODO: replace with wiki link and detail the wiki page in a decent format ^) zones: ( +{ + /* All zone is a dynamic (very special) zone that is forcebly inherited by ALL maps automatically */ + name: "All" /* changing this name requires MAP_ZONE_ALL_NAME to also be changed in src/map/map.h file */ + + disabled_skills: { + //both examples below disable napalm beat (id 11) to players + //MG_NAPALMBEAT: "PLAYER" + //ID11: "PLAYER" + } + + disabled_items: { + //Both examples below disable apple (id 501) + //Apple: true + //ID501: true + } + + mapflags: ( ) + + /* "command:min-group-lv-to-override" e.g. "heal: 70" */ + disabled_commands: { + //Example Below makes @heal be used in maps within this zone only by those group lv 70 and above + //heal: 70 + } + skill_damage_cap: { + //Exemple Below caps firebolt damage in maps within this zone to a maximum 50 damage, + // (depends on HMAP_ZONE_DAMAGE_CAP_TYPE in src/config/core.h) + // to players and monsters. + //MG_FIREBOLT: (50,"PLAYER | MONSTER") + } +}, { /* Normal zone is applied to all maps that are not pkable (where players cant fight each other) */ /* However, it wont be applied to maps with its own zones (specified thru mapflag) */ @@ -37,6 +68,7 @@ zones: ( } mapflags: ( ) + }, { /* PvP zone is applied to all maps with a pvp mapflag */ diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt index ed4671c00..0bb63d7e9 100644 --- a/db/re/skill_db.txt +++ b/db/re/skill_db.txt @@ -38,7 +38,6 @@ // 0x1000- disable usage on enemies (for non-offensive skills). // 0x2000- skill ignores land protector (e.g. arrow shower) // 0x4000- chorus skill -// 0x8000- skill wont be passed to clones // 13 maxcount: max amount of skill instances to place on the ground when // player_land_skill_limit/monster_land_skill_limit is enabled. For skills // that attack using a path, this is the path length to be used. diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 38c442f74..aa3112d62 100644 Binary files a/doc/script_commands.txt and b/doc/script_commands.txt differ diff --git a/src/char/char.c b/src/char/char.c index ce0d067a7..109f74c36 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1059,13 +1059,6 @@ int mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) j += mmo_char_tobuf(WBUFP(buf, j), &p); } -#if PACKETVER >= 20130000 - /* for some reason the client doesn't like "3" characters (yes...3) we gotta send a fake one or it wont display any =_= */ - if( j == 432 ){/* we just duplicate the last visually the client will say 4 chars instead of 3 though >_> */ - j += mmo_char_tobuf(WBUFP(buf, j), &p); - } -#endif - memset(sd->new_name,0,sizeof(sd->new_name)); SqlStmt_Free(stmt); @@ -1888,7 +1881,7 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) return 106+offset; } - + int mmo_char_send006b(int fd, struct char_session_data* sd); //---------------------------------------- // [Ind/Hercules] notify client about charselect window data //---------------------------------------- @@ -1906,10 +1899,7 @@ void mmo_char_send082d(int fd, struct char_session_data* sd) { WFIFOB(fd,8) = sd->char_slots; memset(WFIFOP(fd,9), 0, 20); // unused bytes WFIFOSET(fd,29); - WFIFOHEAD(fd, 6); - WFIFOW(fd,0) = 0x9a0; - WFIFOL(fd,2) = 1; - WFIFOSET(fd, 6); + mmo_char_send006b(fd,sd); } //---------------------------------------- @@ -4342,20 +4332,6 @@ int parse_char(int fd) RFIFOSKIP(fd, 8); } break; - - /* [Ind/Hercules] after hours reading over and over Shakto's network report, finally found this little ***hole */ - case 0x9a1: - FIFOSD_CHECK(2); - { - int j = 4; - RFIFOSKIP(fd, 2); - WFIFOHEAD(fd,j + (MAX_CHARS*MAX_CHAR_BUF)); - WFIFOW(fd,0) = 0x99d; - j+=mmo_chars_fromsql(sd, WFIFOP(fd,j)); - WFIFOW(fd,2) = j; - WFIFOSET(fd,j); - } - break; // unknown packet received default: diff --git a/src/config/const.h b/src/config/const.h index 825824c62..53f24da6f 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -53,9 +53,9 @@ /* pointer size fix which fixes several gcc warnings */ #ifdef __64BIT__ - #define __64BPRTSIZE(y) (intptr)y + #define __64BPTRSIZE(y) (intptr)y #else - #define __64BPRTSIZE(y) y + #define __64BPTRSIZE(y) y #endif /* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */ diff --git a/src/config/core.h b/src/config/core.h index c9b1463de..bec6cb507 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -34,11 +34,6 @@ /// We kindly ask you to consider keeping it enabled, it helps us improve Hercules. //#define STATS_OPT_OUT -/// uncomment to enable query_sql script command and mysql logs to function on it's own thread -/// be aware this feature is under tests and you should use at your own risk, we however -/// welcome any feedback you may have regarding this feature, please send us all bug reports. -//#define BETA_THREAD_TEST - /// Uncomment to enable the Cell Stack Limit mod. /// It's only config is the battle_config cell_stack_limit. /// Only chars affected are those defined in BL_CHAR (mobs and players currently) @@ -51,6 +46,17 @@ /// - but is not the official behaviour. //#define CIRCULAR_AREA +//This is the distance at which @autoloot works, +//if the item drops farther from the player than this, +//it will not be autolooted. [Skotlex] +//Note: The range is unlimited unless this define is set. +//#define AUTOLOOT_DISTANCE AREA_SIZE + +/// Uncomment to switch the way map zones' "skill_damage_cap" functions. +/// When commented the cap takes place before modifiers, as to have them be useful. +/// When uncommented the cap takes place after modifiers. +//#define HMAP_ZONE_DAMAGE_CAP_TYPE + /// Uncomment to enable Non Stackable items unique ID /// By enabling it, the system will create an unique id for each new non stackable item created //#define NSI_UNIQUE_ID diff --git a/src/map/Makefile.in b/src/map/Makefile.in index 78f5c42c4..bb99b6a05 100644 --- a/src/map/Makefile.in +++ b/src/map/Makefile.in @@ -17,7 +17,7 @@ MAP_OBJ = map.o chrif.o clif.o pc.o status.o npc.o \ storage.o skill.o atcommand.o battle.o battleground.o \ intif.o trade.o party.o vending.o guild.o pet.o \ log.o mail.o date.o unit.o homunculus.o mercenary.o quest.o instance.o \ - buyingstore.o searchstore.o duel.o pc_groups.o elemental.o + buyingstore.o searchstore.o duel.o pc_groups.o elemental.o irc-bot.o MAP_SQL_OBJ = $(MAP_OBJ:%=obj_sql/%) \ obj_sql/mapreg_sql.o MAP_H = map.h chrif.h clif.h pc.h status.h npc.h \ @@ -27,7 +27,7 @@ MAP_H = map.h chrif.h clif.h pc.h status.h npc.h \ log.h mail.h date.h unit.h homunculus.h mercenary.h quest.h instance.h mapreg.h \ buyingstore.h searchstore.h duel.h pc_groups.h \ ../config/core.h ../config/renewal.h ../config/secure.h ../config/const.h \ - ../config/classes/general.h elemental.h packets.h packets_struct.h + ../config/classes/general.h elemental.h packets.h packets_struct.h irc-bot.h HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 0fc803198..e9c8c5fba 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #include "../common/cbasetypes.h" #include "../common/mmo.h" @@ -43,6 +44,7 @@ #include "unit.h" #include "mapreg.h" #include "quest.h" +#include "searchstore.h" #include #include @@ -50,36 +52,11 @@ #include -#define ATCOMMAND_LENGTH 50 -#define ACMD_FUNC(x) static int atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message) -#define MAX_MSG 1500 - - -typedef struct AtCommandInfo AtCommandInfo; -typedef struct AliasInfo AliasInfo; - -int atcmd_binding_count = 0; - -struct AtCommandInfo { - char command[ATCOMMAND_LENGTH]; - AtCommandFunc func; - char* at_groups;/* quick @commands "can-use" lookup */ - char* char_groups;/* quick @charcommands "can-use" lookup */ -}; - -struct AliasInfo { - AtCommandInfo *command; - char alias[ATCOMMAND_LENGTH]; -}; - - -char atcommand_symbol = '@'; // first char of the commands -char charcommand_symbol = '#'; +#define ACMD(x) static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) static char* msg_table[MAX_MSG]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others) static DBMap* atcommand_db = NULL; //name -> AtCommandInfo static DBMap* atcommand_alias_db = NULL; //alias -> AtCommandInfo -static config_t atcommand_config; static char atcmd_output[CHAT_SIZE_MAX]; static char atcmd_player_name[NAME_LENGTH]; @@ -92,12 +69,12 @@ static void atcommand_get_suggestions(struct map_session_data* sd, const char *n struct atcmd_binding_data* get_atcommandbind_byname(const char* name) { int i = 0; - if( *name == atcommand_symbol || *name == charcommand_symbol ) + if( *name == atcommand->at_symbol || *name == atcommand->char_symbol ) name++; // for backwards compatibility - ARR_FIND( 0, atcmd_binding_count, i, strcmp(atcmd_binding[i]->command, name) == 0 ); + ARR_FIND( 0, atcommand->binding_count, i, strcmp(atcommand->binding[i]->command, name) == 0 ); - return ( i < atcmd_binding_count ) ? atcmd_binding[i] : NULL; + return ( i < atcommand->binding_count ) ? atcommand->binding[i] : NULL; } //----------------------------------------------------------- @@ -169,107 +146,79 @@ void do_final_msg(void) /** * retrieves the help string associated with a given command. - * - * @param name the name of the command to retrieve help information for - * @return the string associated with the command, or NULL */ -static const char* atcommand_help_string(const char* command) -{ - const char* str = NULL; - config_setting_t* info; - - if( *command == atcommand_symbol || *command == charcommand_symbol ) - {// remove the prefix symbol for the raw name of the command - command ++; - } - - // convert alias to the real command name - command = atcommand_checkalias(command); - - // attept to find the first default help command - info = config_lookup(&atcommand_config, "help"); - - if( info == NULL ) - {// failed to find the help property in the configuration file - return NULL; - } - - if( !config_setting_lookup_string( info, command, &str ) ) - {// failed to find the matching help string - return NULL; - } - - // push the result from the method - return str; +static inline const char* atcommand_help_string(AtCommandInfo *info) { + return info->help; } + /*========================================== * @send (used for testing packet sends from the client) *------------------------------------------*/ -ACMD_FUNC(send) +ACMD(send) { int len=0,off,end,type; long num; - + // read message type as hex number (without the 0x) if(!message || !*message || - !((sscanf(message, "len %x", &type)==1 && (len=1)) - || sscanf(message, "%x", &type)==1) ) + !((sscanf(message, "len %x", &type)==1 && (len=1)) + || sscanf(message, "%x", &type)==1) ) { int i; for (i = 900; i <= 903; ++i) clif->message(fd, msg_txt(i)); - return -1; + return false; } - + #define PARSE_ERROR(error,p) \ - {\ - clif->message(fd, (error));\ - sprintf(atcmd_output, ">%s", (p));\ - clif->message(fd, atcmd_output);\ - } -//define PARSE_ERROR - +{\ +clif->message(fd, (error));\ +sprintf(atcmd_output, ">%s", (p));\ +clif->message(fd, atcmd_output);\ +} + //define PARSE_ERROR + #define CHECK_EOS(p) \ - if(*(p) == 0){\ - clif->message(fd, "Unexpected end of string");\ - return -1;\ - } -//define CHECK_EOS - +if(*(p) == 0){\ +clif->message(fd, "Unexpected end of string");\ +return false;\ +} + //define CHECK_EOS + #define SKIP_VALUE(p) \ - {\ - while(*(p) && !ISSPACE(*(p))) ++(p); /* non-space */\ - while(*(p) && ISSPACE(*(p))) ++(p); /* space */\ - } -//define SKIP_VALUE - +{\ +while(*(p) && !ISSPACE(*(p))) ++(p); /* non-space */\ +while(*(p) && ISSPACE(*(p))) ++(p); /* space */\ +} + //define SKIP_VALUE + #define GET_VALUE(p,num) \ - {\ - if(sscanf((p), "x%lx", &(num)) < 1 && sscanf((p), "%ld ", &(num)) < 1){\ - PARSE_ERROR("Invalid number in:",(p));\ - return -1;\ - }\ - } -//define GET_VALUE - +{\ +if(sscanf((p), "x%lx", &(num)) < 1 && sscanf((p), "%ld ", &(num)) < 1){\ +PARSE_ERROR("Invalid number in:",(p));\ +return false;\ +}\ +} + //define GET_VALUE + if (type > 0 && type < MAX_PACKET_DB) { - + if(len) {// show packet length sprintf(atcmd_output, msg_txt(904), type, packet_db[type].len); // Packet 0x%x length: %d clif->message(fd, atcmd_output); - return 0; + return true; } - + len=packet_db[type].len; off=2; if(len == 0) {// unknown packet - ERROR sprintf(atcmd_output, msg_txt(905), type); // Unknown packet: 0x%x clif->message(fd, atcmd_output); - return -1; + return false; } else if(len == -1) {// dynamic packet len=SHRT_MAX-4; // maximum length @@ -277,7 +226,7 @@ ACMD_FUNC(send) } WFIFOHEAD(fd, len); WFIFOW(fd,0)=TOW(type); - + // parse packet contents SKIP_VALUE(message); while(*message != 0 && off < len){ @@ -316,12 +265,12 @@ ACMD_FUNC(send) {// find start of string if(*message == 0 || ISSPACE(*message)){ PARSE_ERROR(msg_txt(906),message); // Not a string: - return -1; + return false; } ++message; } } - + // parse string ++message; CHECK_EOS(message); @@ -346,7 +295,7 @@ ACMD_FUNC(send) CHECK_EOS(message); if(!ISXDIGIT(*message)){ PARSE_ERROR(msg_txt(907),message); // Not a hexadecimal digit: - return -1; + return false; } num=(ISDIGIT(*message)?*message-'0':TOLOWER(*message)-'a'+10); if(ISXDIGIT(*message)){ @@ -399,7 +348,7 @@ ACMD_FUNC(send) ++message; CHECK_EOS(message); } - + // terminate the string if(off < end) {// fill the rest with 0's @@ -409,11 +358,11 @@ ACMD_FUNC(send) } else {// unknown PARSE_ERROR(msg_txt(908),message); // Unknown type of value in: - return -1; + return false; } SKIP_VALUE(message); } - + if(packet_db[type].len == -1) {// send dynamic packet WFIFOW(fd,2)=TOW(off); WFIFOSET(fd,off); @@ -424,11 +373,11 @@ ACMD_FUNC(send) } } else { clif->message(fd, msg_txt(259)); // Invalid packet - return -1; + return false; } sprintf (atcmd_output, msg_txt(258), type, type); // Sent packet 0x%x (%d) clif->message(fd, atcmd_output); - return 0; + return true; #undef PARSE_ERROR #undef CHECK_EOS #undef SKIP_VALUE @@ -438,34 +387,34 @@ ACMD_FUNC(send) /*========================================== * @rura, @warp, @mapmove *------------------------------------------*/ -ACMD_FUNC(mapmove) +ACMD(mapmove) { char map_name[MAP_NAME_LENGTH_EXT]; unsigned short mapindex; short x = 0, y = 0; int16 m = -1; - + nullpo_retr(-1, sd); - + memset(map_name, '\0', sizeof(map_name)); - + if (!message || !*message || (sscanf(message, "%15s %hd %hd", map_name, &x, &y) < 3 && sscanf(message, "%15[^,],%hd,%hd", map_name, &x, &y) < 1)) { - + clif->message(fd, msg_txt(909)); // Please enter a map (usage: @warp/@rura/@mapmove ). - return -1; - } - + return false; + } + mapindex = mapindex_name2id(map_name); if (mapindex) m = map_mapindex2mapid(mapindex); - + if (!mapindex) { // m < 0 means on different server! [Kevin] clif->message(fd, msg_txt(1)); // Map not found. - return -1; + return false; } - + if ((x || y) && map_getcell(m, x, y, CELL_CHKNOPASS)) { //This is to prevent the pc_setpos call from printing an error. clif->message(fd, msg_txt(2)); @@ -474,138 +423,138 @@ ACMD_FUNC(mapmove) } if (map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(247)); - return -1; + return false; } if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); - return -1; + return false; } if (pc_setpos(sd, mapindex, x, y, CLR_TELEPORT) != 0) { clif->message(fd, msg_txt(1)); // Map not found. - return -1; + return false; } - + clif->message(fd, msg_txt(0)); // Warped. - return 0; + return true; } /*========================================== * Displays where a character is. Corrected version by Silent. [Skotlex] *------------------------------------------*/ -ACMD_FUNC(where) +ACMD(where) { struct map_session_data* pl_sd; - + nullpo_retr(-1, sd); memset(atcmd_player_name, '\0', sizeof atcmd_player_name); - + if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) { clif->message(fd, msg_txt(910)); // Please enter a player name (usage: @where ). - return -1; + return false; } - + pl_sd = map_nick2sd(atcmd_player_name); if (pl_sd == NULL || strncmp(pl_sd->status.name, atcmd_player_name, NAME_LENGTH) != 0 || (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > pc_get_group_level(sd) && !pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID)) - ) { + ) { clif->message(fd, msg_txt(3)); // Character not found. - return -1; + return false; } - + snprintf(atcmd_output, sizeof atcmd_output, "%s %s %d %d", pl_sd->status.name, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y); clif->message(fd, atcmd_output); - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(jumpto) +ACMD(jumpto) { struct map_session_data *pl_sd = NULL; - + nullpo_retr(-1, sd); - + if (!message || !*message) { clif->message(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto ). - return -1; + return false; } - + if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL) { clif->message(fd, msg_txt(3)); // Character not found. - return -1; + return false; } - + if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(247)); // You are not authorized to warp to this map. - return -1; + return false; } - + if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map. - return -1; + return false; } - + if( pc_isdead(sd) ) { clif->message(fd, msg_txt(664)); - return -1; + return false; } - + pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT); sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s clif->message(fd, atcmd_output); - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(jump) +ACMD(jump) { short x = 0, y = 0; - + nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + sscanf(message, "%hd %hd", &x, &y); - + if (map[sd->bl.m].flag.noteleport && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map. - return -1; + return false; } - + if( pc_isdead(sd) ) { clif->message(fd, msg_txt(664)); - return -1; + return false; } - + if ((x || y) && map_getcell(sd->bl.m, x, y, CELL_CHKNOPASS)) { //This is to prevent the pc_setpos call from printing an error. clif->message(fd, msg_txt(2)); if (!map_search_freecell(NULL, sd->bl.m, &x, &y, 10, 10, 1)) x = y = 0; //Invalid cell, use random spot. } - + pc_setpos(sd, sd->mapindex, x, y, CLR_TELEPORT); sprintf(atcmd_output, msg_txt(5), sd->bl.x, sd->bl.y); // Jumped to %d %d clif->message(fd, atcmd_output); - return 0; + return true; } /*========================================== * Display list of online characters with * various info. *------------------------------------------*/ -ACMD_FUNC(who) +ACMD(who) { struct map_session_data *pl_sd = NULL; struct s_mapiterator *iter = NULL; @@ -621,24 +570,24 @@ ACMD_FUNC(who) */ int display_type = 1; int map_id = -1; - + nullpo_retr(-1, sd); - + if (strstr(command, "map") != NULL) { if (sscanf(message, "%15s %23s", map_name, player_name) < 1 || (map_id = map_mapname2mapid(map_name)) < 0) map_id = sd->bl.m; } else { sscanf(message, "%23s", player_name); } - + if (strstr(command, "2") != NULL) display_type = 2; else if (strstr(command, "3") != NULL) display_type = 3; - + level = pc_get_group_level(sd); StringBuf_Init(&buf); - + iter = mapit_getallusers(); for (pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter)) { if (!((pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) || (pl_sd->sc.option & OPTION_INVISIBLE)) && pc_get_group_level(pl_sd) > level)) { // you can look only lower or same level @@ -651,7 +600,7 @@ ACMD_FUNC(who) if (pc_get_group_id(pl_sd) > 0) // Player title, if exists StringBuf_Printf(&buf, msg_txt(344), pc_group_id2name(pc_get_group_id(pl_sd))); // "(%s) " StringBuf_Printf(&buf, msg_txt(347), pl_sd->status.base_level, pl_sd->status.job_level, - job_name(pl_sd->status.class_)); // "| Lv:%d/%d | Job: %s" + job_name(pl_sd->status.class_)); // "| Lv:%d/%d | Job: %s" break; } case 3: { @@ -666,7 +615,7 @@ ACMD_FUNC(who) default: { struct party_data *p = party_search(pl_sd->status.party_id); struct guild *g = pl_sd->guild; - + StringBuf_Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s " if (pc_get_group_id(pl_sd) > 0) // Player title, if exists StringBuf_Printf(&buf, msg_txt(344), pc_group_id2name(pc_get_group_id(pl_sd))); // "(%s) " @@ -683,7 +632,7 @@ ACMD_FUNC(who) } } mapit_free(iter); - + if (map_id < 0) { if (count == 0) StringBuf_Printf(&buf, msg_txt(28)); // No player found. @@ -701,13 +650,13 @@ ACMD_FUNC(who) } clif->message(fd, StringBuf_Value(&buf)); StringBuf_Destroy(&buf); - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(whogm) +ACMD(whogm) { struct map_session_data* pl_sd; struct s_mapiterator* iter; @@ -717,28 +666,28 @@ ACMD_FUNC(whogm) char player_name[NAME_LENGTH]; struct guild *g; struct party_data *p; - + nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); memset(match_text, '\0', sizeof(match_text)); memset(player_name, '\0', sizeof(player_name)); - + if (sscanf(message, "%199[^\n]", match_text) < 1) strcpy(match_text, ""); for (j = 0; match_text[j]; j++) match_text[j] = TOLOWER(match_text[j]); - + count = 0; level = pc_get_group_level(sd); - + iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) ) { pl_level = pc_get_group_level(pl_sd); if (!pl_level) continue; - + if (match_text[0]) { memcpy(player_name, pl_sd->status.name, NAME_LENGTH); @@ -756,28 +705,28 @@ ACMD_FUNC(whogm) count++; continue; } - + sprintf(atcmd_output, msg_txt(914), // Name: %s (GM:%d) | Location: %s %d %d - pl_sd->status.name, pl_level, - mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y); + pl_sd->status.name, pl_level, + mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y); clif->message(fd, atcmd_output); - + sprintf(atcmd_output, msg_txt(915), // BLvl: %d | Job: %s (Lvl: %d) - pl_sd->status.base_level, - job_name(pl_sd->status.class_), pl_sd->status.job_level); + pl_sd->status.base_level, + job_name(pl_sd->status.class_), pl_sd->status.job_level); clif->message(fd, atcmd_output); - + p = party_search(pl_sd->status.party_id); g = pl_sd->guild; - + sprintf(atcmd_output,msg_txt(916), // Party: '%s' | Guild: '%s' - p?p->party.name:msg_txt(917), g?g->name:msg_txt(917)); // None. - + p?p->party.name:msg_txt(917), g?g->name:msg_txt(917)); // None. + clif->message(fd, atcmd_output); count++; } mapit_free(iter); - + if (count == 0) clif->message(fd, msg_txt(150)); // No GM found. else if (count == 1) @@ -786,70 +735,70 @@ ACMD_FUNC(whogm) sprintf(atcmd_output, msg_txt(152), count); // %d GMs found. clif->message(fd, atcmd_output); } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(save) +ACMD(save) { nullpo_retr(-1, sd); - + pc_setsavepoint(sd, sd->mapindex, sd->bl.x, sd->bl.y); if (sd->status.pet_id > 0 && sd->pd) intif_save_petdata(sd->status.account_id, &sd->pd->pet); - + chrif_save(sd,0); - + clif->message(fd, msg_txt(6)); // Your save point has been changed. - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(load) +ACMD(load) { int16 m; - + nullpo_retr(-1, sd); - + m = map_mapindex2mapid(sd->status.save_point.map); if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(249)); // You are not authorized to warp to your save map. - return -1; + return false; } if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map. - return -1; + return false; } - + pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_OUTSIGHT); clif->message(fd, msg_txt(7)); // Warping to save point.. - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(speed) +ACMD(speed) { int speed; - + nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if (!message || !*message || sscanf(message, "%d", &speed) < 1) { sprintf(atcmd_output, msg_txt(918), MIN_WALK_SPEED, MAX_WALK_SPEED); // Please enter a speed value (usage: @speed <%d-%d>). clif->message(fd, atcmd_output); - return -1; + return false; } - + if (speed < 0) { sd->base_status.speed = DEFAULT_WALK_SPEED; sd->state.permanent_speed = 0; // Remove lock when set back to default speed. @@ -859,100 +808,100 @@ ACMD_FUNC(speed) } status_calc_bl(&sd->bl, SCB_SPEED); clif->message(fd, msg_txt(8)); // Speed changed. - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(storage) +ACMD(storage) { nullpo_retr(-1, sd); - + if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading || sd->state.storage_flag) - return -1; - + return false; + if (storage_storageopen(sd) == 1) { //Already open. clif->message(fd, msg_txt(250)); - return -1; + return false; } - + clif->message(fd, msg_txt(919)); // Storage opened. - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(guildstorage) +ACMD(guildstorage) { nullpo_retr(-1, sd); - + if (!sd->status.guild_id) { clif->message(fd, msg_txt(252)); - return -1; + return false; } - + if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading) - return -1; - + return false; + if (sd->state.storage_flag == 1) { clif->message(fd, msg_txt(250)); - return -1; + return false; } - + if (sd->state.storage_flag == 2) { clif->message(fd, msg_txt(251)); - return -1; + return false; } - + storage_guild_storageopen(sd); clif->message(fd, msg_txt(920)); // Guild storage opened. - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(option) +ACMD(option) { int param1 = 0, param2 = 0, param3 = 0; nullpo_retr(-1, sd); - + if (!message || !*message || sscanf(message, "%d %d %d", ¶m1, ¶m2, ¶m3) < 1 || param1 < 0 || param2 < 0 || param3 < 0) {// failed to match the parameters so inform the user of the options const char* text; - + // attempt to find the setting information for this command - text = atcommand_help_string( command ); - + text = atcommand_help_string( info ); + // notify the user of the requirement to enter an option clif->message(fd, msg_txt(921)); // Please enter at least one option. - + if( text ) {// send the help text associated with this command clif->message( fd, text ); } - - return -1; + + return false; } - + sd->sc.opt1 = param1; sd->sc.opt2 = param2; pc_setoption(sd, param3); - + clif->message(fd, msg_txt(9)); // Options changed. - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(hide) +ACMD(hide) { nullpo_retr(-1, sd); if (sd->sc.option & OPTION_INVISIBLE) { @@ -962,10 +911,10 @@ ACMD_FUNC(hide) else status_set_viewdata(&sd->bl, sd->status.class_); clif->message(fd, msg_txt(10)); // Invisible: Off - + // increment the number of pvp players on the map map[sd->bl.m].users_pvp++; - + if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank ) {// register the player for ranking calculations sd->pvp_timer = add_timer( gettick() + 200, pc_calc_pvprank_timer, sd->bl.id, 0 ); @@ -976,10 +925,10 @@ ACMD_FUNC(hide) sd->sc.option |= OPTION_INVISIBLE; sd->vd.class_ = INVISIBLE_CLASS; clif->message(fd, msg_txt(11)); // Invisible: On - + // decrement the number of pvp players on the map map[sd->bl.m].users_pvp--; - + if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ) {// unregister the player for ranking delete_timer( sd->pvp_timer, pc_calc_pvprank_timer ); @@ -987,25 +936,25 @@ ACMD_FUNC(hide) } } clif->changeoption(&sd->bl); - - return 0; + + return true; } /*========================================== * Changes a character's class *------------------------------------------*/ -ACMD_FUNC(jobchange) +ACMD(jobchange) { int job = 0, upper = 0; const char* text; nullpo_retr(-1, sd); - + if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1) { int i; bool found = false; - + upper = 0; - + // Normal Jobs for( i = JOB_NOVICE; i < JOB_MAX_BASIC && !found; i++ ){ if (strncmpi(message, job_name(i), 16) == 0) { @@ -1013,7 +962,7 @@ ACMD_FUNC(jobchange) found = true; } } - + // High Jobs, Babys and Third for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){ if (strncmpi(message, job_name(i), 16) == 0) { @@ -1021,85 +970,85 @@ ACMD_FUNC(jobchange) found = true; } } - + if (!found) { - text = atcommand_help_string(command); + text = atcommand_help_string(info); if (text) clif->message(fd, text); - return -1; + return false; } } - + if (job == JOB_KNIGHT2 || job == JOB_CRUSADER2 || job == JOB_WEDDING || job == JOB_XMAS || job == JOB_SUMMER || job == JOB_LORD_KNIGHT2 || job == JOB_PALADIN2 || job == JOB_BABY_KNIGHT2 || job == JOB_BABY_CRUSADER2 || job == JOB_STAR_GLADIATOR2 - || (job >= JOB_RUNE_KNIGHT2 && job <= JOB_MECHANIC_T2) || (job >= JOB_BABY_RUNE2 && job <= JOB_BABY_MECHANIC2) - ) // Deny direct transformation into dummy jobs - {clif->message(fd, msg_txt(923)); //"You can not change to this job by command." - return 0;} - + || (job >= JOB_RUNE_KNIGHT2 && job <= JOB_MECHANIC_T2) || (job >= JOB_BABY_RUNE2 && job <= JOB_BABY_MECHANIC2) + ) // Deny direct transformation into dummy jobs + {clif->message(fd, msg_txt(923)); //"You can not change to this job by command." + return true;} + if (pcdb_checkid(job)) { if (pc_jobchange(sd, job, upper) == 0) clif->message(fd, msg_txt(12)); // Your job has been changed. else { clif->message(fd, msg_txt(155)); // You are unable to change your job. - return -1; + return false; } } else { - text = atcommand_help_string(command); + text = atcommand_help_string(info); if (text) clif->message(fd, text); - return -1; + return false; } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(kill) +ACMD(kill) { nullpo_retr(-1, sd); status_kill(&sd->bl); clif->message(sd->fd, msg_txt(13)); // A pity! You've died. if (fd != sd->fd) clif->message(fd, msg_txt(14)); // Character killed. - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(alive) +ACMD(alive) { nullpo_retr(-1, sd); if (!status_revive(&sd->bl, 100, 100)) { clif->message(fd, msg_txt(667)); - return -1; + return false; } clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1); clif->message(fd, msg_txt(16)); // You've been revived! It's a miracle! - return 0; + return true; } /*========================================== * +kamic [LuzZza] *------------------------------------------*/ -ACMD_FUNC(kami) +ACMD(kami) { unsigned long color=0; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if(*(command + 5) != 'c' && *(command + 5) != 'C') { if (!message || !*message) { clif->message(fd, msg_txt(980)); // Please enter a message (usage: @kami ). - return -1; + return false; } - + sscanf(message, "%199[^\n]", atcmd_output); if (strstr(command, "l") != NULL) clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, ALL_SAMEMAP); @@ -1108,22 +1057,22 @@ ACMD_FUNC(kami) } else { if(!message || !*message || (sscanf(message, "%lx %199[^\n]", &color, atcmd_output) < 2)) { clif->message(fd, msg_txt(981)); // Please enter color and message (usage: @kamic ). - return -1; + return false; } - + if(color > 0xFFFFFF) { clif->message(fd, msg_txt(982)); // Invalid color. - return -1; + return false; } intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0); } - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(heal) +ACMD(heal) { int hp = 0, sp = 0; // [Valaris] thanks to fov nullpo_retr(-1, sd); @@ -1133,30 +1082,30 @@ ACMD_FUNC(heal) // some overflow checks if( hp == INT_MIN ) hp++; if( sp == INT_MIN ) sp++; - + if ( hp == 0 && sp == 0 ) { if (!status_percent_heal(&sd->bl, 100, 100)) clif->message(fd, msg_txt(157)); // HP and SP have already been recovered. else clif->message(fd, msg_txt(17)); // HP, SP recovered. - return 0; + return true; } - + if ( hp > 0 && sp >= 0 ) { if(!status_heal(&sd->bl, hp, sp, 0)) clif->message(fd, msg_txt(157)); // HP and SP are already with the good value. else clif->message(fd, msg_txt(17)); // HP, SP recovered. - return 0; + return true; } - + if ( hp < 0 && sp <= 0 ) { status_damage(NULL, &sd->bl, -hp, -sp, 0, 0); clif->damage(&sd->bl,&sd->bl, gettick(), 0, 0, -hp, 0, 4, 0); clif->message(fd, msg_txt(156)); // HP or/and SP modified. - return 0; + return true; } - + //Opposing signs. if ( hp ) { if (hp > 0) @@ -1166,22 +1115,22 @@ ACMD_FUNC(heal) clif->damage(&sd->bl,&sd->bl, gettick(), 0, 0, -hp, 0, 4, 0); } } - + if ( sp ) { if (sp > 0) status_heal(&sd->bl, 0, sp, 0); else status_damage(NULL, &sd->bl, 0, -sp, 0, 0); } - + clif->message(fd, msg_txt(156)); // HP or/and SP modified. - return 0; + return true; } /*========================================== * @item command (usage: @item ) (modified by [Yor] for pet_egg) *------------------------------------------*/ -ACMD_FUNC(item) +ACMD(item) { char item_name[100]; int number = 0, item_id, flag = 0; @@ -1189,54 +1138,54 @@ ACMD_FUNC(item) struct item_data *item_data; int get_count, i; nullpo_retr(-1, sd); - + memset(item_name, '\0', sizeof(item_name)); - + if (!message || !*message || ( - sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && - sscanf(message, "%99s %d", item_name, &number) < 1 - )) { + sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && + sscanf(message, "%99s %d", item_name, &number) < 1 + )) { clif->message(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item ). - return -1; + return false; } - + if (number <= 0) number = 1; - + if ((item_data = itemdb_searchname(item_name)) == NULL && (item_data = itemdb_exists(atoi(item_name))) == NULL) { clif->message(fd, msg_txt(19)); // Invalid item ID or name. - return -1; + return false; } - + item_id = item_data->nameid; get_count = number; //Check if it's stackable. if (!itemdb_isstackable2(item_data)) get_count = 1; - + for (i = 0; i < number; i += get_count) { // if not pet egg if (!pet_create_egg(sd, item_id)) { memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; - + if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif->additem(sd, 0, 0, flag); } } - + if (flag == 0) clif->message(fd, msg_txt(18)); // Item created. - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(item2) +ACMD(item2) { struct item item_tmp; struct item_data *item_data; @@ -1245,26 +1194,26 @@ ACMD_FUNC(item2) int identify = 0, refine = 0, attr = 0; int c1 = 0, c2 = 0, c3 = 0, c4 = 0; nullpo_retr(-1, sd); - + memset(item_name, '\0', sizeof(item_name)); - + if (!message || !*message || ( - sscanf(message, "\"%99[^\"]\" %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 && - sscanf(message, "%99s %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 - )) { + sscanf(message, "\"%99[^\"]\" %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 && + sscanf(message, "%99s %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 + )) { clif->message(fd, msg_txt(984)); // Please enter all parameters (usage: @item2 clif->message(fd, msg_txt(985)); // ). - return -1; + return false; } - + if (number <= 0) number = 1; - + item_id = 0; if ((item_data = itemdb_searchname(item_name)) != NULL || (item_data = itemdb_exists(atoi(item_name))) != NULL) item_id = item_data->nameid; - + if (item_id > 500) { int flag = 0; int loop, get_count, i; @@ -1299,59 +1248,59 @@ ACMD_FUNC(item2) if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif->additem(sd, 0, 0, flag); } - + if (flag == 0) clif->message(fd, msg_txt(18)); // Item created. } else { clif->message(fd, msg_txt(19)); // Invalid item ID or name. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(itemreset) +ACMD(itemreset) { int i; nullpo_retr(-1, sd); - + for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) { pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_COMMAND); } } clif->message(fd, msg_txt(20)); // All of your items have been removed. - - return 0; + + return true; } /*========================================== * Atcommand @lvlup *------------------------------------------*/ -ACMD_FUNC(baselevelup) +ACMD(baselevelup) { int level=0, i=0, status_point=0; nullpo_retr(-1, sd); level = atoi(message); - + if (!message || !*message || !level) { clif->message(fd, msg_txt(986)); // Please enter a level adjustment (usage: @lvup/@blevel/@baselvlup ). - return -1; + return false; } - + if (level > 0) { if (sd->status.base_level >= pc_maxbaselv(sd)) { // check for max level by Valaris clif->message(fd, msg_txt(47)); // Base level can't go any higher. - return -1; + return false; } // End Addition if ((unsigned int)level > pc_maxbaselv(sd) || (unsigned int)level > pc_maxbaselv(sd) - sd->status.base_level) // fix positiv overflow level = pc_maxbaselv(sd) - sd->status.base_level; for (i = 0; i < level; i++) status_point += pc_gets_status_point(sd->status.base_level + i); - + sd->status.status_point += status_point; sd->status.base_level += (unsigned int)level; status_percent_heal(&sd->bl, 100, 100); @@ -1360,7 +1309,7 @@ ACMD_FUNC(baselevelup) } else { if (sd->status.base_level == 1) { clif->message(fd, msg_txt(158)); // Base level can't go any lower. - return -1; + return false; } level*=-1; if ((unsigned int)level >= sd->status.base_level) @@ -1385,27 +1334,27 @@ ACMD_FUNC(baselevelup) pc_baselevelchanged(sd); if(sd->status.party_id) party_send_levelup(sd); - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(joblevelup) +ACMD(joblevelup) { int level=0; nullpo_retr(-1, sd); - + level = atoi(message); - + if (!message || !*message || !level) { clif->message(fd, msg_txt(987)); // Please enter a level adjustment (usage: @joblvup/@jlevel/@joblvlup ). - return -1; + return false; } if (level > 0) { if (sd->status.job_level >= pc_maxjoblv(sd)) { clif->message(fd, msg_txt(23)); // Job level can't go any higher. - return -1; + return false; } if ((unsigned int)level > pc_maxjoblv(sd) || (unsigned int)level > pc_maxjoblv(sd) - sd->status.job_level) // fix positiv overflow level = pc_maxjoblv(sd) - sd->status.job_level; @@ -1416,7 +1365,7 @@ ACMD_FUNC(joblevelup) } else { if (sd->status.job_level == 1) { clif->message(fd, msg_txt(159)); // Job level can't go any lower. - return -1; + return false; } level *=-1; if ((unsigned int)level >= sd->status.job_level) // fix negativ overflow @@ -1436,60 +1385,54 @@ ACMD_FUNC(joblevelup) clif->updatestatus(sd, SP_NEXTJOBEXP); clif->updatestatus(sd, SP_SKILLPOINT); status_calc_pc(sd, 0); - - return 0; + + return true; } /*========================================== * @help *------------------------------------------*/ -ACMD_FUNC(help) -{ - config_setting_t *help; - const char *text = NULL; +ACMD(help) { const char *command_name = NULL; char *default_command = "help"; - + AtCommandInfo *tinfo = NULL; + nullpo_retr(-1, sd); - - help = config_lookup(&atcommand_config, "help"); - if (help == NULL) { - clif->message(fd, msg_txt(27)); // "Commands help is not available." - return -1; - } - + if (!message || !*message) { command_name = default_command; // If no command_name specified, display help for @help. } else { - if (*message == atcommand_symbol || *message == charcommand_symbol) + if (*message == atcommand->at_symbol || *message == atcommand->char_symbol) ++message; command_name = atcommand_checkalias(message); } - - if (!pc_can_use_command(sd, command_name, COMMAND_ATCOMMAND)) { + + if (!atcommand->can_use2(sd, command_name, COMMAND_ATCOMMAND)) { sprintf(atcmd_output, msg_txt(153), message); // "%s is Unknown Command" clif->message(fd, atcmd_output); atcommand_get_suggestions(sd, command_name, true); - return -1; + return false; } - - if (!config_setting_lookup_string(help, command_name, &text)) { - sprintf(atcmd_output, msg_txt(988), atcommand_symbol, command_name); // There is no help for %c%s. + + tinfo = get_atcommandinfo_byname(atcommand_checkalias(command_name)); + + if ( !tinfo || tinfo->help == NULL ) { + sprintf(atcmd_output, msg_txt(988), atcommand->at_symbol, command_name); // There is no help for %c%s. clif->message(fd, atcmd_output); atcommand_get_suggestions(sd, command_name, true); - return -1; + return false; } - - sprintf(atcmd_output, msg_txt(989), atcommand_symbol, command_name); // Help for command %c%s: + + sprintf(atcmd_output, msg_txt(989), atcommand->at_symbol, command_name); // Help for command %c%s: clif->message(fd, atcmd_output); - + { // Display aliases DBIterator* iter; AtCommandInfo *command_info; AliasInfo *alias_info = NULL; StringBuf buf; bool has_aliases = false; - + StringBuf_Init(&buf); StringBuf_AppendStr(&buf, msg_txt(990)); // Available aliases: command_info = get_atcommandinfo_byname(command_name); @@ -1505,10 +1448,10 @@ ACMD_FUNC(help) clif->message(fd, StringBuf_Value(&buf)); StringBuf_Destroy(&buf); } - + // Display help contents - clif->message(fd, text); - return 0; + clif->message(fd, tinfo->help); + return true; } // helper function, used in foreach calls to stop auto-attack timers @@ -1538,18 +1481,18 @@ static int atcommand_pvpoff_sub(struct block_list *bl,va_list ap) return 0; } -ACMD_FUNC(pvpoff) +ACMD(pvpoff) { nullpo_retr(-1, sd); - + if (!map[sd->bl.m].flag.pvp) { clif->message(fd, msg_txt(160)); // PvP is already Off. - return -1; + return false; } - + map_zone_change2(sd->bl.m,map[sd->bl.m].prev_zone); map[sd->bl.m].flag.pvp = 0; - + if (!battle_config.pk_mode) { clif->map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); @@ -1557,7 +1500,7 @@ ACMD_FUNC(pvpoff) map_foreachinmap(atcommand_pvpoff_sub,sd->bl.m, BL_PC); map_foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0); clif->message(fd, msg_txt(31)); // PvP: Off. - return 0; + return true; } /*========================================== @@ -1577,61 +1520,61 @@ static int atcommand_pvpon_sub(struct block_list *bl,va_list ap) return 0; } -ACMD_FUNC(pvpon) +ACMD(pvpon) { nullpo_retr(-1, sd); - + if (map[sd->bl.m].flag.pvp) { clif->message(fd, msg_txt(161)); // PvP is already On. - return -1; + return false; } map_zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_PVP_NAME)); map[sd->bl.m].flag.pvp = 1; - + if (!battle_config.pk_mode) {// display pvp circle and rank clif->map_property_mapall(sd->bl.m, MAPPROPERTY_FREEPVPZONE); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); map_foreachinmap(atcommand_pvpon_sub,sd->bl.m, BL_PC); } - + clif->message(fd, msg_txt(32)); // PvP: On. - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(gvgoff) +ACMD(gvgoff) { nullpo_retr(-1, sd); - + if (!map[sd->bl.m].flag.gvg) { clif->message(fd, msg_txt(162)); // GvG is already Off. - return -1; + return false; } - + map_zone_change2(sd->bl.m,map[sd->bl.m].prev_zone); map[sd->bl.m].flag.gvg = 0; clif->map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); map_foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0); clif->message(fd, msg_txt(33)); // GvG: Off. - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(gvgon) +ACMD(gvgon) { nullpo_retr(-1, sd); - + if (map[sd->bl.m].flag.gvg) { clif->message(fd, msg_txt(163)); // GvG is already On. - return -1; + return false; } map_zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_GVG_NAME)); @@ -1639,133 +1582,133 @@ ACMD_FUNC(gvgon) clif->map_property_mapall(sd->bl.m, MAPPROPERTY_AGITZONE); clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP); clif->message(fd, msg_txt(34)); // GvG: On. - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(model) +ACMD(model) { int hair_style = 0, hair_color = 0, cloth_color = 0; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if (!message || !*message || sscanf(message, "%d %d %d", &hair_style, &hair_color, &cloth_color) < 1) { sprintf(atcmd_output, msg_txt(991), // Please enter at least one value (usage: @model ). MIN_HAIR_STYLE, MAX_HAIR_STYLE, MIN_HAIR_COLOR, MAX_HAIR_COLOR, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); clif->message(fd, atcmd_output); - return -1; + return false; } - + if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE && hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR && cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) { - pc_changelook(sd, LOOK_HAIR, hair_style); - pc_changelook(sd, LOOK_HAIR_COLOR, hair_color); - pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color); - clif->message(fd, msg_txt(36)); // Appearence changed. + pc_changelook(sd, LOOK_HAIR, hair_style); + pc_changelook(sd, LOOK_HAIR_COLOR, hair_color); + pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color); + clif->message(fd, msg_txt(36)); // Appearence changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * @dye && @ccolor *------------------------------------------*/ -ACMD_FUNC(dye) +ACMD(dye) { int cloth_color = 0; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if (!message || !*message || sscanf(message, "%d", &cloth_color) < 1) { sprintf(atcmd_output, msg_txt(992), MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); // Please enter a clothes color (usage: @dye/@ccolor ). clif->message(fd, atcmd_output); - return -1; + return false; } - + if (cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) { pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color); clif->message(fd, msg_txt(36)); // Appearence changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * @hairstyle && @hstyle *------------------------------------------*/ -ACMD_FUNC(hair_style) +ACMD(hair_style) { int hair_style = 0; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if (!message || !*message || sscanf(message, "%d", &hair_style) < 1) { sprintf(atcmd_output, msg_txt(993), MIN_HAIR_STYLE, MAX_HAIR_STYLE); // Please enter a hair style (usage: @hairstyle/@hstyle ). clif->message(fd, atcmd_output); - return -1; + return false; } - + if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) { - pc_changelook(sd, LOOK_HAIR, hair_style); - clif->message(fd, msg_txt(36)); // Appearence changed. + pc_changelook(sd, LOOK_HAIR, hair_style); + clif->message(fd, msg_txt(36)); // Appearence changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * @haircolor && @hcolor *------------------------------------------*/ -ACMD_FUNC(hair_color) +ACMD(hair_color) { int hair_color = 0; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if (!message || !*message || sscanf(message, "%d", &hair_color) < 1) { sprintf(atcmd_output, msg_txt(994), MIN_HAIR_COLOR, MAX_HAIR_COLOR); // Please enter a hair color (usage: @haircolor/@hcolor ). clif->message(fd, atcmd_output); - return -1; + return false; } - + if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) { - pc_changelook(sd, LOOK_HAIR_COLOR, hair_color); - clif->message(fd, msg_txt(36)); // Appearence changed. + pc_changelook(sd, LOOK_HAIR_COLOR, hair_color); + clif->message(fd, msg_txt(36)); // Appearence changed. } else { clif->message(fd, msg_txt(37)); // An invalid number was specified. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * @go [city_number or city_name] - Updated by Harbin *------------------------------------------*/ -ACMD_FUNC(go) +ACMD(go) { int i; int town; char map_name[MAP_NAME_LENGTH]; int16 m; - + const struct { char map[MAP_NAME_LENGTH]; int x, y; @@ -1811,37 +1754,32 @@ ACMD_FUNC(go) { MAP_MALAYA, 242, 211 }, // 34=Malaya Port { MAP_ECLAGE, 110, 39 }, // 35=Eclage }; - + nullpo_retr(-1, sd); - - if( map[sd->bl.m].flag.nogo && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE) ) { - clif->message(sd->fd,msg_txt(995)); // You cannot use @go on this map. - return 0; - } - + memset(map_name, '\0', sizeof(map_name)); memset(atcmd_output, '\0', sizeof(atcmd_output)); - + // get the number town = atoi(message); - + if (!message || !*message || sscanf(message, "%11s", map_name) < 1 || town < 0 || town >= ARRAYLENGTH(data)) {// no value matched so send the list of locations const char* text; - + // attempt to find the text help string - text = atcommand_help_string( command ); - + text = atcommand_help_string( info ); + clif->message(fd, msg_txt(38)); // Invalid location number, or name. - + if( text ) {// send the text to the client clif->message( fd, text ); } - - return -1; + + return false; } - + // get possible name of the city map_name[MAP_NAME_LENGTH-1] = '\0'; for (i = 0; map_name[i]; i++) @@ -1930,36 +1868,36 @@ ACMD_FUNC(go) } else if (strncmp(map_name, "eclage", 3) == 0) { town = 35; } - + if (town >= 0 && town < ARRAYLENGTH(data)) { m = map_mapname2mapid(data[town].map); if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(247)); - return -1; + return false; } if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(248)); - return -1; + return false; } if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) { clif->message(fd, msg_txt(0)); // Warped. } else { clif->message(fd, msg_txt(1)); // Map not found. - return -1; + return false; } } else { // if you arrive here, you have an error in town variable when reading of names clif->message(fd, msg_txt(38)); // Invalid location number or name. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(monster) +ACMD(monster) { char name[NAME_LENGTH]; char monster[NAME_LENGTH]; @@ -1971,14 +1909,14 @@ ACMD_FUNC(monster) short mx, my; unsigned int size; nullpo_retr(-1, sd); - + memset(name, '\0', sizeof(name)); memset(monster, '\0', sizeof(monster)); memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if (!message || !*message) { - clif->message(fd, msg_txt(80)); // Give the display name or monster name/id please. - return -1; + clif->message(fd, msg_txt(80)); // Give the display name or monster name/id please. + return false; } if (sscanf(message, "\"%23[^\"]\" %23s %d", name, monster, &number) > 1 || sscanf(message, "%23s \"%23[^\"]\" %d", monster, name, &number) > 1) { @@ -1994,42 +1932,42 @@ ACMD_FUNC(monster) name[0] = '\0'; } else { clif->message(fd, msg_txt(80)); // Give a display name and monster name/id please. - return -1; + return false; } - + if ((mob_id = mobdb_searchname(monster)) == 0) // check name first (to avoid possible name begining by a number) mob_id = mobdb_checkid(atoi(monster)); - + if (mob_id == 0) { clif->message(fd, msg_txt(40)); // Invalid monster ID or name. - return -1; + return false; } - + if (mob_id == MOBID_EMPERIUM) { clif->message(fd, msg_txt(83)); // Monster 'Emperium' cannot be spawned. - return -1; + return false; } - + if (number <= 0) number = 1; - + if( !name[0] ) strcpy(name, "--ja--"); - + // If value of atcommand_spawn_quantity_limit directive is greater than or equal to 1 and quantity of monsters is greater than value of the directive if (battle_config.atc_spawn_quantity_limit && number > battle_config.atc_spawn_quantity_limit) number = battle_config.atc_spawn_quantity_limit; - + if (strcmp(command+1, "monstersmall") == 0) size = SZ_MEDIUM; // This is just gorgeous [mkbu95] else if (strcmp(command+1, "monsterbig") == 0) size = SZ_BIG; else size = SZ_SMALL; - + if (battle_config.etc_log) ShowInfo("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, sd->bl.x, sd->bl.y); - + count = 0; range = (int)sqrt((float)number) +2; // calculation of an odd number (+ 4 area around) for (i = 0; i < number; i++) { @@ -2037,7 +1975,7 @@ ACMD_FUNC(monster) k = mob_once_spawn(sd, sd->bl.m, mx, my, name, mob_id, 1, eventname, size, AI_NONE); count += (k != 0) ? 1 : 0; } - + if (count != 0) if (number == count) clif->message(fd, msg_txt(39)); // All monster summoned! @@ -2045,12 +1983,12 @@ ACMD_FUNC(monster) sprintf(atcmd_output, msg_txt(240), count); // %d monster(s) summoned! clif->message(fd, atcmd_output); } - else { - clif->message(fd, msg_txt(40)); // Invalid monster ID or name. - return -1; - } - - return 0; + else { + clif->message(fd, msg_txt(40)); // Invalid monster ID or name. + return false; + } + + return true; } /*========================================== @@ -2060,13 +1998,13 @@ static int atkillmonster_sub(struct block_list *bl, va_list ap) { struct mob_data *md; int flag; - + nullpo_ret(md=(struct mob_data *)bl); flag = va_arg(ap, int); - + if (md->guardian_data) return 0; //Do not touch WoE mobs! - + if (flag) status_zap(bl,md->status.hp, 0); else @@ -2074,41 +2012,41 @@ static int atkillmonster_sub(struct block_list *bl, va_list ap) return 1; } -ACMD_FUNC(killmonster) +ACMD(killmonster) { int map_id, drop_flag; char map_name[MAP_NAME_LENGTH_EXT]; nullpo_retr(-1, sd); - + memset(map_name, '\0', sizeof(map_name)); - + if (!message || !*message || sscanf(message, "%15s", map_name) < 1) map_id = sd->bl.m; else { if ((map_id = map_mapname2mapid(map_name)) < 0) map_id = sd->bl.m; } - + drop_flag = strcmp(command+1, "killmonster2"); - + map_foreachinmap(atkillmonster_sub, map_id, BL_MOB, -drop_flag); - + clif->message(fd, msg_txt(165)); // All monsters killed! - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(refine) +ACMD(refine) { int i,j, position = 0, refine = 0, current_position, final_refine; int count; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if (!message || !*message || sscanf(message, "%d %d", &position, &refine) < 2) { clif->message(fd, msg_txt(996)); // Please enter a position and an amount (usage: @refine <+/- amount>). sprintf(atcmd_output, msg_txt(997), EQP_HEAD_LOW); // %d: Lower Headgear @@ -2131,11 +2069,11 @@ ACMD_FUNC(refine) clif->message(fd, atcmd_output); sprintf(atcmd_output, msg_txt(1006), EQP_HEAD_MID); // %d: Mid Headgear clif->message(fd, atcmd_output); - return -1; + return false; } - + refine = cap_value(refine, -MAX_REFINE, MAX_REFINE); - + count = 0; for (j = 0; j < EQI_MAX-1; j++) { if ((i = sd->equip_index[j]) < 0) @@ -2146,10 +2084,10 @@ ACMD_FUNC(refine) continue; if(j == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == i || sd->equip_index[EQI_HEAD_LOW] == i)) continue; - + if(position && !(sd->status.inventory[i].equip & position)) continue; - + final_refine = cap_value(sd->status.inventory[i].refine + refine, 0, MAX_REFINE); if (sd->status.inventory[i].refine != final_refine) { sd->status.inventory[i].refine = final_refine; @@ -2163,7 +2101,7 @@ ACMD_FUNC(refine) count++; } } - + if (count == 0) clif->message(fd, msg_txt(166)); // No item has been refined. else if (count == 1) @@ -2172,40 +2110,40 @@ ACMD_FUNC(refine) sprintf(atcmd_output, msg_txt(168), count); // %d items have been refined. clif->message(fd, atcmd_output); } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(produce) +ACMD(produce) { char item_name[100]; int item_id, attribute = 0, star = 0; struct item_data *item_data; struct item tmp_item; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); memset(item_name, '\0', sizeof(item_name)); - + if (!message || !*message || ( - sscanf(message, "\"%99[^\"]\" %d %d", item_name, &attribute, &star) < 1 && - sscanf(message, "%99s %d %d", item_name, &attribute, &star) < 1 - )) { + sscanf(message, "\"%99[^\"]\" %d %d", item_name, &attribute, &star) < 1 && + sscanf(message, "%99s %d %d", item_name, &attribute, &star) < 1 + )) { clif->message(fd, msg_txt(1007)); // Please enter at least one item name/ID (usage: @produce <# of very's>). - return -1; + return false; } - + if ( (item_data = itemdb_searchname(item_name)) == NULL && - (item_data = itemdb_exists(atoi(item_name))) == NULL ) { + (item_data = itemdb_exists(atoi(item_name))) == NULL ) { clif->message(fd, msg_txt(170)); //This item is not an equipment. - return -1; + return false; } - + item_id = item_data->nameid; - + if (itemdb_isequip2(item_data)) { int flag = 0; if (attribute < MIN_ATTRIBUTE || attribute > MAX_ATTRIBUTE) @@ -2218,33 +2156,33 @@ ACMD_FUNC(produce) tmp_item.identify = 1; tmp_item.card[0] = CARD0_FORGE; tmp_item.card[1] = item_data->type==IT_WEAPON? - ((star*5) << 8) + attribute:0; + ((star*5) << 8) + attribute:0; tmp_item.card[2] = GetWord(sd->status.char_id, 0); tmp_item.card[3] = GetWord(sd->status.char_id, 1); clif->produce_effect(sd, 0, item_id); clif->misceffect(&sd->bl, 3); - + if ((flag = pc_additem(sd, &tmp_item, 1, LOG_TYPE_COMMAND))) clif->additem(sd, 0, 0, flag); } else { sprintf(atcmd_output, msg_txt(169), item_id, item_data->name); // The item (%d: '%s') is not equipable. clif->message(fd, atcmd_output); - return -1; + return false; } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(memo) +ACMD(memo) { int position = 0; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if( !message || !*message || sscanf(message, "%d", &position) < 1 ) { int i; @@ -2257,78 +2195,78 @@ ACMD_FUNC(memo) sprintf(atcmd_output, msg_txt(171), i); // %d - void clif->message(sd->fd, atcmd_output); } - return 0; + return true; } - + if( position < 0 || position >= MAX_MEMOPOINTS ) { sprintf(atcmd_output, msg_txt(1008), 0, MAX_MEMOPOINTS-1); // Please enter a valid position (usage: @memo ). clif->message(fd, atcmd_output); - return -1; + return false; } - + pc_memo(sd, position); - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(gat) +ACMD(gat) { int y; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + for (y = 2; y >= -2; y--) { sprintf(atcmd_output, "%s (x= %d, y= %d) %02X %02X %02X %02X %02X", - map[sd->bl.m].name, sd->bl.x - 2, sd->bl.y + y, - map_getcell(sd->bl.m, sd->bl.x - 2, sd->bl.y + y, CELL_GETTYPE), - map_getcell(sd->bl.m, sd->bl.x - 1, sd->bl.y + y, CELL_GETTYPE), - map_getcell(sd->bl.m, sd->bl.x, sd->bl.y + y, CELL_GETTYPE), - map_getcell(sd->bl.m, sd->bl.x + 1, sd->bl.y + y, CELL_GETTYPE), - map_getcell(sd->bl.m, sd->bl.x + 2, sd->bl.y + y, CELL_GETTYPE)); - + map[sd->bl.m].name, sd->bl.x - 2, sd->bl.y + y, + map_getcell(sd->bl.m, sd->bl.x - 2, sd->bl.y + y, CELL_GETTYPE), + map_getcell(sd->bl.m, sd->bl.x - 1, sd->bl.y + y, CELL_GETTYPE), + map_getcell(sd->bl.m, sd->bl.x, sd->bl.y + y, CELL_GETTYPE), + map_getcell(sd->bl.m, sd->bl.x + 1, sd->bl.y + y, CELL_GETTYPE), + map_getcell(sd->bl.m, sd->bl.x + 2, sd->bl.y + y, CELL_GETTYPE)); + clif->message(fd, atcmd_output); } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(displaystatus) +ACMD(displaystatus) { int i, type, flag, tick, val1 = 0, val2 = 0, val3 = 0; nullpo_retr(-1, sd); - + if (!message || !*message || (i = sscanf(message, "%d %d %d %d %d %d", &type, &flag, &tick, &val1, &val2, &val3)) < 1) { clif->message(fd, msg_txt(1009)); // Please enter a status type/flag (usage: @displaystatus { { {}}}). - return -1; + return false; } if (i < 2) flag = 1; if (i < 3) tick = 0; - + clif->status_change(&sd->bl, type, flag, tick, val1, val2, val3); - - return 0; + + return true; } /*========================================== * @stpoint (Rewritten by [Yor]) *------------------------------------------*/ -ACMD_FUNC(statuspoint) +ACMD(statuspoint) { int point; unsigned int new_status_point; - + if (!message || !*message || (point = atoi(message)) == 0) { clif->message(fd, msg_txt(1010)); // Please enter a number (usage: @stpoint ). - return -1; + return false; } - + if(point < 0) { if(sd->status.status_point < (unsigned int)(-point)) @@ -2348,7 +2286,7 @@ ACMD_FUNC(statuspoint) { new_status_point = sd->status.status_point + point; } - + if (new_status_point != sd->status.status_point) { sd->status.status_point = new_status_point; clif->updatestatus(sd, SP_STATUSPOINT); @@ -2358,26 +2296,26 @@ ACMD_FUNC(statuspoint) clif->message(fd, msg_txt(41)); // Unable to decrease the number/value. else clif->message(fd, msg_txt(149)); // Unable to increase the number/value. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * @skpoint (Rewritten by [Yor]) *------------------------------------------*/ -ACMD_FUNC(skillpoint) +ACMD(skillpoint) { int point; unsigned int new_skill_point; nullpo_retr(-1, sd); - + if (!message || !*message || (point = atoi(message)) == 0) { clif->message(fd, msg_txt(1011)); // Please enter a number (usage: @skpoint ). - return -1; + return false; } - + if(point < 0) { if(sd->status.skill_point < (unsigned int)(-point)) @@ -2397,7 +2335,7 @@ ACMD_FUNC(skillpoint) { new_skill_point = sd->status.skill_point + point; } - + if (new_skill_point != sd->status.skill_point) { sd->status.skill_point = new_skill_point; clif->updatestatus(sd, SP_SKILLPOINT); @@ -2407,75 +2345,75 @@ ACMD_FUNC(skillpoint) clif->message(fd, msg_txt(41)); // Unable to decrease the number/value. else clif->message(fd, msg_txt(149)); // Unable to increase the number/value. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * @zeny *------------------------------------------*/ -ACMD_FUNC(zeny) +ACMD(zeny) { int zeny=0, ret=-1; nullpo_retr(-1, sd); - + if (!message || !*message || (zeny = atoi(message)) == 0) { clif->message(fd, msg_txt(1012)); // Please enter an amount (usage: @zeny ). - return -1; + return false; } - + if(zeny > 0){ if((ret=pc_getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL)) == 1) - clif->message(fd, msg_txt(149)); // Unable to increase the number/value. + clif->message(fd, msg_txt(149)); // Unable to increase the number/value. } else { if( sd->status.zeny < -zeny ) zeny = -sd->status.zeny; if((ret=pc_payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL)) == 1) - clif->message(fd, msg_txt(41)); // Unable to decrease the number/value. + clif->message(fd, msg_txt(41)); // Unable to decrease the number/value. } if(!ret) clif->message(fd, msg_txt(176)); //ret=0 mean cmd success - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(param) +ACMD(param) { int i, value = 0, new_value, max; const char* param[] = { "str", "agi", "vit", "int", "dex", "luk" }; short* status[6]; //we don't use direct initialization because it isn't part of the c standard. nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); - + if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0) { clif->message(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>). - return -1; + return false; } - + ARR_FIND( 0, ARRAYLENGTH(param), i, strcmpi(command+1, param[i]) == 0 ); - + if( i == ARRAYLENGTH(param) || i > MAX_STATUS_TYPE) { // normally impossible... clif->message(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>). - return -1; + return false; } - + status[0] = &sd->status.str; status[1] = &sd->status.agi; status[2] = &sd->status.vit; status[3] = &sd->status.int_; status[4] = &sd->status.dex; status[5] = &sd->status.luk; - + if( battle_config.atcommand_max_stat_bypass ) max = SHRT_MAX; else max = pc_maxparameter(sd); - + if(value < 0 && *status[i] <= -value) { new_value = 1; } else if(max - *status[i] < value) { @@ -2483,7 +2421,7 @@ ACMD_FUNC(param) } else { new_value = *status[i] + value; } - + if (new_value != *status[i]) { *status[i] = new_value; clif->updatestatus(sd, SP_STR + i); @@ -2495,29 +2433,29 @@ ACMD_FUNC(param) clif->message(fd, msg_txt(41)); // Unable to decrease the number/value. else clif->message(fd, msg_txt(149)); // Unable to increase the number/value. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * Stat all by fritz (rewritten by [Yor]) *------------------------------------------*/ -ACMD_FUNC(stat_all) +ACMD(stat_all) { int index, count, value, max, new_value; short* status[6]; //we don't use direct initialization because it isn't part of the c standard. nullpo_retr(-1, sd); - + status[0] = &sd->status.str; status[1] = &sd->status.agi; status[2] = &sd->status.vit; status[3] = &sd->status.int_; status[4] = &sd->status.dex; status[5] = &sd->status.luk; - + if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0) { value = pc_maxparameter(sd); max = pc_maxparameter(sd); @@ -2527,17 +2465,17 @@ ACMD_FUNC(stat_all) else max = pc_maxparameter(sd); } - + count = 0; for (index = 0; index < ARRAYLENGTH(status); index++) { - + if (value > 0 && *status[index] > max - value) new_value = max; else if (value < 0 && *status[index] <= -value) new_value = 1; else new_value = *status[index] +value; - + if (new_value != (int)*status[index]) { *status[index] = new_value; clif->updatestatus(sd, SP_STR + index); @@ -2545,7 +2483,7 @@ ACMD_FUNC(stat_all) count++; } } - + if (count > 0) { // if at least 1 stat modified status_calc_pc(sd, 0); clif->message(fd, msg_txt(84)); // All stats changed! @@ -2554,268 +2492,268 @@ ACMD_FUNC(stat_all) clif->message(fd, msg_txt(177)); // You cannot decrease that stat anymore. else clif->message(fd, msg_txt(178)); // You cannot increase that stat anymore. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(guildlevelup) +ACMD(guildlevelup) { int level = 0; short added_level; struct guild *guild_info; nullpo_retr(-1, sd); - + if (!message || !*message || sscanf(message, "%d", &level) < 1 || level == 0) { clif->message(fd, msg_txt(1014)); // Please enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>). - return -1; + return false; } - + if (sd->status.guild_id <= 0 || (guild_info = sd->guild) == NULL) { clif->message(fd, msg_txt(43)); // You're not in a guild. - return -1; + return false; } //if (strcmp(sd->status.name, guild_info->master) != 0) { // clif->message(fd, msg_txt(44)); // You're not the master of your guild. - // return -1; + // return false; //} - + added_level = (short)level; if (level > 0 && (level > MAX_GUILDLEVEL || added_level > ((short)MAX_GUILDLEVEL - guild_info->guild_lv))) // fix positiv overflow added_level = (short)MAX_GUILDLEVEL - guild_info->guild_lv; else if (level < 0 && (level < -MAX_GUILDLEVEL || added_level < (1 - guild_info->guild_lv))) // fix negativ overflow added_level = 1 - guild_info->guild_lv; - + if (added_level != 0) { intif_guild_change_basicinfo(guild_info->guild_id, GBI_GUILDLV, &added_level, sizeof(added_level)); clif->message(fd, msg_txt(179)); // Guild level changed. } else { clif->message(fd, msg_txt(45)); // Guild level change failed. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(makeegg) +ACMD(makeegg) { struct item_data *item_data; int id, pet_id; nullpo_retr(-1, sd); - + if (!message || !*message) { clif->message(fd, msg_txt(1015)); // Please enter a monster/egg name/ID (usage: @makeegg ). - return -1; + return false; } - + if ((item_data = itemdb_searchname(message)) != NULL) // for egg name id = item_data->nameid; else - if ((id = mobdb_searchname(message)) != 0) // for monster name - ; - else - id = atoi(message); - + if ((id = mobdb_searchname(message)) != 0) // for monster name + ; + else + id = atoi(message); + pet_id = search_petDB_index(id, PET_CLASS); if (pet_id < 0) pet_id = search_petDB_index(id, PET_EGG); if (pet_id >= 0) { sd->catch_target_class = pet_db[pet_id].class_; intif_create_pet( - sd->status.account_id, sd->status.char_id, - (short)pet_db[pet_id].class_, (short)mob_db(pet_db[pet_id].class_)->lv, - (short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate, - 100, 0, 1, pet_db[pet_id].jname); + sd->status.account_id, sd->status.char_id, + (short)pet_db[pet_id].class_, (short)mob_db(pet_db[pet_id].class_)->lv, + (short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate, + 100, 0, 1, pet_db[pet_id].jname); } else { clif->message(fd, msg_txt(180)); // The monster/egg name/id doesn't exist. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(hatch) +ACMD(hatch) { nullpo_retr(-1, sd); if (sd->status.pet_id <= 0) clif->sendegg(sd); else { clif->message(fd, msg_txt(181)); // You already have a pet. - return -1; + return false; } - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(petfriendly) +ACMD(petfriendly) { int friendly; struct pet_data *pd; nullpo_retr(-1, sd); - + if (!message || !*message || (friendly = atoi(message)) < 0) { clif->message(fd, msg_txt(1016)); // Please enter a valid value (usage: @petfriendly <0-1000>). - return -1; + return false; } - + pd = sd->pd; if (!pd) { clif->message(fd, msg_txt(184)); // Sorry, but you have no pet. - return -1; + return false; } - + if (friendly < 0 || friendly > 1000) { clif->message(fd, msg_txt(37)); // An invalid number was specified. - return -1; + return false; } - + if (friendly == pd->pet.intimate) { clif->message(fd, msg_txt(183)); // Pet intimacy is already at maximum. - return -1; + return false; } - + pet_set_intimate(pd, friendly); clif->send_petstatus(sd); clif->message(fd, msg_txt(182)); // Pet intimacy changed. - return 0; + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(pethungry) +ACMD(pethungry) { int hungry; struct pet_data *pd; nullpo_retr(-1, sd); - + if (!message || !*message || (hungry = atoi(message)) < 0) { clif->message(fd, msg_txt(1017)); // Please enter a valid number (usage: @pethungry <0-100>). - return -1; + return false; } - + pd = sd->pd; if (!sd->status.pet_id || !pd) { clif->message(fd, msg_txt(184)); // Sorry, but you have no pet. - return -1; + return false; } if (hungry < 0 || hungry > 100) { clif->message(fd, msg_txt(37)); // An invalid number was specified. - return -1; + return false; } if (hungry == pd->pet.hungry) { clif->message(fd, msg_txt(186)); // Pet hunger is already at maximum. - return -1; + return false; } - + pd->pet.hungry = hungry; clif->send_petstatus(sd); clif->message(fd, msg_txt(185)); // Pet hunger changed. - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(petrename) +ACMD(petrename) { struct pet_data *pd; nullpo_retr(-1, sd); if (!sd->status.pet_id || !sd->pd) { clif->message(fd, msg_txt(184)); // Sorry, but you have no pet. - return -1; + return false; } pd = sd->pd; if (!pd->pet.rename_flag) { clif->message(fd, msg_txt(188)); // You can already rename your pet. - return -1; + return false; } - + pd->pet.rename_flag = 0; intif_save_petdata(sd->status.account_id, &pd->pet); clif->send_petstatus(sd); clif->message(fd, msg_txt(187)); // You can now rename your pet. - - return 0; + + return true; } /*========================================== * *------------------------------------------*/ -ACMD_FUNC(recall) { +ACMD(recall) { struct map_session_data *pl_sd = NULL; - + nullpo_retr(-1, sd); - + if (!message || !*message) { clif->message(fd, msg_txt(1018)); // Please enter a player name (usage: @recall ). - return -1; + return false; } - + if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL) { clif->message(fd, msg_txt(3)); // Character not found. - return -1; + return false; } - + if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { clif->message(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player. - return -1; + return false; } - + if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(1019)); // You are not authorized to warp someone to this map. - return -1; + return false; } if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif->message(fd, msg_txt(1020)); // You are not authorized to warp this player from their map. - return -1; + return false; } if (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y) { - return -1; + return false; } pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN); sprintf(atcmd_output, msg_txt(46), pl_sd->status.name); // %s recalled! clif->message(fd, atcmd_output); - - return 0; + + return true; } /*========================================== * charblock command (usage: charblock ) * This command do a definitiv ban on a player *------------------------------------------*/ -ACMD_FUNC(char_block) +ACMD(char_block) { nullpo_retr(-1, sd); - + memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); - + if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) { clif->message(fd, msg_txt(1021)); // Please enter a player name (usage: @charblock/@block ). - return -1; + return false; } - + chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block clif->message(fd, msg_txt(88)); // Character name sent to char-server to ask it. - - return 0; + + return true; } /*========================================== @@ -2833,24 +2771,24 @@ ACMD_FUNC(char_block) * @ban +1m-2mn1s-6y test_player * this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time. *------------------------------------------*/ -ACMD_FUNC(char_ban) +ACMD(char_ban) { char * modif_p; int year, month, day, hour, minute, second, value; time_t timestamp; struct tm *tmtime; nullpo_retr(-1, sd); - + memset(atcmd_output, '\0', sizeof(atcmd_output)); memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); - + if (!message || !*message || sscanf(message, "%255s %23[^\n]", atcmd_output, atcmd_player_name) < 2) { clif->message(fd, msg_txt(1022)); // Please enter ban time and a player name (usage: @charban/@ban/@banish/@charbanish