From 27a30ffa51e346f813ac27b4642ffb33a55eccc1 Mon Sep 17 00:00:00 2001 From: aleos89 Date: Fri, 7 Jul 2017 08:36:30 -0400 Subject: [PATCH 001/124] Removed an unused variable * Follow up to bae5c31. * Fixes #2241. Thanks to @hazimjauhari90! --- src/map/atcommand.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 22908cc4b7..9c3be511f8 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9842,7 +9842,6 @@ ACMD_FUNC(cloneequip) { */ ACMD_FUNC(clonestat) { struct map_session_data *pl_sd; - uint32 char_id = 0; nullpo_retr(-1, sd); From b2aa7e698da55bcae198dfcda7ab706f35d958e3 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Fri, 7 Jul 2017 23:52:00 +0200 Subject: [PATCH 002/124] Fixed thief's back sliding animation Fixed #1914 Thanks to @zackdreaver for reporting and @aleos89 for his help! --- src/map/skill.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/map/skill.c b/src/map/skill.c index 2c7fe094d0..dece786049 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8010,8 +8010,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui break; case TF_BACKSLIDING: //This is the correct implementation as per packet logging information. [Skotlex] - if (skill_blown(src,bl,skill_get_blewcount(skill_id,skill_lv),unit_getdir(bl),BLOWN_IGNORE_NO_KNOCKBACK)) - clif_skill_nodamage(src, bl, skill_id, skill_lv, 1); + skill_blown(src,bl,skill_get_blewcount(skill_id,skill_lv),unit_getdir(bl),BLOWN_IGNORE_NO_KNOCKBACK|BLOWN_DONT_SEND_PACKET); + clif_skill_nodamage(src, bl, skill_id, skill_lv, 1); + clif_blown(src); // Always blow, otherwise it shows a casting animation. [Lemongrass] break; case TK_HIGHJUMP: From 4dfeeade06a192f9c68a1a195f1db36c747be302 Mon Sep 17 00:00:00 2001 From: aleos Date: Sat, 8 Jul 2017 11:42:53 -0400 Subject: [PATCH 003/124] Resolve some compile warnings * Fixes #2245. Thanks to @lelouch22! --- src/map/clif.c | 4 ++-- src/map/mail.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index dddc4a4b6c..a773ebd0f9 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -15231,9 +15231,9 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id) struct mail_message *msg = &sd->mail.inbox.msg[i]; struct item *item; struct item_data *data; - int msg_len = strlen(msg->body), len, count = 0; + int msg_len = strlen(msg->body), len; #if PACKETVER >= 20150513 - int offset, j, itemsize; + int offset, j, itemsize, count = 0; #endif if( msg_len == 0 ) { diff --git a/src/map/mail.c b/src/map/mail.c index 1880f221ac..55483455d5 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -132,7 +132,10 @@ enum mail_attach_result mail_setitem(struct map_session_data *sd, short idx, uin // clif_updatestatus(sd, SP_ZENY); return MAIL_ATTACH_SUCCESS; } else { // Item Transfer - int i, j, total = 0; + int i; +#if PACKETVER >= 20150513 + int j, total = 0; +#endif idx -= 2; From 073927550802ede3ddad907d1a86a51642d521d5 Mon Sep 17 00:00:00 2001 From: aleos Date: Sat, 8 Jul 2017 13:18:04 -0400 Subject: [PATCH 004/124] Cleaned up Hells Plant damage formula * Fixes #2230. Thanks to @RagnarokValor! --- src/map/battle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/battle.c b/src/map/battle.c index 71e22bd288..63987390dd 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6583,7 +6583,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * break; case GN_HELLS_PLANT_ATK: //[{( Hell Plant Skill Level x Casters Base Level ) x 10 } + {( Casters INT x 7 ) / 2 } x { 18 + ( Casters Job Level / 4 )] x ( 5 / ( 10 - Summon Flora Skill Level )) - md.damage = ( skill_lv * status_get_lv(src) * 10 ) + ( status_get_int(src) * 7 / 2 ) * ( 18 + (sd?sd->status.job_level:0) / 4 ) * ( 5 / (10 - ((sd) ? pc_checkskill(sd,AM_CANNIBALIZE) : 0)) ); + md.damage = skill_lv * status_get_lv(src) * 10 + status_get_int(src) * 7 / 2 * (18 + (sd ? sd->status.job_level : 0) / 4) * 5 / (10 - (sd ? pc_checkskill(sd, AM_CANNIBALIZE) : 0)); break; case RL_B_TRAP: // kRO 2014-02-12: Damage: Caster's DEX, Target's current HP, Skill Level From 9959c919dc63b8fc6f1e93e7751a8042abd855ed Mon Sep 17 00:00:00 2001 From: aleos89 Date: Mon, 10 Jul 2017 10:29:28 -0400 Subject: [PATCH 005/124] VIP Drop calculation correction * Fixes #2247. * Adjusted the drop rate to properly float the value before converting to integer. Thanks to @talesvalente! --- src/map/mob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/mob.c b/src/map/mob.c index 6549ce4b23..86e1cecdd2 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2659,7 +2659,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) drop_rate = i32max(drop_rate, cap_value(drop_rate_bonus, 0, 9000)); if (pc_isvip(sd)) { // Increase item drop rate for VIP. - drop_rate += (int)(0.5 + (drop_rate * battle_config.vip_drop_increase) / 100); + drop_rate += (int)(0.5 + drop_rate * battle_config.vip_drop_increase / 100.); drop_rate = min(drop_rate,10000); //cap it to 100% } } From 7a3a64960bad5f9bfde2dca7c68915e37e363fec Mon Sep 17 00:00:00 2001 From: aleos89 Date: Mon, 10 Jul 2017 12:27:23 -0400 Subject: [PATCH 006/124] Corrected Siege Arrow Quivers * Fixes #2249. * Siege Arrow Quiver S should give Arrow S while Siege Arrow Quiver A should give Arrow A. Thanks to @uddevil! --- db/re/item_db.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index c9e9163c4a..b4bc99a364 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -6807,8 +6807,8 @@ 12674,God_Material_Box,God Material Box,2,20,,500,,,,,0xFFFFFFFF,63,2,,,,,,{ getgroupitem(IG_God_Material_Box); },{},{} 12675,Sg_Weapon_Supply_Box,WoE Weapon Supply Box,2,20,,500,,,,,0xFFFFFFFF,63,2,,,,,,{ getgroupitem(IG_Sg_Weapon_Supply_Box); },{},{} 12676,Sg_Violet_Potion_Box,Siege Violet Potion Box,2,20,,500,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 11547,50; },{},{} -12677,Siege_Arrow_Quiver_S,Siege Arrow Quiver S,2,2,,100,,,,,0xFFFFFFFF,63,2,,,130,,,{ getitem 1776,200; },{},{} -12678,Siege_Arrow_Quiver_A,Siege Arrow Quiver A,2,2,,100,,,,,0xFFFFFFFF,63,2,,,95,,,{ getitem 1775,200; },{},{} +12677,Siege_Arrow_Quiver_S,Siege Arrow Quiver S,2,2,,100,,,,,0xFFFFFFFF,63,2,,,130,,,{ getitem 1775,200; },{},{} +12678,Siege_Arrow_Quiver_A,Siege Arrow Quiver A,2,2,,100,,,,,0xFFFFFFFF,63,2,,,95,,,{ getitem 1776,200; },{},{} 12679,Sg_White_Potion_Box,Siege White Potion Box,2,20,,200,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 11548,30; },{},{} 12680,Sg_Blue_Potion_Box,Siege Blue Potion Box,2,20,,200,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 11549,10; },{},{} 12681,Nestea_Lemon,Nestea Lemon,2,0,,50,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} From c6c8d0bc8884f683f7d66c31e741e0a3031c5e12 Mon Sep 17 00:00:00 2001 From: rAthenaAPI Date: Mon, 10 Jul 2017 18:27:38 +0200 Subject: [PATCH 007/124] SQL synchronization --- sql-files/item_db_re.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 2b910cda3d..dc3386698f 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -6839,8 +6839,8 @@ REPLACE INTO `item_db_re` VALUES (12673,'Lucky_Egg_C10','Lucky Egg C10',2,20,NUL REPLACE INTO `item_db_re` VALUES (12674,'God_Material_Box','God Material Box',2,20,NULL,500,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getgroupitem(IG_God_Material_Box);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12675,'Sg_Weapon_Supply_Box','WoE Weapon Supply Box',2,20,NULL,500,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getgroupitem(IG_Sg_Weapon_Supply_Box);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12676,'Sg_Violet_Potion_Box','Siege Violet Potion Box',2,20,NULL,500,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getitem 11547,50;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (12677,'Siege_Arrow_Quiver_S','Siege Arrow Quiver S',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,'130',NULL,NULL,'getitem 1776,200;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (12678,'Siege_Arrow_Quiver_A','Siege Arrow Quiver A',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,'95',NULL,NULL,'getitem 1775,200;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (12677,'Siege_Arrow_Quiver_S','Siege Arrow Quiver S',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,'130',NULL,NULL,'getitem 1775,200;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (12678,'Siege_Arrow_Quiver_A','Siege Arrow Quiver A',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,'95',NULL,NULL,'getitem 1776,200;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12679,'Sg_White_Potion_Box','Siege White Potion Box',2,20,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getitem 11548,30;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12680,'Sg_Blue_Potion_Box','Siege Blue Potion Box',2,20,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getitem 11549,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12681,'Nestea_Lemon','Nestea Lemon',2,0,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); From d9d9042b87025b07174e3ddffb0b6bc7f6916c5c Mon Sep 17 00:00:00 2001 From: Akkarinage Date: Thu, 13 Jul 2017 15:58:03 +0100 Subject: [PATCH 008/124] Added Lasagna to atcommand go locations --- conf/help.txt | 2 +- src/common/mapindex.h | 1 + src/map/atcommand.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/help.txt b/conf/help.txt index 8817223885..d904b39c4a 100644 --- a/conf/help.txt +++ b/conf/help.txt @@ -42,7 +42,7 @@ go: "Params: \n" "Warps you to a city.\n" " -1: (Memo point 0) 16: prison/jail 33: malangdo island\n" " 0: prontera 17: jawaii 34: malaya port\n" " 1: morocc 18: ayothaya 35: eclage\n" - " 2: geffen 19: einbroch\n" + " 2: geffen 19: einbroch 36: lasagna\n" " 3: payon 20: lighthalzen\n" " 4: alberta 21: einbech\n" " 5: izlude 22: hugel\n" diff --git a/src/common/mapindex.h b/src/common/mapindex.h index cc1f6624db..812a8a9e12 100644 --- a/src/common/mapindex.h +++ b/src/common/mapindex.h @@ -54,6 +54,7 @@ extern "C" { #define MAP_MALAYA "malaya" #define MAP_ECLAGE "eclage" #define MAP_ECLAGE_IN "ecl_in01" +#define MAP_LASAGNA "lasagna" const char* mapindex_getmapname(const char* string, char* output); const char* mapindex_getmapname_ext(const char* string, char* output); diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9c3be511f8..7c9ed34f6e 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1917,6 +1917,7 @@ ACMD_FUNC(go) { MAP_MALANGDO, 140, 114 }, // 33=Malangdo Island { MAP_MALAYA, 242, 211 }, // 34=Malaya Port { MAP_ECLAGE, 110, 39 }, // 35=Eclage + { MAP_LASAGNA, 193, 182 }, // 36=Lasagna }; nullpo_retr(-1, sd); @@ -2036,6 +2037,8 @@ ACMD_FUNC(go) town = 34; } else if (strncmp(map_name, "eclage", 3) == 0) { town = 35; + } else if (strncmp(map_name, "lasagna", 2) == 0) { + town = 36; } if (town >= 0 && town < ARRAYLENGTH(data)) From e00d843836764a25c6e6b30678add5afe4526fb3 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Fri, 14 Jul 2017 00:10:58 +0200 Subject: [PATCH 009/124] Mob DB placeholder --- db/re/mob_db.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/db/re/mob_db.txt b/db/re/mob_db.txt index f88d39a1f8..238f70cde9 100644 --- a/db/re/mob_db.txt +++ b/db/re/mob_db.txt @@ -3034,7 +3034,17 @@ //3874,AB_MOB_048 //3875,AB_MOB_049 //3876,AB_MOB_050 - +//3877,E_NYAIL_PIG +//3878,E_PIT +//3879,E_SEA_WORMS +//3880,E_SMALL_SWIRL +//3881,E_RIPE_WATERMELON +//3882,E_MD_NYAILO +//3883,E_MD_NYAILO_LEG +//3884,E_MD_S_TREASURE_BOX +//3885,E_MD_B_TREASURE_BOX +//3886,E_MD_BOX_PUPPET +//3887,E_MD_DEPRESS_SOUL //3888,TW_I_QUEEN_SCARABA //3889,TW_GIOIA //3890,TW_TIMEHOLDER From b0f5672a74e05137625b869e0722c42f859c1118 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Fri, 14 Jul 2017 00:13:21 +0200 Subject: [PATCH 010/124] Fixed character deletion on 2014-10-22 Fixed #2251 Thanks to @lelouch22 --- src/common/mmo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/mmo.h b/src/common/mmo.h index 7cbd06035e..abbff80467 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -29,7 +29,7 @@ #define PACKETVER_SUPPORTS_PINCODE PACKETVER>=20110309 /// Check if the client needs delete_date as remaining time and not the actual delete_date (actually it was tested for clients since 2013) -#define PACKETVER_CHAR_DELETEDATE (PACKETVER > 20130000 && PACKETVER < 20141016) || PACKETVER >= 20150513 +#define PACKETVER_CHAR_DELETEDATE (PACKETVER > 20130000 && PACKETVER <= 20141022) || PACKETVER >= 20150513 // Check if the specified packetvresion supports the cashshop sale system #define PACKETVER_SUPPORTS_SALES PACKETVER>=20131223 From 6e2ab60016ad4518bd38103d9b137ad325e4b90c Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Fri, 14 Jul 2017 00:15:24 +0200 Subject: [PATCH 011/124] Fixed a warning for guild master change time Fixed #2246 Thanks to @anacondaqq --- src/char/int_guild.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/char/int_guild.c b/src/char/int_guild.c index a596b6c67c..3f07208543 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -1096,7 +1096,7 @@ int mapif_guild_master_changed(struct guild *g, int aid, int cid, time_t time) WBUFL(buf,2)=g->guild_id; WBUFL(buf,6)=aid; WBUFL(buf,10)=cid; - WBUFL(buf,14)=time; + WBUFL(buf,14)=(uint32)time; chmapif_sendall(buf,18); return 0; } From 4071801bdcb675a184ee4976a3eeb63b4e4dc968 Mon Sep 17 00:00:00 2001 From: rAthenaAPI Date: Fri, 14 Jul 2017 00:15:41 +0200 Subject: [PATCH 012/124] SQL synchronization --- sql-files/mob_db_re.sql | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql index 819d47134c..42b90dfd15 100644 --- a/sql-files/mob_db_re.sql +++ b/sql-files/mob_db_re.sql @@ -3100,7 +3100,17 @@ REPLACE INTO `mob_db_re` VALUES (3508,'DR_EGGRING_G','Eggring','Eggring',20,220, #3874,AB_MOB_048 #3875,AB_MOB_049 #3876,AB_MOB_050 - +#3877,E_NYAIL_PIG +#3878,E_PIT +#3879,E_SEA_WORMS +#3880,E_SMALL_SWIRL +#3881,E_RIPE_WATERMELON +#3882,E_MD_NYAILO +#3883,E_MD_NYAILO_LEG +#3884,E_MD_S_TREASURE_BOX +#3885,E_MD_B_TREASURE_BOX +#3886,E_MD_BOX_PUPPET +#3887,E_MD_DEPRESS_SOUL #3888,TW_I_QUEEN_SCARABA #3889,TW_GIOIA #3890,TW_TIMEHOLDER From 2bd0fd5a169b4c8125cdd8d881a0df5910849753 Mon Sep 17 00:00:00 2001 From: aleos89 Date: Fri, 14 Jul 2017 13:18:58 -0400 Subject: [PATCH 013/124] Corrected Shield of Death bonus * Wearer should receive 10% more damage not gain 10% damage against normal monsters. Thanks to Divine-Pride.net! --- db/re/item_db.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index b4bc99a364..dc5d0ac1ee 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -1379,7 +1379,7 @@ 2174,Lumiere_Shield,Lumiere Shield,4,20,,1300,,50,,1,0xFFFFFFFF,63,2,32,,65,1,3,{},{},{} 2175,Esprit_Shield,Spirit Shield,4,20,,1300,,50,,1,0xFFFFFFFF,63,2,32,,65,1,3,{},{},{} 2176,Dark_Book,Black Book,4,20,,500,,80,,1,0xFFFFFFFF,63,2,32,,65,1,5,{ bonus bMdef,5; .@r = getrefine(); bonus3 bAutoSpellWhenHit,"NPC_DRAGONFEAR",1,(.@r<=6)?(10):((.@r<=8)?(20):(30)); },{},{} -2177,Shield_Of_Death,Shield Of Death,4,20,,2000,,150,,1,0xFFFFFFFF,63,2,32,,90,1,3,{ bonus2 bAddClass,Class_Boss,2; bonus2 bMagicAddClass,Class_Boss,2; bonus2 bAddClass,Class_Normal,10; bonus2 bMagicAddClass,Class_Normal,10; },{},{} +2177,Shield_Of_Death,Shield Of Death,4,20,,2000,,150,,1,0xFFFFFFFF,63,2,32,,90,1,3,{ bonus2 bAddClass,Class_Boss,2; bonus2 bMagicAddClass,Class_Boss,2; bonus2 bSubClass,Class_Normal,-10; },{},{} 2178,TE_Woe_Buckler,TE Woe Buckler,4,0,,0,,15,,0,0xFFFFFFFF,63,2,32,1,40,1,2,{ bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15; },{},{} 2179,TE_Woe_Shield,TE Woe Shield,4,0,,0,,25,,0,0x000444A2,63,2,32,1,40,1,3,{ bonus bMdef,5; bonus bMaxHP,200; bonus2 bSubRace,RC_Player,20; },{},{} 2180,TE_Woe_Magic_Guard,TE Woe Magic Guard,4,0,,0,,5,,0,0x00818315,63,2,32,1,40,1,1,{ bonus bMdef,25; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,10; },{},{} From 77ad410607a0b3024eb531f0454d4cbe37c0d687 Mon Sep 17 00:00:00 2001 From: rAthenaAPI Date: Fri, 14 Jul 2017 19:19:14 +0200 Subject: [PATCH 014/124] SQL synchronization --- sql-files/item_db_re.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index dc3386698f..bc7483ae3d 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -1411,7 +1411,7 @@ REPLACE INTO `item_db_re` VALUES (2173,'Crescent_Armguard','Crescent Wrist Guard REPLACE INTO `item_db_re` VALUES (2174,'Lumiere_Shield','Lumiere Shield',4,20,NULL,1300,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,3,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (2175,'Esprit_Shield','Spirit Shield',4,20,NULL,1300,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,3,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (2176,'Dark_Book','Black Book',4,20,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,5,'bonus bMdef,5; .@r = getrefine(); bonus3 bAutoSpellWhenHit,"NPC_DRAGONFEAR",1,(.@r<=6)?(10):((.@r<=8)?(20):(30));',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2177,'Shield_Of_Death','Shield Of Death',4,20,NULL,2000,NULL,150,NULL,1,0xFFFFFFFF,63,2,32,NULL,'90',1,3,'bonus2 bAddClass,Class_Boss,2; bonus2 bMagicAddClass,Class_Boss,2; bonus2 bAddClass,Class_Normal,10; bonus2 bMagicAddClass,Class_Normal,10;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2177,'Shield_Of_Death','Shield Of Death',4,20,NULL,2000,NULL,150,NULL,1,0xFFFFFFFF,63,2,32,NULL,'90',1,3,'bonus2 bAddClass,Class_Boss,2; bonus2 bMagicAddClass,Class_Boss,2; bonus2 bSubClass,Class_Normal,-10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2178,'TE_Woe_Buckler','TE Woe Buckler',4,0,NULL,0,NULL,15,NULL,0,0xFFFFFFFF,63,2,32,1,'40',1,2,'bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2179,'TE_Woe_Shield','TE Woe Shield',4,0,NULL,0,NULL,25,NULL,0,0x000444A2,63,2,32,1,'40',1,3,'bonus bMdef,5; bonus bMaxHP,200; bonus2 bSubRace,RC_Player,20;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2180,'TE_Woe_Magic_Guard','TE Woe Magic Guard',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,32,1,'40',1,1,'bonus bMdef,25; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,10;',NULL,NULL); From 0d103bf6a788a09a13512e5ca20fa94fc907360c Mon Sep 17 00:00:00 2001 From: aleos89 Date: Fri, 14 Jul 2017 13:54:32 -0400 Subject: [PATCH 015/124] Fixed a small bug with atcommand addwarp * The function that creates the warp was using the wrong Y area argument. Thanks to @mrjnumber1! --- src/map/npc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/npc.c b/src/map/npc.c index f629a78914..0c9b2c1ca9 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2464,7 +2464,7 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short nd->u.warp.x = to_x; nd->u.warp.y = to_y; nd->u.warp.xs = xs; - nd->u.warp.ys = xs; + nd->u.warp.ys = ys; nd->bl.type = BL_NPC; nd->subtype = NPCTYPE_WARP; nd->trigger_on_hidden = false; From f0ab8d2a52eb393d4ee0d2d86a70134b9b9009ba Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Sat, 15 Jul 2017 22:45:12 +0200 Subject: [PATCH 016/124] Overhauled and dropped packet db (#2263) Adds support for a lot of missing clients and features almost all clients from 2016 and 2017 clientinfo.xml's version value will be ignored from now on By setting PACKETVER the server will configure everything else on it's own from now on Dropped is_clientver script command And a lot more --- .travis.yml | 2 - conf/battle/client.conf | 52 - conf/help.txt | 1 - conf/login_athena.conf | 6 - conf/msg_conf/map_msg.conf | 3 +- conf/msg_conf/map_msg_chn.conf | 3 +- conf/msg_conf/map_msg_frn.conf | 3 +- conf/msg_conf/map_msg_idn.conf | 3 +- conf/msg_conf/map_msg_rus.conf | 3 +- conf/msg_conf/map_msg_tha.conf | 3 +- db/import-tmpl/packet_db.txt | 35 - db/packet_db.txt | 2675 --------------------- doc/atcommands.txt | 3 - doc/packet_interserv.txt | 14 +- doc/script_commands.txt | 12 - npc/re/guides/navigation.txt | 3 +- rAthena.sln | 1 + src/char/char.h | 1 - src/char/char_clif.c | 49 +- src/char/char_logif.c | 14 +- src/char/char_mapif.c | 6 +- src/common/mmo.h | 23 +- src/common/utils.c | 53 - src/common/utils.h | 2 - src/config/core.h | 11 +- src/config/packets.h | 63 + src/custom/defines_post.h | 13 + src/custom/defines_pre.h | 13 + src/login/login.cpp | 14 - src/login/login.h | 4 - src/login/loginchrif.c | 14 +- src/login/loginclif.c | 67 +- src/map/atcommand.c | 10 +- src/map/battle.c | 2 - src/map/battle.h | 2 - src/map/chrif.c | 7 +- src/map/clif.c | 1560 +++--------- src/map/clif.h | 11 +- src/map/clif_obfuscation.h | 347 +++ src/map/clif_packetdb.h | 2308 ++++++++++++++++++ src/map/clif_shuffle.h | 3511 ++++++++++++++++++++++++++++ src/map/map-server.vcxproj.filters | 9 + src/map/pc.c | 4 +- src/map/pc.h | 1 - src/map/script.c | 31 - 45 files changed, 6731 insertions(+), 4241 deletions(-) delete mode 100644 db/import-tmpl/packet_db.txt delete mode 100644 db/packet_db.txt create mode 100644 src/config/packets.h create mode 100644 src/custom/defines_post.h create mode 100644 src/custom/defines_pre.h create mode 100644 src/map/clif_obfuscation.h create mode 100644 src/map/clif_packetdb.h create mode 100644 src/map/clif_shuffle.h diff --git a/.travis.yml b/.travis.yml index 270132a191..13745097b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,6 @@ script: - ./configure $CONFIGURE_FLAGS - make clean - make server - - 'echo packet_db_ver: $PACKETDBVER >> db/import/packet_db.txt' - ./map-server --run-once env: @@ -44,7 +43,6 @@ env: - DB_NAME="ragnarok" - DB_USER="ragnarok" - DB_PASS="ragnarok" - - PACKETDBVER=45 matrix: - CONFIGURE_FLAGS="--enable-prere=no --enable-vip=no --enable-buildbot=yes" - CONFIGURE_FLAGS="--enable-prere=yes --enable-vip=no --enable-buildbot=yes" diff --git a/conf/battle/client.conf b/conf/battle/client.conf index f2e5e1be51..65b7eda241 100644 --- a/conf/battle/client.conf +++ b/conf/battle/client.conf @@ -9,58 +9,6 @@ // assume unit types (1: Pc, 2: Mob, 4: Pet, 8: Homun, 16: Mercenary) //-------------------------------------------------------------- -// Set here which client version do you accept. Add all values of clients: -// Clients older than accepted versions, and versions not set to 'accepted' -// here will be rejected when logging in -// 0x00000001: Clients older than 2004-09-06aSakray (packet versions 5-9) -// 0x00000002: 2004-09-06 aSakexe (version 10) -// 0x00000004: 2004-09-20 aSakexe (version 11) -// 0x00000008: 2004-10-05 aSakexe (version 12) -// 0x00000010: 2004-10-25 aSakexe (version 13) -// 0x00000020: 2004-11-29 aSakexe (version 14) -// 0x00000040: 2005-01-10 bSakexe (version 15) -// 0x00000080: 2005-05-09 aSakexe (version 16) -// 0x00000100: 2005-06-28 aSakexe (version 17) -// 0x00000200: 2005-07-18 aSakexe (version 18) -// 0x00000400: 2005-07-19 bSakexe (version 19) -// 0x00000800: 2006-03-27 aSakexe (version 20) -// 0x00001000: 2007-01-08 aSakexe (version 21) -// 0x00002000: 2007-02-12 aSakexe (version 22) -// 0x00004000: 2008-09-10 aSakexe (version 23) -// 0x00008000: 2008-08-27 aRagexeRE (version 24) -// 0x00010000: 2008-09-10 aRagexeRE (version 25) -// 0x00020000: 2010-11-24 aRagexeRE (version 26) -// 0x00040000: 2011-10-05 aRagexeRE (version 27) -// 0x00080000: 2011-11-02 aRagexe (version 28) -// 0x00100000: 2012-03-07 fRagexeRE (version 29) -// 0x00200000: 2012-04-10 aRagexeRE (version 30) -// 0x00400000: 2012-04-18 aRagexeRE (version 31) -// 0x00800000: 2012-06-18 unknow (version 32) -// 0x01000000: 2012-07-02 aRagexeRE (version 33) -// 0x02000000: 2013-03-20 Ragexe (version 34) -// 0x04000000: 2013-05-15 aRagexe (version 35) -// 0x08000000: 2013-05-22 Ragexe (version 36) -// 0x10000000: 2013-05-29 Ragexe (version 37) -// 0x20000000: 2013-06-05 Ragexe (version 38) -// 0x40000000: 2013-06-12 Ragexe (version 39) -// default value: 0x7FFFFFFF (all clients/versions [5;39]) -packet_ver_flag: 0x7FFFFFFF - -// 0x00000001: 2013-06-18 Ragexe (version 40) -// 0x00000002: 2013-06-26 Ragexe (version 41) -// 0x00000004: 2013-07-03 Ragexe (version 42) -// 0x00000008: 2013-07-10 Ragexe (version 43) -// 0x00000010: 2013-07-17 Ragexe (version 44) -// 0x00000020: 2013-08-07 Ragexe (version 45) -// 0x00000040: 2013-12-23 Ragexe (version 46) -// 0x00000080: ???? -// 0x00000100: ???? -// 0x00000200: ???? -// 0x00000400: 2014-10-16 Ragexe (version 50) -// 0x00000800: 2014-10-22 Ragexe (version 51) -// default value: 0x7FFFFFFF (all clients/versions [41;72]) -packet_ver_flag2: 0x7FFFFFFF - // Minimum delay between whisper/global/party/guild messages (in ms) // Messages that break this threshold are silently omitted. min_chat_delay: 0 diff --git a/conf/help.txt b/conf/help.txt index d904b39c4a..8bcb8e3250 100644 --- a/conf/help.txt +++ b/conf/help.txt @@ -310,7 +310,6 @@ reloaditemdb: "Reload item database." reloadmobdb: "Reload monster database." reloadmotd: "Reload Message of the Day." reloadmsgconf: "Reload message configuration." -reloadpacketdb: "Reload packet database." reloadpcdb: "Reload player settings." reloadquestdb: "Reload quest database." reloadscript: "Reload all scripts." diff --git a/conf/login_athena.conf b/conf/login_athena.conf index 08c7a31d91..ddd5ddd890 100644 --- a/conf/login_athena.conf +++ b/conf/login_athena.conf @@ -106,12 +106,6 @@ vip_char_increase: -1 // 0 or more: new accounts automatically expire after the given value, in seconds start_limited_time: -1 -// Check the clientversion field set in clientinfo.xml? -check_client_version: no - -// What version is allowed to connect? (if the option above is enabled) -client_version_to_connect: 20 - // Store passwords as MD5 hashes instead of plain text? // NOTE: Will not work with clients that use use_MD5_passwords: no diff --git a/conf/msg_conf/map_msg.conf b/conf/msg_conf/map_msg.conf index 1eefc87487..40151e8697 100644 --- a/conf/msg_conf/map_msg.conf +++ b/conf/msg_conf/map_msg.conf @@ -1615,8 +1615,7 @@ 1475: ---- My Channels ---- 1476: You have not joined any channels. -// @reloadpacketdb -1477: Packet database has been reloaded. +//1477 free // @partysharelvl 1478: Party share level range has been changed successfully. diff --git a/conf/msg_conf/map_msg_chn.conf b/conf/msg_conf/map_msg_chn.conf index 0825d8724e..76c5420bb0 100644 --- a/conf/msg_conf/map_msg_chn.conf +++ b/conf/msg_conf/map_msg_chn.conf @@ -1469,8 +1469,7 @@ 1475: ---- 我的頻道 ---- 1476: 你沒有加入任何的頻道 -// @reloadpacketdb -1477: 完成重載封包數據庫. +//1477 free // @partysharelvl 1478: 隊伍經驗均分的等級間距已成功變更。 diff --git a/conf/msg_conf/map_msg_frn.conf b/conf/msg_conf/map_msg_frn.conf index ef24eaddca..fe94892bc0 100644 --- a/conf/msg_conf/map_msg_frn.conf +++ b/conf/msg_conf/map_msg_frn.conf @@ -1480,8 +1480,7 @@ 1475: ---- Canaux rejoins ---- 1476: Vous n'avez rejoins aucun canal. -// @reloadpacketdb -1477: Base de donne des 'Packets' recharge. +//1477 free // @partysharelvl 1478: Diffrence de niveau pour le partage en quipe chang. diff --git a/conf/msg_conf/map_msg_idn.conf b/conf/msg_conf/map_msg_idn.conf index 3ea211e779..feee972a27 100644 --- a/conf/msg_conf/map_msg_idn.conf +++ b/conf/msg_conf/map_msg_idn.conf @@ -1571,8 +1571,7 @@ 1475: ---- Channel yang diikuti ---- 1476: Kamu tidak bergabung ke channel manapun saat ini. -// @reloadpacketdb -1477: Database paket telah dimuat ulang. +//1477 free // @partysharelvl 1478: Jarak level dalam party share telah diubah dengan sukses. diff --git a/conf/msg_conf/map_msg_rus.conf b/conf/msg_conf/map_msg_rus.conf index ae78d70d30..ad1e3a06f8 100644 --- a/conf/msg_conf/map_msg_rus.conf +++ b/conf/msg_conf/map_msg_rus.conf @@ -1480,8 +1480,7 @@ 1475: ---- ---- 1476: . -// @reloadpacketdb -1477: . +//1477 free // @partysharelvl 1478: . diff --git a/conf/msg_conf/map_msg_tha.conf b/conf/msg_conf/map_msg_tha.conf index 5b6ce2cbb0..c34d07c0a4 100644 --- a/conf/msg_conf/map_msg_tha.conf +++ b/conf/msg_conf/map_msg_tha.conf @@ -1473,8 +1473,7 @@ 1475: ---- Channels ѹ ---- 1476: س channels . -// @reloadpacketdb -1477: ҹ Packet ١Ŵº. +//1477 free // @partysharelvl 1478: дѺ Level Ѻ ١Ѻ¹º. diff --git a/db/import-tmpl/packet_db.txt b/db/import-tmpl/packet_db.txt deleted file mode 100644 index de90db50e0..0000000000 --- a/db/import-tmpl/packet_db.txt +++ /dev/null @@ -1,35 +0,0 @@ -// Client<->Map Packet Database -// -// Structure of Database: -// PacketType,PacketLength[,Name,FieldIndex1:FieldIndex2:FieldIndex3:...] -// -// 01. PacketType ID of the packet. -// 02. PacketLength Length of the packet. If 0, packet is disabled in current packet version. If -1, packet has variable size. -// 03. Name Name of the packet parser function (optional, for incoming packets only). -// 04. FieldIndex Specifies the offset of a packet field in bytes from the begin of the packet (only specified when Name is given). -// Can be 0, when the layout is not known. -// ... -// -// NOTE: Up to MAX_PACKET_POS (typically 20) field indexes may be used. -// -// The packet database allows you to add support for new clients, -// because packets change every release. -// -// Note: Every packet version needs a wanttoconnection specification, since -// that is the packet used to identify a client's version. -// If multiple versions have the same connection packet, the higher version -// will be used (unless the lower one is specified as the default) -// -// Incoming packets have their parser function and layout specified, which enables -// them for the current and all higher versions, unless explicitely disabled. -// -// Outgoing packets must be specified in order to enable them for the current -// and all higher versions, unless explicitely disabled. Packets that are not -// enabled for a packet version are silently discarded when sent as multicast. -// -// Every packet version inherits packet definitions from the previous (lower) -// packet version. -// -// Main packet version of the DB to use (default = max available version) -// Client detection is faster when all clients use this version. -// Version 23 is the latest Sakexe (above versions are for Renewal clients) diff --git a/db/packet_db.txt b/db/packet_db.txt deleted file mode 100644 index d79a306ef1..0000000000 --- a/db/packet_db.txt +++ /dev/null @@ -1,2675 +0,0 @@ -// Client<->Map Packet Database -// -// Structure of Database: -// PacketType,PacketLength[,Name,FieldIndex1:FieldIndex2:FieldIndex3:...] -// -// 01. PacketType ID of the packet. -// 02. PacketLength Length of the packet. If 0, packet is disabled in current packet version. If -1, packet has variable size. -// 03. Name Name of the packet parser function (optional, for incoming packets only). -// 04. FieldIndex Specifies the offset of a packet field in bytes from the begin of the packet (only specified when Name is given). -// Can be 0, when the layout is not known. -// ... -// -// NOTE: Up to MAX_PACKET_POS (typically 20) field indexes may be used. -// -// The packet database allows you to add support for new clients, -// because packets change every release. -// -// Note: Every packet version needs a wanttoconnection specification, since -// that is the packet used to identify a client's version. -// If multiple versions have the same connection packet, the higher version -// will be used (unless the lower one is specified as the default) -// -// Incoming packets have their parser function and layout specified, which enables -// them for the current and all higher versions, unless explicitely disabled. -// -// Outgoing packets must be specified in order to enable them for the current -// and all higher versions, unless explicitely disabled. Packets that are not -// enabled for a packet version are silently discarded when sent as multicast. -// -// Every packet version inherits packet definitions from the previous (lower) -// packet version. -// -// Main packet version of the DB to use (default = max available version) -// Client detection is faster when all clients use this version. -// Version 23 is the latest Sakexe (above versions are for Renewal clients) -// -// packet_keys values are default value for each packet version, if no value -// or value is 'default' in packet_keys_use, server will uses default keys -// according to used packet_db_ver. packet_keys_use is user-defined keys. -// Maximum key value is 0x7FFFFFFF. -// NOTE: Keys won't be reloaded, initialized on first load only. -// -//packet_db_ver: 46 -packet_db_ver: default -packet_keys_use: default - -packet_ver: 5 -0x0064,55 -0x0065,17 -0x0066,6 -0x0067,37 -0x0068,46 -0x0069,-1 -0x006a,23 -0x006b,-1 -0x006c,3 -0x006d,108 -0x006e,3 -0x006f,2 -0x0070,6 -0x0071,28 -0x0072,19,wanttoconnection,2:6:10:14:18 -0x0073,11 -0x0074,3 -0x0075,-1 -0x0076,9 -0x0077,5 -0x0078,54 -0x0079,53 -0x007a,58 -0x007b,60 -0x007c,41 -0x007d,2,loadendack,0 -0x007e,6,ticksend,2 -0x007f,6 -0x0080,7 -0x0081,3 -0x0082,2 -0x0083,2 -0x0084,2 -0x0085,5,walktoxy,2 -0x0086,16 -0x0087,12 -0x0088,10 -0x0089,7,actionrequest,2:6 -0x008a,29 -0x008b,2 -0x008c,-1,globalmessage,2:4 -0x008d,-1 -0x008e,-1 -//0x008f,-1 -0x0090,7,npcclicked,2:6 -0x0091,22 -0x0092,28 -0x0093,2 -0x0094,6,getcharnamerequest,2 -0x0095,30 -0x0096,-1,wis,2:4:28 -0x0097,-1 -0x0098,3 -0x0099,-1,broadcast,2:4 -0x009a,-1 -0x009b,5,changedir,2:4 -0x009c,9 -0x009d,17 -0x009e,17 -0x009f,6,takeitem,2 -0x00a0,23 -0x00a1,6 -0x00a2,6,dropitem,2:4 -0x00a3,-1 -0x00a4,-1 -0x00a5,-1 -0x00a6,-1 -0x00a7,8,useitem,2:4 -0x00a8,7 -0x00a9,6,equipitem,2:4 -0x00aa,7,ZC_WEAR_EQUIP_ACK,2:4:6 -0x00ab,4,unequipitem,2 -0x00ac,7 -//0x00ad,-1 -0x00ae,-1 -0x00af,6 -0x00b0,8 -0x00b1,8 -0x00b2,3,restart,2 -0x00b3,3 -0x00b4,-1 -0x00b5,6 -0x00b6,6 -0x00b7,-1 -0x00b8,7,npcselectmenu,2:6 -0x00b9,6,npcnextclicked,2 -0x00ba,2 -0x00bb,5,statusup,2:4 -0x00bc,6 -0x00bd,44 -0x00be,5 -0x00bf,3,emotion,2 -0x00c0,7 -0x00c1,2,howmanyconnections,0 -0x00c2,6 -0x00c3,8 -0x00c4,6 -0x00c5,7,npcbuysellselected,2:6 -0x00c6,-1 -0x00c7,-1 -0x00c8,-1,npcbuylistsend,2:4 -0x00c9,-1,npcselllistsend,2:4 -0x00ca,3 -0x00cb,3 -0x00cc,6,gmkick,2 -0x00cd,3 -0x00ce,2,killall,0 -0x00cf,27,wisexin,2:26 -0x00d0,3,wisall,2 -0x00d1,4 -0x00d2,4 -0x00d3,2,wisexlist,0 -0x00d4,-1 -0x00d5,-1,createchatroom,2:4:6:7:15 -0x00d6,3 -0x00d7,-1 -0x00d8,6 -0x00d9,14,chataddmember,2:6 -0x00da,3 -0x00db,-1 -0x00dc,28 -0x00dd,29 -0x00de,-1,chatroomstatuschange,2:4:6:7:15 -0x00df,-1 -0x00e0,30,changechatowner,2:6 -0x00e1,30 -0x00e2,26,kickfromchat,2 -0x00e3,2,chatleave,0 -0x00e4,6,traderequest,2 -0x00e5,26 -0x00e6,3,tradeack,2 -0x00e7,3 -0x00e8,8,tradeadditem,2:4 -0x00e9,19 -0x00ea,5 -0x00eb,2,tradeok,0 -0x00ec,3 -0x00ed,2,tradecancel,0 -0x00ee,2 -0x00ef,2,tradecommit,0 -0x00f0,3 -0x00f1,2 -0x00f2,6 -0x00f3,8,movetokafra,2:4 -0x00f4,21 -0x00f5,8,movefromkafra,2:4 -0x00f6,8 -0x00f7,2,closekafra,0 -0x00f8,2 -0x00f9,26,createparty,2 -0x00fa,3 -0x00fb,-1 -0x00fc,6,partyinvite,2 -0x00fd,27 -0x00fe,30 -0x00ff,10,replypartyinvite,2:6 -0x0100,2,leaveparty,0 -0x0101,6 -0x0102,6,partychangeoption,2 -0x0103,30,removepartymember,2:6 -0x0104,79 -0x0105,31 -0x0106,10 -0x0107,10 -0x0108,-1,partymessage,2:4 -0x0109,-1 -0x010a,4 -0x010b,6 -0x010c,6 -0x010d,2 -0x010e,11 -0x010f,-1 -0x0110,10 -0x0111,39 -0x0112,4,skillup,2 -0x0113,10,useskilltoid,2:4:6 -0x0114,31 -0x0115,35 -0x0116,10,useskilltopos,2:4:6:8 -0x0117,18 -0x0118,2,stopattack,0 -0x0119,13 -0x011a,15 -0x011b,20,useskillmap,2:4 -0x011c,68 -0x011d,2,requestmemo,0 -0x011e,3 -0x011f,16 -0x0120,6 -0x0121,14 -0x0122,-1 -0x0123,-1 -0x0124,21 -0x0125,8 -0x0126,8,putitemtocart,2:4 -0x0127,8,getitemfromcart,2:4 -0x0128,8,movefromkafratocart,2:4 -0x0129,8,movetokafrafromcart,2:4 -0x012a,2,removeoption,0 -0x012b,2 -0x012c,3 -0x012d,4 -0x012e,2,closevending,0 -0x012f,-1,openvending,2:4:0:84 -0x0130,6,vendinglistreq,2 -0x0131,86 -0x0132,6 -0x0133,-1 -0x0134,-1,purchasereq,2:4:8 -0x0135,7 -0x0136,-1 -0x0137,6 -0x0138,3 -0x0139,16 -0x013a,4 -0x013b,4 -0x013c,4 -0x013d,6 -0x013e,24 -0x013f,26,itemmonster,2 -0x0140,22,mapmove,2:18:20 -0x0141,14 -0x0142,6 -0x0143,10,npcamountinput,2:6 -0x0144,23 -0x0145,19 -0x0146,6,npccloseclicked,2 -0x0147,39 -0x0148,8 -0x0149,9,gmreqnochat,2:6:7 -0x014a,6 -0x014b,27 -0x014c,-1 -0x014d,2,guildcheckmaster,0 -0x014e,6 -0x014f,6,guildrequestinfo,2 -0x0150,110 -0x0151,6,guildrequestemblem,2 -0x0152,-1 -0x0153,-1,guildchangeemblem,2:4 -0x0154,-1 -0x0155,-1,guildchangememberposition,2:4 -0x0156,-1 -0x0157,6 -0x0158,-1 -0x0159,54,guildleave,2:6:10:14 -0x015a,66 -0x015b,54,guildexpulsion,2:6:10:14 -0x015c,90 -0x015d,42,guildbreak,2 -0x015e,6 -0x015f,42 -0x0160,-1 -0x0161,-1,guildchangepositioninfo,2:4 -0x0162,-1 -0x0163,-1 -0x0164,-1 -0x0165,30,createguild,2:6 -0x0166,-1 -0x0167,3 -0x0168,14,guildinvite,2:6:10 -0x0169,3 -0x016a,30 -0x016b,10,guildreplyinvite,2:6 -0x016c,43 -0x016d,14 -0x016e,186,guildchangenotice,2:6:66 -0x016f,182 -0x0170,14,guildrequestalliance,2:6:10 -0x0171,30 -0x0172,10,guildreplyalliance,2:6 -0x0173,3 -0x0174,-1 -0x0175,6 -0x0176,106 -0x0177,-1 -0x0178,4,itemidentify,2 -0x0179,5 -0x017a,4,usecard,2 -0x017b,-1 -0x017c,6,insertcard,2:4 -0x017d,7 -0x017e,-1,guildmessage,2:4 -0x017f,-1 -0x0180,6,guildopposition,2 -0x0181,3 -0x0182,106 -0x0183,10,guilddelalliance,2:6 -0x0184,10 -0x0185,34 -//0x0186,-1 -0x0187,6 -0x0188,8 -0x0189,4 -0x018a,4,quitgame,2 -0x018b,4 -0x018c,29 -0x018d,-1 -0x018e,10,producemix,2:4:6:8 -0x018f,6 -0x0190,90,useskilltoposinfo,2:4:6:8:10 -0x0191,86 -0x0192,24 -0x0193,6,solvecharname,2 -0x0194,30 -0x0195,102 -0x0196,9 -0x0197,4,resetchar,2 -0x0198,8,changemaptype,2:4:6 -0x0199,4 -0x019a,14 -0x019b,10 -0x019c,-1,localbroadcast,2:4 -0x019d,6,gmhide,2 -0x019e,2 -0x019f,6,catchpet,2 -0x01a0,3 -0x01a1,3,petmenu,2 -0x01a2,35 -0x01a3,5 -0x01a4,11 -0x01a5,26,changepetname,2 -0x01a6,-1 -0x01a7,4,selectegg,2 -0x01a8,4 -0x01a9,6,sendemotion,2 -0x01aa,10 -0x01ab,12 -0x01ac,6 -0x01ad,-1 -0x01ae,4,selectarrow,2 -0x01af,4,changecart,2 -0x01b0,11 -0x01b1,7 -0x01b2,-1,openvending,2:4:84:85 -0x01b3,67 -0x01b4,12 -0x01b5,18 -0x01b6,114 -0x01b7,6 -0x01b8,3 -0x01b9,6 -0x01ba,26,remove,2 -0x01bb,26,shift,2 -0x01bc,26,recall,2 -0x01bd,26,summon,2 -0x01be,2 -0x01bf,3 -0x01c0,2 -0x01c1,14 -0x01c2,10 -0x01c3,-1 -0x01c4,22 -0x01c5,22 -0x01c6,4 -0x01c7,2 -0x01c8,13 -0x01c9,97 -//0x01ca,-1 -0x01cb,9 -0x01cc,9 -0x01cd,30 -0x01ce,6,autospell,2 -0x01cf,28 -0x01d0,8 -0x01d1,14 -0x01d2,10 -0x01d3,35 -0x01d4,6 -0x01d5,-1,npcstringinput,2:4:8 -0x01d6,4 -0x01d7,11 -0x01d8,54 -0x01d9,53 -0x01da,60 -0x01db,2 -0x01dc,-1 -0x01dd,47 -0x01de,33 -0x01df,6,gmreqaccname,2 -0x01e0,30 -0x01e1,8 -0x01e2,34 -0x01e3,14 -0x01e4,2 -0x01e5,6 -0x01e6,26 -0x01e7,2,sndoridori,0 -0x01e8,28,createparty2,2:26:27 -0x01e9,81 -0x01ea,6 -0x01eb,10 -0x01ec,26 -0x01ed,2,snexplosionspirits,0 -0x01ee,-1 -0x01ef,-1 -0x01f0,-1 -0x01f1,-1 -0x01f2,20 -0x01f3,10 -0x01f4,32 -0x01f5,9 -0x01f6,34 -0x01f7,14,adoptreply,2:6:10 -0x01f8,2 -0x01f9,6,adoptrequest,2 -0x01fa,48 -0x01fb,56 -0x01fc,-1 -0x01fd,4,repairitem,2 -0x01fe,5 -0x01ff,10 -0x0200,26 -0x0201,-1 -0x0202,26,friendslistadd,2 -0x0203,10,friendslistremove,2:6 -0x0204,18 -0x0205,26 -0x0206,11 -0x0207,34 -0x0208,11,friendslistreply,2:6:10 -0x0209,36 -0x020a,10 -//0x020b,-1 -//0x020c,-1 -0x020d,-1 -0x8b3,-1 -0x8d6,6,ZC_CLEAR_DIALOG,2 - -//2004-07-05aSakexe -packet_ver: 6 -0x0072,22,wanttoconnection,5:9:13:17:21 -0x0085,8,walktoxy,5 -0x00a7,13,useitem,5:9 -0x0113,15,useskilltoid,4:9:11 -0x0116,15,useskilltopos,4:9:11:13 -0x0190,95,useskilltoposinfo,4:9:11:13:15 -0x0208,14,friendslistreply,2:6:10 -0x020e,24 - -//2004-07-13aSakexe -packet_ver: 7 -0x0072,39,wanttoconnection,12:22:30:34:38 -0x0085,9,walktoxy,6 -0x009b,13,changedir,5:12 -0x009f,10,takeitem,6 -0x00a7,17,useitem,6:13 -0x0113,19,useskilltoid,7:9:15 -0x0116,19,useskilltopos,7:9:15:17 -0x0190,99,useskilltoposinfo,7:9:15:17:19 - -//2004-07-26aSakexe -packet_ver: 8 -0x0072,14,dropitem,5:12 -0x007e,33,wanttoconnection,12:18:24:28:32 -0x0085,20,useskilltoid,7:12:16 -0x0089,15,getcharnamerequest,11 -0x008c,23,useskilltopos,3:6:17:21 -0x0094,10,takeitem,6 -0x009b,6,walktoxy,3 -0x009f,13,changedir,5:12 -0x00a2,103,useskilltoposinfo,3:6:17:21:23 -0x00a7,12,solvecharname,8 -0x00f3,-1,globalmessage,2:4 -0x00f5,17,useitem,6:12 -0x00f7,10,ticksend,6 -0x0113,16,movetokafra,5:12 -0x0116,2,closekafra,0 -0x0190,26,movefromkafra,10:22 -0x0193,9,actionrequest,3:8 - -//2004-08-09aSakexe -packet_ver: 9 -0x0072,17,dropitem,8:15 -0x007e,37,wanttoconnection,9:21:28:32:36 -0x0085,26,useskilltoid,11:18:22 -0x0089,12,getcharnamerequest,8 -0x008c,40,useskilltopos,5:15:29:38 -0x0094,13,takeitem,9 -0x009b,15,walktoxy,12 -0x009f,12,changedir,7:11 -0x00a2,120,useskilltoposinfo,5:15:29:38:40 -0x00a7,11,solvecharname,7 -0x00f5,24,useitem,9:20 -0x00f7,13,ticksend,9 -0x0113,23,movetokafra,5:19 -0x0190,26,movefromkafra,11:22 -0x0193,18,actionrequest,7:17 - -//2004-08-16aSakexe -0x0212,26,rc,2 -0x0213,26,check,2 -0x0214,42 - -//2004-08-17aSakexe -0x020f,10,pvpinfo,2:6 -0x0210,22 - -//2004-09-06aSakexe -packet_ver: 10 -0x0072,20,useitem,9:20 -0x007e,19,movetokafra,3:15 -0x0085,23,actionrequest,9:22 -0x0089,9,walktoxy,6 -0x008c,105,useskilltoposinfo,10:14:18:23:25 -0x0094,17,dropitem,6:15 -0x009b,14,getcharnamerequest,10 -0x009f,-1,globalmessage,2:4 -0x00a2,14,solvecharname,10 -0x00a7,25,useskilltopos,10:14:18:23 -0x00f3,10,changedir,4:9 -0x00f5,34,wanttoconnection,7:15:25:29:33 -0x00f7,2,closekafra,0 -0x0113,11,takeitem,7 -0x0116,11,ticksend,7 -0x0190,22,useskilltoid,9:15:18 -0x0193,17,movefromkafra,3:13 - -//2004-09-20aSakexe -packet_ver: 11 -0x0072,18,useitem,10:14 -0x007e,25,movetokafra,6:21 -0x0085,9,actionrequest,3:8 -0x0089,14,walktoxy,11 -0x008c,109,useskilltoposinfo,16:20:23:27:29 -0x0094,19,dropitem,12:17 -0x009b,10,getcharnamerequest,6 -0x00a2,10,solvecharname,6 -0x00a7,29,useskilltopos,6:20:23:27 -0x00f3,18,changedir,8:17 -0x00f5,32,wanttoconnection,10:17:23:27:31 -0x0113,14,takeitem,10 -0x0116,14,ticksend,10 -0x0190,14,useskilltoid,4:7:10 -0x0193,12,movefromkafra,4:8 - -//2004-10-05aSakexe -packet_ver: 12 -0x0072,17,useitem,6:13 -0x007e,16,movetokafra,5:12 -0x0089,6,walktoxy,3 -0x008c,103,useskilltoposinfo,2:6:17:21:23 -0x0094,14,dropitem,5:12 -0x009b,15,getcharnamerequest,11 -0x00a2,12,solvecharname,8 -0x00a7,23,useskilltopos,3:6:17:21 -0x00f3,13,changedir,5:12 -0x00f5,33,wanttoconnection,12:18:24:28:32 -0x0113,10,takeitem,6 -0x0116,10,ticksend,6 -0x0190,20,useskilltoid,7:12:16 -0x0193,26,movefromkafra,10:22 - -//2004-10-25aSakexe -packet_ver: 13 -0x0072,13,useitem,5:9 -0x007e,13,movetokafra,6:9 -0x0085,15,actionrequest,4:14 -0x008c,108,useskilltoposinfo,6:9:23:26:28 -0x0094,12,dropitem,6:10 -0x009b,10,getcharnamerequest,6 -0x00a2,16,solvecharname,12 -0x00a7,28,useskilltopos,6:9:23:26 -0x00f3,15,changedir,6:14 -0x00f5,29,wanttoconnection,5:14:20:24:28 -0x0113,9,takeitem,5 -0x0116,9,ticksend,5 -0x0190,26,useskilltoid,4:10:22 -0x0193,22,movefromkafra,12:18 - -//2004-11-01aSakexe -0x0084,-1 -0x0215,6 - -//2004-11-08aSakexe -0x0084,2 -0x0216,6 -0x0217,2,blacksmith,0 -0x0218,2,alchemist,0 -0x0219,282 -0x021a,282 -0x021b,10 -0x021c,10 - -//2004-11-15aSakexe -0x021d,6,lesseffect,2 - -//2004-11-29aSakexe -packet_ver: 14 -0x0072,22,useskilltoid,8:12:18 -0x007e,30,useskilltopos,4:9:22:28 -0x0085,-1,globalmessage,2:4 -0x0089,7,ticksend,3 -0x008c,13,getcharnamerequest,9 -0x0094,14,movetokafra,4:10 -0x009b,2,closekafra,0 -0x009f,18,actionrequest,6:17 -0x00a2,7,takeitem,3 -0x00a7,7,walktoxy,4 -0x00f3,8,changedir,3:7 -0x00f5,29,wanttoconnection,3:10:20:24:28 -0x00f7,14,solvecharname,10 -0x0113,110,useskilltoposinfo,4:9:22:28:30 -0x0116,12,dropitem,4:10 -0x0190,15,useitem,3:11 -0x0193,21,movefromkafra,4:17 -0x0221,-1 -0x0222,6,weaponrefine,2 -0x0223,8 - -//2004-12-13aSakexe -//skipped: many packets being set to -1 -0x0066,3 -0x0070,3 -0x01ca,3 -0x021e,6 -0x021f,66 -0x0220,10 - -//2005-01-10bSakexe -packet_ver: 15 -0x0072,26,useskilltoid,8:16:22 -0x007e,114,useskilltoposinfo,10:18:22:32:34 -0x0085,23,changedir,12:22 -0x0089,9,ticksend,5 -0x008c,8,getcharnamerequest,4 -0x0094,20,movetokafra,10:16 -0x009b,32,wanttoconnection,3:12:23:27:31 -0x009f,17,useitem,5:13 -0x00a2,11,solvecharname,7 -0x00a7,13,walktoxy,10 -0x00f3,-1,globalmessage,2:4 -0x00f5,9,takeitem,5 -0x00f7,21,movefromkafra,11:17 -0x0113,34,useskilltopos,10:18:22:32 -0x0116,20,dropitem,15:18 -0x0190,20,actionrequest,9:19 -0x0193,2,closekafra,0 - -//2005-03-28aSakexe -0x0224,10 -0x0225,2,taekwon,0 -0x0226,282 - -//2005-04-04aSakexe -0x0227,18 -0x0228,18 - -//2005-04-11aSakexe -0x0229,15 -0x022a,58 -0x022b,57 -0x022c,64 - -//2005-04-25aSakexe -0x022d,5,hommenu,2:4 -0x0232,9,hommoveto,2:6 -0x0233,11,homattack,2:6:10 -0x0234,6,hommovetomaster,2 - -//2005-05-09aSakexe -packet_ver: 16 -0x0072,25,useskilltoid,6:10:21 -0x007e,102,useskilltoposinfo,5:9:12:20:22 -0x0085,11,changedir,7:10 -0x0089,8,ticksend,4 -0x008c,11,getcharnamerequest,7 -0x0094,14,movetokafra,7:10 -0x009b,26,wanttoconnection,4:9:17:21:25 -0x009f,14,useitem,4:10 -0x00a2,15,solvecharname,11 -0x00a7,8,walktoxy,5 -0x00f5,8,takeitem,4 -0x00f7,22,movefromkafra,14:18 -0x0113,22,useskilltopos,5:9:12:20 -0x0116,10,dropitem,5:8 -0x0190,19,actionrequest,5:18 - -//2005-05-23aSakexe -0x022e,69 -0x0230,12 - -//2005-05-30aSakexe -0x022e,71 -0x0235,-1 -0x0236,10 -0x0237,2,rankingpk,0 -0x0238,282 - -//2005-05-31aSakexe -0x0216,2 -0x0239,11 - -//2005-06-08aSakexe -0x0216,6 -0x0217,2,blacksmith,0 -0x022f,5 -0x0231,26,changehomunculusname,2 -0x023a,4 -0x023b,36,storagepassword,2:4:20 -0x023c,6 - -//2005-06-22aSakexe -0x022e,71 - -//2005-06-28aSakexe -packet_ver: 17 -0x0072,34,useskilltoid,6:17:30 -0x007e,113,useskilltoposinfo,12:15:18:31:33 -0x0085,17,changedir,8:16 -0x0089,13,ticksend,9 -0x008c,8,getcharnamerequest,4 -0x0094,31,movetokafra,16:27 -0x009b,32,wanttoconnection,9:15:23:27:31 -0x009f,19,useitem,9:15 -0x00a2,9,solvecharname,5 -0x00a7,11,walktoxy,8 -0x00f5,13,takeitem,9 -0x00f7,18,movefromkafra,11:14 -0x0113,33,useskilltopos,12:15:18:31 -0x0116,12,dropitem,3:10 -0x0190,24,actionrequest,11:23 -0x0216,-1 -0x023d,-1 -0x023e,4 - -//2005-07-18aSakexe -packet_ver: 18 -0x0072,19,useskilltoid,5:11:15 -0x007e,110,useskilltoposinfo,9:15:23:28:30 -0x0085,11,changedir,6:10 -0x0089,7,ticksend,3 -0x008c,11,getcharnamerequest,7 -0x0094,21,movetokafra,12:17 -0x009b,31,wanttoconnection,3:13:22:26:30 -0x009f,12,useitem,3:8 -0x00a2,18,solvecharname,14 -0x00a7,15,walktoxy,12 -0x00f5,7,takeitem,3 -0x00f7,13,movefromkafra,5:9 -0x0113,30,useskilltopos,9:15:23:28 -0x0116,12,dropitem,6:10 -0x0190,21,actionrequest,5:20 -0x0216,6 -0x023f,2,mailrefresh,0 -0x0240,8 -0x0241,6,mailread,2 -0x0242,-1 -0x0243,6,maildelete,2 -0x0244,6,mailgetattach,2 -0x0245,7 -0x0246,4,mailwinopen,2 -0x0247,8,mailsetattach,2:4 -0x0248,68 -0x0249,3 -0x024a,70 -0x024b,4,auctioncancelreg,2 -0x024c,8,auctionsetitem,2:4 -0x024d,14 -0x024e,6,auctioncancel,2 -0x024f,10,auctionbid,2:6 -0x0250,3 -0x0251,2 -0x0252,-1 - -//2005-07-19bSakexe -packet_ver: 19 -0x0072,34,useskilltoid,6:17:30 -0x007e,113,useskilltoposinfo,12:15:18:31:33 -0x0085,17,changedir,8:16 -0x0089,13,ticksend,9 -0x008c,8,getcharnamerequest,4 -0x0094,31,movetokafra,16:27 -0x009b,32,wanttoconnection,9:15:23:27:31 -0x009f,19,useitem,9:15 -0x00a2,9,solvecharname,5 -0x00a7,11,walktoxy,8 -0x00f5,13,takeitem,9 -0x00f7,18,movefromkafra,11:14 -0x0113,33,useskilltopos,12:15:18:31 -0x0116,12,dropitem,3:10 -0x0190,24,actionrequest,11:23 - -//2005-08-01aSakexe -0x0245,3 -0x0251,4 - -//2005-08-08aSakexe -0x024d,12,auctionregister,2:6:10 -0x024e,4 - -//2005-08-17aSakexe -0x0253,3 -0x0254,3,feelsaveok,2 - -//2005-08-29aSakexe -0x0240,-1 -0x0248,-1,mailsend,2:4:28:68:69 -0x0255,5 -0x0256,-1 -0x0257,8 - -//2005-09-12bSakexe -0x0256,5 -0x0258,2 -0x0259,3 - -//2005-10-10aSakexe -0x020e,32 -0x025a,-1 -0x025b,6,cooking,2:4 - -//2005-10-13aSakexe -0x007a,6 -0x0251,32 -0x025c,4,auctionbuysell,2 - -//2005-10-17aSakexe -0x007a,58 -0x025d,6,auctionclose,2 -0x025e,4 - -//2005-10-24aSakexe -0x025f,6 -0x0260,6 - -//2005-11-07aSakexe -0x024e,6,auctioncancel,2 -0x0251,34,auctionsearch,2:4:8:32 - -//2006-01-09aSakexe -0x0261,11 -0x0262,11 -0x0263,11 -0x0264,20 -0x0265,20 -0x0266,30 -0x0267,4 -0x0268,4 -0x0269,4 -0x026a,4 -0x026b,4 -0x026c,4 -0x026d,4 -0x026f,2 -0x0270,2 -0x0271,38 -0x0272,44 - -//2006-01-26aSakexe -0x0271,40 - -//2006-03-06aSakexe -0x0273,6 -0x0274,8 - -//2006-03-13aSakexe -0x0273,30,mailreturn,2:6 - -//2006-03-27aSakexe -packet_ver: 20 -0x0072,26,useskilltoid,11:18:22 -0x007e,120,useskilltoposinfo,5:15:29:38:40 -0x0085,12,changedir,7:11 -//0x0089,13,ticksend,9 -0x008c,12,getcharnamerequest,8 -0x0094,23,movetokafra,5:19 -0x009b,37,wanttoconnection,9:21:28:32:36 -0x009f,24,useitem,9:20 -0x00a2,11,solvecharname,7 -0x00a7,15,walktoxy,12 -0x00f5,13,takeitem,9 -0x00f7,26,movefromkafra,11:22 -0x0113,40,useskilltopos,5:15:29:38 -0x0116,17,dropitem,8:15 -0x0190,18,actionrequest,7:17 - -//2006-10-23aSakexe -0x006d,110 - -//2006-04-24aSakexe to 2007-01-02aSakexe -0x023e,8 -0x0277,84 -0x0278,2 -0x0279,2 -0x027a,-1 -0x027b,14 -0x027c,60 -0x027d,62 -0x027e,-1 -0x027f,8 -0x0280,12 -0x0281,4 -0x0282,284 -0x0283,6 -0x0284,14 -0x0285,6 -0x0286,4 -0x0287,-1 -0x0288,6 -0x0289,8 -0x028a,18 -0x028b,-1 -0x028c,46 -0x028d,34 -0x028e,4 -0x028f,6 -0x0290,4 -0x0291,4 -0x0292,2,autorevive,0 -0x0293,70 -0x0294,10 -0x0295,-1 -0x0296,-1 -0x0297,-1 -0x0298,8 -0x0299,6 -0x029a,27 -0x029c,66 -0x029d,-1 -0x029e,11 -0x029f,3,mermenu,2 -0x02a0,-1 -0x02a1,-1 -0x02a2,8 - -//2007-01-08aSakexe -packet_ver: 21 -0x0072,30,useskilltoid,10:14:26 -0x007e,120,useskilltoposinfo,10:19:23:38:40 -0x0085,14,changedir,10:13 -0x0089,11,ticksend,7 -0x008c,17,getcharnamerequest,13 -0x0094,17,movetokafra,4:13 -0x009b,35,wanttoconnection,7:21:26:30:34 -0x009f,21,useitem,7:17 -0x00a2,10,solvecharname,6 -0x00a7,8,walktoxy,5 -0x00f5,11,takeitem,7 -0x00f7,15,movefromkafra,3:11 -0x0113,40,useskilltopos,10:19:23:38 -0x0116,19,dropitem,11:17 -0x0190,10,actionrequest,4:9 - -//2007-01-22aSakexe -0x02a3,18 -0x02a4,2 - -//2007-01-29aSakexe -0x029b,72 -0x02a3,-1 -0x02a4,-1 -0x02a5,8 - -// 2007-02-05aSakexe -0x02aa,4 -0x02ab,36 -0x02ac,6 - -//2007-02-12aSakexe -packet_ver: 22 -0x0072,25,useskilltoid,6:10:21 -0x007e,102,useskilltoposinfo,5:9:12:20:22 -0x0085,11,changedir,7:10 -0x0089,8,ticksend,4 -0x008c,11,getcharnamerequest,7 -0x0094,14,movetokafra,7:10 -0x009b,26,wanttoconnection,4:9:17:21:25 -0x009f,14,useitem,4:10 -0x00a2,15,solvecharname,11 -//0x00a7,8,walktoxy,5 -0x00f5,8,takeitem,4 -0x00f7,22,movefromkafra,14:18 -0x0113,22,useskilltopos,5:9:12:20 -0x0116,10,dropitem,5:8 -0x0190,19,actionrequest,5:18 - -//2007-05-07aSakexe -0x01fd,15,repairitem,2:4:6:7:9:11:13 - -//2007-02-27aSakexe to 2007-10-02aSakexe -0x0288,10,cashshopbuy,2:4:6 -0x0289,12 -0x02a6,22 -0x02a7,22 -0x02a8,162 -0x02a9,58 -0x02ad,8 -0x02b0,85 -0x02b1,-1 -0x02b2,-1 -0x02b3,107 -0x02b4,6 -0x02b5,-1 -0x02b6,7,queststate,2:6 -0x02b7,7 -0x02b8,22 -0x02b9,191 -0x02ba,11,hotkey,2:4:5:9 -0x02bb,8 -0x02bc,6 -0x02bf,10 -0x02c0,2 -0x02c1,-1 -0x02c2,-1 -0x02c4,26,partyinvite2,2 -0x02c5,30 -0x02c6,30 -0x02c7,7,replypartyinvite2,2:6 -0x02c8,3,partytick,2 -0x02c9,3 -0x02ca,3 -0x02cb,20 -0x02cc,4 -0x02cd,26 -0x02ce,10 -0x02cf,6 -0x02d0,-1 -0x02d1,-1 -0x02d2,-1 -0x02d3,4,ZC_NOTIFY_BIND_ON_EQUIP,2 -0x02d4,29 -0x02d5,2 -0x02d6,6,viewplayerequip,2 -0x02d7,-1 -0x02d8,10,equiptickbox,2:6 -0x02d9,10 -0x02da,3 -0x02db,-1,battlechat,2:4 -0x02dc,-1 -0x02dd,32 -0x02de,6 -0x02df,36 -0x02e0,34 - -//2007-10-23aSakexe -0x02cb,65 -0x02cd,71 - -//2007-11-06aSakexe -0x0078,55 -0x007c,42 -0x022c,65 -0x029b,80 - -//2007-11-13aSakexe -0x02e1,33 - -//2007-11-20aSakexe -//0x01df,10 <- ??? -0x02e2,14 -0x02e3,25 -0x02e4,8 -0x02e5,8 -0x02e6,6 - -//2007-11-27aSakexe -0x02e7,-1 - -//2008-01-02aSakexe -0x01df,6,gmreqaccname,2 -0x02e8,-1 -0x02e9,-1 -0x02ea,-1 -0x02eb,13 -0x02ec,67 -0x02ed,59 -0x02ee,60 -0x02ef,8 - -//2008-03-18aSakexe -0x02bf,-1 -0x02c0,-1 -0x02f0,10 -0x02f1,2,progressbar,0 -0x02f2,2 - -//2008-03-25bSakexe -0x02f3,-1 -0x02f4,-1 -0x02f5,-1 -0x02f6,-1 -0x02f7,-1 -0x02f8,-1 -0x02f9,-1 -0x02fa,-1 -0x02fb,-1 -0x02fc,-1 -0x02fd,-1 -0x02fe,-1 -0x02ff,-1 -0x0300,-1 - -//2008-04-01aSakexe -0x0301,-1 -0x0302,-1 -0x0303,-1 -0x0304,-1 -0x0305,-1 -0x0306,-1 -0x0307,-1 -0x0308,-1 -0x0309,-1 -0x030a,-1 -0x030b,-1 -0x030c,-1 -0x030d,-1 -0x030e,-1 -0x030f,-1 -0x0310,-1 -0x0311,-1 -0x0312,-1 -0x0313,-1 -0x0314,-1 -0x0315,-1 -0x0316,-1 -0x0317,-1 -0x0318,-1 -0x0319,-1 -0x031a,-1 -0x031b,-1 -0x031c,-1 -0x031d,-1 -0x031e,-1 -0x031f,-1 -0x0320,-1 -0x0321,-1 -0x0322,-1 -0x0323,-1 -0x0324,-1 -0x0325,-1 -0x0326,-1 -0x0327,-1 -0x0328,-1 -0x0329,-1 -0x032a,-1 -0x032b,-1 -0x032c,-1 -0x032d,-1 -0x032e,-1 -0x032f,-1 -0x0330,-1 -0x0331,-1 -0x0332,-1 -0x0333,-1 -0x0334,-1 -0x0335,-1 -0x0336,-1 -0x0337,-1 -0x0338,-1 -0x0339,-1 -0x033a,-1 -0x033b,-1 -0x033c,-1 -0x033d,-1 -0x033e,-1 -0x033f,-1 -0x0340,-1 -0x0341,-1 -0x0342,-1 -0x0343,-1 -0x0344,-1 -0x0345,-1 -0x0346,-1 -0x0347,-1 -0x0348,-1 -0x0349,-1 -0x034a,-1 -0x034b,-1 -0x034c,-1 -0x034d,-1 -0x034e,-1 -0x034f,-1 -0x0350,-1 -0x0351,-1 -0x0352,-1 -0x0353,-1 -0x0354,-1 -0x0355,-1 -0x0356,-1 -0x0357,-1 -0x0358,-1 -0x0359,-1 -0x035a,-1 - -//2008-05-27aSakexe -0x035b,-1 -0x035c,2 -0x035d,-1 -0x035e,2 -0x035f,-1 -0x0389,-1 - -//2008-08-20aSakexe -0x040c,-1 -0x040d,-1 -0x040e,-1 -0x040f,-1 -0x0410,-1 -0x0411,-1 -0x0412,-1 -0x0413,-1 -0x0414,-1 -0x0415,-1 -0x0416,-1 -0x0417,-1 -0x0418,-1 -0x0419,-1 -0x041a,-1 -0x041b,-1 -0x041c,-1 -0x041d,-1 -0x041e,-1 -0x041f,-1 -0x0420,-1 -0x0421,-1 -0x0422,-1 -0x0423,-1 -0x0424,-1 -0x0425,-1 -0x0426,-1 -0x0427,-1 -0x0428,-1 -0x0429,-1 -0x042a,-1 -0x042b,-1 -0x042c,-1 -0x042d,-1 -0x042e,-1 -0x042f,-1 -0x0430,-1 -0x0431,-1 -0x0432,-1 -0x0433,-1 -0x0434,-1 -0x0435,-1 - -//2008-09-10aSakexe -packet_ver: 23 -0x0436,19,wanttoconnection,2:6:10:14:18 -0x0437,7,actionrequest,2:6 -0x0438,10,useskilltoid,2:4:6 -0x0439,8,useitem,2:4 - -//2008-11-13aSakexe -0x043d,8 -0x043e,-1 -0x043f,8 - -//2008-11-26aSakexe -0x01a2,37 -0x0440,10 -0x0441,4 - -//2008-12-10aSakexe -0x0442,-1 -0x0443,8,skillselectmenu,2:6 - -//2009-01-14aSakexe -0x043f,25 -0x0444,-1 -0x0445,10 - -//2009-02-18aSakexe -0x0446,14 - -//2009-02-25aSakexe -0x0448,-1 - -//2009-03-30aSakexe -0x0449,4 - -//2009-04-08aSakexe -0x02a6,-1 -0x02a7,-1 -0x044a,6,clientversion,2 - -//Renewal Clients -//2008-08-27aRagexeRE -packet_ver: 24 -0x0072,22,useskilltoid,9:15:18 -0x007c,44 -0x007e,105,useskilltoposinfo,10:14:18:23:25 -0x0085,10,changedir,4:9 -0x0089,11,ticksend,7 -0x008c,14,getcharnamerequest,10 -0x0094,19,movetokafra,3:15 -0x009b,34,wanttoconnection,7:15:25:29:33 -0x009f,20,useitem,7:20 -0x00a2,14,solvecharname,10 -0x00a7,9,walktoxy,6 -0x00f5,11,takeitem,7 -0x00f7,17,movefromkafra,3:13 -0x0113,25,useskilltopos,10:14:18:23 -0x0116,17,dropitem,6:15 -0x0190,23,actionrequest,9:22 -0x02e2,20 -0x02e3,22 -0x02e4,11 -0x02e5,9 - -//2008-09-10aRagexeRE -packet_ver: 25 -0x0436,19,wanttoconnection,2:6:10:14:18 -0x0437,7,actionrequest,2:6 -0x0438,10,useskilltoid,2:4:6 -0x0439,8,useitem,2:4 - -//2008-11-12aRagexeRE -0x043d,8 -//0x043e,-1 -0x043f,8 - -//2008-12-17aRagexeRE -0x01a2,37 -//0x0440,10 -//0x0441,4 -//0x0442,8 -//0x0443,8 - -//2008-12-17bRagexeRE -0x006d,114 - -//2009-01-21aRagexeRE -0x043f,25 -//0x0444,-1 -//0x0445,10 - -//2009-02-18aRagexeRE -//0x0446,14 - -//2009-02-26cRagexeRE -//0x0448,-1 - -//2009-04-01aRagexeRE -//0x0449,4 - -//2009-05-14aRagexeRE -//0x044b,2 - -//2009-05-20aRagexeRE -//0x07d0,6 -//0x07d1,2 -//0x07d2,-1 -//0x07d3,4 -//0x07d4,4 -//0x07d5,4 -//0x07d6,4 -//0x0447,2 - -//2009-06-03aRagexeRE -0x07d7,8,partychangeoption,2:6:7 -0x07d8,8 -0x07d9,254 -0x07da,6,partychangeleader,2 - -//2009-06-10aRagexeRE -//0x07db,8 - -//2009-06-17aRagexeRE -0x07d9,268 -//0x07dc,6 -//0x07dd,54 -//0x07de,30 -//0x07df,54 - -//2009-07-01aRagexeRE -//0x0275,37 -//0x0276,-1 - -//2009-07-08aRagexeRE -//0x07e0,58 - -//2009-07-15aRagexeRE -0x07e1,15 - -//2009-08-05aRagexeRE -0x07e2,8 - -//2009-08-18aRagexeRE -0x07e3,6 -0x07e4,-1,itemlistwindowselected,2:4:8:12 -0x07e6,8 - -//2009-08-25aRagexeRE -//0x07e6,28 -0x07e7,5 - -//2009-09-22aRagexeRE -0x07e5,8 -0x07e6,8 -0x07e7,32 -0x07e8,-1 -0x07e9,5 - -//2009-09-29aRagexeRE -//0x07ea,2 -//0x07eb,-1 -//0x07ec,6 -//0x07ed,8 -//0x07ee,6 -//0x07ef,8 -//0x07f0,4 -//0x07f2,4 -//0x07f3,3 - -//2009-10-06aRagexeRE -//0x07ec,8 -//0x07ed,10 -//0x07f0,8 -//0x07f1,15 -//0x07f2,6 -//0x07f3,4 -//0x07f4,3 - -//2009-10-27aRagexeRE -0x07f5,6,gmfullstrip,2 -0x07f6,14 - -//2009-11-03aRagexeRE -0x07f7,-1 -0x07f8,-1 -0x07f9,-1 - -//2009-11-17aRagexeRE -0x07fa,8 - -//2009-11-24aRagexeRE -0x07fb,25 - -//2009-12-01aRagexeRE -0x07fc,10 -0x07fd,-1,ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN,0 -0x07fe,26 -//0x07ff,-1 - -//2009-12-15aRagexeRE -0x0800,-1 -//0x0801,-1 - -//2009-12-22aRagexeRE -0x0802,18,bookingregreq,2:4:6 // Booking System -0x0803,4 -0x0804,8 // Booking System -0x0805,-1 -0x0806,4,bookingdelreq,2 // Booking System -//0x0807,2 -0x0808,4 // Booking System -//0x0809,14 -//0x080A,50 -//0x080B,18 -//0x080C,6 - -//2009-12-29aRagexeRE -0x0804,14,bookingsearchreq,2:4:6:8:12 // Booking System -0x0806,2,bookingdelreq,0 // Booking System -0x0807,4 -0x0808,14,bookingupdatereq,2 // Booking System -0x0809,50 -0x080A,18 -0x080B,6 // Booking System - -//2010-01-05aRagexeRE -0x0801,-1,purchasereq2,2:4:8:12 - -//2010-01-26aRagexeRE -//0x080C,2 -//0x080D,3 -0x080E,14 - -//2010-02-09aRagexeRE -//0x07F0,6 - -//2010-02-23aRagexeRE -0x080F,20 - -//2010-03-03aRagexeRE -0x0810,3 -0x0811,-1,reqopenbuyingstore,2:4:8:9:89 -//0x0812,86 -//0x0813,6 -//0x0814,6 -//0x0815,-1 -//0x0817,-1 -//0x0818,6 -//0x0819,4 - -//2010-03-09aRagexeRE -0x0813,-1 -//0x0814,2 -//0x0815,6 -0x0816,6 -0x0818,-1 -//0x0819,10 -//0x081A,4 -//0x081B,4 -//0x081C,6 -0x081d,22 -0x081e,8 - -//2010-03-23aRagexeRE -//0x081F,-1 - -//2010-04-06aRagexeRE -//0x081A,6 - -//2010-04-13aRagexeRE -//0x081A,10 -0x0820,11 -//0x0821,2 -//0x0822,9 -//0x0823,-1 - -//2010-04-14dRagexeRE -//0x081B,8 - -//2010-04-20aRagexeRE -0x0812,8 -0x0814,86 -0x0815,2,reqclosebuyingstore,0 -0x0817,6,reqclickbuyingstore,2 -0x0819,-1,reqtradebuyingstore,2:4:8:12 -0x081a,4 -0x081b,10 -0x081c,10 -0x0824,6 - -//2010-06-01aRagexeRE -//0x0825,-1 -//0x0826,4 -0x0835,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0836,-1 -0x0837,3 -//0x0838,3 - -//2010-06-08aRagexeRE -0x0838,2,searchstoreinfonextpage,0 -0x083A,4 // Search Stalls Feature -0x083B,2,closesearchstoreinfo,0 -0x083C,12,searchstoreinfolistitemclick,2:6:10 -0x083D,6 - -//2010-06-15aRagexeRE -//0x083E,26 - -//2010-06-22aRagexeRE -//0x083F,22 - -//2010-06-29aRagexeRE -0x00AA,9,ZC_WEAR_EQUIP_ACK,2:4:6:8 -//0x07F1,18 -//0x07F2,8 -//0x07F3,6 - -//2010-07-01aRagexeRE -0x083A,5 // Search Stalls Feature - -//2010-07-13aRagexeRE -//0x0827,6 -//0x0828,14 -//0x0829,6 -//0x082A,10 -//0x082B,6 -//0x082C,14 -//0x0840,-1 -//0x0841,19 - -//2010-07-14aRagexeRE -//0x0841,4 - -//2010-08-03aRagexeRE -0x0839,66 -0x0842,6,recall2,2 -0x0843,6,remove2,2 - -//2010-11-24aRagexeRE -packet_ver: 26 -0x0288,-1,cashshopbuy,2:4:8:10 -0x0436,19,wanttoconnection,2:6:10:14:18 -0x035f,5,walktoxy,2 -0x0360,6,ticksend,2 -0x0361,5,changedir,2:4 -0x0362,6,takeitem,2 -0x0363,6,dropitem,2:4 -0x0364,8,movetokafra,2:4 -0x0365,8,movefromkafra,2:4 -0x0366,10,useskilltopos,2:4:6:8 -0x0367,90,useskilltoposinfo,2:4:6:8:10 -0x0368,6,getcharnamerequest,2 -0x0369,6,solvecharname,2 -0x0856,-1 -0x0857,-1 -0x0858,-1 -0x0859,-1 -0x08d0,9,ZC_WEAR_EQUIP_ACK,2:4:6:8 - -//2011-10-05aRagexeRE -packet_ver: 27 -packet_keys: 0x291E6762,0x77CD391A,0x60AC2F16 // [Shakto] -0x0364,5,walktoxy,2 -0x0817,6,ticksend,2 -0x0366,5,changedir,2:4 -0x0815,6,takeitem,2 -0x0885,6,dropitem,2:4 -0x0893,8,movetokafra,2:4 -0x0897,8,movefromkafra,2:4 -0x0369,10,useskilltopos,2:4:6:8 -0x08ad,90,useskilltoposinfo,2:4:6:8:10 -0x088a,6,getcharnamerequest,2 -0x0838,6,solvecharname,2 -0x0439,8,useitem,2:4 -0x08d2,10 -0x08d1,7 -0x0846,4,cashshopreqtab,2 //2011-07-18 - -// 2011-11-02aRagexe -packet_ver: 28 -packet_keys: 0x5324329D,0x5D545D52,0x06137269 // [Shakto] -0x0436,26,friendslistadd,2 -0x0898,5,hommenu,2:4 -0x0281,36,storagepassword,2:4:20 -0x088d,26,partyinvite2,2 -0x083c,19,wanttoconnection,2:6:10:14:18 -0x08aa,7,actionrequest,2:6 -0x02c4,10,useskilltoid,2:4:6 -0x0811,-1,itemlistwindowselected,2:4:8:12 -0x0890,8 -0x08a5,18,bookingregreq,2:4:6 -0x0835,-1,reqopenbuyingstore,2:4:8:9:89 -0x089b,2,reqclosebuyingstore,0 -0x08a1,6,reqclickbuyingstore,2 -0x089e,-1,reqtradebuyingstore,2:4:8:12 -0x08ab,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x088b,2,searchstoreinfonextpage,0 -0x08a2,12,searchstoreinfolistitemclick,2:6:10 -0x08cf,10 //Amulet spirits - -//2012-03-07fRagexeRE -packet_ver:29 -packet_keys: 0x382A6DEF,0x5CBE7202,0x61F46637 // [Shakto] -0x086A,19,wanttoconnection,2:6:10:14:18 -0x0437,5,walktoxy,2 -0x0887,6,ticksend,2 -0x0890,5,changedir,2:4 -0x0865,6,takeitem,2 -0x02C4,6,dropitem,2:4 -0x093B,8,movetokafra,2:4 -0x0963,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0369,26,friendslistadd,2 -0x0863,5,hommenu,2:4 -0x0861,36,storagepassword,2:4:20 -0x0929,26,partyinvite2,2 -0x0885,7,actionrequest,2:6 -0x0889,10,useskilltoid,2:4:6 -0x0870,-1,itemlistwindowselected,2:4:8:12 -//0x0926,41,bookingregreq,2:4:6 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0817,2,reqclosebuyingstore,0 -0x0360,6,reqclickbuyingstore,2 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0884,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0835,2,searchstoreinfonextpage,0 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0439,8,useitem,2:4 -0x0365,41,bookingregreq,2:4:6 - -// New Packet -0x090F,-1 // ZC_NOTIFY_NEWENTRY7 -0x0914,-1 // ZC_NOTIFY_MOVEENTRY8 -0x0915,-1 // ZC_NOTIFY_STANDENTRY9 - -//2012-04-10aRagexeRE -packet_ver: 30 -packet_keys: 0x01581359,0x452D6FFA,0x6AFB6E2E // [Shakto] -0x01fd,15,repairitem,2:4:6:7:9:11:13 -0x089c,26,friendslistadd,2 -0x0885,5,hommenu,2:4 -0x0961,36,storagepassword,2:4:20 -0x0288,-1,cashshopbuy,2:4:8:10 -0x091c,26,partyinvite2,2 -0x094b,19,wanttoconnection,2:6:10:14:18 -0x0369,7,actionrequest,2:6 -0x083c,10,useskilltoid,2:4:6 -0x0439,8,useitem,2:4 -0x0945,-1,itemlistwindowselected,2:4:8:12 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0817,2,reqclosebuyingstore,0 -0x0360,6,reqclickbuyingstore,2 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0835,2,searchstoreinfonextpage,0 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0437,5,walktoxy,2 -0x0886,6,ticksend,2 -0x0871,5,changedir,2:4 -0x0938,6,takeitem,2 -0x0891,6,dropitem,2:4 -0x086c,8,movetokafra,2:4 -0x08a6,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x0889,6,getcharnamerequest,2 -0x0884,6,solvecharname,2 -0x08e6,4 -0x08e7,10,bookingsearchreq,2:4:6:8:12 -0x08e8,-1 -0x08e9,2,bookingdelreq,0 -0x08ea,4 -0x08eb,39,bookingupdatereq,2 -0x08ec,73 -0x08ed,43 -0x08ee,6 -0x08ef,6,bookingignorereq,2 -0x08f0,6 -0x08f1,6,bookingjoinpartyreq,2 -0x08f2,36 -0x08f3,-1 -0x08f4,6 -0x08f5,-1,bookingsummonmember,2:4 -0x08f6,22 -0x08f7,3 -0x08f8,7 -0x08f9,6 -0x08fa,6 -0x08fb,6,bookingcanceljoinparty,2 -0x0907,5,moveitem,2:4 -0x0908,5 -0x08d7,28,battlegroundreg,2:4 -0x0977,14 //Monster HP Bar -0x0916,26,guildinvite2,2 -0x091d,41,bookingregreq,2:4:6 -0x08cb,10,ZC_PERSONAL_INFOMATION,2:4:6:8:10:11:13:15 //Still need further information -// Merge Item -0x096D,-1,ZC_MERGE_ITEM_OPEN,2:4 // ZC_MERGE_ITEM_OPEN -0x096E,-1,mergeitem_req,2:4 // CZ_REQ_MERGE_ITEM -0x096F,7,ZC_ACK_MERGE_ITEM,2:4:6 // ZC_ACK_MERGE_ITEM -0x0974,2,mergeitem_cancel,0 // CZ_CANCEL_MERGE_ITEM -0x0844,2,cashshopopen,0 -0x0849,16 //clif_cashshop_result -0x0848,-1,cashshopbuy,2:6:4:10 -0x084a,2,cashshopclose,0 -0x08c9,2,cashshopitemlist,0 - -//2012-04-18aRagexeRE [Special Thanks to Judas!] -packet_ver: 31 -packet_keys: 0x01540E48,0x13041224,0x31247924 // [Shakto] -0x023B,26,friendslistadd,2 -0x0361,5,hommenu,2:4 -0x08A8,36,storagepassword,2:4:20 -0x0802,26,partyinvite2,2 -0x022D,19,wanttoconnection,2:6:10:14:18 -0x0281,-1,itemlistwindowselected,2:4:8:12 -0x035F,6,ticksend,2 -0x0202,5,changedir,2:4 -0x07E4,6,takeitem,2 -0x0362,6,dropitem,2:4 -0x07EC,8,movetokafra,2:4 -0x0364,8,movefromkafra,2:4 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x08E5,41,bookingregreq,2:4:6 //Added to prevent disconnections -0x08d2,10 - -//2012-06-18 -packet_ver: 32 -packet_keys: 0x261F261F,0x261F261F,0x261F261F // [Shakto] -0x0983,29 // ZC_MSG_STATE_CHANGE3 -0x0861,41,bookingregreq,2:4:6 //actually 12-05-03 - -//2012-07-02aRagexeRE (unstable) -packet_ver: 33 -packet_keys: 0x25733B31,0x53486CFD,0x398649BD // [Shakto] -0x0363,19,wanttoconnection,2:6:10:14:18 -0x0364,6,ticksend,2 -0x085a,7,actionrequest,2:6 -0x0861,8,movefromkafra,2:4 -0x0862,10,useskilltoid,2:4:6 -0x0863,10,useskilltopos,2:4:6:8 -0x0886,6,solvecharname,2 -0x0889,90,useskilltoposinfo,2:4:6:8:10 -0x089e,6,dropitem,2:4 -0x089f,6,takeitem,2 -0x08a0,8,movetokafra,2:4 -0x094a,6,getcharnamerequest,2 -0x0953,5,walktoxy,2 -0x0960,5,changedir,2:4 -0x0879,41,bookingregreq,2:4:6 - -//2013-03-20Ragexe (Judas) -packet_ver: 34 -packet_keys: 0x3F094C49,0x55F86C1E,0x58AA359A // [Shakto] -0x014f,6,guildrequestinfo,2 -0x01fd,15,repairitem,2:4:6:7:9:11:13 -//0x0281,-1,itemlistwindowselected,2:4:8:12 -0x035f,6,reqclickbuyingstore,2 -0x0363,6,ticksend,2 -0x0365,12,searchstoreinfolistitemclick,2:6:10 -0x0438,6,dropitem,2:4 -0x0447,2,booking_playcancel,0 // CZ_BLOCKING_PLAY_CANCEL -0x044A,6,clientversion,2 -0x0844,2,cashshopopen,0 -0x0849,16 //clif_cashshop_result -0x0848,-1,cashshopbuy,2:6:4:10 -0x084a,2,cashshopclose,0 -0x084b,19 //fallitem4 -0x085a,90,useskilltoposinfo,2:4:6:8:10 -0x085d,18,bookingregreq,2:4:6 -0x0868,-1,itemlistwindowselected,2:4:8:12 -0x086d,26,partyinvite2,2 -0x086f,26,friendslistadd,2 -0x0874,8,movefromkafra,2:4 -0x0881,5,walktoxy,2 -0x0886,2,reqclosebuyingstore,0 -0x0888,19,wanttoconnection,2:6:10:14:18 -0x088e,7,actionrequest,2:6 -0x0897,5,changedir,2:4 -0x0898,6,getcharnamerequest,2 -0x089b,10,useskilltoid,2:4:6 -0x08ac,8,movetokafra,2:4 -0x08c9,2,cashshopitemlist,0 -0x08cf,10 //Amulet spirits -0x08d2,10 -0x0907,5,moveitem,2:4 -0x0908,5 -0x0922,-1,reqtradebuyingstore,2:4:8:12 -//0x092e,2,searchstoreinfonextpage,0 -0x0933,6,takeitem,2 -0x0938,-1,reqopenbuyingstore,2:4:8:9:89 -0x093f,5,hommenu,2:4 -0x0947,36,storagepassword,2:4:20 -0x094c,6,solvecharname,2 -0x094e,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0959,10,useskilltopos,2:4:6:8 -//0x095a,8,mailsetattach,2:4 -0x0977,14 //Monster HP Bar -0x0978,6,reqworldinfo,2 -0x0979,50 //ackworldinfo -0x097b,16,ZC_PERSONAL_INFOMATION,2:4:8:12:16:17:21:25 //Still need further information -//0x0981,12,ZC_PERSONAL_INFOMATION_CHN,2:4:6:8:12:13:15:17:10 // Disabled until further information is found. -0x0990,31 //additem -0x0991,-1 //inv itemlist normal -0x0992,-1 //inv itemlist equip -0x0993,-1 //cart itemlist normal -0x0994,-1 //cart itemlist equip -0x0995,-1 //store itemlist normal -0x0996,-1 //store itemlist equip -0x0997,-1 //ZC_EQUIPWIN_MICROSCOPE_V5 -0x0998,8,equipitem,2:4 // CZ_REQ_WEAR_EQUIP_V5 -0x0999,11,ZC_WEAR_EQUIP_ACK,2:4:8:10 // cz_wear_equipv5 -0x099a,9 // take_off_equipv5 -0x099b,8 //maptypeproperty2 - -// New Packets -0x08C8,34 // ZC_NOTIFY_ACT3 -0x08ff,24 // ZC_EFST_SET_ENTER -0x0984,28 // ZC_EFST_SET_ENTER2 -0x099f,22 // ZC_SKILL_ENTRY4 - -//2013-05-15aRagexe (Yommy) -packet_ver: 35 -packet_keys: 0x75794A38,0x58A96BC1,0x296E6FB8 // [Shakto] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x0362,5,changedir,2:4 -0x08A1,6,takeitem,2 -0x0944,6,dropitem,2:4 -0x0887,8,movetokafra,2:4 -0x08AC,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x092D,18,bookingregreq,2:4:6 -//0x08AA,8 CZ_JOIN_BATTLE_FIELD -0x0963,-1,itemlistwindowselected,2:4:8:12 -0x0943,19,wanttoconnection,2:6:10:14:18 -0x0947,26,partyinvite2,2 -//0x0862,4 CZ_GANGSI_RANK -0x0962,26,friendslistadd,2 -0x0931,5,hommenu,2:4 -0x093e,36,storagepassword,2:4:20 - -//2013-05-22Ragexe (Yommy) -packet_ver: 36 -packet_keys: 0x6948050B,0x06511D9D,0x725D4DF1 // [Shakto] -0x08A2,7,actionrequest,2:6 -0x095C,10,useskilltoid,2:4:6 -0x0360,5,walktoxy,2 -0x07EC,6,ticksend,2 -0x0925,5,changedir,2:4 -0x095E,6,takeitem,2 -0x089C,6,dropitem,2:4 -0x08a3,8,movetokafra,2:4 -0x087E,8,movefromkafra,2:4 -0x0811,10,useskilltopos,2:4:6:8 -0x0964,90,useskilltoposinfo,2:4:6:8:10 -0x08a6,6,getcharnamerequest,2 -0x0369,6,solvecharname,2 -0x093e,12,searchstoreinfolistitemclick,2:6:10 -0x08aa,2,searchstoreinfonextpage,0 -0x095b,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0952,-1,reqtradebuyingstore,2:4:8:12 -0x0368,6,reqclickbuyingstore,2 -0x086E,2,reqclosebuyingstore,0 -0x0874,-1,reqopenbuyingstore,2:4:8:9:89 -0x089B,18,bookingregreq,2:4:6 -//0x0965,8 CZ_JOIN_BATTLE_FIELD -0x086A,-1,itemlistwindowselected,2:4:8:12 -0x08A9,19,wanttoconnection,2:6:10:14:18 -0x0950,26,partyinvite2,2 -//0x08AC,4 CZ_GANGSI_RANK -0x0362,26,friendslistadd,2 -0x0926,5,hommenu,2:4 -0x088e,36,storagepassword,2:4:20 - -//2013-05-29Ragexe (Shakto) -packet_ver: 37 -packet_keys: 0x023A6C87,0x14BF1F1E,0x5CC70CC9 // [Shakto] -0x0890,7,actionrequest,2:6 -0x0438,10,useskilltoid,2:4:6 -0x0876,5,walktoxy,2 -0x0897,6,ticksend,2 -0x0951,5,changedir,2:4 -0x0895,6,takeitem,2 -0x08A7,6,dropitem,2:4 -0x0938,8,movetokafra,2:4 -0x0957,8,movefromkafra,2:4 -0x0917,10,useskilltopos,2:4:6:8 -0x085E,90,useskilltoposinfo,2:4:6:8:10 -0x0863,6,getcharnamerequest,2 -0x0937,6,solvecharname,2 -0x085A,12,searchstoreinfolistitemclick,2:6:10 -0x0941,2,searchstoreinfonextpage,0 -0x0918,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0936,-1,reqtradebuyingstore,2:4:8:12 -0x0892,6,reqclickbuyingstore,2 -0x0964,2,reqclosebuyingstore,0 -0x0869,-1,reqopenbuyingstore,2:4:8:9:89 -0x0874,18,bookingregreq,2,4:6 -//0x088E,8 // CZ_JOIN_BATTLE_FIELD -0x0958,-1,itemlistwindowselected,2:4:8:12 -0x0919,19,wanttoconnection,2:6:10:14:18 -0x08A8,26,partyinvite2,2 -//0x0888,4 // CZ_GANGSI_RANK -0x0877,26,friendslistadd,2 -0x023B,5,hommenu,2:4 -0x0956,36,storagepassword,2:4:20 - -//2013-06-05Ragexe (Shakto) -packet_ver: 38 -packet_keys: 0x646E08D9,0x5F153AB5,0x61B509B5 // [Shakto] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x0202,5,changedir,2:4 -0x07E4,6,takeitem,2 -0x0362,6,dropitem,2:4 -0x07EC,8,movetokafra,2:4 -0x0364,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0365,18,bookingregreq,2:4:6 -//0x0363,8 // CZ_JOIN_BATTLE_FIELD -0x0281,-1,itemlistwindowselected,2:4:8:12 -0x022D,19,wanttoconnection,2:6:10:14:18 -0x0802,26,partyinvite2,2 -//0x0436,4 // CZ_GANGSI_RANK -0x023B,26,friendslistadd,2 -0x0361,5,hommenu,2,4 -0x0883,36,storagepassword,2:4:20 -0x097C,4,ranklist,2 - -//2013-06-12Ragexe (Shakto) -packet_ver: 39 -packet_keys: 0x6D166F66,0x3C000FCF,0x295B0FCB // [Shakto] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x087E,5,changedir,2:4 -0x07E4,6,takeitem,2 -0x0362,6,dropitem,2:4 -0x07EC,8,movetokafra,2:4 -0x0364,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0365,18,bookingregreq,2:4:6 -//0x0363,8 // CZ_JOIN_BATTLE_FIELD -0x0281,-1,itemlistwindowselected,2:4:8:12 -0x0919,19,wanttoconnection,2:6:10:14:18 -0x0802,26,partyinvite2,2 -//0x0436,4 // CZ_GANGSI_RANK -0x0940,26,friendslistadd,2 -0x093A,5,hommenu,2:4 -0x0964,36,storagepassword,2:4:20 - -//2013-06-18Ragexe (Shakto) -packet_ver: 40 -packet_keys: 0x434115DE,0x34A10FE9,0x6791428E // [Shakto] -0x0889,7,actionrequest,2:6 -0x0951,10,useskilltoid,2:4:6 -0x088E,5,walktoxy,2 -0x0930,6,ticksend,2 -0x08A6,5,changedir,2:4 -0x0962,6,takeitem,2 -0x0917,6,dropitem,2:4 -0x0885,8,movetokafra,2:4 -0x0936,8,movefromkafra,2:4 -0x096A,10,useskilltopos,2:4:6:8 -0x094F,90,useskilltoposinfo,2:4:6:8:10 -0x0944,6,getcharnamerequest,2 -0x0945,6,solvecharname,2 -0x0890,12,searchstoreinfolistitemclick,2:6:10 -0x0363,2,searchstoreinfonextpage,0 -0x0281,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0891,-1,reqtradebuyingstore,2:4:8:12 -0x0862,6,reqclickbuyingstore,2 -0x085A,2,reqclosebuyingstore,0 -0x0932,-1,reqopenbuyingstore,2:4:8:9:89 -0x08A7,18,bookingregreq,2:4:6 -//0x087A,8 // CZ_JOIN_BATTLE_FIELD -0x0942,-1,itemlistwindowselected,2:4:8:12 -0x095B,19,wanttoconnection,2:6:10:14:18 -0x0887,26,partyinvite2,2 -//0x0878,4 // CZ_GANGSI_RANK -0x0953,26,friendslistadd,2 -0x02C4,5,hommenu,2:4 -0x0864,36,storagepassword,2:4:20 - -//2013-06-26Ragexe -packet_ver: 41 -packet_keys: 0x38F453EF,0x6A040FD8,0X65BD6668 // [Shakto] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x094D,5,changedir,2:4 -0x088B,6,takeitem,2 -0x0952,6,dropitem,2:4 -0x0921,8,movetokafra,2:4 -0x0817,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x0365,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0894,18,bookingregreq,2:4:6 -//0x0860,8 // CZ_JOIN_BATTLE_FIELD -0x08A5,-1,itemlistwindowselected,2:4:8:12 -0x088C,19,wanttoconnection,2:6:10:14:18 -0x0895,26,partyinvite2,2 -//0x088F,4 // CZ_GANGSI_RANK -0x08AB,26,friendslistadd,2 -0x0960,5,hommenu,2:4 -0x0930,36,storagepassword,2:4:20 - -//2013-07-03Ragexe -packet_ver: 42 -packet_keys: 0x4FF90E23,0x0F1432F2,0x4CFA1EDA // [Shakto] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x0930,5,changedir,2:4 -0x07E4,6,takeitem,2 -0x0362,6,dropitem,2:4 -0x07EC,8,movetokafra,2:4 -0x0364,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0202,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0365,18,bookingregreq,2:4:6 -//0x0363,8 // CZ_JOIN_BATTLE_FIELD -0x0281,-1,itemlistwindowselected,2:4:8:12 -0x022D,19,wanttoconnection,2:6:10:14:18 -0x0802,26,partyinvite2,2 -//0x0436,4 // CZ_GANGSI_RANK -0x0360,26,friendslistadd,2 -0x094A,5,hommenu,2:4 -0x0873,36,storagepassword,2:4:20 - -//2013-07-10Ragexe -packet_ver: 43 -packet_keys: 0x458F758F,0x4CCF3F8F,0x4A9C4237 -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x0202,5,changedir,2:4 -0x07E4,6,takeitem,2 -0x0362,6,dropitem,2:4 -0x07EC,8,movetokafra,2:4 -0x0364,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0365,18,bookingregreq,2:4:6 -//0x0363,8 // CZ_JOIN_BATTLE_FIELD -0x0281,-1,itemlistwindowselected,2:4:8:12 -0x022D,19,wanttoconnection,2:6:10:14:18 -0x0802,26,partyinvite2,2 -//0x0436,4 // CZ_GANGSI_RANK -0x023B,26,friendslistadd,2 -0x0361,5,hommenu,2:4 -0x0880,36,storagepassword,2:4:20 -0x0848,-1,cashshopbuy,2:6:4:10 -0x097D,288 //ZC_ACK_RANKING - -//2013-07-17Ragexe -packet_ver: 44 -packet_keys: 0x2BED4F91,0x5F9E00CF,0x5EE5520C -0x0918,7,actionrequest,2:6 -0x091E,10,useskilltoid,2:4:6 -0x083C,5,walktoxy,2 -0x02C4,6,ticksend,2 -0x088C,5,changedir,2:4 -0x08A9,6,takeitem,2 -0x0917,6,dropitem,2:4 -0x089B,8,movetokafra,2:4 -0x0956,8,movefromkafra,2:4 -0x0882,10,useskilltopos,2:4:6:8 -0x0952,90,useskilltoposinfo,2:4:6:8:10 -0x0958,6,getcharnamerequest,2 -0x0967,6,solvecharname,2 -0x0960,12,searchstoreinfolistitemclick,2:6:10 -0x0819,2,searchstoreinfonextpage,0 -0x086B,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x093B,-1,reqtradebuyingstore,2:4:8:12 -0x0898,6,reqclickbuyingstore,2 -0x096A,2,reqclosebuyingstore,0 -0x08AA,-1,reqopenbuyingstore,2:4:8:9:89 -0x0862,18,bookingregreq,2:4:6 -//0x08A6,8 // CZ_JOIN_BATTLE_FIELD -0x0897,-1,itemlistwindowselected,2:4:8:12 -0x091D,19,wanttoconnection,2:6:10:14:18 -0x092F,26,partyinvite2,2 -//0x086C,4 // CZ_GANGSI_RANK -0x0863,26,friendslistadd,2 -0x088A,5,hommenu,2:4 -0x095B,36,storagepassword,2:4:20 -0x09A6,12,ZC_BANKING_CHECK,2:10 -0x09A7,10,bankdeposit,2:6 -0x09A8,16,ZC_ACK_BANKING_DEPOSIT,2:4:12 -0x09A9,10,bankwithdrawal,2:6 -0x09AA,16,ZC_ACK_BANKING_WITHDRAW,2:4:12 -0x09AB,6,bankcheck,2 -0x09B6,6,bankopen,2 -0x09B7,4,ZC_ACK_OPEN_BANKING,2 -0x09B8,6,bankclose,2 -0x09B9,4,ZC_ACK_CLOSE_BANKING,2 - -//2013-07-31cRagexe -0x09ca,23 // ZC_SKILL_ENTRY5 -0x09cb,17 // ZC_USE_SKILL2 - -//2013-08-07Ragexe -packet_ver: 45 -packet_keys: 0x7E241DE0,0x5E805580,0x3D807D80 // [Shakto] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x0202,5,changedir,2:4 -0x07E4,6,takeitem,2 -0x0362,6,dropitem,2:4 -0x07EC,8,movetokafra,2:4 -0x0364,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0365,18,bookingregreq,2:4:6 -//0x363,8 // CZ_JOIN_BATTLE_FIELD -0x0281,-1,itemlistwindowselected,2:4:8:12 -0x022D,19,wanttoconnection,2:6:10:14:18 -0x0802,26,partyinvite2,2 -//0x436,4 // CZ_GANGSI_RANK -0x023B,26,friendslistadd,2 -0x0361,5,hommenu,2:4 -0x0887,36,storagepassword,2:4:20 -0x09C1,10,ZC_C_MARKERINFO,2:6:8 -// Merge Item -0x096D,-1,ZC_MERGE_ITEM_OPEN,2:4 // ZC_MERGE_ITEM_OPEN -0x096E,-1,mergeitem_req,2:4 // CZ_REQ_MERGE_ITEM -0x096F,7,ZC_ACK_MERGE_ITEM,2:4:6:7 // ZC_ACK_MERGE_ITEM -0x0974,2,mergeitem_cancel,0 // CZ_CANCEL_MERGE_ITEM - -//2013-12-23Ragexe -packet_ver: 46 -packet_keys: 0x631C511C,0x111C111C,0x111C111C // [Shakto] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x0202,5,changedir,2:4 -0x07E4,6,takeitem,2 -0x0362,6,dropitem,2:4 -0x07EC,8,movetokafra,2:4 -0x0364,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0365,18,bookingregreq,2:4:6 -//0x363,8 // CZ_JOIN_BATTLE_FIELD -0x0281,-1,itemlistwindowselected,2:4:8:12 -0x022D,19,wanttoconnection,2:6:10:14:18 -0x0802,26,partyinvite2,2 -//0x436,4 // CZ_GANGSI_RANK -0x023B,26,friendslistadd,2 -0x0361,5,hommenu,2:4 -0x08A4,36,storagepassword,2:4:20 -//New Packets -//0x097E,12 //ZC_UPDATE_RANKING_POINT -0x09CE,102,itemmonster,2 -0x09D4,2,npcshopclosed,0 -//NPC Market -0x09D5,-1 -0x09D6,-1,npcmarketpurchase,2:4:6 -0x09D7,-1 -0x09D8,2,npcmarketclosed,0 -// Clan System -0x0988,6 -0x0989,2 -0x098A,-1 -0x098D,-1,clanchat,2:4 -0x098E,-1 -// Sale -0x09AC,-1,salesearch,2:4:8 -0x09AD,8 -0x09AE,17,saleadd,2:6:8:12:16 -0x09AF,4 -0x09B0,8,saleremove,2:6 -0x09B1,4 -0x09B2,8 -0x09B3,4 -0x09B4,6,saleopen,2 -0x09BC,6,saleclose,2 -0x09C3,8,salerefresh,2:6 -0x09C4,8 - -// New Packet -0x097A,-1 // ZC_ALL_QUEST_LIST2 -0x09DB,-1 // ZC_NOTIFY_MOVEENTRY10 -0x09DC,-1 // ZC_NOTIFY_NEWENTRY10 -0x09DD,-1 // ZC_NOTIFY_STANDENTRY10 -0x09DF,7 // ZC_ACK_WHISPER02 - -//2014-10-16Ragexe -packet_ver: 50 -packet_keys: 0x2DFF467C,0x444B37EE,0x2C1B634F // [YomRawr] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x0967,5,changedir,2:4 -0x07E4,6,takeitem,2 -0x0362,6,dropitem,2:4 -0x07EC,8,movetokafra,2:4 -0x022D,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0365,18,bookingregreq,2:4 -// 0x0363,8 // CZ_JOIN_BATTLE_FIELD -0x0281,-1,itemlistwindowselected,2:4:8 -0x086E,19,wanttoconnection,2:6:10:14:18 -0x0802,26,partyinvite,2 -// 0x0922,4 // CZ_GANGSI_RANK -0x094B,26,friendslistadd,2 -0x0364,5,hommenu,2:4 -0x0936,36,storagepassword,0 -0x09DF,7 - -// New packet -0x0A00,269 // ZC_SHORTCUT_KEY_LIST_V3 -0x0A01,3,hotkeyrowshift,2 // CZ_SHORTCUTKEYBAR_ROTATE -0x0A02,4 // ZC_DRESSROOM_OPEN -0x0A0E,14 // ZC_BATTLEFIELD_NOTIFY_HP2 -0x09F7,75 // ZC_PROPERTY_HOMUN_2 -0x09E5,18 // ZC_DELETEITEM_FROM_MCSTORE2 -0x09E6,22 // ZC_UPDATE_ITEM_FROM_BUYING_STORE2 - -// Roulette System [Yommy] -0x0A19,2,rouletteopen,0 // CZ_REQ_OPEN_ROULETTE -0x0A1A,23 // ZC_ACK_OPEN_ROULETTE -0x0A1B,2,rouletteinfo,0 // CZ_REQ_ROULETTE_INFO -0x0A1C,-1 // ZC_ACK_ROULETTE_INFO -0x0A1D,2,rouletteclose,0 // CZ_REQ_CLOSE_ROULETTE -0x0A1E,3 // ZC_ACK_CLOSE_ROULETTE -0x0A1F,2,roulettegenerate,0 // CZ_REQ_GENERATE_ROULETTE -0x0A20,21 // ZC_ACK_GENERATE_ROULETTE -0x0A21,3,rouletterecvitem,2 // CZ_RECV_ROULETTE_ITEM -0x0A22,5 // ZC_RECV_ROULETTE_ITEM - -//2014-10-22bRagexe -packet_ver: 51 -packet_keys: 0x290551EA,0x2B952C75,0x2D67669B // [YomRawr] -0x006d,149 -0x023b,10,useskilltopos,2:4:6:8 -0x0281,-1,itemlistwindowselected,2:4:8:12 -0x035f,6,ticksend,2 -0x0360,6,reqclickbuyingstore,2 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x0368,6,solvecharname,2 -0x0369,7,actionrequest,2:6 -0x0437,5,walktoxy,2 -0x0438,36,storagepassword,2:4:20 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0817,2,reqclosebuyingstore,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0835,12,searchstoreinfolistitemclick,2:6:10 -0x083c,10,useskilltoid,2:4:6 -0x0878,8,movetokafra,2:4 -0x087d,6,dropitem,2:4 -0x0896,26,partyinvite2,2 -0x0899,5,hommenu,2:4 -0x08aa,8,movefromkafra,2:4 -//0x08ab,4 // CZ_GANGSI_RANK -0x08ad,5,changedir,2:4 -0x08e3,149 -0x091a,26,friendslistadd,2 -//0x092b,8 // CZ_JOIN_BATTLE_FIELD -0x093b,19,wanttoconnection,2:6:10:14:18 -0x0940,2,searchstoreinfonextpage,0 -0x094e,6,takeitem,2 -0x0955,18,bookingregreq,2:4:6 -0x096a,6,getcharnamerequest,2 - -// New Packet -0x0A18,14 // ZC_ACCEPT_ENTER3 -0x0A28,3 // ZC_ACK_OPENSTORE2 -0x09FD,-1 // ZC_NOTIFY_MOVEENTRY11 -0x09FE,-1 // ZC_NOTIFY_NEWENTRY11 -0x09FF,-1 // ZC_NOTIFY_STANDENTRY11 -//0x09F8,-1 // ZC_ALL_QUEST_LIST3 - -//2015-05-13aRagexe -packet_ver: 52 -packet_keys: 0x62C86D09,0x75944F17,0x112C133D // [YomRawr] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035F,6,ticksend,2 -0x0924,5,changedir,2:4 -0x0958,6,takeitem,2 -0x0885,6,dropitem,2:4 -0x0879,8,movetokafra,2:4 -0x0864,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x096A,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x022D,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0883,18,bookingregreq,2:4:6 -// 0x02C4,8 CZ_JOIN_BATTLE_FIELD -0x0960,-1,itemlistwindowselected,2:4:8:12 -0x0363,19,wanttoconnection,2:6:10:14:18 -0x094A,26,partyinvite2,2 -// 0x0927,4 CZ_GANGSI_RANK -0x08A8,26,friendslistadd,2 -0x0817,5,hommenu,2:4 -0x0923,36,storagepassword,2:4:20 - -// New Packets -0xA3B,-1 // ZC_HAT_EFFECT - -// RODEX Mail system -0x09E7,3 // ZC_NOTIFY_UNREADMAIL -0x09E8,11,mailrefresh,2:3 // CZ_OPEN_MAILBOX -0x09E9,2,dull,0 // CZ_CLOSE_MAILBOX -0x09EA,11,mailread,2:3 // CZ_REQ_READ_MAIL -0x09EB,-1 // ZC_ACK_READ_MAIL -0x09EC,-1,mailsend,2:4:28:52:60:62:64 // CZ_REQ_WRITE_MAIL -0x09ED,3 // ZC_ACK_WRITE_MAIL -0x09EE,11,mailrefresh,2:3 // CZ_REQ_NEXT_MAIL_LIST -0x09EF,11,mailrefresh,2:3 // CZ_REQ_REFRESH_MAIL_LIST -0x09F0,-1 // ZC_ACK_MAIL_LIST -0x09F1,11,mailgetattach,0 // CZ_REQ_ZENY_FROM_MAIL -0x09F2,12 // ZC_ACK_ZENY_FROM_MAIL -0x09F3,11,mailgetattach,0 // CZ_REQ_ITEM_FROM_MAIL -0x09F4,12 // ZC_ACK_ITEM_FROM_MAIL -0x09F5,11,maildelete,0 // CZ_REQ_DELETE_MAIL -0x09F6,11 // ZC_ACK_DELETE_MAIL -0x0A03,2,mailcancel,0 // CZ_REQ_CANCEL_WRITE_MAIL -0x0A04,6,mailsetattach,2:4 // CZ_REQ_ADD_ITEM_TO_MAIL -0x0A05,53 // ZC_ACK_ADD_ITEM_TO_MAIL -0x0A06,6,mailwinopen,2:4 // CZ_REQ_REMOVE_ITEM_MAIL -0x0A07,9 // ZC_ACK_REMOVE_ITEM_MAIL -0x0A08,26,mailbegin,0 // CZ_REQ_OPEN_WRITE_MAIL -0x0A12,27 // ZC_ACK_OPEN_WRITE_MAIL -0x0A13,26,mailreceiver,2 // CZ_CHECK_RECEIVE_CHARACTER_NAME -0x0A14,10 // ZC_CHECK_RECEIVE_CHARACTER_NAME -0x0A32,2 // ZC_OPEN_RODEX_THROUGH_NPC_ONLY - -// New EquipPackets Support -0x0A09,45 // ZC_ADD_EXCHANGE_ITEM3 -0x0A0A,47 // ZC_ADD_ITEM_TO_STORE3 -0x0A0B,47 // ZC_ADD_ITEM_TO_CART3 -0x0A0C,56 // ZC_ITEM_PICKUP_ACK_V6 -0x0A0D,-1 // ZC_INVENTORY_ITEMLIST_EQUIP_V6 -0x0A0F,-1 // ZC_CART_ITEMLIST_EQUIP_V6 -0x0A10,-1 // ZC_STORE_ITEMLIST_EQUIP_V6 -0x0A2D,-1 // ZC_EQUIPWIN_MICROSCOPE_V6 - -// OneClick Itemidentify -0x0A35,4,oneclick_itemidentify,2 // CZ_REQ_ONECLICK_ITEMIDENTIFY - -// Achievement System -0x0A23,-1 // ZC_ALL_ACH_LIST -0x0A24,66 // ZC_ACH_UPDATE -0x0A25,6,dull,0 // CZ_REQ_ACH_REWARD -0x0A26,7 // ZC_REQ_ACH_REWARD_ACK - -// Title System -0x0A2E,6,dull,0 // CZ_REQ_CHANGE_TITLE -0x0A2F,7 // ZC_ACK_CHANGE_TITLE -0x0A30,106 // ZC_ACK_REQNAMEALL2 - -// Pet Evolution System -0x09FB,-1,dull,0 // CZ_PET_EVOLUTION -0x09FC,6 // ZC_PET_EVOLUTION_RESULT - -//2015-05-20aRagexe -0x0A3D,18,saleadd,2:6:8:12:16 - -//2015-09-16Ragexe -packet_ver: 53 -packet_keys: 0x17F83A19,0x116944F4,0x1CC541E9 // [Napster] -0x0869,7,actionrequest,2:6 -0x093E,10,useskilltoid,2:4:6 -0x0877,5,walktoxy,2 -0x08AC,6,ticksend,2 -0x0936,5,changedir,2:4 -0x089C,6,takeitem,2 -0x092F,6,dropitem,2:4 -0x0934,8,movetokafra,2:4 -0x085E,8,movefromkafra,2:4 -0x022D,10,useskilltopos,2:4:6:8 -0x0873,90,useskilltoposinfo,2:4:6:8:10 -0x095A,6,getcharnamerequest,2 -0x0942,6,solvecharname,2 -0x087F,12,searchstoreinfolistitemclick,2:6:10 -0x0817,2,searchstoreinfonextpage,0 -0x0920,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0881,-1,reqtradebuyingstore,2:4:8:12 -0x0835,6,reqclickbuyingstore,2 -0x092E,2,reqclosebuyingstore,0 -0x0948,-1,reqopenbuyingstore,2:4:8:9:89 -0x089B,18,bookingregreq,2:4:6 -// 0x094F,8 CZ_JOIN_BATTLE_FIELD -0x0961,-1,itemlistwindowselected,2:4:8:12 -0x0969,19,wanttoconnection,2:6:10:14:18 -0x0924,26,partyinvite2,2 -// 0x0938,4 CZ_GANGSI_RANK -0x089E,26,friendslistadd,2 -0x0960,5,hommenu,2:4 -0x0941,36,storagepassword,2:4:20 - -// New Packet -0x097F,-1 // ZC_SELECTCART -0x0980,7,selectcart,2:6 // CZ_SELECTCART - -//2015-10-01bRagexeRE -packet_ver: 54 -packet_keys: 0x45B945B9,0x45B945B9,0x45B945B9 // [Dastgir] -0x0369,7,actionrequest,2:6 -0x083c,10,useskilltoid,2:4:6 -0x0437,5,walktoxy,2 -0x035f,6,ticksend,2 -0x0202,5,changedir,2:4 -0x07e4,6,takeitem,2 -0x0362,6,dropitem,2:4 -0x07ec,8,movetokafra,2:4 -0x0364,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposmoreinfo,2:4:6:8:10 -0x096a,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0811,-1,reqtradebuyingstore,2:4:8:12 -0x0360,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x0815,-1,reqopenbuyingstore,2:4:8:9:89 -0x0365,18,partybookingregisterreq,2:4:6 -//0x0363,8 // CZ_JOIN_BATTLE_FIELD -0x0281,-1,itemlistwindowselected,2:4:8:12 -0x022d,19,wanttoconnection,2:6:10:14:18 -0x0802,26,partyinvite2,2 -//0x0436,4 // CZ_GANGSI_RANK -0x023b,26,friendslistadd,2 -0x0361,5,hommenu,2:4 -0x0860,36,storagepassword,2:4:20 - -//2015-11-04aRagexe -packet_ver: 55 -packet_keys: 0x4C17382A,0x7ED174C9,0x29961E4F // [Winnie] -0x0369,7,actionrequest,2:6 -0x083C,10,useskilltoid,2:4:6 -0x0363,5,walktoxy,2 -0x0886,6,ticksend,2 -0x0928,5,changedir,2:4 -0x0964,6,takeitem,2 -0x0437,6,dropitem,2:4 -0x088B,8,movetokafra,2:4 -0x0364,8,movefromkafra,2:4 -0x0438,10,useskilltopos,2:4:6:8 -0x0366,90,useskilltoposinfo,2:4:6:8:10 -0x0887,6,getcharnamerequest,2 -0x0368,6,solvecharname,2 -0x0838,12,searchstoreinfolistitemclick,2:6:10 -0x0835,2,searchstoreinfonextpage,0 -0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 -0x0815,-1,reqtradebuyingstore,2:4:8:12 -0x0436,6,reqclickbuyingstore,2 -0x0817,2,reqclosebuyingstore,0 -0x023B,-1,reqopenbuyingstore,2:4:8:9:89 -0x0811,18,bookingregreq,2:4:6 -//0x0939,8 CZ_JOIN_BATTLE_FIELD -0x093A,-1,itemlistwindowselected,2:4:8:12 -0x0360,19,wanttoconnection,2:6:10:14:18 -0x08A5,26,partyinvite2,2 -//0x08A3,4 CZ_GANGSI_RANK -0x07EC,26,friendslistadd,2 -0x088D,5,hommenu,2:4 -0x0940,36,storagepassword,2:4:20 - -// 2016-03-02bRagexe -0x0A51,34 - -// 2016-03-30aRagexe -0x0A6E,-1,mailsend,2:4:28:52:60:62:64:68 // CZ_REQ_WRITE_MAIL2 - -// 2016-06-01aRagexe -0x0A7D,-1 - -// 2017-05-02dRagexeRE -0x0A43,85 -0x0A44,-1 -0x0ABD,10 - -//Add new packets here -//packet_ver: 56 diff --git a/doc/atcommands.txt b/doc/atcommands.txt index e7b9e488f7..7997c73eb4 100644 --- a/doc/atcommands.txt +++ b/doc/atcommands.txt @@ -1320,7 +1320,6 @@ This will also send a packet to clients causing them to close. @reloadmobdb @reloadmotd @reloadmsgconf -@reloadpacketdb @reloadpcdb @reloadquestdb @reloadscript @@ -1333,7 +1332,6 @@ Databases: -- instancedb: Instance Database -- itemdb: Item Database -- mobdb: Monster Database --- packetdb: Packet Database -- questdb: Quest Database -- script: NPC Scripts -- skilldb: Skill Database @@ -1354,7 +1352,6 @@ Affected files: -- mobdb: mob_db.txt, mob_item_ratio.txt, mob_chat_db.txt, mob_avail.txt, mob_race2_db.txt, mob_branch.txt, mob_poring.txt, mob_boss.txt, mob_pouch.txt, mob_classchange.txt, pet_db.txt, homunculus_db.txt, homun_skill_tree.txt, exp_homun.txt, mercenary_db.txt, mercenary_skill_db.txt, elemental_db.txt, elemental_skill_db.txt -- motd: motd.txt -- msgconf: atcommand_athena.conf --- packetdb: packet_db.txt -- pcdb: statpoint.txt, job_exp.txt, skill_tree.txt, attr_fix.txt, job_db1.txt, job_db2.txt, job_basehpsp_db.txt, job_maxhpsp_db.txt, job_param_db.txt, level_penalty.txt -- questdb: quest_db.txt -- script: /npc/*.txt, /npc/*.conf diff --git a/doc/packet_interserv.txt b/doc/packet_interserv.txt index 28afd7ad6e..5b1f0ca1b7 100644 --- a/doc/packet_interserv.txt +++ b/doc/packet_interserv.txt @@ -47,9 +47,9 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket. 0x2713: Type: AH - Structure: .W .L .L .L .B .B .L .L .B - index: 0,2,6,10,14,15,16,20,24 - len: 25 + Structure: .W .L .L .L .B .B .L .B + index: 0,2,6,10,14,15,16,20 + len: 21 parameter: - cmd : packet identification (0x2713) - aid : account identification @@ -58,7 +58,6 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket. - sex: the sex of the account - ok : 1=auth failed, 1=ok - request_id: unknown @FIXME - - version: client version, (clientinfo version) - clienttype: unknown @FIXME desc: - Acknowledge the authentication request from char-serv @@ -2769,16 +2768,15 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket. 0x2b02 Type: ZA - Structure: .W .L .L .L .L .B - index: 0,2,6,10,14,18 - len: 19 + Structure: .W .L .L .L .L + index: 0,2,6,10,14 + len: 18 parameter: - cmd : packet identification (0x2b02) - id - login_id1 - login_id2 - s_ip - - packet_ver desc: - chrif_charselectreq diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 47e262dda5..da1ef38a82 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3723,18 +3723,6 @@ The renewal feature to check is determined by type. 4 - RENEWAL_LVDMG (renewal level modifier on damage) 5 - RENEWAL_ASPD (renewal ASPD) ---------------------------------------- - -*is_clientver(,{,}) - -Checks a character's client version against a specified value. If no char id is -given, the command will run for the invoking character. The function will return -1 if the player's version is greater than or equal to the value, and 0 otherwise. - -Available types are: - 0 - version number (packet_db_ver) - 1 - client date (YYYYMMDD) - --------------------------------------- \\ 3,1.- Item-related commands diff --git a/npc/re/guides/navigation.txt b/npc/re/guides/navigation.txt index 8ab9d833ad..ff749c42e0 100644 --- a/npc/re/guides/navigation.txt +++ b/npc/re/guides/navigation.txt @@ -13,11 +13,12 @@ //===== Additional Comments: ================================= //= 1.0 First version. //= 1.1 Added 'is_clientver' command. [Euphy] +//= 1.2 Dropped 'is_clientver' command. [Lemongrass] //============================================================ function script F_Navi { - if (!is_clientver(1,20111010)) + if ( PACKETVER < 20111010 ) set .@disabled,1; // This function takes 0 ~ 3 parameters. diff --git a/rAthena.sln b/rAthena.sln index 3c95e03e27..f28c81e592 100644 --- a/rAthena.sln +++ b/rAthena.sln @@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{60D331 src\config\const.h = src\config\const.h src\config\core.h = src\config\core.h src\config\classes\general.h = src\config\classes\general.h + src\config\packets.h = src\config\packets.h src\config\renewal.h = src\config\renewal.h src\config\secure.h = src\config\secure.h EndProjectSection diff --git a/src/char/char.h b/src/char/char.h index ed19ec928b..0684ba64de 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -222,7 +222,6 @@ struct char_session_data { uint8 char_slots; // total number of characters that can be created uint8 chars_vip; uint8 chars_billing; - uint32 version; uint8 clienttype; char new_name[NAME_LENGTH]; char birthdate[10+1]; // YYYY-MM-DD diff --git a/src/char/char_clif.c b/src/char/char_clif.c index 4ced9243a2..83c21ff2f1 100644 --- a/src/char/char_clif.c +++ b/src/char/char_clif.c @@ -303,8 +303,7 @@ int chclif_parse_pincode_setnew( int fd, struct char_session_data* sd ){ //---------------------------------------- void chclif_charlist_notify( int fd, struct char_session_data* sd ){ // This is needed on RE clients from october 2015 onwards -// If you want to use one replace false by true here -#if false && PACKETVER >= 20151001 +#if defined(PACKETVER_RE) && PACKETVER >= 20151001 WFIFOHEAD(fd, 10); WFIFOW(fd, 0) = 0x9a0; // pages to req / send them all in 1 until mmo_chars_fromsql can split them up @@ -324,21 +323,25 @@ void chclif_charlist_notify( int fd, struct char_session_data* sd ){ // Function to send characters to a player //---------------------------------------- int chclif_mmo_send006b(int fd, struct char_session_data* sd){ - int j, offset = 0; - bool newvers = (sd->version >= date2version(20100413) ); - if(newvers) //20100413 - offset += 3; + int j, offset; + +#if PACKETVER >= 20100413 + offset = 3; +#else + offset = 0; +#endif + if (charserv_config.save_log) ShowInfo("Loading Char Data ("CL_BOLD"%d"CL_RESET")\n",sd->account_id); j = 24 + offset; // offset WFIFOHEAD(fd,j + MAX_CHARS*MAX_CHAR_BUF); WFIFOW(fd,0) = 0x6b; - if(newvers){ //20100413 +#if PACKETVER >= 20100413 WFIFOB(fd,4) = MAX_CHARS; // Max slots. WFIFOB(fd,5) = MIN_CHARS; // Available slots. (PremiumStartSlot) WFIFOB(fd,6) = MIN_CHARS+sd->chars_vip; // Premium slots. (Any existent chars past sd->char_slots but within MAX_CHARS will show a 'Premium Service' in red) - } +#endif memset(WFIFOP(fd,4 + offset), 0, 20); // unknown bytes j+=char_mmo_chars_fromsql(sd, WFIFOP(fd,j)); WFIFOW(fd,2) = j; // packet len @@ -377,16 +380,18 @@ void chclif_mmo_send099d(int fd, struct char_session_data *sd) { * Function to choose wich kind of charlist to send to client depending on his version */ void chclif_mmo_char_send(int fd, struct char_session_data* sd){ - ShowInfo("sd->version = %d\n",sd->version); - if(sd->version >= date2version(20130000) ){ - chclif_mmo_send082d(fd,sd); - chclif_mmo_send006b(fd,sd); - chclif_charlist_notify(fd,sd); - } else - chclif_mmo_send006b(fd,sd); +#if PACKETVER >= 20130000 + chclif_mmo_send082d(fd, sd); + chclif_mmo_send006b(fd, sd); + chclif_charlist_notify(fd, sd); +#else + chclif_mmo_send006b(fd,sd); //@FIXME dump from kro doesn't show 6b transmission - if(sd->version >= date2version(20060819) ) - chclif_block_character(fd,sd); +#endif + +#if PACKETVER >= 20060819 + chclif_block_character(fd,sd); +#endif } /* @@ -435,14 +440,11 @@ void chclif_char_delete2_ack(int fd, uint32 char_id, uint32 result, time_t delet /// Any (0x718): An unknown error has occurred. /// HC: <082a>.W .L .L void chclif_char_delete2_accept_ack(int fd, uint32 char_id, uint32 result) { +#if PACKETVER >= 20130000 if(result == 1 ){ - struct char_session_data* sd; - sd = (struct char_session_data*)session[fd]->session_data; - - if( sd->version >= date2version(20130000) ){ - chclif_mmo_char_send(fd, sd); - } + chclif_mmo_char_send(fd, session[fd]->session_data); } +#endif WFIFOHEAD(fd,10); WFIFOW(fd,0) = 0x82a; @@ -751,7 +753,6 @@ int chclif_parse_reqtoconnect(int fd, struct char_session_data* sd,uint32 ipl){ node->login_id2 == login_id2 /*&& node->ip == ipl*/ ) {// authentication found (coming from map server) - sd->version = node->version; idb_remove(auth_db, account_id); char_auth_ok(fd, sd); } diff --git a/src/char/char_logif.c b/src/char/char_logif.c index a65f0e2b9a..53773b1fa6 100644 --- a/src/char/char_logif.c +++ b/src/char/char_logif.c @@ -295,7 +295,7 @@ int chlogif_parse_ackconnect(int fd, struct char_session_data* sd){ } int chlogif_parse_ackaccreq(int fd, struct char_session_data* sd){ - if (RFIFOREST(fd) < 25) + if (RFIFOREST(fd) < 21) return 0; { uint32 account_id = RFIFOL(fd,2); @@ -304,19 +304,14 @@ int chlogif_parse_ackaccreq(int fd, struct char_session_data* sd){ uint8 sex = RFIFOB(fd,14); uint8 result = RFIFOB(fd,15); int request_id = RFIFOL(fd,16); - uint32 version = RFIFOL(fd,20); - uint8 clienttype = RFIFOB(fd,24); - RFIFOSKIP(fd,25); + uint8 clienttype = RFIFOB(fd,20); + RFIFOSKIP(fd,21); if( session_isActive(request_id) && (sd=(struct char_session_data*)session[request_id]->session_data) && !sd->auth && sd->account_id == account_id && sd->login_id1 == login_id1 && sd->login_id2 == login_id2 && sd->sex == sex ) { int client_fd = request_id; - sd->version = version; sd->clienttype = clienttype; - if(sd->version != date2version(PACKETVER)) - ShowWarning("aid=%d has an incorect version=%d in clientinfo. Server compiled for %d\n", - sd->account_id,sd->version,date2version(PACKETVER)); switch( result ) { @@ -372,8 +367,7 @@ int chlogif_parse_reqaccdata(int fd, struct char_session_data* sd){ // send characters to player chclif_mmo_char_send(u_fd, sd); #if PACKETVER_SUPPORTS_PINCODE - if(sd->version >= date2version(20110309)) - chlogif_pincode_start(u_fd,sd); + chlogif_pincode_start(u_fd,sd); #endif } } diff --git a/src/char/char_mapif.c b/src/char/char_mapif.c index 2479b5fbf1..7274d83f0a 100644 --- a/src/char/char_mapif.c +++ b/src/char/char_mapif.c @@ -453,15 +453,14 @@ void chmapif_charselres(int fd, uint32 aid, uint8 res){ * @return : 0 not enough data received, 1 success */ int chmapif_parse_authok(int fd){ - if( RFIFOREST(fd) < 19 ) + if( RFIFOREST(fd) < 18 ) return 0; else{ uint32 account_id = RFIFOL(fd,2); uint32 login_id1 = RFIFOL(fd,6); uint32 login_id2 = RFIFOL(fd,10); uint32 ip = RFIFOL(fd,14); - int version = RFIFOB(fd,18); - RFIFOSKIP(fd,19); + RFIFOSKIP(fd,18); if( runflag != CHARSERVER_ST_RUNNING ){ chmapif_charselres(fd,account_id,0); @@ -478,7 +477,6 @@ int chmapif_parse_authok(int fd){ node->login_id2 = login_id2; //node->sex = 0; node->ip = ntohl(ip); - node->version = version; //upd version for mapserv //node->expiration_time = 0; // unlimited/unknown time by default (not display in map-server) //node->gmlevel = 0; idb_put(auth_db, account_id, node); diff --git a/src/common/mmo.h b/src/common/mmo.h index abbff80467..23cae6a173 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -9,31 +9,10 @@ #include "db.h" #include -// server->client protocol version -// 0 - pre-? -// 1 - ? - 0x196 -// 2 - ? - 0x78, 0x79 -// 3 - ? - 0x1c8, 0x1c9, 0x1de -// 4 - ? - 0x1d7, 0x1d8, 0x1d9, 0x1da -// 5 - 2003-12-18aSakexe+ - 0x1ee, 0x1ef, 0x1f0, ?0x1c4, 0x1c5? -// 6 - 2004-03-02aSakexe+ - 0x1f4, 0x1f5 -// 7 - 2005-04-11aSakexe+ - 0x229, 0x22a, 0x22b, 0x22c -// see conf/battle/client.conf for other version - #ifndef PACKETVER - #define PACKETVER 20151104 - //#define PACKETVER 20120410 + #error Please define PACKETVER in src/config/packets.h #endif -// Check if the specified packetversion supports the pincode system -#define PACKETVER_SUPPORTS_PINCODE PACKETVER>=20110309 - -/// Check if the client needs delete_date as remaining time and not the actual delete_date (actually it was tested for clients since 2013) -#define PACKETVER_CHAR_DELETEDATE (PACKETVER > 20130000 && PACKETVER <= 20141022) || PACKETVER >= 20150513 - -// Check if the specified packetvresion supports the cashshop sale system -#define PACKETVER_SUPPORTS_SALES PACKETVER>=20131223 - ///Remove/Comment this line to disable sc_data saving. [Skotlex] #define ENABLE_SC_SAVING /** Remove/Comment this line to disable server-side hot-key saving support [Skotlex] diff --git a/src/common/utils.c b/src/common/utils.c index 881bae3e67..f4e7adf7aa 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -358,59 +358,6 @@ float GetFloat(const unsigned char* buf) return *((float*)(void*)&val); } -uint32 date2version(int date) { - if(date < 20040906) return 5; - else if(date < 20040920) return 10; - else if(date < 20041005) return 11; - else if(date < 20041025) return 12; - else if(date < 20041129) return 13; - else if(date < 20050110) return 14; - else if(date < 20050509) return 15; - else if(date < 20050628) return 16; - else if(date < 20050718) return 17; - else if(date < 20050719) return 18; - else if(date < 20060327) return 19; - else if(date < 20070108) return 20; - else if(date < 20070212) return 21; - //wtf @FIXME - //else if(date < 20080910) return 22; - else if(date < 20080827) return 23; - else if(date < 20080910) return 24; - //unable to solve from date - else if(date < 20101124) return 25; - else if(date < 20111005) return 26; - else if(date < 20111102) return 27; - else if(date < 20120307) return 28; - else if(date < 20120410) return 29; - else if(date < 20120418) return 30; - else if(date < 20120618) return 31; - else if(date < 20120702) return 32; - else if(date < 20130320) return 33; - else if(date < 20130515) return 34; - else if(date < 20130522) return 35; - else if(date < 20130529) return 36; - else if(date < 20130605) return 37; - else if(date < 20130612) return 38; - else if(date < 20130618) return 39; - else if(date < 20130626) return 40; - else if(date < 20130703) return 41; - else if(date < 20130710) return 42; - else if(date < 20130717) return 43; - else if(date < 20130807) return 44; - else if(date < 20131223) return 45; - else if(date < 20140212) return 46; - //else if(date < 20140613) return 47; - //else if(date < 20141016) return 48; - else if(date < 20141022) return 50; - else if(date < 20150513) return 51; - else if(date < 20150916) return 52; - else if(date < 20151001) return 53; - else if(date < 20151104) return 54; - else if(date >= 20151104) return 55; - - else return 30; //default -} - /// calculates the value of A / B, in percent (rounded down) unsigned int get_percentage(const unsigned int A, const unsigned int B) { diff --git a/src/common/utils.h b/src/common/utils.h index 8dfa9ebb3d..04bea94984 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -50,8 +50,6 @@ extern uint32 GetULong(const unsigned char* buf); extern int32 GetLong(const unsigned char* buf); extern float GetFloat(const unsigned char* buf); -uint32 date2version(int date); - int levenshtein(const char *s1, const char *s2); #ifdef __cplusplus diff --git a/src/config/core.h b/src/config/core.h index e6febaf11f..4f55c6616a 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -8,6 +8,8 @@ * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ **/ +#include "../custom/defines_pre.h" + /// Max number of items on @autolootid list #define AUTOLOOTITEM_SIZE 10 @@ -76,12 +78,6 @@ #define MAX_CHAR_BILLING 0 // This must be less than MAX_CHARS #endif -/// Comment to disable the official packet obfuscation support. -/// When enabled, make sure there is value for 'packet_keys' of used packet version or -/// defined 'packet_keys_use' in db/[import/]packet_db.txt. -/// This requires PACKETVER 2011-08-17 or newer. -#define PACKET_OBFUSCATION - /// Comment to disable warnings for deprecated script commands #define SCRIPT_COMMAND_DEPRECATION @@ -91,6 +87,7 @@ /** * No settings past this point **/ +#include "./packets.h" #include "./renewal.h" #include "./secure.h" #include "./classes/general.h" @@ -100,4 +97,6 @@ **/ #include "./const.h" +#include "../custom/defines_post.h" + #endif // _CONFIG_CORE_H_ diff --git a/src/config/packets.h b/src/config/packets.h new file mode 100644 index 0000000000..542ca86639 --- /dev/null +++ b/src/config/packets.h @@ -0,0 +1,63 @@ +// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder +#ifndef _CONFIG_PACKETS_H_ +#define _CONFIG_PACKETS_H_ + +/** + * rAthena configuration file (http://rathena.org) + * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ + **/ + +#ifndef PACKETVER + #define PACKETVER 20151104 +#endif + +#ifndef PACKETVER_RE + /// From this point on only kRO RE clients are supported + #if PACKETVER > 20151104 + #define PACKETVER_RE + #endif +#endif + +#if PACKETVER >= 20110817 + /// Comment to disable the official packet obfuscation support. + /// This requires PACKETVER 2011-08-17 or newer. + #ifndef PACKET_OBFUSCATION + #define PACKET_OBFUSCATION + + // Define these inside src/custom/defines_pre.h or src/custom/defines_post.h + //#define PACKET_OBFUSCATION_KEY1 + //#define PACKET_OBFUSCATION_KEY2 + //#define PACKET_OBFUSCATION_KEY3 + + /// Comment this to disable warnings for missing client side encryption + #define PACKET_OBFUSCATION_WARN + #endif +#else + #if defined(PACKET_OBFUSCATION) + #error You enabled packet obfuscation for a version which is too old. Minimum supported client is 2011-08-17. + #endif +#endif + +#ifndef DUMP_UNKNOWN_PACKET + //#define DUMP_UNKNOWN_PACKET +#endif + +#ifndef DUMP_INVALID_PACKET + //#define DUMP_INVALID_PACKET +#endif + +/** + * No settings past this point + **/ + +/// Check if the specified packetversion supports the pincode system +#define PACKETVER_SUPPORTS_PINCODE PACKETVER >= 20110309 + +/// Check if the client needs delete_date as remaining time and not the actual delete_date (actually it was tested for clients since 2013) +#define PACKETVER_CHAR_DELETEDATE (PACKETVER > 20130000 && PACKETVER <= 20141022) || PACKETVER >= 20150513 + +/// Check if the specified packetvresion supports the cashshop sale system +#define PACKETVER_SUPPORTS_SALES PACKETVER >= 20131223 + +#endif // _CONFIG_PACKETS_H_ diff --git a/src/custom/defines_post.h b/src/custom/defines_post.h new file mode 100644 index 0000000000..33f34d4a77 --- /dev/null +++ b/src/custom/defines_post.h @@ -0,0 +1,13 @@ +// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder +#ifndef _CONFIG_CUSTOM_DEFINES_POST_H_ +#define _CONFIG_CUSTOM_DEFINES_POST_H_ + +/** + * rAthena configuration file (http://rathena.org) + * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ + **/ + + + +#endif // _CONFIG_CUSTOM_DEFINES_POST_H_ diff --git a/src/custom/defines_pre.h b/src/custom/defines_pre.h new file mode 100644 index 0000000000..ceed7e774c --- /dev/null +++ b/src/custom/defines_pre.h @@ -0,0 +1,13 @@ +// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder +#ifndef _CONFIG_CUSTOM_DEFINES_PRE_H_ +#define _CONFIG_CUSTOM_DEFINES_PRE_H_ + +/** + * rAthena configuration file (http://rathena.org) + * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ + **/ + + + +#endif // _CONFIG_CUSTOM_DEFINES_PRE_H_ diff --git a/src/login/login.cpp b/src/login/login.cpp index f525f1d59b..24acaca376 100644 --- a/src/login/login.cpp +++ b/src/login/login.cpp @@ -303,13 +303,6 @@ int login_mmo_auth(struct login_session_data* sd, bool isServer) { } - //Client Version check - if( login_config.check_client_version && sd->version != login_config.client_version_to_connect ){ - ShowNotice("Invalid version (account: '%s', auth_vers: '%d', received version: '%d', ip: %s)\n", - sd->userid, login_config.client_version_to_connect, sd->version, ip); - return 5; - } - len = strnlen(sd->userid, NAME_LENGTH); // Account creation with _M/_F @@ -591,10 +584,6 @@ bool login_config_read(const char* cfgName, bool normal) { login_config.new_acc_length_limit = (bool)config_switch(w2); else if(!strcmpi(w1, "start_limited_time")) login_config.start_limited_time = atoi(w2); - else if(!strcmpi(w1, "check_client_version")) - login_config.check_client_version = (bool)config_switch(w2); - else if(!strcmpi(w1, "client_version_to_connect")) - login_config.client_version_to_connect = strtoul(w2, NULL, 10); else if(!strcmpi(w1, "use_MD5_passwords")) login_config.use_md5_passwds = (bool)config_switch(w2); else if(!strcmpi(w1, "group_id_to_connect")) @@ -701,9 +690,6 @@ void login_set_defaults() { login_config.use_md5_passwds = false; login_config.group_id_to_connect = -1; login_config.min_group_id_to_connect = -1; - login_config.check_client_version = false; - login_config.client_version_to_connect = date2version(PACKETVER); //20120410 => 30 - ShowInfo("loginconfig: client_version_to_connect = %d\n",login_config.client_version_to_connect); login_config.ipban = true; login_config.dynamic_pass_failure_ban = true; diff --git a/src/login/login.h b/src/login/login.h index 670533b295..653b0ac377 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -46,7 +46,6 @@ struct login_session_data { char lastlogin[24]; ///date when last logged, Y-M-D HH:MM:SS uint8 group_id; ///groupid of account uint8 clienttype; /// ??? - uint32 version; ///version contained in clientinfo uint8 client_hash[16]; ///hash of client int has_client_hash; ///client ha sent an hash @@ -86,8 +85,6 @@ struct Login_Config { bool use_md5_passwds; /// work with password hashes instead of plaintext passwords? int group_id_to_connect; /// required group id to connect int min_group_id_to_connect; /// minimum group id to connect - bool check_client_version; /// check the clientversion set in the clientinfo ? - uint32 client_version_to_connect; /// the client version needed to connect (if checking is enabled) bool ipban; /// perform IP blocking (via contents of `ipbanlist`) ? bool dynamic_pass_failure_ban; /// automatic IP blocking due to failed login attempts ? @@ -143,7 +140,6 @@ struct auth_node { uint32 login_id2; uint32 ip; char sex; - uint32 version; uint8 clienttype; }; extern DBMap* auth_db; // uint32 account_id -> struct auth_node* diff --git a/src/login/loginchrif.c b/src/login/loginchrif.c index 3ef53ff289..49e0dd6c03 100644 --- a/src/login/loginchrif.c +++ b/src/login/loginchrif.c @@ -96,7 +96,7 @@ int logchrif_parse_reqauth(int fd, int id,char* ip){ //ShowStatus("Char-server '%s': authentication of the account %d accepted (ip: %s).\n", server[id].name, account_id, ip); // send ack - WFIFOHEAD(fd,25); + WFIFOHEAD(fd,21); WFIFOW(fd,0) = 0x2713; WFIFOL(fd,2) = account_id; WFIFOL(fd,6) = login_id1; @@ -104,15 +104,14 @@ int logchrif_parse_reqauth(int fd, int id,char* ip){ WFIFOB(fd,14) = sex; WFIFOB(fd,15) = 0;// ok WFIFOL(fd,16) = request_id; - WFIFOL(fd,20) = node->version; - WFIFOB(fd,24) = node->clienttype; - WFIFOSET(fd,25); + WFIFOB(fd,20) = node->clienttype; + WFIFOSET(fd,21); // each auth entry can only be used once idb_remove(auth_db, account_id); }else{// authentication not found ShowStatus("Char-server '%s': authentication of the account %d REFUSED (ip: %s).\n", ch_server[id].name, account_id, ip); - WFIFOHEAD(fd,25); + WFIFOHEAD(fd,21); WFIFOW(fd,0) = 0x2713; WFIFOL(fd,2) = account_id; WFIFOL(fd,6) = login_id1; @@ -120,9 +119,8 @@ int logchrif_parse_reqauth(int fd, int id,char* ip){ WFIFOB(fd,14) = sex; WFIFOB(fd,15) = 1;// auth failed WFIFOL(fd,16) = request_id; - WFIFOL(fd,20) = 0; - WFIFOB(fd,24) = 0; - WFIFOSET(fd,25); + WFIFOB(fd,20) = 0; + WFIFOSET(fd,21); } } return 1; diff --git a/src/login/loginclif.c b/src/login/loginclif.c index 4ae3088d76..d69aa983b8 100644 --- a/src/login/loginclif.c +++ b/src/login/loginclif.c @@ -159,7 +159,6 @@ static void logclif_auth_ok(struct login_session_data* sd) { node->login_id2 = sd->login_id2; node->sex = sd->sex; node->ip = ip; - node->version = sd->version; node->clienttype = sd->clienttype; idb_put(auth_db, sd->account_id, node); { @@ -181,7 +180,7 @@ static void logclif_auth_ok(struct login_session_data* sd) { 3 = Rejected from Server 4 = You have been blocked by the GM Team 5 = Your Game's EXE file is not the latest version - 6 = Your are Prohibited to log in until %s + 6 = You are prohibited to log in until %s 7 = Server is jammed due to over populated 8 = No more accounts may be connected from this company 9 = MSI_REFUSE_BAN_BY_DBA @@ -216,37 +215,33 @@ static void logclif_auth_failed(struct login_session_data* sd, int result) { if( (result == 0 || result == 1) && login_config.dynamic_pass_failure_ban ) ipban_log(ip); // log failed password attempt -//#if PACKETVER >= 20120000 /* not sure when this started */ - if( sd->version >= date2version(20120000) ){ /* not sure when this started */ - WFIFOHEAD(fd,26); - WFIFOW(fd,0) = 0x83e; - WFIFOL(fd,2) = result; - if( result != 6 ) - memset(WFIFOP(fd,6), '\0', 20); - else { // 6 = Your are Prohibited to log in until %s - struct mmo_account acc; - AccountDB* accounts = login_get_accounts_db(); - time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0; - timestamp2string(WFIFOCP(fd,6), 20, unban_time, login_config.date_format); - } - WFIFOSET(fd,26); +#if PACKETVER >= 20120000 /* not sure when this started */ + WFIFOHEAD(fd,26); + WFIFOW(fd,0) = 0x83e; + WFIFOL(fd,2) = result; + if( result != 6 ) + memset(WFIFOP(fd,6), '\0', 20); + else { // 6 = You are prohibited to log in until %s + struct mmo_account acc; + AccountDB* accounts = login_get_accounts_db(); + time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0; + timestamp2string(WFIFOCP(fd,6), 20, unban_time, login_config.date_format); } -//#else - else { - WFIFOHEAD(fd,23); - WFIFOW(fd,0) = 0x6a; - WFIFOB(fd,2) = (uint8)result; - if( result != 6 ) - memset(WFIFOP(fd,3), '\0', 20); - else { // 6 = Your are Prohibited to log in until %s - struct mmo_account acc; - AccountDB* accounts = login_get_accounts_db(); - time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0; - timestamp2string(WFIFOCP(fd,3), 20, unban_time, login_config.date_format); - } - WFIFOSET(fd,23); + WFIFOSET(fd,26); +#else + WFIFOHEAD(fd,23); + WFIFOW(fd,0) = 0x6a; + WFIFOB(fd,2) = (uint8)result; + if( result != 6 ) + memset(WFIFOP(fd,3), '\0', 20); + else { // 6 = You are prohibited to log in until %s + struct mmo_account acc; + AccountDB* accounts = login_get_accounts_db(); + time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0; + timestamp2string(WFIFOCP(fd,3), 20, unban_time, login_config.date_format); } -//#endif + WFIFOSET(fd,23); +#endif } /** @@ -306,7 +301,6 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm return 0; else { int result; - uint32 version; char username[NAME_LENGTH]; char password[PASSWD_LENGTH]; unsigned char passhash[16]; @@ -320,8 +314,6 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm size_t uAccLen = strlen(accname); size_t uTokenLen = RFIFOREST(fd) - 0x5C; - version = RFIFOL(fd,4); - if(uAccLen > NAME_LENGTH - 1 || uAccLen == 0 || uTokenLen > NAME_LENGTH - 1 || uTokenLen == 0) { logclif_auth_failed(sd, 3); @@ -334,7 +326,6 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm } else { - version = RFIFOL(fd,2); safestrncpy(username, RFIFOCP(fd,6), NAME_LENGTH); if( israwpass ) { @@ -350,11 +341,10 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm RFIFOSKIP(fd,RFIFOREST(fd)); // assume no other packet was sent sd->clienttype = clienttype; - sd->version = version; safestrncpy(sd->userid, username, NAME_LENGTH); if( israwpass ) { - ShowStatus("Request for connection of %s (ip: %s) version=%d\n", sd->userid, ip,sd->version); + ShowStatus("Request for connection of %s (ip: %s)\n", sd->userid, ip); safestrncpy(sd->passwd, password, NAME_LENGTH); if( login_config.use_md5_passwds ) MD5_String(sd->passwd, sd->passwd); @@ -362,7 +352,7 @@ static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int comm } else { - ShowStatus("Request for connection (passwdenc mode) of %s (ip: %s) version=%d\n", sd->userid, ip,sd->version); + ShowStatus("Request for connection (passwdenc mode) of %s (ip: %s)\n", sd->userid, ip); bin2hex(sd->passwd, passhash, 16); // raw binary data here! sd->passwdenc = PASSWORDENC; } @@ -430,7 +420,6 @@ static int logclif_parse_reqcharconnec(int fd, struct login_session_data *sd, ch if( login_config.use_md5_passwds ) MD5_String(sd->passwd, sd->passwd); sd->passwdenc = 0; - sd->version = login_config.client_version_to_connect; // hack to skip version check server_ip = ntohl(RFIFOL(fd,54)); server_port = ntohs(RFIFOW(fd,58)); safestrncpy(server_name, RFIFOCP(fd,60), 20); diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 7c9ed34f6e..7512f8af39 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -185,12 +185,12 @@ ACMD_FUNC(send) long num; if(len) {// show packet length - sprintf(atcmd_output, msg_txt(sd,904), type, packet_db[sd->packet_ver][type].len); // Packet 0x%x length: %d + sprintf(atcmd_output, msg_txt(sd,904), type, packet_db[type].len); // Packet 0x%x length: %d clif_displaymessage(fd, atcmd_output); return 0; } - len=packet_db[sd->packet_ver][type].len; + len=packet_db[type].len; off=2; if(len == 0) {// unknown packet - ERROR @@ -341,7 +341,7 @@ ACMD_FUNC(send) SKIP_VALUE(message); } - if(packet_db[sd->packet_ver][type].len == -1) + if(packet_db[type].len == -1) {// send dynamic packet WFIFOW(fd,2)=TOW(off); WFIFOSET(fd,off); @@ -3927,9 +3927,6 @@ ACMD_FUNC(reload) { } else if (strstr(command, "questdb") || strncmp(message, "questdb", 3) == 0) { do_reload_quest(); clif_displaymessage(fd, msg_txt(sd,1377)); // Quest database has been reloaded. - } else if (strstr(command, "packetdb") || strncmp(message, "packetdb", 4) == 0) { - packetdb_readdb(true); - clif_displaymessage(fd, msg_txt(sd,1477)); // Packet database has been reloaded. } else if (strstr(command, "instancedb") || strncmp(message, "instancedb", 4) == 0) { instance_reload(); clif_displaymessage(fd, msg_txt(sd,516)); // Instance database has been reloaded. @@ -10085,7 +10082,6 @@ void atcommand_basecommands(void) { ACMD_DEF2("reloadmotd", reload), ACMD_DEF2("reloadquestdb", reload), ACMD_DEF2("reloadmsgconf", reload), - ACMD_DEF2("reloadpacketdb", reload), ACMD_DEF2("reloadinstancedb", reload), ACMD_DEF(partysharelvl), ACMD_DEF(mapinfo), diff --git a/src/map/battle.c b/src/map/battle.c index 63987390dd..7754f85f12 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -8194,8 +8194,6 @@ static const struct _battle_data { { "night_at_start", &battle_config.night_at_start, 0, 0, 1, }, { "show_mob_info", &battle_config.show_mob_info, 0, 0, 1|2|4, }, { "ban_hack_trade", &battle_config.ban_hack_trade, 0, 0, INT_MAX, }, - { "packet_ver_flag", &battle_config.packet_ver_flag, 0x7FFFFFFF,0, INT_MAX, }, - { "packet_ver_flag2", &battle_config.packet_ver_flag2, 0x7FFFFFFF,0, INT_MAX, }, { "min_hair_style", &battle_config.min_hair_style, 0, 0, INT_MAX, }, { "max_hair_style", &battle_config.max_hair_style, 23, 0, INT_MAX, }, { "min_hair_color", &battle_config.min_hair_color, 0, 0, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index 1f11a667b5..bd046a1ba6 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -373,8 +373,6 @@ extern struct Battle_Config int day_duration; // added by [Yor] int night_duration; // added by [Yor] int ban_hack_trade; // added by [Yor] - int packet_ver_flag; // added by [Yor] - int packet_ver_flag2; // expend of packet_ver_flag int min_hair_style; // added by [MouseJstr] int max_hair_style; // added by [MouseJstr] diff --git a/src/map/chrif.c b/src/map/chrif.c index aeaa14e6a7..1c96972fe4 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -36,7 +36,7 @@ static bool char_init_done = false; //server already initialized? Used for Inter static const int packet_len_table[0x3d] = { // U - used, F - free 60, 3,-1,-1,10,-1, 6,-1, // 2af8-2aff: U->2af8, U->2af9, U->2afa, U->2afb, U->2afc, U->2afd, U->2afe, U->2aff - 6,-1,19, 7,-1,39,30, 10, // 2b00-2b07: U->2b00, U->2b01, U->2b02, U->2b03, U->2b04, U->2b05, U->2b06, U->2b07 + 6,-1,18, 7,-1,39,30, 10, // 2b00-2b07: U->2b00, U->2b01, U->2b02, U->2b03, U->2b04, U->2b05, U->2b06, U->2b07 6,30, 10, -1,86, 7,44,34, // 2b08-2b0f: U->2b08, U->2b09, U->2b0a, U->2b0b, U->2b0c, U->2b0d, U->2b0e, U->2b0f 11,10,10, 0,11, -1,266,10, // 2b10-2b17: U->2b10, U->2b11, U->2b12, F->2b13, U->2b14, U->2b15, U->2b16, U->2b17 2,10, 2,-1,-1,-1, 2, 7, // 2b18-2b1f: U->2b18, U->2b19, U->2b1a, U->2b1b, U->2b1c, U->2b1d, U->2b1e, U->2b1f @@ -809,14 +809,13 @@ int chrif_charselectreq(struct map_session_data* sd, uint32 s_ip) { chrif_check(-1); - WFIFOHEAD(char_fd,19); + WFIFOHEAD(char_fd,18); WFIFOW(char_fd, 0) = 0x2b02; WFIFOL(char_fd, 2) = sd->bl.id; WFIFOL(char_fd, 6) = sd->login_id1; WFIFOL(char_fd,10) = sd->login_id2; WFIFOL(char_fd,14) = htonl(s_ip); - WFIFOB(char_fd,18) = sd->packet_ver; - WFIFOSET(char_fd,19); + WFIFOSET(char_fd,18); return 0; } diff --git a/src/map/clif.c b/src/map/clif.c index a773ebd0f9..338ee87914 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -55,21 +55,9 @@ /* for clif_clearunit_delayed */ static struct eri *delay_clearunit_ers; -//#define DUMP_UNKNOWN_PACKET -//#define DUMP_INVALID_PACKET - -struct Clif_Config { - int packet_db_ver; //Preferred packet version. - int connect_cmd[MAX_PACKET_VER + 1]; //Store the connect command for all versions. [Skotlex] -} clif_config; - -struct s_packet_db packet_db[MAX_PACKET_VER + 1][MAX_PACKET_DB + 1]; -int packet_db_ack[MAX_PACKET_VER + 1][MAX_ACK_FUNC + 1]; -#ifdef PACKET_OBFUSCATION -static struct s_packet_keys *packet_keys[MAX_PACKET_VER + 1]; -static unsigned int clif_cryptKey[3]; // Used keys -#endif -static unsigned short clif_parse_cmd(int fd, struct map_session_data *sd); +struct s_packet_db packet_db[MAX_PACKET_DB + 1]; +int packet_db_ack[MAX_ACK_FUNC + 1]; +#include "clif_obfuscation.h" static bool clif_session_isValid(struct map_session_data *sd); #if PACKETVER >= 20150513 @@ -295,9 +283,7 @@ static inline unsigned char clif_bl_type(struct block_list *bl) { #endif static bool clif_session_isValid(struct map_session_data *sd) { - if (sd != NULL && sd->packet_ver <= MAX_PACKET_VER && session_isActive(sd->fd)) - return true; - return false; + return ( sd != NULL && session_isActive(sd->fd) ); } /*========================================== @@ -373,10 +359,8 @@ static int clif_send_sub(struct block_list *bl, va_list ap) return 0; } - if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version - memcpy(WFIFOP(fd,0), buf, len); - WFIFOSET(fd,len); - } + memcpy(WFIFOP(fd,0), buf, len); + WFIFOSET(fd,len); return 0; } @@ -404,14 +388,10 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target case ALL_CLIENT: //All player clients. iter = mapit_getallusers(); - while( (tsd = (TBL_PC*)mapit_next(iter)) != NULL ) - { - if( packet_db[tsd->packet_ver][RBUFW(buf,0)].len ) - { // packet must exist for the client version - WFIFOHEAD(tsd->fd, len); - memcpy(WFIFOP(tsd->fd,0), buf, len); - WFIFOSET(tsd->fd,len); - } + while( (tsd = (TBL_PC*)mapit_next(iter)) != NULL ){ + WFIFOHEAD(tsd->fd, len); + memcpy(WFIFOP(tsd->fd, 0), buf, len); + WFIFOSET(tsd->fd, len); } mapit_free(iter); break; @@ -420,8 +400,7 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target iter = mapit_getallusers(); while( (tsd = (TBL_PC*)mapit_next(iter)) != NULL ) { - if( bl->m == tsd->bl.m && packet_db[tsd->packet_ver][RBUFW(buf,0)].len ) - { // packet must exist for the client version + if( bl->m == tsd->bl.m ){ WFIFOHEAD(tsd->fd, len); memcpy(WFIFOP(tsd->fd,0), buf, len); WFIFOSET(tsd->fd,len); @@ -458,13 +437,10 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target for(i = 0; i < cd->users; i++) { if (type == CHAT_WOS && cd->usersd[i] == sd) continue; - if (packet_db[cd->usersd[i]->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version - if ((fd=cd->usersd[i]->fd) >0 && session[fd]) // Added check to see if session exists [PoW] - { - WFIFOHEAD(fd,len); - memcpy(WFIFOP(fd,0), buf, len); - WFIFOSET(fd,len); - } + if ((fd=cd->usersd[i]->fd) >0 && session[fd]){ // Added check to see if session exists [PoW] + WFIFOHEAD(fd,len); + memcpy(WFIFOP(fd,0), buf, len); + WFIFOSET(fd,len); } } } @@ -500,12 +476,9 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target if( (type == PARTY_AREA || type == PARTY_AREA_WOS) && (sd->bl.x < x0 || sd->bl.y < y0 || sd->bl.x > x1 || sd->bl.y > y1) ) continue; - if( packet_db[sd->packet_ver][RBUFW(buf,0)].len ) - { // packet must exist for the client version - WFIFOHEAD(fd,len); - memcpy(WFIFOP(fd,0), buf, len); - WFIFOSET(fd,len); - } + WFIFOHEAD(fd, len); + memcpy(WFIFOP(fd, 0), buf, len); + WFIFOSET(fd, len); } if (!enable_spy) //Skip unnecessary parsing. [Skotlex] break; @@ -513,8 +486,7 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target iter = mapit_getallusers(); while( (tsd = (TBL_PC*)mapit_next(iter)) != NULL ) { - if( tsd->partyspy == p->party.party_id && packet_db[tsd->packet_ver][RBUFW(buf,0)].len ) - { // packet must exist for the client version + if( tsd->partyspy == p->party.party_id ){ WFIFOHEAD(tsd->fd, len); memcpy(WFIFOP(tsd->fd,0), buf, len); WFIFOSET(tsd->fd,len); @@ -533,8 +505,7 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target { if( type == DUEL_WOS && bl->id == tsd->bl.id ) continue; - if( sd->duel_group == tsd->duel_group && packet_db[tsd->packet_ver][RBUFW(buf,0)].len ) - { // packet must exist for the client version + if( sd->duel_group == tsd->duel_group ){ WFIFOHEAD(tsd->fd, len); memcpy(WFIFOP(tsd->fd,0), buf, len); WFIFOSET(tsd->fd,len); @@ -544,7 +515,7 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target break; case SELF: - if (sd && (fd=sd->fd) && packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version + if (sd && (fd=sd->fd)) { WFIFOHEAD(fd,len); memcpy(WFIFOP(fd,0), buf, len); WFIFOSET(fd,len); @@ -585,12 +556,9 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target if( (type == GUILD_AREA || type == GUILD_AREA_WOS) && (sd->bl.x < x0 || sd->bl.y < y0 || sd->bl.x > x1 || sd->bl.y > y1) ) continue; - if( packet_db[sd->packet_ver][RBUFW(buf,0)].len ) - { // packet must exist for the client version - WFIFOHEAD(fd,len); - memcpy(WFIFOP(fd,0), buf, len); - WFIFOSET(fd,len); - } + WFIFOHEAD(fd,len); + memcpy(WFIFOP(fd,0), buf, len); + WFIFOSET(fd,len); } } if (!enable_spy) //Skip unnecessary parsing. [Skotlex] @@ -599,8 +567,7 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target iter = mapit_getallusers(); while( (tsd = (TBL_PC*)mapit_next(iter)) != NULL ) { - if( tsd->guildspy == g->guild_id && packet_db[tsd->packet_ver][RBUFW(buf,0)].len ) - { // packet must exist for the client version + if( tsd->guildspy == g->guild_id ){ WFIFOHEAD(tsd->fd, len); memcpy(WFIFOP(tsd->fd,0), buf, len); WFIFOSET(tsd->fd,len); @@ -632,12 +599,9 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target continue; if( (type == BG_AREA || type == BG_AREA_WOS) && (sd->bl.x < x0 || sd->bl.y < y0 || sd->bl.x > x1 || sd->bl.y > y1) ) continue; - if( packet_db[sd->packet_ver][RBUFW(buf,0)].len ) - { // packet must exist for the client version - WFIFOHEAD(fd,len); - memcpy(WFIFOP(fd,0), buf, len); - WFIFOSET(fd,len); - } + WFIFOHEAD(fd,len); + memcpy(WFIFOP(fd,0), buf, len); + WFIFOSET(fd,len); } } break; @@ -650,11 +614,9 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target continue; } - if( packet_db[sd->packet_ver][RBUFW(buf,0)].len ){ // packet must exist for the client version - WFIFOHEAD(fd,len); - memcpy(WFIFOP(fd,0), buf, len); - WFIFOSET(fd,len); - } + WFIFOHEAD(fd,len); + memcpy(WFIFOP(fd,0), buf, len); + WFIFOSET(fd,len); } if (!enable_spy) //Skip unnecessary parsing. [Skotlex] @@ -662,8 +624,7 @@ int clif_send(const uint8* buf, int len, struct block_list* bl, enum send_target iter = mapit_getallusers(); while ((tsd = (TBL_PC*)mapit_next(iter)) != NULL){ - if (tsd->clanspy == clan->id && packet_db[tsd->packet_ver][RBUFW(buf, 0)].len) - { // packet must exist for the client version + if (tsd->clanspy == clan->id){ WFIFOHEAD(tsd->fd, len); memcpy(WFIFOP(tsd->fd, 0), buf, len); WFIFOSET(tsd->fd, len); @@ -2046,7 +2007,7 @@ void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { if (sd->state.trading) return; - info = &packet_db[sd->packet_ver][cmd]; + info = &packet_db[cmd]; if (!info || info->len == 0) return; @@ -2093,7 +2054,7 @@ void clif_npc_market_purchase_ack(struct map_session_data *sd, uint8 res, uint8 nullpo_retv(sd); nullpo_retv((nd = map_id2nd(sd->npc_shopid))); - info = &packet_db[sd->packet_ver][cmd]; + info = &packet_db[cmd]; if (!info || info->len == 0) return; @@ -2137,7 +2098,7 @@ void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd) { if (!sd->npc_shopid) return; - info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + info = &packet_db[RFIFOW(fd,0)]; if (!info || info->len == 0) return; len = RFIFOW(fd,info->pos[0]); @@ -2246,9 +2207,9 @@ void clif_scriptclear(struct map_session_data *sd, int npcid) nullpo_retv(sd); - cmd = packet_db_ack[sd->packet_ver][ZC_CLEAR_DIALOG]; + cmd = packet_db_ack[ZC_CLEAR_DIALOG]; if(!cmd) cmd = 0x8d6; //default - info = &packet_db[sd->packet_ver][cmd]; + info = &packet_db[cmd]; len = info->len; fd = sd->fd; @@ -3814,8 +3775,8 @@ void clif_equipitemack(struct map_session_data *sd,int n,int pos,uint8 flag) nullpo_retv(sd); - cmd = packet_db_ack[sd->packet_ver][ZC_WEAR_EQUIP_ACK]; - if (!cmd || !(info = &packet_db[sd->packet_ver][cmd]) || !info->len) + cmd = packet_db_ack[ZC_WEAR_EQUIP_ACK]; + if (!cmd || !(info = &packet_db[cmd]) || !info->len) return; fd = sd->fd; @@ -3829,12 +3790,12 @@ void clif_equipitemack(struct map_session_data *sd,int n,int pos,uint8 flag) switch (cmd) { case 0xaa: WFIFOW(fd, info->pos[1]) = pos; - if (sd->packet_ver < date2version(20100629)) - WFIFOW(fd, info->pos[2]) = (flag == ITEM_EQUIP_ACK_OK ? 1 : 0); - else { - WFIFOL(fd, info->pos[2]) = look; - WFIFOW(fd, info->pos[3]) = (flag == ITEM_EQUIP_ACK_OK ? 1 : 0); - } +#if PACKETVER < 20100629 + WFIFOW(fd, info->pos[2]) = (flag == ITEM_EQUIP_ACK_OK ? 1 : 0); +#else + WFIFOL(fd, info->pos[2]) = look; + WFIFOW(fd, info->pos[3]) = (flag == ITEM_EQUIP_ACK_OK ? 1 : 0); +#endif break; case 0x8d0: if (flag == ITEM_EQUIP_ACK_FAILLEVEL) @@ -6882,7 +6843,7 @@ void clif_parse_BankOpen(int fd, struct map_session_data* sd) { return; } else { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ? if(sd->status.account_id == aid){ sd->state.banking = 1; @@ -6913,7 +6874,7 @@ void clif_bank_close(struct map_session_data *sd){ * 09B8 L ??? (dunno just wild guess checkme) */ void clif_parse_BankClose(int fd, struct map_session_data* sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ? nullpo_retv(sd); @@ -6939,9 +6900,9 @@ void clif_Bank_Check(struct map_session_data* sd) { nullpo_retv(sd); - cmd = packet_db_ack[sd->packet_ver][ZC_BANKING_CHECK]; + cmd = packet_db_ack[ZC_BANKING_CHECK]; if(!cmd) cmd = 0x09A6; //default - info = &packet_db[sd->packet_ver][cmd]; + info = &packet_db[cmd]; len = info->len; if(!len) return; //version as packet disable // sd->state.banking = 1; //mark opening and closing @@ -6964,7 +6925,7 @@ void clif_parse_BankCheck(int fd, struct map_session_data* sd) { return; } else { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ? if(sd->status.account_id == aid) //since we have it let check it for extra security clif_Bank_Check(sd); @@ -6983,9 +6944,9 @@ void clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK r nullpo_retv(sd); - cmd = packet_db_ack[sd->packet_ver][ZC_ACK_BANKING_DEPOSIT]; + cmd = packet_db_ack[ZC_ACK_BANKING_DEPOSIT]; if(!cmd) cmd = 0x09A8; - info = &packet_db[sd->packet_ver][cmd]; + info = &packet_db[cmd]; len = info->len; if(!len) return; //version as packet disable @@ -7008,7 +6969,7 @@ void clif_parse_BankDeposit(int fd, struct map_session_data* sd) { return; } else { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ? int money = RFIFOL(fd,info->pos[1]); @@ -7031,9 +6992,9 @@ void clif_bank_withdraw(struct map_session_data *sd,enum e_BANKING_WITHDRAW_ACK nullpo_retv(sd); - cmd = packet_db_ack[sd->packet_ver][ZC_ACK_BANKING_WITHDRAW]; + cmd = packet_db_ack[ZC_ACK_BANKING_WITHDRAW]; if(!cmd) cmd = 0x09AA; - info = &packet_db[sd->packet_ver][cmd]; + info = &packet_db[cmd]; len = info->len; if(!len) return; //version as packet disable @@ -7056,7 +7017,7 @@ void clif_parse_BankWithdraw(int fd, struct map_session_data* sd) { return; } else { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ? int money = RFIFOL(fd,info->pos[1]); if(sd->status.account_id == aid){ @@ -9914,7 +9875,7 @@ static bool clif_process_message(struct map_session_data* sd, bool whisperFormat fd = sd->fd; - info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + info = &packet_db[RFIFOW(fd,0)]; packetLength = RFIFOW(fd,info->pos[0]); input = RFIFOCP(fd,info->pos[1]); @@ -10037,7 +9998,7 @@ static bool clif_process_message(struct map_session_data* sd, bool whisperFormat } // --------------------- -// clif_guess_PacketVer +// clif_parse_wanttoconnect // --------------------- // Parses a WantToConnection packet to try to identify which is the packet version used. [Skotlex] // error codes: @@ -10049,74 +10010,33 @@ static bool clif_process_message(struct map_session_data* sd, bool whisperFormat // 5 - Invalid client_tick (reserved) // 6 - Invalid sex // Only the first 'invalid' error that appears is used. -static int clif_guess_PacketVer(int fd, int get_previous, int *error) +static int clif_parse_WantToConnection_sub(int fd) { - static int err = 1; - static int packet_ver = -1; int packet_len, value; //Value is used to temporarily store account/char_id/sex unsigned short cmd; - if (get_previous) - {//For quick reruns, since the normal code flow is to fetch this once to identify the packet version, then again in the wanttoconnect function. [Skotlex] - if( error ) - *error = err; - return packet_ver; - } - //By default, start searching on the default one. - err = 1; - packet_ver = clif_config.packet_db_ver; - cmd = clif_parse_cmd(fd, NULL); + cmd = RFIFOW(fd, 0); packet_len = RFIFOREST(fd); -#define SET_ERROR(n) \ - if( err == 1 )\ - err = n;\ -//define SET_ERROR - // FIXME: If the packet is not received at once, this will FAIL. // Figure out, when it happens, that only part of the packet is // received, or fix the function to be able to deal with that // case. -#define CHECK_PACKET_VER() \ - if( cmd != clif_config.connect_cmd[packet_ver] || packet_len != packet_db[packet_ver][cmd].len )\ - ;/* not wanttoconnection or wrong length */\ - else if( (value=(int)RFIFOL(fd, packet_db[packet_ver][cmd].pos[0])) < START_ACCOUNT_NUM || value > END_ACCOUNT_NUM )\ - { SET_ERROR(2); }/* invalid account_id */\ - else if( (value=(int)RFIFOL(fd, packet_db[packet_ver][cmd].pos[1])) <= 0 )\ - { SET_ERROR(3); }/* invalid char_id */\ - /* RFIFOL(fd, packet_db[packet_ver][cmd].pos[2]) - don't care about login_id1 */\ - /* RFIFOL(fd, packet_db[packet_ver][cmd].pos[3]) - don't care about client_tick */\ - else if( (value=(int)RFIFOB(fd, packet_db[packet_ver][cmd].pos[4])) != 0 && value != 1 )\ - { SET_ERROR(6); }/* invalid sex */\ - else\ - {\ - err = 0;\ - if( error )\ - *error = 0;\ - return packet_ver;\ - }\ -//define CHECK_PACKET_VER - - CHECK_PACKET_VER();//Default packet version found. - - for (packet_ver = MAX_PACKET_VER; packet_ver > 0; packet_ver--) { //Start guessing the version, giving priority to the newer ones. [Skotlex] - CHECK_PACKET_VER(); - } - if( error ) - *error = err; - packet_ver = -1; - return -1; -#undef SET_ERROR -#undef CHECK_PACKET_VER + if( packet_len != packet_db[cmd].len ) + return 1; /* wrong length */ + else if( (value=(int)RFIFOL(fd, packet_db[cmd].pos[0])) < START_ACCOUNT_NUM || value > END_ACCOUNT_NUM ) + return 2; /* invalid account_id */ + else if( (value=(int)RFIFOL(fd, packet_db[cmd].pos[1])) <= 0 ) + return 3; /* invalid char_id */ + /* RFIFOL(fd, packet_db[cmd].pos[2]) - don't care about login_id1 */ + /* RFIFOL(fd, packet_db[cmd].pos[3]) - don't care about client_tick */ + else if( (value=(int)RFIFOB(fd, packet_db[cmd].pos[4])) != 0 && value != 1 ) + return 6; /* invalid sex */ + else + return 0; } -// ------------ -// clif_parse_* -// ------------ -// Parses incoming (player) connection - - /// Request to connect to map-server. /// 0072 .L .L .L .L .B (CZ_ENTER) /// 0436 .L .L .L .L .B (CZ_ENTER2) @@ -10125,35 +10045,46 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) { struct block_list* bl; struct auth_node* node; - int cmd, account_id, char_id, login_id1, sex; + int cmd, account_id, char_id, login_id1, sex, err; unsigned int client_tick; //The client tick is a tick, therefore it needs be unsigned. [Skotlex] - int packet_ver; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor]) if (sd) { ShowError("clif_parse_WantToConnection : invalid request (character already logged in)\n"); return; } - // Only valid packet version get here - packet_ver = clif_guess_PacketVer(fd, 1, NULL); + cmd = RFIFOW(fd, 0); + account_id = RFIFOL(fd, packet_db[cmd].pos[0]); + char_id = RFIFOL(fd, packet_db[cmd].pos[1]); + login_id1 = RFIFOL(fd, packet_db[cmd].pos[2]); + client_tick = RFIFOL(fd, packet_db[cmd].pos[3]); + sex = RFIFOB(fd, packet_db[cmd].pos[4]); - cmd = RFIFOW(fd,0); - account_id = RFIFOL(fd, packet_db[packet_ver][cmd].pos[0]); - char_id = RFIFOL(fd, packet_db[packet_ver][cmd].pos[1]); - login_id1 = RFIFOL(fd, packet_db[packet_ver][cmd].pos[2]); - client_tick = RFIFOL(fd, packet_db[packet_ver][cmd].pos[3]); - sex = RFIFOB(fd, packet_db[packet_ver][cmd].pos[4]); + err = clif_parse_WantToConnection_sub(fd); - if( packet_ver < 5 || // reject really old client versions - (packet_ver <= 9 && (battle_config.packet_ver_flag & 1) == 0) || // older than 6sept04 - (packet_ver > 9 && packet_ver <40 && (battle_config.packet_ver_flag & 1<<(packet_ver-9)) == 0) || // version not allowed - (packet_ver >= 40 && packet_ver <=72 && (battle_config.packet_ver_flag2 & 1<<(packet_ver-40)) == 0) ) - {// packet version rejected - ShowInfo("Rejected connection attempt, forbidden packet version (AID/CID: '"CL_WHITE"%d/%d"CL_RESET"', Packet Ver: '"CL_WHITE"%d"CL_RESET"', IP: '"CL_WHITE"%s"CL_RESET"').\n", account_id, char_id, packet_ver, ip2str(session[fd]->client_addr, NULL)); + if( err ){ // connection rejected + ShowInfo("clif_parse: Disconnecting session #%d with unknown connect packet 0x%04x(length:%d)%s\n", fd, cmd, RFIFOREST(fd), ( + err == 1 ? "." : + err == 2 ? ", possibly for having an invalid account_id." : + err == 3 ? ", possibly for having an invalid char_id." : + /* Uncomment when checks are added in clif_parse_WantToConnection_sub. [FlavioJS] + err == 4 ? ", possibly for having an invalid login_id1." : + err == 5 ? ", possibly for having an invalid client_tick." : + */ + err == 6 ? ", possibly for having an invalid sex." : + ". ERROR invalid error code")); + WFIFOHEAD(fd,packet_len(0x6a)); WFIFOW(fd,0) = 0x6a; - WFIFOB(fd,2) = 5; // Your Game's EXE file is not the latest version + WFIFOB(fd,2) = err; WFIFOSET(fd,packet_len(0x6a)); + +#ifdef DUMP_INVALID_PACKET + ShowDump(RFIFOP(fd, 0), RFIFOREST(fd)); +#endif + + RFIFOSKIP(fd, RFIFOREST(fd)); + set_eof(fd); return; } @@ -10185,7 +10116,6 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) CREATE(sd, TBL_PC, 1); sd->fd = fd; - sd->packet_ver = packet_ver; #ifdef PACKET_OBFUSCATION sd->cryptKey = (((((clif_cryptKey[0] * clif_cryptKey[1]) + clif_cryptKey[2]) & 0xFFFFFFFF) * clif_cryptKey[1]) + clif_cryptKey[2]) & 0xFFFFFFFF; #endif @@ -10595,7 +10525,7 @@ void clif_notify_time(struct map_session_data* sd, unsigned long time) /// There are various variants of this packet, some of them have padding between fields. void clif_parse_TickSend(int fd, struct map_session_data *sd) { - sd->client_tick = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + sd->client_tick = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); clif_notify_time(sd, gettick()); } @@ -10638,7 +10568,7 @@ void clif_hotkeys_send(struct map_session_data *sd) { /// Request to update a position on the hotkey row bar void clif_parse_HotkeyRowShift(int fd, struct map_session_data *sd) { int cmd = RFIFOW(fd, 0); - sd->status.hotkey_rowshift = RFIFOB(fd, packet_db[sd->packet_ver][cmd].pos[0]); + sd->status.hotkey_rowshift = RFIFOB(fd, packet_db[cmd].pos[0]); } /// Request to update a position on the hotkey bar (CZ_SHORTCUT_KEY_CHANGE). @@ -10646,7 +10576,7 @@ void clif_parse_HotkeyRowShift(int fd, struct map_session_data *sd) { void clif_parse_Hotkey(int fd, struct map_session_data *sd) { #ifdef HOTKEY_SAVING unsigned short idx; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; idx = RFIFOW(fd, info->pos[0]); if (idx >= MAX_HOTKEYS) return; @@ -10723,7 +10653,7 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) if(sd->sc.data[SC_RUN] || sd->sc.data[SC_WUGDASH]) return; - RFIFOPOS(fd, packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0], &x, &y, NULL); + RFIFOPOS(fd, packet_db[RFIFOW(fd,0)].pos[0], &x, &y, NULL); //A move command one cell west is only valid if the target cell is free if(battle_config.official_cell_stack_limit > 0 @@ -10769,7 +10699,7 @@ void clif_disconnect_ack(struct map_session_data* sd, short result) void clif_parse_QuitGame(int fd, struct map_session_data *sd) { /* Rovert's prevent logout option fixed [Valaris] */ - //int type = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + //int type = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]); if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC_SUHIDE] && (!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) { @@ -10788,7 +10718,7 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd) /// There are various variants of this packet, some of them have padding between fields. void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) { - int id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); struct block_list* bl; //struct status_change *sc; @@ -10868,7 +10798,7 @@ void clif_parse_MapMove(int fd, struct map_session_data *sd) { char command[MAP_NAME_LENGTH_EXT+25]; char* map_name; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; map_name = RFIFOCP(fd,info->pos[0]); map_name[MAP_NAME_LENGTH_EXT-1]='\0'; @@ -10920,7 +10850,7 @@ void clif_changed_dir(struct block_list *bl, enum send_target target) void clif_parse_ChangeDir(int fd, struct map_session_data *sd) { unsigned char headdir, dir; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; headdir = RFIFOB(fd,info->pos[0]); dir = RFIFOB(fd,info->pos[1]); @@ -10936,7 +10866,7 @@ void clif_parse_ChangeDir(int fd, struct map_session_data *sd) /// @see enum emotion_type void clif_parse_Emotion(int fd, struct map_session_data *sd) { - int emoticon = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int emoticon = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0]); if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 2 || pc_checkskill(sd, SU_BASIC_SKILL) >= 1) { if (emoticon == E_MUTE) {// prevent use of the mute emote [Valaris] @@ -11095,7 +11025,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, /// There are various variants of this packet, some of them have padding between fields. void clif_parse_ActionRequest(int fd, struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; clif_parse_ActionRequest_sub(sd, RFIFOB(fd,info->pos[1]), RFIFOL(fd,info->pos[0]), @@ -11111,7 +11041,7 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) /// 1 = char-select (disconnect) void clif_parse_Restart(int fd, struct map_session_data *sd) { - switch(RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])) { + switch(RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0])) { case 0x00: pc_respawn(sd,CLR_OUTSIGHT); break; @@ -11256,7 +11186,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) /// 0099 .W .?B 00 void clif_parse_Broadcast(int fd, struct map_session_data* sd) { char command[CHAT_SIZE_MAX+11]; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; unsigned int len = RFIFOW(fd,info->pos[0])-4; char* msg = RFIFOCP(fd,info->pos[1]); @@ -11277,7 +11207,7 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd) struct flooritem_data *fitem; int map_object_id; - map_object_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + map_object_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); fitem = (struct flooritem_data*)map_id2bl(map_object_id); @@ -11308,7 +11238,7 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd) /// 0363 .W .W (CZ_ITEM_THROW2) /// There are various variants of this packet, some of them have padding between fields. void clif_parse_DropItem(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int item_index = RFIFOW(fd,info->pos[0]) -2; int item_amount = RFIFOW(fd,info->pos[1]) ; @@ -11359,7 +11289,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) //Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex] if (battle_config.idletime_option&IDLE_USEITEM) sd->idletime = last_tick; - n = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2; + n = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2; if(n <0 || n >= MAX_INVENTORY) return; @@ -11374,7 +11304,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) void clif_parse_EquipItem(int fd,struct map_session_data *sd) { int index; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if(pc_isdead(sd)) { clif_clearunit_area(&sd->bl,CLR_DEAD); @@ -11441,7 +11371,7 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd) else if (pc_cant_act2(sd)) return; - index = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2; + index = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2; if (battle_config.idletime_option&IDLE_USEITEM) sd->idletime = last_tick; @@ -11457,7 +11387,7 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd) void clif_parse_NpcClicked(int fd,struct map_session_data *sd) { struct block_list *bl; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if(pc_isdead(sd)) { clif_clearunit_area(&sd->bl,CLR_DEAD); @@ -11503,7 +11433,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) /// 1 = sell void clif_parse_NpcBuySellSelected(int fd,struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if (sd->state.trading) return; npc_buysellsel(sd,RFIFOL(fd,info->pos[0]),RFIFOB(fd,info->pos[1])); @@ -11532,7 +11462,7 @@ void clif_npc_buy_result(struct map_session_data* sd, unsigned char result) /// 00c8 .W { .W .W }* void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; uint16 n = (RFIFOW(fd,info->pos[0])-4) /4; int result; @@ -11568,7 +11498,7 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd) { int fail=0,n; unsigned short *item_list; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; n = (RFIFOW(fd,info->pos[0])-4) /4; // (pktlen-(cmd+len))/listsize item_list = (unsigned short*)RFIFOP(fd,info->pos[1]); @@ -11590,7 +11520,7 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd) /// 1 = public void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int len = RFIFOW(fd,info->pos[0])-15; int limit = RFIFOW(fd,info->pos[1]); bool pub = (RFIFOB(fd,info->pos[2]) != 0); @@ -11628,7 +11558,7 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd) /// Chatroom join request (CZ_REQ_ENTER_ROOM). /// 00d9 .L .8B void clif_parse_ChatAddMember(int fd, struct map_session_data* sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int chatid = RFIFOL(fd,info->pos[0]); const char* password = RFIFOCP(fd,info->pos[1]); // not zero-terminated @@ -11642,7 +11572,7 @@ void clif_parse_ChatAddMember(int fd, struct map_session_data* sd){ /// 0 = private /// 1 = public void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int len = RFIFOW(fd,info->pos[0])-15; int limit = RFIFOW(fd,info->pos[1]); bool pub = (RFIFOB(fd,info->pos[2]) != 0); @@ -11668,8 +11598,8 @@ void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd){ /// 1 = normal void clif_parse_ChangeChatOwner(int fd, struct map_session_data* sd) { - //int role = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); - chat_changechatowner(sd,RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1])); + //int role = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); + chat_changechatowner(sd,RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[1])); } @@ -11677,7 +11607,7 @@ void clif_parse_ChangeChatOwner(int fd, struct map_session_data* sd) /// 00e2 .24B void clif_parse_KickFromChat(int fd,struct map_session_data *sd) { - chat_kickchat(sd,RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + chat_kickchat(sd,RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0])); } @@ -11711,7 +11641,7 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd) { struct map_session_data *t_sd; - t_sd = map_id2sd(RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + t_sd = map_id2sd(RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])); if(!sd->chatID && pc_cant_act(sd)) return; //You can trade while in a chatroom. @@ -11752,7 +11682,7 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd) /// 4 = rejected void clif_parse_TradeAck(int fd,struct map_session_data *sd) { - trade_tradeack(sd,RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + trade_tradeack(sd,RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0])); } @@ -11760,7 +11690,7 @@ void clif_parse_TradeAck(int fd,struct map_session_data *sd) /// 00e8 .W .L void clif_parse_TradeAddItem(int fd,struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; short index = RFIFOW(fd,info->pos[0]); int amount = RFIFOL(fd,info->pos[1]); @@ -11808,7 +11738,7 @@ void clif_parse_StopAttack(int fd,struct map_session_data *sd) /// 0126 .W .L void clif_parse_PutItemToCart(int fd,struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if (pc_istrading(sd)) return; if (!pc_iscarton(sd)) @@ -11821,7 +11751,7 @@ void clif_parse_PutItemToCart(int fd,struct map_session_data *sd) /// 0127 .W .L void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if (!pc_iscarton(sd)) return; pc_getitemfromcart(sd,RFIFOW(fd,info->pos[0])-2,RFIFOL(fd,info->pos[1])); @@ -11902,7 +11832,7 @@ void clif_parse_ChangeCart(int fd,struct map_session_data *sd) } #endif - type = (int)RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + type = (int)RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]); if( #ifdef NEW_CARTS @@ -11929,13 +11859,13 @@ void clif_parse_ChangeCart(int fd,struct map_session_data *sd) /// Newer clients (2013-12-23 and newer) send the correct amount. void clif_parse_StatusUp(int fd,struct map_session_data *sd) { - int increase_amount = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]); + int increase_amount = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[1]); if( increase_amount < 0 ) { ShowDebug("clif_parse_StatusUp: Negative 'increase' value sent by client! (fd: %d, value: %d)\n", fd, increase_amount); } - pc_statusup(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]),increase_amount); + pc_statusup(sd,RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]),increase_amount); } @@ -11943,7 +11873,7 @@ void clif_parse_StatusUp(int fd,struct map_session_data *sd) /// 0112 .W void clif_parse_SkillUp(int fd,struct map_session_data *sd) { - pc_skillup(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + pc_skillup(sd,RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])); } static void clif_parse_UseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id) @@ -12060,7 +11990,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) uint16 skill_id, skill_lv; int inf,target_id; unsigned int tick = gettick(); - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; skill_lv = RFIFOW(fd,info->pos[0]); skill_id = RFIFOW(fd,info->pos[1]); @@ -12252,7 +12182,7 @@ static void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uin /// There are various variants of this packet, some of them have padding between fields. void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if (pc_cant_act(sd)) return; if (pc_issit(sd)) @@ -12274,7 +12204,7 @@ void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) /// There are various variants of this packet, some of them have padding between fields. void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if (pc_cant_act(sd)) return; if (pc_issit(sd)) @@ -12294,7 +12224,7 @@ void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) /// 011b .W .16B void clif_parse_UseSkillMap(int fd, struct map_session_data* sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; uint16 skill_id = RFIFOW(fd,info->pos[0]); char map_name[MAP_NAME_LENGTH]; @@ -12327,7 +12257,7 @@ void clif_parse_RequestMemo(int fd,struct map_session_data *sd) /// Answer to pharmacy item selection dialog (CZ_REQMAKINGITEM). /// 018e .W { .W }*3 void clif_parse_ProduceMix(int fd,struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; unsigned short nameid = RFIFOW(fd,info->pos[0]); int slot1 = RFIFOW(fd,info->pos[1]); int slot2 = RFIFOW(fd,info->pos[2]); @@ -12365,7 +12295,7 @@ void clif_parse_ProduceMix(int fd,struct map_session_data *sd){ /// 5 = GN_MAKEBOMB /// 6 = GN_S_PHARMACY void clif_parse_Cooking(int fd,struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int type = RFIFOW(fd,info->pos[0]); unsigned short nameid = RFIFOW(fd,info->pos[1]); int amount = sd->menuskill_val2 ? sd->menuskill_val2 : 1; @@ -12399,11 +12329,11 @@ void clif_parse_RepairItem(int fd, struct map_session_data *sd) clif_menuskill_clear(sd); return; } - skill_repairweapon(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); - //nameid = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]); - //refine = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[2]); + skill_repairweapon(sd,RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])); + //nameid = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[1]); + //refine = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[2]); //for(i = 0; ipacket_ver][RFIFOW(fd,0)].pos[3+i]); + // card[i] = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[3+i]); clif_menuskill_clear(sd); } @@ -12422,7 +12352,7 @@ void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) clif_menuskill_clear(sd); return; } - idx = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + idx = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); skill_weaponrefine(sd, idx-2); clif_menuskill_clear(sd); } @@ -12436,7 +12366,7 @@ void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) /// NOTE: If there were more than 254 items in the list, choice /// overflows to choice%256. void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int npc_id = RFIFOL(fd,info->pos[0]); uint8 select = RFIFOB(fd,info->pos[1]); @@ -12462,14 +12392,14 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd){ /// 00b9 .L void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd) { - npc_scriptcont(sd,RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]), false); + npc_scriptcont(sd,RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]), false); } /// NPC numeric input dialog value (CZ_INPUT_EDITDLG). /// 0143 .L .L void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int npcid = RFIFOL(fd,info->pos[0]); int amount = (int)RFIFOL(fd,info->pos[1]); @@ -12481,7 +12411,7 @@ void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd){ /// NPC text input dialog value (CZ_INPUT_EDITDLGSTR). /// 01d5 .W .L .?B void clif_parse_NpcStringInput(int fd, struct map_session_data* sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int message_len = RFIFOW(fd,info->pos[0])-8; int npcid = RFIFOL(fd,info->pos[1]); const char* message = RFIFOCP(fd,info->pos[2]); @@ -12504,7 +12434,7 @@ void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd) { if (!sd->npc_id) //Avoid parsing anything when the script was done with. [Skotlex] return; - npc_scriptcont(sd, RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]), true); + npc_scriptcont(sd, RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]), true); } @@ -12513,7 +12443,7 @@ void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd) /// index: /// -1 = cancel void clif_parse_ItemIdentify(int fd,struct map_session_data *sd) { - short idx = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]) - 2; + short idx = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]) - 2; if (sd->menuskill_id != MC_IDENTIFY) return; @@ -12538,7 +12468,7 @@ void clif_parse_ItemIdentify(int fd,struct map_session_data *sd) { /// Answer to arrow crafting item selection dialog (CZ_REQ_MAKINGARROW). /// 01ae .W void clif_parse_SelectArrow(int fd,struct map_session_data *sd) { - unsigned short nameid = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + unsigned short nameid = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]); if (pc_istrading(sd)) { //Make it fail to avoid shop exploits where you sell something different than you see. clif_skill_fail(sd,sd->ud.skill_id,USESKILL_FAIL_LEVEL,0); @@ -12574,7 +12504,7 @@ void clif_parse_AutoSpell(int fd,struct map_session_data *sd) if (sd->menuskill_id != SA_AUTOSPELL) return; sd->state.workinprogress = WIP_DISABLE_NONE; - skill_autospell(sd,RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + skill_autospell(sd,RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])); clif_menuskill_clear(sd); } @@ -12585,7 +12515,7 @@ void clif_parse_UseCard(int fd,struct map_session_data *sd) { if (sd->state.trading != 0) return; - clif_use_card(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2); + clif_use_card(sd,RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2); } @@ -12593,7 +12523,7 @@ void clif_parse_UseCard(int fd,struct map_session_data *sd) /// 017c .W .W void clif_parse_InsertCard(int fd,struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if (sd->state.trading != 0) return; pc_insert_card(sd,RFIFOW(fd,info->pos[0])-2,RFIFOW(fd,info->pos[1])-2); @@ -12608,7 +12538,7 @@ void clif_parse_SolveCharName(int fd, struct map_session_data *sd) { int charid; - charid = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + charid = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); map_reqnickdb(sd, charid); } @@ -12622,7 +12552,7 @@ void clif_parse_SolveCharName(int fd, struct map_session_data *sd) void clif_parse_ResetChar(int fd, struct map_session_data *sd) { char cmd[15]; - if( RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]) ) + if( RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]) ) safesnprintf(cmd,sizeof(cmd),"%cresetskill",atcommand_symbol); else safesnprintf(cmd,sizeof(cmd),"%cresetstat",atcommand_symbol); @@ -12636,7 +12566,7 @@ void clif_parse_ResetChar(int fd, struct map_session_data *sd) { /// 019c .W .?B void clif_parse_LocalBroadcast(int fd, struct map_session_data* sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; char command[CHAT_SIZE_MAX+16]; unsigned int len = RFIFOW(fd,info->pos[0])-4; char* msg = RFIFOCP(fd,info->pos[1]); @@ -12656,7 +12586,7 @@ void clif_parse_LocalBroadcast(int fd, struct map_session_data* sd) void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) { int item_index, item_amount; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if (pc_istrading(sd)) return; @@ -12683,7 +12613,7 @@ void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) { int item_index, item_amount; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; item_index = RFIFOW(fd,info->pos[0])-1; item_amount = RFIFOL(fd,info->pos[1]); @@ -12700,7 +12630,7 @@ void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) /// Request to move an item from cart to storage (CZ_MOVE_ITEM_FROM_CART_TO_STORE). /// 0129 .W .L void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int idx = RFIFOW(fd,info->pos[0]) - 2; int amount = RFIFOL(fd,info->pos[1]); @@ -12722,7 +12652,7 @@ void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd){ /// Request to move an item from storage to cart (CZ_MOVE_ITEM_FROM_STORE_TO_CART). /// 0128 .W .L void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int idx = RFIFOW(fd,info->pos[0]) - 1; int amount = RFIFOL(fd,info->pos[1]); @@ -12781,7 +12711,7 @@ void clif_storagepassword(struct map_session_data* sd, short info) /// 3 = check password /// NOTE: This packet is only available on certain non-kRO clients. void clif_parse_StoragePassword(int fd, struct map_session_data *sd){ //@TODO -// struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; +// struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; // int type = RFIFOW(fd,info->pos[0]); // char* password = RFIFOP(fd,info->pos[1]); // char* new_password = RFIFOP(fd,info->pos[2]); @@ -12815,7 +12745,7 @@ void clif_storagepassword_result(struct map_session_data* sd, short result, shor /// Party creation request /// 00f9 .24B (CZ_MAKE_GROUP) void clif_parse_CreateParty(int fd, struct map_session_data *sd){ - char* name = RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + char* name = RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0]); name[NAME_LENGTH-1] = '\0'; if( map[sd->bl.m].flag.partylock ) {// Party locked. @@ -12832,7 +12762,7 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd){ /// 01e8 .24B .B .B (CZ_MAKE_GROUP2) void clif_parse_CreateParty2(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; char* name = RFIFOCP(fd,info->pos[0]); int item1 = RFIFOB(fd,info->pos[1]); int item2 = RFIFOB(fd,info->pos[2]); @@ -12862,7 +12792,7 @@ void clif_parse_PartyInvite(int fd, struct map_session_data *sd) return; } - t_sd = map_id2sd(RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + t_sd = map_id2sd(RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])); if(t_sd && t_sd->state.noask) {// @noask [LuzZza] clif_noask_sub(sd, t_sd, 1); @@ -12875,7 +12805,7 @@ void clif_parse_PartyInvite(int fd, struct map_session_data *sd) /// 02c4 .24B (CZ_PARTY_JOIN_REQ) void clif_parse_PartyInvite2(int fd, struct map_session_data *sd){ struct map_session_data *t_sd; - char *name = RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + char *name = RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0]); name[NAME_LENGTH-1] = '\0'; if(map[sd->bl.m].flag.partylock) {// Party locked. @@ -12902,14 +12832,14 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd){ /// 1 = accept void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; party_reply_invite(sd,RFIFOL(fd,info->pos[0]), RFIFOL(fd,info->pos[1])); } //(CZ_PARTY_JOIN_REQ_ACK) void clif_parse_ReplyPartyInvite2(int fd,struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; party_reply_invite(sd,RFIFOL(fd,info->pos[0]), RFIFOB(fd,info->pos[1])); } @@ -12931,7 +12861,7 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd) /// 0103 .L .24B void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if(map[sd->bl.m].flag.partylock) {// Party locked. clif_displaymessage(fd, msg_txt(sd,227)); return; @@ -12949,7 +12879,7 @@ void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) struct party_data *p; int i,expflag; int cmd = RFIFOW(fd,0); - struct s_packet_db* info = &packet_db[sd->packet_ver][cmd]; + struct s_packet_db* info = &packet_db[cmd]; if( !sd->status.party_id ) return; @@ -12990,7 +12920,7 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd){ /// Changes Party Leader (CZ_CHANGE_GROUP_MASTER). /// 07da .L void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd){ - party_changeleader(sd, map_id2sd(RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])),NULL); + party_changeleader(sd, map_id2sd(RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])),NULL); } @@ -13000,7 +12930,7 @@ void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd){ /// Request to register a party booking advertisment (CZ_PARTY_BOOKING_REQ_REGISTER). /// 0802 .W .W { .W }*6 void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; short level = RFIFOW(fd,info->pos[0]); short mapid = RFIFOW(fd,info->pos[1]); int idxpbj = info->pos[2]; @@ -13034,7 +12964,7 @@ void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) /// Request to search for party booking advertisments (CZ_PARTY_BOOKING_REQ_SEARCH). /// 0804 .W .W .W .L .W void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; short level = RFIFOW(fd,info->pos[0]); short mapid = RFIFOW(fd,info->pos[1]); short job = RFIFOW(fd,info->pos[2]); @@ -13107,7 +13037,7 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd) { short job[MAX_PARTY_BOOKING_JOBS]; int i; - int idxpbu = packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]; + int idxpbu = packet_db[RFIFOW(fd,0)].pos[0]; for(i=0; inpc_id ) {// using an NPC return; } - vending_vendinglistreq(sd,RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + vending_vendinglistreq(sd,RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])); } /// Shop item(s) purchase request (CZ_PC_PURCHASE_ITEMLIST_FROMMC). /// 0134 .W .L { .W .W }* void clif_parse_PurchaseReq(int fd, struct map_session_data* sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int len = (int)RFIFOW(fd,info->pos[0]) - 8; int id = (int)RFIFOL(fd,info->pos[1]); const uint8* data = (uint8*)RFIFOP(fd,info->pos[2]); @@ -13205,7 +13135,7 @@ void clif_parse_PurchaseReq(int fd, struct map_session_data* sd){ /// Shop item(s) purchase request (CZ_PC_PURCHASE_ITEMLIST_FROMMC2). /// 0801 .W .L .L { .W .W }* void clif_parse_PurchaseReq2(int fd, struct map_session_data* sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int len = (int)RFIFOW(fd,info->pos[0]) - 12; int aid = (int)RFIFOL(fd,info->pos[1]); int uid = (int)RFIFOL(fd,info->pos[2]); @@ -13226,7 +13156,7 @@ void clif_parse_PurchaseReq2(int fd, struct map_session_data* sd){ /// 1 = open void clif_parse_OpenVending(int fd, struct map_session_data* sd){ int cmd = RFIFOW(fd,0); - struct s_packet_db* info = &packet_db[sd->packet_ver][cmd]; + struct s_packet_db* info = &packet_db[cmd]; short len = (short)RFIFOW(fd,info->pos[0]); const char* message = RFIFOCP(fd,info->pos[1]); const uint8* data = (uint8*)RFIFOP(fd,info->pos[3]); @@ -13266,8 +13196,8 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd){ /// Guild creation request (CZ_REQ_MAKE_GUILD). /// 0165 .L .24B void clif_parse_CreateGuild(int fd,struct map_session_data *sd){ - //int charid = RFIFOL(fd,packet_db[sd->packet_ver][cmd].pos[0]); - char* name = RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]); + //int charid = RFIFOL(fd,packet_db[cmd].pos[0]); + char* name = RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[1]); name[NAME_LENGTH-1] = '\0'; if(map[sd->bl.m].flag.guildlock) { //Guild locked. @@ -13304,7 +13234,7 @@ void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd) /// 6 = notice void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) { - int type = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int type = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); if( !sd->status.guild_id && !sd->bg_id ) return; @@ -13340,7 +13270,7 @@ void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd) { int i; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int len = RFIFOW(fd,info->pos[0]); int idxgpos = info->pos[1]; @@ -13358,7 +13288,7 @@ void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd) void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) { int i; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int len = RFIFOW(fd,info->pos[0]); int idxgpos = info->pos[1]; @@ -13397,7 +13327,7 @@ void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd) { struct guild* g; - int guild_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int guild_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); if( (g = guild_search(guild_id)) != NULL ) clif_guild_emblem(sd,g); @@ -13443,7 +13373,7 @@ static enum e_result_validate_emblem clif_validate_emblem(const uint8* emblem, u /// Request to update the guild emblem (CZ_REGISTER_GUILD_EMBLEM_IMG). /// 0153 .W .?B void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; unsigned long emblem_len = RFIFOW(fd,info->pos[0])-4; const uint8* emblem = RFIFOP(fd,info->pos[1]); int emb_val=0; @@ -13474,7 +13404,7 @@ void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd){ /// Guild notice update request (CZ_GUILD_NOTICE). /// 016e .L .60B .120B void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int guild_id = RFIFOL(fd,info->pos[0]); char* msg1 = RFIFOCP(fd,info->pos[1]); char* msg2 = RFIFOCP(fd,info->pos[2]); @@ -13518,7 +13448,7 @@ int clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_sessio /// Guild invite request (CZ_REQ_JOIN_GUILD). /// 0168 .L .L .L void clif_parse_GuildInvite(int fd,struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; struct map_session_data *t_sd = map_id2sd(RFIFOL(fd,info->pos[0])); // int inv_aid = RFIFOL(fd,info->pos[1]); // int inv_cid = RFIFOL(fd,info->pos[2]); @@ -13531,7 +13461,7 @@ void clif_parse_GuildInvite(int fd,struct map_session_data *sd){ /// 0916 .24B (CZ_REQ_JOIN_GUILD2) void clif_parse_GuildInvite2(int fd, struct map_session_data *sd) { - struct map_session_data *t_sd = map_nick2sd(RFIFOCP(fd, packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]),false); + struct map_session_data *t_sd = map_nick2sd(RFIFOCP(fd, packet_db[RFIFOW(fd,0)].pos[0]),false); if (clif_sub_guild_invite(fd, sd, t_sd)) return; @@ -13544,7 +13474,7 @@ clif_parse_GuildInvite2(int fd, struct map_session_data *sd) { /// 0 = refuse /// 1 = accept void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; guild_reply_invite(sd,RFIFOL(fd,info->pos[0]), RFIFOL(fd,info->pos[1])); } @@ -13553,7 +13483,7 @@ void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd){ /// Request to leave guild (CZ_REQ_LEAVE_GUILD). /// 0159 .L .L .L .40B void clif_parse_GuildLeave(int fd,struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if(map[sd->bl.m].flag.guildlock) { //Guild locked. clif_displaymessage(fd, msg_txt(sd,228)); return; @@ -13573,7 +13503,7 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd){ /// Request to expel a member of a guild (CZ_REQ_BAN_GUILD). /// 015b .L .L .L .40B void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if( map[sd->bl.m].flag.guildlock || sd->bg_id ) { // Guild locked. clif_displaymessage(fd, msg_txt(sd,228)); @@ -13616,9 +13546,9 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) return; } - t_sd = map_id2sd(RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); - //inv_aid = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]); - //inv_cid = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[2]); + t_sd = map_id2sd(RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])); + //inv_aid = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[1]); + //inv_cid = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[2]); // @noask [LuzZza] if(t_sd && t_sd->state.noask) { @@ -13636,7 +13566,7 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) /// 0 = refuse /// 1 = accept void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; guild_reply_reqalliance(sd, RFIFOL(fd,info->pos[0]), RFIFOL(fd,info->pos[1])); @@ -13649,7 +13579,7 @@ void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd){ /// 0 = Ally /// 1 = Enemy void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if(!sd->state.gmaster_flag) return; @@ -13677,7 +13607,7 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) return; } - t_sd = map_id2sd(RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + t_sd = map_id2sd(RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])); // @noask [LuzZza] if(t_sd && t_sd->state.noask) { @@ -13700,7 +13630,7 @@ void clif_parse_GuildBreak(int fd, struct map_session_data *sd) clif_displaymessage(fd, msg_txt(sd,228)); return; } - guild_break(sd,RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + guild_break(sd,RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0])); } @@ -13716,14 +13646,14 @@ void clif_parse_GuildBreak(int fd, struct map_session_data *sd) /// 3 = return to egg /// 4 = unequip accessory void clif_parse_PetMenu(int fd, struct map_session_data *sd){ - pet_menu(sd,RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + pet_menu(sd,RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0])); } /// Attempt to tame a monster (CZ_TRYCAPTURE_MONSTER). /// 019f .L void clif_parse_CatchPet(int fd, struct map_session_data *sd){ - pet_catch_process2(sd,RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + pet_catch_process2(sd,RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])); } @@ -13733,7 +13663,7 @@ void clif_parse_SelectEgg(int fd, struct map_session_data *sd){ if (sd->menuskill_id != SA_TAMINGMONSTER || sd->menuskill_val != -1) return; - pet_select_egg(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2); + pet_select_egg(sd,RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2); clif_menuskill_clear(sd); } @@ -13765,7 +13695,7 @@ void clif_parse_SelectEgg(int fd, struct map_session_data *sd){ void clif_parse_SendEmotion(int fd, struct map_session_data *sd) { if(sd->pd) - clif_pet_emotion(sd->pd,RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + clif_pet_emotion(sd->pd,RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])); } @@ -13773,7 +13703,7 @@ void clif_parse_SendEmotion(int fd, struct map_session_data *sd) /// 01a5 .24B void clif_parse_ChangePetName(int fd, struct map_session_data *sd) { - pet_change_name(sd,RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + pet_change_name(sd,RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0])); } @@ -13786,7 +13716,7 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) struct block_list *target; int tid; - tid = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + tid = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); target = map_id2bl(tid); if (!target) { clif_GM_kickack(sd, 0); @@ -13857,7 +13787,7 @@ void clif_parse_GMShift(int fd, struct map_session_data *sd) char *player_name; char command[NAME_LENGTH+8]; - player_name = RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + player_name = RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0]); player_name[NAME_LENGTH-1] = '\0'; safesnprintf(command,sizeof(command),"%cjumpto %s", atcommand_symbol, player_name); @@ -13873,7 +13803,7 @@ void clif_parse_GMRemove2(int fd, struct map_session_data* sd) uint32 account_id; struct map_session_data* pl_sd; - account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + account_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); if( (pl_sd = map_id2sd(account_id)) != NULL ) { char command[NAME_LENGTH+8]; safesnprintf(command,sizeof(command),"%cjumpto %s", atcommand_symbol, pl_sd->status.name); @@ -13894,7 +13824,7 @@ void clif_parse_GMRecall(int fd, struct map_session_data *sd) char *player_name; char command [NAME_LENGTH+8]; - player_name = RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + player_name = RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0]); player_name[NAME_LENGTH-1] = '\0'; safesnprintf(command,sizeof(command),"%crecall %s", atcommand_symbol, player_name); @@ -13910,7 +13840,7 @@ void clif_parse_GMRecall2(int fd, struct map_session_data* sd) uint32 account_id; struct map_session_data* pl_sd; - account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + account_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); if( (pl_sd = map_id2sd(account_id)) != NULL ) { char command[NAME_LENGTH+8]; safesnprintf(command,sizeof(command),"%crecall %s", atcommand_symbol, pl_sd->status.name); @@ -13934,7 +13864,7 @@ void clif_parse_GMRecall2(int fd, struct map_session_data* sd) /// 09ce .100B [Ind/Yommy] void clif_parse_GM_Item_Monster(int fd, struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int mob_id = 0; struct item_data *id = NULL; struct mob_db *mob = NULL; @@ -13998,7 +13928,7 @@ void clif_parse_GM_Item_Monster(int fd, struct map_session_data *sd) /// TODO: Any OPTION_* ? void clif_parse_GMHide(int fd, struct map_session_data *sd) { char cmd[6]; - //int eff_st = RFIFOL(packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + //int eff_st = RFIFOL(packet_db[RFIFOW(fd,0)].pos[0]); safesnprintf(cmd,sizeof(cmd),"%chide",atcommand_symbol); is_atcommand(fd, sd, cmd, 1); @@ -14016,7 +13946,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) int id, type, value; struct map_session_data *dstsd; char command[NAME_LENGTH+15]; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; id = RFIFOL(fd,info->pos[0]); @@ -14046,7 +13976,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) void clif_parse_GMRc(int fd, struct map_session_data* sd) { char command[NAME_LENGTH+15]; - char *name = RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + char *name = RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0]); name[NAME_LENGTH-1] = '\0'; safesnprintf(command,sizeof(command),"%cmute %d %s", atcommand_symbol, 60, name); @@ -14071,7 +14001,7 @@ void clif_account_name(int fd, uint32 account_id, const char* accname) //! TODO: Figure out how does this actually work void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd) { - uint32 account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + uint32 account_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); /* char query[30]; safesnprintf(query,sizeof(query),"%d", account_id); @@ -14091,7 +14021,7 @@ void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd) void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) { int x,y,type; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if(! pc_has_permission(sd, PC_PERM_USE_CHANGEMAPTYPE) ) return; @@ -14117,7 +14047,7 @@ void clif_parse_PMIgnore(int fd, struct map_session_data* sd) char* nick; uint8 type; int i; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; nick = RFIFOCP(fd,info->pos[0]); nick[NAME_LENGTH-1] = '\0'; // to be sure that the player name has at most 23 characters @@ -14168,7 +14098,7 @@ void clif_parse_PMIgnore(int fd, struct map_session_data* sd) /// 1 = (/inall) allow all speech void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) { - int type = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]), flag; + int type = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0]), flag; if( type == 0 ) {// Deny all if( sd->state.ignoreAll ) { @@ -14383,7 +14313,7 @@ void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) struct map_session_data *f_sd; int i; - f_sd = map_nick2sd(RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]),false); + f_sd = map_nick2sd(RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0]),false); // Friend doesn't exist (no player with this name) if (f_sd == NULL) { @@ -14435,14 +14365,15 @@ void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) struct map_session_data *f_sd; uint32 account_id; char reply; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; account_id = RFIFOL(fd,info->pos[0]); //char_id = RFIFOL(fd,info->pos[1]); - if(sd->packet_ver < 6) - reply = RFIFOB(fd,info->pos[2]); - else - reply = RFIFOL(fd,info->pos[2]); +#if PACKETVER < 6 + reply = RFIFOB(fd,info->pos[2]); +#else + reply = RFIFOL(fd,info->pos[2]); +#endif if( sd->bl.id == account_id ) {// adding oneself as friend return; @@ -14499,7 +14430,7 @@ void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) struct map_session_data *f_sd = NULL; uint32 account_id, char_id; int i, j; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; account_id = RFIFOL(fd,info->pos[0]); char_id = RFIFOL(fd,info->pos[1]); @@ -14579,8 +14510,8 @@ void clif_PVPInfo(struct map_session_data* sd) void clif_parse_PVPInfo(int fd,struct map_session_data *sd) { // TODO: Is there a way to use this on an another player (char/acc id)? - //int cid = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); - //int aid = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]); + //int cid = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0]); + //int aid = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[1]); clif_PVPInfo(sd); } @@ -14593,7 +14524,7 @@ void clif_parse_PVPInfo(int fd,struct map_session_data *sd) void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd) { int i; - //int wich = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + //int wich = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0]); if (sd->menuskill_id != SG_FEEL) return; i = sd->menuskill_val-1; @@ -14631,14 +14562,14 @@ void clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv) /// Request to change homunculus' name (CZ_RENAME_MER). /// 0231 .24B void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd){ - hom_change_name(sd,RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + hom_change_name(sd,RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0])); } /// Request to warp/move homunculus/mercenary to it's owner (CZ_REQUEST_MOVETOOWNER). /// 0234 .L void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd){ - int id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); // Mercenary or Homunculus + int id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); // Mercenary or Homunculus struct block_list *bl = NULL; struct unit_data *ud = NULL; @@ -14658,7 +14589,7 @@ void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd){ /// Request to move homunculus/mercenary (CZ_REQUEST_MOVENPC). /// 0232 .L .3B void clif_parse_HomMoveTo(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int id = RFIFOL(fd,info->pos[0]); // Mercenary or Homunculus struct block_list *bl = NULL; short x, y; @@ -14683,7 +14614,7 @@ void clif_parse_HomMoveTo(int fd, struct map_session_data *sd){ void clif_parse_HomAttack(int fd,struct map_session_data *sd) { struct block_list *bl = NULL; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int id = RFIFOL(fd,info->pos[0]); int target_id = RFIFOL(fd,info->pos[1]); int action_type = RFIFOB(fd,info->pos[2]); @@ -14710,11 +14641,11 @@ void clif_parse_HomAttack(int fd,struct map_session_data *sd) void clif_parse_HomMenu(int fd, struct map_session_data *sd) { //[orn] int cmd = RFIFOW(fd,0); - //int type = RFIFOW(fd,packet_db[sd->packet_ver][cmd].pos[0]); + //int type = RFIFOW(fd,packet_db[cmd].pos[0]); if(!hom_is_active(sd->hd)) return; - hom_menu(sd,RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[1])); + hom_menu(sd,RFIFOB(fd,packet_db[cmd].pos[1])); } @@ -14802,7 +14733,7 @@ void clif_parse_Check(int fd, struct map_session_data *sd) if(!pc_has_permission(sd, PC_PERM_USE_CHECK)) return; - safestrncpy(charname, RFIFOCP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]), sizeof(charname)); + safestrncpy(charname, RFIFOCP(fd,packet_db[RFIFOW(fd,0)].pos[0]), sizeof(charname)); if( ( pl_sd = map_nick2sd(charname,false) ) == NULL || pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { @@ -15333,7 +15264,7 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id) /// 09ea .B .Q (CZ_REQ_READ_MAIL) void clif_parse_Mail_read(int fd, struct map_session_data *sd){ #if PACKETVER < 20150513 - int mail_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int mail_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); #else //uint8 openType = RFIFOB(fd, 2); int mail_id = (int)RFIFOQ(fd, 3); @@ -15423,7 +15354,7 @@ void clif_parse_Mail_getattach( int fd, struct map_session_data *sd ){ int i; struct mail_message* msg; #if PACKETVER < 20150513 - int mail_id = RFIFOL(fd, packet_db[sd->packet_ver][RFIFOW(fd, 0)].pos[0]); + int mail_id = RFIFOL(fd, packet_db[RFIFOW(fd, 0)].pos[0]); int attachment = MAIL_ATT_ALL; #else uint16 packet_id = RFIFOW(fd, 0); @@ -15520,7 +15451,7 @@ void clif_parse_Mail_getattach( int fd, struct map_session_data *sd ){ /// 09f5 .B .Q (CZ_REQ_DELETE_MAIL) void clif_parse_Mail_delete(int fd, struct map_session_data *sd){ #if PACKETVER < 20150513 - int mail_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int mail_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); #else //int openType = RFIFOB(fd, 2); int mail_id = (int)RFIFOQ(fd, 3); @@ -15563,8 +15494,8 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd){ /// Request to return a mail (CZ_REQ_MAIL_RETURN). /// 0273 .L .24B void clif_parse_Mail_return(int fd, struct map_session_data *sd){ - int mail_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); - //char *rec_name = RFIFOP(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]); + int mail_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); + //char *rec_name = RFIFOP(fd,packet_db[RFIFOW(fd,0)].pos[1]); int i; if( mail_id <= 0 ) @@ -15584,7 +15515,7 @@ void clif_parse_Mail_return(int fd, struct map_session_data *sd){ /// 0247 .W .L (CZ_MAIL_ADD_ITEM) /// 0a04 .W .W (CZ_REQ_ADD_ITEM_TO_MAIL) void clif_parse_Mail_setattach(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int idx = RFIFOW(fd,info->pos[0]); #if PACKETVER < 20150513 int amount = RFIFOL(fd,info->pos[1]); @@ -15627,7 +15558,7 @@ void clif_mail_removeitem( struct map_session_data* sd, bool success, int index, void clif_parse_Mail_winopen(int fd, struct map_session_data *sd) { #if PACKETVER < 20150513 - int type = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int type = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]); if (type == 0 || type == 1) mail_removeitem(sd, 0, sd->mail.item[0].index, sd->mail.item[0].amount); @@ -15647,7 +15578,7 @@ void clif_parse_Mail_winopen(int fd, struct map_session_data *sd) /// 0a6e .W .24B .24B .Q .W <body length>.W <char id>.L <title>.?B <body>.?B (CZ_REQ_WRITE_MAIL2) void clif_parse_Mail_send(int fd, struct map_session_data *sd){ #if PACKETVER < 20150513 - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if( !chrif_isconnected() ) return; @@ -15806,7 +15737,7 @@ static void clif_Auction_setitem(int fd, int index, bool fail) /// 1 = cancel (cancel pressed on register tab) /// ? = junk, uninitialized value (ex. when switching between list filters) void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd){ - //int type = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + //int type = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]); if( sd->auction.amount > 0 ) clif_additem(sd, sd->auction.index, sd->auction.amount, 0); @@ -15817,7 +15748,7 @@ void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd){ /// Request to add an item to the action (CZ_AUCTION_ADD_ITEM). /// 024c <index>.W <count>.L void clif_parse_Auction_setitem(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int idx = RFIFOW(fd,info->pos[0]) - 2; int amount = RFIFOL(fd,info->pos[1]); // Always 1 struct item_data *item; @@ -15901,7 +15832,7 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) { struct auction_data auction; struct item_data *item; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; if( !battle_config.feature_auction ) return; @@ -15984,7 +15915,7 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) /// Cancels an auction (CZ_AUCTION_ADD_CANCEL). /// 024e <auction id>.L void clif_parse_Auction_cancel(int fd, struct map_session_data *sd){ - unsigned int auction_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + unsigned int auction_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); intif_Auction_cancel(sd->status.char_id, auction_id); } @@ -15992,7 +15923,7 @@ void clif_parse_Auction_cancel(int fd, struct map_session_data *sd){ /// Closes an auction (CZ_AUCTION_REQ_MY_SELL_STOP). /// 025d <auction id>.L void clif_parse_Auction_close(int fd, struct map_session_data *sd){ - unsigned int auction_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + unsigned int auction_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); intif_Auction_close(sd->status.char_id, auction_id); } @@ -16000,7 +15931,7 @@ void clif_parse_Auction_close(int fd, struct map_session_data *sd){ /// Places a bid on an auction (CZ_AUCTION_BUY). /// 024f <auction id>.L <money>.L void clif_parse_Auction_bid(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; unsigned int auction_id = RFIFOL(fd,info->pos[0]); int bid = RFIFOL(fd,info->pos[1]); @@ -16033,7 +15964,7 @@ void clif_parse_Auction_bid(int fd, struct map_session_data *sd){ /// 5 = auction id search void clif_parse_Auction_search(int fd, struct map_session_data* sd){ char search_text[NAME_LENGTH]; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; short type = RFIFOW(fd,info->pos[0]); int price = RFIFOL(fd,info->pos[1]); // FIXME: bug #5071 int page = RFIFOW(fd,info->pos[3]); @@ -16055,7 +15986,7 @@ void clif_parse_Auction_search(int fd, struct map_session_data* sd){ /// 1 = buy (own bids) void clif_parse_Auction_buysell(int fd, struct map_session_data* sd) { - short type = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]) + 6; + short type = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]) + 6; if( !battle_config.feature_auction ) return; @@ -16092,7 +16023,7 @@ void clif_parse_cashshop_close( int fd, struct map_session_data* sd ){ //0846 <tabid>.W (CZ_REQ_SE_CASH_TAB_CODE)) //08c0 <len>.W <openIdentity>.L <itemcount>.W (ZC_ACK_SE_CASH_ITEM_LIST2) void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) { - short tab = RFIFOW(fd, packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + short tab = RFIFOW(fd, packet_db[RFIFOW(fd,0)].pos[0]); int j; if( tab < 0 || tab >= CASHSHOP_TAB_MAX ) @@ -16242,7 +16173,7 @@ void clif_parse_cashshop_buy(int fd, struct map_session_data *sd){ nullpo_retv(sd); - info = &packet_db[sd->packet_ver][cmd]; + info = &packet_db[cmd]; if( sd->state.trading || !sd->npc_shopid ) { clif_cashshop_ack(sd,1); @@ -16317,7 +16248,7 @@ void clif_Adopt_request(struct map_session_data *sd, struct map_session_data *sr /// 01f9 <account id>.L void clif_parse_Adopt_request(int fd, struct map_session_data *sd) { - TBL_PC *tsd = map_id2sd(RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])); + TBL_PC *tsd = map_id2sd(RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0])); TBL_PC *p_sd = map_charid2sd(sd->status.partner_id); if( pc_try_adopt(sd, p_sd, tsd) == ADOPT_ALLOWED ) @@ -16334,7 +16265,7 @@ void clif_parse_Adopt_request(int fd, struct map_session_data *sd) /// 0 = rejected /// 1 = accepted void clif_parse_Adopt_reply(int fd, struct map_session_data *sd){ - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int p1_id = RFIFOL(fd,info->pos[0]); int p2_id = RFIFOL(fd,info->pos[1]); int result = RFIFOL(fd,info->pos[2]); @@ -16403,7 +16334,7 @@ void clif_bossmapinfo(int fd, struct mob_data *md, short flag) /// 02d6 <account id>.L void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) { - int aid = RFIFOL(fd, packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int aid = RFIFOL(fd, packet_db[RFIFOW(fd,0)].pos[0]); struct map_session_data* tsd = map_id2sd(aid); if (!tsd) @@ -16425,8 +16356,8 @@ void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) /// 1 = enabled void clif_parse_EquipTick(int fd, struct map_session_data* sd) { - //int type = RFIFOL(fd,packet_db[sd->packet_ver][cmd].pos[0]); - bool flag = (bool)RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]); + //int type = RFIFOL(fd,packet_db[cmd].pos[0]); + bool flag = (bool)RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[1]); sd->status.show_equip = flag; clif_equiptickack(sd, flag); } @@ -16636,7 +16567,7 @@ void clif_quest_update_objective(struct map_session_data *sd, struct quest *qd, /// 02b6 <quest id>.L <active>.B void clif_parse_questStateAck(int fd, struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; quest_update_status(sd, RFIFOL(fd,info->pos[0]), RFIFOB(fd,info->pos[1])?Q_ACTIVE:Q_INACTIVE); } @@ -16842,7 +16773,7 @@ void clif_mercenary_skillblock(struct map_session_data *sd) /// 2 = delete void clif_parse_mercenary_action(int fd, struct map_session_data* sd) { - int option = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int option = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0]); if( sd->md == NULL ) return; @@ -17273,7 +17204,7 @@ void clif_showdigit(struct map_session_data* sd, unsigned char type, int value) /// as the only skill unit, that is sent with 0x1c9 is /// Graffiti. void clif_parse_LessEffect(int fd, struct map_session_data* sd){ - int isLess = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + int isLess = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); sd->state.lesseffect = ( isLess != 0 ); } @@ -17281,7 +17212,7 @@ void clif_parse_LessEffect(int fd, struct map_session_data* sd){ /// S 0945 <length>.w <option>.l <val>.l {<index>.w <amount>.w).4b* (CZ_* RagexeRE 2012-04-10a) /// S 0281 <length>.w <option>.l <val>.l {<index>.w <amount>.w).4b* (CZ_* Ragexe 2013-08-07) void clif_parse_ItemListWindowSelected(int fd, struct map_session_data* sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int n = (RFIFOW(fd,info->pos[0])-12) / 4; int type = RFIFOL(fd,info->pos[1]); int flag = RFIFOL(fd,info->pos[2]); // Button clicked: 0 = Cancel, 1 = OK @@ -17398,7 +17329,7 @@ static void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data* sd) unsigned char result; int zenylimit; unsigned int count, packet_len; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; packet_len = RFIFOW(fd,info->pos[0]); @@ -17532,7 +17463,7 @@ static void clif_parse_ReqClickBuyingStore(int fd, struct map_session_data* sd) { uint32 account_id; - account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + account_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]); buyingstore_open(sd, account_id); } @@ -17572,7 +17503,7 @@ static void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data* sd) uint8* itemlist; uint32 account_id; unsigned int count, packet_len, buyer_id; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; packet_len = RFIFOW(fd,info->pos[0]); @@ -17704,7 +17635,7 @@ static void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) const uint8* cardlist; unsigned char type; unsigned int min_price, max_price, packet_len, count, item_count, card_count; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; packet_len = RFIFOW(fd,info->pos[0]); @@ -17857,7 +17788,7 @@ static void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_d { unsigned short nameid; uint32 account_id, store_id; - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; account_id = RFIFOL(fd,info->pos[0]); store_id = RFIFOL(fd,info->pos[1]); @@ -17890,7 +17821,7 @@ void clif_parse_debug(int fd,struct map_session_data *sd) cmd = RFIFOW(fd,0); if( sd ) { - packet_len = packet_db[sd->packet_ver][cmd].len; + packet_len = packet_db[cmd].len; if( packet_len == 0 ) {// unknown @@ -18135,7 +18066,7 @@ int clif_skill_itemlistwindow( struct map_session_data *sd, uint16 skill_id, uin * RFIFOL(fd,2) - type (currently not used) *------------------------------------------*/ void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; //int type = RFIFOL(fd,info->pos[0]); //WHY_LOWERVER_COMPATIBILITY = 0x0, WHY_SC_AUTOSHADOWSPELL = 0x1, if( sd->menuskill_id != SC_AUTOSHADOWSPELL ) return; @@ -18176,7 +18107,7 @@ void clif_spiritcharm(struct map_session_data *sd) { /// 1 = move item to normal tab void clif_parse_MoveItem(int fd, struct map_session_data *sd) { #if PACKETVER >= 20111122 - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int index = RFIFOW(fd,info->pos[0]) - 2; int type = RFIFOB(fd, info->pos[1]); @@ -18435,7 +18366,7 @@ void clif_ranklist(struct map_session_data *sd, int16 rankingType) { * 3: /pk * */ void clif_parse_ranklist(int fd,struct map_session_data *sd) { - struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; + struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int16 rankingtype = RFIFOW(fd,info->pos[0]); //type clif_ranklist(sd,rankingtype); @@ -18603,8 +18534,8 @@ void clif_display_pinfo(struct map_session_data *sd, int cmdtype) { details_penalty[3] = 0; /* End - Penalty set*/ - cmd = packet_db_ack[sd->packet_ver][cmdtype]; - info = &packet_db[sd->packet_ver][cmd]; + cmd = packet_db_ack[cmdtype]; + info = &packet_db[cmd]; len = info->len; //this is the base len without details if(!len) return; //version as packet disable @@ -18674,10 +18605,10 @@ void clif_crimson_marker(struct map_session_data *sd, struct block_list *bl, boo nullpo_retv(sd); - cmd = packet_db_ack[sd->packet_ver][ZC_C_MARKERINFO]; + cmd = packet_db_ack[ZC_C_MARKERINFO]; if (!cmd) cmd = 0x09C1; //default - info = &packet_db[sd->packet_ver][cmd]; + info = &packet_db[cmd]; if (!(len = info->len)) return; @@ -18697,8 +18628,8 @@ void clif_notify_bindOnEquip(struct map_session_data *sd, int n) { nullpo_retv(sd); - cmd = packet_db_ack[sd->packet_ver][ZC_NOTIFY_BIND_ON_EQUIP]; - info = &packet_db[sd->packet_ver][cmd]; + cmd = packet_db_ack[ZC_NOTIFY_BIND_ON_EQUIP]; + info = &packet_db[cmd]; if (!cmd || !info->len) return; @@ -18887,26 +18818,6 @@ void clif_clan_leave( struct map_session_data* sd ){ #endif } -/** - * Decrypt packet identifier for player - * @param fd - * @param sd - * @param packet_ver - * Orig author [Ind/Hercules] - **/ -static unsigned short clif_parse_cmd(int fd, struct map_session_data *sd) { -#ifndef PACKET_OBFUSCATION - return RFIFOW(fd, 0); -#else - unsigned short cmd = RFIFOW(fd,0); // Check if it is a player that tries to connect to the map server. - if (sd) - cmd = (cmd ^ ((sd->cryptKey >> 16) & 0x7FFF)); // Decrypt the current packet ID with the last key stored in the session. - else - cmd = (cmd ^ ((((clif_cryptKey[0] * clif_cryptKey[1]) + clif_cryptKey[2]) >> 16) & 0x7FFF)); // A player tries to connect - use the initial keys for the decryption of the packet ID. - return cmd; // Return the decrypted packet ID. -#endif -} - #ifdef DUMP_UNKNOWN_PACKET void DumpUnknown(int fd,TBL_PC *sd,int cmd,int packet_len) { @@ -19039,7 +18950,7 @@ static void clif_roulette_recvitem_ack(struct map_session_data *sd, enum RECV_RO nullpo_retv(sd); - if (packet_db[sd->packet_ver][cmd].len == 0) + if (packet_db[cmd].len == 0) return; WBUFW(buf,0) = cmd; @@ -19220,9 +19131,9 @@ void clif_merge_item_ack(struct map_session_data *sd, unsigned short index, unsi if (!clif_session_isValid(sd)) return; - if (!(cmd = packet_db_ack[sd->packet_ver][ZC_ACK_MERGE_ITEM])) + if (!(cmd = packet_db_ack[ZC_ACK_MERGE_ITEM])) return; - if (!(info = &packet_db[sd->packet_ver][cmd]) || info->len == 0) + if (!(info = &packet_db[cmd]) || info->len == 0) return; WBUFW(buf, 0) = cmd; @@ -19287,9 +19198,9 @@ void clif_merge_item_open(struct map_session_data *sd) { nullpo_retv(sd); if (!clif_session_isValid(sd)) return; - if (!(cmd = packet_db_ack[sd->packet_ver][ZC_MERGE_ITEM_OPEN])) + if (!(cmd = packet_db_ack[ZC_MERGE_ITEM_OPEN])) return; - if (!(info = &packet_db[sd->packet_ver][cmd]) || info->len == 0) + if (!(info = &packet_db[cmd]) || info->len == 0) return; // Get entries @@ -19329,7 +19240,7 @@ void clif_parse_merge_item_req(int fd, struct map_session_data* sd) { nullpo_retv(sd); if (!clif_session_isValid(sd)) return; - if (!(info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]) || info->len == 0) + if (!(info = &packet_db[RFIFOW(fd,0)]) || info->len == 0) return; n = (RFIFOW(fd, info->pos[0]) - 4) / 2; @@ -19396,10 +19307,10 @@ void clif_broadcast_obtain_special_item(const char *char_name, unsigned short na unsigned short cmd = 0; struct s_packet_db *info = NULL; - if (!(cmd = packet_db_ack[clif_config.packet_db_ver][ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN])) + if (!(cmd = packet_db_ack[ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN])) return; - if (!(info = &packet_db[clif_config.packet_db_ver][cmd]) || info->len == 0) + if (!(info = &packet_db[cmd]) || info->len == 0) return; WBUFW(buf, 0) = 0x7fd; @@ -19454,7 +19365,7 @@ void clif_dressing_room(struct map_session_data *sd, int flag) { /// 0A35 <result>.W void clif_parse_Oneclick_Itemidentify(int fd, struct map_session_data *sd) { #if PACKETVER >= 20150513 - short idx = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]) - 2, magnifier_idx; + short idx = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]) - 2, magnifier_idx; // Ignore the request // - Invalid item index @@ -19834,9 +19745,12 @@ void clif_parse_sale_remove( int fd, struct map_session_data* sd ){ *------------------------------------------*/ static int clif_parse(int fd) { - int cmd, packet_ver, packet_len, err; + int cmd, packet_len; TBL_PC* sd; int pnum; +#ifdef PACKET_OBFUSCATION + int cmd2; +#endif //TODO apply delays or disconnect based on packet throughput [FlavioJS] // Note: "click masters" can do 80+ clicks in 10 seconds @@ -19873,52 +19787,54 @@ static int clif_parse(int fd) if (RFIFOREST(fd) < 2) return 0; - cmd = clif_parse_cmd(fd, sd); + cmd = RFIFOW(fd, 0); - // identify client's packet version - if (sd) { - packet_ver = sd->packet_ver; - } else { - // check authentification packet to know packet version - packet_ver = clif_guess_PacketVer(fd, 0, &err); - if( err ) {// failed to identify packet version - ShowInfo("clif_parse: Disconnecting session #%d with unknown packet version%s (p:0x%04x,l:%d).\n", fd, ( - err == 1 ? "" : - err == 2 ? ", possibly for having an invalid account_id" : - err == 3 ? ", possibly for having an invalid char_id." : - /* Uncomment when checks are added in clif_guess_PacketVer. [FlavioJS] - err == 4 ? ", possibly for having an invalid login_id1." : - err == 5 ? ", possibly for having an invalid client_tick." : - */ - err == 6 ? ", possibly for having an invalid sex." : - ". ERROR invalid error code"), cmd, RFIFOREST(fd)); - WFIFOHEAD(fd,packet_len(0x6a)); - WFIFOW(fd,0) = 0x6a; - WFIFOB(fd,2) = 3; // Rejected from Server - WFIFOSET(fd,packet_len(0x6a)); +#ifdef PACKET_OBFUSCATION + // Check if it is a player that tries to connect to the map server. + if( sd ){ + // Decrypt the current packet ID with the last key stored in the session. + cmd = (cmd ^ ((sd->cryptKey >> 16) & 0x7FFF)); + }else{ + // Store the original value for checking + cmd2 = cmd; -#ifdef DUMP_INVALID_PACKET - ShowDump(RFIFOP(fd,0), RFIFOREST(fd)); + // A player tries to connect - use the initial keys for the decryption of the packet ID. + cmd = (cmd ^ ((((clif_cryptKey[0] * clif_cryptKey[1]) + clif_cryptKey[2]) >> 16) & 0x7FFF)); + } #endif - RFIFOSKIP(fd, RFIFOREST(fd)); - set_eof(fd); - return 0; - } - } - // filter out invalid / unsupported packets - if (cmd > MAX_PACKET_DB || cmd < MIN_PACKET_DB || packet_db[packet_ver][cmd].len == 0) { + if (cmd > MAX_PACKET_DB || cmd < MIN_PACKET_DB || packet_db[cmd].len == 0) { ShowWarning("clif_parse: Received unsupported packet (packet 0x%04x, %d bytes received), disconnecting session #%d.\n", cmd, RFIFOREST(fd), fd); + #ifdef DUMP_INVALID_PACKET ShowDump(RFIFOP(fd,0), RFIFOREST(fd)); #endif + +#ifdef PACKET_OBFUSCATION_WARN + // If it is a connection attempt, check if the packet would have been valid without decrypting it + if( !sd ){ +#ifdef PACKET_OBFUSCATION + if( cmd2 >= MIN_PACKET_DB && cmd2 < MAX_PACKET_DB && packet_db[cmd2].len != 0 && packet_db[cmd2].func == clif_parse_WantToConnection ){ + ShowWarning( "clif_parse: It looks like you have enabled PACKET_OBFUSCATION on server side, but disabled it on client side.\n" ); + } +#else + // Try to use the initial keys for the decryption of the packet ID. + cmd = (cmd ^ ((((clif_cryptKey[0] * clif_cryptKey[1]) + clif_cryptKey[2]) >> 16) & 0x7FFF)); + + if( cmd >= MIN_PACKET_DB && cmd < MAX_PACKET_DB && packet_db[cmd].len != 0 && packet_db[cmd].func == clif_parse_WantToConnection ){ + ShowWarning( "clif_parse: It looks like you have disabled PACKET_OBFUSCATION on server side, but enabled it on client side.\n" ); + } +#endif + } +#endif + set_eof(fd); return 0; } // determine real packet length - packet_len = packet_db[packet_ver][cmd].len; + packet_len = packet_db[cmd].len; if (packet_len == -1) { // variable-length packet if (RFIFOREST(fd) < 4) return 0; @@ -19942,16 +19858,16 @@ static int clif_parse(int fd) sd->cryptKey = ((sd->cryptKey * clif_cryptKey[1]) + clif_cryptKey[2]) & 0xFFFFFFFF; // Update key for the next packet #endif - if( packet_db[packet_ver][cmd].func == clif_parse_debug ) - packet_db[packet_ver][cmd].func(fd, sd); - else if( packet_db[packet_ver][cmd].func != NULL ) { - if( !sd && packet_db[packet_ver][cmd].func != clif_parse_WantToConnection ) + if( packet_db[cmd].func == clif_parse_debug ) + packet_db[cmd].func(fd, sd); + else if( packet_db[cmd].func != NULL ) { + if( !sd && packet_db[cmd].func != clif_parse_WantToConnection ) ; //Only valid packet when there is no session else - if( sd && sd->bl.prev == NULL && packet_db[packet_ver][cmd].func != clif_parse_LoadEndAck ) + if( sd && sd->bl.prev == NULL && packet_db[cmd].func != clif_parse_LoadEndAck ) ; //Only valid packet when player is not on a map else - packet_db[packet_ver][cmd].func(fd, sd); + packet_db[cmd].func(fd, sd); } #ifdef DUMP_UNKNOWN_PACKET else DumpUnknown(fd,sd,cmd,packet_len); @@ -19962,782 +19878,51 @@ static int clif_parse(int fd) return 0; } +void packetdb_addpacket( uint16 cmd, uint16 length, void (*func)(int, struct map_session_data *), ... ){ + va_list argp; + int i; + + if(cmd <= 0 || cmd > MAX_PACKET_DB) + return; + + packet_db[cmd].len = length; + packet_db[cmd].func = func; + + va_start(argp, func); + + for( i = 0; i < MAX_PACKET_POS; i++ ){ + int offset = va_arg(argp, int); + + if( offset == 0 ){ + break; + } + + packet_db[cmd].pos[i] = offset; + } + + if( i == MAX_PACKET_POS ){ + ShowError( "Too many positions found for packet 0x%04x (max=%d).\n", cmd, MAX_PACKET_POS ); + } + + va_end(argp); +} + /*========================================== - * Reads packet_db.txt and setups its array reference + * Reads packets and setups its array reference *------------------------------------------*/ -void packetdb_readdb(bool reload) -{ - char line[1024]; - int cmd,i,j; - int max_cmd=-1; - bool skip_ver = false; - int warned = 0; - int packet_ver = MAX_PACKET_VER; // read into packet_db's version by default -#ifdef PACKET_OBFUSCATION - bool key_defined = false; - int last_key_defined = -1; -#endif - - int packet_len_table[MAX_PACKET_DB] = { - 10, 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, 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, 0, 0, 0, 0, 0, 0, 0, - //#0x0040 - 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, 0, 0, 0, 0, -#if PACKETVER <= 20081217 - 0, 0, 0, 0, 55, 17, 3, 37, 46, -1, 23, -1, 3,110, 3, 2, -#else - 0, 0, 0, 0, 55, 17, 3, 37, 46, -1, 23, -1, 3,114, 3, 2, -#endif -#if PACKETVER < 2 - 3, 28, 19, 11, 3, -1, 9, 5, 52, 51, 56, 58, 41, 2, 6, 6, -#elif PACKETVER < 20071106 // 78-7b Lv99 effect for later Kameshima - 3, 28, 19, 11, 3, -1, 9, 5, 54, 53, 58, 60, 41, 2, 6, 6, -#elif PACKETVER <= 20081217 // change in 0x78 and 0x7c - 3, 28, 19, 11, 3, -1, 9, 5, 55, 53, 58, 60, 42, 2, 6, 6, -#else - 3, 28, 19, 11, 3, -1, 9, 5, 55, 53, 58, 60, 44, 2, 6, 6, -#endif - //#0x0080 - 7, 3, 2, 2, 2, 5, 16, 12, 10, 7, 29, 2, -1, -1, -1, 0, // 0x8b changed to 2 (was 23) - 7, 22, 28, 2, 6, 30, -1, -1, 3, -1, -1, 5, 9, 17, 17, 6, -#if PACKETVER <= 20100622 - 23, 6, 6, -1, -1, -1, -1, 8, 7, 6, 7, 4, 7, 0, -1, 6, -#else - 23, 6, 6, -1, -1, -1, -1, 8, 7, 6, 9, 4, 7, 0, -1, 6, // 0xaa changed to 9 (was 7) -#endif - 8, 8, 3, 3, -1, 6, 6, -1, 7, 6, 2, 5, 6, 44, 5, 3, - //#0x00C0 - 7, 2, 6, 8, 6, 7, -1, -1, -1, -1, 3, 3, 6, 3, 2, 27, // 0xcd change to 3 (was 6) - 3, 4, 4, 2, -1, -1, 3, -1, 6, 14, 3, -1, 28, 29, -1, -1, - 30, 30, 26, 2, 6, 26, 3, 3, 8, 19, 5, 2, 3, 2, 2, 2, - 3, 2, 6, 8, 21, 8, 8, 2, 2, 26, 3, -1, 6, 27, 30, 10, - //#0x0100 - 2, 6, 6, 30, 79, 31, 10, 10, -1, -1, 4, 6, 6, 2, 11, -1, - 10, 39, 4, 10, 31, 35, 10, 18, 2, 13, 15, 20, 68, 2, 3, 16, - 6, 14, -1, -1, 21, 8, 8, 8, 8, 8, 2, 2, 3, 4, 2, -1, - 6, 86, 6, -1, -1, 7, -1, 6, 3, 16, 4, 4, 4, 6, 24, 26, - //#0x0140 - 22, 14, 6, 10, 23, 19, 6, 39, 8, 9, 6, 27, -1, 2, 6, 6, - 110, 6, -1, -1, -1, -1, -1, 6, -1, 54, 66, 54, 90, 42, 6, 42, - -1, -1, -1, -1, -1, 30, -1, 3, 14, 3, 30, 10, 43, 14,186,182, - 14, 30, 10, 3, -1, 6,106, -1, 4, 5, 4, -1, 6, 7, -1, -1, - //#0x0180 - 6, 3,106, 10, 10, 34, 0, 6, 8, 4, 4, 4, 29, -1, 10, 6, -#if PACKETVER < 1 - 90, 86, 24, 6, 30,102, 8, 4, 8, 4, 14, 10, -1, 6, 2, 6, -#else // 196 comodo icon status display for later - 90, 86, 24, 6, 30,102, 9, 4, 8, 4, 14, 10, -1, 6, 2, 6, -#endif -#if PACKETVER < 20081126 - 3, 3, 35, 5, 11, 26, -1, 4, 4, 6, 10, 12, 6, -1, 4, 4, -#else // 0x1a2 changed (35->37) - 3, 3, 37, 5, 11, 26, -1, 4, 4, 6, 10, 12, 6, -1, 4, 4, -#endif - 11, 7, -1, 67, 12, 18,114, 6, 3, 6, 26, 26, 26, 26, 2, 3, - //#0x01C0, Set 0x1d5=-1 - 2, 14, 10, -1, 22, 22, 4, 2, 13, 97, 3, 9, 9, 30, 6, 28, - 8, 14, 10, 35, 6, -1, 4, 11, 54, 53, 60, 2, -1, 47, 33, 6, - 30, 8, 34, 14, 2, 6, 26, 2, 28, 81, 6, 10, 26, 2, -1, -1, - -1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10, - //#0x0200 - 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 32, 10, // 0x20c change to 0 (was 19) - 22, 0, 26, 26, 42, 6, 6, 2, 2,282,282, 10, 10, -1, -1, 66, -#if PACKETVER < 20071106 - 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 64, 5, 71, 5, -#else // 0x22c changed - 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 65, 5, 71, 5, -#endif - 12, 26, 9, 11, -1, -1, 10, 2,282, 11, 4, 36, 6, -1, 4, 2, - //#0x0240 - -1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8, 12, 4, 10, - 3, 32, -1, 3, 3, 5, 5, 8, 2, 3, -1, 6, 4, 6, 4, 6, - 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0280 -#if PACKETVER < 20070711 - 0, 0, 0, 6, 14, 0, 0, -1, 6, 8, 18, 0, 0, 0, 0, 0, -#else - 0, 0, 0, 6, 14, 0, 0, -1, 10, 12, 18, 0, 0, 0, 0, 0, // 0x288, 0x289 increase by 4 (kafra points) -#endif - 0, 4, 0, 70, 10, 0, 0, 0, 8, 6, 27, 80, 0, -1, 0, 0, - 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 85, -1, -1,107, 6, -1, 7, 7, 22,191, 0, 8, 0, 0, 0, 0, - //#0x02C0 - 0, -1, 0, 0, 0, 30, 30, 0, 0, 3, 0, 65, 4, 71, 10, 0, - -1, -1, -1, 0, 29, 0, 6, -1, 10, 10, 3, 0, -1, 32, 6, 36, - 34, 33, 0, 0, 0, 0, 0, 0, -1, -1, -1, 13, 67, 59, 60, 8, - 10, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0300 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0340 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0380 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x03C0 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0400 - 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, 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, 0, 0, 0, 0, 0, 8, 0, 25, - //#0x0440 - 10, 4, -1, 0, 0, 0, 14, 0, 0, 0, 6, 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, 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, - //#0x0480 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x04C0 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0500 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 25, - //#0x0540 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0580 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x05C0 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0600 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 25, - //#0x0640 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0680 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x06C0 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0700 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 25, - //#0x0740 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0780 - 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x07C0 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -#if PACKETVER < 20090617 - 6, 2, -1, 4, 4, 4, 4, 8, 8,254, 6, 8, 6, 54, 30, 54, -#else // 0x7d9 changed - 6, 2, -1, 4, 4, 4, 4, 8, 8,268, 6, 8, 6, 54, 30, 54, -#endif - 0, 15, 8, 6, -1, 8, 8, 32, -1, 5, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, -1, -1, -1, 8, 25, 10, 0, 26, 0, - //#0x0800 -#if PACKETVER < 20091229 - -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 20, -#else // for Party booking ( PACKETVER >= 20091229 ) - -1, -1, 18, 4, 8, 6, 2, 4, 14, 50, 18, 6, 2, 3, 14, 20, -#endif - 3, -1, 8, -1, 86, 2, 6, 6, -1, -1, 4, 10, 10, 0, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -1, -1, 3, 2, 66, 5, 2, 12, 6, 0, 0, - //#0x0840 -#if PACKETVER < 20130000 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -#else - 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 19, 0, 0, 0, 0, -#endif - 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0880 - 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, 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, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x08C0 - 0, 0, 0, 0, 0, 0, 0, 20, 34, 0, 0, 0, 0, 0, 0, 10, - 9, 7, 10, 0, 0, 0, 6, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, - //#0x0900 - 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, -1, - 0, 0, 0, 0, -1, -1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0940 - 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, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 7, - 0, 0, 0, 0, 2, 0, 0, 14, 6, 50, -1, 0, 0, 0, 12, -1, - //#0x0980 - 7, 0, 0, 29, 28, 0, 0, 0, 6, 2, -1, 0, 0, -1, -1, 0, - 31, 0, 0, 0, 0, 0, 0, -1, 8, 11, 9, 8, 0, 0, 0, 22, - 0, 0, 0, 0, 0, 0, 12, 10, 14, 10, 14, 6, -1, 8, 17, 4, - 8, 4, 8, 4, 6, 0, 6, 4, 6, 4, 0, 0, 6, 0, 0, 0, - //#0x09C0 - 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 23, 17, 0, 0,102, 0, - 0, 0, 0, 0, 2, 0, -1, -1, 2, 0, 0, -1, -1, -1, 0, 7, - 0, 0, 0, 0, 0, 18, 22, 3, 11, 0, 11, -1, 0, 3, 11, 0, - -1, 11, 12, 11, 0, 0, 0, 75, -1,143, 0, 0, 0, -1, -1, -1, - //#0x0A00 -#if PACKETVER >= 20141022 - 269, 3, 4, 2, 6, 49, 6, 9, 26, 45, 47, 47, 56, -1, 14, -1, -#else - 269, 0, 0, 2, 6, 48, 6, 9, 26, 45, 47, 47, 56, -1, 14, 0, -#endif - -1, 0, 0, 26, 10, 0, 0, 0, 14, 2, 23, 2, -1, 2, 3, 2, - 21, 3, 5, 0, 66, 0, 0, 8, 3, 0, 0, -1, 0, -1, 0, 0, - 106, 0, 0, 0, 0, 4, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0A40 - 0, 0, 0, 85, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 34, 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, -1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - //#0x0A80 - 0, 0, 0, 0, 94, 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, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, - //#0x0AC0 - 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, 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, 0, 0, 0, 0, 0, 0, 0, //0x0AFF is currently defined as maximum - }; - struct { - void (*func)(int, struct map_session_data *); - char *name; - } clif_parse_func[]={ - {clif_parse_WantToConnection,"wanttoconnection"}, - {clif_parse_LoadEndAck,"loadendack"}, - {clif_parse_TickSend,"ticksend"}, - {clif_parse_WalkToXY,"walktoxy"}, - {clif_parse_QuitGame,"quitgame"}, - {clif_parse_GetCharNameRequest,"getcharnamerequest"}, - {clif_parse_GlobalMessage,"globalmessage"}, - {clif_parse_MapMove,"mapmove"}, - {clif_parse_ChangeDir,"changedir"}, - {clif_parse_Emotion,"emotion"}, - {clif_parse_HowManyConnections,"howmanyconnections"}, - {clif_parse_ActionRequest,"actionrequest"}, - {clif_parse_Restart,"restart"}, - {clif_parse_WisMessage,"wis"}, - {clif_parse_Broadcast,"broadcast"}, - {clif_parse_TakeItem,"takeitem"}, - {clif_parse_DropItem,"dropitem"}, - {clif_parse_UseItem,"useitem"}, - {clif_parse_EquipItem,"equipitem"}, - {clif_parse_UnequipItem,"unequipitem"}, - {clif_parse_NpcClicked,"npcclicked"}, - {clif_parse_NpcBuySellSelected,"npcbuysellselected"}, - {clif_parse_NpcBuyListSend,"npcbuylistsend"}, - {clif_parse_NpcSellListSend,"npcselllistsend"}, - {clif_parse_CreateChatRoom,"createchatroom"}, - {clif_parse_ChatAddMember,"chataddmember"}, - {clif_parse_ChatRoomStatusChange,"chatroomstatuschange"}, - {clif_parse_ChangeChatOwner,"changechatowner"}, - {clif_parse_KickFromChat,"kickfromchat"}, - {clif_parse_ChatLeave,"chatleave"}, - {clif_parse_TradeRequest,"traderequest"}, - {clif_parse_TradeAck,"tradeack"}, - {clif_parse_TradeAddItem,"tradeadditem"}, - {clif_parse_TradeOk,"tradeok"}, - {clif_parse_TradeCancel,"tradecancel"}, - {clif_parse_TradeCommit,"tradecommit"}, - {clif_parse_StopAttack,"stopattack"}, - {clif_parse_PutItemToCart,"putitemtocart"}, - {clif_parse_GetItemFromCart,"getitemfromcart"}, - {clif_parse_RemoveOption,"removeoption"}, - {clif_parse_ChangeCart,"changecart"}, - {clif_parse_StatusUp,"statusup"}, - {clif_parse_SkillUp,"skillup"}, - {clif_parse_UseSkillToId,"useskilltoid"}, - {clif_parse_UseSkillToPos,"useskilltopos"}, - {clif_parse_UseSkillToPosMoreInfo,"useskilltoposinfo"}, - {clif_parse_UseSkillMap,"useskillmap"}, - {clif_parse_RequestMemo,"requestmemo"}, - {clif_parse_ProduceMix,"producemix"}, - {clif_parse_Cooking,"cooking"}, - {clif_parse_NpcSelectMenu,"npcselectmenu"}, - {clif_parse_NpcNextClicked,"npcnextclicked"}, - {clif_parse_NpcAmountInput,"npcamountinput"}, - {clif_parse_NpcStringInput,"npcstringinput"}, - {clif_parse_NpcCloseClicked,"npccloseclicked"}, - {clif_parse_ItemIdentify,"itemidentify"}, - {clif_parse_SelectArrow,"selectarrow"}, - {clif_parse_AutoSpell,"autospell"}, - {clif_parse_UseCard,"usecard"}, - {clif_parse_InsertCard,"insertcard"}, - {clif_parse_RepairItem,"repairitem"}, - {clif_parse_WeaponRefine,"weaponrefine"}, - {clif_parse_SolveCharName,"solvecharname"}, - {clif_parse_ResetChar,"resetchar"}, - {clif_parse_LocalBroadcast,"localbroadcast"}, - {clif_parse_MoveToKafra,"movetokafra"}, - {clif_parse_MoveFromKafra,"movefromkafra"}, - {clif_parse_MoveToKafraFromCart,"movetokafrafromcart"}, - {clif_parse_MoveFromKafraToCart,"movefromkafratocart"}, - {clif_parse_CloseKafra,"closekafra"}, - {clif_parse_CreateParty,"createparty"}, - {clif_parse_CreateParty2,"createparty2"}, - {clif_parse_PartyInvite,"partyinvite"}, - {clif_parse_PartyInvite2,"partyinvite2"}, - {clif_parse_ReplyPartyInvite,"replypartyinvite"}, - {clif_parse_ReplyPartyInvite2,"replypartyinvite2"}, - {clif_parse_LeaveParty,"leaveparty"}, - {clif_parse_RemovePartyMember,"removepartymember"}, - {clif_parse_PartyChangeOption,"partychangeoption"}, - {clif_parse_PartyMessage,"partymessage"}, - {clif_parse_PartyChangeLeader,"partychangeleader"}, - {clif_parse_CloseVending,"closevending"}, - {clif_parse_VendingListReq,"vendinglistreq"}, - {clif_parse_PurchaseReq,"purchasereq"}, - {clif_parse_PurchaseReq2,"purchasereq2"}, - {clif_parse_OpenVending,"openvending"}, - {clif_parse_CreateGuild,"createguild"}, - {clif_parse_GuildCheckMaster,"guildcheckmaster"}, - {clif_parse_GuildRequestInfo,"guildrequestinfo"}, - {clif_parse_GuildChangePositionInfo,"guildchangepositioninfo"}, - {clif_parse_GuildChangeMemberPosition,"guildchangememberposition"}, - {clif_parse_GuildRequestEmblem,"guildrequestemblem"}, - {clif_parse_GuildChangeEmblem,"guildchangeemblem"}, - {clif_parse_GuildChangeNotice,"guildchangenotice"}, - {clif_parse_GuildInvite,"guildinvite"}, - {clif_parse_GuildReplyInvite,"guildreplyinvite"}, - {clif_parse_GuildLeave,"guildleave"}, - {clif_parse_GuildExpulsion,"guildexpulsion"}, - {clif_parse_GuildMessage,"guildmessage"}, - {clif_parse_GuildRequestAlliance,"guildrequestalliance"}, - {clif_parse_GuildReplyAlliance,"guildreplyalliance"}, - {clif_parse_GuildDelAlliance,"guilddelalliance"}, - {clif_parse_GuildOpposition,"guildopposition"}, - {clif_parse_GuildBreak,"guildbreak"}, - {clif_parse_PetMenu,"petmenu"}, - {clif_parse_CatchPet,"catchpet"}, - {clif_parse_SelectEgg,"selectegg"}, - {clif_parse_SendEmotion,"sendemotion"}, - {clif_parse_ChangePetName,"changepetname"}, - - {clif_parse_GMKick,"gmkick"}, - {clif_parse_GMHide,"gmhide"}, - {clif_parse_GMReqNoChat,"gmreqnochat"}, - {clif_parse_GMReqAccountName,"gmreqaccname"}, - {clif_parse_GMKickAll,"killall"}, - {clif_parse_GMRecall,"recall"}, - {clif_parse_GMRecall,"summon"}, - {clif_parse_GM_Item_Monster,"itemmonster"}, - {clif_parse_GMShift,"remove"}, - {clif_parse_GMShift,"shift"}, - {clif_parse_GMChangeMapType,"changemaptype"}, - {clif_parse_GMRc,"rc"}, - {clif_parse_GMRecall2,"recall2"}, - {clif_parse_GMRemove2,"remove2"}, - {clif_parse_GMFullStrip,"gmfullstrip"}, - - {clif_parse_NoviceDoriDori,"sndoridori"}, - {clif_parse_NoviceExplosionSpirits,"snexplosionspirits"}, - {clif_parse_PMIgnore,"wisexin"}, - {clif_parse_PMIgnoreList,"wisexlist"}, - {clif_parse_PMIgnoreAll,"wisall"}, - {clif_parse_FriendsListAdd,"friendslistadd"}, - {clif_parse_FriendsListRemove,"friendslistremove"}, - {clif_parse_FriendsListReply,"friendslistreply"}, - {clif_parse_Blacksmith,"blacksmith"}, - {clif_parse_Alchemist,"alchemist"}, - {clif_parse_Taekwon,"taekwon"}, - {clif_parse_RankingPk,"rankingpk"}, - {clif_parse_FeelSaveOk,"feelsaveok"}, - {clif_parse_debug,"debug"}, - {clif_parse_ChangeHomunculusName,"changehomunculusname"}, - {clif_parse_HomMoveToMaster,"hommovetomaster"}, - {clif_parse_HomMoveTo,"hommoveto"}, - {clif_parse_HomAttack,"homattack"}, - {clif_parse_HomMenu,"hommenu"}, - {clif_parse_StoragePassword,"storagepassword"}, - {clif_parse_Hotkey,"hotkey"}, - {clif_parse_AutoRevive,"autorevive"}, - {clif_parse_Check,"check"}, - {clif_parse_Adopt_request,"adoptrequest"}, - {clif_parse_Adopt_reply,"adoptreply"}, - // MAIL SYSTEM - {clif_parse_Mail_refreshinbox,"mailrefresh"}, - {clif_parse_Mail_read,"mailread"}, - {clif_parse_Mail_getattach,"mailgetattach"}, - {clif_parse_Mail_delete,"maildelete"}, - {clif_parse_Mail_return,"mailreturn"}, - {clif_parse_Mail_setattach,"mailsetattach"}, - {clif_parse_Mail_winopen,"mailwinopen"}, - {clif_parse_Mail_send,"mailsend"}, - {clif_parse_Mail_beginwrite,"mailbegin"}, - {clif_parse_Mail_cancelwrite,"mailcancel"}, - {clif_parse_Mail_Receiver_Check,"mailreceiver"}, - // AUCTION SYSTEM - {clif_parse_Auction_search,"auctionsearch"}, - {clif_parse_Auction_buysell,"auctionbuysell"}, - {clif_parse_Auction_setitem,"auctionsetitem"}, - {clif_parse_Auction_cancelreg,"auctioncancelreg"}, - {clif_parse_Auction_register,"auctionregister"}, - {clif_parse_Auction_cancel,"auctioncancel"}, - {clif_parse_Auction_close,"auctionclose"}, - {clif_parse_Auction_bid,"auctionbid"}, - // Quest Log System - {clif_parse_questStateAck,"queststate"}, - {clif_parse_ViewPlayerEquip,"viewplayerequip"}, - {clif_parse_EquipTick,"equiptickbox"}, - {clif_parse_BattleChat,"battlechat"}, - {clif_parse_mercenary_action,"mermenu"}, - {clif_parse_progressbar,"progressbar"}, - {clif_parse_SkillSelectMenu,"skillselectmenu"}, - {clif_parse_ItemListWindowSelected,"itemlistwindowselected"}, -#if PACKETVER >= 20091229 - {clif_parse_PartyBookingRegisterReq,"bookingregreq"}, - {clif_parse_PartyBookingSearchReq,"bookingsearchreq"}, - {clif_parse_PartyBookingUpdateReq,"bookingupdatereq"}, - {clif_parse_PartyBookingDeleteReq,"bookingdelreq"}, -#endif - {clif_parse_BankCheck,"bankcheck"}, - {clif_parse_BankDeposit,"bankdeposit"}, - {clif_parse_BankWithdraw,"bankwithdrawal"}, - {clif_parse_BankOpen,"bankopen"}, - {clif_parse_BankClose,"bankclose"}, - - {clif_parse_PVPInfo,"pvpinfo"}, - {clif_parse_LessEffect,"lesseffect"}, - // Buying Store - {clif_parse_ReqOpenBuyingStore,"reqopenbuyingstore"}, - {clif_parse_ReqCloseBuyingStore,"reqclosebuyingstore"}, - {clif_parse_ReqClickBuyingStore,"reqclickbuyingstore"}, - {clif_parse_ReqTradeBuyingStore,"reqtradebuyingstore"}, - // Store Search - {clif_parse_SearchStoreInfo,"searchstoreinfo"}, - {clif_parse_SearchStoreInfoNextPage,"searchstoreinfonextpage"}, - {clif_parse_CloseSearchStoreInfo,"closesearchstoreinfo"}, - {clif_parse_SearchStoreInfoListItemClick,"searchstoreinfolistitemclick"}, - // Cashshop - { clif_parse_cashshop_open_request, "cashshopopen" }, - { clif_parse_cashshop_close, "cashshopclose" }, - { clif_parse_cashshop_list_request, "cashshopitemlist" }, - { clif_parse_cashshop_buy, "cashshopbuy" }, - { clif_parse_CashShopReqTab, "cashshopreqtab"}, - /* */ - { clif_parse_MoveItem , "moveitem" }, - { clif_parse_PartyTick, "partytick" }, - { clif_parse_dull, "dull" }, - { clif_parse_GuildInvite2 , "guildinvite2" }, - { clif_parse_reqworldinfo, "reqworldinfo"}, - { clif_parse_client_version, "clientversion"}, - { clif_parse_blocking_playcancel, "booking_playcancel"}, - { clif_parse_ranklist, "ranklist"}, - // Market NPC - { clif_parse_NPCShopClosed, "npcshopclosed" }, - { clif_parse_NPCMarketClosed, "npcmarketclosed" }, - { clif_parse_NPCMarketPurchase, "npcmarketpurchase" }, - // Roulette - { clif_parse_RouletteOpen, "rouletteopen" }, - { clif_parse_RouletteInfo, "rouletteinfo" }, - { clif_parse_RouletteClose, "rouletteclose" }, - { clif_parse_RouletteGenerate, "roulettegenerate" }, - { clif_parse_RouletteRecvItem, "rouletterecvitem" }, - // Merge Item - { clif_parse_merge_item_req, "mergeitem_req"}, - { clif_parse_merge_item_cancel, "mergeitem_cancel"}, - // HotkeyRowShift - { clif_parse_HotkeyRowShift, "hotkeyrowshift"}, - // OneClick Item Identify - { clif_parse_Oneclick_Itemidentify, "oneclick_itemidentify" }, - // NewChange Cart2 - { clif_parse_SelectCart, "selectcart" }, - // Clan System - { clif_parse_clan_chat, "clanchat" }, - // Sale - { clif_parse_sale_search, "salesearch" }, - { clif_parse_sale_add, "saleadd" }, - { clif_parse_sale_remove, "saleremove" }, - { clif_parse_sale_open, "saleopen" }, - { clif_parse_sale_close, "saleclose" }, - { clif_parse_sale_refresh, "salerefresh" }, - {NULL,NULL} - }; - struct { - char *name; //function name - int funcidx; // - } clif_ack_func[]={ //hash - { "ZC_ACK_OPEN_BANKING", ZC_ACK_OPEN_BANKING}, - { "ZC_ACK_BANKING_DEPOSIT", ZC_ACK_BANKING_DEPOSIT}, - { "ZC_ACK_BANKING_WITHDRAW", ZC_ACK_BANKING_WITHDRAW}, - { "ZC_BANKING_CHECK", ZC_BANKING_CHECK}, - { "ZC_BANKING_CHECK", ZC_BANKING_CHECK}, - { "ZC_PERSONAL_INFOMATION", ZC_PERSONAL_INFOMATION}, - { "ZC_PERSONAL_INFOMATION_CHN", ZC_PERSONAL_INFOMATION_CHN}, - { "ZC_CLEAR_DIALOG", ZC_CLEAR_DIALOG}, - { "ZC_C_MARKERINFO", ZC_C_MARKERINFO}, - { "ZC_NOTIFY_BIND_ON_EQUIP", ZC_NOTIFY_BIND_ON_EQUIP }, - { "ZC_WEAR_EQUIP_ACK", ZC_WEAR_EQUIP_ACK }, - { "ZC_MERGE_ITEM_OPEN", ZC_MERGE_ITEM_OPEN }, - { "ZC_ACK_MERGE_ITEM", ZC_ACK_MERGE_ITEM }, - { "ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN", ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN }, - }; - const char *filename[] = { "packet_db.txt", DBIMPORT"/packet_db.txt"}; - int f; - +void packetdb_readdb(){ memset(packet_db,0,sizeof(packet_db)); memset(packet_db_ack,0,sizeof(packet_db_ack)); - // initialize packet_db[SERVER] from hardcoded packet_len_table[] values - for( i = 0; i < ARRAYLENGTH(packet_len_table); ++i ) - packet_len(i) = packet_len_table[i]; +#include "clif_packetdb.h" +#include "clif_shuffle.h" - clif_config.packet_db_ver = MAX_PACKET_VER; - for(f = 0; f < ARRAYLENGTH(filename); f++) { - FILE *fp; - int ln = 0; - int entries = 0; - char *str[64], *p, *str2[64], *p2; - - sprintf(line, "%s/%s", db_path, filename[f]); - if( (fp = fopen(line,"r")) == NULL ) { - if (f == 0) { - ShowFatalError("Can't read %s\n", line); - exit(EXIT_FAILURE); - } - return; - } - - while( fgets(line, sizeof(line), fp) ) { - char w1[256],w2[256]; - ln++; - if(line[0]=='/' && line[1]=='/') - continue; - if (sscanf(line,"%255[^:]: %255[^\r\n]",w1,w2) == 2) { - if (strcmpi(w1,"packet_ver") == 0) { - int prev_ver = packet_ver; - skip_ver = false; - packet_ver = atoi(w2); - if ( packet_ver > MAX_PACKET_VER ) - { //Check to avoid overflowing. [Skotlex] - if( (warned&1) == 0 ) - ShowWarning("The packet_db table only has support up to version %d.\n", MAX_PACKET_VER); - warned &= 1; - skip_ver = true; - } - else if( packet_ver < 0 ) - { - if( (warned&2) == 0 ) - ShowWarning("Negative packet versions are not supported.\n"); - warned &= 2; - skip_ver = true; - } - else if( packet_ver == SERVER ) - { - if( (warned&4) == 0 ) - ShowWarning("Packet version %d is reserved for server use only.\n", SERVER); - warned &= 4; - skip_ver = true; - } - - if( skip_ver ) - { - ShowWarning("Skipping packet version %d.\n", packet_ver); - packet_ver = prev_ver; - continue; - } - // copy from previous version into new version and continue - // - indicating all following packets should be read into the newer version - memcpy(&packet_db[packet_ver], &packet_db[prev_ver], sizeof(packet_db[0])); - memcpy(&packet_db_ack[packet_ver], &packet_db_ack[prev_ver], sizeof(packet_db_ack[0])); - continue; - } else if(strcmpi(w1,"packet_db_ver")==0) { - if (strcmpi(w2,"default") == 0) //This is the preferred version. - clif_config.packet_db_ver = MAX_PACKET_VER; - else // to manually set the packet DB version - clif_config.packet_db_ver = cap_value(atoi(w2), 0, MAX_PACKET_VER); - continue; - } -#ifdef PACKET_OBFUSCATION - else if (!reload && strcmpi(w1,"packet_keys") == 0) { - char key1[12] = { 0 }, key2[12] = { 0 }, key3[12] = { 0 }; - trim(w2); - if (sscanf(w2, "%11[^,],%11[^,],%11[^ \r\n/]", key1, key2, key3) == 3) { - if (!packet_keys[packet_ver]) - CREATE(packet_keys[packet_ver], struct s_packet_keys, 1); - packet_keys[packet_ver]->keys[0] = strtol(key1, NULL, 0); - packet_keys[packet_ver]->keys[1] = strtol(key2, NULL, 0); - packet_keys[packet_ver]->keys[2] = strtol(key3, NULL, 0); - last_key_defined = packet_ver; - if (battle_config.etc_log) - ShowInfo("Packet Ver:%d -> Keys: 0x%08X, 0x%08X, 0x%08X\n", packet_ver, packet_keys[packet_ver]->keys[0], packet_keys[packet_ver]->keys[1], packet_keys[packet_ver]->keys[2]); - } - continue; - } else if (!reload && strcmpi(w1,"packet_keys_use") == 0) { - char key1[12] = { 0 }, key2[12] = { 0 }, key3[12] = { 0 }; - trim(w2); - if (strcmpi(w2,"default") == 0) - continue; - if (sscanf(w2, "%11[^,],%11[^,],%11[^ \r\n/]", key1, key2, key3) == 3) { - clif_cryptKey[0] = strtol(key1, NULL, 0); - clif_cryptKey[1] = strtol(key2, NULL, 0); - clif_cryptKey[2] = strtol(key3, NULL, 0); - key_defined = true; - if (battle_config.etc_log) - ShowInfo("Defined keys: 0x%08X, 0x%08X, 0x%08X\n", clif_cryptKey[0], clif_cryptKey[1], clif_cryptKey[2]); - } - continue; - } -#endif - } - - if( skip_ver ) - continue; // Skipping current packet version - - memset(str,0,sizeof(str)); - for (j = 0, p = line; j < 4 && p; ++j) { - str[j] = p; - p = strchr(p,','); - if (p) - *p++=0; - } - if (str[0] == NULL) - continue; - cmd = strtol(str[0],(char **)NULL,0); - - if(max_cmd < cmd) - max_cmd = cmd; - if(cmd <= 0 || cmd > MAX_PACKET_DB) - continue; - if(str[1]==NULL){ - ShowError("packet_db: packet len error\n"); - continue; - } - - packet_db[packet_ver][cmd].len = (short)atoi(str[1]); - - if(str[2]==NULL){ - packet_db[packet_ver][cmd].func = NULL; - ln++; - continue; - } - - // look up processing function by name - ARR_FIND( 0, ARRAYLENGTH(clif_parse_func), j, clif_parse_func[j].name != NULL && strcmp(str[2],clif_parse_func[j].name)==0 ); - if( j < ARRAYLENGTH(clif_parse_func) ) - packet_db[packet_ver][cmd].func = clif_parse_func[j].func; - else { //search if it's a mapped ack func - ARR_FIND( 0, ARRAYLENGTH(clif_ack_func), j, clif_ack_func[j].name != NULL && strcmp(str[2],clif_ack_func[j].name)==0 ); - if( j < ARRAYLENGTH(clif_ack_func)) { - int fidx = clif_ack_func[j].funcidx; - packet_db_ack[packet_ver][fidx] = cmd; - //ShowInfo("Added %s, <=> %X i=%d for v=%d\n",clif_ack_func[j].name,cmd,fidx,packet_ver); - } - } - - // set the identifying cmd for the packet_db version - if (strcmp(str[2],"wanttoconnection")==0) - clif_config.connect_cmd[packet_ver] = cmd; - - if(str[3]==NULL){ - ShowError("packet_db: packet error\n"); - exit(EXIT_FAILURE); - } - for(j = 0, p2 = str[3]; p2; j++){ - short k; - str2[j] = p2; - p2 = strchr(p2,':'); - if(p2) - *p2++=0; - k = atoi(str2[j]); - // if (packet_db[packet_ver][cmd].pos[j] != k && clif_config.prefer_packet_db) // not used for now - - if( j >= MAX_PACKET_POS ) - { - ShowError("Too many positions found for packet 0x%04x (max=%d).\n", cmd, MAX_PACKET_POS); - break; - } - - packet_db[packet_ver][cmd].pos[j] = k; - } - entries++; - } - fclose(fp); - if(max_cmd > MAX_PACKET_DB) { - ShowWarning("Found packets up to 0x%X, ignored 0x%X and above.\n", max_cmd, MAX_PACKET_DB); - ShowWarning("Please increase MAX_PACKET_DB and recompile.\n"); - } - //Locate the nearest version that we still support. [Skotlex] - if (!clif_config.connect_cmd[clif_config.packet_db_ver]) { - for(j = clif_config.packet_db_ver; j >= 0 && !clif_config.connect_cmd[j]; j--); - - clif_config.packet_db_ver = j?j:MAX_PACKET_VER; - } - sprintf(line, "%s/%s", db_path,filename[f]); - ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", entries, line); - } - ShowStatus("Using default packet version: "CL_WHITE"%d"CL_RESET".\n", clif_config.packet_db_ver); + ShowStatus("Using packet version: "CL_WHITE"%d"CL_RESET".\n", PACKETVER); #ifdef PACKET_OBFUSCATION - if (!key_defined && !clif_cryptKey[0] && !clif_cryptKey[1] && !clif_cryptKey[2]) { // Not defined - int use_key = last_key_defined; - - if (last_key_defined == -1) - ShowError("Can't find packet obfuscation keys!\n"); - else { - if (packet_keys[clif_config.packet_db_ver]) - use_key = clif_config.packet_db_ver; - - ShowInfo("Using default packet obfuscation keys for packet_db_ver: %d\n", use_key); - memcpy(&clif_cryptKey, &packet_keys[use_key]->keys, sizeof(packet_keys[use_key]->keys)); - } - } ShowStatus("Packet Obfuscation: "CL_GREEN"Enabled"CL_RESET". Keys: "CL_WHITE"0x%08X, 0x%08X, 0x%08X"CL_RESET"\n", clif_cryptKey[0], clif_cryptKey[1], clif_cryptKey[2]); - - for (i = 0; i < ARRAYLENGTH(packet_keys); i++) { - if (packet_keys[i]) { - aFree(packet_keys[i]); - packet_keys[i] = NULL; - } - } +#else + ShowStatus("Packet Obfuscation: "CL_RED"Disabled"CL_RESET".\n"); #endif } @@ -20762,14 +19947,7 @@ void do_init_clif(void) { color_table[i] = (color_table[i] & 0x0000FF) << 16 | (color_table[i] & 0x00FF00) | (color_table[i] & 0xFF0000) >> 16;//RGB to BGR } - clif_config.packet_db_ver = -1; // the main packet version of the DB - memset(clif_config.connect_cmd, 0, sizeof(clif_config.connect_cmd)); //The default connect command will be determined after reading the packet_db [Skotlex] -#ifdef PACKET_OBFUSCATION - memset(clif_cryptKey, 0, sizeof(clif_cryptKey)); -#endif - - //Using the packet_db file is the only way to set up packets now [Skotlex] - packetdb_readdb(false); + packetdb_readdb(); set_defaultparse(clif_parse); if( make_listen_bind(bind_ip,map_port) == -1 ) { diff --git a/src/map/clif.h b/src/map/clif.h index 0e7e488b35..8ae9dd7929 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -44,12 +44,12 @@ enum mail_attachment_type; enum { // packet DB MIN_PACKET_DB = 0x064, MAX_PACKET_DB = 0xAFF, - MAX_PACKET_VER = 55, MAX_PACKET_POS = 20, }; enum e_packet_ack { ZC_ACK_OPEN_BANKING = 0, + ZC_ACK_CLOSE_BANKING, ZC_ACK_BANKING_DEPOSIT, ZC_ACK_BANKING_WITHDRAW, ZC_BANKING_CHECK, @@ -171,11 +171,9 @@ enum e_party_invite_reply { PARTY_REPLY_INVALID_MAPPROPERTY_ME, ///< return=9 : !TODO "Cannot join a party in this map" -> MsgStringTable[1871] (since 20110205) }; -// packet_db[SERVER] is reserved for server use -#define SERVER 0 -#define packet_len(cmd) packet_db[SERVER][cmd].len -extern struct s_packet_db packet_db[MAX_PACKET_VER+1][MAX_PACKET_DB+1]; -extern int packet_db_ack[MAX_PACKET_VER + 1][MAX_ACK_FUNC + 1]; +#define packet_len(cmd) packet_db[cmd].len +extern struct s_packet_db packet_db[MAX_PACKET_DB+1]; +extern int packet_db_ack[MAX_ACK_FUNC + 1]; // local define typedef enum send_target { @@ -534,7 +532,6 @@ void clif_setport(uint16 port); uint32 clif_getip(void); uint32 clif_refresh_ip(void); uint16 clif_getport(void); -void packetdb_readdb(bool reload); void clif_authok(struct map_session_data *sd); void clif_authrefuse(int fd, uint8 error_code); diff --git a/src/map/clif_obfuscation.h b/src/map/clif_obfuscation.h new file mode 100644 index 0000000000..da7df952e0 --- /dev/null +++ b/src/map/clif_obfuscation.h @@ -0,0 +1,347 @@ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder + +#ifndef _CLIF_OBFUSCATION_H_ +#define _CLIF_OBFUSCATION_H_ + + #define packet_keys(a,b,c) static unsigned int clif_cryptKey[] = { a, b, c }; + + #if defined(PACKET_OBFUSCATION_KEY1) || defined(PACKET_OBFUSCATION_KEY2) || defined(PACKET_OBFUSCATION_KEY3) + #ifndef PACKET_OBFUSCATION_KEY1 + #error You enabled custom packet obfuscation keys, but did not specify key number 1. + #endif + #ifndef PACKET_OBFUSCATION_KEY2 + #error You enabled custom packet obfuscation keys, but did not specify key number 2. + #endif + #ifndef PACKET_OBFUSCATION_KEY3 + #error You enabled custom packet obfuscation keys, but did not specify key number 3. + #endif + + packet_keys(PACKET_OBFUSCATION_KEY1,PACKET_OBFUSCATION_KEY2,PACKET_OBFUSCATION_KEY3); + #elif PACKETVER == 20110817 + packet_keys(0x053D5CED,0x3DED6DED,0x6DED6DED); + #elif PACKETVER == 20110824 + packet_keys(0x35C91401,0x262A5556,0x28FA03AA); + #elif PACKETVER == 20110831 + packet_keys(0x3AD67ED0,0x44703C69,0x6F876809); + #elif PACKETVER == 20110906 + packet_keys(0x3AD67ED0,0x44703C69,0x6F876809); // unchanged from 2011-08-31 + #elif PACKETVER == 20111005 // 2011-10-05aRagexeRE + packet_keys(0x291E6762,0x77CD391A,0x60AC2F16); + #elif PACKETVER == 20111012 + packet_keys(0x7F3C2D29,0x59B01DE6,0x1DBB44CA); + #elif PACKETVER == 20111021 + packet_keys(0x357D55DC,0x5A8D759F,0x245C30F5); + #elif PACKETVER == 20111025 + packet_keys(0x50AE1A63,0x3CE579B5,0x29C10406); + #elif PACKETVER == 20111102 // 2011-11-02aRagexe + packet_keys(0x5324329D,0x5D545D52,0x06137269); + #elif PACKETVER == 20111109 + packet_keys(0x0B642BDA,0x6ECB1D1C,0x61C7454B); + #elif PACKETVER == 20111122 + packet_keys(0x3B550F07,0x1F666C7C,0x60304EF5); + #elif PACKETVER == 20111207 + packet_keys(0x2A610886,0x3E09165E,0x57C11888); + #elif PACKETVER == 20111214 + packet_keys(0x5151306B,0x7AE32886,0x53060628); + #elif PACKETVER == 20111220 + packet_keys(0x05D53871,0x7D0027B4,0x29975333); + #elif PACKETVER == 20111228 + packet_keys(0x0FF87E93,0x6CFF7860,0x3A3D1DEC); + #elif PACKETVER == 20120104 + packet_keys(0x262034A1,0x674542A5,0x73A50BA5); + #elif PACKETVER == 20120111 + packet_keys(0x2B412AFC,0x4FF94487,0x6705339D); + #elif PACKETVER == 20120120 + packet_keys(0x504345D0,0x3D427B1B,0x794C2DCC); + #elif PACKETVER == 20120202 + packet_keys(0x2CFC0A71,0x2BA91D8D,0x087E39E0); + #elif PACKETVER == 20120207 + packet_keys(0x1D373F5D,0x5ACD604D,0x1C4D7C4D); + #elif PACKETVER == 20120214 + packet_keys(0x7A255EFA,0x30977276,0x2D4A0448); + #elif PACKETVER == 20120229 + packet_keys(0x520B4C64,0x2800407D,0x47651458); + #elif PACKETVER == 20120307 // 2012-03-07fRagexeRE + packet_keys(0x382A6DEF,0x5CBE7202,0x61F46637); + #elif PACKETVER == 20120314 + packet_keys(0x689C1729,0x11812639,0x60F82967); + #elif PACKETVER == 20120321 + packet_keys(0x21F9683F,0x710C5CA5,0x1FD910E9); + #elif PACKETVER == 20120328 + packet_keys(0x75B8553B,0x37F20B12,0x385C2B40); + #elif PACKETVER == 20120404 + packet_keys(0x0036310C,0x2DCD0BED,0x1EE62A78); + #elif PACKETVER == 20120410 // 2012-04-10aRagexeRE + packet_keys(0x01581359,0x452D6FFA,0x6AFB6E2E); + #elif PACKETVER == 20120418 // 2012-04-18aRagexeRE + packet_keys(0x01540E48,0x13041224,0x31247924); + #elif PACKETVER == 20120424 + packet_keys(0x411D1DBB,0x4CBA4848,0x1A432FC4); + #elif PACKETVER == 20120509 + packet_keys(0x16CF3301,0x1F472B9B,0x0B4A3CD2); + #elif PACKETVER == 20120515 + packet_keys(0x4A715EF9,0x79103E4F,0x405C1238); + #elif PACKETVER == 20120525 + packet_keys(0x70EB4CCB,0x0487713C,0x398D4B08); + #elif PACKETVER == 20120605 + packet_keys(0x68CA3080,0x31B74BDD,0x505208F1); + #elif PACKETVER == 20120612 + packet_keys(0x32E45D64,0x35643564,0x35643564); + #elif PACKETVER == 20120618 // 2012-06-18 + packet_keys(0x261F261F,0x261F261F,0x261F261F); + #elif PACKETVER == 20120702 // 2012-07-02aRagexeRE + packet_keys(0x25733B31,0x53486CFD,0x398649BD); + #elif PACKETVER == 20120716 + packet_keys(0x76052205,0x22052205,0x22052205); + #elif PACKETVER == 20130320 // 2013-03-20Ragexe + packet_keys(0x3F094C49,0x55F86C1E,0x58AA359A); + #elif PACKETVER == 20130515 // 2013-05-15aRagexe + packet_keys(0x75794A38,0x58A96BC1,0x296E6FB8); + #elif PACKETVER == 20130522 // 2013-05-22Ragexe + packet_keys(0x6948050B,0x06511D9D,0x725D4DF1); + #elif PACKETVER == 20130529 // 2013-05-29Ragexe + packet_keys(0x023A6C87,0x14BF1F1E,0x5CC70CC9); + #elif PACKETVER == 20130605 // 2013-06-05Ragexe + packet_keys(0x646E08D9,0x5F153AB5,0x61B509B5); + #elif PACKETVER == 20130612 // 2013-06-12Ragexe + packet_keys(0x6D166F66,0x3C000FCF,0x295B0FCB); + #elif PACKETVER == 20130618 // 2013-06-18Ragexe + packet_keys(0x434115DE,0x34A10FE9,0x6791428E); + #elif PACKETVER == 20130626 // 2013-06-26Ragexe + packet_keys(0x38F453EF,0x6A040FD8,0X65BD6668); + #elif PACKETVER == 20130703 // 2013-07-03Ragexe + packet_keys(0x4FF90E23,0x0F1432F2,0x4CFA1EDA); + #elif PACKETVER == 20130710 // 2013-07-10Ragexe + packet_keys(0x458F758F,0x4CCF3F8F,0x4A9C4237); + #elif PACKETVER == 20130717 // 2013-07-17Ragexe + packet_keys(0x2BED4F91,0x5F9E00CF,0x5EE5520C); + #elif PACKETVER == 20130807 // 2013-08-07Ragexe + packet_keys(0x7E241DE0,0x5E805580,0x3D807D80); + #elif PACKETVER == 20130814 + packet_keys(0x23A23148,0x0C41420E,0x53785AD7); + #elif PACKETVER == 20131218 + packet_keys(0x6A596301,0x76866D0E,0x32294A45); + #elif PACKETVER == 20131223 // 2013-12-23Ragexe + packet_keys(0x631C511C,0x111C111C,0x111C111C); + #elif PACKETVER == 20131230 + packet_keys(0x611B7097,0x01F957A1,0x768A0FCB); + #elif PACKETVER == 20140115 + packet_keys(0x63224335,0x0F3A1F27,0x6D217B24); + #elif PACKETVER == 20140205 + packet_keys(0x63DC7BDC,0x7BDC7BDC,0x7BDC7BDC); + #elif PACKETVER == 20140305 + packet_keys(0x116763F2,0x41117DAC,0x7FD13C45); + #elif PACKETVER == 20140402 + packet_keys(0x15D3271C,0x004D725B,0x111A3A37); + #elif PACKETVER == 20140416 + packet_keys(0x04810281,0x42814281,0x42814281); + #elif PACKETVER == 20141016 // 2014-10-16Ragexe + packet_keys(0x2DFF467C,0x444B37EE,0x2C1B634F); + #elif PACKETVER == 20141022 // 2014-10-22bRagexe + packet_keys(0x290551EA,0x2B952C75,0x2D67669B); + #elif PACKETVER == 20150107 // 2015-01-07aRagexeRE + packet_keys(0x6C494A14, 0x4DDB6427, 0x3E6D7B65); + #elif PACKETVER == 20150114 // 2015-01-14aRagexe + packet_keys(0x21C96102, 0x13142934, 0x1ABF4EA3); + #elif PACKETVER == 20150128 // 2015-01-28aRagexe + packet_keys(0x77CA2D55,0x28B608F0,0x75B47957); + #elif PACKETVER == 20150204 // 2015-02-04aRagexe + packet_keys(0x134529DB,0x5B4F6CEF,0x29EF11EF); + #elif PACKETVER == 20150225 || PACKETVER == 20150226 // 2015-02-25aRagexeRE or 2015-02-26aRagexeRE + packet_keys(0x57FD4B7B,0x19CC16FB,0x0D255D72); + #elif PACKETVER == 20150311 // 2015-03-11aRagexeRE + packet_keys(0x48C45D97,0x06CE09B0,0x5836642F); + #elif PACKETVER == 20150325 // 2015-03-25aRagexe + packet_keys(0x68F62B8C, 0x337C3468, 0x38FC0AC7); + #elif PACKETVER == 20150401 // 2015-04-01aRagexe + packet_keys(0x207F3A08,0x57E6160C,0x02A60382); + #elif PACKETVER == 20150422 // 2015-04-22aRagexeRE + packet_keys(0x10D22CE2,0x69E279E2,0x79E279E2); + #elif PACKETVER == 20150429 // 2015-04-29aRagexe + packet_keys(0x2BF61A71,0x565D5DDF,0x0FB90019); + #elif PACKETVER == 20150507 // 2015-05-07bRagexe + packet_keys(0x55B54373,0x58967821,0x67F41832); + #elif PACKETVER == 20150513 // 2015-05-13aRagexe + packet_keys(0x62C86D09,0x75944F17,0x112C133D); + #elif PACKETVER == 20150527 // 2015-05-27aRagexe + packet_keys(0x35AE7BAE,0x3BAE3BAE,0x3BAE3BAE); + #elif PACKETVER == 20150617 || PACKETVER == 20150618 // 2015-06-17aRagexeRE or 2015-06-18aRagexeRE + packet_keys(0x250F7E09,0x25416076,0x029A780E); + #elif PACKETVER == 20150819 // 2015-08-19aRagexeRE + packet_keys(0x1A2400E0,0x736E5686,0x10F315D5); + #elif PACKETVER == 20150826 // 2015-08-26aRagexeRE + packet_keys(0x77883C56,0x1829359F,0x0DE635B6); + #elif PACKETVER == 20150916 // 2015-09-16Ragexe + packet_keys(0x17F83A19,0x116944F4,0x1CC541E9); + #elif PACKETVER == 20151001 // 2015-10-01bRagexeRE + packet_keys(0x45B945B9,0x45B945B9,0x45B945B9); + #elif PACKETVER == 20151007 // 2015-10-07aRagexeRE + packet_keys(0x3C6447A8,0x032170D7,0x6490476C); + #elif PACKETVER == 20151014 // 2015-10-14bRagexeRE + packet_keys(0x402728A8,0x5D0E309F,0x240018FD); + #elif PACKETVER == 20151028 // 2015-10-28cRagexeRE + packet_keys(0x45B945B9,0x45B945B9,0x45B945B9); + #elif PACKETVER == 20151029 // 2015-10-29aRagexe + packet_keys(0x45B945B9,0x45B945B9,0x45B945B9); + #elif PACKETVER == 20151104 // 2015-11-04aRagexe + packet_keys(0x4C17382A,0x7ED174C9,0x29961E4F); + #elif PACKETVER == 20151118 // 2015-11-18aRagexeRE + packet_keys(0x734C3241,0x6E846F34,0x731C06D6); + #elif PACKETVER == 20151202 // 2015-12-02bRagexeRE + packet_keys(0x4EDE52DE,0x52DE52DE,0x52DE52DE); + #elif PACKETVER == 20151216 // 2015-12-16aRagexe + packet_keys(0x25DD643D,0x61AC39DE,0x77A8206D); + #elif PACKETVER == 20151223 // 2015-12-23bRagexeRE + packet_keys(0x347D68D0,0x2C705320,0x7B4A199D); + #elif PACKETVER == 20160106 // 2016-01-06aRagexeRE + packet_keys(0x40520265,0x33FE26FC,0x7136294F); + #elif PACKETVER == 20160113 // 2016-01-13cRagexeRE + packet_keys(0x18005C4B,0x19A94A72,0x73F678EC); + #elif PACKETVER == 20160120 // 2016-01-20aRagexeRE + packet_keys(0x51495149,0x51495149,0x51495149); + #elif PACKETVER == 20160127 // 2016-01-27bRagexeRE + packet_keys(0x6B1E7146,0x612C47E6,0x274E56EE); + #elif PACKETVER == 20160203 // 2016-02-03aRagexeRE + packet_keys(0x3E1411AF,0x6C744497,0x7CFA1BDE); + #elif PACKETVER == 20160211 // 2016-02-11aRagexeRE + packet_keys(0x613813EA,0x05251DAB,0x1FD35E33); + #elif PACKETVER == 20160217 // 2016-02-17cRagexeRE + packet_keys(0x25895A8E,0x09421C19,0x763A2D7A); + #elif PACKETVER == 20160224 // 2016-02-24bRagexeRE + packet_keys(0x7088019A,0x13471F02,0x42356A7D); + #elif PACKETVER == 20160302 // 2016-03-02bRagexeRE + packet_keys(0x7B4441B9,0x5BBC63AF,0x45DA0E71); + #elif PACKETVER == 20160309 // 2016-03-09aRagexeRE + packet_keys(0x21587520,0x353A7706,0x1B722B25); + #elif PACKETVER == 20160316 // 2016-03-16aRagexeRE + packet_keys(0x62363E36,0x3E363E36,0x3E363E36); + #elif PACKETVER == 20160323 // 2016-03-23aRagexeRE + packet_keys(0x73E35A83,0x62142FA8,0x12BA36BD); + #elif PACKETVER == 20160330 // 2016-03-30aRagexeRE + packet_keys(0x02050940,0x545336FF,0x7E7D4902); + #elif PACKETVER == 20160406 // 2016-04-06aRagexeRE + packet_keys(0x568611EA,0x32457D8D,0x2B020477); + #elif PACKETVER == 20160414 // 2016-04-14bRagexeRE + packet_keys(0x31BD479A,0x40C61398,0x397C1A80); + #elif PACKETVER == 20160420 // 2016-04-20aRagexeRE + packet_keys(0x67D2163A,0x3068215B,0x4835474D); + #elif PACKETVER == 20160427 // 2016-04-27aRagexeRE + packet_keys(0x12DC378E,0x4E3E7EBE,0x0ABE2ABE); + #elif PACKETVER == 20160504 // 2016-05-04aRagexeRE + packet_keys(0x09E0544C,0x0231251D,0x2F4E195F); + #elif PACKETVER == 20160511 // 2016-05-11aRagexeRE + packet_keys(0x3C666FE2,0x27E84E3E,0x53E11BA5); + #elif PACKETVER == 20160518 // 2016-05-18aRagexeRE + packet_keys(0x57DB7CA1,0x1FEA1629,0x26DD244D); + #elif PACKETVER == 20160525 // 2016-05-25aRagexeRE + packet_keys(0x485C45B6,0x47DC6192,0x76B34A36); + #elif PACKETVER == 20160601 // 2016-06-01aRagexeRE + packet_keys(0x3DAD32C4,0x59F001BE,0x73F65E56); + #elif PACKETVER == 20160608 // 2016-06-08aRagexeRE + packet_keys(0x11D74609,0x77C43E8A,0x44290F53); + #elif PACKETVER == 20160615 // 2016-06-15aRagexeRE + packet_keys(0x062C5C26,0x6CF47E82,0x4DD53480); + #elif PACKETVER == 20160622 // 2016-06-22aRagexeRE + packet_keys(0x426548AB,0x5C0F5DD4,0x03022710); + #elif PACKETVER == 20160630 // 2016-06-30aRagexeRE + packet_keys(0x0DF31CCC,0x54281606,0x5C4C6855); + #elif PACKETVER == 20160706 // 2016-07-06cRagexeRE + packet_keys(0x33A766D0,0x743F04F8,0x0FA0276C); + #elif PACKETVER == 20160713 // 2016-07-13bRagexeRE + packet_keys(0x714F2495,0x7DDC6F32,0x3FD8533D); + #elif PACKETVER == 20160720 // 2016-07-20aRagexeRE + packet_keys(0x4F8A19C0,0x2D8E085C,0x37BB67D6); + #elif PACKETVER == 20160727 // 2016-07-27bRagexeRE + packet_keys(0x3C6952AB,0x26E4077F,0x37E25DF7); + #elif PACKETVER == 20160803 // 2016-08-03bRagexeRE + packet_keys(0x67F438C2,0x512A4EB7,0x2D353182); + #elif PACKETVER == 20160810 // 2016-08-10aRagexeRE + packet_keys(0x2F252886,0x242234A2,0x48BC5032); + #elif PACKETVER == 20160831 // 2016-08-31bRagexeRE + packet_keys(0x564E13B0,0x7F680549,0x382D273B); + #elif PACKETVER == 20160907 // 2016-09-07aRagexeRE + packet_keys(0x32E5237D,0x57BD4DBD,0x5DBD5DBD); + #elif PACKETVER == 20160913 // 2016-09-13aRagexeRE + packet_keys(0x7C79748F,0x1AA03B1D,0x6EAC4747); + #elif PACKETVER == 20160921 // 2016-09-21bRagexeRE + packet_keys(0x11CD15CD,0x15CD15CD,0x15CD15CD); + #elif PACKETVER == 20160928 // 2016-09-28dRagexeRE + packet_keys(0x2F8C67F5,0x22D42C38,0x57513774); + #elif PACKETVER == 20161005 // 2016-10-05aRagexeRE + packet_keys(0x5BAE21F8,0x021E2FFC,0x3BEB7C31); + #elif PACKETVER == 20161012 // 2016-10-12aRagexeRE + packet_keys(0x5E2311F2,0x14FD012C,0x76EB64F6); + #elif PACKETVER == 20161019 // 2016-10-19aRagexeRE + packet_keys(0x34882F11,0x7C870E70,0x7E61350D); + #elif PACKETVER == 20161026 // 2016-10-26bRagexeRE + packet_keys(0x2CB86AE6,0x7D12660E,0x1B004DEB); + #elif PACKETVER == 20161103 // 2016-11-03aRagexeRE + packet_keys(0x76725C17,0x72FE4EC1,0x07A91BFD); + #elif PACKETVER == 20161109 // 2016-11-09bRagexeRE + packet_keys(0x0A5277C0,0x2DB17506,0x0E8F26DA); + #elif PACKETVER == 20161116 // 2016-11-16cRagexeRE + packet_keys(0x780C5C3F,0x15E92272,0x2BA770C5); + #elif PACKETVER == 20161123 // 2016-11-23aRagexeRE + packet_keys(0x66FF559F,0x00D3535B,0x236246F7); + #elif PACKETVER == 20161130 // 2016-11-30bRagexeRE + packet_keys(0x2ED80296,0x0D837373,0x20266F9A); + #elif PACKETVER == 20161207 // 2016-12-07eRagexeRE + packet_keys(0x52D267AA,0x4FE42156,0x1292153E); + #elif PACKETVER == 20161214 // 2016-12-14bRagexeRE + packet_keys(0x4DDE217B,0x07863AE0,0x5B591656); + #elif PACKETVER == 20161221 // 2016-12-21aRagexeRE + packet_keys(0x69CB4F56,0x793C165E,0x673A2354); + #elif PACKETVER == 20161228 // 2016-12-28aRagexeRE + packet_keys(0x09366971,0x005672F1,0x6F3712AE); + #elif PACKETVER == 20170104 // 2017-01-04bRagexeRE + packet_keys(0x44416BC3,0x6C8D1817,0x072D75D5); + #elif PACKETVER == 20170111 // 2017-01-11aRagexeRE + packet_keys(0x19B637F9,0x0E9C378A,0x41673186); + #elif PACKETVER == 20170118 // 2017-01-18aRagexeRE + packet_keys(0x456B36EB,0x15EB34B0,0x18C42E43); + #elif PACKETVER == 20170125 // 2017-01-25aRagexeRE + packet_keys(0x066E04FE,0x3004224A,0x04FF0458); + #elif PACKETVER == 20170201 // 2017-02-01aRagexeRE + packet_keys(0x2011228E,0x00453005,0x628E7F0A); + #elif PACKETVER == 20170208 // 2017-02-08aRagexeRE + packet_keys(0x6A764E5F,0x0609570D,0x28AE07FA); + #elif PACKETVER == 20170215 // 2017-02-15aRagexeRE + packet_keys(0x50C01315,0x51012A42,0x679E16C3); + #elif PACKETVER == 20170222 // 2017-02-22aRagexeRE + packet_keys(0x5A242F2F,0x6C556187,0x73C022CB); + #elif PACKETVER == 20170228 // 2017-02-28aRagexeRE + packet_keys(0x771D4F2B,0x20EF1F4C,0x0D5135C8); + #elif PACKETVER == 20170308 // 2017-03-08bRagexeRE + packet_keys(0x653470A9,0x6B316A71,0x5C712C71); + #elif PACKETVER == 20170315 // 2017-03-15cRagexeRE + packet_keys(0x399A0856,0x56642A94,0x7F77157D); + #elif PACKETVER == 20170322 // 2017-03-22aRagexeRE + packet_keys(0x2050167B,0x01731233,0x40337033); + #elif PACKETVER == 20170329 // 2017-03-29dRagexeRE + packet_keys(0x18B31A80,0x1B0B1D56,0x16857D6A); + #elif PACKETVER == 20170405 // 2017-04-05bRagexeRE + packet_keys(0x1FDE7DAC,0x2F9F5B63,0x3F2062AF); + #elif PACKETVER == 20170412 // 2017-04-12aRagexeRE + packet_keys(0x39223393,0x5C847779,0x10217985); + #elif PACKETVER == 20170419 // 2017-04-19bRagexeRE + packet_keys(0x1F8F4B3F,0x2E481F03,0x39ED4178); + #elif PACKETVER == 20170426 // 2017-04-26dRagexeRE + packet_keys(0x167642A7,0x1DEC3D26,0x6D046D4C); + #elif PACKETVER == 20170502 // 2017-05-02dRagexeRE + packet_keys(0x05224194,0x466D4204,0x31F02EE0); + #elif PACKETVER == 20170517 // 2017-05-17aRagexeRE + packet_keys(0x2CC4749A,0x1FA954DC,0x72276857); + #elif PACKETVER == 20170524 // 2017-05-24aRagexeRE + packet_keys(0x0B4E03A6,0x2B93427C,0x583D4477); + #elif PACKETVER == 20170531 // 2017-05-31aRagexeRE + packet_keys(0x03FA5A97,0x20B802D5,0x339F1977); + #elif PACKETVER == 20170607 // 2017-06-07cRagexeRE + packet_keys(0x50564ACD,0x79CA4E15,0x405F4894); + #elif PACKETVER > 20110817 + #error Unsupported packet version. + #endif + + #undef packet_keys + +#endif /* _CLIF_OBFUSCATION_H_ */ diff --git a/src/map/clif_packetdb.h b/src/map/clif_packetdb.h new file mode 100644 index 0000000000..52bb6331fd --- /dev/null +++ b/src/map/clif_packetdb.h @@ -0,0 +1,2308 @@ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder + +#ifndef _CLIF_PACKETDB_H_ +#define _CLIF_PACKETDB_H_ + + #define packet(cmd,length) packetdb_addpacket(cmd,length,NULL,0) + #define parseable_packet(cmd,length,func,...) packetdb_addpacket(cmd,length,func,__VA_ARGS__,0) + #define ack_packet(type,cmd,length,...) \ + packetdb_addpacket(cmd,length,NULL,__VA_ARGS__,0); \ + packet_db_ack[type] = cmd + + packet(0x0064,55); + packet(0x0065,17); + packet(0x0066,6); + packet(0x0067,37); + packet(0x0068,46); + packet(0x0069,-1); + packet(0x006a,23); + packet(0x006b,-1); + packet(0x006c,3); + packet(0x006d,108); + packet(0x006e,3); + packet(0x006f,2); + packet(0x0070,6); + packet(0x0071,28); + parseable_packet(0x0072,19,clif_parse_WantToConnection,2,6,10,14,18); + packet(0x0073,11); + packet(0x0074,3); + packet(0x0075,-1); + packet(0x0076,9); + packet(0x0077,5); + packet(0x0078,54); + packet(0x0079,53); + packet(0x007a,58); + packet(0x007b,60); + packet(0x007c,41); + parseable_packet(0x007d,2,clif_parse_LoadEndAck,0); + parseable_packet(0x007e,6,clif_parse_TickSend,2); + packet(0x007f,6); + packet(0x0080,7); + packet(0x0081,3); + packet(0x0082,2); + packet(0x0083,2); + packet(0x0084,2); + parseable_packet(0x0085,5,clif_parse_WalkToXY,2); + packet(0x0086,16); + packet(0x0087,12); + packet(0x0088,10); + parseable_packet(0x0089,7,clif_parse_ActionRequest,2,6); + packet(0x008a,29); + packet(0x008b,2); + parseable_packet(0x008c,-1,clif_parse_GlobalMessage,2,4); + packet(0x008d,-1); + packet(0x008e,-1); + //packet(0x008f,-1); + parseable_packet(0x0090,7,clif_parse_NpcClicked,2,6); + packet(0x0091,22); + packet(0x0092,28); + packet(0x0093,2); + parseable_packet(0x0094,6,clif_parse_GetCharNameRequest,2); + packet(0x0095,30); + parseable_packet(0x0096,-1,clif_parse_WisMessage,2,4,28); + packet(0x0097,-1); + packet(0x0098,3); + parseable_packet(0x0099,-1,clif_parse_Broadcast,2,4); + packet(0x009a,-1); + parseable_packet(0x009b,5,clif_parse_ChangeDir,2,4); + packet(0x009c,9); + packet(0x009d,17); + packet(0x009e,17); + parseable_packet(0x009f,6,clif_parse_TakeItem,2); + packet(0x00a0,23); + packet(0x00a1,6); + parseable_packet(0x00a2,6,clif_parse_DropItem,2,4); + packet(0x00a3,-1); + packet(0x00a4,-1); + packet(0x00a5,-1); + packet(0x00a6,-1); + parseable_packet(0x00a7,8,clif_parse_UseItem,2,4); + packet(0x00a8,7); + parseable_packet(0x00a9,6,clif_parse_EquipItem,2,4); + ack_packet(ZC_WEAR_EQUIP_ACK,0x00aa,7,2,4,6); + parseable_packet(0x00ab,4,clif_parse_UnequipItem,2); + packet(0x00ac,7); + //packet(0x00ad,-1); + packet(0x00ae,-1); + packet(0x00af,6); + packet(0x00b0,8); + packet(0x00b1,8); + parseable_packet(0x00b2,3,clif_parse_Restart,2); + packet(0x00b3,3); + packet(0x00b4,-1); + packet(0x00b5,6); + packet(0x00b6,6); + packet(0x00b7,-1); + parseable_packet(0x00b8,7,clif_parse_NpcSelectMenu,2,6); + parseable_packet(0x00b9,6,clif_parse_NpcNextClicked,2); + packet(0x00ba,2); + parseable_packet(0x00bb,5,clif_parse_StatusUp,2,4); + packet(0x00bc,6); + packet(0x00bd,44); + packet(0x00be,5); + parseable_packet(0x00bf,3,clif_parse_Emotion,2); + packet(0x00c0,7); + parseable_packet(0x00c1,2,clif_parse_HowManyConnections,0); + packet(0x00c2,6); + packet(0x00c3,8); + packet(0x00c4,6); + parseable_packet(0x00c5,7,clif_parse_NpcBuySellSelected,2,6); + packet(0x00c6,-1); + packet(0x00c7,-1); + parseable_packet(0x00c8,-1,clif_parse_NpcBuyListSend,2,4); + parseable_packet(0x00c9,-1,clif_parse_NpcSellListSend,2,4); + packet(0x00ca,3); + packet(0x00cb,3); + parseable_packet(0x00cc,6,clif_parse_GMKick,2); + packet(0x00cd,3); + parseable_packet(0x00ce,2,clif_parse_GMKickAll,0); + parseable_packet(0x00cf,27,clif_parse_PMIgnore,2,26); + parseable_packet(0x00d0,3,clif_parse_PMIgnoreAll,2); + packet(0x00d1,4); + packet(0x00d2,4); + parseable_packet(0x00d3,2,clif_parse_PMIgnoreList,0); + packet(0x00d4,-1); + parseable_packet(0x00d5,-1,clif_parse_CreateChatRoom,2,4,6,7,15); + packet(0x00d6,3); + packet(0x00d7,-1); + packet(0x00d8,6); + parseable_packet(0x00d9,14,clif_parse_ChatAddMember,2,6); + packet(0x00da,3); + packet(0x00db,-1); + packet(0x00dc,28); + packet(0x00dd,29); + parseable_packet(0x00de,-1,clif_parse_ChatRoomStatusChange,2,4,6,7,15); + packet(0x00df,-1); + parseable_packet(0x00e0,30,clif_parse_ChangeChatOwner,2,6); + packet(0x00e1,30); + parseable_packet(0x00e2,26,clif_parse_KickFromChat,2); + parseable_packet(0x00e3,2,clif_parse_ChatLeave,0); + parseable_packet(0x00e4,6,clif_parse_TradeRequest,2); + packet(0x00e5,26); + parseable_packet(0x00e6,3,clif_parse_TradeAck,2); + packet(0x00e7,3); + parseable_packet(0x00e8,8,clif_parse_TradeAddItem,2,4); + packet(0x00e9,19); + packet(0x00ea,5); + parseable_packet(0x00eb,2,clif_parse_TradeOk,0); + packet(0x00ec,3); + parseable_packet(0x00ed,2,clif_parse_TradeCancel,0); + packet(0x00ee,2); + parseable_packet(0x00ef,2,clif_parse_TradeCommit,0); + packet(0x00f0,3); + packet(0x00f1,2); + packet(0x00f2,6); + parseable_packet(0x00f3,8,clif_parse_MoveToKafra,2,4); + packet(0x00f4,21); + parseable_packet(0x00f5,8,clif_parse_MoveFromKafra,2,4); + packet(0x00f6,8); + parseable_packet(0x00f7,2,clif_parse_CloseKafra,0); + packet(0x00f8,2); + parseable_packet(0x00f9,26,clif_parse_CreateParty,2); + packet(0x00fa,3); + packet(0x00fb,-1); + parseable_packet(0x00fc,6,clif_parse_PartyInvite,2); + packet(0x00fd,27); + packet(0x00fe,30); + parseable_packet(0x00ff,10,clif_parse_ReplyPartyInvite,2,6); + parseable_packet(0x0100,2,clif_parse_LeaveParty,0); + packet(0x0101,6); + parseable_packet(0x0102,6,clif_parse_PartyChangeOption,2); + parseable_packet(0x0103,30,clif_parse_RemovePartyMember,2,6); + packet(0x0104,79); + packet(0x0105,31); + packet(0x0106,10); + packet(0x0107,10); + parseable_packet(0x0108,-1,clif_parse_PartyMessage,2,4); + packet(0x0109,-1); + packet(0x010a,4); + packet(0x010b,6); + packet(0x010c,6); + packet(0x010d,2); + packet(0x010e,11); + packet(0x010f,-1); + packet(0x0110,10); + packet(0x0111,39); + parseable_packet(0x0112,4,clif_parse_SkillUp,2); + parseable_packet(0x0113,10,clif_parse_UseSkillToId,2,4,6); + packet(0x0114,31); + packet(0x0115,35); + parseable_packet(0x0116,10,clif_parse_UseSkillToPos,2,4,6,8); + packet(0x0117,18); + parseable_packet(0x0118,2,clif_parse_StopAttack,0); + packet(0x0119,13); + packet(0x011a,15); + parseable_packet(0x011b,20,clif_parse_UseSkillMap,2,4); + packet(0x011c,68); + parseable_packet(0x011d,2,clif_parse_RequestMemo,0); + packet(0x011e,3); + packet(0x011f,16); + packet(0x0120,6); + packet(0x0121,14); + packet(0x0122,-1); + packet(0x0123,-1); + packet(0x0124,21); + packet(0x0125,8); + parseable_packet(0x0126,8,clif_parse_PutItemToCart,2,4); + parseable_packet(0x0127,8,clif_parse_GetItemFromCart,2,4); + parseable_packet(0x0128,8,clif_parse_MoveFromKafraToCart,2,4); + parseable_packet(0x0129,8,clif_parse_MoveToKafraFromCart,2,4); + parseable_packet(0x012a,2,clif_parse_RemoveOption,0); + packet(0x012b,2); + packet(0x012c,3); + packet(0x012d,4); + parseable_packet(0x012e,2,clif_parse_CloseVending,0); + parseable_packet(0x012f,-1,clif_parse_OpenVending,2,4,0,84); + parseable_packet(0x0130,6,clif_parse_VendingListReq,2); + packet(0x0131,86); + packet(0x0132,6); + packet(0x0133,-1); + parseable_packet(0x0134,-1,clif_parse_PurchaseReq,2,4,8); + packet(0x0135,7); + packet(0x0136,-1); + packet(0x0137,6); + packet(0x0138,3); + packet(0x0139,16); + packet(0x013a,4); + packet(0x013b,4); + packet(0x013c,4); + packet(0x013d,6); + packet(0x013e,24); + parseable_packet(0x013f,26,clif_parse_GM_Item_Monster,2); + parseable_packet(0x0140,22,clif_parse_MapMove,2,18,20); + packet(0x0141,14); + packet(0x0142,6); + parseable_packet(0x0143,10,clif_parse_NpcAmountInput,2,6); + packet(0x0144,23); + packet(0x0145,19); + parseable_packet(0x0146,6,clif_parse_NpcCloseClicked,2); + packet(0x0147,39); + packet(0x0148,8); + parseable_packet(0x0149,9,clif_parse_GMReqNoChat,2,6,7); + packet(0x014a,6); + packet(0x014b,27); + packet(0x014c,-1); + parseable_packet(0x014d,2,clif_parse_GuildCheckMaster,0); + packet(0x014e,6); + parseable_packet(0x014f,6,clif_parse_GuildRequestInfo,2); + packet(0x0150,110); + parseable_packet(0x0151,6,clif_parse_GuildRequestEmblem,2); + packet(0x0152,-1); + parseable_packet(0x0153,-1,clif_parse_GuildChangeEmblem,2,4); + packet(0x0154,-1); + parseable_packet(0x0155,-1,clif_parse_GuildChangeMemberPosition,2,4); + packet(0x0156,-1); + packet(0x0157,6); + packet(0x0158,-1); + parseable_packet(0x0159,54,clif_parse_GuildLeave,2,6,10,14); + packet(0x015a,66); + parseable_packet(0x015b,54,clif_parse_GuildExpulsion,2,6,10,14); + packet(0x015c,90); + parseable_packet(0x015d,42,clif_parse_GuildBreak,2); + packet(0x015e,6); + packet(0x015f,42); + packet(0x0160,-1); + parseable_packet(0x0161,-1,clif_parse_GuildChangePositionInfo,2,4); + packet(0x0162,-1); + packet(0x0163,-1); + packet(0x0164,-1); + parseable_packet(0x0165,30,clif_parse_CreateGuild,2,6); + packet(0x0166,-1); + packet(0x0167,3); + parseable_packet(0x0168,14,clif_parse_GuildInvite,2,6,10); + packet(0x0169,3); + packet(0x016a,30); + parseable_packet(0x016b,10,clif_parse_GuildReplyInvite,2,6); + packet(0x016c,43); + packet(0x016d,14); + parseable_packet(0x016e,186,clif_parse_GuildChangeNotice,2,6,66); + packet(0x016f,182); + parseable_packet(0x0170,14,clif_parse_GuildRequestAlliance,2,6,10); + packet(0x0171,30); + parseable_packet(0x0172,10,clif_parse_GuildReplyAlliance,2,6); + packet(0x0173,3); + packet(0x0174,-1); + packet(0x0175,6); + packet(0x0176,106); + packet(0x0177,-1); + parseable_packet(0x0178,4,clif_parse_ItemIdentify,2); + packet(0x0179,5); + parseable_packet(0x017a,4,clif_parse_UseCard,2); + packet(0x017b,-1); + parseable_packet(0x017c,6,clif_parse_InsertCard,2,4); + packet(0x017d,7); + parseable_packet(0x017e,-1,clif_parse_GuildMessage,2,4); + packet(0x017f,-1); + parseable_packet(0x0180,6,clif_parse_GuildOpposition,2); + packet(0x0181,3); + packet(0x0182,106); + parseable_packet(0x0183,10,clif_parse_GuildDelAlliance,2,6); + packet(0x0184,10); + packet(0x0185,34); + //packet(0x0186,-1); + packet(0x0187,6); + packet(0x0188,8); + packet(0x0189,4); + parseable_packet(0x018a,4,clif_parse_QuitGame,2); + packet(0x018b,4); + packet(0x018c,29); + packet(0x018d,-1); + parseable_packet(0x018e,10,clif_parse_ProduceMix,2,4,6,8); + packet(0x018f,6); + parseable_packet(0x0190,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + packet(0x0191,86); + packet(0x0192,24); + parseable_packet(0x0193,6,clif_parse_SolveCharName,2); + packet(0x0194,30); + packet(0x0195,102); + packet(0x0196,9); + parseable_packet(0x0197,4,clif_parse_ResetChar,2); + parseable_packet(0x0198,8,clif_parse_GMChangeMapType,2,4,6); + packet(0x0199,4); + packet(0x019a,14); + packet(0x019b,10); + parseable_packet(0x019c,-1,clif_parse_LocalBroadcast,2,4); + parseable_packet(0x019d,6,clif_parse_GMHide,2); + packet(0x019e,2); + parseable_packet(0x019f,6,clif_parse_CatchPet,2); + packet(0x01a0,3); + parseable_packet(0x01a1,3,clif_parse_PetMenu,2); + packet(0x01a2,35); + packet(0x01a3,5); + packet(0x01a4,11); + parseable_packet(0x01a5,26,clif_parse_ChangePetName,2); + packet(0x01a6,-1); + parseable_packet(0x01a7,4,clif_parse_SelectEgg,2); + packet(0x01a8,4); + parseable_packet(0x01a9,6,clif_parse_SendEmotion,2); + packet(0x01aa,10); + packet(0x01ab,12); + packet(0x01ac,6); + packet(0x01ad,-1); + parseable_packet(0x01ae,4,clif_parse_SelectArrow,2); + parseable_packet(0x01af,4,clif_parse_ChangeCart,2); + packet(0x01b0,11); + packet(0x01b1,7); + parseable_packet(0x01b2,-1,clif_parse_OpenVending,2,4,84,85); + packet(0x01b3,67); + packet(0x01b4,12); + packet(0x01b5,18); + packet(0x01b6,114); + packet(0x01b7,6); + packet(0x01b8,3); + packet(0x01b9,6); + parseable_packet(0x01ba,26,clif_parse_GMShift,2); + parseable_packet(0x01bb,26,clif_parse_GMShift,2); + parseable_packet(0x01bc,26,clif_parse_GMRecall,2); + parseable_packet(0x01bd,26,clif_parse_GMRecall,2); + packet(0x01be,2); + packet(0x01bf,3); + packet(0x01c0,2); + packet(0x01c1,14); + packet(0x01c2,10); + packet(0x01c3,-1); + packet(0x01c4,22); + packet(0x01c5,22); + packet(0x01c6,4); + packet(0x01c7,2); + packet(0x01c8,13); + packet(0x01c9,97); + //packet(0x01ca,-1); + packet(0x01cb,9); + packet(0x01cc,9); + packet(0x01cd,30); + parseable_packet(0x01ce,6,clif_parse_AutoSpell,2); + packet(0x01cf,28); + packet(0x01d0,8); + packet(0x01d1,14); + packet(0x01d2,10); + packet(0x01d3,35); + packet(0x01d4,6); + parseable_packet(0x01d5,-1,clif_parse_NpcStringInput,2,4,8); + packet(0x01d6,4); + packet(0x01d7,11); + packet(0x01d8,54); + packet(0x01d9,53); + packet(0x01da,60); + packet(0x01db,2); + packet(0x01dc,-1); + packet(0x01dd,47); + packet(0x01de,33); + parseable_packet(0x01df,6,clif_parse_GMReqAccountName,2); + packet(0x01e0,30); + packet(0x01e1,8); + packet(0x01e2,34); + packet(0x01e3,14); + packet(0x01e4,2); + packet(0x01e5,6); + packet(0x01e6,26); + parseable_packet(0x01e7,2,clif_parse_NoviceDoriDori,0); + parseable_packet(0x01e8,28,clif_parse_CreateParty2,2,26,27); + packet(0x01e9,81); + packet(0x01ea,6); + packet(0x01eb,10); + packet(0x01ec,26); + parseable_packet(0x01ed,2,clif_parse_NoviceExplosionSpirits,0); + packet(0x01ee,-1); + packet(0x01ef,-1); + packet(0x01f0,-1); + packet(0x01f1,-1); + packet(0x01f2,20); + packet(0x01f3,10); + packet(0x01f4,32); + packet(0x01f5,9); + packet(0x01f6,34); + parseable_packet(0x01f7,14,clif_parse_Adopt_reply,2,6,10); + packet(0x01f8,2); + parseable_packet(0x01f9,6,clif_parse_Adopt_request,2); + packet(0x01fa,48); + packet(0x01fb,56); + packet(0x01fc,-1); + parseable_packet(0x01fd,4,clif_parse_RepairItem,2); + packet(0x01fe,5); + packet(0x01ff,10); + packet(0x0200,26); + packet(0x0201,-1); + parseable_packet(0x0202,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0203,10,clif_parse_FriendsListRemove,2,6); + packet(0x0204,18); + packet(0x0205,26); + packet(0x0206,11); + packet(0x0207,34); + parseable_packet(0x0208,11,clif_parse_FriendsListReply,2,6,10); + packet(0x0209,36); + packet(0x020a,10); + //packet(0x020b,-1); + //packet(0x020c,-1); + packet(0x020d,-1); + packet(0x8b3,-1); + ack_packet(ZC_CLEAR_DIALOG,0x8d6,6,2); + +// 2004-07-05aSakexe +#if PACKETVER >= 20040705 + parseable_packet(0x0072,22,clif_parse_WantToConnection,5,9,13,17,21); + parseable_packet(0x0085,8,clif_parse_WalkToXY,5); + parseable_packet(0x00a7,13,clif_parse_UseItem,5,9); + parseable_packet(0x0113,15,clif_parse_UseSkillToId,4,9,11); + parseable_packet(0x0116,15,clif_parse_UseSkillToPos,4,9,11,13); + parseable_packet(0x0190,95,clif_parse_UseSkillToPosMoreInfo,4,9,11,13,15); + parseable_packet(0x0208,14,clif_parse_FriendsListReply,2,6,10); + packet(0x020e,24); +#endif + +// 2004-07-13aSakexe +#if PACKETVER >= 20040713 + parseable_packet(0x0072,39,clif_parse_WantToConnection,12,22,30,34,38); + parseable_packet(0x0085,9,clif_parse_WalkToXY,6); + parseable_packet(0x009b,13,clif_parse_ChangeDir,5,12); + parseable_packet(0x009f,10,clif_parse_TakeItem,6); + parseable_packet(0x00a7,17,clif_parse_UseItem,6,13); + parseable_packet(0x0113,19,clif_parse_UseSkillToId,7,9,15); + parseable_packet(0x0116,19,clif_parse_UseSkillToPos,7,9,15,17); + parseable_packet(0x0190,99,clif_parse_UseSkillToPosMoreInfo,7,9,15,17,19); +#endif + +// 2004-07-26aSakexe +#if PACKETVER >= 20040726 + parseable_packet(0x0072,14,clif_parse_DropItem,5,12); + parseable_packet(0x007e,33,clif_parse_WantToConnection,12,18,24,28,32); + parseable_packet(0x0085,20,clif_parse_UseSkillToId,7,12,16); + parseable_packet(0x0089,15,clif_parse_GetCharNameRequest,11); + parseable_packet(0x008c,23,clif_parse_UseSkillToPos,3,6,17,21); + parseable_packet(0x0094,10,clif_parse_TakeItem,6); + parseable_packet(0x009b,6,clif_parse_WalkToXY,3); + parseable_packet(0x009f,13,clif_parse_ChangeDir,5,12); + parseable_packet(0x00a2,103,clif_parse_UseSkillToPosMoreInfo,3,6,17,21,23); + parseable_packet(0x00a7,12,clif_parse_SolveCharName,8); + parseable_packet(0x00f3,-1,clif_parse_GlobalMessage,2,4); + parseable_packet(0x00f5,17,clif_parse_UseItem,6,12); + parseable_packet(0x00f7,10,clif_parse_TickSend,6); + parseable_packet(0x0113,16,clif_parse_MoveToKafra,5,12); + parseable_packet(0x0116,2,clif_parse_CloseKafra,0); + parseable_packet(0x0190,26,clif_parse_MoveFromKafra,10,22); + parseable_packet(0x0193,9,clif_parse_ActionRequest,3,8); +#endif + +// 2004-08-09aSakexe +#if PACKETVER >= 20040809 + parseable_packet(0x0072,17,clif_parse_DropItem,8,15); + parseable_packet(0x007e,37,clif_parse_WantToConnection,9,21,28,32,36); + parseable_packet(0x0085,26,clif_parse_UseSkillToId,11,18,22); + parseable_packet(0x0089,12,clif_parse_GetCharNameRequest,8); + parseable_packet(0x008c,40,clif_parse_UseSkillToPos,5,15,29,38); + parseable_packet(0x0094,13,clif_parse_TakeItem,9); + parseable_packet(0x009b,15,clif_parse_WalkToXY,12); + parseable_packet(0x009f,12,clif_parse_ChangeDir,7,11); + parseable_packet(0x00a2,120,clif_parse_UseSkillToPosMoreInfo,5,15,29,38,40); + parseable_packet(0x00a7,11,clif_parse_SolveCharName,7); + parseable_packet(0x00f5,24,clif_parse_UseItem,9,20); + parseable_packet(0x00f7,13,clif_parse_TickSend,9); + parseable_packet(0x0113,23,clif_parse_MoveToKafra,5,19); + parseable_packet(0x0190,26,clif_parse_MoveFromKafra,11,22); + parseable_packet(0x0193,18,clif_parse_ActionRequest,7,17); +#endif + +// 2004-08-16aSakexe +#if PACKETVER >= 20040816 + parseable_packet(0x0212,26,clif_parse_GMRc,2); + parseable_packet(0x0213,26,clif_parse_Check,2); + packet(0x0214,42); +#endif + +// 2004-08-17aSakexe +#if PACKETVER >= 20040817 + parseable_packet(0x020f,10,clif_parse_PVPInfo,2,6); + packet(0x0210,22); +#endif + +// 2004-09-06aSakexe +#if PACKETVER >= 20040906 + parseable_packet(0x0072,20,clif_parse_UseItem,9,20); + parseable_packet(0x007e,19,clif_parse_MoveToKafra,3,15); + parseable_packet(0x0085,23,clif_parse_ActionRequest,9,22); + parseable_packet(0x0089,9,clif_parse_WalkToXY,6); + parseable_packet(0x008c,105,clif_parse_UseSkillToPosMoreInfo,10,14,18,23,25); + parseable_packet(0x0094,17,clif_parse_DropItem,6,15); + parseable_packet(0x009b,14,clif_parse_GetCharNameRequest,10); + parseable_packet(0x009f,-1,clif_parse_GlobalMessage,2,4); + parseable_packet(0x00a2,14,clif_parse_SolveCharName,10); + parseable_packet(0x00a7,25,clif_parse_UseSkillToPos,10,14,18,23); + parseable_packet(0x00f3,10,clif_parse_ChangeDir,4,9); + parseable_packet(0x00f5,34,clif_parse_WantToConnection,7,15,25,29,33); + parseable_packet(0x00f7,2,clif_parse_CloseKafra,0); + parseable_packet(0x0113,11,clif_parse_TakeItem,7); + parseable_packet(0x0116,11,clif_parse_TickSend,7); + parseable_packet(0x0190,22,clif_parse_UseSkillToId,9,15,18); + parseable_packet(0x0193,17,clif_parse_MoveFromKafra,3,13); +#endif + +// 2004-09-20aSakexe +#if PACKETVER >= 20040920 + parseable_packet(0x0072,18,clif_parse_UseItem,10,14); + parseable_packet(0x007e,25,clif_parse_MoveToKafra,6,21); + parseable_packet(0x0085,9,clif_parse_ActionRequest,3,8); + parseable_packet(0x0089,14,clif_parse_WalkToXY,11); + parseable_packet(0x008c,109,clif_parse_UseSkillToPosMoreInfo,16,20,23,27,29); + parseable_packet(0x0094,19,clif_parse_DropItem,12,17); + parseable_packet(0x009b,10,clif_parse_GetCharNameRequest,6); + parseable_packet(0x00a2,10,clif_parse_SolveCharName,6); + parseable_packet(0x00a7,29,clif_parse_UseSkillToPos,6,20,23,27); + parseable_packet(0x00f3,18,clif_parse_ChangeDir,8,17); + parseable_packet(0x00f5,32,clif_parse_WantToConnection,10,17,23,27,31); + parseable_packet(0x0113,14,clif_parse_TakeItem,10); + parseable_packet(0x0116,14,clif_parse_TickSend,10); + parseable_packet(0x0190,14,clif_parse_UseSkillToId,4,7,10); + parseable_packet(0x0193,12,clif_parse_MoveFromKafra,4,8); +#endif + +// 2004-10-05aSakexe +#if PACKETVER >= 20041005 + parseable_packet(0x0072,17,clif_parse_UseItem,6,13); + parseable_packet(0x007e,16,clif_parse_MoveToKafra,5,12); + parseable_packet(0x0089,6,clif_parse_WalkToXY,3); + parseable_packet(0x008c,103,clif_parse_UseSkillToPosMoreInfo,2,6,17,21,23); + parseable_packet(0x0094,14,clif_parse_DropItem,5,12); + parseable_packet(0x009b,15,clif_parse_GetCharNameRequest,11); + parseable_packet(0x00a2,12,clif_parse_SolveCharName,8); + parseable_packet(0x00a7,23,clif_parse_UseSkillToPos,3,6,17,21); + parseable_packet(0x00f3,13,clif_parse_ChangeDir,5,12); + parseable_packet(0x00f5,33,clif_parse_WantToConnection,12,18,24,28,32); + parseable_packet(0x0113,10,clif_parse_TakeItem,6); + parseable_packet(0x0116,10,clif_parse_TickSend,6); + parseable_packet(0x0190,20,clif_parse_UseSkillToId,7,12,16); + parseable_packet(0x0193,26,clif_parse_MoveFromKafra,10,22); +#endif + +// 2004-10-25aSakexe +#if PACKETVER >= 20041025 + parseable_packet(0x0072,13,clif_parse_UseItem,5,9); + parseable_packet(0x007e,13,clif_parse_MoveToKafra,6,9); + parseable_packet(0x0085,15,clif_parse_ActionRequest,4,14); + parseable_packet(0x008c,108,clif_parse_UseSkillToPosMoreInfo,6,9,23,26,28); + parseable_packet(0x0094,12,clif_parse_DropItem,6,10); + parseable_packet(0x009b,10,clif_parse_GetCharNameRequest,6); + parseable_packet(0x00a2,16,clif_parse_SolveCharName,12); + parseable_packet(0x00a7,28,clif_parse_UseSkillToPos,6,9,23,26); + parseable_packet(0x00f3,15,clif_parse_ChangeDir,6,14); + parseable_packet(0x00f5,29,clif_parse_WantToConnection,5,14,20,24,28); + parseable_packet(0x0113,9,clif_parse_TakeItem,5); + parseable_packet(0x0116,9,clif_parse_TickSend,5); + parseable_packet(0x0190,26,clif_parse_UseSkillToId,4,10,22); + parseable_packet(0x0193,22,clif_parse_MoveFromKafra,12,18); +#endif + +// 2004-11-01aSakexe +#if PACKETVER >= 20041101 + packet(0x0084,-1); + packet(0x0215,6); +#endif + +// 2004-11-08aSakexe +#if PACKETVER >= 20041108 + packet(0x0084,2); + packet(0x0216,6); + parseable_packet(0x0217,2,clif_parse_Blacksmith,0); + parseable_packet(0x0218,2,clif_parse_Alchemist,0); + packet(0x0219,282); + packet(0x021a,282); + packet(0x021b,10); + packet(0x021c,10); +#endif + +// 2004-11-15aSakexe +#if PACKETVER >= 20041115 + parseable_packet(0x021d,6,clif_parse_LessEffect,2); +#endif + +// 2004-11-29aSakexe +#if PACKETVER >= 20041129 + parseable_packet(0x0072,22,clif_parse_UseSkillToId,8,12,18); + parseable_packet(0x007e,30,clif_parse_UseSkillToPos,4,9,22,28); + parseable_packet(0x0085,-1,clif_parse_GlobalMessage,2,4); + parseable_packet(0x0089,7,clif_parse_TickSend,3); + parseable_packet(0x008c,13,clif_parse_GetCharNameRequest,9); + parseable_packet(0x0094,14,clif_parse_MoveToKafra,4,10); + parseable_packet(0x009b,2,clif_parse_CloseKafra,0); + parseable_packet(0x009f,18,clif_parse_ActionRequest,6,17); + parseable_packet(0x00a2,7,clif_parse_TakeItem,3); + parseable_packet(0x00a7,7,clif_parse_WalkToXY,4); + parseable_packet(0x00f3,8,clif_parse_ChangeDir,3,7); + parseable_packet(0x00f5,29,clif_parse_WantToConnection,3,10,20,24,28); + parseable_packet(0x00f7,14,clif_parse_SolveCharName,10); + parseable_packet(0x0113,110,clif_parse_UseSkillToPosMoreInfo,4,9,22,28,30); + parseable_packet(0x0116,12,clif_parse_DropItem,4,10); + parseable_packet(0x0190,15,clif_parse_UseItem,3,11); + parseable_packet(0x0193,21,clif_parse_MoveFromKafra,4,17); + packet(0x0221,-1); + parseable_packet(0x0222,6,clif_parse_WeaponRefine,2); + packet(0x0223,8); +#endif + +// 2004-12-13aSakexe +#if PACKETVER >= 20041213 + //skipped: many packets being set to -1 + packet(0x0066,3); + packet(0x0070,3); + packet(0x01ca,3); + packet(0x021e,6); + packet(0x021f,66); + packet(0x0220,10); +#endif + +// 2005-01-10bSakexe +#if PACKETVER >= 20050110 + parseable_packet(0x0072,26,clif_parse_UseSkillToId,8,16,22); + parseable_packet(0x007e,114,clif_parse_UseSkillToPosMoreInfo,10,18,22,32,34); + parseable_packet(0x0085,23,clif_parse_ChangeDir,12,22); + parseable_packet(0x0089,9,clif_parse_TickSend,5); + parseable_packet(0x008c,8,clif_parse_GetCharNameRequest,4); + parseable_packet(0x0094,20,clif_parse_MoveToKafra,10,16); + parseable_packet(0x009b,32,clif_parse_WantToConnection,3,12,23,27,31); + parseable_packet(0x009f,17,clif_parse_UseItem,5,13); + parseable_packet(0x00a2,11,clif_parse_SolveCharName,7); + parseable_packet(0x00a7,13,clif_parse_WalkToXY,10); + parseable_packet(0x00f3,-1,clif_parse_GlobalMessage,2,4); + parseable_packet(0x00f5,9,clif_parse_TakeItem,5); + parseable_packet(0x00f7,21,clif_parse_MoveFromKafra,11,17); + parseable_packet(0x0113,34,clif_parse_UseSkillToPos,10,18,22,32); + parseable_packet(0x0116,20,clif_parse_DropItem,15,18); + parseable_packet(0x0190,20,clif_parse_ActionRequest,9,19); + parseable_packet(0x0193,2,clif_parse_CloseKafra,0); +#endif + +// 2005-03-28aSakexe +#if PACKETVER >= 20050328 + packet(0x0224,10); + parseable_packet(0x0225,2,clif_parse_Taekwon,0); + packet(0x0226,282); +#endif + +// 2005-04-04aSakexe +#if PACKETVER >= 20050404 + packet(0x0227,18); + packet(0x0228,18); +#endif + +// 2005-04-11aSakexe +#if PACKETVER >= 20050411 + packet(0x0229,15); + packet(0x022a,58); + packet(0x022b,57); + packet(0x022c,64); +#endif + +// 2005-04-25aSakexe +#if PACKETVER >= 20050425 + parseable_packet(0x022d,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0232,9,clif_parse_HomMoveTo,2,6); + parseable_packet(0x0233,11,clif_parse_HomAttack,2,6,10); + parseable_packet(0x0234,6,clif_parse_HomMoveToMaster,2); +#endif + +// 2005-05-09aSakexe +#if PACKETVER >= 20050509 + parseable_packet(0x0072,25,clif_parse_UseSkillToId,6,10,21); + parseable_packet(0x007e,102,clif_parse_UseSkillToPosMoreInfo,5,9,12,20,22); + parseable_packet(0x0085,11,clif_parse_ChangeDir,7,10); + parseable_packet(0x0089,8,clif_parse_TickSend,4); + parseable_packet(0x008c,11,clif_parse_GetCharNameRequest,7); + parseable_packet(0x0094,14,clif_parse_MoveToKafra,7,10); + parseable_packet(0x009b,26,clif_parse_WantToConnection,4,9,17,21,25); + parseable_packet(0x009f,14,clif_parse_UseItem,4,10); + parseable_packet(0x00a2,15,clif_parse_SolveCharName,11); + parseable_packet(0x00a7,8,clif_parse_WalkToXY,5); + parseable_packet(0x00f5,8,clif_parse_TakeItem,4); + parseable_packet(0x00f7,22,clif_parse_MoveFromKafra,14,18); + parseable_packet(0x0113,22,clif_parse_UseSkillToPos,5,9,12,20); + parseable_packet(0x0116,10,clif_parse_DropItem,5,8); + parseable_packet(0x0190,19,clif_parse_ActionRequest,5,18); +#endif + +// 2005-05-23aSakexe +#if PACKETVER >= 20050523 + packet(0x022e,69); + packet(0x0230,12); +#endif + +// 2005-05-30aSakexe +#if PACKETVER >= 20050530 + packet(0x022e,71); + packet(0x0235,-1); + packet(0x0236,10); + parseable_packet(0x0237,2,clif_parse_RankingPk,0); + packet(0x0238,282); +#endif + +// 2005-05-31aSakexe +#if PACKETVER >= 20050531 + packet(0x0216,2); + packet(0x0239,11); +#endif + +// 2005-06-08aSakexe +#if PACKETVER >= 20050608 + packet(0x0216,6); + parseable_packet(0x0217,2,clif_parse_Blacksmith,0); + packet(0x022f,5); + parseable_packet(0x0231,26,clif_parse_ChangeHomunculusName,2); + packet(0x023a,4); + parseable_packet(0x023b,36,clif_parse_StoragePassword,2,4,20); + packet(0x023c,6); +#endif + +// 2005-06-22aSakexe +#if PACKETVER >= 20050622 + packet(0x022e,71); +#endif + +// 2005-06-28aSakexe +#if PACKETVER >= 20050628 + parseable_packet(0x0072,34,clif_parse_UseSkillToId,6,17,30); + parseable_packet(0x007e,113,clif_parse_UseSkillToPosMoreInfo,12,15,18,31,33); + parseable_packet(0x0085,17,clif_parse_ChangeDir,8,16); + parseable_packet(0x0089,13,clif_parse_TickSend,9); + parseable_packet(0x008c,8,clif_parse_GetCharNameRequest,4); + parseable_packet(0x0094,31,clif_parse_MoveToKafra,16,27); + parseable_packet(0x009b,32,clif_parse_WantToConnection,9,15,23,27,31); + parseable_packet(0x009f,19,clif_parse_UseItem,9,15); + parseable_packet(0x00a2,9,clif_parse_SolveCharName,5); + parseable_packet(0x00a7,11,clif_parse_WalkToXY,8); + parseable_packet(0x00f5,13,clif_parse_TakeItem,9); + parseable_packet(0x00f7,18,clif_parse_MoveFromKafra,11,14); + parseable_packet(0x0113,33,clif_parse_UseSkillToPos,12,15,18,31); + parseable_packet(0x0116,12,clif_parse_DropItem,3,10); + parseable_packet(0x0190,24,clif_parse_ActionRequest,11,23); + packet(0x0216,-1); + packet(0x023d,-1); + packet(0x023e,4); +#endif + +// 2005-07-18aSakexe +#if PACKETVER >= 20050718 + parseable_packet(0x0072,19,clif_parse_UseSkillToId,5,11,15); + parseable_packet(0x007e,110,clif_parse_UseSkillToPosMoreInfo,9,15,23,28,30); + parseable_packet(0x0085,11,clif_parse_ChangeDir,6,10); + parseable_packet(0x0089,7,clif_parse_TickSend,3); + parseable_packet(0x008c,11,clif_parse_GetCharNameRequest,7); + parseable_packet(0x0094,21,clif_parse_MoveToKafra,12,17); + parseable_packet(0x009b,31,clif_parse_WantToConnection,3,13,22,26,30); + parseable_packet(0x009f,12,clif_parse_UseItem,3,8); + parseable_packet(0x00a2,18,clif_parse_SolveCharName,14); + parseable_packet(0x00a7,15,clif_parse_WalkToXY,12); + parseable_packet(0x00f5,7,clif_parse_TakeItem,3); + parseable_packet(0x00f7,13,clif_parse_MoveFromKafra,5,9); + parseable_packet(0x0113,30,clif_parse_UseSkillToPos,9,15,23,28); + parseable_packet(0x0116,12,clif_parse_DropItem,6,10); + parseable_packet(0x0190,21,clif_parse_ActionRequest,5,20); + packet(0x0216,6); + parseable_packet(0x023f,2,clif_parse_Mail_refreshinbox,0); + packet(0x0240,8); + parseable_packet(0x0241,6,clif_parse_Mail_read,2); + packet(0x0242,-1); + parseable_packet(0x0243,6,clif_parse_Mail_delete,2); + parseable_packet(0x0244,6,clif_parse_Mail_getattach,2); + packet(0x0245,7); + parseable_packet(0x0246,4,clif_parse_Mail_winopen,2); + parseable_packet(0x0247,8,clif_parse_Mail_setattach,2,4); + packet(0x0248,68); + packet(0x0249,3); + packet(0x024a,70); + parseable_packet(0x024b,4,clif_parse_Auction_cancelreg,2); + parseable_packet(0x024c,8,clif_parse_Auction_setitem,2,4); + packet(0x024d,14); + parseable_packet(0x024e,6,clif_parse_Auction_cancel,2); + parseable_packet(0x024f,10,clif_parse_Auction_bid,2,6); + packet(0x0250,3); + packet(0x0251,2); + packet(0x0252,-1); +#endif + +// 2005-07-19bSakexe +#if PACKETVER >= 20050719 + parseable_packet(0x0072,34,clif_parse_UseSkillToId,6,17,30); + parseable_packet(0x007e,113,clif_parse_UseSkillToPosMoreInfo,12,15,18,31,33); + parseable_packet(0x0085,17,clif_parse_ChangeDir,8,16); + parseable_packet(0x0089,13,clif_parse_TickSend,9); + parseable_packet(0x008c,8,clif_parse_GetCharNameRequest,4); + parseable_packet(0x0094,31,clif_parse_MoveToKafra,16,27); + parseable_packet(0x009b,32,clif_parse_WantToConnection,9,15,23,27,31); + parseable_packet(0x009f,19,clif_parse_UseItem,9,15); + parseable_packet(0x00a2,9,clif_parse_SolveCharName,5); + parseable_packet(0x00a7,11,clif_parse_WalkToXY,8); + parseable_packet(0x00f5,13,clif_parse_TakeItem,9); + parseable_packet(0x00f7,18,clif_parse_MoveFromKafra,11,14); + parseable_packet(0x0113,33,clif_parse_UseSkillToPos,12,15,18,31); + parseable_packet(0x0116,12,clif_parse_DropItem,3,10); + parseable_packet(0x0190,24,clif_parse_ActionRequest,11,23); +#endif + +// 2005-08-01aSakexe +#if PACKETVER >= 20050801 + packet(0x0245,3); + packet(0x0251,4); +#endif + +// 2005-08-08aSakexe +#if PACKETVER >= 20050808 + parseable_packet(0x024d,12,clif_parse_Auction_register,2,6,10); + packet(0x024e,4); +#endif + +// 2005-08-17aSakexe +#if PACKETVER >= 20050817 + packet(0x0253,3); + parseable_packet(0x0254,3,clif_parse_FeelSaveOk,2); +#endif + +// 2005-08-29aSakexe +#if PACKETVER >= 20050829 + packet(0x0240,-1); + parseable_packet(0x0248,-1,clif_parse_Mail_send,2,4,28,68,69); + packet(0x0255,5); + packet(0x0256,-1); + packet(0x0257,8); +#endif + +// 2005-09-12bSakexe +#if PACKETVER >= 20050912 + packet(0x0256,5); + packet(0x0258,2); + packet(0x0259,3); +#endif + +// 2005-10-10aSakexe +#if PACKETVER >= 20051010 + packet(0x020e,32); + packet(0x025a,-1); + parseable_packet(0x025b,6,clif_parse_Cooking,2,4); +#endif + +// 2005-10-13aSakexe +#if PACKETVER >= 20051013 + packet(0x007a,6); + packet(0x0251,32); + parseable_packet(0x025c,4,clif_parse_Auction_buysell,2); +#endif + +// 2005-10-17aSakexe +#if PACKETVER >= 20051017 + packet(0x007a,58); + parseable_packet(0x025d,6,clif_parse_Auction_close,2); + packet(0x025e,4); +#endif + +// 2005-10-24aSakexe +#if PACKETVER >= 20051024 + packet(0x025f,6); + packet(0x0260,6); +#endif + +// 2005-11-07aSakexe +#if PACKETVER >= 20051107 + parseable_packet(0x024e,6,clif_parse_Auction_cancel,2); + parseable_packet(0x0251,34,clif_parse_Auction_search,2,4,8,32); +#endif + +// 2006-01-09aSakexe +#if PACKETVER >= 20060109 + packet(0x0261,11); + packet(0x0262,11); + packet(0x0263,11); + packet(0x0264,20); + packet(0x0265,20); + packet(0x0266,30); + packet(0x0267,4); + packet(0x0268,4); + packet(0x0269,4); + packet(0x026a,4); + packet(0x026b,4); + packet(0x026c,4); + packet(0x026d,4); + packet(0x026f,2); + packet(0x0270,2); + packet(0x0271,38); + packet(0x0272,44); +#endif + +// 2006-01-26aSakexe +#if PACKETVER >= 20060126 + packet(0x0271,40); +#endif + +// 2006-03-06aSakexe +#if PACKETVER >= 20060306 + packet(0x0273,6); + packet(0x0274,8); +#endif + +// 2006-03-13aSakexe +#if PACKETVER >= 20060313 + parseable_packet(0x0273,30,clif_parse_Mail_return,2,6); +#endif + +// 2006-03-27aSakexe +#if PACKETVER >= 20060327 + parseable_packet(0x0072,26,clif_parse_UseSkillToId,11,18,22); + parseable_packet(0x007e,120,clif_parse_UseSkillToPosMoreInfo,5,15,29,38,40); + parseable_packet(0x0085,12,clif_parse_ChangeDir,7,11); + //parseable_packet(0x0089,13,clif_parse_TickSend,9); + parseable_packet(0x008c,12,clif_parse_GetCharNameRequest,8); + parseable_packet(0x0094,23,clif_parse_MoveToKafra,5,19); + parseable_packet(0x009b,37,clif_parse_WantToConnection,9,21,28,32,36); + parseable_packet(0x009f,24,clif_parse_UseItem,9,20); + parseable_packet(0x00a2,11,clif_parse_SolveCharName,7); + parseable_packet(0x00a7,15,clif_parse_WalkToXY,12); + parseable_packet(0x00f5,13,clif_parse_TakeItem,9); + parseable_packet(0x00f7,26,clif_parse_MoveFromKafra,11,22); + parseable_packet(0x0113,40,clif_parse_UseSkillToPos,5,15,29,38); + parseable_packet(0x0116,17,clif_parse_DropItem,8,15); + parseable_packet(0x0190,18,clif_parse_ActionRequest,7,17); +#endif + +// 2006-10-23aSakexe +#if PACKETVER >= 20061023 + packet(0x006d,110); +#endif + +//2006-04-24aSakexe to 2007-01-02aSakexe +#if PACKETVER >= 20060424 + packet(0x023e,8); + packet(0x0277,84); + packet(0x0278,2); + packet(0x0279,2); + packet(0x027a,-1); + packet(0x027b,14); + packet(0x027c,60); + packet(0x027d,62); + packet(0x027e,-1); + packet(0x027f,8); + packet(0x0280,12); + packet(0x0281,4); + packet(0x0282,284); + packet(0x0283,6); + packet(0x0284,14); + packet(0x0285,6); + packet(0x0286,4); + packet(0x0287,-1); + packet(0x0288,6); + packet(0x0289,8); + packet(0x028a,18); + packet(0x028b,-1); + packet(0x028c,46); + packet(0x028d,34); + packet(0x028e,4); + packet(0x028f,6); + packet(0x0290,4); + packet(0x0291,4); + parseable_packet(0x0292,2,clif_parse_AutoRevive,0); + packet(0x0293,70); + packet(0x0294,10); + packet(0x0295,-1); + packet(0x0296,-1); + packet(0x0297,-1); + packet(0x0298,8); + packet(0x0299,6); + packet(0x029a,27); + packet(0x029c,66); + packet(0x029d,-1); + packet(0x029e,11); + parseable_packet(0x029f,3,clif_parse_mercenary_action,2); + packet(0x02a0,-1); + packet(0x02a1,-1); + packet(0x02a2,8); +#endif + +// 2007-01-08aSakexe +#if PACKETVER >= 20070108 + parseable_packet(0x0072,30,clif_parse_UseSkillToId,10,14,26); + parseable_packet(0x007e,120,clif_parse_UseSkillToPosMoreInfo,10,19,23,38,40); + parseable_packet(0x0085,14,clif_parse_ChangeDir,10,13); + parseable_packet(0x0089,11,clif_parse_TickSend,7); + parseable_packet(0x008c,17,clif_parse_GetCharNameRequest,13); + parseable_packet(0x0094,17,clif_parse_MoveToKafra,4,13); + parseable_packet(0x009b,35,clif_parse_WantToConnection,7,21,26,30,34); + parseable_packet(0x009f,21,clif_parse_UseItem,7,17); + parseable_packet(0x00a2,10,clif_parse_SolveCharName,6); + parseable_packet(0x00a7,8,clif_parse_WalkToXY,5); + parseable_packet(0x00f5,11,clif_parse_TakeItem,7); + parseable_packet(0x00f7,15,clif_parse_MoveFromKafra,3,11); + parseable_packet(0x0113,40,clif_parse_UseSkillToPos,10,19,23,38); + parseable_packet(0x0116,19,clif_parse_DropItem,11,17); + parseable_packet(0x0190,10,clif_parse_ActionRequest,4,9); +#endif + +// 2007-01-22aSakexe +#if PACKETVER >= 20070122 + packet(0x02a3,18); + packet(0x02a4,2); +#endif + +// 2007-01-29aSakexe +#if PACKETVER >= 20070129 + packet(0x029b,72); + packet(0x02a3,-1); + packet(0x02a4,-1); + packet(0x02a5,8); +#endif + +// 2007-02-05aSakexe +#if PACKETVER >= 20070205 + packet(0x02aa,4); + packet(0x02ab,36); + packet(0x02ac,6); +#endif + +// 2007-02-12aSakexe +#if PACKETVER >= 20070212 + parseable_packet(0x0072,25,clif_parse_UseSkillToId,6,10,21); + parseable_packet(0x007e,102,clif_parse_UseSkillToPosMoreInfo,5,9,12,20,22); + parseable_packet(0x0085,11,clif_parse_ChangeDir,7,10); + parseable_packet(0x0089,8,clif_parse_TickSend,4); + parseable_packet(0x008c,11,clif_parse_GetCharNameRequest,7); + parseable_packet(0x0094,14,clif_parse_MoveToKafra,7,10); + parseable_packet(0x009b,26,clif_parse_WantToConnection,4,9,17,21,25); + parseable_packet(0x009f,14,clif_parse_UseItem,4,10); + parseable_packet(0x00a2,15,clif_parse_SolveCharName,11); + //parseable_packet(0x00a7,8,clif_parse_WalkToXY,5); + parseable_packet(0x00f5,8,clif_parse_TakeItem,4); + parseable_packet(0x00f7,22,clif_parse_MoveFromKafra,14,18); + parseable_packet(0x0113,22,clif_parse_UseSkillToPos,5,9,12,20); + parseable_packet(0x0116,10,clif_parse_DropItem,5,8); + parseable_packet(0x0190,19,clif_parse_ActionRequest,5,18); +#endif + +// 2007-05-07aSakexe +#if PACKETVER >= 20070507 + parseable_packet(0x01fd,15,clif_parse_RepairItem,2,4,6,7,9,11,13); +#endif + +// 2007-02-27aSakexe to 2007-10-02aSakexe +#if PACKETVER >= 20070227 + parseable_packet(0x0288,10,clif_parse_cashshop_buy,2,4,6); + packet(0x0289,12); + packet(0x02a6,22); + packet(0x02a7,22); + packet(0x02a8,162); + packet(0x02a9,58); + packet(0x02ad,8); + packet(0x02b0,85); + packet(0x02b1,-1); + packet(0x02b2,-1); + packet(0x02b3,107); + packet(0x02b4,6); + packet(0x02b5,-1); + parseable_packet(0x02b6,7,clif_parse_questStateAck,2,6); + packet(0x02b7,7); + packet(0x02b8,22); + packet(0x02b9,191); + parseable_packet(0x02ba,11,clif_parse_Hotkey,2,4,5,9); + packet(0x02bb,8); + packet(0x02bc,6); + packet(0x02bf,10); + packet(0x02c0,2); + packet(0x02c1,-1); + packet(0x02c2,-1); + parseable_packet(0x02c4,26,clif_parse_PartyInvite2,2); + packet(0x02c5,30); + packet(0x02c6,30); + parseable_packet(0x02c7,7,clif_parse_ReplyPartyInvite2,2,6); + parseable_packet(0x02c8,3,clif_parse_PartyTick,2); + packet(0x02c9,3); + packet(0x02ca,3); + packet(0x02cb,20); + packet(0x02cc,4); + packet(0x02cd,26); + packet(0x02ce,10); + packet(0x02cf,6); + packet(0x02d0,-1); + packet(0x02d1,-1); + packet(0x02d2,-1); + ack_packet(ZC_NOTIFY_BIND_ON_EQUIP,0x02d3,4,2); + packet(0x02d4,29); + packet(0x02d5,2); + parseable_packet(0x02d6,6,clif_parse_ViewPlayerEquip,2); + packet(0x02d7,-1); + parseable_packet(0x02d8,10,clif_parse_EquipTick,2,6); + packet(0x02d9,10); + packet(0x02da,3); + parseable_packet(0x02db,-1,clif_parse_BattleChat,2,4); + packet(0x02dc,-1); + packet(0x02dd,32); + packet(0x02de,6); + packet(0x02df,36); + packet(0x02e0,34); +#endif + +// 2007-10-23aSakexe +#if PACKETVER >= 20071023 + packet(0x02cb,65); + packet(0x02cd,71); +#endif + +// 2007-11-06aSakexe +#if PACKETVER >= 20071106 + packet(0x0078,55); + packet(0x007c,42); + packet(0x022c,65); + packet(0x029b,80); +#endif + +// 2007-11-13aSakexe +#if PACKETVER >= 20071113 + packet(0x02e1,33); +#endif + +// 2007-11-20aSakexe +#if PACKETVER >= 20071120 + //packet(0x01df,10 <- ???); + packet(0x02e2,14); + packet(0x02e3,25); + packet(0x02e4,8); + packet(0x02e5,8); + packet(0x02e6,6); +#endif + +// 2007-11-27aSakexe +#if PACKETVER >= 20071127 + packet(0x02e7,-1); +#endif + +// 2008-01-02aSakexe +#if PACKETVER >= 20080102 + parseable_packet(0x01df,6,clif_parse_GMReqAccountName,2); + packet(0x02e8,-1); + packet(0x02e9,-1); + packet(0x02ea,-1); + packet(0x02eb,13); + packet(0x02ec,67); + packet(0x02ed,59); + packet(0x02ee,60); + packet(0x02ef,8); +#endif + +// 2008-03-18aSakexe +#if PACKETVER >= 20080318 + packet(0x02bf,-1); + packet(0x02c0,-1); + packet(0x02f0,10); + parseable_packet(0x02f1,2,clif_parse_progressbar,0); + packet(0x02f2,2); +#endif + +// 2008-03-25bSakexe +#if PACKETVER >= 20080325 + packet(0x02f3,-1); + packet(0x02f4,-1); + packet(0x02f5,-1); + packet(0x02f6,-1); + packet(0x02f7,-1); + packet(0x02f8,-1); + packet(0x02f9,-1); + packet(0x02fa,-1); + packet(0x02fb,-1); + packet(0x02fc,-1); + packet(0x02fd,-1); + packet(0x02fe,-1); + packet(0x02ff,-1); + packet(0x0300,-1); +#endif + +// 2008-04-01aSakexe +#if PACKETVER >= 20080401 + packet(0x0301,-1); + packet(0x0302,-1); + packet(0x0303,-1); + packet(0x0304,-1); + packet(0x0305,-1); + packet(0x0306,-1); + packet(0x0307,-1); + packet(0x0308,-1); + packet(0x0309,-1); + packet(0x030a,-1); + packet(0x030b,-1); + packet(0x030c,-1); + packet(0x030d,-1); + packet(0x030e,-1); + packet(0x030f,-1); + packet(0x0310,-1); + packet(0x0311,-1); + packet(0x0312,-1); + packet(0x0313,-1); + packet(0x0314,-1); + packet(0x0315,-1); + packet(0x0316,-1); + packet(0x0317,-1); + packet(0x0318,-1); + packet(0x0319,-1); + packet(0x031a,-1); + packet(0x031b,-1); + packet(0x031c,-1); + packet(0x031d,-1); + packet(0x031e,-1); + packet(0x031f,-1); + packet(0x0320,-1); + packet(0x0321,-1); + packet(0x0322,-1); + packet(0x0323,-1); + packet(0x0324,-1); + packet(0x0325,-1); + packet(0x0326,-1); + packet(0x0327,-1); + packet(0x0328,-1); + packet(0x0329,-1); + packet(0x032a,-1); + packet(0x032b,-1); + packet(0x032c,-1); + packet(0x032d,-1); + packet(0x032e,-1); + packet(0x032f,-1); + packet(0x0330,-1); + packet(0x0331,-1); + packet(0x0332,-1); + packet(0x0333,-1); + packet(0x0334,-1); + packet(0x0335,-1); + packet(0x0336,-1); + packet(0x0337,-1); + packet(0x0338,-1); + packet(0x0339,-1); + packet(0x033a,-1); + packet(0x033b,-1); + packet(0x033c,-1); + packet(0x033d,-1); + packet(0x033e,-1); + packet(0x033f,-1); + packet(0x0340,-1); + packet(0x0341,-1); + packet(0x0342,-1); + packet(0x0343,-1); + packet(0x0344,-1); + packet(0x0345,-1); + packet(0x0346,-1); + packet(0x0347,-1); + packet(0x0348,-1); + packet(0x0349,-1); + packet(0x034a,-1); + packet(0x034b,-1); + packet(0x034c,-1); + packet(0x034d,-1); + packet(0x034e,-1); + packet(0x034f,-1); + packet(0x0350,-1); + packet(0x0351,-1); + packet(0x0352,-1); + packet(0x0353,-1); + packet(0x0354,-1); + packet(0x0355,-1); + packet(0x0356,-1); + packet(0x0357,-1); + packet(0x0358,-1); + packet(0x0359,-1); + packet(0x035a,-1); +#endif + +// 2008-05-27aSakexe +#if PACKETVER >= 20080527 + packet(0x035b,-1); + packet(0x035c,2); + packet(0x035d,-1); + packet(0x035e,2); + packet(0x035f,-1); + packet(0x0389,-1); +#endif + +// 2008-08-20aSakexe +#if PACKETVER >= 20080820 + packet(0x040c,-1); + packet(0x040d,-1); + packet(0x040e,-1); + packet(0x040f,-1); + packet(0x0410,-1); + packet(0x0411,-1); + packet(0x0412,-1); + packet(0x0413,-1); + packet(0x0414,-1); + packet(0x0415,-1); + packet(0x0416,-1); + packet(0x0417,-1); + packet(0x0418,-1); + packet(0x0419,-1); + packet(0x041a,-1); + packet(0x041b,-1); + packet(0x041c,-1); + packet(0x041d,-1); + packet(0x041e,-1); + packet(0x041f,-1); + packet(0x0420,-1); + packet(0x0421,-1); + packet(0x0422,-1); + packet(0x0423,-1); + packet(0x0424,-1); + packet(0x0425,-1); + packet(0x0426,-1); + packet(0x0427,-1); + packet(0x0428,-1); + packet(0x0429,-1); + packet(0x042a,-1); + packet(0x042b,-1); + packet(0x042c,-1); + packet(0x042d,-1); + packet(0x042e,-1); + packet(0x042f,-1); + packet(0x0430,-1); + packet(0x0431,-1); + packet(0x0432,-1); + packet(0x0433,-1); + packet(0x0434,-1); + packet(0x0435,-1); +#endif + +// 2008-09-10aSakexe +#if PACKETVER >= 20080910 + parseable_packet(0x0436,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0437,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0438,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0439,8,clif_parse_UseItem,2,4); +#endif + +// 2008-11-13aSakexe +#if PACKETVER >= 20081113 + packet(0x043d,8); + packet(0x043e,-1); + packet(0x043f,8); +#endif + +// 2008-11-26aSakexe +#if PACKETVER >= 20081126 + packet(0x01a2,37); + packet(0x0440,10); + packet(0x0441,4); +#endif + +// 2008-12-10aSakexe +#if PACKETVER >= 20081210 + packet(0x0442,-1); + parseable_packet(0x0443,8,clif_parse_SkillSelectMenu,2,6); +#endif + +// 2009-01-14aSakexe +#if PACKETVER >= 20090114 + packet(0x043f,25); + packet(0x0444,-1); + packet(0x0445,10); +#endif + +// 2009-02-18aSakexe +#if PACKETVER >= 20090218 + packet(0x0446,14); +#endif + +// 2009-02-25aSakexe +#if PACKETVER >= 20090225 + packet(0x0448,-1); +#endif + +// 2009-03-30aSakexe +#if PACKETVER >= 20090330 + packet(0x0449,4); +#endif + +// 2009-04-08aSakexe +#if PACKETVER >= 20090408 + packet(0x02a6,-1); + packet(0x02a7,-1); + parseable_packet(0x044a,6,clif_parse_client_version,2); +#endif + +// Renewal Clients +// 2008-08-27aRagexeRE +#if PACKETVER >= 20080827 + parseable_packet(0x0072,22,clif_parse_UseSkillToId,9,15,18); + packet(0x007c,44); + parseable_packet(0x007e,105,clif_parse_UseSkillToPosMoreInfo,10,14,18,23,25); + parseable_packet(0x0085,10,clif_parse_ChangeDir,4,9); + parseable_packet(0x0089,11,clif_parse_TickSend,7); + parseable_packet(0x008c,14,clif_parse_GetCharNameRequest,10); + parseable_packet(0x0094,19,clif_parse_MoveToKafra,3,15); + parseable_packet(0x009b,34,clif_parse_WantToConnection,7,15,25,29,33); + parseable_packet(0x009f,20,clif_parse_UseItem,7,20); + parseable_packet(0x00a2,14,clif_parse_SolveCharName,10); + parseable_packet(0x00a7,9,clif_parse_WalkToXY,6); + parseable_packet(0x00f5,11,clif_parse_TakeItem,7); + parseable_packet(0x00f7,17,clif_parse_MoveFromKafra,3,13); + parseable_packet(0x0113,25,clif_parse_UseSkillToPos,10,14,18,23); + parseable_packet(0x0116,17,clif_parse_DropItem,6,15); + parseable_packet(0x0190,23,clif_parse_ActionRequest,9,22); + packet(0x02e2,20); + packet(0x02e3,22); + packet(0x02e4,11); + packet(0x02e5,9); +#endif + +// 2008-09-10aRagexeRE +#if PACKETVER >= 20080910 + parseable_packet(0x0436,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0437,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0438,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0439,8,clif_parse_UseItem,2,4); +#endif + +// 2008-11-12aRagexeRE +#if PACKETVER >= 20081112 + packet(0x043d,8); + //packet(0x043e,-1); + packet(0x043f,8); +#endif + +// 2008-12-17aRagexeRE +#if PACKETVER >= 20081217 + packet(0x01a2,37); + //packet(0x0440,10); + //packet(0x0441,4); + //packet(0x0442,8); + //packet(0x0443,8); +#endif + +// 2008-12-17bRagexeRE +#if PACKETVER >= 20081217 + packet(0x006d,114); +#endif + +// 2009-01-21aRagexeRE +#if PACKETVER >= 20090121 + packet(0x043f,25); + //packet(0x0444,-1); + //packet(0x0445,10); +#endif + +// 2009-02-18aRagexeRE +#if PACKETVER >= 20090218 + //packet(0x0446,14); +#endif + +// 2009-02-26cRagexeRE +#if PACKETVER >= 20090226 + //packet(0x0448,-1); +#endif + +// 2009-04-01aRagexeRE +#if PACKETVER >= 20090401 + //packet(0x0449,4); +#endif + +// 2009-05-14aRagexeRE +#if PACKETVER >= 20090514 + //packet(0x044b,2); +#endif + +// 2009-05-20aRagexeRE +#if PACKETVER >= 20090520 + //packet(0x07d0,6); + //packet(0x07d1,2); + //packet(0x07d2,-1); + //packet(0x07d3,4); + //packet(0x07d4,4); + //packet(0x07d5,4); + //packet(0x07d6,4); + //packet(0x0447,2); +#endif + +// 2009-06-03aRagexeRE +#if PACKETVER >= 20090603 + parseable_packet(0x07d7,8,clif_parse_PartyChangeOption,2,6,7); + packet(0x07d8,8); + packet(0x07d9,254); + parseable_packet(0x07da,6,clif_parse_PartyChangeLeader,2); +#endif + +// 2009-06-10aRagexeRE +#if PACKETVER >= 20090610 + //packet(0x07db,8); +#endif + +// 2009-06-17aRagexeRE +#if PACKETVER >= 20090617 + packet(0x07d9,268); + //packet(0x07dc,6); + //packet(0x07dd,54); + //packet(0x07de,30); + //packet(0x07df,54); +#endif + +// 2009-07-01aRagexeRE +#if PACKETVER >= 20090701 + //packet(0x0275,37); + //packet(0x0276,-1); +#endif + +// 2009-07-08aRagexeRE +#if PACKETVER >= 20090708 + //packet(0x07e0,58); +#endif + +// 2009-07-15aRagexeRE +#if PACKETVER >= 20090715 + packet(0x07e1,15); +#endif + +// 2009-08-05aRagexeRE +#if PACKETVER >= 20090805 + packet(0x07e2,8); +#endif + +// 2009-08-18aRagexeRE +#if PACKETVER >= 20090818 + packet(0x07e3,6); + parseable_packet(0x07e4,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + packet(0x07e6,8); +#endif + +// 2009-08-25aRagexeRE +#if PACKETVER >= 20090825 + //packet(0x07e6,28); + packet(0x07e7,5); +#endif + +// 2009-09-22aRagexeRE +#if PACKETVER >= 20090922 + packet(0x07e5,8); + packet(0x07e6,8); + packet(0x07e7,32); + packet(0x07e8,-1); + packet(0x07e9,5); +#endif + +// 2009-09-29aRagexeRE +#if PACKETVER >= 20090929 + //packet(0x07ea,2); + //packet(0x07eb,-1); + //packet(0x07ec,6); + //packet(0x07ed,8); + //packet(0x07ee,6); + //packet(0x07ef,8); + //packet(0x07f0,4); + //packet(0x07f2,4); + //packet(0x07f3,3); +#endif + +// 2009-10-06aRagexeRE +#if PACKETVER >= 20091006 + //packet(0x07ec,8); + //packet(0x07ed,10); + //packet(0x07f0,8); + //packet(0x07f1,15); + //packet(0x07f2,6); + //packet(0x07f3,4); + //packet(0x07f4,3); +#endif + +// 2009-10-27aRagexeRE +#if PACKETVER >= 20091027 + parseable_packet(0x07f5,6,clif_parse_GMFullStrip,2); + packet(0x07f6,14); +#endif + +// 2009-11-03aRagexeRE +#if PACKETVER >= 20091103 + packet(0x07f7,-1); + packet(0x07f8,-1); + packet(0x07f9,-1); +#endif + +// 2009-11-17aRagexeRE +#if PACKETVER >= 20091117 + packet(0x07fa,8); +#endif + +// 2009-11-24aRagexeRE +#if PACKETVER >= 20091124 + packet(0x07fb,25); +#endif + +// 2009-12-01aRagexeRE +#if PACKETVER >= 20091201 + packet(0x07fc,10); + ack_packet(ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN,0x07fd,-1,0); + packet(0x07fe,26); + //packet(0x07ff,-1); +#endif + +// 2009-12-15aRagexeRE +#if PACKETVER >= 20091215 + packet(0x0800,-1); + //packet(0x0801,-1); +#endif + +// 2009-12-22aRagexeRE +#if PACKETVER >= 2009122 + parseable_packet(0x0802,18,clif_parse_PartyBookingRegisterReq,2,4,6); // Booking System + packet(0x0803,4); + packet(0x0804,8); // Booking System + packet(0x0805,-1); + parseable_packet(0x0806,4,clif_parse_PartyBookingDeleteReq,2); // Booking System + //packet(0x0807,2); + packet(0x0808,4); // Booking System + //packet(0x0809,14); + //packet(0x080A,50); + //packet(0x080B,18); + //packet(0x080C,6); +#endif + +// 2009-12-29aRagexeRE +#if PACKETVER >= 20091229 + parseable_packet(0x0804,14,clif_parse_PartyBookingSearchReq,2,4,6,8,12); // Booking System + parseable_packet(0x0806,2,clif_parse_PartyBookingDeleteReq,0); // Booking System + packet(0x0807,4); + parseable_packet(0x0808,14,clif_parse_PartyBookingUpdateReq,2); // Booking System + packet(0x0809,50); + packet(0x080A,18); + packet(0x080B,6); // Booking System +#endif + +// 2010-01-05aRagexeRE +#if PACKETVER >= 20100105 + parseable_packet(0x0801,-1,clif_parse_PurchaseReq2,2,4,8,12); +#endif + +// 2010-01-26aRagexeRE +#if PACKETVER >= 20100126 + //packet(0x080C,2); + //packet(0x080D,3); + packet(0x080E,14); +#endif + +// 2010-02-09aRagexeRE +#if PACKETVER >= 20100209 + //packet(0x07F0,6); +#endif + +// 2010-02-23aRagexeRE +#if PACKETVER >= 20100223 + packet(0x080F,20); +#endif + +// 2010-03-03aRagexeRE +#if PACKETVER >= 20100303 + packet(0x0810,3); + parseable_packet(0x0811,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + //packet(0x0812,86); + //packet(0x0813,6); + //packet(0x0814,6); + //packet(0x0815,-1); + //packet(0x0817,-1); + //packet(0x0818,6); + //packet(0x0819,4); +#endif + +// 2010-03-09aRagexeRE +#if PACKETVER >= 20100309 + packet(0x0813,-1); + //packet(0x0814,2); + //packet(0x0815,6); + packet(0x0816,6); + packet(0x0818,-1); + //packet(0x0819,10); + //packet(0x081A,4); + //packet(0x081B,4); + //packet(0x081C,6); + packet(0x081d,22); + packet(0x081e,8); +#endif + +// 2010-03-23aRagexeRE +#if PACKETVER >= 20100323 + //packet(0x081F,-1); +#endif + +// 2010-04-06aRagexeRE +#if PACKETVER >= 20100406 + //packet(0x081A,6); +#endif + +// 2010-04-13aRagexeRE +#if PACKETVER >= 20100413 + //packet(0x081A,10); + packet(0x0820,11); + //packet(0x0821,2); + //packet(0x0822,9); + //packet(0x0823,-1); +#endif + +// 2010-04-14dRagexeRE +#if PACKETVER >= 20100414 + //packet(0x081B,8); +#endif + +// 2010-04-20aRagexeRE +#if PACKETVER >= 20100420 + packet(0x0812,8); + packet(0x0814,86); + parseable_packet(0x0815,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0817,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0819,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + packet(0x081a,4); + packet(0x081b,10); + packet(0x081c,10); + packet(0x0824,6); +#endif + +// 2010-06-01aRagexeRE +#if PACKETVER >= 20100601 + //packet(0x0825,-1); + //packet(0x0826,4); + parseable_packet(0x0835,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + packet(0x0836,-1); + packet(0x0837,3); + //packet(0x0838,3); +#endif + +// 2010-06-08aRagexeRE +#if PACKETVER >= 20100608 + parseable_packet(0x0838,2,clif_parse_SearchStoreInfoNextPage,0); + packet(0x083A,4); // Search Stalls Feature + parseable_packet(0x083B,2,clif_parse_CloseSearchStoreInfo,0); + parseable_packet(0x083C,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + packet(0x083D,6); +#endif + +// 2010-06-15aRagexeRE +#if PACKETVER >= 20100615 + //packet(0x083E,26); +#endif + +// 2010-06-22aRagexeRE +#if PACKETVER >= 20100622 + //packet(0x083F,22); +#endif + +// 2010-06-29aRagexeRE +#if PACKETVER >= 20100629 + ack_packet(ZC_WEAR_EQUIP_ACK,0x00AA,9,2,4,6,8); + //packet(0x07F1,18); + //packet(0x07F2,8); + //packet(0x07F3,6); +#endif + +// 2010-07-01aRagexeRE +#if PACKETVER >= 20100701 + packet(0x083A,5); // Search Stalls Feature +#endif + +// 2010-07-13aRagexeRE +#if PACKETVER >= 20100713 + //packet(0x0827,6); + //packet(0x0828,14); + //packet(0x0829,6); + //packet(0x082A,10); + //packet(0x082B,6); + //packet(0x082C,14); + //packet(0x0840,-1); + //packet(0x0841,19); +#endif + +// 2010-07-14aRagexeRE +#if PACKETVER >= 20100714 + //packet(0x0841,4); +#endif + +// 2010-08-03aRagexeRE +#if PACKETVER >= 20100803 + packet(0x0839,66); + parseable_packet(0x0842,6,clif_parse_GMRecall2,2); + parseable_packet(0x0843,6,clif_parse_GMRemove2,2); +#endif + +// 2010-11-24aRagexeRE +#if PACKETVER >= 20101124 + parseable_packet(0x0288,-1,clif_parse_cashshop_buy,2,4,8,10); + parseable_packet(0x0436,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x035f,5,clif_parse_WalkToXY,2); + parseable_packet(0x0360,6,clif_parse_TickSend,2); + parseable_packet(0x0361,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0362,6,clif_parse_TakeItem,2); + parseable_packet(0x0363,6,clif_parse_DropItem,2,4); + parseable_packet(0x0364,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0365,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0366,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0367,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0369,6,clif_parse_SolveCharName,2); + packet(0x0856,-1); + packet(0x0857,-1); + packet(0x0858,-1); + packet(0x0859,-1); + ack_packet(ZC_WEAR_EQUIP_ACK,0x08d0,9,2,4,6,8); +#endif + +// 2011-10-05aRagexeRE +#if PACKETVER >= 20111005 + parseable_packet(0x0364,5,clif_parse_WalkToXY,2); + parseable_packet(0x0817,6,clif_parse_TickSend,2); + parseable_packet(0x0366,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0815,6,clif_parse_TakeItem,2); + parseable_packet(0x0885,6,clif_parse_DropItem,2,4); + parseable_packet(0x0893,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0897,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0369,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x08ad,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x088a,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0838,6,clif_parse_SolveCharName,2); + parseable_packet(0x0439,8,clif_parse_UseItem,2,4); + packet(0x08d2,10); + packet(0x08d1,7); + parseable_packet(0x0846,4,clif_parse_CashShopReqTab,2); //2011-07-18 +#endif + +// 2011-11-02aRagexe +#if PACKETVER >= 20111102 + parseable_packet(0x0436,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0898,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0281,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x088d,26,clif_parse_PartyInvite2,2); + parseable_packet(0x083c,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x08aa,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x02c4,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0811,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + packet(0x0890,8); + parseable_packet(0x08a5,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0835,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x089b,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x08a1,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x089e,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x08ab,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x088b,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x08a2,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + packet(0x08cf,10); //Amulet spirits +#endif + +// 2012-03-07fRagexeRE +#if PACKETVER >= 20120307 + parseable_packet(0x086A,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0887,6,clif_parse_TickSend,2); + parseable_packet(0x0890,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0865,6,clif_parse_TakeItem,2); + parseable_packet(0x02C4,6,clif_parse_DropItem,2,4); + parseable_packet(0x093B,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0963,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0863,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0861,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0929,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0885,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0889,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0870,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + //parseable_packet(0x0926,41,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0884,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0439,8,clif_parse_UseItem,2,4); + parseable_packet(0x0365,41,clif_parse_PartyBookingRegisterReq,2,4,6); + // New Packet + packet(0x090F,-1); // ZC_NOTIFY_NEWENTRY7 + packet(0x0914,-1); // ZC_NOTIFY_MOVEENTRY8 + packet(0x0915,-1); // ZC_NOTIFY_STANDENTRY9 +#endif + +// 2012-04-10aRagexeRE +#if PACKETVER >= 20120410 + parseable_packet(0x01fd,15,clif_parse_RepairItem,2,4,6,7,9,11,13); + parseable_packet(0x089c,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0885,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0961,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0288,-1,clif_parse_cashshop_buy,2,4,8,10); + parseable_packet(0x091c,26,clif_parse_PartyInvite2,2); + parseable_packet(0x094b,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0439,8,clif_parse_UseItem,2,4); + parseable_packet(0x0945,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0886,6,clif_parse_TickSend,2); + parseable_packet(0x0871,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0938,6,clif_parse_TakeItem,2); + parseable_packet(0x0891,6,clif_parse_DropItem,2,4); + parseable_packet(0x086c,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a6,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0889,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0884,6,clif_parse_SolveCharName,2); + packet(0x08e6,4); + parseable_packet(0x08e7,10,clif_parse_PartyBookingSearchReq,2,4,6,8,12); + packet(0x08e8,-1); + parseable_packet(0x08e9,2,clif_parse_PartyBookingDeleteReq,0); + packet(0x08ea,4); + parseable_packet(0x08eb,39,clif_parse_PartyBookingUpdateReq,2); + packet(0x08ec,73); + packet(0x08ed,43); + packet(0x08ee,6); + parseable_packet(0x08ef,6,NULL,2); + packet(0x08f0,6); + parseable_packet(0x08f1,6,NULL,2); + packet(0x08f2,36); + packet(0x08f3,-1); + packet(0x08f4,6); + parseable_packet(0x08f5,-1,NULL,2,4); + packet(0x08f6,22); + packet(0x08f7,3); + packet(0x08f8,7); + packet(0x08f9,6); + packet(0x08fa,6); + parseable_packet(0x08fb,6,NULL,2); + parseable_packet(0x0907,5,clif_parse_MoveItem,2,4); + packet(0x0908,5); + parseable_packet(0x08d7,28,NULL,2,4); + packet(0x0977,14); //Monster HP Bar + parseable_packet(0x0916,26,clif_parse_GuildInvite2,2); + parseable_packet(0x091d,41,clif_parse_PartyBookingRegisterReq,2,4,6); + ack_packet(ZC_PERSONAL_INFOMATION,0x08cb,10,2,4,6,8,10,11,13,15); //Still need further information + // Merge Item + ack_packet(ZC_MERGE_ITEM_OPEN,0x096D,-1,2,4); // ZC_MERGE_ITEM_OPEN + parseable_packet(0x096E,-1,clif_parse_merge_item_req,2,4); // CZ_REQ_MERGE_ITEM + ack_packet(ZC_ACK_MERGE_ITEM,0x096F,7,2,4,6); // ZC_ACK_MERGE_ITEM + parseable_packet(0x0974,2,clif_parse_merge_item_cancel,0); // CZ_CANCEL_MERGE_ITEM + parseable_packet(0x0844,2,clif_parse_cashshop_open_request,0); + packet(0x0849,16); //clif_cashshop_result + parseable_packet(0x0848,-1,clif_parse_cashshop_buy,2,6,4,10); + parseable_packet(0x084a,2,clif_parse_cashshop_close,0); + parseable_packet(0x08c9,2,clif_parse_cashshop_list_request,0); +#endif + +// 2012-04-18aRagexeRE [Special Thanks to Judas!] +#if PACKETVER >= 20120418 + parseable_packet(0x023B,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x08A8,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x08E5,41,clif_parse_PartyBookingRegisterReq,2,4,6); //Added to prevent disconnections + packet(0x08d2,10); +#endif + +// 2012-06-18 +#if PACKETVER >= 20120618 + packet(0x0983,29); // ZC_MSG_STATE_CHANGE3 + parseable_packet(0x0861,41,clif_parse_PartyBookingRegisterReq,2,4,6); //actually 12-05-03 +#endif + +// 2012-07-02aRagexeRE (unstable) +#if PACKETVER >= 20120702 + parseable_packet(0x0363,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0364,6,clif_parse_TickSend,2); + parseable_packet(0x085a,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0861,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0862,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0863,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0886,6,clif_parse_SolveCharName,2); + parseable_packet(0x0889,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x089e,6,clif_parse_DropItem,2,4); + parseable_packet(0x089f,6,clif_parse_TakeItem,2); + parseable_packet(0x08a0,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x094a,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0953,5,clif_parse_WalkToXY,2); + parseable_packet(0x0960,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0879,41,clif_parse_PartyBookingRegisterReq,2,4,6); +#endif + +// 2013-03-20Ragexe (Judas) +#if PACKETVER >= 20130320 + parseable_packet(0x014f,6,clif_parse_GuildRequestInfo,2); + parseable_packet(0x01fd,15,clif_parse_RepairItem,2,4,6,7,9,11,13); + //parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035f,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0363,6,clif_parse_TickSend,2); + parseable_packet(0x0365,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0438,6,clif_parse_DropItem,2,4); + parseable_packet(0x0447,2,clif_parse_blocking_playcancel,0); // CZ_BLOCKING_PLAY_CANCEL + parseable_packet(0x044A,6,clif_parse_client_version,2); + parseable_packet(0x0844,2,clif_parse_cashshop_open_request,0); + packet(0x0849,16); //clif_cashshop_result + parseable_packet(0x0848,-1,clif_parse_cashshop_buy,2,6,4,10); + parseable_packet(0x084a,2,clif_parse_cashshop_close,0); + packet(0x084b,19); //fallitem4 + parseable_packet(0x085a,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x085d,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0868,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x086d,26,clif_parse_PartyInvite2,2); + parseable_packet(0x086f,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0874,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0881,5,clif_parse_WalkToXY,2); + parseable_packet(0x0886,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0888,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x088e,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0897,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0898,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x089b,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x08ac,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08c9,2,clif_parse_cashshop_list_request,0); + packet(0x08cf,10); //Amulet spirits + packet(0x08d2,10); + parseable_packet(0x0907,5,clif_parse_MoveItem,2,4); + packet(0x0908,5); + parseable_packet(0x0922,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + //parseable_packet(0x092e,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0933,6,clif_parse_TakeItem,2); + parseable_packet(0x0938,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x093f,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0947,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x094c,6,clif_parse_SolveCharName,2); + parseable_packet(0x094e,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0959,10,clif_parse_UseSkillToPos,2,4,6,8); + //parseable_packet(0x095a,8,clif_parse_Mail_setattach,2,4); + packet(0x0977,14); //Monster HP Bar + parseable_packet(0x0978,6,clif_parse_reqworldinfo,2); + packet(0x0979,50); //ackworldinfo + ack_packet(ZC_PERSONAL_INFOMATION,0x097b,16,2,4,8,12,16,17,21,25); //Still need further information + //ack_packet(ZC_PERSONAL_INFOMATION_CHN,0x0981,12,2,4,6,8,12,13,15,17,10); // Disabled until further information is found. + packet(0x0990,31); //additem + packet(0x0991,-1); //inv itemlist normal + packet(0x0992,-1); //inv itemlist equip + packet(0x0993,-1); //cart itemlist normal + packet(0x0994,-1); //cart itemlist equip + packet(0x0995,-1); //store itemlist normal + packet(0x0996,-1); //store itemlist equip + packet(0x0997,-1); //ZC_EQUIPWIN_MICROSCOPE_V5 + parseable_packet(0x0998,8,clif_parse_EquipItem,2,4); // CZ_REQ_WEAR_EQUIP_V5 + ack_packet(ZC_WEAR_EQUIP_ACK,0x0999,11,2,4,8,10); // cz_wear_equipv5 + packet(0x099a,9); // take_off_equipv5 + packet(0x099b,8); //maptypeproperty2 + // New Packets + packet(0x08C8,34); // ZC_NOTIFY_ACT3 + packet(0x08ff,24); // ZC_EFST_SET_ENTER + packet(0x0984,28); // ZC_EFST_SET_ENTER2 + packet(0x099f,22); // ZC_SKILL_ENTRY4 +#endif + +// 2013-06-05Ragexe +#if PACKETVER >= 20130605 + parseable_packet(0x097C,4,clif_parse_ranklist,2); +#endif + +// 2013-07-10Ragexe +#if PACKETVER >= 20130710 + parseable_packet(0x0848,-1,clif_parse_cashshop_buy,2,6,4,10); + packet(0x097D,288); //ZC_ACK_RANKING +#endif + +// 2013-07-17Ragexe +#if PACKETVER >= 20130717 + ack_packet(ZC_BANKING_CHECK,0x09A6,12,2,10); + parseable_packet(0x09A7,10,clif_parse_BankDeposit,2,6); + ack_packet(ZC_ACK_BANKING_DEPOSIT,0x09A8,16,2,4,12); + parseable_packet(0x09A9,10,clif_parse_BankWithdraw,2,6); + ack_packet(ZC_ACK_BANKING_WITHDRAW,0x09AA,16,2,4,12); + parseable_packet(0x09AB,6,clif_parse_BankCheck,2); + parseable_packet(0x09B6,6,clif_parse_BankOpen,2); + ack_packet(ZC_ACK_OPEN_BANKING,0x09B7,4,2); + parseable_packet(0x09B8,6,clif_parse_BankClose,2); + ack_packet(ZC_ACK_CLOSE_BANKING,0x09B9,4,2); +#endif + +// 2013-07-31cRagexe +#if PACKETVER >= 20130731 + packet(0x09ca,23); // ZC_SKILL_ENTRY5 + packet(0x09cb,17); // ZC_USE_SKILL2 +#endif + +// 2013-08-07Ragexe +#if PACKETVER >= 20130807 + ack_packet(ZC_C_MARKERINFO,0x09C1,10,2,6,8); + // Merge Item + ack_packet(ZC_MERGE_ITEM_OPEN,0x096D,-1,2,4); // ZC_MERGE_ITEM_OPEN + parseable_packet(0x096E,-1,clif_parse_merge_item_req,2,4); // CZ_REQ_MERGE_ITEM + ack_packet(ZC_ACK_MERGE_ITEM,0x096F,7,2,4,6,7); // ZC_ACK_MERGE_ITEM + parseable_packet(0x0974,2,clif_parse_merge_item_cancel,0); // CZ_CANCEL_MERGE_ITEM +#endif + +// 2013-12-23Ragexe +#if PACKETVER >= 20131223 + //New Packets + //packet(0x097E,12); //ZC_UPDATE_RANKING_POINT + parseable_packet(0x09CE,102,clif_parse_GM_Item_Monster,2); + parseable_packet(0x09D4,2,clif_parse_NPCShopClosed,0); + //NPC Market + packet(0x09D5,-1); + parseable_packet(0x09D6,-1,clif_parse_NPCMarketPurchase,2,4,6); + packet(0x09D7,-1); + parseable_packet(0x09D8,2,clif_parse_NPCMarketClosed,0); + // Clan System + packet(0x0988,6); + packet(0x0989,2); + packet(0x098A,-1); + parseable_packet(0x098D,-1,clif_parse_clan_chat,2,4); + packet(0x098E,-1); + // Sale + parseable_packet(0x09AC,-1,clif_parse_sale_search,2,4,8); + packet(0x09AD,8); + parseable_packet(0x09AE,17,clif_parse_sale_add,2,6,8,12,16); + packet(0x09AF,4); + parseable_packet(0x09B0,8,clif_parse_sale_remove,2,6); + packet(0x09B1,4); + packet(0x09B2,8); + packet(0x09B3,4); + parseable_packet(0x09B4,6,clif_parse_sale_open,2); + parseable_packet(0x09BC,6,clif_parse_sale_close,2); + parseable_packet(0x09C3,8,clif_parse_sale_refresh,2,6); + packet(0x09C4,8); + // New Packet + packet(0x097A,-1); // ZC_ALL_QUEST_LIST2 + packet(0x09DB,-1); // ZC_NOTIFY_MOVEENTRY10 + packet(0x09DC,-1); // ZC_NOTIFY_NEWENTRY10 + packet(0x09DD,-1); // ZC_NOTIFY_STANDENTRY10 + packet(0x09DF,7); // ZC_ACK_WHISPER02 +#endif + +// 2014-10-16Ragexe +#if PACKETVER >= 20141016 + packet(0x09DF,7); + // New packet + packet(0x0A00,269); // ZC_SHORTCUT_KEY_LIST_V3 + parseable_packet(0x0A01,3,clif_parse_HotkeyRowShift,2); // CZ_SHORTCUTKEYBAR_ROTATE + packet(0x0A02,4); // ZC_DRESSROOM_OPEN + packet(0x0A0E,14); // ZC_BATTLEFIELD_NOTIFY_HP2 + packet(0x09F7,75); // ZC_PROPERTY_HOMUN_2 + packet(0x09E5,18); // ZC_DELETEITEM_FROM_MCSTORE2 + packet(0x09E6,22); // ZC_UPDATE_ITEM_FROM_BUYING_STORE2 + // Roulette System [Yommy] + parseable_packet(0x0A19,2,clif_parse_RouletteOpen,0); // CZ_REQ_OPEN_ROULETTE + packet(0x0A1A,23); // ZC_ACK_OPEN_ROULETTE + parseable_packet(0x0A1B,2,clif_parse_RouletteInfo,0); // CZ_REQ_ROULETTE_INFO + packet(0x0A1C,-1); // ZC_ACK_ROULETTE_INFO + parseable_packet(0x0A1D,2,clif_parse_RouletteClose,0); // CZ_REQ_CLOSE_ROULETTE + packet(0x0A1E,3); // ZC_ACK_CLOSE_ROULETTE + parseable_packet(0x0A1F,2,clif_parse_RouletteGenerate,0); // CZ_REQ_GENERATE_ROULETTE + packet(0x0A20,21); // ZC_ACK_GENERATE_ROULETTE + parseable_packet(0x0A21,3,clif_parse_RouletteRecvItem,2); // CZ_RECV_ROULETTE_ITEM + packet(0x0A22,5); // ZC_RECV_ROULETTE_ITEM +#endif + +// 2014-10-22bRagexe +#if PACKETVER >= 20141022 + packet(0x006d,149); + packet(0x08e3,149); + // New Packet + packet(0x0A18,14); // ZC_ACCEPT_ENTER3 + packet(0x0A28,3); // ZC_ACK_OPENSTORE2 + packet(0x09FD,-1); // ZC_NOTIFY_MOVEENTRY11 + packet(0x09FE,-1); // ZC_NOTIFY_NEWENTRY11 + packet(0x09FF,-1); // ZC_NOTIFY_STANDENTRY11 + //packet(0x09F8,-1); // ZC_ALL_QUEST_LIST3 +#endif + +// 2015-05-13aRagexe +#if PACKETVER >= 20150513 + // New Packets + packet(0xA3B,-1); // ZC_HAT_EFFECT + // RODEX Mail system + packet(0x09E7,3); // ZC_NOTIFY_UNREADMAIL + parseable_packet(0x09E8,11,clif_parse_Mail_refreshinbox,2,3); // CZ_OPEN_MAILBOX + parseable_packet(0x09E9,2,clif_parse_dull,0); // CZ_CLOSE_MAILBOX + parseable_packet(0x09EA,11,clif_parse_Mail_read,2,3); // CZ_REQ_READ_MAIL + packet(0x09EB,-1); // ZC_ACK_READ_MAIL + parseable_packet(0x09EC,-1,clif_parse_Mail_send,2,4,28,52,60,62,64); // CZ_REQ_WRITE_MAIL + packet(0x09ED,3); // ZC_ACK_WRITE_MAIL + parseable_packet(0x09EE,11,clif_parse_Mail_refreshinbox,2,3); // CZ_REQ_NEXT_MAIL_LIST + parseable_packet(0x09EF,11,clif_parse_Mail_refreshinbox,2,3); // CZ_REQ_REFRESH_MAIL_LIST + packet(0x09F0,-1); // ZC_ACK_MAIL_LIST + parseable_packet(0x09F1,11,clif_parse_Mail_getattach,0); // CZ_REQ_ZENY_FROM_MAIL + packet(0x09F2,12); // ZC_ACK_ZENY_FROM_MAIL + parseable_packet(0x09F3,11,clif_parse_Mail_getattach,0); // CZ_REQ_ITEM_FROM_MAIL + packet(0x09F4,12); // ZC_ACK_ITEM_FROM_MAIL + parseable_packet(0x09F5,11,clif_parse_Mail_delete,0); // CZ_REQ_DELETE_MAIL + packet(0x09F6,11); // ZC_ACK_DELETE_MAIL + parseable_packet(0x0A03,2,clif_parse_Mail_cancelwrite,0); // CZ_REQ_CANCEL_WRITE_MAIL + parseable_packet(0x0A04,6,clif_parse_Mail_setattach,2,4); // CZ_REQ_ADD_ITEM_TO_MAIL + packet(0x0A05,53); // ZC_ACK_ADD_ITEM_TO_MAIL + parseable_packet(0x0A06,6,clif_parse_Mail_winopen,2,4); // CZ_REQ_REMOVE_ITEM_MAIL + packet(0x0A07,9); // ZC_ACK_REMOVE_ITEM_MAIL + parseable_packet(0x0A08,26,clif_parse_Mail_beginwrite,0); // CZ_REQ_OPEN_WRITE_MAIL + packet(0x0A12,27); // ZC_ACK_OPEN_WRITE_MAIL + parseable_packet(0x0A13,26,clif_parse_Mail_Receiver_Check,2); // CZ_CHECK_RECEIVE_CHARACTER_NAME + packet(0x0A14,10); // ZC_CHECK_RECEIVE_CHARACTER_NAME + packet(0x0A32,2); // ZC_OPEN_RODEX_THROUGH_NPC_ONLY + // New EquipPackets Support + packet(0x0A09,45); // ZC_ADD_EXCHANGE_ITEM3 + packet(0x0A0A,47); // ZC_ADD_ITEM_TO_STORE3 + packet(0x0A0B,47); // ZC_ADD_ITEM_TO_CART3 + packet(0x0A0C,56); // ZC_ITEM_PICKUP_ACK_V6 + packet(0x0A0D,-1); // ZC_INVENTORY_ITEMLIST_EQUIP_V6 + packet(0x0A0F,-1); // ZC_CART_ITEMLIST_EQUIP_V6 + packet(0x0A10,-1); // ZC_STORE_ITEMLIST_EQUIP_V6 + packet(0x0A2D,-1); // ZC_EQUIPWIN_MICROSCOPE_V6 + // OneClick Itemidentify + parseable_packet(0x0A35,4,clif_parse_Oneclick_Itemidentify,2); // CZ_REQ_ONECLICK_ITEMIDENTIFY + // Achievement System + packet(0x0A23,-1); // ZC_ALL_ACH_LIST + packet(0x0A24,66); // ZC_ACH_UPDATE + parseable_packet(0x0A25,6,clif_parse_dull,0); // CZ_REQ_ACH_REWARD + packet(0x0A26,7); // ZC_REQ_ACH_REWARD_ACK + // Title System + parseable_packet(0x0A2E,6,clif_parse_dull,0); // CZ_REQ_CHANGE_TITLE + packet(0x0A2F,7); // ZC_ACK_CHANGE_TITLE + packet(0x0A30,106); // ZC_ACK_REQNAMEALL2 + // Pet Evolution System + parseable_packet(0x09FB,-1,clif_parse_dull,0); // CZ_PET_EVOLUTION + packet(0x09FC,6); // ZC_PET_EVOLUTION_RESULT +#endif + +// 2015-05-20aRagexe +#if PACKETVER >= 20150520 + parseable_packet(0x0A3D,18,clif_parse_sale_add,2,6,8,12,16); +#endif + +// 2015-09-16Ragexe +#if PACKETVER >= 20150916 + // New Packet + packet(0x097F,-1); // ZC_SELECTCART + parseable_packet(0x0980,7,clif_parse_SelectCart,2,6); // CZ_SELECTCART +#endif + +// 2016-03-02bRagexe +#if PACKETVER >= 20160302 + packet(0x0A51,34); +#endif + +// 2016-03-30aRagexe +#if PACKETVER >= 20160330 + parseable_packet(0x0A6E,-1,clif_parse_Mail_send,2,4,28,52,60,62,64,68); // CZ_REQ_WRITE_MAIL2 +#endif + +// 2016-06-01aRagexe +#if PACKETVER >= 20160601 + packet(0x0A7D,-1); +#endif + +// 2017-05-02dRagexeRE +#if PACKETVER >= 20170502 + packet(0x0A43,85); + packet(0x0A44,-1); + packet(0x0ABD,10); +#endif + +#endif /* _CLIF_PACKETDB_H_ */ diff --git a/src/map/clif_shuffle.h b/src/map/clif_shuffle.h new file mode 100644 index 0000000000..24351d1cf5 --- /dev/null +++ b/src/map/clif_shuffle.h @@ -0,0 +1,3511 @@ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder + +#ifndef _CLIF_SHUFFLE_H_ +#define _CLIF_SHUFFLE_H_ + +// 2013-05-15aRagexe +#if PACKETVER == 20130515 + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + //parseable_packet(0x0862,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0887,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08A1,6,clif_parse_TakeItem,2); + //parseable_packet(0x08AA,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x08AC,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x092D,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0931,5,clif_parse_HomMenu,2,4); + parseable_packet(0x093e,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0943,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0944,6,clif_parse_DropItem,2,4); + parseable_packet(0x0947,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0962,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0963,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2013-05-22Ragexe +#elif PACKETVER == 20130522 + parseable_packet(0x0360,5,clif_parse_WalkToXY,2); + parseable_packet(0x0362,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0368,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0369,6,clif_parse_SolveCharName,2); + parseable_packet(0x07EC,6,clif_parse_TickSend,2); + parseable_packet(0x0811,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x086A,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x086E,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0874,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x087E,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x088e,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x089B,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x089C,6,clif_parse_DropItem,2,4); + parseable_packet(0x08A2,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08A9,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x08AC,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x08a3,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a6,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x08aa,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0925,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0926,5,clif_parse_HomMenu,2,4); + parseable_packet(0x093e,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0950,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0952,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x095C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x095E,6,clif_parse_TakeItem,2); + parseable_packet(0x095b,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0964,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + //parseable_packet(0x0965,8,NULL,0); // CZ_JOIN_BATTLE_FIELD +// 2013-05-29Ragexe +#elif PACKETVER == 20130529 + parseable_packet(0x023B,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0438,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085A,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x085E,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0863,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0869,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0874,18,clif_parse_PartyBookingRegisterReq,2); + parseable_packet(0x0876,5,clif_parse_WalkToXY,2); + parseable_packet(0x0877,26,clif_parse_FriendsListAdd,2); + //parseable_packet(0x0888,4,NULL,0); // CZ_GANGSI_RANK + //parseable_packet(0x088E,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0890,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0892,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0895,6,clif_parse_TakeItem,2); + parseable_packet(0x0897,6,clif_parse_TickSend,2); + parseable_packet(0x08A7,6,clif_parse_DropItem,2,4); + parseable_packet(0x08A8,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0917,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0918,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0919,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0936,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0937,6,clif_parse_SolveCharName,2); + parseable_packet(0x0938,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0941,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0951,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0956,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0957,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0958,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x0964,2,clif_parse_ReqCloseBuyingStore,0); +// 2013-06-05Ragexe +#elif PACKETVER == 20130605 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023B,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0883,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2013-06-12Ragexe +#elif PACKETVER == 20130612 + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x087E,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0919,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x093A,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0940,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0964,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2013-06-18Ragexe +#elif PACKETVER == 20130618 + parseable_packet(0x0281,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x02C4,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0363,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x085A,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0862,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0864,36,clif_parse_StoragePassword,2,4,20); + //parseable_packet(0x0878,4,NULL,0); // CZ_GANGSI_RANK + //parseable_packet(0x087A,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0885,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0887,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0889,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x088E,5,clif_parse_WalkToXY,2); + parseable_packet(0x0890,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0891,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x08A6,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x08A7,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0917,6,clif_parse_DropItem,2,4); + parseable_packet(0x0930,6,clif_parse_TickSend,2); + parseable_packet(0x0932,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0936,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0942,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x0944,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0945,6,clif_parse_SolveCharName,2); + parseable_packet(0x094F,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0951,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0953,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x095B,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0962,6,clif_parse_TakeItem,2); + parseable_packet(0x096A,10,clif_parse_UseSkillToPos,2,4,6,8); +// 2013-06-26Ragexe +#elif PACKETVER == 20130626 + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0365,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + //parseable_packet(0x0860,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x088B,6,clif_parse_TakeItem,2); + parseable_packet(0x088C,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x088F,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0894,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0895,26,clif_parse_PartyInvite2,2); + parseable_packet(0x08A5,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x08AB,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0921,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0930,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x094D,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0952,6,clif_parse_DropItem,2,4); + parseable_packet(0x0960,5,clif_parse_HomMenu,2,4); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2013-07-03Ragexe +#elif PACKETVER == 20130703 + parseable_packet(0x0202,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0873,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0930,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x094A,5,clif_parse_HomMenu,2,4); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2013-07-10Ragexe +#elif PACKETVER == 20130710 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023B,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0880,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2013-07-17Ragexe +#elif PACKETVER == 20130717 + parseable_packet(0x02C4,6,clif_parse_TickSend,2); + parseable_packet(0x0819,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x083C,5,clif_parse_WalkToXY,2); + parseable_packet(0x0862,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0863,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x086B,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + //parseable_packet(0x086C,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0882,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x088A,5,clif_parse_HomMenu,2,4); + parseable_packet(0x088C,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0897,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x0898,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x089B,8,clif_parse_MoveToKafra,2,4); + //parseable_packet(0x08A6,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x08A9,6,clif_parse_TakeItem,2); + parseable_packet(0x08AA,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0917,6,clif_parse_DropItem,2,4); + parseable_packet(0x0918,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x091D,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x091E,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x092F,26,clif_parse_PartyInvite2,2); + parseable_packet(0x093B,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0952,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0956,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0958,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x095B,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0960,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0967,6,clif_parse_SolveCharName,2); + parseable_packet(0x096A,2,clif_parse_ReqCloseBuyingStore,0); +// 2013-08-07Ragexe +#elif PACKETVER == 20130807 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023B,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0887,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2013-12-23Ragexe +#elif PACKETVER == 20131223 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023B,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x08A4,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2014-10-16Ragexe +#elif PACKETVER == 20141016 + parseable_packet(0x022D,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x086E,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x0922,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0936,36,clif_parse_StoragePassword,0); + parseable_packet(0x094B,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0967,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2014-10-22bRagexe +#elif PACKETVER == 20141022 + parseable_packet(0x023b,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0878,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x087d,6,clif_parse_DropItem,2,4); + parseable_packet(0x0896,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0899,5,clif_parse_HomMenu,2,4); + parseable_packet(0x08aa,8,clif_parse_MoveFromKafra,2,4); + //parseable_packet(0x08ab,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x08ad,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x091a,26,clif_parse_FriendsListAdd,2); + //parseable_packet(0x092b,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x093b,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0940,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x094e,6,clif_parse_TakeItem,2); + parseable_packet(0x0955,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-01-07aRagexeRE +#elif PACKETVER == 20150107 + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x087c,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0895,36,clif_parse_StoragePassword,0); + parseable_packet(0x092d,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0943,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0947,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-01-14aRagexe +#elif PACKETVER == 20150114 + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0436,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0868,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0899,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0946,36,clif_parse_StoragePassword,0); + //parseable_packet(0x0955,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0957,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-01-28aRagexe +#elif PACKETVER == 20150128 + parseable_packet(0x0202,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x023b,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x035f,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0365,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + //parseable_packet(0x0368,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0838,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x085a,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0864,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x086d,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0870,5,clif_parse_WalkToXY,2); + parseable_packet(0x0874,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0875,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0876,5,clif_parse_HomMenu,2,4); + parseable_packet(0x087d,6,clif_parse_SolveCharName,2); + parseable_packet(0x0888,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x089a,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x08ab,6,clif_parse_TakeItem,2); + parseable_packet(0x091f,6,clif_parse_TickSend,2); + parseable_packet(0x0927,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0929,36,clif_parse_StoragePassword,0); + parseable_packet(0x092d,2,clif_parse_SearchStoreInfoNextPage,0); + //parseable_packet(0x0938,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x093a,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0944,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x094d,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x094e,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0952,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0963,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0968,6,clif_parse_DropItem,2,4); +// 2015-02-04aRagexe +#elif PACKETVER == 20150204 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0966,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-02-25aRagexeRE or 2015-02-26aRagexeRE +#elif PACKETVER == 20150225 || PACKETVER == 20150226 + parseable_packet(0x02c4,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0362,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0436,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,6,clif_parse_TakeItem,2); + parseable_packet(0x0819,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0867,18,clif_parse_PartyBookingRegisterReq,2,4); + //parseable_packet(0x0885,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0896,-1,clif_parse_ItemListWindowSelected,2,4,8); + //parseable_packet(0x089b,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x089c,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a4,36,clif_parse_StoragePassword,0); + parseable_packet(0x0940,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0946,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0948,6,clif_parse_DropItem,2,4); + parseable_packet(0x094f,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0952,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0955,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x096a,19,clif_parse_WantToConnection,2,6,10,14,18); +// 2015-03-11aRagexeRE +#elif PACKETVER == 20150311 + parseable_packet(0x023b,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0360,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0436,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0438,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0838,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x086a,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x086c,36,clif_parse_StoragePassword,0); + parseable_packet(0x087b,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0883,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0886,5,clif_parse_WalkToXY,2); + parseable_packet(0x0888,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0896,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08a1,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x08a3,6,clif_parse_TakeItem,2); + parseable_packet(0x08a5,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x08a6,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x091c,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0928,5,clif_parse_ChangeDir,2,4); + //parseable_packet(0x092a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x092e,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x093b,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0943,6,clif_parse_SolveCharName,2); + //parseable_packet(0x0946,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0957,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0958,6,clif_parse_TickSend,2); + parseable_packet(0x095b,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0963,6,clif_parse_DropItem,2,4); + parseable_packet(0x0964,8,clif_parse_MoveToKafra,2,4); +// 2015-03-25aRagexe +#elif PACKETVER == 20150325 + parseable_packet(0x0202,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0363,6,clif_parse_DropItem,2,4); + parseable_packet(0x0365,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0438,2,clif_parse_SearchStoreInfoNextPage,0); + //parseable_packet(0x0802,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0819,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x085d,6,clif_parse_SolveCharName,2); + parseable_packet(0x086f,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x087c,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x087e,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0883,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0885,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0891,6,clif_parse_GetCharNameRequest,2); + //parseable_packet(0x0893,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0897,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0899,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x08a1,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08a7,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0919,36,clif_parse_StoragePassword,0); + parseable_packet(0x092c,6,clif_parse_TakeItem,2); + parseable_packet(0x0931,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0932,5,clif_parse_WalkToXY,2); + parseable_packet(0x0938,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0940,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0947,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x094a,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0950,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0954,6,clif_parse_TickSend,2); + parseable_packet(0x0969,8,clif_parse_MoveFromKafra,2,4); +// 2015-04-01aRagexe +#elif PACKETVER == 20150401 + parseable_packet(0x0362,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0367,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0437,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x083c,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x085e,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x086f,5,clif_parse_WalkToXY,2); + parseable_packet(0x0875,-1,clif_parse_ItemListWindowSelected,2,4,8); + //parseable_packet(0x087e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x088c,6,clif_parse_DropItem,2,4); + parseable_packet(0x088f,6,clif_parse_TickSend,2); + parseable_packet(0x0895,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0898,5,clif_parse_HomMenu,2,4); + parseable_packet(0x089c,36,clif_parse_StoragePassword,0); + parseable_packet(0x08a5,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x091b,26,clif_parse_PartyInvite2,2); + parseable_packet(0x091c,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0922,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0924,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0938,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0939,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x093a,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x093b,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x093e,2,clif_parse_SearchStoreInfoNextPage,0); + //parseable_packet(0x0946,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0949,6,clif_parse_TakeItem,2); + parseable_packet(0x094b,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0953,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x095f,6,clif_parse_SolveCharName,2); + parseable_packet(0x0964,5,clif_parse_ChangeDir,2,4); +// 2015-04-22aRagexeRE +#elif PACKETVER == 20150422 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0955,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-04-29aRagexe +#elif PACKETVER == 20150429 + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0363,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0867,36,clif_parse_StoragePassword,0); + parseable_packet(0x086a,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0886,26,clif_parse_PartyInvite2,2); + parseable_packet(0x088f,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0894,6,clif_parse_DropItem,2,4); + parseable_packet(0x0899,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x089f,-1,clif_parse_ItemListWindowSelected,2,4,8); + //parseable_packet(0x08a6,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + //parseable_packet(0x08a8,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x08ad,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0929,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x093d,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0943,6,clif_parse_TakeItem,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-05-07bRagexe +#elif PACKETVER == 20150507 + parseable_packet(0x023b,5,clif_parse_HomMenu,2,4); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,6,clif_parse_TakeItem,2); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085a,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0864,26,clif_parse_PartyInvite2,2); + //parseable_packet(0x0887,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0889,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0924,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x092e,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x093b,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0941,8,clif_parse_MoveFromKafra,2,4); + //parseable_packet(0x0942,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0953,36,clif_parse_StoragePassword,0); + parseable_packet(0x0955,6,clif_parse_DropItem,2,4); + parseable_packet(0x0958,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-05-13aRagexe +#elif PACKETVER == 20150513 + parseable_packet(0x022D,2,clif_parse_ReqCloseBuyingStore,0); + //parseable_packet(0x02C4,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0363,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0864,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0879,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0883,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0885,6,clif_parse_DropItem,2,4); + parseable_packet(0x08A8,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0923,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0924,5,clif_parse_ChangeDir,2,4); + //parseable_packet(0x0927,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x094A,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0958,6,clif_parse_TakeItem,2); + parseable_packet(0x0960,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2015-05-27aRagexe +#elif PACKETVER == 20150527 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x083c,36,clif_parse_StoragePassword,0); + parseable_packet(0x0940,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-06-17aRagexeRE or 2015-06-18aRagexeRE +#elif PACKETVER == 20150617 || PACKETVER == 20150618 + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_TakeItem,2); + parseable_packet(0x0362,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0363,36,clif_parse_StoragePassword,0); + parseable_packet(0x0365,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0436,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07ec,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + //parseable_packet(0x0811,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0869,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x086a,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x086b,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0870,26,clif_parse_PartyInvite2,2); + parseable_packet(0x087a,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0886,5,clif_parse_HomMenu,2,4); + //parseable_packet(0x0894,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0940,6,clif_parse_DropItem,2,4); + parseable_packet(0x094e,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-08-19aRagexeRE +#elif PACKETVER == 20150819 + parseable_packet(0x0202,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x022d,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0281,6,clif_parse_TakeItem,2); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x085d,8,clif_parse_MoveFromKafra,2,4); + //parseable_packet(0x0862,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0865,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0871,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0888,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0919,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x091e,36,clif_parse_StoragePassword,0); + parseable_packet(0x0927,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0940,6,clif_parse_DropItem,2,4); + parseable_packet(0x0961,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0967,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-08-26aRagexeRE +#elif PACKETVER == 20150826 + parseable_packet(0x0362,36,clif_parse_StoragePassword,0); + parseable_packet(0x0368,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0436,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x07ec,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0819,6,clif_parse_ReqClickBuyingStore,2); + //parseable_packet(0x0861,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0865,5,clif_parse_WalkToXY,2); + parseable_packet(0x086b,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0870,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x087b,6,clif_parse_SolveCharName,2); + parseable_packet(0x088b,26,clif_parse_PartyInvite2,2); + parseable_packet(0x088d,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0890,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0891,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x08a0,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x08a1,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a4,6,clif_parse_TakeItem,2); + parseable_packet(0x08a8,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0924,6,clif_parse_DropItem,2,4); + parseable_packet(0x0928,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x092e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x093b,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0945,5,clif_parse_HomMenu,2,4); + parseable_packet(0x094f,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0951,6,clif_parse_TickSend,2); + parseable_packet(0x0959,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0964,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x0968,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0969,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); +// 2015-09-16Ragexe +#elif PACKETVER == 20150916 + parseable_packet(0x022D,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0817,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0835,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x085E,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0869,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0873,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0877,5,clif_parse_WalkToXY,2); + parseable_packet(0x087F,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0881,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x089B,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x089C,6,clif_parse_TakeItem,2); + parseable_packet(0x089E,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x08AC,6,clif_parse_TickSend,2); + parseable_packet(0x0920,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0924,26,clif_parse_PartyInvite2,2); + parseable_packet(0x092E,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x092F,6,clif_parse_DropItem,2,4); + parseable_packet(0x0934,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0936,5,clif_parse_ChangeDir,2,4); + //parseable_packet(0x0938,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x093E,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0941,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0942,6,clif_parse_SolveCharName,2); + parseable_packet(0x0948,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + //parseable_packet(0x094F,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x095A,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0960,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0961,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x0969,19,clif_parse_WantToConnection,2,6,10,14,18); +// 2015-10-01bRagexeRE +#elif PACKETVER == 20151001 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,NULL,2,4,6); + parseable_packet(0x0366,90,NULL,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0860,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-10-07aRagexeRE +#elif PACKETVER == 20151007 + parseable_packet(0x0202,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + //parseable_packet(0x0862,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x093f,5,clif_parse_HomMenu,2,4); + parseable_packet(0x095f,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0961,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0967,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-10-14bRagexeRE +#elif PACKETVER == 20151014 + parseable_packet(0x0202,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0817,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0838,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x085a,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085c,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0860,6,clif_parse_DropItem,2,4); + parseable_packet(0x0863,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0867,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0872,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0874,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0881,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0883,6,clif_parse_TickSend,2); + parseable_packet(0x0884,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0889,6,clif_parse_ReqClickBuyingStore,2); + //parseable_packet(0x088e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + //parseable_packet(0x089a,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x089b,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x089f,5,clif_parse_WalkToXY,2); + parseable_packet(0x08aa,6,clif_parse_TakeItem,2); + parseable_packet(0x091c,26,clif_parse_PartyInvite2,2); + parseable_packet(0x091d,36,clif_parse_StoragePassword,0); + parseable_packet(0x0930,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0934,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0944,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x094f,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0956,6,clif_parse_SolveCharName,2); + parseable_packet(0x095e,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0961,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0964,19,clif_parse_WantToConnection,2,6,10,14,18); +// 2015-10-28cRagexeRE +#elif PACKETVER == 20151028 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0860,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-10-29aRagexe +#elif PACKETVER == 20151029 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023B,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0860,36,clif_parse_StoragePassword,0); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2015-11-04aRagexe +#elif PACKETVER == 20151104 + parseable_packet(0x023B,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0360,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0363,5,clif_parse_WalkToXY,2); + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0436,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0437,6,clif_parse_DropItem,2,4); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07EC,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0811,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0815,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0886,6,clif_parse_TickSend,2); + parseable_packet(0x0887,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x088B,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x088D,5,clif_parse_HomMenu,2,4); + //parseable_packet(0x08A3,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x08A5,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0928,5,clif_parse_ChangeDir,2,4); + //parseable_packet(0x0939,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x093A,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x0940,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0964,6,clif_parse_TakeItem,2); +// 2015-11-18aRagexeRE +#elif PACKETVER == 20151118 + parseable_packet(0x022d,6,clif_parse_TickSend,2); + parseable_packet(0x035f,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0365,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x086b,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x088b,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x08ab,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0921,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0925,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x092e,5,clif_parse_ChangeDir,2,4); + //parseable_packet(0x092f,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x093c,6,clif_parse_DropItem,2,4); + parseable_packet(0x0943,6,clif_parse_TakeItem,2); + parseable_packet(0x0946,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + //parseable_packet(0x0957,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x095c,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2015-12-02bRagexeRE +#elif PACKETVER == 20151202 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0870,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +#elif PACKETVER == 20151216 + parseable_packet(0x022D,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0361,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,5,clif_parse_HomMenu,2,4); + //parseable_packet(0x0364,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0436,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x085B,6,clif_parse_TickSend,2); + parseable_packet(0x0864,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0865,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x086E,26,clif_parse_PartyInvite2,2); + //parseable_packet(0x086a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0870,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0874,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0885,36,clif_parse_StoragePassword,0); + parseable_packet(0x088B,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x089D,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x089E,6,clif_parse_SolveCharName,2); + parseable_packet(0x08A2,5,clif_parse_WalkToXY,2); + parseable_packet(0x08A9,6,clif_parse_TakeItem,2); + parseable_packet(0x08AC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x091D,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0944,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0947,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0949,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0954,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0960,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0966,6,clif_parse_DropItem,2,4); + parseable_packet(0x0968,10,clif_parse_UseSkillToId,2,4,6); +// 2015-12-23bRagexeRE +#elif PACKETVER == 20151223 + parseable_packet(0x02c4,8,clif_parse_MoveToKafra,2,4); + //parseable_packet(0x0362,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,6,clif_parse_TakeItem,2); + //parseable_packet(0x0802,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0815,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0864,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0866,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x086e,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0872,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0875,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0876,6,clif_parse_DropItem,2,4); + parseable_packet(0x0881,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0884,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0886,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x088d,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0890,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0891,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0898,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x08aa,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0918,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x091a,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x091b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0920,5,clif_parse_WalkToXY,2); + parseable_packet(0x0923,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0924,6,clif_parse_TickSend,2); + parseable_packet(0x095e,6,clif_parse_SolveCharName,2); + parseable_packet(0x095f,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0965,36,clif_parse_StoragePassword,0); + parseable_packet(0x0967,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); +// 2016-01-06aRagexeRE +#elif PACKETVER == 20160106 + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07ec,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0861,6,clif_parse_TakeItem,2); + parseable_packet(0x086a,6,clif_parse_DropItem,2,4); + //parseable_packet(0x086c,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0878,36,clif_parse_StoragePassword,0); + parseable_packet(0x087a,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x087f,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0885,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0889,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x088a,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0891,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x08a0,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x091d,-1,clif_parse_ItemListWindowSelected,2,4,8); + //parseable_packet(0x0940,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-01-13cRagexeRE +#elif PACKETVER == 20160113 + parseable_packet(0x022d,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x023b,5,clif_parse_WalkToXY,2); + parseable_packet(0x035f,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0815,36,clif_parse_StoragePassword,0); + parseable_packet(0x085b,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0864,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x086d,5,clif_parse_HomMenu,2,4); + //parseable_packet(0x0873,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0875,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0888,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x088b,26,clif_parse_PartyInvite2,2); + parseable_packet(0x088c,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0892,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0893,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0899,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x089a,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08a0,6,clif_parse_TickSend,2); + parseable_packet(0x08a6,6,clif_parse_TakeItem,2); + parseable_packet(0x08aa,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0919,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x091b,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0924,6,clif_parse_DropItem,2,4); + parseable_packet(0x0930,6,clif_parse_SolveCharName,2); + parseable_packet(0x0932,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x093c,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0941,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x094d,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x094f,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0967,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); +// 2016-01-20aRagexeRE +#elif PACKETVER == 20160120 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0865,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-01-27bRagexeRE +#elif PACKETVER == 20160127 + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085e,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0922,5,clif_parse_HomMenu,2,4); + parseable_packet(0x095a,36,clif_parse_StoragePassword,0); + parseable_packet(0x0961,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-02-03aRagexeRE +#elif PACKETVER == 20160203 + parseable_packet(0x0202,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0436,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0437,6,clif_parse_TickSend,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0811,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0835,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x086c,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0872,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0873,36,clif_parse_StoragePassword,0); + //parseable_packet(0x088c,4,NULL,0); // CZ_GANGSI_RANK + //parseable_packet(0x0918,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x093e,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0940,5,clif_parse_WalkToXY,2); + parseable_packet(0x0947,6,clif_parse_DropItem,2,4); + parseable_packet(0x0954,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x095a,6,clif_parse_TakeItem,2); + parseable_packet(0x095d,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-02-11aRagexeRE +#elif PACKETVER == 20160211 + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,36,clif_parse_StoragePassword,0); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x086c,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0870,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0886,5,clif_parse_HomMenu,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-02-17cRagexeRE +#elif PACKETVER == 20160217 + parseable_packet(0x0202,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x023b,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0362,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0365,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0864,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0870,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0873,5,clif_parse_HomMenu,2,4); + parseable_packet(0x087a,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0888,6,clif_parse_TickSend,2); + parseable_packet(0x088d,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x088f,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0899,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x08a0,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x08a9,26,clif_parse_PartyInvite2,2); + parseable_packet(0x08ac,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x08ad,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x091d,5,clif_parse_WalkToXY,2); + parseable_packet(0x0920,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0926,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x092e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x093b,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x093e,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0941,6,clif_parse_TakeItem,2); + parseable_packet(0x094a,10,clif_parse_UseSkillToPos,2,4,6,8); + //parseable_packet(0x094f,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x095e,36,clif_parse_StoragePassword,0); + parseable_packet(0x0966,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0967,6,clif_parse_SolveCharName,2); + parseable_packet(0x0969,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); +// 2016-02-24bRagexeRE +#elif PACKETVER == 20160224 + parseable_packet(0x022d,26,clif_parse_PartyInvite2,2); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0364,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0436,6,clif_parse_DropItem,2,4); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0861,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x086b,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0884,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0885,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0888,5,clif_parse_WalkToXY,2); + parseable_packet(0x08a9,26,clif_parse_FriendsListAdd,2); + //parseable_packet(0x0920,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0929,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x092f,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0936,36,clif_parse_StoragePassword,0); + parseable_packet(0x0938,6,clif_parse_TakeItem,2); + parseable_packet(0x094c,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0961,5,clif_parse_HomMenu,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-03-02bRagexeRE +#elif PACKETVER == 20160302 + parseable_packet(0x022d,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0367,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0802,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0819,5,clif_parse_WalkToXY,2); + parseable_packet(0x085b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0864,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0865,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0867,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0868,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0873,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0875,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x087a,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x087d,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0883,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x08a6,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x08a9,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x091a,6,clif_parse_DropItem,2,4); + parseable_packet(0x0927,6,clif_parse_TakeItem,2); + //parseable_packet(0x092d,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x092f,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0945,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x094e,36,clif_parse_StoragePassword,0); + //parseable_packet(0x0950,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0957,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x095a,6,clif_parse_TickSend,2); + parseable_packet(0x0960,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0961,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0967,6,clif_parse_SolveCharName,2); + parseable_packet(0x0968,7,clif_parse_ActionRequest,2,6); +// 2016-03-09aRagexeRE +#elif PACKETVER == 20160309 + parseable_packet(0x023b,6,clif_parse_DropItem,2,4); + parseable_packet(0x0281,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0364,36,clif_parse_StoragePassword,0); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0819,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0838,5,clif_parse_WalkToXY,2); + parseable_packet(0x083c,26,clif_parse_PartyInvite2,2); + parseable_packet(0x085a,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x085f,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0866,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x086a,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + //parseable_packet(0x0873,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x087c,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x087e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x089b,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x089d,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x08a7,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x091d,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0920,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0922,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + //parseable_packet(0x0929,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x092a,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x092e,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0932,5,clif_parse_HomMenu,2,4); + parseable_packet(0x094f,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0956,6,clif_parse_TickSend,2); + parseable_packet(0x095e,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x096a,6,clif_parse_TakeItem,2); +// 2016-03-16aRagexeRE +#elif PACKETVER == 20160316 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0922,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-03-23aRagexeRE +#elif PACKETVER == 20160323 + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0365,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + //parseable_packet(0x0867,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0869,6,clif_parse_TakeItem,2); + parseable_packet(0x086a,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0872,36,clif_parse_StoragePassword,0); + parseable_packet(0x0878,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0883,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0896,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x089a,5,clif_parse_HomMenu,2,4); + //parseable_packet(0x091b,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0926,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0927,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0933,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x093c,6,clif_parse_DropItem,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-03-30aRagexeRE +#elif PACKETVER == 20160330 + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0365,36,clif_parse_StoragePassword,0); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0867,26,clif_parse_PartyInvite2,2); + parseable_packet(0x086d,6,clif_parse_TakeItem,2); + //parseable_packet(0x0878,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x087f,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0889,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x088b,5,clif_parse_HomMenu,2,4); + //parseable_packet(0x088d,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0918,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0925,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x092a,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x092c,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0930,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0939,6,clif_parse_DropItem,2,4); + parseable_packet(0x093b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-04-06aRagexeRE +#elif PACKETVER == 20160406 + parseable_packet(0x0364,6,clif_parse_SolveCharName,2); + parseable_packet(0x07e4,6,clif_parse_DropItem,2,4); + parseable_packet(0x0819,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x085a,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x085c,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0869,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0877,6,clif_parse_TakeItem,2); + parseable_packet(0x0878,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0879,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0884,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0892,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0895,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0898,26,clif_parse_PartyInvite2,2); + parseable_packet(0x089b,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x089e,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x08a1,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08a9,2,clif_parse_ReqCloseBuyingStore,0); + //parseable_packet(0x08ac,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0927,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x092d,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0933,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0934,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0940,6,clif_parse_TickSend,2); + parseable_packet(0x0949,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x094d,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0953,36,clif_parse_StoragePassword,0); + parseable_packet(0x095d,5,clif_parse_HomMenu,2,4); + parseable_packet(0x095f,5,clif_parse_WalkToXY,2); + //parseable_packet(0x0962,4,NULL,0); // CZ_GANGSI_RANK +// 2016-04-14bRagexeRE +#elif PACKETVER == 20160414 + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0363,6,clif_parse_TakeItem,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0862,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x087a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0880,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0885,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x089e,26,clif_parse_PartyInvite2,2); + //parseable_packet(0x0918,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0922,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0927,36,clif_parse_StoragePassword,0); + parseable_packet(0x0931,6,clif_parse_DropItem,2,4); + parseable_packet(0x0934,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0945,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0953,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-04-20aRagexeRE +#elif PACKETVER == 20160420 + parseable_packet(0x022d,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x02c4,6,clif_parse_TickSend,2); + parseable_packet(0x035f,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0864,6,clif_parse_TakeItem,2); + //parseable_packet(0x0870,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0872,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0874,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0884,6,clif_parse_DropItem,2,4); + parseable_packet(0x0888,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x088b,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x08a5,36,clif_parse_StoragePassword,0); + parseable_packet(0x092f,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0935,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x094e,-1,clif_parse_ItemListWindowSelected,2,4,8); + //parseable_packet(0x095c,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-04-27aRagexeRE +#elif PACKETVER == 20160427 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0835,36,clif_parse_StoragePassword,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0940,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-05-04aRagexeRE +#elif PACKETVER == 20160504 + parseable_packet(0x0202,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0363,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + //parseable_packet(0x0365,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x083c,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x085f,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x086b,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x087f,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0884,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0886,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0887,26,clif_parse_PartyInvite2,2); + parseable_packet(0x088a,6,clif_parse_TakeItem,2); + parseable_packet(0x088d,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x088f,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0890,6,clif_parse_DropItem,2,4); + parseable_packet(0x0893,18,clif_parse_PartyBookingRegisterReq,2,4); + //parseable_packet(0x0898,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x089d,6,clif_parse_SolveCharName,2); + parseable_packet(0x08ad,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0918,6,clif_parse_TickSend,2); + parseable_packet(0x0921,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0922,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0924,5,clif_parse_WalkToXY,2); + parseable_packet(0x093e,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0940,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0941,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0948,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0952,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x095b,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0969,36,clif_parse_StoragePassword,0); +// 2016-05-11aRagexeRE +#elif PACKETVER == 20160511 + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085e,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0894,26,clif_parse_FriendsListAdd,2); + //parseable_packet(0x089b,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0918,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0920,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0940,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-05-18aRagexeRE +#elif PACKETVER == 20160518 + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x086c,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0874,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x089a,36,clif_parse_StoragePassword,0); + parseable_packet(0x08a9,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0928,5,clif_parse_HomMenu,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-05-25aRagexeRE +#elif PACKETVER == 20160525 + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + //parseable_packet(0x085a,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x085e,6,clif_parse_DropItem,2,4); + parseable_packet(0x0867,5,clif_parse_HomMenu,2,4); + parseable_packet(0x086a,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0899,6,clif_parse_TakeItem,2); + parseable_packet(0x089c,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x091d,36,clif_parse_StoragePassword,0); + parseable_packet(0x092c,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0937,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0945,26,clif_parse_PartyInvite2,2); + parseable_packet(0x094a,8,clif_parse_MoveToKafra,2,4); + //parseable_packet(0x094e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0951,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0956,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-06-01aRagexeRE +#elif PACKETVER == 20160601 + parseable_packet(0x0202,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x02c4,26,clif_parse_PartyInvite2,2); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0863,6,clif_parse_TakeItem,2); + parseable_packet(0x0870,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x087d,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x088d,6,clif_parse_DropItem,2,4); + parseable_packet(0x088f,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0895,5,clif_parse_HomMenu,2,4); + //parseable_packet(0x08a7,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x08ac,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x0924,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x095b,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x095f,36,clif_parse_StoragePassword,0); + parseable_packet(0x0961,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-06-08aRagexeRE +#elif PACKETVER == 20160608 + parseable_packet(0x022d,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x02c4,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x035f,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0436,5,clif_parse_WalkToXY,2); + parseable_packet(0x0437,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07ec,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0802,6,clif_parse_TickSend,2); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + //parseable_packet(0x085c,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0885,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0889,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0899,6,clif_parse_TakeItem,2); + parseable_packet(0x089b,5,clif_parse_HomMenu,2,4); + parseable_packet(0x08a6,8,clif_parse_MoveFromKafra,2,4); + //parseable_packet(0x093b,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x094d,6,clif_parse_DropItem,2,4); + parseable_packet(0x0958,36,clif_parse_StoragePassword,0); + parseable_packet(0x095b,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0969,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-06-15aRagexeRE +#elif PACKETVER == 20160615 + parseable_packet(0x0281,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0363,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0364,36,clif_parse_StoragePassword,0); + parseable_packet(0x0369,5,clif_parse_HomMenu,2,4); + parseable_packet(0x083c,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0866,5,clif_parse_WalkToXY,2); + //parseable_packet(0x0870,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x087d,6,clif_parse_SolveCharName,2); + parseable_packet(0x087e,6,clif_parse_TakeItem,2); + parseable_packet(0x087f,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + //parseable_packet(0x0884,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0887,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0888,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x088a,6,clif_parse_TickSend,2); + parseable_packet(0x088d,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0891,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0898,6,clif_parse_DropItem,2,4); + parseable_packet(0x092f,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x093e,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0947,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0948,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x094a,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x094b,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0954,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0957,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0958,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x095c,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x095e,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0961,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); +// 2016-06-22aRagexeRE +#elif PACKETVER == 20160622 + parseable_packet(0x023b,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x035f,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0361,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x07e4,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0861,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + //parseable_packet(0x0865,4,NULL,0); // CZ_GANGSI_RANK + //parseable_packet(0x0867,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0880,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0887,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0890,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0891,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0892,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x089a,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x089e,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08a2,6,clif_parse_SolveCharName,2); + parseable_packet(0x08a8,36,clif_parse_StoragePassword,0); + parseable_packet(0x091c,6,clif_parse_TakeItem,2); + parseable_packet(0x092d,6,clif_parse_TickSend,2); + parseable_packet(0x092f,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0936,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0937,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x093b,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x093f,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0946,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0959,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0965,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0969,6,clif_parse_DropItem,2,4); +// 2016-06-30aRagexeRE +#elif PACKETVER == 20160630 + parseable_packet(0x0202,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x022d,5,clif_parse_WalkToXY,2); + //parseable_packet(0x035f,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0363,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0368,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x085c,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + //parseable_packet(0x085e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0860,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0861,6,clif_parse_DropItem,2,4); + parseable_packet(0x0863,6,clif_parse_SolveCharName,2); + parseable_packet(0x0867,36,clif_parse_StoragePassword,0); + parseable_packet(0x086b,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0881,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0885,5,clif_parse_HomMenu,2,4); + parseable_packet(0x088e,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0893,6,clif_parse_TickSend,2); + parseable_packet(0x091e,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0922,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0925,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0926,26,clif_parse_PartyInvite2,2); + parseable_packet(0x093e,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0946,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0948,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x094a,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0957,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x095a,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0968,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0969,6,clif_parse_TakeItem,2); + parseable_packet(0x096a,8,clif_parse_MoveToKafra,2,4); +// 2016-07-06cRagexeRE +#elif PACKETVER == 20160706 + parseable_packet(0x0362,6,clif_parse_SolveCharName,2); + parseable_packet(0x0436,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x085f,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0860,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0869,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x086b,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0884,26,clif_parse_FriendsListAdd,2); + //parseable_packet(0x0886,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0889,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0892,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0899,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x08a4,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x08a5,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x08a8,6,clif_parse_TickSend,2); + parseable_packet(0x0918,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x091b,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0924,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0926,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0927,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0929,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x092d,5,clif_parse_WalkToXY,2); + parseable_packet(0x0939,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x093d,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0944,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0945,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x094c,36,clif_parse_StoragePassword,0); + parseable_packet(0x0952,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0957,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0958,6,clif_parse_TakeItem,2); +// 2016-07-13bRagexeRE +#elif PACKETVER == 20160713 + parseable_packet(0x022d,36,clif_parse_StoragePassword,0); + parseable_packet(0x0363,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0364,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0838,6,clif_parse_TakeItem,2); + parseable_packet(0x0860,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0865,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0869,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0875,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0877,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x087b,6,clif_parse_TickSend,2); + parseable_packet(0x0883,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x088d,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0892,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x089a,26,clif_parse_PartyInvite2,2); + //parseable_packet(0x089f,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x08a2,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x08a4,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x091c,5,clif_parse_WalkToXY,2); + parseable_packet(0x091d,6,clif_parse_SolveCharName,2); + parseable_packet(0x0921,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0922,5,clif_parse_HomMenu,2,4); + parseable_packet(0x092c,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0931,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0939,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0944,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0945,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0947,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0957,6,clif_parse_DropItem,2,4); + //parseable_packet(0x095b,8,NULL,0); // CZ_JOIN_BATTLE_FIELD +// 2016-07-20aRagexeRE +#elif PACKETVER == 20160720 + parseable_packet(0x0362,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0363,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0365,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x07e4,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0819,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0838,5,clif_parse_WalkToXY,2); + parseable_packet(0x085b,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x086a,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x086d,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x087f,6,clif_parse_DropItem,2,4); + parseable_packet(0x0883,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0887,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0897,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x089a,36,clif_parse_StoragePassword,0); + parseable_packet(0x089c,5,clif_parse_HomMenu,2,4); + parseable_packet(0x089e,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x08a0,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x08aa,-1,clif_parse_ItemListWindowSelected,2,4,8); + //parseable_packet(0x0917,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x091c,6,clif_parse_TakeItem,2); + parseable_packet(0x092a,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x093b,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x093e,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0946,6,clif_parse_TickSend,2); + parseable_packet(0x094d,6,clif_parse_SolveCharName,2); + //parseable_packet(0x0953,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x095b,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0960,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0969,26,clif_parse_PartyInvite2,2); +// 2016-07-27bRagexeRE +#elif PACKETVER == 20160727 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + //parseable_packet(0x023b,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0362,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0363,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0436,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0438,6,clif_parse_TickSend,2); + parseable_packet(0x07ec,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0866,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0868,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0869,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0874,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0877,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0883,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0887,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x088e,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0891,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x089f,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x08a2,36,clif_parse_StoragePassword,0); + parseable_packet(0x08a4,6,clif_parse_SolveCharName,2); + parseable_packet(0x08a7,6,clif_parse_TakeItem,2); + parseable_packet(0x092e,5,clif_parse_WalkToXY,2); + parseable_packet(0x0936,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0941,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0946,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0949,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0951,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x095f,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0966,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0969,-1,clif_parse_ItemListWindowSelected,2,4,8); +// 2016-08-03bRagexeRE +#elif PACKETVER == 20160803 + parseable_packet(0x0364,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x085d,6,clif_parse_ReqClickBuyingStore,2); + //parseable_packet(0x0878,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x087f,5,clif_parse_WalkToXY,2); + parseable_packet(0x0881,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0886,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0887,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0888,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x088b,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0891,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0895,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x089c,6,clif_parse_DropItem,2,4); + parseable_packet(0x089e,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x08a1,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x091b,6,clif_parse_TakeItem,2); + parseable_packet(0x0929,36,clif_parse_StoragePassword,0); + parseable_packet(0x0930,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0932,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0934,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0937,10,clif_parse_UseSkillToPos,2,4,6,8); + //parseable_packet(0x093a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x093e,6,clif_parse_TickSend,2); + parseable_packet(0x093f,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0952,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0955,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0956,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0959,6,clif_parse_SolveCharName,2); + parseable_packet(0x095a,26,clif_parse_PartyInvite2,2); + parseable_packet(0x096a,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); +// 2016-08-10aRagexeRE +#elif PACKETVER == 20160810 + parseable_packet(0x0361,36,clif_parse_StoragePassword,0); + parseable_packet(0x0819,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0838,26,clif_parse_PartyInvite2,2); + parseable_packet(0x085d,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x085e,6,clif_parse_DropItem,2,4); + parseable_packet(0x085f,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0860,6,clif_parse_SolveCharName,2); + parseable_packet(0x086f,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0875,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0879,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x087a,5,clif_parse_WalkToXY,2); + parseable_packet(0x0885,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0888,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0890,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x089d,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x089f,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x08a9,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x091a,6,clif_parse_TakeItem,2); + parseable_packet(0x091b,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x091c,10,clif_parse_UseSkillToId,2,4,6); + //parseable_packet(0x0926,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x092b,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x092d,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0935,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0943,6,clif_parse_TickSend,2); + parseable_packet(0x094b,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0959,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x095b,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0967,8,NULL,0); // CZ_JOIN_BATTLE_FIELD +// 2016-08-31bRagexeRE +#elif PACKETVER == 20160831 + parseable_packet(0x022d,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0366,6,clif_parse_DropItem,2,4); + parseable_packet(0x07ec,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0835,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0865,5,clif_parse_WalkToXY,2); + parseable_packet(0x086d,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0870,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0874,26,clif_parse_PartyInvite2,2); + //parseable_packet(0x0876,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0878,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x087c,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x08a8,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x08a9,6,clif_parse_TickSend,2); + parseable_packet(0x0917,36,clif_parse_StoragePassword,0); + //parseable_packet(0x091b,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x092c,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x092e,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0938,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x093a,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0946,6,clif_parse_SolveCharName,2); + parseable_packet(0x094a,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x094f,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0950,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0954,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0957,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x095e,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0960,6,clif_parse_TakeItem,2); + parseable_packet(0x0964,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0967,10,clif_parse_UseSkillToId,2,4,6); +// 2016-09-07aRagexeRE +#elif PACKETVER == 20160907 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x091c,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-09-13aRagexeRE +#elif PACKETVER == 20160913 + parseable_packet(0x0361,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0817,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x085b,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0865,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0874,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0875,6,clif_parse_TickSend,2); + parseable_packet(0x0879,6,clif_parse_DropItem,2,4); + //parseable_packet(0x087a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x087b,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0887,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0889,6,clif_parse_TakeItem,2); + parseable_packet(0x088e,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x088f,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0891,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0892,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x089b,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x089c,36,clif_parse_StoragePassword,0); + parseable_packet(0x08a5,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0928,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0935,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x093a,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0949,26,clif_parse_PartyInvite2,2); + parseable_packet(0x094a,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0950,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0952,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0954,5,clif_parse_WalkToXY,2); + //parseable_packet(0x0962,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0963,6,clif_parse_SolveCharName,2); + parseable_packet(0x0968,2,clif_parse_ReqCloseBuyingStore,0); +// 2016-09-21bRagexeRE +#elif PACKETVER == 20160921 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x094a,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-09-28dRagexeRE +#elif PACKETVER == 20160928 + parseable_packet(0x0202,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0366,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0436,6,clif_parse_ReqClickBuyingStore,2); + //parseable_packet(0x0811,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0838,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0864,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0866,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x086d,6,clif_parse_DropItem,2,4); + parseable_packet(0x0872,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0878,6,clif_parse_SolveCharName,2); + parseable_packet(0x087f,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0889,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x088e,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0897,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x089a,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08a2,36,clif_parse_StoragePassword,0); + parseable_packet(0x08a9,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0919,5,clif_parse_WalkToXY,2); + parseable_packet(0x091e,6,clif_parse_TickSend,2); + parseable_packet(0x0927,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x092d,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0944,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x094d,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x094e,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0953,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0955,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0957,6,clif_parse_TakeItem,2); + //parseable_packet(0x095a,4,NULL,0); // CZ_GANGSI_RANK +// 2016-10-05aRagexeRE +#elif PACKETVER == 20161005 + parseable_packet(0x0202,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0838,36,clif_parse_StoragePassword,0); + parseable_packet(0x0863,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0886,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x088e,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0891,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0892,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x089b,26,clif_parse_PartyInvite2,2); + parseable_packet(0x089c,6,clif_parse_TakeItem,2); + parseable_packet(0x08a0,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08ac,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x08ad,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0918,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0919,6,clif_parse_SolveCharName,2); + //parseable_packet(0x091e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x092b,6,clif_parse_TickSend,2); + parseable_packet(0x0931,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0932,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x093b,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0942,6,clif_parse_DropItem,2,4); + parseable_packet(0x0944,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0945,5,clif_parse_WalkToXY,2); + parseable_packet(0x094a,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x094d,5,clif_parse_HomMenu,2,4); + //parseable_packet(0x0952,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x095a,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x095b,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0967,10,clif_parse_UseSkillToId,2,4,6); +// 2016-10-12aRagexeRE +#elif PACKETVER == 20161012 + parseable_packet(0x023b,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + parseable_packet(0x0364,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0365,6,clif_parse_TickSend,2); + parseable_packet(0x0369,26,clif_parse_PartyInvite2,2); + parseable_packet(0x07ec,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0819,26,clif_parse_FriendsListAdd,2); + //parseable_packet(0x085b,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x085e,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0863,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0868,6,clif_parse_TakeItem,2); + parseable_packet(0x086d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0872,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0875,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0880,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0893,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a0,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x092d,6,clif_parse_SolveCharName,2); + parseable_packet(0x0936,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0937,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0939,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0943,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0944,8,clif_parse_MoveFromKafra,2,4); + //parseable_packet(0x094f,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0951,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x095c,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0962,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0966,5,clif_parse_WalkToXY,2); + parseable_packet(0x0967,36,clif_parse_StoragePassword,0); +// 2016-10-19aRagexeRE +#elif PACKETVER == 20161019 + parseable_packet(0x022d,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0361,5,clif_parse_WalkToXY,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0889,36,clif_parse_StoragePassword,0); + //parseable_packet(0x0892,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0946,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0963,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-10-26bRagexeRE +#elif PACKETVER == 20161026 + parseable_packet(0x0363,36,clif_parse_StoragePassword,0); + parseable_packet(0x0438,5,clif_parse_WalkToXY,2); + parseable_packet(0x0802,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x085a,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x085f,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0861,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0862,6,clif_parse_TickSend,2); + parseable_packet(0x086a,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x086c,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + //parseable_packet(0x086e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x087a,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + //parseable_packet(0x087c,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x087f,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0886,6,clif_parse_DropItem,2,4); + parseable_packet(0x0891,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0894,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0898,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x091a,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x091b,6,clif_parse_TakeItem,2); + parseable_packet(0x0926,6,clif_parse_SolveCharName,2); + parseable_packet(0x092c,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x092e,5,clif_parse_HomMenu,2,4); + parseable_packet(0x092f,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0930,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x094b,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0953,26,clif_parse_PartyInvite2,2); + parseable_packet(0x095c,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x095e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0962,5,clif_parse_ChangeDir,2,4); +// 2016-11-03aRagexeRE +#elif PACKETVER == 20161103 + parseable_packet(0x0361,8,clif_parse_MoveFromKafra,2,4); + //parseable_packet(0x0367,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0436,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0802,6,clif_parse_TakeItem,2); + parseable_packet(0x0838,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x083c,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x085f,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0869,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x086c,2,clif_parse_SearchStoreInfoNextPage,0); + //parseable_packet(0x086f,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0874,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0886,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x088f,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0890,6,clif_parse_DropItem,2,4); + parseable_packet(0x089f,26,clif_parse_PartyInvite2,2); + parseable_packet(0x08a2,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x08aa,5,clif_parse_WalkToXY,2); + parseable_packet(0x091b,36,clif_parse_StoragePassword,0); + parseable_packet(0x0922,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0925,6,clif_parse_SolveCharName,2); + parseable_packet(0x0928,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x092f,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0936,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0946,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0949,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x095e,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0964,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0965,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0966,6,clif_parse_TickSend,2); +// 2016-11-09bRagexeRE +#elif PACKETVER == 20161109 + parseable_packet(0x02c4,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0361,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0362,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,6,clif_parse_TickSend,2); + parseable_packet(0x0366,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,6,clif_parse_SolveCharName,2); + parseable_packet(0x085d,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x085e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0865,5,clif_parse_WalkToXY,2); + parseable_packet(0x086a,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x086d,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0870,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0876,6,clif_parse_ReqClickBuyingStore,2); + //parseable_packet(0x087a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0881,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x088e,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0891,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0898,6,clif_parse_TakeItem,2); + parseable_packet(0x089a,6,clif_parse_DropItem,2,4); + parseable_packet(0x089d,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + //parseable_packet(0x089f,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x08a7,5,clif_parse_HomMenu,2,4); + parseable_packet(0x08ad,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0927,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0937,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x093c,36,clif_parse_StoragePassword,0); + parseable_packet(0x093f,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0954,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0956,5,clif_parse_ChangeDir,2,4); +// 2016-11-16cRagexeRE +#elif PACKETVER == 20161116 + parseable_packet(0x0368,6,clif_parse_TickSend,2); + parseable_packet(0x0369,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0835,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x085f,6,clif_parse_DropItem,2,4); + parseable_packet(0x0864,26,clif_parse_PartyInvite2,2); + parseable_packet(0x086f,6,clif_parse_TakeItem,2); + parseable_packet(0x0885,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x088b,5,clif_parse_HomMenu,2,4); + parseable_packet(0x088d,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x088f,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0890,5,clif_parse_WalkToXY,2); + parseable_packet(0x0892,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0893,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08a1,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x08a2,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x08aa,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x08ac,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0920,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0925,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x092a,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0931,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x093c,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x094a,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0952,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0957,6,clif_parse_SolveCharName,2); + parseable_packet(0x095b,36,clif_parse_StoragePassword,0); + //parseable_packet(0x095d,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x095f,2,clif_parse_SearchStoreInfoNextPage,0); + //parseable_packet(0x0967,8,NULL,0); // CZ_JOIN_BATTLE_FIELD +// 2016-11-23aRagexeRE +#elif PACKETVER == 20161123 + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0362,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0437,6,clif_parse_TickSend,2); + parseable_packet(0x085c,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0861,5,clif_parse_WalkToXY,2); + parseable_packet(0x0862,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0866,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x086f,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0871,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x087f,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0880,36,clif_parse_StoragePassword,0); + parseable_packet(0x0882,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x088b,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x089c,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x08a9,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x08aa,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x091a,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0926,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x092a,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x092f,6,clif_parse_TakeItem,2); + parseable_packet(0x0930,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0941,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x094d,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x094f,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + //parseable_packet(0x095a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x095b,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0962,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x096a,6,clif_parse_SolveCharName,2); +// 2016-11-30bRagexeRE +#elif PACKETVER == 20161130 + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,6,clif_parse_TickSend,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + //parseable_packet(0x088f,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0931,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0943,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0954,36,clif_parse_StoragePassword,0); + parseable_packet(0x0959,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-12-07eRagexeRE +#elif PACKETVER == 20161207 + parseable_packet(0x023b,5,clif_parse_HomMenu,2,4); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0867,26,clif_parse_FriendsListAdd,2); + //parseable_packet(0x0868,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0875,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x087e,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0886,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08a1,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x08a2,6,clif_parse_TakeItem,2); + parseable_packet(0x08ad,6,clif_parse_DropItem,2,4); + parseable_packet(0x0918,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x091d,8,clif_parse_MoveFromKafra,2,4); + //parseable_packet(0x0943,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x095d,36,clif_parse_StoragePassword,0); + parseable_packet(0x0965,26,clif_parse_PartyInvite2,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-12-14bRagexeRE +#elif PACKETVER == 20161214 + parseable_packet(0x022d,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0281,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x02c4,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0364,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0436,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + //parseable_packet(0x0819,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085a,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0862,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x086d,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0887,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0895,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0899,36,clif_parse_StoragePassword,0); + parseable_packet(0x08a6,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x092e,6,clif_parse_TakeItem,2); + parseable_packet(0x093d,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2016-12-21aRagexeRE +#elif PACKETVER == 20161221 + parseable_packet(0x035f,6,clif_parse_TakeItem,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + parseable_packet(0x0366,6,clif_parse_SolveCharName,2); + parseable_packet(0x0438,5,clif_parse_WalkToXY,2); + parseable_packet(0x0817,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x085b,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0866,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0876,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0881,6,clif_parse_GetCharNameRequest,2); + //parseable_packet(0x0884,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0885,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x088c,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0890,36,clif_parse_StoragePassword,0); + //parseable_packet(0x0899,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x089a,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x089b,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x08aa,6,clif_parse_TickSend,2); + parseable_packet(0x091e,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0926,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0928,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x092c,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x092e,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0930,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0943,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0946,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x094b,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x095a,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0964,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0965,5,clif_parse_ChangeDir,2,4); +// 2016-12-28aRagexeRE +#elif PACKETVER == 20161228 + parseable_packet(0x0362,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x085a,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x085e,5,clif_parse_HomMenu,4); + parseable_packet(0x0865,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x086a,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x086c,6,clif_parse_TakeItem,2); + parseable_packet(0x086d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0870,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0871,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0875,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x087f,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0886,5,clif_parse_WalkToXY,2); + parseable_packet(0x0889,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0893,6,clif_parse_DropItem,2,4); + parseable_packet(0x089f,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a2,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x08a3,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x08a5,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x08ab,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x08ac,6,clif_parse_SolveCharName,2); + parseable_packet(0x08ad,36,clif_parse_StoragePassword,0); + parseable_packet(0x091c,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0929,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x092c,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0934,26,clif_parse_PartyInvite2,2); + //parseable_packet(0x0935,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + //parseable_packet(0x0938,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x093d,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0944,6,clif_parse_TickSend,2); +// 2017-01-04bRagexeRE +#elif PACKETVER == 20170104 + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x085a,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x087f,36,clif_parse_StoragePassword,0); + parseable_packet(0x0896,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x091b,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0940,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-01-11aRagexeRE +#elif PACKETVER == 20170111 + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085d,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0877,26,clif_parse_FriendsListAdd,2); + //parseable_packet(0x087f,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x088a,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a1,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x08a3,6,clif_parse_TakeItem,2); + parseable_packet(0x08a6,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x091a,36,clif_parse_StoragePassword,0); + parseable_packet(0x091b,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0940,6,clif_parse_DropItem,2,4); + parseable_packet(0x094c,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0961,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0969,26,clif_parse_PartyInvite2,2); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-01-18aRagexeRE +#elif PACKETVER == 20170118 + parseable_packet(0x022d,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0364,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0436,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0862,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0865,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x086f,6,clif_parse_TakeItem,2); + //parseable_packet(0x0873,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x089e,26,clif_parse_PartyInvite2,2); + parseable_packet(0x08ad,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x091f,18,clif_parse_PartyBookingRegisterReq,2,4); + //parseable_packet(0x0927,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0933,6,clif_parse_DropItem,2,4); + parseable_packet(0x0958,36,clif_parse_StoragePassword,0); + parseable_packet(0x0962,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x096a,8,clif_parse_MoveToKafra,2,4); +// 2017-01-25aRagexeRE +#elif PACKETVER == 20170125 + parseable_packet(0x0438,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0811,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x086e,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0876,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0877,6,clif_parse_DropItem,2,4); + parseable_packet(0x0879,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x087b,6,clif_parse_TakeItem,2); + parseable_packet(0x087d,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0881,5,clif_parse_ChangeDir,2,4); + //parseable_packet(0x0884,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0893,36,clif_parse_StoragePassword,0); + //parseable_packet(0x0894,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0895,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0898,6,clif_parse_SolveCharName,2); + parseable_packet(0x089b,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x08a5,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x091b,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x091c,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x091d,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0920,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0929,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x092b,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0930,5,clif_parse_WalkToXY,2); + parseable_packet(0x093c,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0943,6,clif_parse_TickSend,2); + parseable_packet(0x0944,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x095c,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0965,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0968,2,clif_parse_SearchStoreInfoNextPage,0); +// 2017-02-01aRagexeRE +#elif PACKETVER == 20170201 + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0815,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085d,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x085e,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0875,6,clif_parse_TakeItem,2); + //parseable_packet(0x0879,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0881,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0884,5,clif_parse_WalkToXY,2); + parseable_packet(0x0885,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0886,36,clif_parse_StoragePassword,0); + parseable_packet(0x088b,6,clif_parse_DropItem,2,4); + //parseable_packet(0x08a4,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0919,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0920,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0938,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0940,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x094c,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0966,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0969,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-02-08aRagexeRE +#elif PACKETVER == 20170208 + //parseable_packet(0x02c4,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0367,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085c,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0860,5,clif_parse_ChangeDir,2,4); + //parseable_packet(0x087a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x088c,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0892,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x08a1,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x08ac,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0921,6,clif_parse_DropItem,2,4); + parseable_packet(0x0923,6,clif_parse_TakeItem,2); + parseable_packet(0x092d,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0932,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0937,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-02-15aRagexeRE +#elif PACKETVER == 20170215 + parseable_packet(0x02c4,36,clif_parse_StoragePassword,0); + parseable_packet(0x035f,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0360,6,clif_parse_TickSend,2); + parseable_packet(0x0811,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x083c,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x085c,6,clif_parse_DropItem,2,4); + parseable_packet(0x0876,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x087c,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x087d,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x087e,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0883,6,clif_parse_SolveCharName,2); + //parseable_packet(0x0884,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x088a,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x088b,26,clif_parse_PartyInvite2,2); + parseable_packet(0x088c,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0890,10,clif_parse_UseSkillToPos,2,4,6,8); + //parseable_packet(0x0896,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x089b,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a2,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x08a8,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x091c,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0925,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x092b,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x092d,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0942,6,clif_parse_TakeItem,2); + parseable_packet(0x094e,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x095f,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0962,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0969,5,clif_parse_WalkToXY,2); +// 2017-02-22aRagexeRE +#elif PACKETVER == 20170222 + parseable_packet(0x0202,5,clif_parse_HomMenu,2,4); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085f,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0866,6,clif_parse_DropItem,2,4); + parseable_packet(0x0870,18,clif_parse_PartyBookingRegisterReq,2,4); + //parseable_packet(0x0871,4,NULL,0); // CZ_GANGSI_RANK + //parseable_packet(0x0877,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0889,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0894,6,clif_parse_TakeItem,2); + parseable_packet(0x08a3,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x08a8,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0937,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0939,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0943,36,clif_parse_StoragePassword,0); + parseable_packet(0x095d,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0962,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-02-28aRagexeRE +#elif PACKETVER == 20170228 + parseable_packet(0x022d, 6, clif_parse_DropItem, 2, 4); + parseable_packet(0x0360, 7, clif_parse_ActionRequest, 2, 6); + parseable_packet(0x0362, 5, clif_parse_HomMenu, 2, 4); + parseable_packet(0x0819, 12, clif_parse_SearchStoreInfoListItemClick, 2, 6, 10); + parseable_packet(0x085e, 90, clif_parse_UseSkillToPosMoreInfo, 2, 4, 6, 8, 10); + parseable_packet(0x0863, -1, clif_parse_SearchStoreInfo, 2, 4, 5, 9, 13, 14, 15); + parseable_packet(0x086b, 19, clif_parse_WantToConnection, 2, 6, 10, 14, 18); + parseable_packet(0x0873, -1, clif_parse_ItemListWindowSelected, 2, 4, 8); + parseable_packet(0x0874, -1, clif_parse_ReqOpenBuyingStore, 2, 4, 8, 9, 89); + parseable_packet(0x0876, 2, clif_parse_ReqCloseBuyingStore, 0); + parseable_packet(0x0883, 2, clif_parse_SearchStoreInfoNextPage, 0); + parseable_packet(0x0884, 5, clif_parse_WalkToXY, 2); + parseable_packet(0x0889, 5, clif_parse_ChangeDir, 2, 4); + parseable_packet(0x0893, 6, clif_parse_GetCharNameRequest, 2); + parseable_packet(0x089e, 8, clif_parse_MoveToKafra, 2, 4); + parseable_packet(0x08a0, 26, clif_parse_FriendsListAdd, 2); + parseable_packet(0x08a2, 36, clif_parse_StoragePassword, 0); + //parseable_packet(0x08a6,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x08a7, 6, clif_parse_ReqClickBuyingStore, 2); + parseable_packet(0x091f, 10, clif_parse_UseSkillToId, 2, 4, 6); + parseable_packet(0x092a, 6, clif_parse_TakeItem, 2); + parseable_packet(0x092e, -1, clif_parse_ReqTradeBuyingStore, 2, 4, 8, 12); + parseable_packet(0x0937, 6, clif_parse_TickSend, 2); + //parseable_packet(0x093e,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0944, 8, clif_parse_MoveFromKafra, 2, 4); + parseable_packet(0x0947, 6, clif_parse_SolveCharName, 2); + parseable_packet(0x0948, 26, clif_parse_PartyInvite2, 2); + parseable_packet(0x0952, 10, clif_parse_UseSkillToPos, 2, 4, 6, 8); + parseable_packet(0x0955, 18, clif_parse_PartyBookingRegisterReq, 2, 4); +// 2017-03-08bRagexeRE +#elif PACKETVER == 20170308 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x087d,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-03-15cRagexeRE +#elif PACKETVER == 20170315 + parseable_packet(0x02c4,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x035f,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0360,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0366,6,clif_parse_TakeItem,2); + parseable_packet(0x0367,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0436,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x07ec,6,clif_parse_TickSend,2); + //parseable_packet(0x085c,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0863,5,clif_parse_HomMenu,2,4); + parseable_packet(0x086a,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0872,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x087b,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0884,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x088b,18,clif_parse_PartyBookingRegisterReq,2,4); + //parseable_packet(0x088d,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x088f,5,clif_parse_WalkToXY,2); + parseable_packet(0x0892,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x089c,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x08aa,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x091a,6,clif_parse_DropItem,2,4); + parseable_packet(0x091b,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x091d,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0920,6,clif_parse_SolveCharName,2); + parseable_packet(0x0922,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0944,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x094a,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x094e,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0950,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0952,36,clif_parse_StoragePassword,0); +// 2017-03-22aRagexeRE +#elif PACKETVER == 20170322 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x091a,36,clif_parse_StoragePassword,0); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-03-29dRagexeRE +#elif PACKETVER == 20170329 + parseable_packet(0x0281,26,clif_parse_PartyInvite2,2); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0363,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085d,36,clif_parse_StoragePassword,0); + parseable_packet(0x087a,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0888,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x08a8,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0917,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0926,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0929,6,clif_parse_TakeItem,2); + parseable_packet(0x092e,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0937,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0939,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0949,8,clif_parse_MoveFromKafra,2,4); + //parseable_packet(0x095f,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-04-05bRagexeRE +#elif PACKETVER == 20170405 + parseable_packet(0x022d,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0281,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0363,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,6,clif_parse_TakeItem,2); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085f,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0860,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0864,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0865,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x086f,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0893,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x08a5,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x094c,36,clif_parse_StoragePassword,0); + //parseable_packet(0x094f,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0964,6,clif_parse_DropItem,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-04-12aRagexeRE +#elif PACKETVER == 20170412 + parseable_packet(0x023b,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0365,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0863,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0869,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x086d,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0878,5,clif_parse_WalkToXY,2); + //parseable_packet(0x0879,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x087b,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x088b,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0890,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0893,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0898,6,clif_parse_SolveCharName,2); + parseable_packet(0x089a,5,clif_parse_HomMenu,2,4); + parseable_packet(0x089c,6,clif_parse_DropItem,2,4); + parseable_packet(0x08a1,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x091a,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x091e,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0929,6,clif_parse_TickSend,2); + //parseable_packet(0x092e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0938,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0942,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0945,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0949,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x094f,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0952,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0959,6,clif_parse_TakeItem,2); + parseable_packet(0x095b,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x095c,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x095d,36,clif_parse_StoragePassword,0); +// 2017-04-19bRagexeRE +#elif PACKETVER == 20170419 + parseable_packet(0x0811,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0819,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0838,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x085a,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x085e,5,clif_parse_WalkToXY,2); + parseable_packet(0x0862,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0868,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x086a,18,clif_parse_PartyBookingRegisterReq,2,4); + //parseable_packet(0x0872,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0881,36,clif_parse_StoragePassword,0); + parseable_packet(0x088d,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x088f,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0897,6,clif_parse_DropItem,2,4); + parseable_packet(0x0898,6,clif_parse_TickSend,2); + parseable_packet(0x089d,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x08aa,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x091b,6,clif_parse_SolveCharName,2); + parseable_packet(0x0920,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0922,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0930,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0931,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0935,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x093a,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x093f,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0942,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x095c,6,clif_parse_TakeItem,2); + parseable_packet(0x095d,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + //parseable_packet(0x0963,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0965,6,clif_parse_ReqClickBuyingStore,2); +// 2017-04-26dRagexeRE +#elif PACKETVER == 20170426 + parseable_packet(0x0281,36,clif_parse_StoragePassword,0); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0866,-1,clif_parse_ItemListWindowSelected,2,4,8); + //parseable_packet(0x086f,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x087a,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0887,6,clif_parse_SolveCharName,2); + parseable_packet(0x0899,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x089c,5,clif_parse_HomMenu,2,4); + parseable_packet(0x08a2,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x08a4,6,clif_parse_TakeItem,2); + //parseable_packet(0x091f,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0927,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0940,6,clif_parse_DropItem,2,4); + parseable_packet(0x0958,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0963,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-05-02dRagexeRE +#elif PACKETVER == 20170502 + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x035f,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07e4,6,clif_parse_TakeItem,2); + parseable_packet(0x07ec,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0875,36,clif_parse_StoragePassword,0); + parseable_packet(0x0894,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x089c,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x093c,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0950,5,clif_parse_HomMenu,2,4); + parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); +// 2017-05-17aRagexeRE +#elif PACKETVER == 20170517 + //parseable_packet(0x0364,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0367,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0437,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0802,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0815,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0817,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0868,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0875,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x087b,6,clif_parse_SolveCharName,2); + parseable_packet(0x087d,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x088c,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x088d,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0894,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0896,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0899,26,clif_parse_PartyInvite2,2); + //parseable_packet(0x089e,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x089f,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x08a2,6,clif_parse_TickSend,2); + parseable_packet(0x08a8,5,clif_parse_WalkToXY,2); + parseable_packet(0x08aa,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x091b,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0923,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x093b,6,clif_parse_DropItem,2,4); + parseable_packet(0x0945,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0946,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0947,36,clif_parse_StoragePassword,0); + parseable_packet(0x0958,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0960,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0964,6,clif_parse_TakeItem,2); +// 2017-05-24aRagexeRE +#elif PACKETVER == 20170524 + parseable_packet(0x0364,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0368,36,clif_parse_StoragePassword,0); + parseable_packet(0x0802,6,clif_parse_DropItem,2,4); + parseable_packet(0x085e,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x085f,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0860,6,clif_parse_TickSend,2); + parseable_packet(0x0864,6,clif_parse_TakeItem,2); + parseable_packet(0x0866,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0868,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x086d,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0873,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0874,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x087d,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0882,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x088d,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0894,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x089c,5,clif_parse_WalkToXY,2); + parseable_packet(0x08a1,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + //parseable_packet(0x091e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0923,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0925,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0934,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0946,10,clif_parse_UseSkillToPos,2,4,6,8); + //parseable_packet(0x0958,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x095a,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x095b,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0964,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0967,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0968,6,clif_parse_SolveCharName,2); +// 2017-05-31aRagexeRE +#elif PACKETVER == 20170531 + parseable_packet(0x0361,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0369,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x07e4,5,clif_parse_WalkToXY,2); + parseable_packet(0x07ec,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0819,6,clif_parse_TickSend,2); + //parseable_packet(0x085b,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x085f,6,clif_parse_SolveCharName,2); + parseable_packet(0x0861,26,clif_parse_FriendsListAdd,2); + //parseable_packet(0x0868,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0873,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0875,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0878,26,clif_parse_PartyInvite2,2); + parseable_packet(0x087b,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0885,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x088b,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x088d,6,clif_parse_DropItem,2,4); + parseable_packet(0x0894,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x089a,36,clif_parse_StoragePassword,0); + parseable_packet(0x089c,5,clif_parse_HomMenu,4); + parseable_packet(0x08a2,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x08ac,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x08ad,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x092d,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0933,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0937,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0940,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0945,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0963,6,clif_parse_TakeItem,2); + parseable_packet(0x0968,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); +// 2017-06-07cRagexeRE +#elif PACKETVER == 20170607 + parseable_packet(0x0361,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x0364,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x07e4,6,clif_parse_TickSend,2); + parseable_packet(0x085a,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x085e,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0862,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0863,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0864,6,clif_parse_DropItem,2,4); + parseable_packet(0x0871,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x0873,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0875,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x0885,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x088a,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0897,6,clif_parse_TakeItem,2); + parseable_packet(0x089d,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a9,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x08ab,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0917,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0918,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0919,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0925,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0927,10,clif_parse_UseSkillToPos,2,4,6,8); + //parseable_packet(0x0931,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0934,5,clif_parse_WalkToXY,2); + parseable_packet(0x0938,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x093d,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0942,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0944,6,clif_parse_SolveCharName,2); + parseable_packet(0x0949,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); +#endif + +#endif /* _CLIF_SHUFFLE_H_ */ diff --git a/src/map/map-server.vcxproj.filters b/src/map/map-server.vcxproj.filters index b78f42f62a..751815681b 100644 --- a/src/map/map-server.vcxproj.filters +++ b/src/map/map-server.vcxproj.filters @@ -131,6 +131,15 @@ <ClInclude Include="clan.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="clif_obfuscation.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="clif_packetdb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="clif_shuffle.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="atcommand.c"> diff --git a/src/map/pc.c b/src/map/pc.c index c941e0dd24..ee1c222f6f 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1228,10 +1228,10 @@ bool pc_authok(struct map_session_data *sd, uint32 login_id2, time_t expiration_ //display login notice ShowInfo("'"CL_WHITE"%s"CL_RESET"' logged in." " (AID/CID: '"CL_WHITE"%d/%d"CL_RESET"'," - " Packet Ver: '"CL_WHITE"%d"CL_RESET"', IP: '"CL_WHITE"%d.%d.%d.%d"CL_RESET"'," + " IP: '"CL_WHITE"%d.%d.%d.%d"CL_RESET"'," " Group '"CL_WHITE"%d"CL_RESET"').\n", sd->status.name, sd->status.account_id, sd->status.char_id, - sd->packet_ver, CONVIP(ip), sd->group_id); + CONVIP(ip), sd->group_id); // Send friends list clif_friendslist_send(sd); diff --git a/src/map/pc.h b/src/map/pc.h index 3853d8294d..7e72a76b9e 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -289,7 +289,6 @@ struct map_session_data { int count_rewarp; //count how many time we being rewarped int langtype; - uint32 packet_ver; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 ... 18 struct mmo_charstatus status; // Item Storages diff --git a/src/map/script.c b/src/map/script.c index e7bcfbae7a..1303898aba 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -21284,36 +21284,6 @@ BUILDIN_FUNC(party_destroy) return SCRIPT_CMD_SUCCESS; } -/** Checks if a player's client version meets a required version or date. -* @param type: 0 - check by version number; 1 - check by date -* @param data: Input -*/ -BUILDIN_FUNC(is_clientver) { - TBL_PC *sd = NULL; - int type; - int data; - int ret = 0; - - if ( !script_charid2sd(4,sd) ) { - script_pushint(st,0); - return SCRIPT_CMD_FAILURE; - } - - type = script_getnum(st,2); - data = script_getnum(st,3); - - switch(type){ - case 0: - ret = (sd->packet_ver >= data)?1:0; - break; - case 1: - ret = (sd->packet_ver >= date2version(data))?1:0; - break; - } - script_pushint(st,ret); - return SCRIPT_CMD_SUCCESS; -} - /** Returns various information about a player's VIP status. Need to enable VIP system * vip_status <type>,{"<character name>"}; * @param type: Info type, see enum vip_status_type @@ -23758,7 +23728,6 @@ struct script_function buildin_func[] = { BUILDIN_DEF(clan_join,"i?"), BUILDIN_DEF(clan_leave,"?"), - BUILDIN_DEF(is_clientver,"ii?"), BUILDIN_DEF2(montransform, "transform", "vi?????"), // Monster Transform [malufett/Hercules] BUILDIN_DEF2(montransform, "active_transform", "vi?????"), BUILDIN_DEF(vip_status,"i?"), From 574c75394584bf2b9340a3d503d2284e3b683f6a Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 16 Jul 2017 05:28:03 +0200 Subject: [PATCH 017/124] Follow up to f0ab8d2 Fixed #2266 Thanks to @hendra814 --- src/map/clif_packetdb.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/map/clif_packetdb.h b/src/map/clif_packetdb.h index 52bb6331fd..eb6551c89f 100644 --- a/src/map/clif_packetdb.h +++ b/src/map/clif_packetdb.h @@ -2030,6 +2030,10 @@ parseable_packet(0x0879,41,clif_parse_PartyBookingRegisterReq,2,4,6); #endif +#if PACKETVER >= 20121212 + packet(0x08C7,20); +#endif + // 2013-03-20Ragexe (Judas) #if PACKETVER >= 20130320 parseable_packet(0x014f,6,clif_parse_GuildRequestInfo,2); @@ -2108,6 +2112,7 @@ #if PACKETVER >= 20130710 parseable_packet(0x0848,-1,clif_parse_cashshop_buy,2,6,4,10); packet(0x097D,288); //ZC_ACK_RANKING + packet(0x097E,12); //ZC_UPDATE_RANKING_POINT #endif // 2013-07-17Ragexe @@ -2143,7 +2148,6 @@ // 2013-12-23Ragexe #if PACKETVER >= 20131223 //New Packets - //packet(0x097E,12); //ZC_UPDATE_RANKING_POINT parseable_packet(0x09CE,102,clif_parse_GM_Item_Monster,2); parseable_packet(0x09D4,2,clif_parse_NPCShopClosed,0); //NPC Market @@ -2208,6 +2212,7 @@ packet(0x08e3,149); // New Packet packet(0x0A18,14); // ZC_ACCEPT_ENTER3 + packet(0x0A27,8); packet(0x0A28,3); // ZC_ACK_OPENSTORE2 packet(0x09FD,-1); // ZC_NOTIFY_MOVEENTRY11 packet(0x09FE,-1); // ZC_NOTIFY_NEWENTRY11 @@ -2298,6 +2303,21 @@ packet(0x0A7D,-1); #endif +// 2016-06-22aRagexeRE +#if PACKETVER >= 20160622 + packet(0x0A84,94); +#endif + +// 2016-09-21bRagexeRE +#if PACKETVER >= 20160921 + packet(0x0A37,59); +#endif + +// 2016-10-26bRagexeRE +#if PACKETVER >= 20161026 + packet(0x0AA5,-1); +#endif + // 2017-05-02dRagexeRE #if PACKETVER >= 20170502 packet(0x0A43,85); From d86c8a81be0e07fc8ce8d92d3a7ce9c10fa8b5f6 Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Sun, 16 Jul 2017 10:05:17 -0400 Subject: [PATCH 018/124] Expanded script command unitstopwalk (#2258) Fixes #2254. Added an optional flag to specify the types of methods to stop a unit from walking. Created an enum for the unit_stop_walking flags. Thanks to @Yuchinin and @Lemongrass3110! --- doc/script_commands.txt | 10 +++++++++- src/map/script.c | 10 +++++++--- src/map/script_constants.h | 8 ++++++++ src/map/unit.c | 18 +++++++++--------- src/map/unit.h | 10 ++++++++++ 5 files changed, 43 insertions(+), 13 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index da1ef38a82..b0e20c81d5 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -7370,7 +7370,7 @@ This command will make a <GID> stop attacking. --------------------------------------- -*unitstopwalk <GID>; +*unitstopwalk <GID>{,<flag>}; This command will make a <GID> stop moving. @@ -7378,6 +7378,14 @@ Note: If this is called from OnTouch, then the walktimer attached to the unit is removed from OnTouch which causes this command to not stop the unit from walking. Suggest to use 'unitblockmove' to forcefully stop the unit with OnTouch. +The <flag> value affects how the unit is stopped. The following flags are bitwise +values (can be combined using the pipe operator): + USW_NONE = Unit will keep walking to their original destination. + USW_FIXPOS = Issue a fixpos packet afterwards. + USW_MOVE_ONCE = Force the unit to move one cell if it hasn't yet. + USW_MOVE_FULL_CELL = Enable moving to the next cell when unit was already half-way there (may cause on-touch/place side-effects, such as a scripted map change). + USW_FORCE_STOP = Force stop moving. + --------------------------------------- *unittalk <GID>,"<text>"{,flag}; diff --git a/src/map/script.c b/src/map/script.c index 1303898aba..a5fa34db4d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -18317,13 +18317,17 @@ BUILDIN_FUNC(unitstopattack) /// Makes the unit stop walking. /// -/// unitstopwalk <unit_id>; +/// unitstopwalk <unit_id>{,<flag>}; BUILDIN_FUNC(unitstopwalk) { struct block_list* bl; + int flag = USW_NONE; + + if (script_hasdata(st, 3)) + flag = script_getnum(st, 3); if(script_rid2bl(2,bl)) - unit_stop_walking(bl, 0); + unit_stop_walking(bl, flag); return SCRIPT_CMD_SUCCESS; } @@ -23592,7 +23596,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(unitwarp,"isii"), BUILDIN_DEF(unitattack,"iv?"), BUILDIN_DEF(unitstopattack,"i"), - BUILDIN_DEF(unitstopwalk,"i"), + BUILDIN_DEF(unitstopwalk,"i?"), BUILDIN_DEF(unittalk,"is?"), BUILDIN_DEF(unitemote,"ii"), BUILDIN_DEF(unitskilluseid,"ivi??"), // originally by Qamera [Celest] diff --git a/src/map/script_constants.h b/src/map/script_constants.h index daf216e664..e74786e024 100644 --- a/src/map/script_constants.h +++ b/src/map/script_constants.h @@ -3814,6 +3814,14 @@ export_constant(IG_SPECIAL_CHRISTMAS_BOX); export_constant(IG_SANTA_GIFT); + /* unit stop walking */ + export_constant(USW_NONE); + export_constant(USW_FIXPOS); + export_constant(USW_MOVE_ONCE); + export_constant(USW_MOVE_FULL_CELL); + export_constant(USW_FORCE_STOP); + export_constant(USW_ALL); + #undef export_constant #undef export_constant2 #undef export_parameter diff --git a/src/map/unit.c b/src/map/unit.c index 8ca27a7f1e..91a47ead58 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1233,11 +1233,11 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type) * Stops a unit from walking * @param bl: Object to stop walking * @param type: Options - * &0x1: Issue a fixpos packet afterwards - * &0x2: Force the unit to move one cell if it hasn't yet - * &0x4: Enable moving to the next cell when unit was already half-way there + * USW_FIXPOS: Issue a fixpos packet afterwards + * USW_MOVE_ONCE: Force the unit to move one cell if it hasn't yet + * USW_MOVE_FULL_CELL: Enable moving to the next cell when unit was already half-way there * (may cause on-touch/place side-effects, such as a scripted map change) - * &0x8: Force stop moving, even if walktimer is currently INVALID_TIMER + * USW_FORCE_STOP: Force stop moving, even if walktimer is currently INVALID_TIMER * @return Success(1); Failed(0); */ int unit_stop_walking(struct block_list *bl,int type) @@ -1250,7 +1250,7 @@ int unit_stop_walking(struct block_list *bl,int type) ud = unit_bl2ud(bl); - if(!ud || (!(type&0x08) && ud->walktimer == INVALID_TIMER)) + if(!ud || (!(type&USW_FORCE_STOP) && ud->walktimer == INVALID_TIMER)) return 0; // NOTE: We are using timer data after deleting it because we know the @@ -1264,14 +1264,14 @@ int unit_stop_walking(struct block_list *bl,int type) ud->state.change_walk_target = 0; tick = gettick(); - if( (type&0x02 && !ud->walkpath.path_pos) // Force moving at least one cell. - || (type&0x04 && td && DIFF_TICK(td->tick, tick) <= td->data/2) // Enough time has passed to cover half-cell + if( (type&USW_MOVE_ONCE && !ud->walkpath.path_pos) // Force moving at least one cell. + || (type&USW_MOVE_FULL_CELL && td && DIFF_TICK(td->tick, tick) <= td->data/2) // Enough time has passed to cover half-cell ) { ud->walkpath.path_len = ud->walkpath.path_pos+1; unit_walktoxy_timer(INVALID_TIMER, tick, bl->id, ud->walkpath.path_pos); } - if(type&0x01) + if(type&USW_FIXPOS) clif_fixpos(bl); ud->walkpath.path_len = 0; @@ -1279,7 +1279,7 @@ int unit_stop_walking(struct block_list *bl,int type) ud->to_x = bl->x; ud->to_y = bl->y; - if(bl->type == BL_PET && type&~0xff) + if(bl->type == BL_PET && type&~USW_ALL) ud->canmove_tick = gettick() + (type>>8); // Re-added, the check in unit_set_walkdelay means dmg during running won't fall through to this place in code [Kevin] diff --git a/src/map/unit.h b/src/map/unit.h index f2d888c804..12af60a705 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -95,6 +95,16 @@ enum e_unit_blown { UB_TARGET_TRAP, // Target is a trap that cannot be knocked back }; +/// Enum for unit_stop_walking +enum e_unit_stop_walking { + USW_NONE = 0x0, /// Unit will keep walking to their original destination + USW_FIXPOS = 0x1, /// Issue a fixpos packet afterwards + USW_MOVE_ONCE = 0x2, /// Force the unit to move one cell if it hasn't yet + USW_MOVE_FULL_CELL = 0x4, /// Enable moving to the next cell when unit was already half-way there (may cause on-touch/place side-effects, such as a scripted map change) + USW_FORCE_STOP = 0x8, /// Force stop moving, even if walktimer is currently INVALID_TIMER + USW_ALL = 0xf, +}; + // PC, MOB, PET // Does walk action for unit From 19d7c44298c363ffe938392687d9c22b3ca418e7 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 16 Jul 2017 16:15:34 +0200 Subject: [PATCH 019/124] Removed packet_db copy from VS project Thanks to @Everade --- src/map/map-server.vcxproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/map/map-server.vcxproj b/src/map/map-server.vcxproj index f47578fb56..f9461aa13a 100644 --- a/src/map/map-server.vcxproj +++ b/src/map/map-server.vcxproj @@ -338,7 +338,6 @@ <Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_race2_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_race2_db.txt')" /> <Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_random_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_random_db.txt')" /> <Copy SourceFiles="$(SolutionDir)db\import-tmpl\mob_skill_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\mob_skill_db.txt')" /> - <Copy SourceFiles="$(SolutionDir)db\import-tmpl\packet_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\packet_db.txt')" /> <Copy SourceFiles="$(SolutionDir)db\import-tmpl\pet_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\pet_db.txt')" /> <Copy SourceFiles="$(SolutionDir)db\import-tmpl\produce_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\produce_db.txt')" /> <Copy SourceFiles="$(SolutionDir)db\import-tmpl\quest_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\quest_db.txt')" /> From d324cd1e255367a8ec3654167b90062e6c07c80f Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 16 Jul 2017 16:36:46 +0200 Subject: [PATCH 020/124] Fixed a warning when obfuscation is disabled Thanks to @sader1992 and @Jeybla --- src/map/clif_obfuscation.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/map/clif_obfuscation.h b/src/map/clif_obfuscation.h index da7df952e0..b28f8591e6 100644 --- a/src/map/clif_obfuscation.h +++ b/src/map/clif_obfuscation.h @@ -4,6 +4,7 @@ #ifndef _CLIF_OBFUSCATION_H_ #define _CLIF_OBFUSCATION_H_ +#if defined(PACKET_OBFUSCATION) || defined(PACKET_OBFUSCATION_WARN) #define packet_keys(a,b,c) static unsigned int clif_cryptKey[] = { a, b, c }; #if defined(PACKET_OBFUSCATION_KEY1) || defined(PACKET_OBFUSCATION_KEY2) || defined(PACKET_OBFUSCATION_KEY3) @@ -343,5 +344,6 @@ #endif #undef packet_keys +#endif #endif /* _CLIF_OBFUSCATION_H_ */ From dae5030650ab3013e492d90f0dc5c74ef6970b3b Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 16 Jul 2017 22:29:48 +0200 Subject: [PATCH 021/124] Fixed unitwarp to unwalkable areas for NPCs Fixed #2270 Thanks to @Yuchinin --- src/map/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/unit.c b/src/map/unit.c index 91a47ead58..1ac34bb3d0 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1197,7 +1197,7 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type) return 2; } - } else if (map_getcell(m,x,y,CELL_CHKNOREACH)) { // Invalid target cell + } else if ( bl->type != BL_NPC && map_getcell(m,x,y,CELL_CHKNOREACH)) { // Invalid target cell ShowWarning("unit_warp: Specified non-walkable target cell: %d (%s) at [%d,%d]\n", m, map[m].name, x,y); if (!map_search_freecell(NULL, m, &x, &y, 4, 4, 1)) { // Can't find a nearby cell From df2c3e1645be0c22b0cb9e92ce45ac004ffe7c00 Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Mon, 17 Jul 2017 14:55:44 -0400 Subject: [PATCH 022/124] Fixed a compile warning for ADJUST_SKILL_DAMAGE * Fixes #2231. Thanks to @technoken! --- src/common/ers.c | 2 +- src/common/ers.h | 2 +- src/map/map.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/ers.c b/src/common/ers.c index 8903a57934..ef31fc92be 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -290,7 +290,7 @@ void ers_cache_size(ERS *self, unsigned int new_size) { } -ERS *ers_new(uint32 size, char *name, enum ERSOptions options) +ERS *ers_new(uint32 size, const char *name, enum ERSOptions options) { struct ers_instance_t *instance; CREATE(instance,struct ers_instance_t, 1); diff --git a/src/common/ers.h b/src/common/ers.h index 8a1f617540..c54d5999f4 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -162,7 +162,7 @@ typedef struct eri { * @param The requested size of the entry in bytes * @return Interface of the object */ -ERS *ers_new(uint32 size, char *name, enum ERSOptions options); +ERS *ers_new(uint32 size, const char *name, enum ERSOptions options); /** * Print a report about the current state of the Entry Reusage System. diff --git a/src/map/map.cpp b/src/map/map.cpp index f18e10d278..710e0f56cc 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -4697,7 +4697,7 @@ int do_init(int argc, char *argv[]) iwall_db = strdb_alloc(DB_OPT_RELEASE_DATA,2*NAME_LENGTH+2+1); // [Zephyrus] Invisible Walls #ifdef ADJUST_SKILL_DAMAGE - map_skill_damage_ers = ers_new(sizeof(struct s_skill_damage), "map.c:map_skill_damage_ers", ERS_OPT_NONE); + map_skill_damage_ers = ers_new(sizeof(struct s_skill_damage), "map.cpp:map_skill_damage_ers", ERS_OPT_NONE); #endif map_sql_init(); From e157e05c1c4fa23d89a9ea87136ed3ed4491608a Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 17 Jul 2017 23:00:03 +0200 Subject: [PATCH 023/124] Fixed file order in map-server project for VS --- src/map/map-server.vcxproj | 3 +++ src/map/map-server.vcxproj.filters | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/map/map-server.vcxproj b/src/map/map-server.vcxproj index f9461aa13a..477694b960 100644 --- a/src/map/map-server.vcxproj +++ b/src/map/map-server.vcxproj @@ -169,6 +169,9 @@ <ClInclude Include="chrif.h" /> <ClInclude Include="clan.h" /> <ClInclude Include="clif.h" /> + <ClInclude Include="clif_obfuscation.h" /> + <ClInclude Include="clif_packetdb.h" /> + <ClInclude Include="clif_shuffle.h" /> <ClInclude Include="date.h" /> <ClInclude Include="duel.h" /> <ClInclude Include="elemental.h" /> diff --git a/src/map/map-server.vcxproj.filters b/src/map/map-server.vcxproj.filters index 751815681b..2568e84f52 100644 --- a/src/map/map-server.vcxproj.filters +++ b/src/map/map-server.vcxproj.filters @@ -35,9 +35,21 @@ <ClInclude Include="chrif.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="clan.h"> + <Filter>Header Files</Filter> + </ClInclude> <ClInclude Include="clif.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="clif_obfuscation.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="clif_packetdb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="clif_shuffle.h"> + <Filter>Header Files</Filter> + </ClInclude> <ClInclude Include="date.h"> <Filter>Header Files</Filter> </ClInclude> @@ -128,18 +140,6 @@ <ClInclude Include="vending.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="clan.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="clif_obfuscation.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="clif_packetdb.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="clif_shuffle.h"> - <Filter>Header Files</Filter> - </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="atcommand.c"> @@ -166,6 +166,9 @@ <ClCompile Include="chrif.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="clan.c"> + <Filter>Source Files</Filter> + </ClCompile> <ClCompile Include="clif.c"> <Filter>Source Files</Filter> </ClCompile> @@ -259,8 +262,5 @@ <ClCompile Include="vending.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="clan.c"> - <Filter>Source Files</Filter> - </ClCompile> </ItemGroup> </Project> From 9eaabd5f6cefd13b49be015797a2929bfc460d9d Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 17 Jul 2017 23:25:55 +0200 Subject: [PATCH 024/124] Fixed mod permissions for private channels (#2262) --- src/map/channel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/map/channel.c b/src/map/channel.c index dc8bbcef90..8084dcbb10 100644 --- a/src/map/channel.c +++ b/src/map/channel.c @@ -115,6 +115,7 @@ struct Channel* channel_create_simple(char *name, char *pass, enum Channel_Type tmp_chan.opt = channel_config.private_channel.opt; tmp_chan.msg_delay = channel_config.private_channel.delay; tmp_chan.color = channel_config.private_channel.color; + tmp_chan.char_id = owner; break; default: return NULL; @@ -943,11 +944,12 @@ int channel_pcban(struct map_session_data *sd, char *chname, char *pname, int fl if (channel->char_id != sd->status.char_id) { sprintf(output, msg_txt(sd,1412), chname);// You're not the owner of channel '%s'. clif_displaymessage(sd->fd, output); + return -1; } else if (!channel_config.private_channel.ban) { sprintf(output, msg_txt(sd,765), chname); // You're not allowed to ban a player. clif_displaymessage(sd->fd, output); + return -1; } - return -1; } if(flag != 2 && flag != 3){ @@ -974,7 +976,7 @@ int channel_pcban(struct map_session_data *sd, char *chname, char *pname, int fl if( !db_size(channel->banned) ) { sprintf(output, msg_txt(sd,1439), chname);// Channel '%s' contains no banned players. clif_displaymessage(sd->fd, output); - return -1; + return 0; } } From 504b249d20ae8b54b8ea3ba81a6d3f5c5492a1e6 Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Tue, 18 Jul 2017 12:53:33 -0400 Subject: [PATCH 025/124] Updated Rogue Spirit potion bonus (#2225) * Fixes #2139. * Added missing 50% HP bonus. * Removed extra 50% SP bonus. * Cleaned up overall pc_itemheal function calculations. Thanks to @mrjnumber1 and @exneval, and @Lemongrass3110! --- src/map/pc.c | 87 ++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/src/map/pc.c b/src/map/pc.c index ee1c222f6f..e71f535c78 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5006,13 +5006,8 @@ int pc_useitem(struct map_session_data *sd,int n) else clif_useitemack(sd, n, 0, false); } - if(item.card[0]==CARD0_CREATE && - pc_famerank(MakeDWord(item.card[2],item.card[3]), MAPID_ALCHEMIST)) - { + if (item.card[0]==CARD0_CREATE && pc_famerank(MakeDWord(item.card[2],item.card[3]), MAPID_ALCHEMIST)) potion_flag = 2; // Famous player's potions have 50% more efficiency - if (sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ROGUE) - potion_flag = 3; //Even more effective potions. - } //Update item use time. sd->canuseitem_tick = tick + battle_config.item_use_interval; @@ -8273,56 +8268,59 @@ void pc_heal(struct map_session_data *sd,unsigned int hp,unsigned int sp, int ty return; } -/*========================================== - * HP/SP Recovery - * Heal player hp and/or sp linearly. - * Calculate bonus by status. - *------------------------------------------*/ -int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp) +/** + * Heal player HP and/or SP linearly. Calculate any bonus based on active statuses. + * @param sd: Player data + * @param itemid: Item ID + * @param hp: HP to heal + * @param sp: SP to heal + * @return Amount healed to an object + */ +int pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { int bonus, tmp, penalty = 0; - if(hp) { + if (hp) { int i; - bonus = 100 + (sd->battle_status.vit<<1) - + pc_checkskill(sd,SM_RECOVERY)*10 - + pc_checkskill(sd,AM_LEARNINGPOTION)*5; + + bonus = 100 + (sd->battle_status.vit << 1) + pc_checkskill(sd, SM_RECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5; // A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG] - if (potion_flag > 1) - bonus += bonus*(potion_flag-1)*50/100; + if (potion_flag == 2) { + bonus += 50; + if (sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ROGUE) + bonus += 100; // Receive an additional +100% effect from ranked potions to HP only + } //All item bonuses. bonus += sd->bonus.itemhealrate2; //Item Group bonuses - bonus += bonus*pc_get_itemgroup_bonus(sd, itemid)/100; + bonus += pc_get_itemgroup_bonus(sd, itemid); //Individual item bonuses. - for(i = 0; i < ARRAYLENGTH(sd->itemhealrate) && sd->itemhealrate[i].nameid; i++) - { + for(i = 0; i < ARRAYLENGTH(sd->itemhealrate) && sd->itemhealrate[i].nameid; i++) { if (sd->itemhealrate[i].nameid == itemid) { - bonus += bonus*sd->itemhealrate[i].rate/100; + bonus += sd->itemhealrate[i].rate; break; } } - tmp = hp * bonus / 100; // overflow check - if(bonus != 100 && tmp > hp) - hp = tmp; - // Recovery Potion - if( sd->sc.data[SC_INCHEALRATE] ) - hp += (int)(hp * sd->sc.data[SC_INCHEALRATE]->val1/100.); + if (sd->sc.data[SC_INCHEALRATE]) + bonus += sd->sc.data[SC_INCHEALRATE]->val1; // 2014 Halloween Event : Pumpkin Bonus - if(sd->sc.data[SC_MTF_PUMPKIN] && itemid == ITEMID_PUMPKIN) - hp += (int)(hp * sd->sc.data[SC_MTF_PUMPKIN]->val1 / 100.); - } - if(sp) { - bonus = 100 + (sd->battle_status.int_<<1) - + pc_checkskill(sd,MG_SRECOVERY)*10 - + pc_checkskill(sd,AM_LEARNINGPOTION)*5; - if (potion_flag > 1) - bonus += bonus*(potion_flag-1)*50/100; + if (sd->sc.data[SC_MTF_PUMPKIN] && itemid == ITEMID_PUMPKIN) + bonus += sd->sc.data[SC_MTF_PUMPKIN]->val1; - tmp = sp * bonus / 100; - if(bonus != 100 && tmp > sp) + tmp = hp * bonus / 100; // Overflow check + if (bonus != 100 && tmp > hp) + hp = tmp; + } + if (sp) { + bonus = 100 + (sd->battle_status.int_ << 1) + pc_checkskill(sd, MG_SRECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5; + // A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG] + if (potion_flag == 2) + bonus += 50; + + tmp = sp * bonus / 100; // Overflow check + if (bonus != 100 && tmp > sp) sp = tmp; } if (sd->sc.count) { @@ -8336,11 +8334,6 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp) if (sd->sc.data[SC_NORECOVER_STATE]) penalty = 100; - if (penalty > 0) { - hp -= hp * penalty / 100; - sp -= sp * penalty / 100; - } - if (sd->sc.data[SC_VITALITYACTIVATION]) { hp += hp / 2; // 1.5 times sp -= sp / 2; @@ -8350,6 +8343,12 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp) hp += hp / 10; sp += sp / 10; } + + if (penalty > 0) { + hp -= hp * penalty / 100; + sp -= sp * penalty / 100; + } + #ifdef RENEWAL if (sd->sc.data[SC_EXTREMITYFIST2]) sp = 0; From eda85943f7516bc8e90202c9978301d91a1585ea Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Tue, 18 Jul 2017 23:02:31 +0200 Subject: [PATCH 026/124] Fixed an issue with git hash lookup --- src/common/core.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/core.cpp b/src/common/core.cpp index 22f5a3d147..7d3ddbe530 100644 --- a/src/common/core.cpp +++ b/src/common/core.cpp @@ -247,9 +247,6 @@ const char* get_svn_revision(void) { } #endif -// GIT path -#define GIT_ORIGIN "refs/remotes/origin/master" - // Grabs the hash from the last time the user updated their working copy (last pull) const char *get_git_hash (void) { static char GitHash[41] = ""; //Sha(40) + 1 @@ -258,7 +255,8 @@ const char *get_git_hash (void) { if( GitHash[0] != '\0' ) return GitHash; - if( (fp = fopen(".git/" GIT_ORIGIN, "r")) != NULL ) { + if( (fp = fopen(".git/refs/remotes/origin/master", "r")) != NULL || // Already pulled once + (fp = fopen(".git/refs/heads/master", "r")) != NULL ) { // Cloned only char line[64]; char *rev = (char*)malloc(sizeof(char) * 50); From 94aa28aafcc760268c24f525635347306b641533 Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Thu, 20 Jul 2017 13:24:44 -0400 Subject: [PATCH 027/124] Follow up to df2c3e1 * Resolved a compile warning. --- src/common/ers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ers.c b/src/common/ers.c index ef31fc92be..a35d62c40d 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -308,7 +308,7 @@ ERS *ers_new(uint32 size, const char *name, enum ERSOptions options) instance->VTable.destroy = ers_obj_destroy; instance->VTable.chunk_size = ers_cache_size; - instance->Name = ( options & ERS_OPT_FREE_NAME ) ? aStrdup(name) : name; + instance->Name = ( options & ERS_OPT_FREE_NAME ) ? aStrdup(&name) : &name; instance->Options = options; instance->Cache = ers_find_cache(size,instance->Options); From ad036d08a45fc90deca2d240843b45bc591074b3 Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Thu, 20 Jul 2017 13:36:23 -0400 Subject: [PATCH 028/124] Follow up to 94aa28a * Resolved some compile warnings. --- src/common/ers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ers.c b/src/common/ers.c index a35d62c40d..98d1014c24 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -308,7 +308,7 @@ ERS *ers_new(uint32 size, const char *name, enum ERSOptions options) instance->VTable.destroy = ers_obj_destroy; instance->VTable.chunk_size = ers_cache_size; - instance->Name = ( options & ERS_OPT_FREE_NAME ) ? aStrdup(&name) : &name; + instance->Name = ( options & ERS_OPT_FREE_NAME ) ? (char *)aStrdup(name) : (char *)name; instance->Options = options; instance->Cache = ers_find_cache(size,instance->Options); From 2f453e79eceb8f4f94abf923f24d21e202c4633f Mon Sep 17 00:00:00 2001 From: hazimjauhari90 <hazimjauhari@gmail.com> Date: Mon, 24 Jul 2017 01:03:38 +0800 Subject: [PATCH 029/124] Added shuffle packets for 2017-06-14bRagexeRE (#2277) Thanks to @Rytech2 and @hazimjauhari90. --- src/map/clif_obfuscation.h | 2 ++ src/map/clif_shuffle.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/src/map/clif_obfuscation.h b/src/map/clif_obfuscation.h index b28f8591e6..4aefedf7e0 100644 --- a/src/map/clif_obfuscation.h +++ b/src/map/clif_obfuscation.h @@ -339,6 +339,8 @@ packet_keys(0x03FA5A97,0x20B802D5,0x339F1977); #elif PACKETVER == 20170607 // 2017-06-07cRagexeRE packet_keys(0x50564ACD,0x79CA4E15,0x405F4894); + #elif PACKETVER == 20170614 // 2017-06-14bRagexeRE + packet_keys(0x5ED10A48,0x667F4301,0x2E5D761F); #elif PACKETVER > 20110817 #error Unsupported packet version. #endif diff --git a/src/map/clif_shuffle.h b/src/map/clif_shuffle.h index 24351d1cf5..92c10a526b 100644 --- a/src/map/clif_shuffle.h +++ b/src/map/clif_shuffle.h @@ -3506,6 +3506,37 @@ parseable_packet(0x0942,5,clif_parse_HomMenu,2,4); parseable_packet(0x0944,6,clif_parse_SolveCharName,2); parseable_packet(0x0949,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); +// 2017-06-14bRagexeRE +#elif PACKETVER == 20170614 + parseable_packet(0x023B,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0361,5,clif_parse_WalkToXY,2); + parseable_packet(0x0364,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0367,6,clif_parse_DropItem,2,4); + parseable_packet(0x0437,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0838,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x083C,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0860,6,clif_parse_ReqClickBuyingStore,2); + //parseable_packet(0x0865,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0866,6,clif_parse_TickSend,2); + parseable_packet(0x0867,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x086B,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x086C,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0877,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0879,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x087D,6,clif_parse_SolveCharName,2); + parseable_packet(0x087E,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0889,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0899,26,clif_parse_PartyInvite2,2); + parseable_packet(0x089D,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x08A2,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x08AD,6,clif_parse_TakeItem,2); + parseable_packet(0x091B,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0928,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x092F,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0936,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x0944,19,clif_parse_WantToConnection,2,6,10,14,18); + //parseable_packet(0x0957,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0963,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); #endif #endif /* _CLIF_SHUFFLE_H_ */ From be15b62912207deab2d98afd0f72eeaf6decce2a Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 24 Jul 2017 10:35:44 +0200 Subject: [PATCH 030/124] Follow up to a3c0590 Added a missing field check --- src/char/char.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/char/char.cpp b/src/char/char.cpp index 3ff791c1af..87296138da 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -2314,7 +2314,7 @@ bool char_checkdb(void){ //checking guild_db if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `guild_id`,`name`,`char_id`,`master`,`guild_lv`," "`connect_member`,`max_member`,`average_lv`,`exp`,`next_exp`,`skill_point`,`mes1`,`mes2`," - "`emblem_len`,`emblem_id`,`emblem_data`" + "`emblem_len`,`emblem_id`,`emblem_data`,`last_master_change`" " FROM `%s` LIMIT 1;", schema_config.guild_db) ){ Sql_ShowDebug(sql_handle); return false; From d912c5039bf3917115cb91ede4a3a888e57415e8 Mon Sep 17 00:00:00 2001 From: Akkarinage <akkarin@rathena.org> Date: Mon, 24 Jul 2017 15:35:05 +0100 Subject: [PATCH 031/124] Removed SQL upgrade files dated prior to 2016 (#2282) Signed-off-by: Akkarinage <akkarin@rathena.org> --- sql-files/upgrades/upgrade_20140104.sql | 1 - sql-files/upgrades/upgrade_20140114.sql | 20 --- sql-files/upgrades/upgrade_20140205.sql | 21 ---- sql-files/upgrades/upgrade_20140523.sql | 1 - sql-files/upgrades/upgrade_20140612.sql | 118 ------------------ sql-files/upgrades/upgrade_20140612_log.sql | 12 -- sql-files/upgrades/upgrade_20140616.sql | 6 - sql-files/upgrades/upgrade_20140627.sql | 1 - sql-files/upgrades/upgrade_20140713_log.sql | 1 - sql-files/upgrades/upgrade_20140723.sql | 7 -- sql-files/upgrades/upgrade_20140822.sql | 1 - sql-files/upgrades/upgrade_20140826.sql | 1 - sql-files/upgrades/upgrade_20140915.sql | 1 - sql-files/upgrades/upgrade_20140915_log.sql | 1 - sql-files/upgrades/upgrade_20150103_log.sql | 1 - sql-files/upgrades/upgrade_20150131.sql | 6 - .../upgrades/upgrade_20150211_skillset.sql | 6 - .../upgrades/upgrade_20150327_market.sql | 12 -- sql-files/upgrades/upgrade_20150408.sql | 9 -- sql-files/upgrades/upgrade_20150408_log.sql | 1 - sql-files/upgrades/upgrade_20150619.sql | 68 ---------- sql-files/upgrades/upgrade_20150619_log.sql | 1 - sql-files/upgrades/upgrade_20150804_log.sql | 1 - sql-files/upgrades/upgrade_20150828.sql | 1 - sql-files/upgrades/upgrade_20150831.sql | 66 ---------- sql-files/upgrades/upgrade_20150917_log.sql | 1 - sql-files/upgrades/upgrade_20151230_log.sql | 19 --- 27 files changed, 384 deletions(-) delete mode 100644 sql-files/upgrades/upgrade_20140104.sql delete mode 100644 sql-files/upgrades/upgrade_20140114.sql delete mode 100644 sql-files/upgrades/upgrade_20140205.sql delete mode 100644 sql-files/upgrades/upgrade_20140523.sql delete mode 100644 sql-files/upgrades/upgrade_20140612.sql delete mode 100644 sql-files/upgrades/upgrade_20140612_log.sql delete mode 100644 sql-files/upgrades/upgrade_20140616.sql delete mode 100644 sql-files/upgrades/upgrade_20140627.sql delete mode 100644 sql-files/upgrades/upgrade_20140713_log.sql delete mode 100644 sql-files/upgrades/upgrade_20140723.sql delete mode 100644 sql-files/upgrades/upgrade_20140822.sql delete mode 100644 sql-files/upgrades/upgrade_20140826.sql delete mode 100644 sql-files/upgrades/upgrade_20140915.sql delete mode 100644 sql-files/upgrades/upgrade_20140915_log.sql delete mode 100644 sql-files/upgrades/upgrade_20150103_log.sql delete mode 100644 sql-files/upgrades/upgrade_20150131.sql delete mode 100644 sql-files/upgrades/upgrade_20150211_skillset.sql delete mode 100644 sql-files/upgrades/upgrade_20150327_market.sql delete mode 100644 sql-files/upgrades/upgrade_20150408.sql delete mode 100644 sql-files/upgrades/upgrade_20150408_log.sql delete mode 100644 sql-files/upgrades/upgrade_20150619.sql delete mode 100644 sql-files/upgrades/upgrade_20150619_log.sql delete mode 100644 sql-files/upgrades/upgrade_20150804_log.sql delete mode 100644 sql-files/upgrades/upgrade_20150828.sql delete mode 100644 sql-files/upgrades/upgrade_20150831.sql delete mode 100644 sql-files/upgrades/upgrade_20150917_log.sql delete mode 100644 sql-files/upgrades/upgrade_20151230_log.sql diff --git a/sql-files/upgrades/upgrade_20140104.sql b/sql-files/upgrades/upgrade_20140104.sql deleted file mode 100644 index a1f181172a..0000000000 --- a/sql-files/upgrades/upgrade_20140104.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `item_db_re` CHANGE `atk:matk` `atk:matk` VARCHAR( 11 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL diff --git a/sql-files/upgrades/upgrade_20140114.sql b/sql-files/upgrades/upgrade_20140114.sql deleted file mode 100644 index 57dd2a5389..0000000000 --- a/sql-files/upgrades/upgrade_20140114.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE IF NOT EXISTS `vending_items` ( - `vending_id` int(10) unsigned NOT NULL, - `index` smallint(5) unsigned NOT NULL, - `cartinventory_id` int(10) unsigned NOT NULL, - `amount` smallint(5) unsigned NOT NULL, - `price` int(10) unsigned NOT NULL -) ENGINE=MyISAM; - -CREATE TABLE IF NOT EXISTS `vendings` ( - `id` int(10) unsigned NOT NULL, - `account_id` int(11) unsigned NOT NULL, - `char_id` int(10) unsigned NOT NULL, - `sex` enum('F','M') NOT NULL DEFAULT 'M', - `map` varchar(20) NOT NULL, - `x` smallint(5) unsigned NOT NULL, - `y` smallint(5) unsigned NOT NULL, - `title` varchar(80) NOT NULL, - `autotrade` tinyint(4) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM; diff --git a/sql-files/upgrades/upgrade_20140205.sql b/sql-files/upgrades/upgrade_20140205.sql deleted file mode 100644 index a254cb6891..0000000000 --- a/sql-files/upgrades/upgrade_20140205.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE TABLE IF NOT EXISTS `buyingstore_items` ( - `buyingstore_id` int(10) unsigned NOT NULL, - `index` smallint(5) unsigned NOT NULL, - `item_id` int(10) unsigned NOT NULL, - `amount` smallint(5) unsigned NOT NULL, - `price` int(10) unsigned NOT NULL -) ENGINE=MyISAM; - -CREATE TABLE IF NOT EXISTS `buyingstores` ( - `id` int(10) unsigned NOT NULL, - `account_id` int(11) unsigned NOT NULL, - `char_id` int(10) unsigned NOT NULL, - `sex` enum('F','M') NOT NULL DEFAULT 'M', - `map` varchar(20) NOT NULL, - `x` smallint(5) unsigned NOT NULL, - `y` smallint(5) unsigned NOT NULL, - `title` varchar(80) NOT NULL, - `limit` int(10) unsigned NOT NULL, - `autotrade` tinyint(4) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM; diff --git a/sql-files/upgrades/upgrade_20140523.sql b/sql-files/upgrades/upgrade_20140523.sql deleted file mode 100644 index 2288d7456b..0000000000 --- a/sql-files/upgrades/upgrade_20140523.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `char` ADD `font` tinyint(3) unsigned NOT NULL default '0'; diff --git a/sql-files/upgrades/upgrade_20140612.sql b/sql-files/upgrades/upgrade_20140612.sql deleted file mode 100644 index 0c4d6da7ad..0000000000 --- a/sql-files/upgrades/upgrade_20140612.sql +++ /dev/null @@ -1,118 +0,0 @@ -UPDATE `auction` SET `card0` = 256 WHERE `card0` = -256; -UPDATE `cart_inventory` SET `card0` = 256 WHERE `card0` = -256; -UPDATE `guild_storage` SET `card0` = 256 WHERE `card0` = -256; -UPDATE `inventory` SET `card0` = 256 WHERE `card0` = -256; -UPDATE `mail` SET `card0` = 256 WHERE `card0` = -256; -UPDATE `storage` SET `card0` = 256 WHERE `card0` = -256; - -UPDATE `auction` SET `card1` = (65536 + `card1`) WHERE `card1` < 0 AND `card0` IN(254,255); -UPDATE `auction` SET `card2` = (65536 + `card2`) WHERE `card2` < 0 AND `card0` IN(254,255); -UPDATE `auction` SET `card3` = (65536 + `card3`) WHERE `card3` < 0 AND `card0` IN(254,255); - -UPDATE `cart_inventory` SET `card1` = (65536 + `card1`) WHERE `card1` < 0 AND `card0` IN(254,255); -UPDATE `cart_inventory` SET `card2` = (65536 + `card2`) WHERE `card2` < 0 AND `card0` IN(254,255); -UPDATE `cart_inventory` SET `card3` = (65536 + `card3`) WHERE `card3` < 0 AND `card0` IN(254,255); - -UPDATE `guild_storage` SET `card1` = (65536 + `card1`) WHERE `card1` < 0 AND `card0` IN(254,255); -UPDATE `guild_storage` SET `card2` = (65536 + `card2`) WHERE `card2` < 0 AND `card0` IN(254,255); -UPDATE `guild_storage` SET `card3` = (65536 + `card3`) WHERE `card3` < 0 AND `card0` IN(254,255); - -UPDATE `inventory` SET `card1` = (65536 + `card1`) WHERE `card1` < 0 AND `card0` IN(254,255); -UPDATE `inventory` SET `card2` = (65536 + `card2`) WHERE `card2` < 0 AND `card0` IN(254,255); -UPDATE `inventory` SET `card3` = (65536 + `card3`) WHERE `card3` < 0 AND `card0` IN(254,255); - -UPDATE `mail` SET `card1` = (65536 + `card1`) WHERE `card1` < 0 AND `card0` IN(254,255); -UPDATE `mail` SET `card2` = (65536 + `card2`) WHERE `card2` < 0 AND `card0` IN(254,255); -UPDATE `mail` SET `card3` = (65536 + `card3`) WHERE `card3` < 0 AND `card0` IN(254,255); - -UPDATE `storage` SET `card1` = (65536 + `card1`) WHERE `card1` < 0 AND `card0` IN(254,255); -UPDATE `storage` SET `card2` = (65536 + `card2`) WHERE `card2` < 0 AND `card0` IN(254,255); -UPDATE `storage` SET `card3` = (65536 + `card3`) WHERE `card3` < 0 AND `card0` IN(254,255); - -ALTER TABLE `auction` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `auction` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `auction` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `auction` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `auction` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `cart_inventory` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `cart_inventory` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `cart_inventory` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `cart_inventory` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `cart_inventory` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `guild_storage` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `guild_storage` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `guild_storage` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `guild_storage` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `guild_storage` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `inventory` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `inventory` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `inventory` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `inventory` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `inventory` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mail` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mail` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mail` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mail` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mail` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `pet` MODIFY `egg_id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `storage` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `storage` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `storage` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `storage` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `storage` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; - -ALTER TABLE `mob_db` MODIFY `MVP1id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `MVP2id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `MVP3id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `Drop1id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `Drop2id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `Drop3id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `Drop4id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `Drop5id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `Drop6id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `Drop7id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `Drop8id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `Drop9id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db` MODIFY `DropCardid` smallint(5) unsigned NOT NULL default '0'; - -ALTER TABLE `mob_db2` MODIFY `MVP1id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `MVP2id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `MVP3id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `Drop1id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `Drop2id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `Drop3id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `Drop4id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `Drop5id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `Drop6id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `Drop7id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `Drop8id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `Drop9id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2` MODIFY `DropCardid` smallint(5) unsigned NOT NULL default '0'; - -ALTER TABLE `mob_db2_re` MODIFY `MVP1id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `MVP2id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `MVP3id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `Drop1id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `Drop2id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `Drop3id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `Drop4id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `Drop5id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `Drop6id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `Drop7id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `Drop8id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `Drop9id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db2_re` MODIFY `DropCardid` smallint(5) unsigned NOT NULL default '0'; - -ALTER TABLE `mob_db_re` MODIFY `MVP1id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `MVP2id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `MVP3id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `Drop1id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `Drop2id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `Drop3id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `Drop4id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `Drop5id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `Drop6id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `Drop7id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `Drop8id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `Drop9id` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mob_db_re` MODIFY `DropCardid` smallint(5) unsigned NOT NULL default '0'; diff --git a/sql-files/upgrades/upgrade_20140612_log.sql b/sql-files/upgrades/upgrade_20140612_log.sql deleted file mode 100644 index a42a158a0a..0000000000 --- a/sql-files/upgrades/upgrade_20140612_log.sql +++ /dev/null @@ -1,12 +0,0 @@ -UPDATE `picklog` SET `card0` = 256 WHERE `card0` = -256; - -UPDATE `picklog` SET `card1` = (65536 + `card1`) WHERE `card1` < 0 AND `card0` IN(254,255); -UPDATE `picklog` SET `card2` = (65536 + `card2`) WHERE `card2` < 0 AND `card0` IN(254,255); -UPDATE `picklog` SET `card3` = (65536 + `card3`) WHERE `card3` < 0 AND `card0` IN(254,255); - -ALTER TABLE `picklog` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `picklog` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `picklog` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `picklog` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `picklog` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; -ALTER TABLE `mvplog` MODIFY `prize` smallint(5) unsigned NOT NULL default '0'; diff --git a/sql-files/upgrades/upgrade_20140616.sql b/sql-files/upgrades/upgrade_20140616.sql deleted file mode 100644 index 0430d2b70c..0000000000 --- a/sql-files/upgrades/upgrade_20140616.sql +++ /dev/null @@ -1,6 +0,0 @@ -UPDATE `auction` SET `card0` = 256 WHERE `card0` = 65280; -UPDATE `cart_inventory` SET `card0` = 256 WHERE `card0` = 65280; -UPDATE `guild_storage` SET `card0` = 256 WHERE `card0` = 65280; -UPDATE `inventory` SET `card0` = 256 WHERE `card0` = 65280; -UPDATE `mail` SET `card0` = 256 WHERE `card0` = 65280; -UPDATE `storage` SET `card0` = 256 WHERE `card0` = 65280; diff --git a/sql-files/upgrades/upgrade_20140627.sql b/sql-files/upgrades/upgrade_20140627.sql deleted file mode 100644 index 2e50d4a424..0000000000 --- a/sql-files/upgrades/upgrade_20140627.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `pet` CHANGE `incuvate` `incubate` int(11) unsigned NOT NULL default '0'; diff --git a/sql-files/upgrades/upgrade_20140713_log.sql b/sql-files/upgrades/upgrade_20140713_log.sql deleted file mode 100644 index b213a48db3..0000000000 --- a/sql-files/upgrades/upgrade_20140713_log.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `zenylog` CHANGE `type` `type` ENUM('T','V','P','M','S','N','D','C','A','E','I','B','K') NOT NULL DEFAULT 'S'; diff --git a/sql-files/upgrades/upgrade_20140723.sql b/sql-files/upgrades/upgrade_20140723.sql deleted file mode 100644 index d215bd115c..0000000000 --- a/sql-files/upgrades/upgrade_20140723.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE `vendings` ADD `body_direction` CHAR( 1 ) NOT NULL DEFAULT '4', -ADD `head_direction` CHAR( 1 ) NOT NULL DEFAULT '0', -ADD `sit` CHAR( 1 ) NOT NULL DEFAULT '1'; - -ALTER TABLE `buyingstores` ADD `body_direction` CHAR( 1 ) NOT NULL DEFAULT '4', -ADD `head_direction` CHAR( 1 ) NOT NULL DEFAULT '0', -ADD `sit` CHAR( 1 ) NOT NULL DEFAULT '1'; diff --git a/sql-files/upgrades/upgrade_20140822.sql b/sql-files/upgrades/upgrade_20140822.sql deleted file mode 100644 index bd8c13d5ff..0000000000 --- a/sql-files/upgrades/upgrade_20140822.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `char` ADD COLUMN `uniqueitem_counter` bigint(20) NOT NULL AFTER `font`; diff --git a/sql-files/upgrades/upgrade_20140826.sql b/sql-files/upgrades/upgrade_20140826.sql deleted file mode 100644 index 9235f4a1e1..0000000000 --- a/sql-files/upgrades/upgrade_20140826.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `char` MODIFY COLUMN `uniqueitem_counter` int(11) unsigned NOT NULL default '0'; diff --git a/sql-files/upgrades/upgrade_20140915.sql b/sql-files/upgrades/upgrade_20140915.sql deleted file mode 100644 index 136c9b245d..0000000000 --- a/sql-files/upgrades/upgrade_20140915.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `mail` ADD `bound` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; diff --git a/sql-files/upgrades/upgrade_20140915_log.sql b/sql-files/upgrades/upgrade_20140915_log.sql deleted file mode 100644 index 222e406d80..0000000000 --- a/sql-files/upgrades/upgrade_20140915_log.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `picklog` ADD `bound` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; diff --git a/sql-files/upgrades/upgrade_20150103_log.sql b/sql-files/upgrades/upgrade_20150103_log.sql deleted file mode 100644 index 98fda3d397..0000000000 --- a/sql-files/upgrades/upgrade_20150103_log.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `picklog` MODIFY `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','$') NOT NULL DEFAULT 'S'; diff --git a/sql-files/upgrades/upgrade_20150131.sql b/sql-files/upgrades/upgrade_20150131.sql deleted file mode 100644 index 6ab8d692da..0000000000 --- a/sql-files/upgrades/upgrade_20150131.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `bonus_script` MODIFY COLUMN `char_id` INT(11) UNSIGNED NOT NULL; -ALTER TABLE `bonus_script` MODIFY COLUMN `script` TEXT NOT NULL; -ALTER TABLE `bonus_script` MODIFY COLUMN `tick` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `bonus_script` MODIFY COLUMN `flag` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `bonus_script` MODIFY COLUMN `type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `bonus_script` MODIFY COLUMN `icon` SMALLINT(3) NOT NULL DEFAULT '-1'; diff --git a/sql-files/upgrades/upgrade_20150211_skillset.sql b/sql-files/upgrades/upgrade_20150211_skillset.sql deleted file mode 100644 index e60ea411aa..0000000000 --- a/sql-files/upgrades/upgrade_20150211_skillset.sql +++ /dev/null @@ -1,6 +0,0 @@ --- Resetting all `lv` of skills that has `flag` >= 3 (the skill that its `learned_lv` has been changed by script or special case by `learned_lv` + SKILL_FLAG_REPLACED_LV_0) --- If there's ALL_INCCARRY and ALL_BUYING_STORE, set the `flag` to SKILL_FLAG_PERM_GRANTED (new value is 3), those are exclusive skills given in our official scripts! - -UPDATE `skill` SET `lv` = `flag` - 3 WHERE `flag` >= 3; -UPDATE `skill` SET `flag` = 0 WHERE `flag` >= 3; -UPDATE `skill` SET `flag` = 3 WHERE `id` = 681 OR `id` = 2535; diff --git a/sql-files/upgrades/upgrade_20150327_market.sql b/sql-files/upgrades/upgrade_20150327_market.sql deleted file mode 100644 index 8ca000ef16..0000000000 --- a/sql-files/upgrades/upgrade_20150327_market.sql +++ /dev/null @@ -1,12 +0,0 @@ --- --- Table `market` for market shop persistency --- - -CREATE TABLE IF NOT EXISTS `market` ( - `name` varchar(32) NOT NULL DEFAULT '', - `nameid` SMALLINT(5) UNSIGNED NOT NULL, - `price` INT(11) UNSIGNED NOT NULL, - `amount` SMALLINT(5) UNSIGNED NOT NULL, - `flag` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`name`,`nameid`) -) ENGINE = MyISAM; diff --git a/sql-files/upgrades/upgrade_20150408.sql b/sql-files/upgrades/upgrade_20150408.sql deleted file mode 100644 index 6e251584d9..0000000000 --- a/sql-files/upgrades/upgrade_20150408.sql +++ /dev/null @@ -1,9 +0,0 @@ --- Move `bank_vault` value from `login` to `global_reg_value`. --- Please be careful if you're running multi char-server, better you do this step manually to move the `bank_vault` --- to proper `global_reg_value` tables of char-servers used. -INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`, `account_id`) - SELECT '0', '#BANKVAULT', `bank_vault`, '2', `account_id` - FROM `login` WHERE `bank_vault` != 0; - --- Remove `bank_vault` from `login` table, login-server side. -ALTER TABLE `login` DROP `bank_vault`; diff --git a/sql-files/upgrades/upgrade_20150408_log.sql b/sql-files/upgrades/upgrade_20150408_log.sql deleted file mode 100644 index 0f8d6ed7cc..0000000000 --- a/sql-files/upgrades/upgrade_20150408_log.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `picklog` CHANGE `type` `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','$','F') NOT NULL DEFAULT 'P'; diff --git a/sql-files/upgrades/upgrade_20150619.sql b/sql-files/upgrades/upgrade_20150619.sql deleted file mode 100644 index 47a3ee8baf..0000000000 --- a/sql-files/upgrades/upgrade_20150619.sql +++ /dev/null @@ -1,68 +0,0 @@ -ALTER TABLE `char` ADD COLUMN `sex` ENUM('M','F','U') NOT NULL default 'U'; - --- --- Table structure for `db_roulette` --- - -CREATE TABLE `db_roulette` ( - `index` int(11) NOT NULL default '0', - `level` smallint(5) unsigned NOT NULL, - `item_id` smallint(5) unsigned NOT NULL, - `amount` smallint(5) unsigned NOT NULL DEFAULT '1', - `flag` smallint(5) unsigned NOT NULL DEFAULT '1', - PRIMARY KEY (`index`) -) ENGINE=MyISAM; - --- ---------------------------- --- Records of db_roulette --- ---------------------------- --- Info: http://ro.gnjoy.com/news/update/View.asp?seq=157&curpage=1 - -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 0, 1, 675, 1, 1 ); -- Silver_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 1, 1, 671, 1, 0 ); -- Gold_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 2, 1, 678, 1, 0 ); -- Poison_Bottle -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 3, 1, 604, 1, 0 ); -- Branch_Of_Dead_Tree -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 4, 1, 522, 1, 0 ); -- Fruit_Of_Mastela -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 5, 1, 671, 1, 0 ); -- Old_Ore_Box -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 6, 1, 12523, 1, 0 ); -- E_Inc_Agi_10_Scroll -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 7, 1, 985, 1, 0 ); -- Elunium -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 8, 1, 984, 1, 0 ); -- Oridecon - -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 9, 2, 675, 1, 1 ); -- Silver_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 10, 2, 671, 1, 0 ); -- Gold_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 11, 2, 603, 1, 0 ); -- Old_Blue_Box -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 12, 2, 608, 1, 0 ); -- Seed_Of_Yggdrasil -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 13, 2, 607, 1, 0 ); -- Yggdrasilberry -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 14, 2, 12522, 1, 0 ); -- E_Blessing_10_Scroll -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 15, 2, 6223, 1, 0 ); -- Carnium -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 16, 2, 6224, 1, 0 ); -- Bradium - -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 17, 3, 675, 1, 1 ); -- Silver_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 18, 3, 671, 1, 0 ); -- Gold_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 19, 3, 12108, 1, 0 ); -- Bundle_Of_Magic_Scroll -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 20, 3, 617, 1, 0 ); -- Old_Violet_Box -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 21, 3, 12514, 1, 0 ); -- E_Abrasive -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 22, 3, 7444, 1, 0 ); -- Treasure_Box -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 23, 3, 969, 1, 0 ); -- Gold - -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 24, 4, 675, 1, 1 ); -- Silver_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 25, 4, 671, 1, 0 ); -- Gold_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 26, 4, 616, 1, 0 ); -- Old_Card_Album -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 27, 4, 12516, 1, 0 ); -- E_Small_Life_Potion -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 28, 4, 22777, 1, 0 ); -- Gift_Buff_Set -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 29, 4, 6231, 1, 0 ); -- Guarantee_Weapon_6Up - -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 30, 5, 671, 1, 1 ); -- Gold_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 31, 5, 12246, 1, 0 ); -- Magic_Card_Album -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 32, 5, 12263, 1, 0 ); -- Comp_Battle_Manual -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 33, 5, 671, 1, 0 ); -- Potion_Box -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 34, 5, 6235, 1, 0 ); -- Guarantee_Armor_6Up - -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 35, 6, 671, 1, 1 ); -- Gold_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 36, 6, 12766, 1, 0 ); -- Reward_Job_BM25 -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 37, 6, 6234, 1, 0 ); -- Guarantee_Armor_7Up -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 38, 6, 6233, 1, 0 ); -- Guarantee_Armor_8Up - -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 39, 7, 671, 1, 1 ); -- Gold_Coin -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 40, 7, 6233, 1, 0 ); -- Guarantee_Armor_8Up -INSERT INTO `db_roulette`(`index`, `level`, `item_id`, `amount`, `flag` ) VALUES ( 41, 7, 6233, 1, 0 ); -- Guarantee_Armor_8Up // KRO lists this twice diff --git a/sql-files/upgrades/upgrade_20150619_log.sql b/sql-files/upgrades/upgrade_20150619_log.sql deleted file mode 100644 index c89434c2af..0000000000 --- a/sql-files/upgrades/upgrade_20150619_log.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `picklog` MODIFY `type` enum('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','$','F','Y') NOT NULL default 'P'; diff --git a/sql-files/upgrades/upgrade_20150804_log.sql b/sql-files/upgrades/upgrade_20150804_log.sql deleted file mode 100644 index b06fb6cb85..0000000000 --- a/sql-files/upgrades/upgrade_20150804_log.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `picklog` CHANGE `type` `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','$','F','Z') NOT NULL DEFAULT 'P'; diff --git a/sql-files/upgrades/upgrade_20150828.sql b/sql-files/upgrades/upgrade_20150828.sql deleted file mode 100644 index 22e605a4eb..0000000000 --- a/sql-files/upgrades/upgrade_20150828.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `char` ADD COLUMN `hotkey_rowshift` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'; diff --git a/sql-files/upgrades/upgrade_20150831.sql b/sql-files/upgrades/upgrade_20150831.sql deleted file mode 100644 index 8ff80eab1c..0000000000 --- a/sql-files/upgrades/upgrade_20150831.sql +++ /dev/null @@ -1,66 +0,0 @@ -ALTER TABLE `mapreg` ADD PRIMARY KEY (`varname`, `index`); -ALTER TABLE `mapreg` DROP INDEX `varname`; -ALTER TABLE `mapreg` DROP INDEX `index`; -ALTER TABLE `mapreg` MODIFY `varname` varchar(32) binary NOT NULL; - -CREATE TABLE IF NOT EXISTS `acc_reg_num` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) binary NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), - KEY `account_id` (`account_id`) -) ENGINE=MyISAM; - -CREATE TABLE IF NOT EXISTS `acc_reg_str` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) binary NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), - KEY `account_id` (`account_id`) -) ENGINE=MyISAM; - -CREATE TABLE IF NOT EXISTS `char_reg_num` ( - `char_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) binary NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`char_id`,`key`,`index`), - KEY `char_id` (`char_id`) -) ENGINE=MyISAM; - -CREATE TABLE IF NOT EXISTS `char_reg_str` ( - `char_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) binary NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`char_id`,`key`,`index`), - KEY `char_id` (`char_id`) -) ENGINE=MyISAM; - -CREATE TABLE IF NOT EXISTS `global_acc_reg_num` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) binary NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), - KEY `account_id` (`account_id`) -) ENGINE=MyISAM; - -CREATE TABLE IF NOT EXISTS `global_acc_reg_str` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) binary NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), - KEY `account_id` (`account_id`) -) ENGINE=MyISAM; - -INSERT INTO `acc_reg_num` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 2 AND `str` NOT LIKE '%$'; -INSERT INTO `acc_reg_str` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 2 AND `str` LIKE '%$'; -INSERT INTO `char_reg_num` (`char_id`, `key`, `index`, `value`) SELECT `char_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 3 AND `str` NOT LIKE '%$'; -INSERT INTO `char_reg_str` (`char_id`, `key`, `index`, `value`) SELECT `char_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 3 AND `str` LIKE '%$'; -INSERT INTO `global_acc_reg_num` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 1 AND `str` NOT LIKE '%$'; -INSERT INTO `global_acc_reg_str` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 1 AND `str` LIKE '%$'; -# DROP TABLE `global_reg_value`; diff --git a/sql-files/upgrades/upgrade_20150917_log.sql b/sql-files/upgrades/upgrade_20150917_log.sql deleted file mode 100644 index 15715a23f3..0000000000 --- a/sql-files/upgrades/upgrade_20150917_log.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `picklog` MODIFY `type` enum('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','$','F','Z','Q') NOT NULL default 'P'; diff --git a/sql-files/upgrades/upgrade_20151230_log.sql b/sql-files/upgrades/upgrade_20151230_log.sql deleted file mode 100644 index dd2fe2f38f..0000000000 --- a/sql-files/upgrades/upgrade_20151230_log.sql +++ /dev/null @@ -1,19 +0,0 @@ --- --- Table structure for table `feedinglog` --- - -CREATE TABLE IF NOT EXISTS `feedinglog` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `char_id` INT(11) NOT NULL, - `target_id` INT(11) NOT NULL, - `target_class` SMALLINT(11) NOT NULL, - `type` ENUM('P','H','O') NOT NULL, -- P: Pet, H: Homunculus, O: Other - `intimacy` INT(11) UNSIGNED NOT NULL, - `item_id` SMALLINT(5) UNSIGNED NOT NULL, - `map` VARCHAR(11) NOT NULL, - `x` SMALLINT(5) UNSIGNED NOT NULL, - `y` SMALLINT(5) UNSIGNED NOT NULL, - PRIMARY KEY (`id`) -) ENGINE = MyISAM AUTO_INCREMENT = 1; - From cf0cfe84a7ef35129d6cacccd9c0f784c075c7ef Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 24 Jul 2017 19:21:35 +0200 Subject: [PATCH 032/124] Added script command progressbar_npc (#2272) * Fixes #1473 Thanks to @Tokeiburu and @kukuasir1 --- doc/script_commands.txt | 15 ++++++++++- src/map/clif.c | 34 +++++++++++++++++++++-- src/map/clif.h | 2 ++ src/map/clif_packetdb.h | 5 ++++ src/map/npc.c | 1 + src/map/npc.h | 5 ++++ src/map/script.c | 60 ++++++++++++++++++++++++++++++++++++++++- 7 files changed, 118 insertions(+), 4 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index b0e20c81d5..a18847a59f 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -6392,9 +6392,22 @@ This command works almost like sleep2, but displays a progress bar above the head of the currently attached character (like cast bar). Once the given amount of seconds passes, the script resumes. If the character moves while the progress bar progresses, it is aborted and -the script ends. The color format is in RGB (0xRRGGBB). The color is +the script ends. The color format is in RGB (RRGGBB). The color is currently ignored by the client and appears always green. +--------------------------------------- + +*progressbar_npc "<color>",<seconds>{,<"NPC Name">}; + +This command works like progressbar, but displays a progress bar +above the head of the currently attached (or given) NPC. Once the +given amount of seconds passes, the script resumes. The color format +is in RGB (RRGGBB). The color is currently ignored by the client and +appears always green. + +Note: If a player is attached to the NPC, they are detached from the NPC +as soon as the progress bar activates. + --------------------------------------- // 5,1.- End of time-related commands diff --git a/src/map/clif.c b/src/map/clif.c index 338ee87914..7f0c1f1d64 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1466,6 +1466,7 @@ int clif_spawn(struct block_list *bl) else if( nd->size == SZ_MEDIUM ) clif_specialeffect(&nd->bl,421,AREA); clif_efst_status_change_sub(bl, bl, AREA); + clif_progressbar_npc_area(nd); } break; case BL_PET: @@ -4640,6 +4641,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) else if( nd->size == SZ_MEDIUM ) clif_specialeffect_single(bl,421,sd->fd); clif_efst_status_change_sub(&sd->bl, bl, SELF); + clif_progressbar_npc(nd, sd); } break; case BL_MOB: @@ -10628,6 +10630,26 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd) npc_scriptcont(sd, npc_id, false); } +/// Displays cast-like progress bar on a NPC +/// 09d1 <id>.L <color>.L <time>.L (ZC_PROGRESS_ACTOR) +void clif_progressbar_npc( struct npc_data *nd, struct map_session_data* sd ){ +#if PACKETVER >= 20130821 + unsigned char buf[14]; + + if( nd->progressbar.timeout > 0 ){ + WBUFW(buf,0) = 0x9d1; + WBUFL(buf,2) = nd->bl.id; + WBUFL(buf,6) = nd->progressbar.color; + WBUFL(buf,10) = ( nd->progressbar.timeout - gettick() ) / 1000; + + if( sd ){ + clif_send(buf, packet_len(0x9d1), &sd->bl, SELF); + }else{ + clif_send(buf, packet_len(0x9d1), &nd->bl, AREA); + } + } +#endif +} /// Request to walk to a certain position on the current map. /// 0085 <dest>.3B (CZ_REQUEST_MOVE) @@ -11419,8 +11441,16 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) break; } #endif - if( bl->m != -1 )// the user can't click floating npcs directly (hack attempt) - npc_click(sd,(TBL_NPC*)bl); + if( bl->m != -1 ){ // the user can't click floating npcs directly (hack attempt) + struct npc_data* nd = (struct npc_data*)bl; + + // Progressbar is running + if( nd->progressbar.timeout > 0 ){ + return; + } + + npc_click(sd,nd); + } break; } } diff --git a/src/map/clif.h b/src/map/clif.h index 8ae9dd7929..4bbd8910c2 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -927,6 +927,8 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat // Progress Bar [Inkfish] void clif_progressbar(struct map_session_data * sd, unsigned long color, unsigned int second); void clif_progressbar_abort(struct map_session_data * sd); +void clif_progressbar_npc(struct npc_data *nd, struct map_session_data* sd); +#define clif_progressbar_npc_area(nd) clif_progressbar_npc((nd),NULL) void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag); void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag); diff --git a/src/map/clif_packetdb.h b/src/map/clif_packetdb.h index eb6551c89f..773456b781 100644 --- a/src/map/clif_packetdb.h +++ b/src/map/clif_packetdb.h @@ -2145,6 +2145,11 @@ parseable_packet(0x0974,2,clif_parse_merge_item_cancel,0); // CZ_CANCEL_MERGE_ITEM #endif +// 2013-08-21bRagexe +#if PACKETVER >= 20130821 + packet(0x09D1,14); +#endif + // 2013-12-23Ragexe #if PACKETVER >= 20131223 //New Packets diff --git a/src/map/npc.c b/src/map/npc.c index 0c9b2c1ca9..3f2a33d247 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2418,6 +2418,7 @@ struct npc_data *npc_create_npc(int16 m, int16 x, int16 y){ nd->bl.y = y; nd->sc_display = NULL; nd->sc_display_count = 0; + nd->progressbar.timeout = 0; return nd; } diff --git a/src/map/npc.h b/src/map/npc.h index 2130f66419..fe911fa90c 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -99,6 +99,11 @@ struct npc_data { struct sc_display_entry **sc_display; unsigned char sc_display_count; + + struct { + unsigned int timeout; + unsigned long color; + } progressbar; }; struct eri *npc_sc_display_ers; diff --git a/src/map/script.c b/src/map/script.c index a5fa34db4d..4340d7efdf 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -20264,7 +20264,10 @@ BUILDIN_FUNC(areamobuseskill) return SCRIPT_CMD_SUCCESS; } - +/** + * Display a progress bar above a character + * progressbar "<color>",<seconds>; + */ BUILDIN_FUNC(progressbar) { struct map_session_data * sd; @@ -20287,6 +20290,60 @@ BUILDIN_FUNC(progressbar) return SCRIPT_CMD_SUCCESS; } +/** + * Display a progress bar above an NPC + * progressbar_npc "<color>",<seconds>{,<"NPC Name">}; + */ +BUILDIN_FUNC(progressbar_npc){ + struct npc_data* nd = NULL; + + if( script_hasdata(st, 4) ){ + const char* name = script_getstr(st, 4); + + nd = npc_name2id(name); + + if( !nd ){ + ShowError( "buildin_progressbar_npc: NPC \"%s\" was not found.\n", name ); + return SCRIPT_CMD_FAILURE; + } + }else{ + nd = map_id2nd(st->oid); + } + + // First call(by function call) + if( !nd->progressbar.timeout ){ + const char *color; + int second; + + color = script_getstr(st, 2); + second = script_getnum(st, 3); + + if( second < 0 ){ + ShowError( "buildin_progressbar_npc: negative amount('%d') of seconds is not supported\n", second ); + return SCRIPT_CMD_FAILURE; + } + + // detach the player + script_detach_rid(st); + + // sleep for the target amount of time + st->state = RERUNLINE; + st->sleep.tick = second * 1000; + nd->progressbar.timeout = gettick() + second * 1000; + nd->progressbar.color = strtol(color, (char **)NULL, 0); + + clif_progressbar_npc_area(nd); + // Second call(by timer after sleeping time is over) + } else { + // Continue the script + st->state = RUN; + st->sleep.tick = 0; + nd->progressbar.timeout = nd->progressbar.color = 0; + } + + return SCRIPT_CMD_SUCCESS; +} + BUILDIN_FUNC(pushpc) { uint8 dir; @@ -23636,6 +23693,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(setfont,"i"), BUILDIN_DEF(areamobuseskill,"siiiiviiiii"), BUILDIN_DEF(progressbar,"si"), + BUILDIN_DEF(progressbar_npc, "si?"), BUILDIN_DEF(pushpc,"ii"), BUILDIN_DEF(buyingstore,"i"), BUILDIN_DEF(searchstores,"ii"), From 7c2f3c4db98e41a21879cacdd386fbdfec2e0606 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 24 Jul 2017 19:31:46 +0200 Subject: [PATCH 033/124] Fixed 2017-06-07cRagexeRE and 2017-06-14bRagexeRE Fixed #2285 Follow up to 2f453e7 Thanks to @hendra814 --- src/map/clif_shuffle.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/map/clif_shuffle.h b/src/map/clif_shuffle.h index 92c10a526b..73f6ef8f19 100644 --- a/src/map/clif_shuffle.h +++ b/src/map/clif_shuffle.h @@ -3477,8 +3477,8 @@ parseable_packet(0x0968,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); // 2017-06-07cRagexeRE #elif PACKETVER == 20170607 - parseable_packet(0x0361,-1,clif_parse_ItemListWindowSelected,2,4,8,12); - parseable_packet(0x0364,36,clif_parse_StoragePassword,2,4,20); + parseable_packet(0x0361,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0364,36,clif_parse_StoragePassword,0); parseable_packet(0x07e4,6,clif_parse_TickSend,2); parseable_packet(0x085a,5,clif_parse_ChangeDir,2,4); parseable_packet(0x085e,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); @@ -3495,7 +3495,7 @@ parseable_packet(0x08a9,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x08ab,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x0917,2,clif_parse_SearchStoreInfoNextPage,0); - parseable_packet(0x0918,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0918,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x0919,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); parseable_packet(0x0925,26,clif_parse_PartyInvite2,2); parseable_packet(0x0927,10,clif_parse_UseSkillToPos,2,4,6,8); @@ -3503,17 +3503,17 @@ parseable_packet(0x0934,5,clif_parse_WalkToXY,2); parseable_packet(0x0938,7,clif_parse_ActionRequest,2,6); parseable_packet(0x093d,2,clif_parse_ReqCloseBuyingStore,0); - parseable_packet(0x0942,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0942,5,clif_parse_HomMenu,4); parseable_packet(0x0944,6,clif_parse_SolveCharName,2); parseable_packet(0x0949,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); // 2017-06-14bRagexeRE #elif PACKETVER == 20170614 parseable_packet(0x023B,8,clif_parse_MoveFromKafra,2,4); parseable_packet(0x0361,5,clif_parse_WalkToXY,2); - parseable_packet(0x0364,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0364,5,clif_parse_HomMenu,4); parseable_packet(0x0367,6,clif_parse_DropItem,2,4); - parseable_packet(0x0437,36,clif_parse_StoragePassword,2,4,20); - parseable_packet(0x0838,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0437,36,clif_parse_StoragePassword,0); + parseable_packet(0x0838,10,clif_parse_UseSkillToPos,2,4,6,8); parseable_packet(0x083C,7,clif_parse_ActionRequest,2,6); parseable_packet(0x0860,6,clif_parse_ReqClickBuyingStore,2); //parseable_packet(0x0865,4,NULL,0); // CZ_GANGSI_RANK @@ -3521,13 +3521,13 @@ parseable_packet(0x0867,26,clif_parse_FriendsListAdd,2); parseable_packet(0x086B,2,clif_parse_ReqCloseBuyingStore,0); parseable_packet(0x086C,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); - parseable_packet(0x0877,18,clif_parse_PartyBookingRegisterReq,2,4,6); + parseable_packet(0x0877,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x0879,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x087D,6,clif_parse_SolveCharName,2); parseable_packet(0x087E,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0889,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x0899,26,clif_parse_PartyInvite2,2); - parseable_packet(0x089D,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x089D,-1,clif_parse_ItemListWindowSelected,2,4,8); parseable_packet(0x08A2,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x08AD,6,clif_parse_TakeItem,2); parseable_packet(0x091B,10,clif_parse_UseSkillToId,2,4,6); From 8b3e9cd28f1948e04948c987bd2313692353dab8 Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Mon, 24 Jul 2017 17:38:05 -0400 Subject: [PATCH 034/124] Disable instances from using OnPC Events (#2278) * Fixes #2273. * Disable the use of OnPC Events in instance scripts since player's aren't actually attached to the event thus causing a crash. Thanks to @Tokeiburu! --- src/map/npc.c | 58 ++++++++++++++++++++++++++++++++++++--------------- src/map/npc.h | 1 + 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/src/map/npc.c b/src/map/npc.c index 3f2a33d247..6821a84628 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -339,6 +339,17 @@ static int npc_event_export(struct npc_data *nd, int i) struct event_data *ev; char buf[EVENT_NAME_LENGTH]; + if (nd->bl.m > -1 && map[nd->bl.m].instance_id > 0) { // Block script events in instances + int j; + + for (j = 0; j < NPCE_MAX; j++) { + if (strcmpi(npc_get_script_event_name(j), lname) == 0) { + ShowWarning("npc_event_export: attempting to duplicate a script event in an instance (%s::%s), ignoring\n", nd->name, lname); + return 0; + } + } + } + // NPC:<name> the prefix uses 4 characters if( !strncasecmp( lname, script_config.onwhisper_event_name, NAME_LENGTH ) && strlen(nd->exname) > ( NAME_LENGTH - 4 ) ){ // The client only allows that many character so that NPC could not be whispered by unmodified clients @@ -4439,23 +4450,36 @@ int npc_script_event(struct map_session_data* sd, enum npce_event type) return i; } +const char *npc_get_script_event_name(int npce_index) +{ + switch (npce_index) { + case NPCE_LOGIN: + return script_config.login_event_name; + case NPCE_LOGOUT: + return script_config.logout_event_name; + case NPCE_LOADMAP: + return script_config.loadmap_event_name; + case NPCE_BASELVUP: + return script_config.baselvup_event_name; + case NPCE_JOBLVUP: + return script_config.joblvup_event_name; + case NPCE_DIE: + return script_config.die_event_name; + case NPCE_KILLPC: + return script_config.kill_pc_event_name; + case NPCE_KILLNPC: + return script_config.kill_mob_event_name; + case NPCE_STATCALC: + return script_config.stat_calc_event_name; + default: + ShowError("npc_get_script_event_name: npce_index is outside the array limits: %d (max: %d).\n", npce_index, NPCE_MAX); + return NULL; + } +} + void npc_read_event_script(void) { int i; - struct { - char *name; - const char *event_name; - } config[] = { - {"Login Event",script_config.login_event_name}, - {"Logout Event",script_config.logout_event_name}, - {"Load Map Event",script_config.loadmap_event_name}, - {"Base LV Up Event",script_config.baselvup_event_name}, - {"Job LV Up Event",script_config.joblvup_event_name}, - {"Die Event",script_config.die_event_name}, - {"Kill PC Event",script_config.kill_pc_event_name}, - {"Kill NPC Event",script_config.kill_mob_event_name}, - {"Stat Calc Event",script_config.stat_calc_event_name}, - }; for (i = 0; i < NPCE_MAX; i++) { @@ -4464,7 +4488,7 @@ void npc_read_event_script(void) DBData *data; char name[EVENT_NAME_LENGTH]; - safesnprintf(name,EVENT_NAME_LENGTH,"::%s",config[i].event_name); + safesnprintf(name,EVENT_NAME_LENGTH,"::%s", npc_get_script_event_name(i)); script_event[i].event_count = 0; iter = db_iterator(ev_db); @@ -4476,7 +4500,7 @@ void npc_read_event_script(void) if( count >= ARRAYLENGTH(script_event[i].event) ) { - ShowWarning("npc_read_event_script: too many occurences of event '%s'!\n", config[i].event_name); + ShowWarning("npc_read_event_script: too many occurences of event '%s'!\n", npc_get_script_event_name(i)); break; } @@ -4493,7 +4517,7 @@ void npc_read_event_script(void) if (battle_config.etc_log) { //Print summary. for (i = 0; i < NPCE_MAX; i++) - ShowInfo("%s: %d '%s' events.\n", config[i].name, script_event[i].event_count, config[i].event_name); + ShowInfo("%d '%s' events.\n", script_event[i].event_count, npc_get_script_event_name(i)); } } diff --git a/src/map/npc.h b/src/map/npc.h index fe911fa90c..3bade6a106 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -164,6 +164,7 @@ void npc_parse_mob2(struct spawn_data* mob); bool npc_viewisid(const char * viewid); struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y); int npc_globalmessage(const char* name,const char* mes); +const char *npc_get_script_event_name(int npce_index); void npc_setcells(struct npc_data* nd); void npc_unsetcells(struct npc_data* nd); From cac49fda1b5e39f4564c02945674099011c633fc Mon Sep 17 00:00:00 2001 From: hazimjauhari90 <hazimjauhari@gmail.com> Date: Thu, 27 Jul 2017 01:49:47 +0800 Subject: [PATCH 035/124] Updated alternate 3rd job bodystyles (#2288) * Added Sorcerer class to the bodystyle atcommand. --- src/map/atcommand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 7512f8af39..0606430fd5 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1757,7 +1757,7 @@ ACMD_FUNC(bodystyle) || (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC || (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD || (sd->class_&MAPID_THIRDMASK) == MAPID_ARCH_BISHOP || (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER || (sd->class_&MAPID_THIRDMASK) == MAPID_WARLOCK || (sd->class_&MAPID_THIRDMASK) == MAPID_SHADOW_CHASER - || (sd->class_&MAPID_THIRDMASK) == MAPID_MINSTRELWANDERER)) { + || (sd->class_&MAPID_THIRDMASK) == MAPID_MINSTRELWANDERER || (sd->class_&MAPID_THIRDMASK) == MAPID_SORCERER)) { clif_displaymessage(fd, msg_txt(sd,740)); // This job has no alternate body styles. return -1; } From 433490a202228be0a4fc1dfcfd9ae7931dbf42e8 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Thu, 27 Jul 2017 01:37:58 +0200 Subject: [PATCH 036/124] Fixed homunculus menu for a few clients --- src/map/clif_shuffle.h | 64 +++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/map/clif_shuffle.h b/src/map/clif_shuffle.h index 73f6ef8f19..a3e7f57003 100644 --- a/src/map/clif_shuffle.h +++ b/src/map/clif_shuffle.h @@ -105,7 +105,7 @@ parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035F,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); - parseable_packet(0x0361,5,clif_parse_HomMenu,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); @@ -2797,7 +2797,7 @@ #elif PACKETVER == 20161228 parseable_packet(0x0362,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); parseable_packet(0x085a,6,clif_parse_GetCharNameRequest,2); - parseable_packet(0x085e,5,clif_parse_HomMenu,4); + parseable_packet(0x085e,5,clif_parse_HomMenu,2,4); parseable_packet(0x0865,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x086a,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x086c,6,clif_parse_TakeItem,2); @@ -3074,35 +3074,35 @@ parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2017-02-28aRagexeRE #elif PACKETVER == 20170228 - parseable_packet(0x022d, 6, clif_parse_DropItem, 2, 4); - parseable_packet(0x0360, 7, clif_parse_ActionRequest, 2, 6); - parseable_packet(0x0362, 5, clif_parse_HomMenu, 2, 4); - parseable_packet(0x0819, 12, clif_parse_SearchStoreInfoListItemClick, 2, 6, 10); - parseable_packet(0x085e, 90, clif_parse_UseSkillToPosMoreInfo, 2, 4, 6, 8, 10); - parseable_packet(0x0863, -1, clif_parse_SearchStoreInfo, 2, 4, 5, 9, 13, 14, 15); - parseable_packet(0x086b, 19, clif_parse_WantToConnection, 2, 6, 10, 14, 18); - parseable_packet(0x0873, -1, clif_parse_ItemListWindowSelected, 2, 4, 8); - parseable_packet(0x0874, -1, clif_parse_ReqOpenBuyingStore, 2, 4, 8, 9, 89); - parseable_packet(0x0876, 2, clif_parse_ReqCloseBuyingStore, 0); - parseable_packet(0x0883, 2, clif_parse_SearchStoreInfoNextPage, 0); - parseable_packet(0x0884, 5, clif_parse_WalkToXY, 2); - parseable_packet(0x0889, 5, clif_parse_ChangeDir, 2, 4); - parseable_packet(0x0893, 6, clif_parse_GetCharNameRequest, 2); - parseable_packet(0x089e, 8, clif_parse_MoveToKafra, 2, 4); - parseable_packet(0x08a0, 26, clif_parse_FriendsListAdd, 2); - parseable_packet(0x08a2, 36, clif_parse_StoragePassword, 0); + parseable_packet(0x022d,6,clif_parse_DropItem,2,4); + parseable_packet(0x0360,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0362,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0819,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x085e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0863,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x086b,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x0873,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0874,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0876,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0883,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0884,5,clif_parse_WalkToXY,2); + parseable_packet(0x0889,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x0893,6,clif_parse_GetCharNameRequest,2); + parseable_packet(0x089e,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x08a0,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x08a2,36,clif_parse_StoragePassword,0); //parseable_packet(0x08a6,8,NULL,0); // CZ_JOIN_BATTLE_FIELD - parseable_packet(0x08a7, 6, clif_parse_ReqClickBuyingStore, 2); - parseable_packet(0x091f, 10, clif_parse_UseSkillToId, 2, 4, 6); - parseable_packet(0x092a, 6, clif_parse_TakeItem, 2); - parseable_packet(0x092e, -1, clif_parse_ReqTradeBuyingStore, 2, 4, 8, 12); - parseable_packet(0x0937, 6, clif_parse_TickSend, 2); + parseable_packet(0x08a7,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x091f,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x092a,6,clif_parse_TakeItem,2); + parseable_packet(0x092e,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0937,6,clif_parse_TickSend,2); //parseable_packet(0x093e,4,NULL,0); // CZ_GANGSI_RANK - parseable_packet(0x0944, 8, clif_parse_MoveFromKafra, 2, 4); - parseable_packet(0x0947, 6, clif_parse_SolveCharName, 2); - parseable_packet(0x0948, 26, clif_parse_PartyInvite2, 2); - parseable_packet(0x0952, 10, clif_parse_UseSkillToPos, 2, 4, 6, 8); - parseable_packet(0x0955, 18, clif_parse_PartyBookingRegisterReq, 2, 4); + parseable_packet(0x0944,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0947,6,clif_parse_SolveCharName,2); + parseable_packet(0x0948,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0952,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x0955,18,clif_parse_PartyBookingRegisterReq,2,4); // 2017-03-08bRagexeRE #elif PACKETVER == 20170308 parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); @@ -3464,7 +3464,7 @@ parseable_packet(0x088d,6,clif_parse_DropItem,2,4); parseable_packet(0x0894,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x089a,36,clif_parse_StoragePassword,0); - parseable_packet(0x089c,5,clif_parse_HomMenu,4); + parseable_packet(0x089c,5,clif_parse_HomMenu,2,4); parseable_packet(0x08a2,2,clif_parse_SearchStoreInfoNextPage,0); parseable_packet(0x08ac,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x08ad,8,clif_parse_MoveToKafra,2,4); @@ -3503,14 +3503,14 @@ parseable_packet(0x0934,5,clif_parse_WalkToXY,2); parseable_packet(0x0938,7,clif_parse_ActionRequest,2,6); parseable_packet(0x093d,2,clif_parse_ReqCloseBuyingStore,0); - parseable_packet(0x0942,5,clif_parse_HomMenu,4); + parseable_packet(0x0942,5,clif_parse_HomMenu,2,4); parseable_packet(0x0944,6,clif_parse_SolveCharName,2); parseable_packet(0x0949,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); // 2017-06-14bRagexeRE #elif PACKETVER == 20170614 parseable_packet(0x023B,8,clif_parse_MoveFromKafra,2,4); parseable_packet(0x0361,5,clif_parse_WalkToXY,2); - parseable_packet(0x0364,5,clif_parse_HomMenu,4); + parseable_packet(0x0364,5,clif_parse_HomMenu,2,4); parseable_packet(0x0367,6,clif_parse_DropItem,2,4); parseable_packet(0x0437,36,clif_parse_StoragePassword,0); parseable_packet(0x0838,10,clif_parse_UseSkillToPos,2,4,6,8); From 7f5411da072c5ed6b1fca54c076b5b9434a623f4 Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Thu, 27 Jul 2017 09:33:03 -0400 Subject: [PATCH 037/124] Initial release of the Achievement System (#2044) * Information based on kRO patch notes. - http://ro.gnjoy.com/news/update/View.asp?seq=163&curpage=1 * Includes Title System which is integrated into the Achievement System. * Includes RODEX integration for rewards. * Added new atcommand reloadachievementdb. * Added new script commands achievementinfo, achievementadd, achievementremove, achievementcomplete, and achievementexists. Thanks to @Lux-uri, @RagnarokNova, @Lemongrass3110, and @Tokeiburu for their help! --- .travis.yml | 6 +- .../src/contrib/graphbuilderadapter.h | 4 +- 3rdparty/yaml-cpp/src/singledocparser.cpp | 8 +- Makefile.in | 6 +- conf/battle/feature.conf | 4 + conf/msg_conf/char_msg.conf | 5 + conf/msg_conf/map_msg.conf | 8 +- db/import-tmpl/achievement_db.yml | 78 + db/pre-re/achievement_db.yml | 2407 +++++++++++++++++ db/re/achievement_db.yml | 2407 +++++++++++++++++ db/re/item_db.txt | 2 +- doc/achievements.txt | 102 + doc/atcommands.txt | 5 +- doc/packet_interserv.txt | 21 + doc/script_commands.txt | 66 + npc/re/other/achievements.txt | 278 ++ npc/re/scripts_athena.conf | 1 + sql-files/main.sql | 24 + sql-files/upgrades/upgrade_20170407.sql | 25 + src/char/char-server.vcxproj | 2 + src/char/char-server.vcxproj.filters | 6 + src/char/char.cpp | 29 +- src/char/char.h | 1 + src/char/int_achievement.c | 344 +++ src/char/int_achievement.h | 9 + src/char/int_mail.c | 8 +- src/char/int_mail.h | 2 +- src/char/inter.c | 4 +- src/common/Makefile.in | 30 +- src/common/core.cpp | 6 + src/common/mmo.h | 16 + src/common/sql.c | 10 + src/common/sql.h | 7 + src/common/yamlwrapper.cpp | 62 +- src/common/yamlwrapper.h | 8 +- src/map/Makefile.in | 21 +- src/map/achievement.c | 1268 +++++++++ src/map/achievement.h | 135 + src/map/atcommand.c | 9 + src/map/battle.c | 8 + src/map/battle.h | 1 + src/map/chat.c | 9 + src/map/chrif.c | 2 + src/map/clif.c | 184 +- src/map/clif.h | 7 + src/map/clif_packetdb.h | 4 +- src/map/intif.c | 162 +- src/map/intif.h | 6 + src/map/map-server.vcxproj | 3 + src/map/map-server.vcxproj.filters | 6 + src/map/map.cpp | 7 +- src/map/mob.c | 4 + src/map/party.c | 3 + src/map/pc.c | 30 + src/map/pc.h | 15 + src/map/pet.c | 2 + src/map/script.c | 146 + src/map/script.h | 2 + src/map/script_constants.h | 43 + src/map/skill.c | 3 + src/map/unit.c | 4 + src/map/vending.c | 2 + 62 files changed, 8032 insertions(+), 55 deletions(-) create mode 100644 db/import-tmpl/achievement_db.yml create mode 100644 db/pre-re/achievement_db.yml create mode 100644 db/re/achievement_db.yml create mode 100644 doc/achievements.txt create mode 100644 npc/re/other/achievements.txt create mode 100644 sql-files/upgrades/upgrade_20170407.sql create mode 100644 src/char/int_achievement.c create mode 100644 src/char/int_achievement.h create mode 100644 src/map/achievement.c create mode 100644 src/map/achievement.h diff --git a/.travis.yml b/.travis.yml index 13745097b4..963fe75d9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,8 +27,10 @@ before_script: - mysql -u $DB_ROOT -e "GRANT ALL ON *.* TO '$DB_USER'@'$DB_HOST' IDENTIFIED BY '$DB_PASS';" - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - sudo apt-get update -q - - sudo apt-get install gcc-4.8 -y - - sudo apt-get install g++-4.8 -y + - sudo apt-get install gcc-5 -y + - sudo apt-get install g++-5 -y + - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 + - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 1 script: - ./configure $CONFIGURE_FLAGS diff --git a/3rdparty/yaml-cpp/src/contrib/graphbuilderadapter.h b/3rdparty/yaml-cpp/src/contrib/graphbuilderadapter.h index 0d1e579208..726db89897 100644 --- a/3rdparty/yaml-cpp/src/contrib/graphbuilderadapter.h +++ b/3rdparty/yaml-cpp/src/contrib/graphbuilderadapter.h @@ -50,8 +50,8 @@ class GraphBuilderAdapter : public EventHandler { struct ContainerFrame { ContainerFrame(void* pSequence) : pContainer(pSequence), pPrevKeyNode(&sequenceMarker) {} - ContainerFrame(void* pMap, void* pPrevKeyNode) - : pContainer(pMap), pPrevKeyNode(pPrevKeyNode) {} + ContainerFrame(void* pMap, void* pPrevKeyNode_) + : pContainer(pMap), pPrevKeyNode(pPrevKeyNode_) {} void* pContainer; void* pPrevKeyNode; diff --git a/3rdparty/yaml-cpp/src/singledocparser.cpp b/3rdparty/yaml-cpp/src/singledocparser.cpp index a27c1c3b04..752835822c 100644 --- a/3rdparty/yaml-cpp/src/singledocparser.cpp +++ b/3rdparty/yaml-cpp/src/singledocparser.cpp @@ -166,10 +166,10 @@ void SingleDocParser::HandleBlockSequence(EventHandler& eventHandler) { // check for null if (!m_scanner.empty()) { - const Token& token = m_scanner.peek(); - if (token.type == Token::BLOCK_ENTRY || - token.type == Token::BLOCK_SEQ_END) { - eventHandler.OnNull(token.mark, NullAnchor); + const Token& token_ = m_scanner.peek(); + if (token_.type == Token::BLOCK_ENTRY || + token_.type == Token::BLOCK_SEQ_END) { + eventHandler.OnNull(token_.mark, NullAnchor); continue; } } diff --git a/Makefile.in b/Makefile.in index 348034f51d..bf4e105e0d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -5,10 +5,10 @@ OMAP=@OMAP@ ifeq ($(HAVE_MYSQL),yes) ALL_DEPENDS=server tools SERVER_DEPENDS=common login char map import - COMMON_DEPENDS=mt19937ar libconfig + COMMON_DEPENDS=mt19937ar libconfig yaml-cpp LOGIN_DEPENDS=mt19937ar libconfig common CHAR_DEPENDS=mt19937ar libconfig common - MAP_DEPENDS=mt19937ar libconfig common + MAP_DEPENDS=mt19937ar libconfig common yaml-cpp else ALL_DEPENDS=needs_mysql SERVER_DEPENDS=needs_mysql @@ -93,7 +93,7 @@ help: @echo "'common' - builds object files used for the three servers" @echo "'mt19937ar' - builds object file of Mersenne Twister MT19937" @echo "'libconfig' - builds object files of libconfig" - @echo "'libconfig' - builds object files of yaml-cpp" + @echo "'yaml-cpp' - builds object files of yaml-cpp" @echo "'login' - builds login server" @echo "'char' - builds char server" @echo "'map' - builds map server" diff --git a/conf/battle/feature.conf b/conf/battle/feature.conf index a2af2d184e..cd31321d41 100644 --- a/conf/battle/feature.conf +++ b/conf/battle/feature.conf @@ -63,3 +63,7 @@ feature.autotrade_open_delay: 5000 // Requires: 2014-10-22bRagexe or later // Off by default while test version is out; enable at your own risk. feature.roulette: off + +// Achievement (Note 1) +// Requires: 2015-05-13aRagexe or later +feature.achievement: on diff --git a/conf/msg_conf/char_msg.conf b/conf/msg_conf/char_msg.conf index 181b29b6a9..687a524371 100644 --- a/conf/msg_conf/char_msg.conf +++ b/conf/msg_conf/char_msg.conf @@ -157,3 +157,8 @@ 224: -- Character Details -- 225: [Slot/CID: %d/%d] %s | %s | Level: %d/%d | %s 226: This account doesn't have characters. + +// Achievements +227: GM +228: Achievement Reward Mail +229: [%s] Achievement Reward. diff --git a/conf/msg_conf/map_msg.conf b/conf/msg_conf/map_msg.conf index 40151e8697..50306ef970 100644 --- a/conf/msg_conf/map_msg.conf +++ b/conf/msg_conf/map_msg.conf @@ -825,7 +825,13 @@ 769: %s %s has been banned. 770: %s %s has been unbanned. -//771-899 free +//@reloadachievementdb +771: Achievement database has been reloaded. + +// Achievements +772: Achievements are disabled. + +//773-899 free //------------------------------------ // More atcommands message diff --git a/db/import-tmpl/achievement_db.yml b/db/import-tmpl/achievement_db.yml new file mode 100644 index 0000000000..92044f77aa --- /dev/null +++ b/db/import-tmpl/achievement_db.yml @@ -0,0 +1,78 @@ +# This file is a part of rAthena. +# Copyright(C) 2017 rAthena Development Team +# https://rathena.org - https://github.com/rathena +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +########################################################################### +# Custom Achievement Database +########################################################################### +# +# Achievement Settings +# +########################################################################### +# Id - Unique achievement ID. +########################################################################### +# Group - Achievement group type. Each achievement type calls a specific +# objective check. +# Valid groups: +# AG_ADD_FRIEND +# AG_ADVENTURE +# AG_BABY +# AG_BATTLE +# AG_CHATTING +# AG_CHATTING_COUNT +# AG_CHATTING_CREATE +# AG_CHATTING_DYING +# AG_EAT +# AG_GET_ITEM +# AG_GET_ZENY +# AG_GOAL_ACHIEVE +# AG_GOAL_LEVEL +# AG_GOAL_STATUS +# AG_HEAR +# AG_JOB_CHANGE +# AG_MARRY +# AG_PARTY +# AG_ENCHANT_FAIL +# AG_ENCHANT_SUCCESS +# AG_SEE +# AG_SPEND_ZENY +# AG_TAMING +########################################################################### +# Name - Achievement name. Used when sending rewards through RODEX. +########################################################################### +# Target - A list of monster ID and count values that the achievement +# requires. The target count can also be used for achievements that keep +# a counter while not being related to monster kills. +# Capped at MAX_ACHIEVEMENT_OBJECTIVES. +########################################################################### +# Condition - A conditional statement that must be met for the achievement +# to be considered complete. +########################################################################### +# Map - A map name that is used for the AG_CHATTING type which increments +# the counter based on the player's map. +########################################################################### +# Dependent: - A list of achievement IDs that need to be completed before +# this achievement is considered complete. +########################################################################### +# Reward - A list of rewards that are given on completion. All fields are +# optional. +# ItemId: Item ID +# Amount: Amount of Item ID (default 1) +# Script: Bonus Script +# TitleId: Title ID +########################################################################### +# Score - Achievement points that are given on completion. +########################################################################### diff --git a/db/pre-re/achievement_db.yml b/db/pre-re/achievement_db.yml new file mode 100644 index 0000000000..24e7173607 --- /dev/null +++ b/db/pre-re/achievement_db.yml @@ -0,0 +1,2407 @@ +# This file is a part of rAthena. +# Copyright(C) 2017 rAthena Development Team +# https://rathena.org - https://github.com/rathena +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +########################################################################### +# Custom Achievement Database +########################################################################### +# +# Achievement Settings +# +########################################################################### +# ID - Unique achievement ID. +########################################################################### +# Group - Achievement group type. Each achievement type calls a specific +# objective check. +# Valid groups: +# AG_ADD_FRIEND +# AG_ADVENTURE +# AG_BABY +# AG_BATTLE +# AG_CHATTING +# AG_CHATTING_COUNT +# AG_CHATTING_CREATE +# AG_CHATTING_DYING +# AG_EAT +# AG_GET_ITEM +# AG_GET_ZENY +# AG_GOAL_ACHIEVE +# AG_GOAL_LEVEL +# AG_GOAL_STATUS +# AG_HEAR +# AG_JOB_CHANGE +# AG_MARRY +# AG_PARTY +# AG_ENCHANT_FAIL +# AG_ENCHANT_SUCCESS +# AG_SEE +# AG_SPEND_ZENY +# AG_TAMING +########################################################################### +# Name - Achievement name. Used when sending rewards through RODEX. +########################################################################### +# Target - A list of monster ID and count values that the achievement +# requires. The target count can also be used for achievements that keep +# a counter while not being related to monster kills. +# Capped at MAX_ACHIEVEMENT_OBJECTIVES. +########################################################################### +# Condition - A conditional statement that must be met for the achievement +# to be considered complete. +########################################################################### +# Map - A map name that is used for the AG_CHATTING type which increments +# the counter based on the player's map. +########################################################################### +# Dependent: - A list of achievement IDs that need to be completed before +# this achievement is considered complete. +########################################################################### +# Reward - A list of rewards that are given on completion. All fields are +# optional. +# ItemID: Item ID +# Amount: Amount of Item ID (default 1) +# Script: Bonus Script +# TitleID: Title ID +########################################################################### +# Score - Achievement points that are given on completion. +########################################################################### + +Achievements: + - ID: 110000 + Group: "AG_EAT" + Name: "At this time I live to eat" + Score: 10 + - ID: 110001 + Group: "AG_SEE" + Name: "A fan of this polarity" + Score: 10 + - ID: 120001 + Group: "AG_ADVENTURE" + Name: "North Prontera Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120002 + Group: "AG_ADVENTURE" + Name: "North Prontera Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120003 + Group: "AG_ADVENTURE" + Name: "North Prontera Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120004 + Group: "AG_ADVENTURE" + Name: "West Prontera Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120005 + Group: "AG_ADVENTURE" + Name: "West Prontera Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120006 + Group: "AG_ADVENTURE" + Name: "East Prontera Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120007 + Group: "AG_ADVENTURE" + Name: "South Prontera Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120008 + Group: "AG_ADVENTURE" + Name: "South Prontera Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120009 + Group: "AG_ADVENTURE" + Name: "South Prontera Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120010 + Group: "AG_ADVENTURE" + Name: "South Prontera Field Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120011 + Group: "AG_ADVENTURE" + Name: "East Geffen Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120012 + Group: "AG_ADVENTURE" + Name: "Southeast Geffen Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120013 + Group: "AG_ADVENTURE" + Name: "Northwest Geffen Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120014 + Group: "AG_ADVENTURE" + Name: "Northwest Geffen Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120015 + Group: "AG_ADVENTURE" + Name: "Northwest Geffen Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120016 + Group: "AG_ADVENTURE" + Name: "South Geffen Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120017 + Group: "AG_ADVENTURE" + Name: "South Geffen Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120018 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120019 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120020 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120021 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120022 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(5)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120023 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(6)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120024 + Group: "AG_ADVENTURE" + Name: "Southwest Payon Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120025 + Group: "AG_ADVENTURE" + Name: "Southwest Payon Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120026 + Group: "AG_ADVENTURE" + Name: "Southwest Payon Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120027 + Group: "AG_ADVENTURE" + Name: "Southwest Payon Field Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120028 + Group: "AG_ADVENTURE" + Name: "East Payon Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120029 + Group: "AG_ADVENTURE" + Name: "East Payon Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120030 + Group: "AG_ADVENTURE" + Name: "East Payon Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120031 + Group: "AG_ADVENTURE" + Name: "East Payon Field Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120032 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120033 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120034 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120035 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120036 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(5)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120037 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120038 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120039 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120040 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120041 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(5)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120042 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(6)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120043 + Group: "AG_ADVENTURE" + Name: "South Aldebaran Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120044 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120045 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120046 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120047 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120048 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(5)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120049 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(6)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120050 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(7)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120051 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(8)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120052 + Group: "AG_ADVENTURE" + Name: "Border Checkpoint Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120053 + Group: "AG_ADVENTURE" + Name: "Border Checkpoint Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120054 + Group: "AG_ADVENTURE" + Name: "Kiel Hyre Mansion Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120055 + Group: "AG_ADVENTURE" + Name: "El Mes Plateau Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120056 + Group: "AG_ADVENTURE" + Name: "El Mes Plateau Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120057 + Group: "AG_ADVENTURE" + Name: "El Mes Plateau Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120058 + Group: "AG_ADVENTURE" + Name: "El Mes Gorge Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120059 + Group: "AG_ADVENTURE" + Name: "Kiel Hyre Academy Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120060 + Group: "AG_ADVENTURE" + Name: "Guard Camp Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120061 + Group: "AG_ADVENTURE" + Name: "Yuno Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120062 + Group: "AG_ADVENTURE" + Name: "Front of Thanatos Tower Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120063 + Group: "AG_ADVENTURE" + Name: "Hugel Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120064 + Group: "AG_ADVENTURE" + Name: "Hugel Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120065 + Group: "AG_ADVENTURE" + Name: "Hugel Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120066 + Group: "AG_ADVENTURE" + Name: "Abyss Lake Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120067 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120068 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120069 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120070 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120071 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(5)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120072 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(6)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120073 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(7)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120074 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(8)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120075 + Group: "AG_ADVENTURE" + Name: "Lighthalzen Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120076 + Group: "AG_ADVENTURE" + Name: "Lighthalzen Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120077 + Group: "AG_ADVENTURE" + Name: "Lighthalzen Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120078 + Group: "AG_ADVENTURE" + Name: "Rachel Audhumbla Plains Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120079 + Group: "AG_ADVENTURE" + Name: "Rachel Plains Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120080 + Group: "AG_ADVENTURE" + Name: "Rachel Plains Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120081 + Group: "AG_ADVENTURE" + Name: "Rachel Plains Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120082 + Group: "AG_ADVENTURE" + Name: "Rachel Audhumbla Grassland Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120083 + Group: "AG_ADVENTURE" + Name: "Rachel Audhumbla Grassland Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120084 + Group: "AG_ADVENTURE" + Name: "Portus Luna Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120085 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120086 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120087 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120088 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120089 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(5)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120090 + Group: "AG_ADVENTURE" + Name: "Eclage Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120091 + Group: "AG_ADVENTURE" + Name: "North Bitfrost Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120092 + Group: "AG_ADVENTURE" + Name: "South Bitfrost Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120093 + Group: "AG_ADVENTURE" + Name: "Splendide Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120094 + Group: "AG_ADVENTURE" + Name: "Splendide Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120095 + Group: "AG_ADVENTURE" + Name: "Splendide Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120096 + Group: "AG_ADVENTURE" + Name: "Manuk Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120097 + Group: "AG_ADVENTURE" + Name: "Manuk Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120098 + Group: "AG_ADVENTURE" + Name: "Manuk Field Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120099 + Group: "AG_ADVENTURE" + Name: "Outskirts of Kamidal Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120100 + Group: "AG_ADVENTURE" + Name: "Outskirts of Kamidal Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120101 + Group: "AG_ADVENTURE" + Name: "Amatsu Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120102 + Group: "AG_ADVENTURE" + Name: "Kunlun Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120103 + Group: "AG_ADVENTURE" + Name: "Gonryun Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120104 + Group: "AG_ADVENTURE" + Name: "Ayothaya Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120105 + Group: "AG_ADVENTURE" + Name: "Moscovia Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120106 + Group: "AG_ADVENTURE" + Name: "Brasilis Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120107 + Group: "AG_ADVENTURE" + Name: "Dewata Field Exploration" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120108 + Group: "AG_ADVENTURE" + Name: "Malaya Field Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120109 + Group: "AG_ADVENTURE" + Name: "Malaya Field Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 10 + - ID: 120110 + Group: "AG_ADVENTURE" + Name: "Abbey Underground Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120111 + Group: "AG_ADVENTURE" + Name: "Abyss Lake Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120112 + Group: "AG_ADVENTURE" + Name: "Clock Tower Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120113 + Group: "AG_ADVENTURE" + Name: "Amatsu Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120114 + Group: "AG_ADVENTURE" + Name: "Ant Hell Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120115 + Group: "AG_ADVENTURE" + Name: "Ayothaya Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120116 + Group: "AG_ADVENTURE" + Name: "Comodo Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120117 + Group: "AG_ADVENTURE" + Name: "Brasilis Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120118 + Group: "AG_ADVENTURE" + Name: "Clock Tower Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120119 + Group: "AG_ADVENTURE" + Name: "Istana Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120120 + Group: "AG_ADVENTURE" + Name: "Scaraba Hole Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120121 + Group: "AG_ADVENTURE" + Name: "Bitfrost Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120122 + Group: "AG_ADVENTURE" + Name: "Einbroch Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120123 + Group: "AG_ADVENTURE" + Name: "Geffen Underground Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120124 + Group: "AG_ADVENTURE" + Name: "Glastheim Dungeon Exploration(1)" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120125 + Group: "AG_ADVENTURE" + Name: "Glastheim Dungeon Exploration(2)" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120126 + Group: "AG_ADVENTURE" + Name: "Glastheim Dungeon Exploration(3)" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120127 + Group: "AG_ADVENTURE" + Name: "Glastheim Dungeon Exploration(4)" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120128 + Group: "AG_ADVENTURE" + Name: "Kunlun Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120129 + Group: "AG_ADVENTURE" + Name: "Rachel Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120130 + Group: "AG_ADVENTURE" + Name: "Sphinx Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120131 + Group: "AG_ADVENTURE" + Name: "Izlude Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120132 + Group: "AG_ADVENTURE" + Name: "Robot Factory Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120133 + Group: "AG_ADVENTURE" + Name: "Bio Lab Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120134 + Group: "AG_ADVENTURE" + Name: "Gonryun Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120135 + Group: "AG_ADVENTURE" + Name: "Nogg Road Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120136 + Group: "AG_ADVENTURE" + Name: "Coal Mine Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120137 + Group: "AG_ADVENTURE" + Name: "Pyramid Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120138 + Group: "AG_ADVENTURE" + Name: "Orc Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120139 + Group: "AG_ADVENTURE" + Name: "Payon Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120140 + Group: "AG_ADVENTURE" + Name: "Labyrinth Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120141 + Group: "AG_ADVENTURE" + Name: "Undersea Tunnel Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120142 + Group: "AG_ADVENTURE" + Name: "Thanatos Tower Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120143 + Group: "AG_ADVENTURE" + Name: "Thor Volcano Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120144 + Group: "AG_ADVENTURE" + Name: "Sunken Ship Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120145 + Group: "AG_ADVENTURE" + Name: "Turtle Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 120146 + Group: "AG_ADVENTURE" + Name: "Toy Factory Dungeon Exploration" + #Reward: + # ItemID: 22876 + Score: 20 + - ID: 127001 + Group: "AG_CHATTING" + Name: "Prontera Contribution" + Map: "prontera" + Target: + Count: 100000 + Score: 10 + - ID: 127002 + Group: "AG_CHATTING" + Name: "Geffen Contribution" + Map: "geffen" + Target: + Count: 100000 + Score: 10 + - ID: 127003 + Group: "AG_CHATTING" + Name: "Morocc Contribution" + Map: "morocc" + Target: + Count: 100000 + Score: 10 + - ID: 127004 + Group: "AG_CHATTING" + Name: "Payon Contribution" + Map: "payon" + Target: + Count: 100000 + Score: 10 + - ID: 127005 + Group: "AG_CHATTING" + Name: "Yuno Contribution" + Map: "yuno" + Target: + Count: 100000 + Score: 10 + - ID: 127006 + Group: "AG_CHATTING" + Name: "Lighthalzen Contribution" + Map: "lighthalzen" + Target: + Count: 100000 + Score: 10 + - ID: 127007 + Group: "AG_CHATTING" + Name: "Einbroch Contribution" + Map: "einbroch" + Target: + Count: 100000 + Score: 10 + - ID: 127008 + Group: "AG_CHATTING" + Name: "Rachel Contribution" + Map: "rachel" + Target: + Count: 100000 + Score: 10 + - ID: 127009 + Group: "AG_CHATTING" + Name: "Veins Contribution" + Map: "veins" + Target: + Count: 100000 + Score: 10 + - ID: 128000 + Group: "AG_BATTLE" + Name: "Uninvited Guest" + #Target: + # - MobID: 2996 + # Count: 1 + Score: 10 + - ID: 128001 + Group: "AG_BATTLE" + Name: "Strange Guest" + #Target: + # - MobID: 2996 + # Count: 10 + Score: 10 + - ID: 128002 + Group: "AG_BATTLE" + Name: "Get along with map..." + #Target: + # - MobID: 2996 + # Count: 25 + Score: 20 + - ID: 128003 + Group: "AG_BATTLE" + Name: "Welcomed Guest" + #Target: + # - MobID: 2996 + # Count: 50 + Score: 30 + - ID: 128004 + Group: "AG_BATTLE" + Name: "Kimmy's best friend" + #Target: + # - MobID: 2996 + # Count: 100 + Score: 50 + - ID: 128005 + Group: "AG_BATTLE" + Name: "Novice Angler" + #Target: + # - MobID: 2322 + # Count: 1 + Score: 10 + - ID: 128006 + Group: "AG_BATTLE" + Name: "Juicy Hunter" + #Target: + # - MobID: 2322 + # Count: 10 + Score: 20 + - ID: 128007 + Group: "AG_BATTLE" + Name: "Rhythm Master" + #Target: + # - MobID: 2322 + # Count: 50 + Score: 50 + - ID: 128008 + Group: "AG_BATTLE" + Name: "Bold Adventurer" + Target: + - MobID: 1929 + Count: 1 + Score: 10 + - ID: 128009 + Group: "AG_BATTLE" + Name: "Baphomet Hatred" + Target: + - MobID: 1929 + Count: 10 + Score: 20 + - ID: 128010 + Group: "AG_BATTLE" + Name: "Goat's Nemesis" + Target: + - MobID: 1929 + Count: 50 + Score: 50 + - ID: 128011 + Group: "AG_BATTLE" + Name: "Ordinary Tourist" + #Target: + # - MobID: 3029 + # Count: 1 + Score: 10 + - ID: 128012 + Group: "AG_BATTLE" + Name: "Backcountry Expert" + #Target: + # - MobID: 3029 + # Count: 10 + Score: 20 + - ID: 128013 + Group: "AG_BATTLE" + Name: "Able to eat more like this" + #Target: + # - MobID: 3029 + # Count: 50 + Score: 50 + - ID: 128014 + Group: "AG_BATTLE" + Name: "Digest hard meat" + #Target: + # - MobID: 2319 + # Count: 1 + Score: 10 + - ID: 128015 + Group: "AG_BATTLE" + Name: "Master of Escape" + #Target: + # - MobID: 2319 + # Count: 10 + Score: 20 + - ID: 128016 + Group: "AG_BATTLE" + Name: "Immortal Hunter" + #Target: + # - MobID: 2319 + # Count: 50 + Score: 50 + - ID: 128017 + Group: "AG_BATTLE" + Name: "Stood up and overcame despair" + #Target: + # - MobID: 3097 + # Count: 1 + Score: 10 + - ID: 128018 + Group: "AG_BATTLE" + Name: "Ember of Hope" + #Target: + # - MobID: 3097 + # Count: 10 + Score: 10 + - ID: 128019 + Group: "AG_BATTLE" + Name: "Pouring Aurora" + #Target: + # - MobID: 3097 + # Count: 25 + Score: 20 + - ID: 128020 + Group: "AG_BATTLE" + Name: "Who is desperate? I am hopeless!" + #Target: + # - MobID: 3097 + # Count: 50 + Score: 30 + - ID: 128021 + Group: "AG_BATTLE" + Name: "I know god will save the world" + #Target: + # - MobID: 3097 + # Count: 100 + Score: 50 + - ID: 128022 + Group: "AG_BATTLE" + Name: "There was mercy in Morocc army" + #Target: + # - MobID: 3000 + # Count: 1 + Score: 10 + - ID: 128023 + Group: "AG_BATTLE" + Name: "There was fear in Morocc army" + #Target: + # - MobID: 3000 + # Count: 10 + Score: 20 + - ID: 128024 + Group: "AG_BATTLE" + Name: "Guard of weak army" + #Target: + # - MobID: 3000 + # Count: 50 + Score: 50 + - ID: 128025 + Group: "AG_BATTLE" + Name: "Audience with the queen" + #Target: + # - MobID: 2529 + # Count: 1 + Score: 10 + - ID: 128026 + Group: "AG_BATTLE" + Name: "Warm earth" + #Target: + # - MobID: 2533 + # Count: 1 + Score: 10 + - ID: 128027 + Group: "AG_BATTLE" + Name: "Water is very good exactly" + #Target: + # - MobID: 2534 + # Count: 1 + Score: 10 + - ID: 128028 + Group: "AG_BATTLE" + Name: "Pleasant breeze" + #Target: + # - MobID: 2535 + # Count: 1 + Score: 10 + - ID: 128029 + Group: "AG_BATTLE" + Name: "Visitor of old castle" + #Target: + # - MobID: 2476 + # Count: 1 + Score: 10 + - ID: 128030 + Group: "AG_BATTLE" + Name: "Lord of old castle" + #Target: + # - MobID: 2476 + # Count: 10 + Score: 20 + - ID: 128031 + Group: "AG_BATTLE" + Name: "Conqueror of old castle" + #Target: + # - MobID: 2476 + # Count: 50 + Score: 50 + - ID: 128032 + Group: "AG_BATTLE" + Name: "Haggard sucker" + #Target: + # - MobID: 3150 + # Count: 1 + Score: 10 + - ID: 128033 + Group: "AG_BATTLE" + Name: "Hope of the Knight" + #Target: + # - MobID: 3150 + # Count: 10 + Score: 20 + - ID: 128034 + Group: "AG_BATTLE" + Name: "Guardian of the Dawn" + #Target: + # - MobID: 3150 + # Count: 50 + Score: 50 + - ID: 128035 + Group: "AG_BATTLE" + Name: "Time Traveler" + #Target: + # - MobID: 3190 + # Count: 1 + Score: 10 + - ID: 128036 + Group: "AG_BATTLE" + Name: "Restore ancient relic" + #Target: + # - MobID: 3190 + # Count: 10 + Score: 20 + - ID: 128037 + Group: "AG_BATTLE" + Name: "Master of relic transport" + #Target: + # - MobID: 3190 + # Count: 50 + Score: 50 + - ID: 128038 + Group: "AG_BATTLE" + Name: "Show Jailbreak to the captain" + #Target: + # - MobID: 3181 + # Count: 1 + Score: 10 + - ID: 128039 + Group: "AG_BATTLE" + Name: "Show Jailbreak to the weak captain" + #Target: + # - MobID: 3188 + # Count: 1 + Score: 10 + - ID: 128040 + Group: "AG_BATTLE" + Name: "Riot on board" + #Target: + # - MobID: 3181 + # Count: 1 + Score: 20 + - ID: 128041 + Group: "AG_BATTLE" + Name: "Turmoil on board" + #Target: + # - MobID: 3181 + # Count: 10 + Score: 20 + - ID: 128042 + Group: "AG_BATTLE" + Name: "Rebellion on board" + #Target: + # - MobID: 3181 + # Count: 50 + Score: 50 + - ID: 128043 + Group: "AG_BATTLE" + Name: "Revolt of Riot" + #Target: + # - MobID: 3188 + # Count: 50 + Score: 50 + - ID: 128044 + Group: "AG_BATTLE" + Name: "Magic tournament champion" + #Target: + # - MobID: 2564 + # Count: 1 + Score: 10 + - ID: 128045 + Group: "AG_BATTLE" + Name: "Gladiator of Coliseum" + #Target: + # - MobID: 2564 + # Count: 10 + Score: 20 + - ID: 128046 + Group: "AG_BATTLE" + Name: "Slayer of Colosseum" + #Target: + # - MobID: 2564 + # Count: 50 + Score: 50 + - ID: 128047 + Group: "AG_BATTLE" + Name: "Endless Tower challenger" + Target: + - MobID: 1956 + Count: 1 + Score: 10 + - ID: 128048 + Group: "AG_BATTLE" + Name: "Endless Tower Slayer" + Target: + - MobID: 1956 + Count: 10 + Score: 20 + - ID: 128049 + Group: "AG_BATTLE" + Name: "Lord of the tower" + Target: + - MobID: 1956 + Count: 50 + Score: 50 + - ID: 128050 + Group: "AG_BATTLE" + Name: "Novice Exorcist" + #Target: + # - MobID: 2327 + # Count: 1 + Score: 10 + - ID: 128051 + Group: "AG_BATTLE" + Name: "Experienced Exorcist" + #Target: + # - MobID: 2327 + # Count: 10 + Score: 20 + - ID: 128052 + Group: "AG_BATTLE" + Name: "Legendary Exorcist" + #Target: + # - MobID: 2327 + # Count: 50 + Score: 50 + - ID: 129001 + Group: "AG_ADVENTURE" + Name: "Prontera Explorer" + Dependent: [120001, 120002, 120003, 120004, 120005, 120006, 120007, 120008, 120009, 120010] + Reward: + ItemID: 644 + Score: 20 + - ID: 129002 + Group: "AG_ADVENTURE" + Name: "Geffen Explorer" + Dependent: [120011, 120012, 120013, 120014, 120015, 120016, 120017] + Reward: + ItemID: 644 + Score: 20 + - ID: 129003 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Explorer" + Dependent: [120018, 120019, 120020, 120021, 120022, 120023] + Reward: + ItemID: 644 + Score: 20 + - ID: 129004 + Group: "AG_ADVENTURE" + Name: "Payon Explorer" + Dependent: [120024, 120025, 120026, 120027, 120028, 120029, 120030, 120031] + Reward: + ItemID: 644 + Score: 20 + - ID: 129005 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Explorer" + Dependent: [120032, 120033, 120034, 120035, 120036] + Reward: + ItemID: 644 + Score: 20 + - ID: 129006 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Explorer" + Dependent: [120037, 120038, 120039, 120040, 120041, 120042, 120043] + Reward: + ItemID: 644 + Score: 20 + - ID: 129007 + Group: "AG_ADVENTURE" + Name: "Comodo Explorer" + Dependent: [120044, 120045, 120046, 120047, 120048, 120049, 120050, 120051] + Reward: + ItemID: 644 + Score: 20 + - ID: 129008 + Group: "AG_ADVENTURE" + Name: "Rune Midgard Explorer" + Dependent: [129001, 129002, 129003, 129004, 129005, 129006, 129007] + Reward: + ItemID: 617 + Score: 50 + - ID: 129009 + Group: "AG_ADVENTURE" + Name: "Yuno Explorer" + Dependent: [120052, 120053, 120054, 120055, 120056, 120057, 120058, 120059, 120060, 120061] + Reward: + ItemID: 644 + Score: 20 + - ID: 129010 + Group: "AG_ADVENTURE" + Name: "Hugel Explorer" + Dependent: [120062, 120063, 120064, 120065, 120066] + Reward: + ItemID: 644 + Score: 20 + - ID: 129011 + Group: "AG_ADVENTURE" + Name: "Einbroch Explorer" + Dependent: [120067, 120068, 120069, 120070, 120071, 120072, 120073, 120074] + Reward: + ItemID: 644 + Score: 20 + - ID: 129012 + Group: "AG_ADVENTURE" + Name: "Lighthalzen Explorer" + Dependent: [120075, 120076, 120077] + Reward: + ItemID: 644 + Score: 20 + - ID: 129013 + Group: "AG_ADVENTURE" + Name: "Schwarzwald Explorer" + Dependent: [129009, 129010, 129011, 129012] + Reward: + ItemID: 617 + Score: 50 + - ID: 129014 + Group: "AG_ADVENTURE" + Name: "Rachel Explorer" + Dependent: [120078, 120079, 120080, 120081, 120082, 120083, 120084] + Reward: + ItemID: 644 + Score: 20 + - ID: 129015 + Group: "AG_ADVENTURE" + Name: "Veins Explorer" + Dependent: [120085, 120086, 120087, 120088, 120089] + Reward: + ItemID: 644 + Score: 20 + - ID: 129016 + Group: "AG_ADVENTURE" + Name: "Arunafeltz Explorer" + Dependent: [129014, 129015] + Reward: + ItemID: 617 + Score: 50 + - ID: 129017 + Group: "AG_ADVENTURE" + Name: "Laphine Explorer" + Dependent: [120090, 120091, 120092, 120093, 120094, 120095] + Reward: + ItemID: 644 + Score: 20 + - ID: 129018 + Group: "AG_ADVENTURE" + Name: "Manuk Explorer" + Dependent: [120096, 120097, 120098, 120099, 120100] + Reward: + ItemID: 644 + Score: 20 + - ID: 129019 + Group: "AG_ADVENTURE" + Name: "Eclage Explorer" + Dependent: [129017, 129018] + Reward: + ItemID: 617 + Score: 50 + - ID: 129020 + Group: "AG_ADVENTURE" + Name: "Localizing fields explorer" + Dependent: [120101, 120102, 120103, 120104, 120105, 120106, 120107, 120108, 120109] + Reward: + ItemID: 617 + Score: 50 + - ID: 130000 # Talk to Prince NPC (npc/quests/quests_morocc.txt L5288) + Group: "AG_CHATTING" + Name: "Socialite debut" + Reward: + TitleID: 1034 + Score: 10 + - ID: 170000 + Group: "AG_HEAR" + Name: "Song chamber is not an accident" + Score: 10 + - ID: 190000 + Group: "AG_CHATTING" + Name: "Alliance workers of merchant city" + Score: 50 + - ID: 200000 + Group: "AG_GOAL_LEVEL" + Name: "Acquire the first aura!" + Condition: " BaseLevel >= 99 " + Reward: + ItemID: 12549 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1000 + Score: 50 + - ID: 200001 + Group: "AG_GOAL_LEVEL" + Name: "Acquire the second aura!" + Condition: " BaseLevel >= 150 " + Dependent: [200000] + Reward: + ItemID: 5364 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1001 + Score: 60 + - ID: 200002 + Group: "AG_GOAL_LEVEL" + Name: "Acquire the third aura!" + Condition: " BaseLevel >= 175 " + Dependent: [200001] + Reward: + # ItemID: 18880 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1002 + Score: 70 + - ID: 200003 + Group: "AG_GOAL_LEVEL" + Name: "Master Job level!" + Condition: " JobLevel >= 50 " + Reward: + ItemID: 617 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1003 + Score: 30 + - ID: 200004 + Group: "AG_GOAL_LEVEL" + Name: "Grandmaster Job level!" + Condition: " JobLevel >= 70 " + Dependent: [200003] + Reward: + # ItemID: 12817 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1004 + Score: 50 + - ID: 200005 + Group: "AG_JOB_CHANGE" + Name: "Official Adventurer" + Condition: " Class >= JOB_SWORDMAN && Class <= JOB_THIEF " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 200006 + Group: "AG_JOB_CHANGE" + Name: "First step of job change!" + Condition: " Class >= JOB_SWORDMAN && Class <= JOB_THIEF " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 20 + - ID: 200007 + Group: "AG_JOB_CHANGE" + Name: "Veteran Adventurer! (1)" + Condition: " Class >= JOB_KNIGHT && Class <= JOB_ASSASSIN " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 25 + - ID: 200008 + Group: "AG_JOB_CHANGE" + Name: "Veteran Adventurer! (2)" + Condition: " Class >= JOB_CRUSADER && Class <= JOB_DANCER " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 25 + - ID: 200009 + Group: "AG_JOB_CHANGE" + Name: "Warrior (1)" + Condition: " Class >= JOB_LORD_KNIGHT && Class <= JOB_ASSASSIN_CROSS " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 30 + - ID: 200010 + Group: "AG_JOB_CHANGE" + Name: "Warrior (2)" + Condition: " Class >= JOB_PALADIN && Class <= JOB_GYPSY " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 30 + - ID: 200011 + Group: "AG_JOB_CHANGE" + Name: "Elite Adventurer! (1)" + Condition: " Class >= JOB_RUNE_KNIGHT && Class <= JOB_GUILLOTINE_CROSS " + Reward: + # ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 50 + - ID: 200012 + Group: "AG_JOB_CHANGE" + Name: "Transcendentaler! (1)" + Condition: " Class >= JOB_RUNE_KNIGHT_T && Class <= JOB_GUILLOTINE_CROSS_T " + Reward: + # ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 60 + - ID: 200013 + Group: "AG_JOB_CHANGE" + Name: "Elite Adventurer! (2)" + Condition: " Class >= JOB_ROYAL_GUARD && Class <= JOB_SHADOW_CHASER " + Reward: + # ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 50 + - ID: 200014 + Group: "AG_JOB_CHANGE" + Name: "Transcendentaler! (2)" + Condition: " Class >= JOB_ROYAL_GUARD_T && Class <= JOB_SHADOW_CHASER_T " + Reward: + # ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 60 + - ID: 200015 + Group: "AG_JOB_CHANGE" + Name: "The way of exceptional character" + Condition: " Class == JOB_SUPER_NOVICE || Class == JOB_GUNSLINGER || Class == JOB_NINJA || Class == JOB_TAEKWON " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 200016 + Group: "AG_JOB_CHANGE" + Name: "This is My way!" + Condition: " Class == JOB_STAR_GLADIATOR || Class == JOB_SOUL_LINKER || Class == JOB_KAGEROU || Class == JOB_OBORO || Class == JOB_REBELLION " + Reward: + # ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 20 + - ID: 200017 + Group: "AG_GOAL_STATUS" + Name: "Bearish Power!" + Condition: " bStr >= 90 " + Score: 10 + - ID: 200018 + Group: "AG_GOAL_STATUS" + Name: "Overflowing Magic!" + Condition: " bInt >= 90 " + Score: 10 + - ID: 200019 + Group: "AG_GOAL_STATUS" + Name: "Healthy Body and Mental Health!" + Condition: " bVit >= 90 " + Score: 10 + - ID: 200020 + Group: "AG_GOAL_STATUS" + Name: "Speed of Light" + Condition: " bAgi >= 90 " + Score: 10 + - ID: 200021 + Group: "AG_GOAL_STATUS" + Name: "Hawk Eyes" + Condition: " bDex >= 90 " + Score: 10 + - ID: 200022 + Group: "AG_GOAL_STATUS" + Name: "Maximum Luck" + Condition: " bLuk >= 90 " + Score: 10 + - ID: 200023 + Group: "AG_GOAL_STATUS" + Name: "Dragonlike Power!" + Condition: " bStr >= 125 " + Reward: + Script: " sc_start SC_GIANTGROWTH,180000,1; " + Score: 20 + - ID: 200024 + Group: "AG_GOAL_STATUS" + Name: "Magic Insanity" + Condition: " bInt >= 125 " + Reward: + Script: " specialeffect2 EF_HASTEUP; bonus_script \"{ bonus2 bHPLossRate,100,10000; bonus bBaseAtk,20; bonus bAspdRate,25; }\",60,0,0,SI_STEAMPACK; " + Score: 20 + - ID: 200025 + Group: "AG_GOAL_STATUS" + Name: "Rock Alloy" + Condition: " bVit >= 125 " + Reward: + Script: " specialeffect2 EF_HEAL3; sc_start2 SC_S_LIFEPOTION,600000,-5,5; " + Score: 20 + - ID: 200026 + Group: "AG_GOAL_STATUS" + Name: "Speed of Light" + Condition: " bAgi >= 125 " + Reward: + Script: " specialeffect2 EF_STEAL; sc_start SC_INCFLEE2,60000,20; " + Score: 20 + - ID: 200027 + Group: "AG_GOAL_STATUS" + Name: "Falcon's Eyes" + Condition: " bDex >= 125 " + Reward: + Script: " specialeffect2 EF_MAGICALATTHIT; sc_start SC_INCCRI,300000,30; " + Score: 20 + - ID: 200028 + Group: "AG_GOAL_STATUS" + Name: "Lucky Fever" + Condition: " bLuk >= 125 " + Reward: + Script: " specialeffect2 EF_GLORIA; sc_start SC_GLORIA,15000,0; " + Score: 20 + - ID: 200029 + Group: "AG_GOAL_STATUS" + Name: "Incarnation of Love and Hate" + Condition: " BaseLevel == 99 && Class == JOB_NOVICE " + Reward: + # ItemID: 16483 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + Score: 30 + - ID: 200030 + Group: "AG_GOAL_STATUS" + Name: "I really love it!" + Condition: " BaseLevel == 99 && (Class >= JOB_SWORDMAN && Class <= JOB_THIEF) " + Reward: + # ItemID: 16504 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + Score: 30 + - ID: 200031 + Group: "AG_JOB_CHANGE" + Name: "Reborn in Valhalla!" + Condition: " BaseLevel == 99 && Class == JOB_NOVICE_HIGH " + Reward: + # ItemID: 22808 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 230100 + Group: "AG_TAMING" + Name: "Poring is Love" + Dependent: [230101, 230102, 230103, 230104] + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1025 + Score: 50 + - ID: 230110 + Group: "AG_TAMING" + Name: "Entomologist" + Dependent: [230111, 230112, 230113, 230114, 230115, 230116] + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1026 + Score: 50 + - ID: 230120 + Group: "AG_TAMING" + Name: "Animals are also our friend" + Dependent: [230121, 230122, 230123, 230124, 230125, 230126, 230127, 230128] + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1027 + Score: 50 + - ID: 230140 + Group: "AG_TAMING" + Name: "Monster Girls Unite!!" + Dependent: [230141, 230142, 230143, 230144, 230145, 230146, 230147] + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1029 + Score: 50 + - ID: 230101 + Group: "AG_TAMING" + Name: "Poring - taming" + Target: + - MobID: 1002 + Count: 1 + Score: 10 + - ID: 230102 + Group: "AG_TAMING" + Name: "Drops - taming" + Target: + - MobID: 1113 + Count: 1 + Score: 10 + - ID: 230103 + Group: "AG_TAMING" + Name: "Poporing - taming" + Target: + - MobID: 1031 + Count: 1 + Score: 10 + - ID: 230104 + Group: "AG_TAMING" + Name: "Novice Poring - taming" + #Target: + # - MobID: 2398 + # Count: 1 + Score: 10 + - ID: 230111 + Group: "AG_TAMING" + Name: "Chonchon - taming" + Target: + - MobID: 1011 + Count: 1 + Score: 10 + - ID: 230112 + Group: "AG_TAMING" + Name: "Steel Chonchon - taming" + Target: + - MobID: 1042 + Count: 1 + Score: 10 + - ID: 230113 + Group: "AG_TAMING" + Name: "Hunter Fly - taming" + Target: + - MobID: 1035 + Count: 1 + Score: 10 + - ID: 230114 + Group: "AG_TAMING" + Name: "Rocker - taming" + Target: + - MobID: 1052 + Count: 1 + Score: 10 + - ID: 230115 + Group: "AG_TAMING" + Name: "Spore - taming" + Target: + - MobID: 1014 + Count: 1 + Score: 10 + - ID: 230116 + Group: "AG_TAMING" + Name: "Poison Spore - taming" + Target: + - MobID: 1077 + Count: 1 + Score: 10 + - ID: 230121 + Group: "AG_TAMING" + Name: "Lunatic - taming" + Target: + - MobID: 1063 + Count: 1 + Score: 10 + - ID: 230122 + Group: "AG_TAMING" + Name: "Picky - taming" + Target: + - MobID: 1049 + Count: 1 + Score: 10 + - ID: 230123 + Group: "AG_TAMING" + Name: "Savage Bebe - taming" + Target: + - MobID: 1167 + Count: 1 + Score: 10 + - ID: 230124 + Group: "AG_TAMING" + Name: "Baby Desert Wolf - taming" + Target: + - MobID: 1107 + Count: 1 + Score: 10 + - ID: 230125 + Group: "AG_TAMING" + Name: "Smokie - taming" + Target: + - MobID: 1056 + Count: 1 + Score: 10 + - ID: 230126 + Group: "AG_TAMING" + Name: "Yoyo - taming" + Target: + - MobID: 1057 + Count: 1 + Score: 10 + - ID: 230127 + Group: "AG_TAMING" + Name: "Peco Peco - taming" + Target: + - MobID: 1019 + Count: 1 + Score: 10 + - ID: 230128 + Group: "AG_TAMING" + Name: "Petite - taming" + Target: + - MobID: 1155 + Count: 1 + Score: 10 + - ID: 230141 + Group: "AG_TAMING" + Name: "Munak - taming" + Target: + - MobID: 1026 + Count: 1 + Score: 10 + - ID: 230142 + Group: "AG_TAMING" + Name: "Isis - taming" + Target: + - MobID: 1029 + Count: 1 + Score: 10 + - ID: 230143 + Group: "AG_TAMING" + Name: "Sohee - taming" + Target: + - MobID: 1170 + Count: 1 + Score: 10 + - ID: 230144 + Group: "AG_TAMING" + Name: "Zherlthsh - taming" + Target: + - MobID: 1200 + Count: 1 + Score: 10 + - ID: 230145 + Group: "AG_TAMING" + Name: "Alice - taming" + Target: + - MobID: 1275 + Count: 1 + Score: 10 + - ID: 230146 + Group: "AG_TAMING" + Name: "Succubus - taming" + Target: + - MobID: 1370 + Count: 1 + Score: 10 + - ID: 230147 + Group: "AG_TAMING" + Name: "Loli Ruri - taming" + Target: + - MobID: 1505 + Count: 1 + Score: 10 + - ID: 220000 + Group: "AG_CHATTING_CREATE" + Name: "Community begin" + Condition: " true " + Score: 10 + - ID: 220001 + Group: "AG_CHATTING_DYING" + Name: "A mouth only moment" + Condition: " true " + Score: 10 + - ID: 220002 + Group: "AG_CHATTING_COUNT" + Name: "Admiring the chatter" + Condition: " ARG0 == 20 " + Score: 10 + - ID: 220003 + Group: "AG_ADD_FRIEND" + Name: "My friend's friend~" + Condition: " ARG0 >= 1 " + Score: 10 + - ID: 220004 + Group: "AG_ADD_FRIEND" + Name: "A competition of popularity" + Condition: " ARG0 >= 10 " + Score: 10 + - ID: 220005 + Group: "AG_PARTY" + Name: "Let's Party~" + Condition: " true " + Score: 10 + - ID: 220006 + Group: "AG_MARRY" + Name: "Married with who..?" + Condition: " true " + Reward: + TitleID: 1022 + Score: 20 + - ID: 220007 + Group: "AG_BABY" + Name: "Can you grow?" + Condition: " ARG0 == 1 " + Reward: + TitleID: 1032 + Score: 20 + - ID: 220008 + Group: "AG_BABY" + Name: "Being a parent" + Condition: " ARG0 == 2 " + Reward: + TitleID: 1033 + Score: 20 + - ID: 220009 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (1)" + Condition: " ARG0 >= 10000 " + Target: + Count: 10000 + Score: 10 + - ID: 220010 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (2)" + Condition: " ARG0 >= 100000 " + Target: + Count: 100000 + Score: 15 + - ID: 220011 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (3)" + Condition: " ARG0 >= 500000 " + Target: + Count: 500000 + Score: 20 + - ID: 220012 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (4)" + Condition: " ARG0 >= 1000000 " + Target: + Count: 1000000 + Score: 30 + - ID: 220013 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (5)" + Condition: " ARG0 >= 5000000 " + Target: + Count: 5000000 + Score: 50 + - ID: 220014 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (1)" + Condition: " ARG0 == 1 && ARG1 >= 7 " + Score: 10 + - ID: 220015 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (2)" + Condition: " ARG0 == 1 && ARG1 >= 12 " + Score: 15 + - ID: 220016 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (3)" + Condition: " ARG0 == 2 && ARG1 >= 7 " + Score: 10 + - ID: 220017 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (4)" + Condition: " ARG0 == 2 && ARG1 >= 12 " + Score: 15 + - ID: 220018 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (5)" + Condition: " ARG0 == 3 && ARG1 >= 7 " + Score: 15 + - ID: 220019 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (6)" + Condition: " ARG0 == 3 && ARG1 >= 12 " + Score: 20 + - ID: 220020 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (7)" + Condition: " ARG0 == 4 && ARG1 >= 7 " + Score: 20 + - ID: 220021 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (8)" + Condition: " ARG0 == 4 && ARG1 >= 12 " + Score: 30 + - ID: 220022 + Group: "AG_ENCHANT_FAIL" + Name: "Human's greed has no ending.." + Condition: " true " + Score: 10 + - ID: 220023 + Group: "AG_GET_ITEM" + Name: "I found it! (1)" + Condition: " ARG0 >= 100 " + Score: 10 + - ID: 220024 + Group: "AG_GET_ITEM" + Name: "I found it! (2)" + Condition: " ARG0 >= 1000 " + Score: 10 + - ID: 220025 + Group: "AG_GET_ITEM" + Name: "I found it! (3)" + Condition: " ARG0 >= 5000 " + Score: 15 + - ID: 220026 + Group: "AG_GET_ITEM" + Name: "I found it! (4)" + Condition: " ARG0 >= 10000 " + Score: 15 + - ID: 220027 + Group: "AG_GET_ITEM" + Name: "I found it! (5)" + Condition: " ARG0 >= 50000 " + Score: 20 + - ID: 220028 + Group: "AG_GET_ITEM" + Name: "I found it! (6)" + Condition: " ARG0 >= 100000 " + Score: 20 + - ID: 220029 + Group: "AG_GET_ITEM" + Name: "I found it! (7)" + Condition: " ARG0 >= 150000 " + Score: 30 + - ID: 220030 + Group: "AG_GET_ZENY" + Name: "Rich King (1)" + Condition: " ARG0 >= 10000 " + Score: 10 + - ID: 220031 + Group: "AG_GET_ZENY" + Name: "Rich King (2)" + Condition: " ARG0 >= 100000 " + Score: 15 + - ID: 220032 + Group: "AG_GET_ZENY" + Name: "Rich King (3)" + Condition: " ARG0 >= 1000000 " + Score: 20 + - ID: 220033 + Group: "AG_GET_ZENY" + Name: "Rich King (4)" + Condition: " ARG0 >= 10000000 " + Score: 25 + - ID: 220034 + Group: "AG_GET_ZENY" + Name: "Rich King (5)" + Condition: " ARG0 >= 100000000 " + Score: 30 + - ID: 220035 + Group: "AG_GET_ZENY" + Name: "Rich King (6)" + Condition: " ARG0 >= 1000000000 " + Score: 40 + - ID: 230200 + Group: "AG_BATTLE" + Name: "Poring seeker" + Dependent: [230201, 230202, 230203] + Score: 10 + - ID: 230201 + Group: "AG_BATTLE" + Name: "Exploring Poring's life (1)" + Target: + - MobID: 1002 + Count: 10 + # - MobID: 2398 + # Count: 10 + - MobID: 1113 + Count: 10 + - MobID: 1031 + Count: 10 + - MobID: 1242 + Count: 10 + Score: 10 + - ID: 230202 + Group: "AG_BATTLE" + Name: "Exploring Poring's life (2)" + Target: + - MobID: 1090 + Count: 1 + - MobID: 1582 + Count: 1 + - MobID: 1096 + Count: 1 + - MobID: 1388 + Count: 1 + - MobID: 1120 + Count: 1 + Score: 15 + - ID: 230203 + Group: "AG_BATTLE" + Name: "Exploring Poring's life (3)" + Target: + - MobID: 1613 + Count: 5 + - MobID: 1977 + Count: 5 + - MobID: 1836 + Count: 5 + Score: 20 + - ID: 240000 + Group: "AG_GOAL_LEVEL" + Name: "Complete challenges after first introduction" + Score: 10 + - ID: 240001 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 1" + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240002 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 2" + Dependent: [240001] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240003 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 3" + Dependent: [240002] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240004 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 4" + Dependent: [240003] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240005 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 5" + Dependent: [240004] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240006 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 6" + Dependent: [240005] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240007 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 7" + Dependent: [240006] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240008 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 8" + Dependent: [240007] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240009 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 9" + Dependent: [240008] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240010 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 10" + Dependent: [240009] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1023 + Score: 10 + - ID: 240011 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 11" + Dependent: [240010] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240012 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 12" + Dependent: [240011] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240013 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 13" + Dependent: [240012] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240014 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 14" + Dependent: [240013] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240015 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 15" + Dependent: [240014] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240016 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 16" + Dependent: [240015] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240017 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 17" + Dependent: [240016] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240018 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 18" + Dependent: [240017] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240019 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 19" + Dependent: [240018] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240020 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 20" + Dependent: [240019] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1024 + Score: 10 + - ID: 220036 + Group: "AG_EAT" + Name: "The beginning of outdoor" + Score: 20 + - ID: 220037 + Group: "AG_EAT" + Name: "The first step becoming a chef" + Score: 20 diff --git a/db/re/achievement_db.yml b/db/re/achievement_db.yml new file mode 100644 index 0000000000..fa72b9259a --- /dev/null +++ b/db/re/achievement_db.yml @@ -0,0 +1,2407 @@ +# This file is a part of rAthena. +# Copyright(C) 2017 rAthena Development Team +# https://rathena.org - https://github.com/rathena +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +########################################################################### +# Custom Achievement Database +########################################################################### +# +# Achievement Settings +# +########################################################################### +# ID - Unique achievement ID. +########################################################################### +# Group - Achievement group type. Each achievement type calls a specific +# objective check. +# Valid groups: +# AG_ADD_FRIEND +# AG_ADVENTURE +# AG_BABY +# AG_BATTLE +# AG_CHATTING +# AG_CHATTING_COUNT +# AG_CHATTING_CREATE +# AG_CHATTING_DYING +# AG_EAT +# AG_GET_ITEM +# AG_GET_ZENY +# AG_GOAL_ACHIEVE +# AG_GOAL_LEVEL +# AG_GOAL_STATUS +# AG_HEAR +# AG_JOB_CHANGE +# AG_MARRY +# AG_PARTY +# AG_ENCHANT_FAIL +# AG_ENCHANT_SUCCESS +# AG_SEE +# AG_SPEND_ZENY +# AG_TAMING +########################################################################### +# Name - Achievement name. Used when sending rewards through RODEX. +########################################################################### +# Target - A list of monster ID and count values that the achievement +# requires. The target count can also be used for achievements that keep +# a counter while not being related to monster kills. +# Capped at MAX_ACHIEVEMENT_OBJECTIVES. +########################################################################### +# Condition - A conditional statement that must be met for the achievement +# to be considered complete. +########################################################################### +# Map - A map name that is used for the AG_CHATTING type which increments +# the counter based on the player's map. +########################################################################### +# Dependent: - A list of achievement IDs that need to be completed before +# this achievement is considered complete. +########################################################################### +# Reward - A list of rewards that are given on completion. All fields are +# optional. +# ItemID: Item ID +# Amount: Amount of Item ID (default 1) +# Script: Bonus Script +# TitleID: Title ID +########################################################################### +# Score - Achievement points that are given on completion. +########################################################################### + +Achievements: + - ID: 110000 + Group: "AG_EAT" + Name: "At this time I live to eat" + Score: 10 + - ID: 110001 + Group: "AG_SEE" + Name: "A fan of this polarity" + Score: 10 + - ID: 120001 + Group: "AG_ADVENTURE" + Name: "North Prontera Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120002 + Group: "AG_ADVENTURE" + Name: "North Prontera Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120003 + Group: "AG_ADVENTURE" + Name: "North Prontera Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120004 + Group: "AG_ADVENTURE" + Name: "West Prontera Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120005 + Group: "AG_ADVENTURE" + Name: "West Prontera Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120006 + Group: "AG_ADVENTURE" + Name: "East Prontera Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120007 + Group: "AG_ADVENTURE" + Name: "South Prontera Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120008 + Group: "AG_ADVENTURE" + Name: "South Prontera Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120009 + Group: "AG_ADVENTURE" + Name: "South Prontera Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120010 + Group: "AG_ADVENTURE" + Name: "South Prontera Field Exploration(4)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120011 + Group: "AG_ADVENTURE" + Name: "East Geffen Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120012 + Group: "AG_ADVENTURE" + Name: "Southeast Geffen Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120013 + Group: "AG_ADVENTURE" + Name: "Northwest Geffen Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120014 + Group: "AG_ADVENTURE" + Name: "Northwest Geffen Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120015 + Group: "AG_ADVENTURE" + Name: "Northwest Geffen Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120016 + Group: "AG_ADVENTURE" + Name: "South Geffen Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120017 + Group: "AG_ADVENTURE" + Name: "South Geffen Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120018 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120019 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120020 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120021 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(4)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120022 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(5)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120023 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Field Exploration(6)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120024 + Group: "AG_ADVENTURE" + Name: "Southwest Payon Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120025 + Group: "AG_ADVENTURE" + Name: "Southwest Payon Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120026 + Group: "AG_ADVENTURE" + Name: "Southwest Payon Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120027 + Group: "AG_ADVENTURE" + Name: "Southwest Payon Field Exploration(4)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120028 + Group: "AG_ADVENTURE" + Name: "East Payon Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120029 + Group: "AG_ADVENTURE" + Name: "East Payon Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120030 + Group: "AG_ADVENTURE" + Name: "East Payon Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120031 + Group: "AG_ADVENTURE" + Name: "East Payon Field Exploration(4)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120032 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120033 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120034 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120035 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(4)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120036 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Field Exploration(5)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120037 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120038 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120039 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120040 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(4)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120041 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(5)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120042 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Field Exploration(6)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120043 + Group: "AG_ADVENTURE" + Name: "South Aldebaran Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120044 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120045 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120046 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120047 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(4)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120048 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(5)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120049 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(6)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120050 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(7)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120051 + Group: "AG_ADVENTURE" + Name: "Comodo Field Exploration(8)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120052 + Group: "AG_ADVENTURE" + Name: "Border Checkpoint Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120053 + Group: "AG_ADVENTURE" + Name: "Border Checkpoint Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120054 + Group: "AG_ADVENTURE" + Name: "Kiel Hyre Mansion Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120055 + Group: "AG_ADVENTURE" + Name: "El Mes Plateau Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120056 + Group: "AG_ADVENTURE" + Name: "El Mes Plateau Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120057 + Group: "AG_ADVENTURE" + Name: "El Mes Plateau Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120058 + Group: "AG_ADVENTURE" + Name: "El Mes Gorge Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120059 + Group: "AG_ADVENTURE" + Name: "Kiel Hyre Academy Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120060 + Group: "AG_ADVENTURE" + Name: "Guard Camp Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120061 + Group: "AG_ADVENTURE" + Name: "Yuno Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120062 + Group: "AG_ADVENTURE" + Name: "Front of Thanatos Tower Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120063 + Group: "AG_ADVENTURE" + Name: "Hugel Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120064 + Group: "AG_ADVENTURE" + Name: "Hugel Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120065 + Group: "AG_ADVENTURE" + Name: "Hugel Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120066 + Group: "AG_ADVENTURE" + Name: "Abyss Lake Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120067 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120068 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120069 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120070 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(4)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120071 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(5)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120072 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(6)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120073 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(7)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120074 + Group: "AG_ADVENTURE" + Name: "Einbroch Field Exploration(8)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120075 + Group: "AG_ADVENTURE" + Name: "Lighthalzen Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120076 + Group: "AG_ADVENTURE" + Name: "Lighthalzen Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120077 + Group: "AG_ADVENTURE" + Name: "Lighthalzen Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120078 + Group: "AG_ADVENTURE" + Name: "Rachel Audhumbla Plains Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120079 + Group: "AG_ADVENTURE" + Name: "Rachel Plains Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120080 + Group: "AG_ADVENTURE" + Name: "Rachel Plains Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120081 + Group: "AG_ADVENTURE" + Name: "Rachel Plains Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120082 + Group: "AG_ADVENTURE" + Name: "Rachel Audhumbla Grassland Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120083 + Group: "AG_ADVENTURE" + Name: "Rachel Audhumbla Grassland Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120084 + Group: "AG_ADVENTURE" + Name: "Portus Luna Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120085 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120086 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120087 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120088 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(4)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120089 + Group: "AG_ADVENTURE" + Name: "Veins Field Exploration(5)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120090 + Group: "AG_ADVENTURE" + Name: "Eclage Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120091 + Group: "AG_ADVENTURE" + Name: "North Bitfrost Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120092 + Group: "AG_ADVENTURE" + Name: "South Bitfrost Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120093 + Group: "AG_ADVENTURE" + Name: "Splendide Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120094 + Group: "AG_ADVENTURE" + Name: "Splendide Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120095 + Group: "AG_ADVENTURE" + Name: "Splendide Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120096 + Group: "AG_ADVENTURE" + Name: "Manuk Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120097 + Group: "AG_ADVENTURE" + Name: "Manuk Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120098 + Group: "AG_ADVENTURE" + Name: "Manuk Field Exploration(3)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120099 + Group: "AG_ADVENTURE" + Name: "Outskirts of Kamidal Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120100 + Group: "AG_ADVENTURE" + Name: "Outskirts of Kamidal Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120101 + Group: "AG_ADVENTURE" + Name: "Amatsu Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120102 + Group: "AG_ADVENTURE" + Name: "Kunlun Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120103 + Group: "AG_ADVENTURE" + Name: "Gonryun Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120104 + Group: "AG_ADVENTURE" + Name: "Ayothaya Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120105 + Group: "AG_ADVENTURE" + Name: "Moscovia Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120106 + Group: "AG_ADVENTURE" + Name: "Brasilis Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120107 + Group: "AG_ADVENTURE" + Name: "Dewata Field Exploration" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120108 + Group: "AG_ADVENTURE" + Name: "Malaya Field Exploration(1)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120109 + Group: "AG_ADVENTURE" + Name: "Malaya Field Exploration(2)" + Reward: + ItemID: 22876 + Score: 10 + - ID: 120110 + Group: "AG_ADVENTURE" + Name: "Abbey Underground Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120111 + Group: "AG_ADVENTURE" + Name: "Abyss Lake Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120112 + Group: "AG_ADVENTURE" + Name: "Clock Tower Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120113 + Group: "AG_ADVENTURE" + Name: "Amatsu Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120114 + Group: "AG_ADVENTURE" + Name: "Ant Hell Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120115 + Group: "AG_ADVENTURE" + Name: "Ayothaya Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120116 + Group: "AG_ADVENTURE" + Name: "Comodo Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120117 + Group: "AG_ADVENTURE" + Name: "Brasilis Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120118 + Group: "AG_ADVENTURE" + Name: "Clock Tower Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120119 + Group: "AG_ADVENTURE" + Name: "Istana Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120120 + Group: "AG_ADVENTURE" + Name: "Scaraba Hole Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120121 + Group: "AG_ADVENTURE" + Name: "Bitfrost Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120122 + Group: "AG_ADVENTURE" + Name: "Einbroch Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120123 + Group: "AG_ADVENTURE" + Name: "Geffen Underground Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120124 + Group: "AG_ADVENTURE" + Name: "Glastheim Dungeon Exploration(1)" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120125 + Group: "AG_ADVENTURE" + Name: "Glastheim Dungeon Exploration(2)" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120126 + Group: "AG_ADVENTURE" + Name: "Glastheim Dungeon Exploration(3)" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120127 + Group: "AG_ADVENTURE" + Name: "Glastheim Dungeon Exploration(4)" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120128 + Group: "AG_ADVENTURE" + Name: "Kunlun Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120129 + Group: "AG_ADVENTURE" + Name: "Rachel Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120130 + Group: "AG_ADVENTURE" + Name: "Sphinx Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120131 + Group: "AG_ADVENTURE" + Name: "Izlude Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120132 + Group: "AG_ADVENTURE" + Name: "Robot Factory Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120133 + Group: "AG_ADVENTURE" + Name: "Bio Lab Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120134 + Group: "AG_ADVENTURE" + Name: "Gonryun Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120135 + Group: "AG_ADVENTURE" + Name: "Nogg Road Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120136 + Group: "AG_ADVENTURE" + Name: "Coal Mine Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120137 + Group: "AG_ADVENTURE" + Name: "Pyramid Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120138 + Group: "AG_ADVENTURE" + Name: "Orc Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120139 + Group: "AG_ADVENTURE" + Name: "Payon Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120140 + Group: "AG_ADVENTURE" + Name: "Labyrinth Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120141 + Group: "AG_ADVENTURE" + Name: "Undersea Tunnel Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120142 + Group: "AG_ADVENTURE" + Name: "Thanatos Tower Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120143 + Group: "AG_ADVENTURE" + Name: "Thor Volcano Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120144 + Group: "AG_ADVENTURE" + Name: "Sunken Ship Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120145 + Group: "AG_ADVENTURE" + Name: "Turtle Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 120146 + Group: "AG_ADVENTURE" + Name: "Toy Factory Dungeon Exploration" + Reward: + ItemID: 22876 + Score: 20 + - ID: 127001 + Group: "AG_CHATTING" + Name: "Prontera Contribution" + Map: "prontera" + Target: + Count: 100000 + Score: 10 + - ID: 127002 + Group: "AG_CHATTING" + Name: "Geffen Contribution" + Map: "geffen" + Target: + Count: 100000 + Score: 10 + - ID: 127003 + Group: "AG_CHATTING" + Name: "Morocc Contribution" + Map: "morocc" + Target: + Count: 100000 + Score: 10 + - ID: 127004 + Group: "AG_CHATTING" + Name: "Payon Contribution" + Map: "payon" + Target: + Count: 100000 + Score: 10 + - ID: 127005 + Group: "AG_CHATTING" + Name: "Yuno Contribution" + Map: "yuno" + Target: + Count: 100000 + Score: 10 + - ID: 127006 + Group: "AG_CHATTING" + Name: "Lighthalzen Contribution" + Map: "lighthalzen" + Target: + Count: 100000 + Score: 10 + - ID: 127007 + Group: "AG_CHATTING" + Name: "Einbroch Contribution" + Map: "einbroch" + Target: + Count: 100000 + Score: 10 + - ID: 127008 + Group: "AG_CHATTING" + Name: "Rachel Contribution" + Map: "rachel" + Target: + Count: 100000 + Score: 10 + - ID: 127009 + Group: "AG_CHATTING" + Name: "Veins Contribution" + Map: "veins" + Target: + Count: 100000 + Score: 10 + - ID: 128000 + Group: "AG_BATTLE" + Name: "Uninvited Guest" + Target: + - MobID: 2996 + Count: 1 + Score: 10 + - ID: 128001 + Group: "AG_BATTLE" + Name: "Strange Guest" + Target: + - MobID: 2996 + Count: 10 + Score: 10 + - ID: 128002 + Group: "AG_BATTLE" + Name: "Get along with map..." + Target: + - MobID: 2996 + Count: 25 + Score: 20 + - ID: 128003 + Group: "AG_BATTLE" + Name: "Welcomed Guest" + Target: + - MobID: 2996 + Count: 50 + Score: 30 + - ID: 128004 + Group: "AG_BATTLE" + Name: "Kimmy's best friend" + Target: + - MobID: 2996 + Count: 100 + Score: 50 + - ID: 128005 + Group: "AG_BATTLE" + Name: "Novice Angler" + Target: + - MobID: 2322 + Count: 1 + Score: 10 + - ID: 128006 + Group: "AG_BATTLE" + Name: "Juicy Hunter" + Target: + - MobID: 2322 + Count: 10 + Score: 20 + - ID: 128007 + Group: "AG_BATTLE" + Name: "Rhythm Master" + Target: + - MobID: 2322 + Count: 50 + Score: 50 + - ID: 128008 + Group: "AG_BATTLE" + Name: "Bold Adventurer" + Target: + - MobID: 1929 + Count: 1 + Score: 10 + - ID: 128009 + Group: "AG_BATTLE" + Name: "Baphomet Hatred" + Target: + - MobID: 1929 + Count: 10 + Score: 20 + - ID: 128010 + Group: "AG_BATTLE" + Name: "Goat's Nemesis" + Target: + - MobID: 1929 + Count: 50 + Score: 50 + - ID: 128011 + Group: "AG_BATTLE" + Name: "Ordinary Tourist" + #Target: + # - MobID: 3029 + # Count: 1 + Score: 10 + - ID: 128012 + Group: "AG_BATTLE" + Name: "Backcountry Expert" + #Target: + # - MobID: 3029 + # Count: 10 + Score: 20 + - ID: 128013 + Group: "AG_BATTLE" + Name: "Able to eat more like this" + #Target: + # - MobID: 3029 + # Count: 50 + Score: 50 + - ID: 128014 + Group: "AG_BATTLE" + Name: "Digest hard meat" + Target: + - MobID: 2319 + Count: 1 + Score: 10 + - ID: 128015 + Group: "AG_BATTLE" + Name: "Master of Escape" + Target: + - MobID: 2319 + Count: 10 + Score: 20 + - ID: 128016 + Group: "AG_BATTLE" + Name: "Immortal Hunter" + Target: + - MobID: 2319 + Count: 50 + Score: 50 + - ID: 128017 + Group: "AG_BATTLE" + Name: "Stood up and overcame despair" + #Target: + # - MobID: 3097 + # Count: 1 + Score: 10 + - ID: 128018 + Group: "AG_BATTLE" + Name: "Ember of Hope" + #Target: + # - MobID: 3097 + # Count: 10 + Score: 10 + - ID: 128019 + Group: "AG_BATTLE" + Name: "Pouring Aurora" + #Target: + # - MobID: 3097 + # Count: 25 + Score: 20 + - ID: 128020 + Group: "AG_BATTLE" + Name: "Who is desperate? I am hopeless!" + #Target: + # - MobID: 3097 + # Count: 50 + Score: 30 + - ID: 128021 + Group: "AG_BATTLE" + Name: "I know god will save the world" + #Target: + # - MobID: 3097 + # Count: 100 + Score: 50 + - ID: 128022 + Group: "AG_BATTLE" + Name: "There was mercy in Morocc army" + #Target: + # - MobID: 3000 + # Count: 1 + Score: 10 + - ID: 128023 + Group: "AG_BATTLE" + Name: "There was fear in Morocc army" + #Target: + # - MobID: 3000 + # Count: 10 + Score: 20 + - ID: 128024 + Group: "AG_BATTLE" + Name: "Guard of weak army" + #Target: + # - MobID: 3000 + # Count: 50 + Score: 50 + - ID: 128025 + Group: "AG_BATTLE" + Name: "Audience with the queen" + #Target: + # - MobID: 2529 + # Count: 1 + Score: 10 + - ID: 128026 + Group: "AG_BATTLE" + Name: "Warm earth" + #Target: + # - MobID: 2533 + # Count: 1 + Score: 10 + - ID: 128027 + Group: "AG_BATTLE" + Name: "Water is very good exactly" + #Target: + # - MobID: 2534 + # Count: 1 + Score: 10 + - ID: 128028 + Group: "AG_BATTLE" + Name: "Pleasant breeze" + #Target: + # - MobID: 2535 + # Count: 1 + Score: 10 + - ID: 128029 + Group: "AG_BATTLE" + Name: "Visitor of old castle" + Target: + - MobID: 2476 + Count: 1 + Score: 10 + - ID: 128030 + Group: "AG_BATTLE" + Name: "Lord of old castle" + Target: + - MobID: 2476 + Count: 10 + Score: 20 + - ID: 128031 + Group: "AG_BATTLE" + Name: "Conqueror of old castle" + Target: + - MobID: 2476 + Count: 50 + Score: 50 + - ID: 128032 + Group: "AG_BATTLE" + Name: "Haggard sucker" + #Target: + # - MobID: 3150 + # Count: 1 + Score: 10 + - ID: 128033 + Group: "AG_BATTLE" + Name: "Hope of the Knight" + #Target: + # - MobID: 3150 + # Count: 10 + Score: 20 + - ID: 128034 + Group: "AG_BATTLE" + Name: "Guardian of the Dawn" + #Target: + # - MobID: 3150 + # Count: 50 + Score: 50 + - ID: 128035 + Group: "AG_BATTLE" + Name: "Time Traveler" + #Target: + # - MobID: 3190 + # Count: 1 + Score: 10 + - ID: 128036 + Group: "AG_BATTLE" + Name: "Restore ancient relic" + #Target: + # - MobID: 3190 + # Count: 10 + Score: 20 + - ID: 128037 + Group: "AG_BATTLE" + Name: "Master of relic transport" + #Target: + # - MobID: 3190 + # Count: 50 + Score: 50 + - ID: 128038 + Group: "AG_BATTLE" + Name: "Show Jailbreak to the captain" + #Target: + # - MobID: 3181 + # Count: 1 + Score: 10 + - ID: 128039 + Group: "AG_BATTLE" + Name: "Show Jailbreak to the weak captain" + #Target: + # - MobID: 3188 + # Count: 1 + Score: 10 + - ID: 128040 + Group: "AG_BATTLE" + Name: "Riot on board" + #Target: + # - MobID: 3181 + # Count: 1 + Score: 20 + - ID: 128041 + Group: "AG_BATTLE" + Name: "Turmoil on board" + #Target: + # - MobID: 3181 + # Count: 10 + Score: 20 + - ID: 128042 + Group: "AG_BATTLE" + Name: "Rebellion on board" + #Target: + # - MobID: 3181 + # Count: 50 + Score: 50 + - ID: 128043 + Group: "AG_BATTLE" + Name: "Revolt of Riot" + #Target: + # - MobID: 3188 + # Count: 50 + Score: 50 + - ID: 128044 + Group: "AG_BATTLE" + Name: "Magic tournament champion" + Target: + - MobID: 2564 + Count: 1 + Score: 10 + - ID: 128045 + Group: "AG_BATTLE" + Name: "Gladiator of Coliseum" + Target: + - MobID: 2564 + Count: 10 + Score: 20 + - ID: 128046 + Group: "AG_BATTLE" + Name: "Slayer of Colosseum" + Target: + - MobID: 2564 + Count: 50 + Score: 50 + - ID: 128047 + Group: "AG_BATTLE" + Name: "Endless Tower challenger" + Target: + - MobID: 1956 + Count: 1 + Score: 10 + - ID: 128048 + Group: "AG_BATTLE" + Name: "Endless Tower Slayer" + Target: + - MobID: 1956 + Count: 10 + Score: 20 + - ID: 128049 + Group: "AG_BATTLE" + Name: "Lord of the tower" + Target: + - MobID: 1956 + Count: 50 + Score: 50 + - ID: 128050 + Group: "AG_BATTLE" + Name: "Novice Exorcist" + Target: + - MobID: 2327 + Count: 1 + Score: 10 + - ID: 128051 + Group: "AG_BATTLE" + Name: "Experienced Exorcist" + Target: + - MobID: 2327 + Count: 10 + Score: 20 + - ID: 128052 + Group: "AG_BATTLE" + Name: "Legendary Exorcist" + Target: + - MobID: 2327 + Count: 50 + Score: 50 + - ID: 129001 + Group: "AG_ADVENTURE" + Name: "Prontera Explorer" + Depdendent: [120001, 120002, 120003, 120004, 120005, 120006, 120007, 120008, 120009, 120010] + Reward: + ItemID: 644 + Score: 20 + - ID: 129002 + Group: "AG_ADVENTURE" + Name: "Geffen Explorer" + Depdendent: [120011, 120012, 120013, 120014, 120015, 120016, 120017] + Reward: + ItemID: 644 + Score: 20 + - ID: 129003 + Group: "AG_ADVENTURE" + Name: "Sograt Desert Explorer" + Depdendent: [120018, 120019, 120020, 120021, 120022, 120023] + Reward: + ItemID: 644 + Score: 20 + - ID: 129004 + Group: "AG_ADVENTURE" + Name: "Payon Explorer" + Depdendent: [120024, 120025, 120026, 120027, 120028, 120029, 120030, 120031] + Reward: + ItemID: 644 + Score: 20 + - ID: 129005 + Group: "AG_ADVENTURE" + Name: "North Mjolnir Explorer" + Depdendent: [120032, 120033, 120034, 120035, 120036] + Reward: + ItemID: 644 + Score: 20 + - ID: 129006 + Group: "AG_ADVENTURE" + Name: "South Mjolnir Explorer" + Depdendent: [120037, 120038, 120039, 120040, 120041, 120042, 120043] + Reward: + ItemID: 644 + Score: 20 + - ID: 129007 + Group: "AG_ADVENTURE" + Name: "Comodo Explorer" + Depdendent: [120044, 120045, 120046, 120047, 120048, 120049, 120050, 120051] + Reward: + ItemID: 644 + Score: 20 + - ID: 129008 + Group: "AG_ADVENTURE" + Name: "Rune Midgard Explorer" + Depdendent: [129001, 129002, 129003, 129004, 129005, 129006, 129007] + Reward: + ItemID: 617 + Score: 50 + - ID: 129009 + Group: "AG_ADVENTURE" + Name: "Yuno Explorer" + Depdendent: [120052, 120053, 120054, 120055, 120056, 120057, 120058, 120059, 120060, 120061] + Reward: + ItemID: 644 + Score: 20 + - ID: 129010 + Group: "AG_ADVENTURE" + Name: "Hugel Explorer" + Depdendent: [120062, 120063, 120064, 120065, 120066] + Reward: + ItemID: 644 + Score: 20 + - ID: 129011 + Group: "AG_ADVENTURE" + Name: "Einbroch Explorer" + Depdendent: [120067, 120068, 120069, 120070, 120071, 120072, 120073, 120074] + Reward: + ItemID: 644 + Score: 20 + - ID: 129012 + Group: "AG_ADVENTURE" + Name: "Lighthalzen Explorer" + Depdendent: [120075, 120076, 120077] + Reward: + ItemID: 644 + Score: 20 + - ID: 129013 + Group: "AG_ADVENTURE" + Name: "Schwarzwald Explorer" + Depdendent: [129009, 129010, 129011, 129012] + Reward: + ItemID: 617 + Score: 50 + - ID: 129014 + Group: "AG_ADVENTURE" + Name: "Rachel Explorer" + Depdendent: [120078, 120079, 120080, 120081, 120082, 120083, 120084] + Reward: + ItemID: 644 + Score: 20 + - ID: 129015 + Group: "AG_ADVENTURE" + Name: "Veins Explorer" + Depdendent: [120085, 120086, 120087, 120088, 120089] + Reward: + ItemID: 644 + Score: 20 + - ID: 129016 + Group: "AG_ADVENTURE" + Name: "Arunafeltz Explorer" + Depdendent: [129014, 129015] + Reward: + ItemID: 617 + Score: 50 + - ID: 129017 + Group: "AG_ADVENTURE" + Name: "Laphine Explorer" + Depdendent: [120090, 120091, 120092, 120093, 120094, 120095] + Reward: + ItemID: 644 + Score: 20 + - ID: 129018 + Group: "AG_ADVENTURE" + Name: "Manuk Explorer" + Depdendent: [120096, 120097, 120098, 120099, 120100] + Reward: + ItemID: 644 + Score: 20 + - ID: 129019 + Group: "AG_ADVENTURE" + Name: "Eclage Explorer" + Depdendent: [129017, 129018] + Reward: + ItemID: 617 + Score: 50 + - ID: 129020 + Group: "AG_ADVENTURE" + Name: "Localizing fields explorer" + Depdendent: [120101, 120102, 120103, 120104, 120105, 120106, 120107, 120108, 120109] + Reward: + ItemID: 617 + Score: 50 + - ID: 130000 # Talk to Prince NPC (npc/quests/quests_morocc.txt L5288) + Group: "AG_CHATTING" + Name: "Socialite debut" + Reward: + TitleID: 1034 + Score: 10 + - ID: 170000 + Group: "AG_HEAR" + Name: "Song chamber is not an accident" + Score: 10 + - ID: 190000 + Group: "AG_CHATTING" + Name: "Alliance workers of merchant city" + Score: 50 + - ID: 200000 + Group: "AG_GOAL_LEVEL" + Name: "Acquire the first aura!" + Condition: " BaseLevel >= 99 " + Reward: + ItemID: 12549 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1000 + Score: 50 + - ID: 200001 + Group: "AG_GOAL_LEVEL" + Name: "Acquire the second aura!" + Condition: " BaseLevel >= 150 " + Depdendent: [200000] + Reward: + ItemID: 5364 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1001 + Score: 60 + - ID: 200002 + Group: "AG_GOAL_LEVEL" + Name: "Acquire the third aura!" + Condition: " BaseLevel >= 175 " + Depdendent: [200001] + Reward: + ItemID: 18880 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1002 + Score: 70 + - ID: 200003 + Group: "AG_GOAL_LEVEL" + Name: "Master Job level!" + Condition: " JobLevel >= 50 " + Reward: + ItemID: 617 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1003 + Score: 30 + - ID: 200004 + Group: "AG_GOAL_LEVEL" + Name: "Grandmaster Job level!" + Condition: " JobLevel >= 70 " + Depdendent: [200003] + Reward: + ItemID: 12817 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + TitleID: 1004 + Score: 50 + - ID: 200005 + Group: "AG_JOB_CHANGE" + Name: "Official Adventurer" + Condition: " Class >= JOB_SWORDMAN && Class <= JOB_THIEF " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 200006 + Group: "AG_JOB_CHANGE" + Name: "First step of job change!" + Condition: " Class >= JOB_SWORDMAN && Class <= JOB_THIEF " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 20 + - ID: 200007 + Group: "AG_JOB_CHANGE" + Name: "Veteran Adventurer! (1)" + Condition: " Class >= JOB_KNIGHT && Class <= JOB_ASSASSIN " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 25 + - ID: 200008 + Group: "AG_JOB_CHANGE" + Name: "Veteran Adventurer! (2)" + Condition: " Class >= JOB_CRUSADER && Class <= JOB_DANCER " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 25 + - ID: 200009 + Group: "AG_JOB_CHANGE" + Name: "Warrior (1)" + Condition: " Class >= JOB_LORD_KNIGHT && Class <= JOB_ASSASSIN_CROSS " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 30 + - ID: 200010 + Group: "AG_JOB_CHANGE" + Name: "Warrior (2)" + Condition: " Class >= JOB_PALADIN && Class <= JOB_GYPSY " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 30 + - ID: 200011 + Group: "AG_JOB_CHANGE" + Name: "Elite Adventurer! (1)" + Condition: " Class >= JOB_RUNE_KNIGHT && Class <= JOB_GUILLOTINE_CROSS " + Reward: + ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 50 + - ID: 200012 + Group: "AG_JOB_CHANGE" + Name: "Transcendentaler! (1)" + Condition: " Class >= JOB_RUNE_KNIGHT_T && Class <= JOB_GUILLOTINE_CROSS_T " + Reward: + ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 60 + - ID: 200013 + Group: "AG_JOB_CHANGE" + Name: "Elite Adventurer! (2)" + Condition: " Class >= JOB_ROYAL_GUARD && Class <= JOB_SHADOW_CHASER " + Reward: + ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 50 + - ID: 200014 + Group: "AG_JOB_CHANGE" + Name: "Transcendentaler! (2)" + Condition: " Class >= JOB_ROYAL_GUARD_T && Class <= JOB_SHADOW_CHASER_T " + Reward: + ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 60 + - ID: 200015 + Group: "AG_JOB_CHANGE" + Name: "The way of exceptional character" + Condition: " Class == JOB_SUPER_NOVICE || Class == JOB_GUNSLINGER || Class == JOB_NINJA || Class == JOB_TAEKWON " + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 200016 + Group: "AG_JOB_CHANGE" + Name: "This is My way!" + Condition: " Class == JOB_STAR_GLADIATOR || Class == JOB_SOUL_LINKER || Class == JOB_KAGEROU || Class == JOB_OBORO || Class == JOB_REBELLION " + Reward: + ItemID: 16483 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 20 + - ID: 200017 + Group: "AG_GOAL_STATUS" + Name: "Bearish Power!" + Condition: " bStr >= 90 " + Score: 10 + - ID: 200018 + Group: "AG_GOAL_STATUS" + Name: "Overflowing Magic!" + Condition: " bInt >= 90 " + Score: 10 + - ID: 200019 + Group: "AG_GOAL_STATUS" + Name: "Healthy Body and Mental Health!" + Condition: " bVit >= 90 " + Score: 10 + - ID: 200020 + Group: "AG_GOAL_STATUS" + Name: "Speed of Light" + Condition: " bAgi >= 90 " + Score: 10 + - ID: 200021 + Group: "AG_GOAL_STATUS" + Name: "Hawk Eyes" + Condition: " bDex >= 90 " + Score: 10 + - ID: 200022 + Group: "AG_GOAL_STATUS" + Name: "Maximum Luck" + Condition: " bLuk >= 90 " + Score: 10 + - ID: 200023 + Group: "AG_GOAL_STATUS" + Name: "Dragonlike Power!" + Condition: " bStr >= 125 " + Reward: + Script: " sc_start SC_GIANTGROWTH,180000,1; " + Score: 20 + - ID: 200024 + Group: "AG_GOAL_STATUS" + Name: "Magic Insanity" + Condition: " bInt >= 125 " + Reward: + Script: " specialeffect2 EF_HASTEUP; bonus_script \"{ bonus2 bHPLossRate,100,10000; bonus bBaseAtk,20; bonus bAspdRate,25; }\",60,0,0,SI_STEAMPACK; " + Score: 20 + - ID: 200025 + Group: "AG_GOAL_STATUS" + Name: "Rock Alloy" + Condition: " bVit >= 125 " + Reward: + Script: " specialeffect2 EF_HEAL3; sc_start2 SC_S_LIFEPOTION,600000,-5,5; " + Score: 20 + - ID: 200026 + Group: "AG_GOAL_STATUS" + Name: "Speed of Light" + Condition: " bAgi >= 125 " + Reward: + Script: " specialeffect2 EF_STEAL; sc_start SC_INCFLEE2,60000,20; " + Score: 20 + - ID: 200027 + Group: "AG_GOAL_STATUS" + Name: "Falcon's Eyes" + Condition: " bDex >= 125 " + Reward: + Script: " specialeffect2 EF_MAGICALATTHIT; sc_start SC_INCCRI,300000,30; " + Score: 20 + - ID: 200028 + Group: "AG_GOAL_STATUS" + Name: "Lucky Fever" + Condition: " bLuk >= 125 " + Reward: + Script: " specialeffect2 EF_GLORIA; sc_start SC_GLORIA,15000,0; " + Score: 20 + - ID: 200029 + Group: "AG_GOAL_STATUS" + Name: "Incarnation of Love and Hate" + Condition: " BaseLevel == 99 && Class == JOB_NOVICE " + Reward: + ItemID: 16483 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + Score: 30 + - ID: 200030 + Group: "AG_GOAL_STATUS" + Name: "I really love it!" + Condition: " BaseLevel == 99 && (Class >= JOB_SWORDMAN && Class <= JOB_THIEF) " + Reward: + ItemID: 16504 + Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " + Score: 30 + - ID: 200031 + Group: "AG_JOB_CHANGE" + Name: "Reborn in Valhalla!" + Condition: " BaseLevel == 99 && Class == JOB_NOVICE_HIGH " + Reward: + ItemID: 22808 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 230100 + Group: "AG_TAMING" + Name: "Poring is Love" + Depdendent: [230101, 230102, 230103, 230104] + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1025 + Score: 50 + - ID: 230110 + Group: "AG_TAMING" + Name: "Entomologist" + Depdendent: [230111, 230112, 230113, 230114, 230115, 230116] + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1026 + Score: 50 + - ID: 230120 + Group: "AG_TAMING" + Name: "Animals are also our friend" + Depdendent: [230121, 230122, 230123, 230124, 230125, 230126, 230127, 230128] + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1027 + Score: 50 + - ID: 230140 + Group: "AG_TAMING" + Name: "Monster Girls Unite!!" + Depdendent: [230141, 230142, 230143, 230144, 230145, 230146, 230147] + Reward: + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1029 + Score: 50 + - ID: 230101 + Group: "AG_TAMING" + Name: "Poring - taming" + Target: + - MobID: 1002 + Count: 1 + Score: 10 + - ID: 230102 + Group: "AG_TAMING" + Name: "Drops - taming" + Target: + - MobID: 1113 + Count: 1 + Score: 10 + - ID: 230103 + Group: "AG_TAMING" + Name: "Poporing - taming" + Target: + - MobID: 1031 + Count: 1 + Score: 10 + - ID: 230104 + Group: "AG_TAMING" + Name: "Novice Poring - taming" + Target: + - MobID: 2398 + Count: 1 + Score: 10 + - ID: 230111 + Group: "AG_TAMING" + Name: "Chonchon - taming" + Target: + - MobID: 1011 + Count: 1 + Score: 10 + - ID: 230112 + Group: "AG_TAMING" + Name: "Steel Chonchon - taming" + Target: + - MobID: 1042 + Count: 1 + Score: 10 + - ID: 230113 + Group: "AG_TAMING" + Name: "Hunter Fly - taming" + Target: + - MobID: 1035 + Count: 1 + Score: 10 + - ID: 230114 + Group: "AG_TAMING" + Name: "Rocker - taming" + Target: + - MobID: 1052 + Count: 1 + Score: 10 + - ID: 230115 + Group: "AG_TAMING" + Name: "Spore - taming" + Target: + - MobID: 1014 + Count: 1 + Score: 10 + - ID: 230116 + Group: "AG_TAMING" + Name: "Poison Spore - taming" + Target: + - MobID: 1077 + Count: 1 + Score: 10 + - ID: 230121 + Group: "AG_TAMING" + Name: "Lunatic - taming" + Target: + - MobID: 1063 + Count: 1 + Score: 10 + - ID: 230122 + Group: "AG_TAMING" + Name: "Picky - taming" + Target: + - MobID: 1049 + Count: 1 + Score: 10 + - ID: 230123 + Group: "AG_TAMING" + Name: "Savage Bebe - taming" + Target: + - MobID: 1167 + Count: 1 + Score: 10 + - ID: 230124 + Group: "AG_TAMING" + Name: "Baby Desert Wolf - taming" + Target: + - MobID: 1107 + Count: 1 + Score: 10 + - ID: 230125 + Group: "AG_TAMING" + Name: "Smokie - taming" + Target: + - MobID: 1056 + Count: 1 + Score: 10 + - ID: 230126 + Group: "AG_TAMING" + Name: "Yoyo - taming" + Target: + - MobID: 1057 + Count: 1 + Score: 10 + - ID: 230127 + Group: "AG_TAMING" + Name: "Peco Peco - taming" + Target: + - MobID: 1019 + Count: 1 + Score: 10 + - ID: 230128 + Group: "AG_TAMING" + Name: "Petite - taming" + Target: + - MobID: 1155 + Count: 1 + Score: 10 + - ID: 230141 + Group: "AG_TAMING" + Name: "Munak - taming" + Target: + - MobID: 1026 + Count: 1 + Score: 10 + - ID: 230142 + Group: "AG_TAMING" + Name: "Isis - taming" + Target: + - MobID: 1029 + Count: 1 + Score: 10 + - ID: 230143 + Group: "AG_TAMING" + Name: "Sohee - taming" + Target: + - MobID: 1170 + Count: 1 + Score: 10 + - ID: 230144 + Group: "AG_TAMING" + Name: "Zherlthsh - taming" + Target: + - MobID: 1200 + Count: 1 + Score: 10 + - ID: 230145 + Group: "AG_TAMING" + Name: "Alice - taming" + Target: + - MobID: 1275 + Count: 1 + Score: 10 + - ID: 230146 + Group: "AG_TAMING" + Name: "Succubus - taming" + Target: + - MobID: 1370 + Count: 1 + Score: 10 + - ID: 230147 + Group: "AG_TAMING" + Name: "Loli Ruri - taming" + Target: + - MobID: 1505 + Count: 1 + Score: 10 + - ID: 220000 + Group: "AG_CHATTING_CREATE" + Name: "Community begin" + Condition: " true " + Score: 10 + - ID: 220001 + Group: "AG_CHATTING_DYING" + Name: "A mouth only moment" + Condition: " true " + Score: 10 + - ID: 220002 + Group: "AG_CHATTING_COUNT" + Name: "Admiring the chatter" + Condition: " ARG0 == 20 " + Score: 10 + - ID: 220003 + Group: "AG_ADD_FRIEND" + Name: "My friend's friend~" + Condition: " ARG0 >= 1 " + Score: 10 + - ID: 220004 + Group: "AG_ADD_FRIEND" + Name: "A competition of popularity" + Condition: " ARG0 >= 10 " + Score: 10 + - ID: 220005 + Group: "AG_PARTY" + Name: "Let's Party~" + Condition: " true " + Score: 10 + - ID: 220006 + Group: "AG_MARRY" + Name: "Married with who..?" + Condition: " true " + Reward: + TitleID: 1022 + Score: 20 + - ID: 220007 + Group: "AG_BABY" + Name: "Can you grow?" + Condition: " ARG0 == 1 " + Reward: + TitleID: 1032 + Score: 20 + - ID: 220008 + Group: "AG_BABY" + Name: "Being a parent" + Condition: " ARG0 == 2 " + Reward: + TitleID: 1033 + Score: 20 + - ID: 220009 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (1)" + Condition: " ARG0 >= 10000 " + Target: + Count: 10000 + Score: 10 + - ID: 220010 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (2)" + Condition: " ARG0 >= 100000 " + Target: + Count: 100000 + Score: 15 + - ID: 220011 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (3)" + Condition: " ARG0 >= 500000 " + Target: + Count: 500000 + Score: 20 + - ID: 220012 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (4)" + Condition: " ARG0 >= 1000000 " + Target: + Count: 1000000 + Score: 30 + - ID: 220013 + Group: "AG_SPEND_ZENY" + Name: "Activating the market economy (5)" + Condition: " ARG0 >= 5000000 " + Target: + Count: 5000000 + Score: 50 + - ID: 220014 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (1)" + Condition: " ARG0 == 1 && ARG1 >= 7 " + Score: 10 + - ID: 220015 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (2)" + Condition: " ARG0 == 1 && ARG1 >= 12 " + Score: 15 + - ID: 220016 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (3)" + Condition: " ARG0 == 2 && ARG1 >= 7 " + Score: 10 + - ID: 220017 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (4)" + Condition: " ARG0 == 2 && ARG1 >= 12 " + Score: 15 + - ID: 220018 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (5)" + Condition: " ARG0 == 3 && ARG1 >= 7 " + Score: 15 + - ID: 220019 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (6)" + Condition: " ARG0 == 3 && ARG1 >= 12 " + Score: 20 + - ID: 220020 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (7)" + Condition: " ARG0 == 4 && ARG1 >= 7 " + Score: 20 + - ID: 220021 + Group: "AG_ENCHANT_SUCCESS" + Name: "I can't quit from refining! (8)" + Condition: " ARG0 == 4 && ARG1 >= 12 " + Score: 30 + - ID: 220022 + Group: "AG_ENCHANT_FAIL" + Name: "Human's greed has no ending.." + Condition: " true " + Score: 10 + - ID: 220023 + Group: "AG_GET_ITEM" + Name: "I found it! (1)" + Condition: " ARG0 >= 100 " + Score: 10 + - ID: 220024 + Group: "AG_GET_ITEM" + Name: "I found it! (2)" + Condition: " ARG0 >= 1000 " + Score: 10 + - ID: 220025 + Group: "AG_GET_ITEM" + Name: "I found it! (3)" + Condition: " ARG0 >= 5000 " + Score: 15 + - ID: 220026 + Group: "AG_GET_ITEM" + Name: "I found it! (4)" + Condition: " ARG0 >= 10000 " + Score: 15 + - ID: 220027 + Group: "AG_GET_ITEM" + Name: "I found it! (5)" + Condition: " ARG0 >= 50000 " + Score: 20 + - ID: 220028 + Group: "AG_GET_ITEM" + Name: "I found it! (6)" + Condition: " ARG0 >= 100000 " + Score: 20 + - ID: 220029 + Group: "AG_GET_ITEM" + Name: "I found it! (7)" + Condition: " ARG0 >= 150000 " + Score: 30 + - ID: 220030 + Group: "AG_GET_ZENY" + Name: "Rich King (1)" + Condition: " ARG0 >= 10000 " + Score: 10 + - ID: 220031 + Group: "AG_GET_ZENY" + Name: "Rich King (2)" + Condition: " ARG0 >= 100000 " + Score: 15 + - ID: 220032 + Group: "AG_GET_ZENY" + Name: "Rich King (3)" + Condition: " ARG0 >= 1000000 " + Score: 20 + - ID: 220033 + Group: "AG_GET_ZENY" + Name: "Rich King (4)" + Condition: " ARG0 >= 10000000 " + Score: 25 + - ID: 220034 + Group: "AG_GET_ZENY" + Name: "Rich King (5)" + Condition: " ARG0 >= 100000000 " + Score: 30 + - ID: 220035 + Group: "AG_GET_ZENY" + Name: "Rich King (6)" + Condition: " ARG0 >= 1000000000 " + Score: 40 + - ID: 230200 + Group: "AG_BATTLE" + Name: "Poring seeker" + Depdendent: [230201, 230202, 230203] + Score: 10 + - ID: 230201 + Group: "AG_BATTLE" + Name: "Exploring Poring's life (1)" + Target: + - MobID: 1002 + Count: 10 + - MobID: 2398 + Count: 10 + - MobID: 1113 + Count: 10 + - MobID: 1031 + Count: 10 + - MobID: 1242 + Count: 10 + Score: 10 + - ID: 230202 + Group: "AG_BATTLE" + Name: "Exploring Poring's life (2)" + Target: + - MobID: 1090 + Count: 1 + - MobID: 1582 + Count: 1 + - MobID: 1096 + Count: 1 + - MobID: 1388 + Count: 1 + - MobID: 1120 + Count: 1 + Score: 15 + - ID: 230203 + Group: "AG_BATTLE" + Name: "Exploring Poring's life (3)" + Target: + - MobID: 1613 + Count: 5 + - MobID: 1977 + Count: 5 + - MobID: 1836 + Count: 5 + Score: 20 + - ID: 240000 + Group: "AG_GOAL_LEVEL" + Name: "Complete challenges after first introduction" + Score: 10 + - ID: 240001 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 1" + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240002 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 2" + Depdendent: [240001] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240003 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 3" + Depdendent: [240002] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240004 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 4" + Depdendent: [240003] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240005 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 5" + Depdendent: [240004] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240006 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 6" + Depdendent: [240005] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240007 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 7" + Depdendent: [240006] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240008 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 8" + Depdendent: [240007] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240009 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 9" + Depdendent: [240008] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240010 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 10" + Depdendent: [240009] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1023 + Score: 10 + - ID: 240011 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 11" + Depdendent: [240010] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240012 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 12" + Depdendent: [240011] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240013 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 13" + Depdendent: [240012] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240014 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 14" + Depdendent: [240013] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240015 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 15" + Depdendent: [240014] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240016 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 16" + Depdendent: [240015] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240017 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 17" + Depdendent: [240016] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240018 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 18" + Depdendent: [240017] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240019 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 19" + Depdendent: [240018] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + Score: 10 + - ID: 240020 + Group: "AG_GOAL_ACHIEVE" + Name: "Reaching Level 20" + Depdendent: [240019] + Reward: + ItemID: 644 + Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " + TitleID: 1024 + Score: 10 + - ID: 220036 + Group: "AG_EAT" + Name: "The beginning of outdoor" + Score: 20 + - ID: 220037 + Group: "AG_EAT" + Name: "The first step becoming a chef" + Score: 20 diff --git a/db/re/item_db.txt b/db/re/item_db.txt index dc5d0ac1ee..c989981f2d 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -11078,7 +11078,7 @@ 22873,Sealed_Beelzebub_Scroll_II,Sealed Beelzebub Scroll II,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem callfunc("F_Rand",22875,6238,6239,6228,6232,24231,24232,17474,6635),1; },{},{} 22874,Sealed_Beelzebub_Card_Album,Sealed Beelzebub Card Album,2,10,,50,,,,,0xFFFFFFFF,63,2,,,,,,{/*No Info*/},{},{} 22875,Sealed_Beelzebub_Card,Sealed Beelzebub Card,6,20,,10,,,,,,,,769,,,,,{ bonus bVariableCastrate,-15; /*Item removed on 2014-12-17*/ },{},{} -22876,Old_Money_Pocket,Old Money Pocket,3,0,,0,,,,,,,,,,,,,{},{},{} +22876,Old_Money_Pocket,Old Money Pocket,3,0,,0,,,,,,,,,,,,,{ Zeny += rand(500,550); },{},{} 22881,Rope_Gallows,Rope Gallows,2,10,,0,,,,,0xFFFFFFFF,63,2,,,,,,{/*Used to catch a Lost Sheep*/},{},{} 22882,Chocolate_Rice_Cake_Soup,Chocolate Rice Cake Soup,2,10,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ percentheal 10,10; },{},{} 22883,September_Gift_Box_,September Gift Box,2,10,,100,,,,,0xFFFFFFFF,63,2,,,,,,{/*2 Lucky Eggs*/},{},{} diff --git a/doc/achievements.txt b/doc/achievements.txt new file mode 100644 index 0000000000..70c9ad2a46 --- /dev/null +++ b/doc/achievements.txt @@ -0,0 +1,102 @@ +//===== rAthena Documentation ================================ +//= Achievement Database Structure +//===== By: ================================================== +//= rAthena Dev Team +//===== Last Updated: ======================================== +//= 20170531 +//===== Description: ========================================= +//= Explanation of the achievements_db.yml file and structure. +//============================================================ + +--------------------------------------- + +ID: Unique achievement ID. + +--------------------------------------- + +Group: Achievement group type. Each achievement type calls a specific objective check. +Valid groups: + AG_ADD_FRIEND - Triggered when a player adds a friend. + AG_ADVENTURE - Does not trigger automatically. These are triggered by the achievementcomplete script command. + AG_BABY - Triggered when a player becomes a baby job. + AG_BATTLE - Triggered when a player kills a monster. + AG_CHATTING - Unknown. + AG_CHATTING_COUNT - Triggered when a player has a chatroom open and others join. + AG_CHATTING_CREATE - Triggered when a player creates a chatroom. + AG_CHATTING_DYING - Triggered when a player creates a chatroom and dies with it open. + AG_EAT - Unknown. + AG_GET_ITEM - Triggered when a player gets an item that has a specific sell value. + AG_GET_ZENY - Triggered when a player gets a specific amount of zeny at once. + AG_GOAL_ACHIEVE - Triggered when a player's achievement rank levels up. + AG_GOAL_LEVEL - Triggered when a player's base level or job level changes. + AG_GOAL_STATUS - Triggered when a player's base stats changes. + AG_HEAR - Unknown. + AG_JOB_CHANGE - Triggered when a player's job changes. + AG_MARRY - Triggered when two players get married. + AG_PARTY - Triggered when a player creates a party. + AG_ENCHANT_FAIL - Triggered when a player fails to refine an equipment. + AG_ENCHANT_SUCCESS - Triggered when a player successfully refines an equipment. + AG_SEE - Unknown. + AG_SPEND_ZENY - Triggered when a player spends any amount of zeny on vendors. + AG_TAMING - Triggered when a player tames a monster. + +--------------------------------------- + +Name: Achievement name. Not read into source but used for quick look ups. + +--------------------------------------- + +Target: A list of monster ID and count values that the achievement requires. + The target count can also be used for achievements that keep a counter while not being related to monster kills. + Capped at MAX_ACHIEVEMENT_OBJECTIVES. + +Example: + // Player must kill 5 Scorpions and 10 Poring. + Target: + - MobID: 1001 + Count: 5 + - MobID: 1002 + Count: 10 + +Example 2: + // Player must have 100 or more of ARG0 value. Using the count target value is useful for achievements that are increased in increments + // and not checked for a total (UI_Type = 1). + // IE: In the achievement_list.lub file, UI_Type 0 is displayed as non-incremental while 1 shows a progress bar of completion for the achievement. + Condition: " ARG0 >= 100 " + Target: + Count: 100 + +--------------------------------------- + +Condition: A conditional statement that must be met for the achievement to be considered complete. Accepts script constants, player variables, and + ARGX (where X is the argument vector value). The ARGX values are sent from the server to the achievement script engine on special events. + Below are two examples of how the ARGX feature works. + +Example: + // This function will send 1 argument (ARG0) with a value of i + 1 when a friend is added. + achievement_update_objective(f_sd, AG_ADD_FRIEND, 1, i + 1); + +Example 2: + // This function will send 2 arguments (ARG0 and ARG1) with values of weapon level and refine level, respectively, when an equipment is + // successfully refined. + achievement_update_objective(sd, AG_REFINE_SUCCESS, 2, sd->inventory_data[i]->wlv, sd->inventory.u.items_inventory[i].refine); + +--------------------------------------- + +Map: A map name that is used for the AG_CHATTING type which increments the counter based on the player's map. + +--------------------------------------- + +Dependent: A list of achievement IDs that need to be completed before this achievement is considered complete. + +--------------------------------------- + +Reward: A list of rewards that are given on completion. All fields are optional. + ItemID: Item ID + Amount: Amount of Item ID (default 1) + Script: Bonus Script + TitleID: Title ID + +--------------------------------------- + +Score: Achievement points that are given on completion. diff --git a/doc/atcommands.txt b/doc/atcommands.txt index 7997c73eb4..d310424c48 100644 --- a/doc/atcommands.txt +++ b/doc/atcommands.txt @@ -1325,6 +1325,7 @@ This will also send a packet to clients causing them to close. @reloadscript @reloadskilldb @reloadstatusdb +@reloadachievementdb Reloads a database or configuration file. @@ -1335,6 +1336,7 @@ Databases: -- questdb: Quest Database -- script: NPC Scripts -- skilldb: Skill Database +-- achievementdb: Achievement Database Configuration files: -- atcommand: Atcommand Settings @@ -1356,7 +1358,8 @@ Affected files: -- questdb: quest_db.txt -- script: /npc/*.txt, /npc/*.conf -- skilldb: skill_db.txt, const.txt, skill_require_db.txt, skill_cast_db.txt, skill_castnodex_db.txt, skill_nocast_db.txt, skill_copyable_db.txt, skill_improvise_db.txt, skill_changematerial_db.txt, skill_nonearnpc_db.txt, skill_damage_db.txt, skill_unit_db.txt, abra_db.txt, create_arrow_db.txt, produce_db.txt, spellbook_db.txt, magicmushroom_db.txt --- statusdb: attr_fix.txt, size_fix.txt, refine_db.tx +-- statusdb: attr_fix.txt, size_fix.txt, refine_db.txt +-- achievementdb: achievement_db.conf Restriction: - Used from 'atcommand' or 'useatcmd'. For @reload & @reloadscript diff --git a/doc/packet_interserv.txt b/doc/packet_interserv.txt index 5b1f0ca1b7..4718eb61e1 100644 --- a/doc/packet_interserv.txt +++ b/doc/packet_interserv.txt @@ -1189,6 +1189,27 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket. desc: - Requests to the inter server to save a character's quest log entries. +0x3062 + Type: ZI + Structure: <cmd>.W <cid>.L + index: 0,2 + len: 6 + parameter: + - cmd : packet identification (0x3062) + - cid + desc: + - Requests a character's achievement log entries to the inter server. + +0x3063 + Type: ZI + Structure: <cmd>.W <len>.W <cid>.L <achievement_log>.?B + index: 0,2,4,8 + len: variable: 8+count + parameter: + - cmd : packet identification (0x3063) + desc: + - Requests to the inter server to save a character's achievement log entries. + 0x3070 Type: ZI Structure: <cmd>.W <size>.W <merc>.?B diff --git a/doc/script_commands.txt b/doc/script_commands.txt index a18847a59f..75a216fd1c 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -1037,6 +1037,7 @@ From here on, we will have the commands sorted as follow: 12.- Mercenary commands. 13.- Party commands. 14.- Channel commands. +15.- Achievement commands. ===================== |1.- Basic commands.| @@ -9733,3 +9734,68 @@ local map channel. Returns 0 on success. --------------------------------------- + +============================ +|15.- Achievement commands.| +============================ +--------------------------------------- + +*achievementadd(<achievement id>{,<char id>}) + +This function will add an achievement to the player's log for the attached +player or the supplied <char id>. The objective requirements are not ignored +when using this function. +Returns true on success and false on failure. + +--------------------------------------- + +*achievementremove(<achievement id>{,<char id>}) + +This function will remove an achievement from the player's log for the attached +player or the supplied <char id>. +Returns true on success and false on failure. + +--------------------------------------- + +*achievementinfo(<achievement id>,<type>{,<char id>}) + +This function will return the specified <type> value for an achievement of the +attached player or the supplied <char id>. If the player doesn't have the +achievement active (no progress has been made), if the achievement doesn't +exist -1 will be returned, or -2 will be returned on any other error such as +an invalid <type>. + +Valid types: +- ACHIEVEINFO_COUNT1 +- ACHIEVEINFO_COUNT2 +- ACHIEVEINFO_COUNT3 +- ACHIEVEINFO_COUNT4 +- ACHIEVEINFO_COUNT5 +- ACHIEVEINFO_COUNT6 +- ACHIEVEINFO_COUNT7 +- ACHIEVEINFO_COUNT8 +- ACHIEVEINFO_COUNT9 +- ACHIEVEINFO_COUNT10 +- ACHIEVEINFO_COMPLETE +- ACHIEVEINFO_COMPLETEDATE +- ACHIEVEINFO_GOTREWARD +- ACHIEVEINFO_LEVEL (<achievement id> is useless for this) +- ACHIEVEINFO_SCORE (<achievement id> is useless for this) + +--------------------------------------- + +*achievementcomplete(<achievement id>{,<char id>}) + +This function will complete an achievement for the attached player or the supplied +<char id>. The objective requirements are ignored when using this function. +Returns true on success and false on failure. + +--------------------------------------- + +*achievementexists(<achievement id>{,<char id>}); + +This function will return if the achievement exists on the player or the supplied +<char id>. +Returns true on success and false on failure. + +--------------------------------------- \ No newline at end of file diff --git a/npc/re/other/achievements.txt b/npc/re/other/achievements.txt new file mode 100644 index 0000000000..fadad9a392 --- /dev/null +++ b/npc/re/other/achievements.txt @@ -0,0 +1,278 @@ +//===== rAthena Script ======================================= +//= Adventure Achievements +//===== Description: ========================================= +//= Spawns Adventure group type treasure chests. +//===== Changelogs: ========================================== +//= 1.0 Initial release. [Aleos] +//============================================================ + +- script ach_treasure#core -1,{ + if (strnpcinfo(3) == "") + end; + achievementcomplete(atoi(strnpcinfo(3))); + classchange HIDDEN_WARP_NPC; + initnpctimer; + end; + +OnTouch: + if (getnpctimer(1)) // Don't trigger touch if the delay timer is active. + end; + if (achievementexists(atoi(strnpcinfo(3)))) // Don't trigger if the player has already completed. + end; + classchange 4_TREASURE_BOX,"",bc_self; + end; + +OnTimer5000: + stopnpctimer; + end; +} + +//----------------- +// --- Dungeons --- +//----------------- + +// Abbey Underground +abbey03,26,72,0 duplicate(ach_treasure#core) #abb_ach1::120110 HIDDEN_WARP_NPC,5,5 + +// Abyss Lake +abyss_03,86,55,0 duplicate(ach_treasure#core) #aby_ach1::120111 HIDDEN_WARP_NPC,5,5 + +// Amatsu Dungeon +ama_dun03,60,163,0 duplicate(ach_treasure#core) #ama_ach1::120113 HIDDEN_WARP_NPC,5,5 + +// Ant Hell +anthell02,253,41,0 duplicate(ach_treasure#core) #ant_ach1::120114 HIDDEN_WARP_NPC,5,5 + +// Ayothaya Dungeon +ayo_dun02,150,256,0 duplicate(ach_treasure#core) #ayo_ach1::120115 HIDDEN_WARP_NPC,5,5 + +// Bifrost +ecl_tdun04,37,37,0 duplicate(ach_treasure#core) #ecl_ach1::120121 HIDDEN_WARP_NPC,5,5 + +// Brasilis Dungeon +bra_dun02,171,121,0 duplicate(ach_treasure#core) #bra_ach1::120117 HIDDEN_WARP_NPC,5,5 + +// Byalan Dungeon +iz_dun05,64,223,0 duplicate(ach_treasure#core) #iz_ach2::120141 HIDDEN_WARP_NPC,5,5 + +// Clock Tower +c_tower4,37,158,0 duplicate(ach_treasure#core) #ct_ach1::120112 HIDDEN_WARP_NPC,5,5 +alde_dun04,90,107,0 duplicate(ach_treasure#core) #ct_ach2::120118 HIDDEN_WARP_NPC,5,5 + +// Coal Mine +mjo_dun03,76,220,0 duplicate(ach_treasure#core) #mjo_ach1::120136 HIDDEN_WARP_NPC,5,5 + +// Comodo Dungeon +beach_dun3,102,71,0 duplicate(ach_treasure#core) #bea_ach1::120116 HIDDEN_WARP_NPC,5,5 + +// Einbech +ein_dun02,31,255,0 duplicate(ach_treasure#core) #eind_ach1::120122 HIDDEN_WARP_NPC,5,5 + +// Geffen Dungeon +gef_dun02,222,163,0 duplicate(ach_treasure#core) #gefd_ach1::120123 HIDDEN_WARP_NPC,5,5 + +// Glastheim +gl_cas02,53,151,0 duplicate(ach_treasure#core) #gl_ach1::120124 HIDDEN_WARP_NPC,5,5 +gl_sew04,288,6,0 duplicate(ach_treasure#core) #gl_ach2::120125 HIDDEN_WARP_NPC,5,5 +gl_knt02,126,235,0 duplicate(ach_treasure#core) #gl_ach3::120126 HIDDEN_WARP_NPC,5,5 +gl_prison1,125,159,0 duplicate(ach_treasure#core) #gl_ach4:120127 HIDDEN_WARP_NPC,5,5 + +// Gonryun Dungeon +gon_dun03,167,232,0 duplicate(ach_treasure#core) #gon_ach1::120128 HIDDEN_WARP_NPC,5,5 + +// Istana +dew_dun02,87,272,0 duplicate(ach_treasure#core) #dew_ach1::120119 HIDDEN_WARP_NPC,5,5 + +// Labyrinth +prt_maze03,11,14,0 duplicate(ach_treasure#core) #maze_ach1::120140 HIDDEN_WARP_NPC,5,5 + +// Louyang Dungeon +lou_dun03,29,228,0 duplicate(ach_treasure#core) #lou_ach1::120134 HIDDEN_WARP_NPC,5,5 + +// Nogg Road +mag_dun02,192,72,0 duplicate(ach_treasure#core) #mag_ach1::120135 HIDDEN_WARP_NPC,5,5 + +// Orc Dungeon +orcsdun02,32,72,0 duplicate(ach_treasure#core) #orc_ach1::120138 HIDDEN_WARP_NPC,5,5 + +// Payon Dungeon +pay_dun04,120,124,0 duplicate(ach_treasure#core) #payd_ach1::120139 HIDDEN_WARP_NPC,5,5 + +// Prontera Culvert +prt_sewb4,19,183,0 duplicate(ach_treasure#core) #iz_ach1::120131 HIDDEN_WARP_NPC,5,5 + +// Pyramid +moc_pryd06,102,121,0 duplicate(ach_treasure#core) #pyr_ach1::120137 HIDDEN_WARP_NPC,5,5 + +// Rachel Dungeon +ice_dun03,44,261,0 duplicate(ach_treasure#core) #rad_ach1::120129 HIDDEN_WARP_NPC,5,5 + +// Robot Factory +kh_dun02,70,106,0 duplicate(ach_treasure#core) #jup_ach1::120132 HIDDEN_WARP_NPC,5,5 + +// Scaraba Hall +dic_dun03,216,211,0 duplicate(ach_treasure#core) #dic_ach1::120120 HIDDEN_WARP_NPC,5,5 + +// Somatology Lab +lhz_dun03,240,221,0 duplicate(ach_treasure#core) #lhzd_ach1::120133 HIDDEN_WARP_NPC,5,5 + +// Sphinx +in_sphinx5,154,107,0 duplicate(ach_treasure#core) #sph_ach1::120130 HIDDEN_WARP_NPC,5,5 + +// Sunken Ship +treasure02,18,142,0 duplicate(ach_treasure#core) #iz_ach3::120144 HIDDEN_WARP_NPC,5,5 + +// Thanatos Tower +tha_t06,150,176,0 duplicate(ach_treasure#core) #tha_ach1::120142 HIDDEN_WARP_NPC,5,5 + +// Thors Volcano +thor_v03,220,221,0 duplicate(ach_treasure#core) #thor_ach1::120143 HIDDEN_WARP_NPC,5,5 + +// Toy Factory +xmas_dun02,120,224,0 duplicate(ach_treasure#core) #xmas_ach1::120146 HIDDEN_WARP_NPC,5,5 + +// Turtle Island Dungeon +tur_dun04,134,130,0 duplicate(ach_treasure#core) #tur_ach1::120145 HIDDEN_WARP_NPC,5,5 + +//--------------- +// --- Fields --- +//--------------- + +// Comodo +cmd_fild01,112,200,0 duplicate(ach_treasure#core) #cmd_ach1::120044 HIDDEN_WARP_NPC,5,5 +cmd_fild02,86,94,0 duplicate(ach_treasure#core) #cmd_ach2::120045 HIDDEN_WARP_NPC,5,5 +cmd_fild03,144,190,0 duplicate(ach_treasure#core) #cmd_ach3::120046 HIDDEN_WARP_NPC,5,5 +cmd_fild04,151,191,0 duplicate(ach_treasure#core) #cmd_ach4::120047 HIDDEN_WARP_NPC,5,5 +cmd_fild06,221,108,0 duplicate(ach_treasure#core) #cmd_ach5::120048 HIDDEN_WARP_NPC,5,5 +cmd_fild07,269,322,0 duplicate(ach_treasure#core) #cmd_ach6::120049 HIDDEN_WARP_NPC,5,5 +cmd_fild08,181,136,0 duplicate(ach_treasure#core) #cmd_ach7::120050 HIDDEN_WARP_NPC,5,5 +cmd_fild09,211,266,0 duplicate(ach_treasure#core) #cmd_ach8::120051 HIDDEN_WARP_NPC,5,5 + +// Einbroch +ein_fild01,266,277,0 duplicate(ach_treasure#core) #ein_ach1::120067 HIDDEN_WARP_NPC,5,5 +ein_fild03,99,332,0 duplicate(ach_treasure#core) #ein_ach2::120068 HIDDEN_WARP_NPC,5,5 +ein_fild04,334,305,0 duplicate(ach_treasure#core) #ein_ach3::120069 HIDDEN_WARP_NPC,5,5 +ein_fild05,337,233,0 duplicate(ach_treasure#core) #ein_ach4::120070 HIDDEN_WARP_NPC,5,5 +ein_fild06,174,245,0 duplicate(ach_treasure#core) #ein_ach5::120071 HIDDEN_WARP_NPC,5,5 +ein_fild07,188,50,0 duplicate(ach_treasure#core) #ein_ach6::120072 HIDDEN_WARP_NPC,5,5 +ein_fild08,258,78,0 duplicate(ach_treasure#core) #ein_ach7::120073 HIDDEN_WARP_NPC,5,5 +ein_fild09,330,76,0 duplicate(ach_treasure#core) #ein_ach8::120074 HIDDEN_WARP_NPC,5,5 + +// Geffen +gef_fild00,74,119,0 duplicate(ach_treasure#core) #gef_ach1::120011 HIDDEN_WARP_NPC,5,5 +gef_fild01,223,223,0 duplicate(ach_treasure#core) #gef_ach2::120012 HIDDEN_WARP_NPC,5,5 +gef_fild05,202,292,0 duplicate(ach_treasure#core) #gef_ach3::120013 HIDDEN_WARP_NPC,5,5 +gef_fild06,279,104,0 duplicate(ach_treasure#core) #gef_ach4::120014 HIDDEN_WARP_NPC,5,5 +gef_fild07,181,250,0 duplicate(ach_treasure#core) #gef_ach5::120015 HIDDEN_WARP_NPC,5,5 +gef_fild09,170,73,0 duplicate(ach_treasure#core) #gef_ach6::120016 HIDDEN_WARP_NPC,5,5 +gef_fild11,238,249,0 duplicate(ach_treasure#core) #gef_ach7::120017 HIDDEN_WARP_NPC,5,5 + +// Hugel +hu_fild01,347,312,0 duplicate(ach_treasure#core) #hu_ach1::120062 HIDDEN_WARP_NPC,5,5 +hu_fild02,80,152,0 duplicate(ach_treasure#core) #hu_ach2::120063 HIDDEN_WARP_NPC,5,5 +hu_fild04,322,313,0 duplicate(ach_treasure#core) #hu_ach3::120064 HIDDEN_WARP_NPC,5,5 +hu_fild06,204,228,0 duplicate(ach_treasure#core) #hu_ach4::120065 HIDDEN_WARP_NPC,5,5 +hu_fild05,197,210,0 duplicate(ach_treasure#core) #hu_ach5::120066 HIDDEN_WARP_NPC,5,5 + +// Laphine +ecl_fild01,155,322,0 duplicate(ach_treasure#core) #ecl_ach1::120090 HIDDEN_WARP_NPC,5,5 +bif_fild01,147,64,0 duplicate(ach_treasure#core) #ecl_ach2::120091 HIDDEN_WARP_NPC,5,5 +bif_fild02,155,322,0 duplicate(ach_treasure#core) #ecl_ach3::120092 HIDDEN_WARP_NPC,5,5 +spl_fild01,335,315,0 duplicate(ach_treasure#core) #ecl_ach4::120093 HIDDEN_WARP_NPC,5,5 +spl_fild02,153,358,0 duplicate(ach_treasure#core) #ecl_ach5::120094 HIDDEN_WARP_NPC,5,5 +spl_fild03,61,286,0 duplicate(ach_treasure#core) #ecl_ach6::120095 HIDDEN_WARP_NPC,5,5 + +// Lighthalzen +lhz_fild01,118,73,0 duplicate(ach_treasure#core) #lhz_ach1::120075 HIDDEN_WARP_NPC,5,5 +lhz_fild02,239,243,0 duplicate(ach_treasure#core) #lhz_ach2::120076 HIDDEN_WARP_NPC,5,5 +lhz_fild03,313,132,0 duplicate(ach_treasure#core) #lhz_ach3::120077 HIDDEN_WARP_NPC,5,5 + +// Manuk +man_fild01,41,172,0 duplicate(ach_treasure#core) #man_ach1::120096 HIDDEN_WARP_NPC,5,5 +man_fild02,268,355,0 duplicate(ach_treasure#core) #man_ach2::120097 HIDDEN_WARP_NPC,5,5 +man_fild03,198,91,0 duplicate(ach_treasure#core) #man_ach3::120098 HIDDEN_WARP_NPC,5,5 +dic_fild01,227,82,0 duplicate(ach_treasure#core) #man_ach4::120099 HIDDEN_WARP_NPC,5,5 +dic_fild02,147,196,0 duplicate(ach_treasure#core) #man_ach5::120100 HIDDEN_WARP_NPC,5,5 + +// Misc +ama_fild01,187,337,0 duplicate(ach_treasure#core) #misc_ach1::120101 HIDDEN_WARP_NPC,5,5 +gon_fild01,171,332,0 duplicate(ach_treasure#core) #misc_ach2::120102 HIDDEN_WARP_NPC,5,5 +lou_fild01,104,232,0 duplicate(ach_treasure#core) #misc_ach3::120103 HIDDEN_WARP_NPC,5,5 +ayo_fild01,289,70,0 duplicate(ach_treasure#core) #misc_ach4::120104 HIDDEN_WARP_NPC,5,5 +mosk_fild02,176,77,0 duplicate(ach_treasure#core) #misc_ach5::120105 HIDDEN_WARP_NPC,5,5 +bra_fild01,99,193,0 duplicate(ach_treasure#core) #misc_ach6::120106 HIDDEN_WARP_NPC,5,5 +dew_fild01,175,287,0 duplicate(ach_treasure#core) #misc_ach7::120107 HIDDEN_WARP_NPC,5,5 +ma_fild01,308,206,0 duplicate(ach_treasure#core) #misc_ach8::120108 HIDDEN_WARP_NPC,5,5 +ma_fild02,176,77,0 duplicate(ach_treasure#core) #misc_ach9::120109 HIDDEN_WARP_NPC,5,5 + +// Mjolnir +mjolnir_01,47,60,0 duplicate(ach_treasure#core) #nmjo_ach1::120032 HIDDEN_WARP_NPC,5,5 +mjolnir_02,77,49,0 duplicate(ach_treasure#core) #nmjo_ach2::120033 HIDDEN_WARP_NPC,5,5 +mjolnir_03,190,200,0 duplicate(ach_treasure#core) #nmjo_ach3::120034 HIDDEN_WARP_NPC,5,5 +mjolnir_04,201,146,0 duplicate(ach_treasure#core) #nmjo_ach4::120035 HIDDEN_WARP_NPC,5,5 +mjolnir_05,43,327,0 duplicate(ach_treasure#core) #nmjo_ach5::120036 HIDDEN_WARP_NPC,5,5 +mjolnir_06,162,290,0 duplicate(ach_treasure#core) #smjo_ach1::120037 HIDDEN_WARP_NPC,5,5 +mjolnir_07,321,127,0 duplicate(ach_treasure#core) #smjo_ach2::120038 HIDDEN_WARP_NPC,5,5 +mjolnir_08,175,225,0 duplicate(ach_treasure#core) #smjo_ach3::120039 HIDDEN_WARP_NPC,5,5 +mjolnir_09,299,123,0 duplicate(ach_treasure#core) #smjo_ach4::120040 HIDDEN_WARP_NPC,5,5 +mjolnir_10,353,371,0 duplicate(ach_treasure#core) #smjo_ach5::120041 HIDDEN_WARP_NPC,5,5 +mjolnir_11,329,182,0 duplicate(ach_treasure#core) #smjo_ach6::120042 HIDDEN_WARP_NPC,5,5 +mjolnir_12,110,298,0 duplicate(ach_treasure#core) #smjo_ach7::120043 HIDDEN_WARP_NPC,5,5 + +// Morocc +moc_fild11,188,218,0 duplicate(ach_treasure#core) #moc_ach1::120018 HIDDEN_WARP_NPC,5,5 +moc_fild12,234,96,0 duplicate(ach_treasure#core) #moc_ach2::120019 HIDDEN_WARP_NPC,5,5 +moc_fild13,290,207,0 duplicate(ach_treasure#core) #moc_ach3::120020 HIDDEN_WARP_NPC,5,5 +moc_fild16,196,108,0 duplicate(ach_treasure#core) #moc_ach4::120021 HIDDEN_WARP_NPC,5,5 +moc_fild17,269,105,0 duplicate(ach_treasure#core) #moc_ach5::120022 HIDDEN_WARP_NPC,5,5 +moc_fild18,54,284,0 duplicate(ach_treasure#core) #moc_ach6::120023 HIDDEN_WARP_NPC,5,5 + +// Payon +pay_fild01,167,243,0 duplicate(ach_treasure#core) #pay_ach1::120024 HIDDEN_WARP_NPC,5,5 +pay_fild02,105,240,0 duplicate(ach_treasure#core) #pay_ach2::120025 HIDDEN_WARP_NPC,5,5 +pay_fild03,144,97,0 duplicate(ach_treasure#core) #pay_ach3::120026 HIDDEN_WARP_NPC,5,5 +pay_fild04,257,95,0 duplicate(ach_treasure#core) #pay_ach4::120027 HIDDEN_WARP_NPC,5,5 +pay_fild07,365,37,0 duplicate(ach_treasure#core) #pay_ach5::120028 HIDDEN_WARP_NPC,5,5 +pay_fild08,237,345,0 duplicate(ach_treasure#core) #pay_ach6::120029 HIDDEN_WARP_NPC,5,5 +pay_fild09,251,42,0 duplicate(ach_treasure#core) #pay_ach7::120030 HIDDEN_WARP_NPC,5,5 +pay_fild10,196,38,0 duplicate(ach_treasure#core) #pay_ach8::120031 HIDDEN_WARP_NPC,5,5 + +// Prontera +prt_fild01,147,126,0 duplicate(ach_treasure#core) #prt_ach1::120001 HIDDEN_WARP_NPC,5,5 +prt_fild02,140,219,0 duplicate(ach_treasure#core) #prt_ach2::120002 HIDDEN_WARP_NPC,5,5 +prt_fild03,172,139,0 duplicate(ach_treasure#core) #prt_ach3::120003 HIDDEN_WARP_NPC,5,5 +prt_fild04,119,291,0 duplicate(ach_treasure#core) #prt_ach4::120004 HIDDEN_WARP_NPC,5,5 +prt_fild05,190,291,0 duplicate(ach_treasure#core) #prt_ach5::120005 HIDDEN_WARP_NPC,5,5 +prt_fild06,296,303,0 duplicate(ach_treasure#core) #prt_ach6::120006 HIDDEN_WARP_NPC,5,5 +prt_fild07,45,104,0 duplicate(ach_treasure#core) #prt_ach7::120007 HIDDEN_WARP_NPC,5,5 +prt_fild08,203,223,0 duplicate(ach_treasure#core) #prt_ach8::120008 HIDDEN_WARP_NPC,5,5 +prt_fild09,37,354,0 duplicate(ach_treasure#core) #prt_ach9::120009 HIDDEN_WARP_NPC,5,5 +prt_fild10,177,206,0 duplicate(ach_treasure#core) #prt_ach10::12010 HIDDEN_WARP_NPC,5,5 + +// Rachel +ra_fild01,138,166,0 duplicate(ach_treasure#core) #ra_ach1::120078 HIDDEN_WARP_NPC,5,5 +ra_fild03,224,275,0 duplicate(ach_treasure#core) #ra_ach2::120079 HIDDEN_WARP_NPC,5,5 +ra_fild08,326,45,0 duplicate(ach_treasure#core) #ra_ach3::120080 HIDDEN_WARP_NPC,5,5 +ra_fild12,352,165,0 duplicate(ach_treasure#core) #ra_ach4::120081 HIDDEN_WARP_NPC,5,5 +ra_fild04,92,302,0 duplicate(ach_treasure#core) #ra_ach5::120082 HIDDEN_WARP_NPC,5,5 +ra_fild05,59,59,0 duplicate(ach_treasure#core) #ra_ach6::120083 HIDDEN_WARP_NPC,5,5 +ra_fild06,362,230,0 duplicate(ach_treasure#core) #ra_ach7::120084 HIDDEN_WARP_NPC,5,5 + +// Veins +ve_fild01,180,234,0 duplicate(ach_treasure#core) #ve_ach1::120085 HIDDEN_WARP_NPC,5,5 +ve_fild02,65,194,0 duplicate(ach_treasure#core) #ve_ach2::120086 HIDDEN_WARP_NPC,5,5 +ve_fild03,197,242,0 duplicate(ach_treasure#core) #ve_ach3::120087 HIDDEN_WARP_NPC,5,5 +ve_fild04,288,279,0 duplicate(ach_treasure#core) #ve_ach4::120088 HIDDEN_WARP_NPC,5,5 +ve_fild07,33,113,0 duplicate(ach_treasure#core) #ve_ach5::120089 HIDDEN_WARP_NPC,5,5 + +// Yuno +yuno_fild01,284,138,0 duplicate(ach_treasure#core) #yuno_ach1::120052 HIDDEN_WARP_NPC,5,5 +yuno_fild12,76,268,0 duplicate(ach_treasure#core) #yuno_ach2::120053 HIDDEN_WARP_NPC,5,5 +yuno_fild02,142,191,0 duplicate(ach_treasure#core) #yuno_ach3::120054 HIDDEN_WARP_NPC,5,5 +yuno_fild03,135,329,0 duplicate(ach_treasure#core) #yuno_ach4::120055 HIDDEN_WARP_NPC,5,5 +yuno_fild04,35,369,0 duplicate(ach_treasure#core) #yuno_ach5::120056 HIDDEN_WARP_NPC,5,5 +yuno_fild06,262,220,0 duplicate(ach_treasure#core) #yuno_ach6::120057 HIDDEN_WARP_NPC,5,5 +yuno_fild07,113,339,0 duplicate(ach_treasure#core) #yuno_ach7::120058 HIDDEN_WARP_NPC,5,5 +yuno_fild08,179,209,0 duplicate(ach_treasure#core) #yuno_ach8::120059 HIDDEN_WARP_NPC,5,5 +yuno_fild09,166,228,0 duplicate(ach_treasure#core) #yuno_ach9::120060 HIDDEN_WARP_NPC,5,5 +yuno_fild11,141,357,0 duplicate(ach_treasure#core) #yuno_ach10::120061 HIDDEN_WARP_NPC,5,5 diff --git a/npc/re/scripts_athena.conf b/npc/re/scripts_athena.conf index 1d355b6749..0e77f70c7e 100644 --- a/npc/re/scripts_athena.conf +++ b/npc/re/scripts_athena.conf @@ -99,6 +99,7 @@ npc: npc/re/merchants/shops.txt npc: npc/re/merchants/te_merchant.txt // --------------------------- Others --------------------------- +npc: npc/re/other/achievements.txt npc: npc/re/other/adven_boards.txt npc: npc/re/other/bulletin_boards.txt npc: npc/re/other/Global_Functions.txt diff --git a/sql-files/main.sql b/sql-files/main.sql index cc58bc690f..57be49e635 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -24,6 +24,29 @@ CREATE TABLE IF NOT EXISTS `acc_reg_str` ( KEY `account_id` (`account_id`) ) ENGINE=MyISAM; +-- +-- Table structure for table `achievement` +-- + +CREATE TABLE IF NOT EXISTS `achievement` ( + `char_id` int(11) unsigned NOT NULL default '0', + `id` bigint(11) unsigned NOT NULL, + `count1` mediumint(8) unsigned NOT NULL default '0', + `count2` mediumint(8) unsigned NOT NULL default '0', + `count3` mediumint(8) unsigned NOT NULL default '0', + `count4` mediumint(8) unsigned NOT NULL default '0', + `count5` mediumint(8) unsigned NOT NULL default '0', + `count6` mediumint(8) unsigned NOT NULL default '0', + `count7` mediumint(8) unsigned NOT NULL default '0', + `count8` mediumint(8) unsigned NOT NULL default '0', + `count9` mediumint(8) unsigned NOT NULL default '0', + `count10` mediumint(8) unsigned NOT NULL default '0', + `completed` datetime, + `rewarded` datetime, + PRIMARY KEY (`char_id`,`id`), + KEY `char_id` (`char_id`) +) ENGINE=MyISAM; + -- -- Table structure for table `auction` -- @@ -231,6 +254,7 @@ CREATE TABLE IF NOT EXISTS `char` ( `hotkey_rowshift` tinyint(3) unsigned NOT NULL default '0', `clan_id` int(11) unsigned NOT NULL default '0', `last_login` datetime DEFAULT NULL, + `title_id` INT(11) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`), UNIQUE KEY `name_key` (`name`), KEY `account_id` (`account_id`), diff --git a/sql-files/upgrades/upgrade_20170407.sql b/sql-files/upgrades/upgrade_20170407.sql new file mode 100644 index 0000000000..f0dd3b6fc5 --- /dev/null +++ b/sql-files/upgrades/upgrade_20170407.sql @@ -0,0 +1,25 @@ +ALTER TABLE `char` + ADD COLUMN `title_id` int(11) unsigned NOT NULL default '0' AFTER `clan_id`; + +-- +-- Table structure for table `achievement` +-- + +CREATE TABLE IF NOT EXISTS `achievement` ( + `char_id` int(11) unsigned NOT NULL default '0', + `id` bigint(11) unsigned NOT NULL, + `count1` mediumint(8) unsigned NOT NULL default '0', + `count2` mediumint(8) unsigned NOT NULL default '0', + `count3` mediumint(8) unsigned NOT NULL default '0', + `count4` mediumint(8) unsigned NOT NULL default '0', + `count5` mediumint(8) unsigned NOT NULL default '0', + `count6` mediumint(8) unsigned NOT NULL default '0', + `count7` mediumint(8) unsigned NOT NULL default '0', + `count8` mediumint(8) unsigned NOT NULL default '0', + `count9` mediumint(8) unsigned NOT NULL default '0', + `count10` mediumint(8) unsigned NOT NULL default '0', + `completed` datetime, + `rewarded` datetime, + PRIMARY KEY (`char_id`,`id`), + KEY `char_id` (`char_id`) +) ENGINE=MyISAM; diff --git a/src/char/char-server.vcxproj b/src/char/char-server.vcxproj index 6c2bf4cd56..f515e8ad25 100644 --- a/src/char/char-server.vcxproj +++ b/src/char/char-server.vcxproj @@ -161,6 +161,7 @@ <ClInclude Include="char_logif.h" /> <ClInclude Include="char_mapif.h" /> <ClInclude Include="inter.h" /> + <ClInclude Include="int_achievement.h" /> <ClInclude Include="int_auction.h" /> <ClInclude Include="int_clan.h" /> <ClInclude Include="int_elemental.h" /> @@ -182,6 +183,7 @@ <ClCompile Include="char_logif.c" /> <ClCompile Include="char_mapif.c" /> <ClCompile Include="inter.c" /> + <ClCompile Include="int_achievement.c" /> <ClCompile Include="int_auction.c" /> <ClCompile Include="int_clan.c" /> <ClCompile Include="int_elemental.c" /> diff --git a/src/char/char-server.vcxproj.filters b/src/char/char-server.vcxproj.filters index 93cd821683..cc6aa2d202 100644 --- a/src/char/char-server.vcxproj.filters +++ b/src/char/char-server.vcxproj.filters @@ -26,6 +26,9 @@ <ClInclude Include="char_mapif.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="int_achievement.h"> + <Filter>Header Files</Filter> + </ClInclude> <ClInclude Include="int_auction.h"> <Filter>Header Files</Filter> </ClInclude> @@ -79,6 +82,9 @@ <ClCompile Include="char_mapif.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="int_achievement.c"> + <Filter>Source Files</Filter> + </ClCompile> <ClCompile Include="int_auction.c"> <Filter>Source Files</Filter> </ClCompile> diff --git a/src/char/char.cpp b/src/char/char.cpp index 87296138da..2ff09d9fc5 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -300,7 +300,7 @@ int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p){ (p->head_mid != cp->head_mid) || (p->head_bottom != cp->head_bottom) || (p->delete_date != cp->delete_date) || (p->rename != cp->rename) || (p->robe != cp->robe) || (p->character_moves != cp->character_moves) || (p->unban_time != cp->unban_time) || (p->font != cp->font) || (p->uniqueitem_counter != cp->uniqueitem_counter) || - (p->hotkey_rowshift != cp->hotkey_rowshift) || (p->clan_id != cp->clan_id ) + (p->hotkey_rowshift != cp->hotkey_rowshift) || (p->clan_id != cp->clan_id ) || (p->title_id != cp->title_id) ) { //Save status if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `base_level`='%d', `job_level`='%d'," @@ -311,7 +311,7 @@ int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p){ "`weapon`='%d',`shield`='%d',`head_top`='%d',`head_mid`='%d',`head_bottom`='%d'," "`last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d', `rename`='%d'," "`delete_date`='%lu',`robe`='%d',`moves`='%d',`font`='%u',`uniqueitem_counter`='%u'," - "`hotkey_rowshift`='%d', `clan_id`='%d'" + "`hotkey_rowshift`='%d', `clan_id`='%d', `title_id`='%lu'" " WHERE `account_id`='%d' AND `char_id` = '%d'", schema_config.char_db, p->base_level, p->job_level, p->base_exp, p->job_exp, p->zeny, @@ -323,7 +323,7 @@ int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p){ mapindex_id2name(p->save_point.map), p->save_point.x, p->save_point.y, p->rename, (unsigned long)p->delete_date, // FIXME: platform-dependent size p->robe, p->character_moves, p->font, p->uniqueitem_counter, - p->hotkey_rowshift, p->clan_id, + p->hotkey_rowshift, p->clan_id, p->title_id, p->account_id, p->char_id) ) { Sql_ShowDebug(sql_handle); @@ -917,7 +917,7 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) { "`str`,`agi`,`vit`,`int`,`dex`,`luk`,`max_hp`,`hp`,`max_sp`,`sp`," "`status_point`,`skill_point`,`option`,`karma`,`manner`,`hair`,`hair_color`," "`clothes_color`,`body`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,`last_map`,`rename`,`delete_date`," - "`robe`,`moves`,`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`" + "`robe`,`moves`,`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`title_id`" " FROM `%s` WHERE `account_id`='%d' AND `char_num` < '%d'", schema_config.char_db, sd->account_id, MAX_CHARS) || SQL_ERROR == SqlStmt_Execute(stmt) || SQL_ERROR == SqlStmt_BindColumn(stmt, 0, SQLDT_INT, &p.char_id, 0, NULL, NULL) @@ -963,6 +963,7 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) { || SQL_ERROR == SqlStmt_BindColumn(stmt, 40, SQLDT_UINT, &p.uniqueitem_counter, 0, NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 41, SQLDT_ENUM, &sex, sizeof(sex), NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 42, SQLDT_UCHAR, &p.hotkey_rowshift, 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 43, SQLDT_ULONG, &p.title_id, 0, NULL, NULL) ) { SqlStmt_ShowDebug(stmt); @@ -1026,7 +1027,7 @@ int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_ev "`status_point`,`skill_point`,`option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`,`homun_id`,`elemental_id`,`hair`," "`hair_color`,`clothes_color`,`body`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,`last_map`,`last_x`,`last_y`," "`save_map`,`save_x`,`save_y`,`partner_id`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`,`robe`, `moves`," - "`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`clan_id`" + "`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`clan_id`,`title_id`" " FROM `%s` WHERE `char_id`=? LIMIT 1", schema_config.char_db) || SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0) || SQL_ERROR == SqlStmt_Execute(stmt) @@ -1090,6 +1091,7 @@ int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_ev || SQL_ERROR == SqlStmt_BindColumn(stmt, 57, SQLDT_ENUM, &sex, sizeof(sex), NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 58, SQLDT_UCHAR, &p->hotkey_rowshift, 0, NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 59, SQLDT_INT, &p->clan_id, 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 60, SQLDT_ULONG, &p->title_id, 0, NULL, NULL) ) { SqlStmt_ShowDebug(stmt); @@ -1671,6 +1673,10 @@ int char_delete_char_sql(uint32 char_id){ if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id` = '%d'", schema_config.bonus_script_db, char_id) ) Sql_ShowDebug(sql_handle); + /* Achievement Data */ + if (SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id` = '%d'", schema_config.achievement_table, char_id)) + Sql_ShowDebug(sql_handle); + if (charserv_config.log_char) { if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s`(`time`, `account_id`,`char_num`,`char_msg`,`name`) VALUES (NOW(), '%d', '%d', 'Deleted char (CID %d)', '%s')", schema_config.charlog_db, account_id, 0, char_id, esc_name) ) @@ -2236,7 +2242,7 @@ bool char_checkdb(void){ schema_config.auction_db, schema_config.quest_db, schema_config.homunculus_db, schema_config.skill_homunculus_db, schema_config.mercenary_db, schema_config.mercenary_owner_db, schema_config.elemental_db, schema_config.ragsrvinfo_db, schema_config.skillcooldown_db, schema_config.bonus_script_db, - schema_config.clan_table, schema_config.clan_alliance_table, schema_config.mail_attachment_db + schema_config.clan_table, schema_config.clan_alliance_table, schema_config.mail_attachment_db, schema_config.achievement_table }; ShowInfo("Start checking DB integrity\n"); for (i=0; i<ARRAYLENGTH(sqltable); i++){ //check if they all exist and we can acces them in sql-server @@ -2252,7 +2258,7 @@ bool char_checkdb(void){ "`guild_id`,`pet_id`,`homun_id`,`elemental_id`,`hair`,`hair_color`,`clothes_color`,`weapon`," "`shield`,`head_top`,`head_mid`,`head_bottom`,`robe`,`last_map`,`last_x`,`last_y`,`save_map`," "`save_x`,`save_y`,`partner_id`,`online`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`," - "`moves`,`unban_time`,`font`,`sex`,`hotkey_rowshift`,`clan_id`,`last_login`" + "`moves`,`unban_time`,`font`,`sex`,`hotkey_rowshift`,`clan_id`,`last_login`,`title_id`" " FROM `%s` LIMIT 1;", schema_config.char_db) ){ Sql_ShowDebug(sql_handle); return false; @@ -2478,6 +2484,12 @@ bool char_checkdb(void){ Sql_ShowDebug(sql_handle); return false; } + //checking achievement_table + if (SQL_ERROR == Sql_Query(sql_handle, "SELECT `char_id`,`id`,`count1`,`count2`,`count3`,`count4`,`count5`,`count6`,`count7`,`count8`,`count9`,`count10`,`completed`,`rewarded`" + " FROM `%s` LIMIT 1;", schema_config.achievement_table)) { + Sql_ShowDebug(sql_handle); + return false; + } Sql_FreeResult(sql_handle); ShowInfo("DB integrity check finished with success\n"); return true; @@ -2573,6 +2585,8 @@ void char_sql_config_read(const char* cfgName) { safestrncpy(schema_config.clan_table, w2, sizeof(schema_config.clan_table)); else if(!strcmpi(w1,"clan_alliance_table")) safestrncpy(schema_config.clan_alliance_table, w2, sizeof(schema_config.clan_alliance_table)); + else if(!strcmpi(w1,"achievement_table")) + safestrncpy(schema_config.achievement_table, w2, sizeof(schema_config.achievement_table)); //support the import command, just like any other config else if(!strcmpi(w1,"import")) char_sql_config_read(w2); @@ -2622,6 +2636,7 @@ void char_set_default_sql(){ safestrncpy(schema_config.acc_reg_num_table,"acc_reg_num",sizeof(schema_config.acc_reg_num_table)); safestrncpy(schema_config.clan_table,"clan",sizeof(schema_config.clan_table)); safestrncpy(schema_config.clan_table,"clan_alliance",sizeof(schema_config.clan_alliance_table)); + safestrncpy(schema_config.achievement_table,"achievement",sizeof(schema_config.achievement_table)); } //set default config diff --git a/src/char/char.h b/src/char/char.h index 0684ba64de..0163898ea7 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -80,6 +80,7 @@ struct Schema_Config { char char_reg_num_table[DB_NAME_LEN]; char clan_table[DB_NAME_LEN]; char clan_alliance_table[DB_NAME_LEN]; + char achievement_table[DB_NAME_LEN]; }; extern struct Schema_Config schema_config; diff --git a/src/char/int_achievement.c b/src/char/int_achievement.c new file mode 100644 index 0000000000..1599dcc6b6 --- /dev/null +++ b/src/char/int_achievement.c @@ -0,0 +1,344 @@ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder + +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/mmo.h" +#include "../common/socket.h" +#include "../common/sql.h" +#include "../common/strlib.h" + +#include "char.h" +#include "inter.h" +#include "int_achievement.h" +#include "int_mail.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + +/** + * Load achievements for a character. + * @param char_id: Character ID + * @param count: Pointer to return the number of found entries. + * @return Array of found entries. It has *count entries, and it is care of the caller to aFree() it afterwards. + */ +struct achievement *mapif_achievements_fromsql(uint32 char_id, int *count) +{ + struct achievement *achievelog = NULL; + struct achievement tmp_achieve; + SqlStmt *stmt; + StringBuf buf; + int i; + + if (!count) + return NULL; + + memset(&tmp_achieve, 0, sizeof(tmp_achieve)); + + StringBuf_Init(&buf); + StringBuf_AppendStr(&buf, "SELECT `id`, COALESCE(UNIX_TIMESTAMP(`completed`),0), COALESCE(UNIX_TIMESTAMP(`rewarded`),0)"); + for (i = 0; i < MAX_ACHIEVEMENT_OBJECTIVES; ++i) + StringBuf_Printf(&buf, ", `count%d`", i + 1); + StringBuf_Printf(&buf, " FROM `%s` WHERE `char_id` = '%u'", schema_config.achievement_table, char_id); + + stmt = SqlStmt_Malloc(sql_handle); + if( SQL_ERROR == SqlStmt_PrepareStr(stmt, StringBuf_Value(&buf)) + || SQL_ERROR == SqlStmt_Execute(stmt) ) + { + SqlStmt_ShowDebug(stmt); + SqlStmt_Free(stmt); + StringBuf_Destroy(&buf); + *count = 0; + return NULL; + } + + SqlStmt_BindColumn(stmt, 0, SQLDT_INT, &tmp_achieve.achievement_id, 0, NULL, NULL); + SqlStmt_BindColumn(stmt, 1, SQLDT_INT, &tmp_achieve.completed, 0, NULL, NULL); + SqlStmt_BindColumn(stmt, 2, SQLDT_INT, &tmp_achieve.rewarded, 0, NULL, NULL); + for (i = 0; i < MAX_ACHIEVEMENT_OBJECTIVES; ++i) + SqlStmt_BindColumn(stmt, 3 + i, SQLDT_INT, &tmp_achieve.count[i], 0, NULL, NULL); + + *count = (int)SqlStmt_NumRows(stmt); + if (*count > 0) { + i = 0; + + achievelog = (struct achievement *)aCalloc(*count, sizeof(struct achievement)); + while (SQL_SUCCESS == SqlStmt_NextRow(stmt)) { + if (i >= *count) // Sanity check, should never happen + break; + memcpy(&achievelog[i++], &tmp_achieve, sizeof(tmp_achieve)); + } + if (i < *count) { + // Should never happen. Compact array + *count = i; + achievelog = (struct achievement *)aRealloc(achievelog, sizeof(struct achievement) * i); + } + } + + SqlStmt_Free(stmt); + StringBuf_Clear(&buf); + return achievelog; +} + +/** + * Deletes an achievement from a character's achievementlog. + * @param char_id: Character ID + * @param achievement_id: Achievement ID + * @return false in case of errors, true otherwise + */ +bool mapif_achievement_delete(uint32 char_id, int achievement_id) +{ + if (SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `id` = '%d' AND `char_id` = '%u'", schema_config.achievement_table, achievement_id, char_id)) { + Sql_ShowDebug(sql_handle); + return false; + } + + return true; +} + +/** + * Adds an achievement to a character's achievementlog. + * @param char_id: Character ID + * @param ad: Achievement data + * @return false in case of errors, true otherwise + */ +bool mapif_achievement_add(uint32 char_id, struct achievement ad) +{ + StringBuf buf; + int i; + + StringBuf_Init(&buf); + StringBuf_Printf(&buf, "INSERT INTO `%s` (`char_id`, `id`, `completed`, `rewarded`", schema_config.achievement_table); + for (i = 0; i < MAX_ACHIEVEMENT_OBJECTIVES; ++i) + StringBuf_Printf(&buf, ", `count%d`", i + 1); + StringBuf_AppendStr(&buf, ")"); + StringBuf_Printf(&buf, " VALUES ('%u', '%d',", char_id, ad.achievement_id, (uint32)ad.completed, (uint32)ad.rewarded); + if( ad.completed ){ + StringBuf_Printf(&buf, "FROM_UNIXTIME('%u'),", (uint32)ad.completed); + }else{ + StringBuf_AppendStr(&buf, "NULL,"); + } + if( ad.rewarded ){ + StringBuf_Printf(&buf, "FROM_UNIXTIME('%u')", (uint32)ad.rewarded); + }else{ + StringBuf_AppendStr(&buf, "NULL"); + } + for (i = 0; i < MAX_ACHIEVEMENT_OBJECTIVES; ++i) + StringBuf_Printf(&buf, ", '%d'", ad.count[i]); + StringBuf_AppendStr(&buf, ")"); + + if (SQL_ERROR == Sql_QueryStr(sql_handle, StringBuf_Value(&buf))) { + Sql_ShowDebug(sql_handle); + StringBuf_Clear(&buf); + return false; + } + + StringBuf_Clear(&buf); + + return true; +} + +/** + * Updates an achievement in a character's achievementlog. + * @param char_id: Character ID + * @param ad: Achievement data + * @return false in case of errors, true otherwise + */ +bool mapif_achievement_update(uint32 char_id, struct achievement ad) +{ + StringBuf buf; + int i; + + StringBuf_Init(&buf); + StringBuf_Printf(&buf, "UPDATE `%s` SET ", schema_config.achievement_table); + if( ad.completed ){ + StringBuf_Printf(&buf, "`completed` = FROM_UNIXTIME('%u'),", (uint32)ad.completed); + }else{ + StringBuf_AppendStr(&buf, "`completed` = NULL,"); + } + if( ad.rewarded ){ + StringBuf_Printf(&buf, "`rewarded` = FROM_UNIXTIME('%u')", (uint32)ad.rewarded); + }else{ + StringBuf_AppendStr(&buf, "`rewarded` = NULL"); + } + for (i = 0; i < MAX_ACHIEVEMENT_OBJECTIVES; ++i) + StringBuf_Printf(&buf, ", `count%d` = '%d'", i + 1, ad.count[i]); + StringBuf_Printf(&buf, " WHERE `id` = %d AND `char_id` = %u", ad.achievement_id, char_id); + + if (SQL_ERROR == Sql_QueryStr(sql_handle, StringBuf_Value(&buf))) { + Sql_ShowDebug(sql_handle); + StringBuf_Clear(&buf); + return false; + } + + StringBuf_Clear(&buf); + + return true; +} + +/** + * Notifies the map-server of the result of saving a character's achievementlog. + */ +void mapif_achievement_save( int fd, uint32 char_id, bool success ){ + WFIFOHEAD(fd, 7); + WFIFOW(fd, 0) = 0x3863; + WFIFOL(fd, 2) = char_id; + WFIFOB(fd, 6) = success; + WFIFOSET(fd, 7); +} + +/** + * Handles the save request from mapserver for a character's achievementlog. + * Received achievements are saved, and an ack is sent back to the map server. + * @see inter_parse_frommap + */ +int mapif_parse_achievement_save(int fd) +{ + int i, j, k, old_n, new_n = (RFIFOW(fd, 2) - 8) / sizeof(struct achievement); + uint32 char_id = RFIFOL(fd, 4); + struct achievement *old_ad = NULL, *new_ad = NULL; + bool success = true; + + if (new_n > 0) + new_ad = (struct achievement *)RFIFOP(fd, 8); + + old_ad = mapif_achievements_fromsql(char_id, &old_n); + + for (i = 0; i < new_n; i++) { + ARR_FIND(0, old_n, j, new_ad[i].achievement_id == old_ad[j].achievement_id); + if (j < old_n) { // Update existing achievements + // Only counts, complete, and reward are changable. + ARR_FIND(0, MAX_ACHIEVEMENT_OBJECTIVES, k, new_ad[i].count[k] != old_ad[j].count[k]); + if (k != MAX_ACHIEVEMENT_OBJECTIVES || new_ad[i].completed != old_ad[j].completed || new_ad[i].rewarded != old_ad[j].rewarded) { + if ((success = mapif_achievement_update(char_id, new_ad[i])) == false) + break; + } + + if (j < (--old_n)) { + // Compact array + memmove(&old_ad[j], &old_ad[j + 1], sizeof(struct achievement) * (old_n - j)); + memset(&old_ad[old_n], 0, sizeof(struct achievement)); + } + } else { // Add new achievements + if (new_ad[i].achievement_id) { + if ((success = mapif_achievement_add(char_id, new_ad[i])) == false) + break; + } + } + } + + for (i = 0; i < old_n; i++) { // Achievements not in new_ad but in old_ad are to be erased. + if ((success = mapif_achievement_delete(char_id, old_ad[i].achievement_id)) == false) + break; + } + + if (old_ad) + aFree(old_ad); + + mapif_achievement_save(fd, char_id, success); + + return 0; +} + +/** + * Sends the achievementlog of a character to the map-server. + */ +void mapif_achievement_load( int fd, uint32 char_id ){ + struct achievement *tmp_achievementlog = NULL; + int num_achievements = 0; + + tmp_achievementlog = mapif_achievements_fromsql(char_id, &num_achievements); + + WFIFOHEAD(fd, num_achievements * sizeof(struct achievement) + 8); + WFIFOW(fd, 0) = 0x3862; + WFIFOW(fd, 2) = num_achievements * sizeof(struct achievement) + 8; + WFIFOL(fd, 4) = char_id; + + if (num_achievements > 0) + memcpy(WFIFOP(fd, 8), tmp_achievementlog, sizeof(struct achievement) * num_achievements); + + WFIFOSET(fd, num_achievements * sizeof(struct achievement) + 8); + + if (tmp_achievementlog) + aFree(tmp_achievementlog); +} + +/** + * Sends achievementlog to the map server + * NOTE: Achievements sent to the player are only completed ones + * @see inter_parse_frommap + */ +int mapif_parse_achievement_load(int fd) +{ + mapif_achievement_load( fd, RFIFOL(fd, 2) ); + + return 0; +} + +/** + * Notify the map-server if claiming the reward has succeeded. + */ +void mapif_achievement_reward( int fd, uint32 char_id, int32 achievement_id, time_t rewarded ){ + WFIFOHEAD(fd, 14); + WFIFOW(fd, 0) = 0x3864; + WFIFOL(fd, 2) = char_id; + WFIFOL(fd, 6) = achievement_id; + WFIFOL(fd, 10) = (uint32)rewarded; + WFIFOSET(fd, 14); +} + +/** + * Request of the map-server that a player claimed his achievement rewards. + * @see inter_parse_frommap + */ +int mapif_parse_achievement_reward(int fd){ + time_t current = time(NULL); + uint32 char_id = RFIFOL(fd, 2); + int32 achievement_id = RFIFOL(fd, 6); + + if( Sql_Query( sql_handle, "UPDATE `%s` SET `rewarded` = FROM_UNIXTIME('%u') WHERE `char_id`='%u' AND `id` = '%d' AND `completed` IS NOT NULL AND `rewarded` IS NULL", schema_config.achievement_table, (uint32)current, char_id, achievement_id ) == SQL_ERROR || + Sql_NumRowsAffected(sql_handle) <= 0 ){ + current = 0; + }else if( RFIFOW(fd,10) > 0 ){ // Do not send a mail if no item reward + char mail_sender[NAME_LENGTH]; + char mail_receiver[NAME_LENGTH]; + char mail_title[MAIL_TITLE_LENGTH]; + char mail_text[MAIL_BODY_LENGTH]; + struct item item; + + memset(&item, 0, sizeof(struct item)); + item.nameid = RFIFOW(fd, 10); + item.amount = RFIFOL(fd, 12); + item.identify = 1; + + safesnprintf(mail_sender, NAME_LENGTH, char_msg_txt(227)); // 227: GM + safestrncpy(mail_receiver, RFIFOCP(fd,16), NAME_LENGTH); + safesnprintf(mail_title, MAIL_TITLE_LENGTH, char_msg_txt(228)); // 228: Achievement Reward Mail + safesnprintf(mail_text, MAIL_BODY_LENGTH, char_msg_txt(229), RFIFOCP(fd,16+NAME_LENGTH) ); // 229: [%s] Achievement Reward. + + if( !mail_sendmail(0, mail_sender, char_id, mail_receiver, mail_title, mail_text, 0, &item, 1) ){ + current = 0; + } + } + + mapif_achievement_reward(fd, char_id, achievement_id, current); + + return 0; +} + +/** + * Parses achievementlog related packets from the map server. + * @see inter_parse_frommap + */ +int inter_achievement_parse_frommap(int fd) +{ + switch (RFIFOW(fd, 0)) { + case 0x3062: mapif_parse_achievement_load(fd); break; + case 0x3063: mapif_parse_achievement_save(fd); break; + case 0x3064: mapif_parse_achievement_reward(fd); break; + default: + return 0; + } + return 1; +} diff --git a/src/char/int_achievement.h b/src/char/int_achievement.h new file mode 100644 index 0000000000..908c61dcbc --- /dev/null +++ b/src/char/int_achievement.h @@ -0,0 +1,9 @@ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder + +#ifndef _INT_ACHIEVEMENT_SQL_H_ +#define _INT_ACHIEVEMENT_SQL_H_ + +int inter_achievement_parse_frommap(int fd); + +#endif /* _INT_ACHIEVEMENT_SQL_H_ */ diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 0420ffed5a..9859a19124 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -578,7 +578,7 @@ static void mapif_parse_Mail_send(int fd) mapif_Mail_new(&msg); // notify recipient } -void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item, int amount) +bool mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item, int amount) { struct mail_message msg; memset(&msg, 0, sizeof(struct mail_message)); @@ -601,8 +601,12 @@ void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* msg.timestamp = time(NULL); msg.type = MAIL_INBOX_NORMAL; - mail_savemessage(&msg); + if( !mail_savemessage(&msg) ){ + return false; + } + mapif_Mail_new(&msg); + return true; } static void mapif_Mail_receiver_send( int fd, int requesting_char_id, int char_id, int class_, int base_level, const char* name ){ diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 7149e49cb8..766ab9b136 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -12,7 +12,7 @@ int mail_return_timer( int tid, unsigned int tick, int id, intptr_t data ); int mail_delete_timer( int tid, unsigned int tick, int id, intptr_t data ); int inter_mail_parse_frommap(int fd); -void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item, int amount); +bool mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item, int amount); int inter_mail_sql_init(void); void inter_mail_sql_final(void); diff --git a/src/char/inter.c b/src/char/inter.c index 8252f7ca2e..135c944107 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -22,6 +22,7 @@ #include "int_quest.h" #include "int_elemental.h" #include "int_clan.h" +#include "int_achievement.h" #include <stdlib.h> @@ -51,7 +52,7 @@ int inter_recv_packet_length[] = { -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030- -1, 9, 0, 0, 0, 0, 0, 0, 8, 6,11,10, 10,-1,6+NAME_LENGTH, 0, // 3040- -1,-1,10,10, 0,-1,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3050- Auction System [Zephyrus] - 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish] + 6,-1, 6,-1, 16+NAME_LENGTH+ACHIEVEMENT_NAME_LENGTH, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish] / Achievements [Aleos] -1,10, 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, -1,10, 6,-1, // 3070- Mercenary packets [Zephyrus], Elemental packets [pakpil] 48,14,-1, 6, 0, 0, 0, 0, 0, 0,13,-1, 0, 0, 0, 0, // 3080- Pet System, Storage -1,10,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator] @@ -1409,6 +1410,7 @@ int inter_parse_frommap(int fd) || inter_auction_parse_frommap(fd) || inter_quest_parse_frommap(fd) || inter_clan_parse_frommap(fd) + || inter_achievement_parse_frommap(fd) ) break; else diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 08791a6a6b..c3f07ceeb4 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -2,7 +2,7 @@ #COMMON_OBJ = $(ls *.c | grep -viw sql.c | sed -e "s/\.c/\.o/g") COMMON_OBJ = core.o socket.o timer.o db.o nullpo.o malloc.o showmsg.o strlib.o utils.o \ grfio.o mapindex.o ers.o md5calc.o minicore.o minisocket.o minimalloc.o random.o des.o \ - conf.o thread.o mutex.o raconf.o mempool.o msg_conf.o cli.o sql.o + conf.o thread.o mutex.o raconf.o mempool.o msg_conf.o cli.o sql.o yamlwrapper.o COMMON_DIR_OBJ = $(COMMON_OBJ:%=obj/%) COMMON_H = $(shell ls ../common/*.h) COMMON_AR = obj/common.a @@ -15,6 +15,12 @@ LIBCONFIG_H = $(shell ls ../../3rdparty/libconfig/*.h) LIBCONFIG_AR = ../../3rdparty/libconfig/obj/libconfig.a LIBCONFIG_INCLUDE = -I../../3rdparty/libconfig +YAML_CPP_OBJ = $(shell find ../../3rdparty/yaml-cpp/ -type f -name "*.cpp" | sed -e "s/\.cpp/\.o/g" ) +YAML_CPP_DIR_OBJ = $(YAML_CPP_OBJ:%=obj/%) +YAML_CPP_AR = ../../3rdparty/yaml-cpp/obj/yaml-cpp.a +YAML_CPP_H = $(shell find ../../3rdparty/yaml-cpp/ -type f -name "*.h") +YAML_CPP_INCLUDE = -I../../3rdparty/yaml-cpp/include + HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) SERVER_DEPENDS=common @@ -59,23 +65,23 @@ $(COMMON_AR): $(COMMON_DIR_OBJ) @echo " AR $@" @@AR@ rcs $(COMMON_AR) $(COMMON_DIR_OBJ) -common: obj $(COMMON_DIR_OBJ) $(MT19937AR_OBJ) $(LIBCONFIG_AR) $(COMMON_AR) +common: obj $(COMMON_DIR_OBJ) $(MT19937AR_OBJ) $(LIBCONFIG_AR) $(YAML_CPP_AR) $(COMMON_AR) -obj/%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj/%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CC $<" - @@CC@ @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CC@ @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< -obj/%.o: %.cpp $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj/%.o: %.cpp $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CXX $<" - @@CXX@ $(CXXFLAG) @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CXX@ $(CXXFLAG) @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< -obj/mini%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj/mini%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CC $<" - @@CC@ @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CC@ @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $< -obj/mini%.o: %.cpp $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj/mini%.o: %.cpp $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CXX $<" - @@CXX@ $(CXXFLAG) @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CXX@ $(CXXFLAG) @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $< # missing object files $(MT19937AR_OBJ): @@ -83,3 +89,7 @@ $(MT19937AR_OBJ): $(LIBCONFIG_AR): @$(MAKE) -C ../../3rdparty/libconfig + +$(YAML_CPP_AR): + @$(MAKE) -C ../../3rdparty/yaml-cpp + diff --git a/src/common/core.cpp b/src/common/core.cpp index 7d3ddbe530..758850d234 100644 --- a/src/common/core.cpp +++ b/src/common/core.cpp @@ -379,5 +379,11 @@ int main (int argc, char **argv) malloc_final(); +#if defined(BUILDBOT) + if( buildbotflag ){ + exit(EXIT_FAILURE); + } +#endif + return 0; } diff --git a/src/common/mmo.h b/src/common/mmo.h index 23cae6a173..83bef472b5 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -141,6 +141,12 @@ #define EL_CLASS_BASE 2114 #define EL_CLASS_MAX (EL_CLASS_BASE+MAX_ELEMENTAL_CLASS-1) +//Achievement System +#define MAX_ACHIEVEMENT_RANK 20 /// Maximum achievement level +#define MAX_ACHIEVEMENT_OBJECTIVES 10 /// Maximum different objectives in achievement_db.conf +#define MAX_ACHIEVEMENT_DEPENDENTS 20 /// Maximum different dependents in achievement_db.conf +#define ACHIEVEMENT_NAME_LENGTH 50 /// Max Achievement Name length + enum item_types { IT_HEALING = 0, IT_UNKNOWN, //1 @@ -180,6 +186,15 @@ struct s_item_randomoption { char param; }; +/// Achievement log entry +struct achievement { + int achievement_id; ///< Achievement ID + int count[MAX_ACHIEVEMENT_OBJECTIVES]; ///< Counters of each achievement objective + time_t completed; ///< Date completed + time_t rewarded; ///< Received reward? + int score; ///< Amount of points achievement is worth +}; + struct item { int id; unsigned short nameid; @@ -478,6 +493,7 @@ struct mmo_charstatus { uint32 uniqueitem_counter; unsigned char hotkey_rowshift; + unsigned long title_id; }; typedef enum mail_status { diff --git a/src/common/sql.c b/src/common/sql.c index 6533aafebc..38760139be 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -352,6 +352,16 @@ uint64 Sql_NumRows(Sql* self) +/// Returns the number of rows affected by the last query +uint64 Sql_NumRowsAffected(Sql* self) +{ + if( self ) + return (uint64)mysql_affected_rows(&self->handle); + return 0; +} + + + /// Fetches the next row. int Sql_NextRow(Sql* self) { diff --git a/src/common/sql.h b/src/common/sql.h index 828b000654..e86b0b3b2d 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -175,6 +175,13 @@ uint64 Sql_NumRows(Sql* self); +/// Returns the number of rows affected by the last query +/// +/// @return Number of rows +uint64 Sql_NumRowsAffected(Sql* self); + + + /// Fetches the next row. /// The data of the previous row is no longer valid. /// diff --git a/src/common/yamlwrapper.cpp b/src/common/yamlwrapper.cpp index 59838720aa..a63532f4cb 100644 --- a/src/common/yamlwrapper.cpp +++ b/src/common/yamlwrapper.cpp @@ -31,8 +31,8 @@ yamlwrapper::yamlwrapper(YAML::Node node) { this->root = node; } -yamliterator::yamliterator(YAML::Node sequence) { - this->sequence = sequence; +yamliterator::yamliterator(YAML::Node sequence_) { + this->sequence = sequence_; this->index = 0; } @@ -41,13 +41,21 @@ yamliterator* yamlwrapper::iterator() { } yamlwrapper* yaml_load_file(const char* file_name) { - YAML::Node node = YAML::LoadFile(file_name); - if (!node.IsDefined()) + YAML::Node node; + + try { + node = YAML::LoadFile(file_name); + if (!node.IsDefined()) + return NULL; + } catch (YAML::ParserException &e) { + ShowError("YAML Exception Caught: %s\n", e.what()); return NULL; + } + return new yamlwrapper(node); } -extern "C++" YAML::Node yaml_get_node(YAML::Node& node, std::string& key) { +extern "C++" YAML::Node yaml_get_node(const YAML::Node& node,const std::string& key) { if (key.empty()) return node; @@ -107,6 +115,50 @@ bool yaml_get_boolean(yamlwrapper* wrapper, const char* key) { return yaml_get_value<bool>(wrapper, key); } +char* yaml_as_c_string(yamlwrapper* wrapper) { + std::string cpp_str = wrapper->root.as<std::string>(); + const char* c_str = cpp_str.c_str(); + size_t str_size = std::strlen(c_str) + 1; + char* buf = (char*)aCalloc(1, str_size); + strcpy(buf, c_str); + return buf; +} + +extern "C++" { + template<typename T> + T yaml_as_value(yamlwrapper* wrapper) { + if (wrapper == nullptr) + return {}; + try { + return wrapper->root.as<T>(); + } + catch (const std::exception& e) { + ShowError("Error during YAML node value resolving in node %s.\n", e.what()); + return {}; + } + } +} + +int yaml_as_int(yamlwrapper* wrapper) { + return yaml_as_value<int>(wrapper); +} + +int16 yaml_as_int16(yamlwrapper* wrapper) { + return yaml_as_value<int16>(wrapper); +} + +int32 yaml_as_int32(yamlwrapper* wrapper) { + return yaml_as_value<int32>(wrapper); +} + +int64 yaml_as_int64(yamlwrapper* wrapper) { + return yaml_as_value<int64>(wrapper); +} + +bool yaml_as_boolean(yamlwrapper* wrapper) { + return yaml_as_value<bool>(wrapper); +} + bool yaml_node_is_defined(yamlwrapper* wrapper, const char* key) { if (wrapper == nullptr || key == nullptr) return false; diff --git a/src/common/yamlwrapper.h b/src/common/yamlwrapper.h index d6f7069c4a..d00c084d17 100644 --- a/src/common/yamlwrapper.h +++ b/src/common/yamlwrapper.h @@ -42,7 +42,7 @@ class yamliterator { public: YAML::Node sequence; unsigned int index; - yamliterator(YAML::Node sequence); + yamliterator(YAML::Node sequence_); }; class yamlwrapper { @@ -65,6 +65,12 @@ int16 yaml_get_int16(yamlwrapper* wrapper, const char* key); int32 yaml_get_int32(yamlwrapper* wrapper, const char* key); int64 yaml_get_int64(yamlwrapper* wrapper, const char* key); bool yaml_get_boolean(yamlwrapper* wrapper, const char* key); +char* yaml_as_c_string(yamlwrapper* wrapper); +int yaml_as_int(yamlwrapper* wrapper); +int16 yaml_as_int16(yamlwrapper* wrapper); +int32 yaml_as_int32(yamlwrapper* wrapper); +int64 yaml_as_int64(yamlwrapper* wrapper); +bool yaml_as_boolean(yamlwrapper* wrapper); bool yaml_node_is_defined(yamlwrapper* wrapper, const char* key); yamlwrapper* yaml_get_subnode(yamlwrapper* wrapper, const char* key); yamliterator* yaml_get_iterator(yamlwrapper* wrapper); diff --git a/src/map/Makefile.in b/src/map/Makefile.in index c9775682d9..41079d0980 100644 --- a/src/map/Makefile.in +++ b/src/map/Makefile.in @@ -11,6 +11,12 @@ LIBCONFIG_H = $(shell ls ../../3rdparty/libconfig/*.h) LIBCONFIG_AR = ../../3rdparty/libconfig/obj/libconfig.a LIBCONFIG_INCLUDE = -I../../3rdparty/libconfig +YAML_CPP_OBJ = $(shell find ../../3rdparty/yaml-cpp/ -type f -name "*.cpp" | sed -e "s/\.cpp/\.o/g" ) +YAML_CPP_DIR_OBJ = $(YAML_CPP_OBJ:%=obj/%) +YAML_CPP_AR = ../../3rdparty/yaml-cpp/obj/yaml-cpp.a +YAML_CPP_H = $(shell find ../../3rdparty/yaml-cpp/ -type f -name "*.h") +YAML_CPP_INCLUDE = -I../../3rdparty/yaml-cpp/include + MAP_OBJ = $(shell ls *.c | sed -e "s/\.c/\.o/g") $(shell ls *.cpp | sed -e "s/\.cpp/\.o/g") MAP_DIR_OBJ = $(MAP_OBJ:%=obj/%) MAP_H = $(shell ls ../map/*.h) \ @@ -67,20 +73,20 @@ obj: # executables -map-server: obj $(MAP_DIR_OBJ) $(COMMON_AR) $(LIBCONFIG_AR) +map-server: obj $(MAP_DIR_OBJ) $(COMMON_AR) $(LIBCONFIG_AR) $(YAML_CPP_AR) @echo " LD @OMAP@@EXEEXT@" - @@CXX@ @LDFLAGS@ -o ../../@OMAP@@EXEEXT@ $(MAP_DIR_OBJ) $(COMMON_AR) $(MT19937AR_OBJ) $(LIBCONFIG_AR) @LIBS@ @PCRE_LIBS@ @MYSQL_LIBS@ + @@CXX@ @LDFLAGS@ -o ../../@OMAP@@EXEEXT@ $(MAP_DIR_OBJ) $(COMMON_AR) $(MT19937AR_OBJ) $(LIBCONFIG_AR) $(YAML_CPP_AR) @LIBS@ @PCRE_LIBS@ @MYSQL_LIBS@ # map object files -obj/%.o: %.c $(MAP_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj/%.o: %.c $(MAP_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CC $<" - @@CC@ @CFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(PCRE_CFLAGS) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CC@ @CFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(PCRE_CFLAGS) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< -obj/%.o: %.cpp $(MAP_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj/%.o: %.cpp $(MAP_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CXX $<" - @@CXX@ @CXXFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(PCRE_CFLAGS) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CXX@ @CXXFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(PCRE_CFLAGS) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< # missing object files $(COMMON_AR): @@ -91,3 +97,6 @@ $(MT19937AR_OBJ): $(LIBCONFIG_AR): @$(MAKE) -C ../../3rdparty/libconfig + +$(YAML_CPP_AR): + @$(MAKE) -C ../../3rdparty/yaml-cpp diff --git a/src/map/achievement.c b/src/map/achievement.c new file mode 100644 index 0000000000..90b1059a34 --- /dev/null +++ b/src/map/achievement.c @@ -0,0 +1,1268 @@ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder + +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/yamlwrapper.h" + +#include "achievement.h" +#include "chrif.h" +#include "clif.h" +#include "intif.h" +#include "itemdb.h" +#include "map.h" +#include "pc.h" +#include "script.h" +#include "status.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <setjmp.h> + +static jmp_buf av_error_jump; +static char* av_error_msg; +static const char* av_error_pos; +static int av_error_report; + +static DBMap *achievement_db = NULL; // int achievement_id -> struct achievement_db * +static DBMap *achievementmobs_db = NULL; // Avoids checking achievements on every mob killed +static void achievement_db_free_sub(struct achievement_db *achievement, bool free); + +/** + * Searches an achievement by ID + * @param achievement_id: ID to lookup + * @return Achievement entry (equals to &achievement_dummy if the ID is invalid) + */ +struct achievement_db *achievement_search(int achievement_id) +{ + struct achievement_db *achievement = (struct achievement_db *)idb_get(achievement_db, achievement_id); + + if (!achievement) + return &achievement_dummy; + return achievement; +} + +/** + * Searches for an achievement by monster ID + * @param mob_id: Monster ID to lookup + * @return True on success, false on failure + */ +bool achievement_mobexists(int mob_id) +{ + if (!battle_config.feature_achievement) + return false; + return idb_exists(achievementmobs_db, mob_id); +} + +/** + * Add an achievement to the player's log + * @param sd: Player data + * @param achievement_id: Achievement to add + * @return NULL on failure, achievement data on success + */ +struct achievement *achievement_add(struct map_session_data *sd, int achievement_id) +{ + struct achievement_db *adb = &achievement_dummy; + int i, index; + + nullpo_retr(NULL, sd); + + if ((adb = achievement_search(achievement_id)) == &achievement_dummy) { + ShowError("achievement_add: Achievement %d not found in DB.\n", achievement_id); + return NULL; + } + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + if (i < sd->achievement_data.count) { + ShowError("achievement_add: Character %d already has achievement %d.\n", sd->status.char_id, achievement_id); + return NULL; + } + + index = sd->achievement_data.incompleteCount; + + sd->achievement_data.count++; + sd->achievement_data.incompleteCount++; + RECREATE(sd->achievement_data.achievements, struct achievement, sd->achievement_data.count); + + // The character has some completed achievements, make room before them so that they will stay at the end of the array + if (sd->achievement_data.incompleteCount != sd->achievement_data.count) + memmove(&sd->achievement_data.achievements[index + 1], &sd->achievement_data.achievements[index], sizeof(struct achievement) * (sd->achievement_data.count - sd->achievement_data.incompleteCount)); + + memset(&sd->achievement_data.achievements[index], 0, sizeof(struct achievement)); + + sd->achievement_data.achievements[index].achievement_id = achievement_id; + sd->achievement_data.achievements[index].score = adb->score; + sd->achievement_data.save = true; + + clif_achievement_update(sd, &sd->achievement_data.achievements[index], sd->achievement_data.count - sd->achievement_data.incompleteCount); + + return &sd->achievement_data.achievements[index]; +} + +/** + * Removes an achievement from a player's log + * @param sd: Player's data + * @param achievement_id: Achievement to remove + * @return True on success, false on failure + */ +bool achievement_remove(struct map_session_data *sd, int achievement_id) +{ + struct achievement dummy; + int i; + + nullpo_retr(false, sd); + + if (achievement_search(achievement_id) == &achievement_dummy) { + ShowError("achievement_delete: Achievement %d not found in DB.\n", achievement_id); + return false; + } + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + if (i == sd->achievement_data.count) { + ShowError("achievement_delete: Character %d doesn't have achievement %d.\n", sd->status.char_id, achievement_id); + return false; + } + + if (i != sd->achievement_data.count - 1) + memmove(&sd->achievement_data.achievements[i], &sd->achievement_data.achievements[i + 1], sizeof(struct achievement) * (sd->achievement_data.count - 1 - i)); + + sd->achievement_data.count--; + if (!sd->achievement_data.achievements[i].completed) + sd->achievement_data.incompleteCount--; + RECREATE(sd->achievement_data.achievements, struct achievement, sd->achievement_data.count); + sd->achievement_data.save = true; + + // Send a removed fake achievement + memset(&dummy, 0, sizeof(struct achievement)); + dummy.achievement_id = achievement_id; + clif_achievement_update(sd, &dummy, sd->achievement_data.count - sd->achievement_data.incompleteCount); + + return true; +} + +/** + * Checks to see if an achievement has a dependent, and if so, checks if that dependent is complete + * @param sd: Player data + * @param achievement_id: Achievement to check if it has a dependent + * @return False on failure or not complete, true on complete or no dependents + */ +bool achievement_check_dependent(struct map_session_data *sd, int achievement_id) +{ + struct achievement_db *adb = &achievement_dummy; + + nullpo_retr(false, sd); + + adb = achievement_search(achievement_id); + + if (adb == &achievement_dummy) + return false; + + // Check if the achievement has a dependent + // If so, then do a check on all dependents to see if they're complete + if (adb->dependent_count) { + int i; + + for (i = 0; i < adb->dependent_count; i++) { + struct achievement_db *adb_dep = achievement_search(adb->dependents[i].achievement_id); + int j; + + if (adb_dep == &achievement_dummy) + return false; + + ARR_FIND(0, sd->achievement_data.count, j, sd->achievement_data.achievements[j].achievement_id == adb->dependents[i].achievement_id && sd->achievement_data.achievements[j].completed > 0); + if (j == sd->achievement_data.count) + return false; // One of the dependent is not complete! + } + } + + return true; +} + +/** + * Check achievements that only have dependents and no other requirements + * @return True if successful, false if not + */ +static int achievement_check_groups(DBKey key, DBData *data, va_list ap) +{ + struct achievement_db *ad; + struct map_session_data *sd; + int i; + + ad = (struct achievement_db *)db_data2ptr(data); + sd = va_arg(ap, struct map_session_data *); + + if (ad == &achievement_dummy || sd == NULL) + return 0; + + if (ad->group != AG_BATTLE && ad->group != AG_TAMING && ad->group != AG_ADVENTURE) + return 0; + + if (ad->dependent_count == 0 || ad->condition) + return 0; + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == ad->achievement_id); + if (i == sd->achievement_data.count) { // Achievment isn't in player's log + if (achievement_check_dependent(sd, ad->achievement_id) == true) { + achievement_add(sd, ad->achievement_id); + achievement_update_achievement(sd, ad->achievement_id, true); + } + } + + return 1; +} + +/** + * Update an achievement + * @param sd: Player to update + * @param achievement_id: Achievement ID of the achievement to update + * @param complete: Complete state of an achievement + * @return True if successful, false if not + */ +bool achievement_update_achievement(struct map_session_data *sd, int achievement_id, bool complete) +{ + struct achievement_db *adb = &achievement_dummy; + int i; + + nullpo_retr(false, sd); + + adb = achievement_search(achievement_id); + + if (adb == &achievement_dummy) + return false; + + ARR_FIND(0, sd->achievement_data.incompleteCount, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + if (i == sd->achievement_data.incompleteCount) + return false; + + if (sd->achievement_data.achievements[i].completed > 0) + return false; + + // Finally we send the updated achievement to the client + if (complete) { + if (adb->target_count) { // Make sure all the objective targets are at their respective total requirement + int k; + + for (k = 0; k < adb->target_count; k++) + sd->achievement_data.achievements[i].count[k] = adb->targets[k].count; + + for (k = 1; k < adb->dependent_count; k++) { + sd->achievement_data.achievements[i].count[k] = max(1, sd->achievement_data.achievements[i].count[k]); + } + } + + sd->achievement_data.achievements[i].completed = time(NULL); + + if (i < (--sd->achievement_data.incompleteCount)) { // The achievement needs to be moved to the completed achievements block at the end of the array + struct achievement tmp_ach; + + memcpy(&tmp_ach, &sd->achievement_data.achievements[i], sizeof(struct achievement)); + memcpy(&sd->achievement_data.achievements[i], &sd->achievement_data.achievements[sd->achievement_data.incompleteCount], sizeof(struct achievement)); + memcpy(&sd->achievement_data.achievements[sd->achievement_data.incompleteCount], &tmp_ach, sizeof(struct achievement)); + } + + achievement_level(sd, true); // Re-calculate achievement level + // Check dependents + achievement_db->foreach(achievement_db, achievement_check_groups, sd); + ARR_FIND(sd->achievement_data.incompleteCount, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); // Look for the index again, the position most likely changed + } + + clif_achievement_update(sd, &sd->achievement_data.achievements[i], sd->achievement_data.count - sd->achievement_data.incompleteCount); + sd->achievement_data.save = true; // Flag to save with the autosave interval + + if (sd->achievement_data.sendlist) { + clif_achievement_list_all(sd); + sd->achievement_data.sendlist = false; + } + + return true; +} + +/** + * Get the reward of an achievement + * @param sd: Player getting the reward + * @param achievement_id: Achievement to get reward data + */ +void achievement_get_reward(struct map_session_data *sd, int achievement_id, time_t rewarded) +{ + struct achievement_db *adb = achievement_search(achievement_id); + int i; + + nullpo_retv(sd); + + if( rewarded == 0 ){ + clif_achievement_reward_ack(sd->fd, 0, achievement_id); + return; + } + + if (adb == &achievement_dummy) { + ShowError("achievement_reward: Inter server sent a reward claim for achievement %d not found in DB.\n", achievement_id); + return; + } + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + + if (i == sd->achievement_data.count) { + return; + } + + // Only update in the cache, db was updated already + sd->achievement_data.achievements[i].rewarded = rewarded; + + run_script(adb->rewards.script, 0, sd->bl.id, fake_nd->bl.id); + if (adb->rewards.title_id) { + RECREATE(sd->titles, int, sd->titleCount + 1); + sd->titles[sd->titleCount] = adb->rewards.title_id; + sd->titleCount++; + sd->achievement_data.sendlist = true; + } + + clif_achievement_reward_ack(sd->fd, 1, achievement_id); + clif_achievement_update(sd, &sd->achievement_data.achievements[i], sd->achievement_data.count - sd->achievement_data.incompleteCount); +} + +/** + * Check if player has recieved an achievement's reward + * @param sd: Player to get reward + * @param achievement_id: Achievement to get reward data + */ +void achievement_check_reward(struct map_session_data *sd, int achievement_id) +{ + int i; + struct achievement_db *adb = achievement_search(achievement_id); + + nullpo_retv(sd); + + if (adb == &achievement_dummy) { + ShowError("achievement_reward: Trying to reward achievement %d not found in DB.\n", achievement_id); + clif_achievement_reward_ack(sd->fd, 0, achievement_id); + return; + } + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + if (i == sd->achievement_data.count) { + clif_achievement_reward_ack(sd->fd, 0, achievement_id); + return; + } + + if (sd->achievement_data.achievements[i].rewarded > 0 || sd->achievement_data.achievements[i].completed == 0) { + clif_achievement_reward_ack(sd->fd, 0, achievement_id); + return; + } + + if( !intif_achievement_reward(sd,adb) ){ + clif_achievement_reward_ack(sd->fd, 0, achievement_id); + } +} + +/** + * Return all titles to a player based on completed achievements + * @param char_id: Character ID requesting + */ +void achievement_get_titles(uint32 char_id) +{ + struct map_session_data *sd = map_charid2sd(char_id); + + if (sd) { + sd->titles = NULL; + sd->titleCount = 0; + + if (sd->achievement_data.count) { + int i; + + for (i = 0; i < sd->achievement_data.count; i++) { + struct achievement_db *adb = achievement_search(sd->achievement_data.achievements[i].achievement_id); + + if (adb && adb->rewards.title_id && sd->achievement_data.achievements[i].completed > 0) { // If the achievement has a title and is complete, give it to the player + RECREATE(sd->titles, int, sd->titleCount + 1); + sd->titles[sd->titleCount] = adb->rewards.title_id; + sd->titleCount++; + } + } + } + } +} + +/** + * Frees the player's data for achievements and titles + * @param sd: Player's session + */ +void achievement_free(struct map_session_data *sd) +{ + nullpo_retv(sd); + + if (sd->titleCount) { + aFree(sd->titles); + sd->titles = NULL; + sd->titleCount = 0; + } + + if (sd->achievement_data.count) { + aFree(sd->achievement_data.achievements); + sd->achievement_data.achievements = NULL; + sd->achievement_data.count = sd->achievement_data.incompleteCount = 0; + } +} + +/** + * Get an achievement's progress information + * @param sd: Player to check achievement progress + * @param achievement_id: Achievement progress to check + * @param type: Type to return + * @return The type's data, -1 if player doesn't have achievement, -2 on failure/incorrect type + */ +int achievement_check_progress(struct map_session_data *sd, int achievement_id, int type) +{ + int i; + + nullpo_retr(-2, sd); + + // Achievement ID is not needed so skip the lookup + if (type == ACHIEVEINFO_LEVEL) + return sd->achievement_data.level; + else if (type == ACHIEVEINFO_SCORE) + return sd->achievement_data.total_score; + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + if (i == sd->achievement_data.count) + return -1; + + if (type >= ACHIEVEINFO_COUNT1 && type <= ACHIEVEINFO_COUNT10) + return sd->achievement_data.achievements[i].count[type - 1]; + else if (type == ACHIEVEINFO_COMPLETE) + return sd->achievement_data.achievements[i].completed > 0; + else if (type == ACHIEVEINFO_COMPLETEDATE) + return (int)sd->achievement_data.achievements[i].completed; + else if (type == ACHIEVEINFO_GOTREWARD) + return sd->achievement_data.achievements[i].rewarded > 0; + return -2; +} + +/** + * Calculate a player's achievement level + * @param sd: Player to check achievement level + * @param flag: If the call should attempt to give the AG_GOAL_ACHIEVE achievement + */ +int *achievement_level(struct map_session_data *sd, bool flag) +{ + static int info[2]; + int i, old_level; + const int score_table[MAX_ACHIEVEMENT_RANK] = { 18, 31, 49, 73, 135, 104, 140, 178, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000 }; //! TODO: Figure out the EXP required to level up from 8-20 + + nullpo_retr(0, sd); + + sd->achievement_data.total_score = 0; + old_level = sd->achievement_data.level; + + for (i = 0; i < sd->achievement_data.count; i++) { + if (sd->achievement_data.achievements[i].completed > 0) + sd->achievement_data.total_score += sd->achievement_data.achievements[i].score; + } + + info[0] = 0; + info[1] = 0; + + for (i = 0; i < MAX_ACHIEVEMENT_RANK; i++) { + info[0] = info[1]; + + if (i < ARRAYLENGTH(score_table)) + info[1] = score_table[i]; + else { + info[0] = info[1]; + info[1] = info[1] + 500; + } + + if (sd->achievement_data.total_score < info[1]) + break; + } + + if (i == MAX_ACHIEVEMENT_RANK) + i = 0; + + info[1] = info[1] - info[0]; // Right number + info[0] = sd->achievement_data.total_score - info[0]; // Left number + sd->achievement_data.level = i; + + if (flag == true && old_level != sd->achievement_data.level) { + int achievement_id = 240000 + sd->achievement_data.level; + + achievement_add(sd, achievement_id); + achievement_update_achievement(sd, achievement_id, true); + } + + return info; +} + +/** + * Update achievement objectives. + * @see DBApply + */ +static int achievement_update_objectives(DBKey key, DBData *data, va_list ap) +{ + struct achievement_db *ad; + struct map_session_data *sd; + enum e_achievement_group group; + struct achievement *entry = NULL; + bool isNew = false, changed = false, complete = false; + int i, k = 0, objective_count[MAX_ACHIEVEMENT_OBJECTIVES], update_count[MAX_ACHIEVEMENT_OBJECTIVES]; + + ad = (struct achievement_db *)db_data2ptr(data); + sd = va_arg(ap, struct map_session_data *); + group = (enum e_achievement_group)va_arg(ap, int); + memcpy(update_count, (int *)va_arg(ap, int *), sizeof(update_count)); + + if (ad == NULL || sd == NULL) + return 0; + + if (group <= AG_NONE || group >= AG_MAX) + return 0; + + if (group != ad->group) + return 0; + + memset(objective_count, 0, sizeof(objective_count)); // Current objectives count + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == ad->achievement_id); + if (i == sd->achievement_data.count) { // Achievment isn't in player's log + if (achievement_check_dependent(sd, ad->achievement_id) == false) // Check to see if dependents are complete before adding to player's log + return 0; + isNew = true; + } else { + entry = &sd->achievement_data.achievements[i]; + + if (entry->completed > 0) // Player has completed the achievement + return 0; + + memcpy(objective_count, entry->count, sizeof(objective_count)); + } + + switch (group) { + case AG_ADD_FRIEND: + case AG_BABY: + case AG_CHAT_COUNT: + case AG_CHAT_CREATE: + case AG_CHAT_DYING: + case AG_GET_ITEM: + case AG_GET_ZENY: + case AG_GOAL_LEVEL: + case AG_GOAL_STATUS: + case AG_JOB_CHANGE: + case AG_MARRY: + case AG_PARTY: + case AG_REFINE_FAIL: + case AG_REFINE_SUCCESS: + case AG_SPEND_ZENY: + if (group == AG_SPEND_ZENY) { // Achievement type is cummulative + objective_count[0] += update_count[0]; + changed = true; + } + + if (!ad->condition || achievement_check_condition(ad->condition, sd, update_count)) { + changed = true; + complete = true; + } + + if (changed == false) + break; + + if (isNew) { + if ((entry = achievement_add(sd, ad->achievement_id)) == NULL) + return 0; // Failed to add achievement, fall out + } + break; + case AG_CHAT: + if (!ad->target_count) + break; + + if (ad->condition && !achievement_check_condition(ad->condition, sd, update_count)) // Parameters weren't met + break; + + if (ad->mapindex > -1 && sd->bl.m != ad->mapindex) + break; + + for (i = 0; i < ad->target_count; i++) { + if (objective_count[i] < ad->targets[i].count) + objective_count[i] += update_count[0]; + } + + changed = true; + + ARR_FIND(0, ad->target_count, k, objective_count[k] < ad->targets[k].count); + if (k == ad->target_count) + complete = true; + + if (isNew) { + if ((entry = achievement_add(sd, ad->achievement_id)) == NULL) + return 0; // Failed to add achievement, fall out + } + break; + case AG_BATTLE: + case AG_TAMING: + ARR_FIND(0, ad->target_count, k, ad->targets[k].mob == update_count[0]); + if (k == ad->target_count) + break; // Mob wasn't found + + for (k = 0; k < ad->target_count; k++) { + if (ad->targets[k].mob == update_count[0] && objective_count[k] < ad->targets[k].count) { + objective_count[k]++; + changed = true; + } + } + + ARR_FIND(0, ad->target_count, k, objective_count[k] < ad->targets[k].count); + if (k == ad->target_count) + complete = true; + + if (isNew) { + if ((entry = achievement_add(sd, ad->achievement_id)) == NULL) + return 0; // Failed to add achievement, fall out + } + break; + } + + if (changed) { + memcpy(entry->count, objective_count, sizeof(objective_count)); + achievement_update_achievement(sd, ad->achievement_id, complete); + } + + return 1; +} + +/** + * Update achievement objective count. + * @param sd: Player data + * @param group: Achievement enum type + * @param sp_value: SP parameter value + * @param arg_count: va_arg count + */ +void achievement_update_objective(struct map_session_data *sd, enum e_achievement_group group, uint8 arg_count, ...) +{ + if (sd) { + va_list ap; + int i, count[MAX_ACHIEVEMENT_OBJECTIVES]; + + if (!battle_config.feature_achievement) + return; + + memset(count, 0, sizeof(count)); // Clear out array before setting values + + va_start(ap, arg_count); + for (i = 0; i < arg_count; i++) + count[i] = va_arg(ap, int); + va_end(ap); + + switch(group) { + case AG_CHAT: //! TODO: Not sure how this works officially + case AG_GOAL_ACHIEVE: + // These have no objective use right now. + break; + default: + achievement_db->foreach(achievement_db, achievement_update_objectives, sd, (int)group, count); + break; + } + } +} + +/*========================================== + * Achievement condition parsing section + *------------------------------------------*/ +static void disp_error_message2(const char *mes,const char *pos,int report) +{ + av_error_msg = aStrdup(mes); + av_error_pos = pos; + av_error_report = report; + longjmp(av_error_jump, 1); +} +#define disp_error_message(mes,pos) disp_error_message2(mes,pos,1) + +/** + * Checks the condition of an achievement. + * @param condition: Achievement condition + * @param sd: Player data + * @param count: Script arguments + * @return The result of the condition. + */ +long long achievement_check_condition(struct av_condition *condition, struct map_session_data *sd, int *count) +{ + long long left = 0; + long long right = 0; + + // Reduce the recursion, almost all calls will be C_PARAM, C_NAME or C_ARG + if (condition->left) { + if (condition->left->op == C_NAME || condition->left->op == C_INT) + left = condition->left->value; + else if (condition->left->op == C_PARAM) + left = pc_readparam(sd, (int)condition->left->value); + else if (condition->left->op == C_ARG && condition->left->value < MAX_ACHIEVEMENT_OBJECTIVES) + left = count[condition->left->value]; + else + left = achievement_check_condition(condition->left, sd, count); + } + + if (condition->right) { + if (condition->right->op == C_NAME || condition->right->op == C_INT) + right = condition->right->value; + else if (condition->right->op == C_PARAM) + right = pc_readparam(sd, (int)condition->right->value); + else if (condition->right->op == C_ARG && condition->right->value < MAX_ACHIEVEMENT_OBJECTIVES) + right = count[condition->right->value]; + else + right = achievement_check_condition(condition->right, sd, count); + } + + switch(condition->op) { + case C_NOP: + return false; + case C_NAME: + case C_INT: + return condition->value; + case C_PARAM: + return pc_readparam(sd, (int)condition->value); + case C_LOR: + return left || right; + case C_LAND: + return left && right; + case C_LE: + return left <= right; + case C_LT: + return left < right; + case C_GE: + return left >= right; + case C_GT: + return left > right; + case C_EQ: + return left == right; + case C_NE: + return left != right; + case C_XOR: + return left ^ right; + case C_OR: + return left || right; + case C_AND: + return left & right; + case C_ADD: + return left + right; + case C_SUB: + return left - right; + case C_MUL: + return left * right; + case C_DIV: + return left / right; + case C_MOD: + return left % right; + case C_NEG: + return -left; + case C_LNOT: + return !left; + case C_NOT: + return ~left; + case C_R_SHIFT: + return left >> right; + case C_L_SHIFT: + return left << right; + case C_ARG: + if (condition->value < MAX_ACHIEVEMENT_OBJECTIVES) + return count[condition->value]; + + return false; + default: + ShowError("achievement_check_condition: unexpected operator: %d\n", condition->op); + return false; + } + + return false; +} + +static const char *skip_word(const char *p) +{ + while (ISALNUM(*p) || *p == '_') + ++p; + + if (*p == '$') // String + p++; + + return p; +} + +const char *av_parse_simpleexpr(const char *p, struct av_condition *parent) +{ + long long i; + + p = skip_space(p); + + if(*p == ';' || *p == ',') + disp_error_message("av_parse_simpleexpr: unexpected character.", p); + if(*p == '(') { + p = av_parse_subexpr(p + 1, -1, parent); + p = skip_space(p); + + if (*p != ')') + disp_error_message("av_parse_simpleexpr: unmatched ')'", p); + ++p; + } else if(is_number(p)) { + char *np; + + while(*p == '0' && ISDIGIT(p[1])) + p++; + i = strtoll(p, &np, 0); + + if (i < INT_MIN) { + i = INT_MIN; + disp_error_message("av_parse_simpleexpr: underflow detected, capping value to INT_MIN.", p); + } else if (i > INT_MAX) { + i = INT_MAX; + disp_error_message("av_parse_simpleexpr: underflow detected, capping value to INT_MAX.", p); + } + + parent->op = C_INT; + parent->value = i; + p = np; + } else { + int v, len; + char * word; + + if (skip_word(p) == p) + disp_error_message("av_parse_simpleexpr: unexpected character.", p); + + len = skip_word(p) - p; + + if (len == 0) + disp_error_message("av_parse_simpleexpr: invalid word. A word consists of undercores and/or alphanumeric characters.", p); + + word = (char*)aMalloc(len + 1); + memcpy(word, p, len); + word[len] = 0; + + if (script_get_parameter(word, &v)) + parent->op = C_PARAM; + else if (script_get_constant(word, &v)) { + if (word[0] == 'b' && ISUPPER(word[1])) // Consider b* variables as parameters (because they... are?) + parent->op = C_PARAM; + else + parent->op = C_NAME; + } else { + if (word[0] == 'A' && word[1] == 'R' && word[2] == 'G' && ISDIGIT(word[3])) { // Special constants used to set temporary variables + parent->op = C_ARG; + v = atoi(word + 3); + } else { + aFree(word); + disp_error_message("av_parse_simpleexpr: invalid constant.", p); + } + } + + aFree(word); + parent->value = v; + p = skip_word(p); + } + + return p; +} + +const char* av_parse_subexpr(const char* p, int limit, struct av_condition *parent) +{ + int op, opl, len; + + p = skip_space(p); + + CREATE(parent->left, struct av_condition, 1); + + if ((op = C_NEG, *p == '-') || (op = C_LNOT, *p == '!') || (op = C_NOT, *p == '~')) { // Unary - ! ~ operators + p = av_parse_subexpr(p + 1, 11, parent->left); + parent->op = op; + } else + p = av_parse_simpleexpr(p, parent->left); + + p = skip_space(p); + + while(( + (op=C_ADD,opl=9,len=1,*p=='+') || + (op=C_SUB,opl=9,len=1,*p=='-') || + (op=C_MUL,opl=10,len=1,*p=='*') || + (op=C_DIV,opl=10,len=1,*p=='/') || + (op=C_MOD,opl=10,len=1,*p=='%') || + (op=C_LAND,opl=2,len=2,*p=='&' && p[1]=='&') || + (op=C_AND,opl=5,len=1,*p=='&') || + (op=C_LOR,opl=1,len=2,*p=='|' && p[1]=='|') || + (op=C_OR,opl=3,len=1,*p=='|') || + (op=C_XOR,opl=4,len=1,*p=='^') || + (op=C_EQ,opl=6,len=2,*p=='=' && p[1]=='=') || + (op=C_NE,opl=6,len=2,*p=='!' && p[1]=='=') || + (op=C_R_SHIFT,opl=8,len=2,*p=='>' && p[1]=='>') || + (op=C_GE,opl=7,len=2,*p=='>' && p[1]=='=') || + (op=C_GT,opl=7,len=1,*p=='>') || + (op=C_L_SHIFT,opl=8,len=2,*p=='<' && p[1]=='<') || + (op=C_LE,opl=7,len=2,*p=='<' && p[1]=='=') || + (op=C_LT,opl=7,len=1,*p=='<')) && opl>limit) { + p += len; + + if (parent->right) { // Chain conditions + struct av_condition *condition = NULL; + CREATE(condition, struct av_condition, 1); + condition->op = parent->op; + condition->left = parent->left; + condition->right = parent->right; + parent->left = condition; + parent->right = NULL; + } + + CREATE(parent->right, struct av_condition, 1); + p = av_parse_subexpr(p, opl, parent->right); + parent->op = op; + p = skip_space(p); + } + + if (parent->op == C_NOP && parent->right == NULL) { // Move the node up + struct av_condition *temp = parent->left; + + parent->right = parent->left->right; + parent->op = parent->left->op; + parent->value = parent->left->value; + parent->left = parent->left->left; + + aFree(temp); + } + + return p; +} + +/** + * Parses a condition from a script. + * @param p: The script buffer. + * @param file: The file being parsed. + * @param line: The current achievement line number. + * @return The parsed achievement condition. + */ +struct av_condition *parse_condition(const char *p, const char *file, int line) +{ + struct av_condition *condition = NULL; + + if (setjmp(av_error_jump) != 0) { + if (av_error_report) + script_error(p,file,line,av_error_msg,av_error_pos); + aFree(av_error_msg); + if (condition) + achievement_script_free(condition); + return NULL; + } + + switch(*p) { + case ')': case ';': case ':': case '[': case ']': case '}': + disp_error_message("parse_condition: unexpected character.", p); + } + + condition = (struct av_condition *) aCalloc(1, sizeof(struct av_condition)); + av_parse_subexpr(p, -1, condition); + + return condition; +} + +/** + * Reads and parses an entry from the achievement_db. + * @param wrapper: The YAML wrapper containing the entry. + * @param n: The sequential index of the current entry. + * @param source: The source YAML file. + * @return The parsed achievement entry or NULL in case of error. + */ +struct achievement_db *achievement_read_db_sub(yamlwrapper *wrapper, int n, const char *source) +{ + struct achievement_db *entry = NULL; + yamlwrapper *t = NULL; + yamliterator *it; + enum e_achievement_group group = AG_NONE; + int score = 0, achievement_id = 0; + char *group_char = NULL, *name = NULL, *condition = NULL, *mapname = NULL; + + if (!yaml_node_is_defined(wrapper, "ID")) { + ShowWarning("achievement_read_db_sub: Missing ID in \"%s\", entry #%d, skipping.\n", source, n); + return NULL; + } else + achievement_id = yaml_get_int(wrapper, "ID"); + if (achievement_id < 1 || achievement_id > INT_MAX) { + ShowWarning("achievement_read_db_sub: Invalid achievement ID %d in \"%s\", entry #%d (min: 1, max: %d), skipping.\n", achievement_id, source, n, INT_MAX); + return NULL; + } + + if (!yaml_node_is_defined(wrapper, "Group")) { + ShowWarning("achievement_read_db_sub: Missing group for achievement %d in \"%s\", skipping.\n", achievement_id, source); + return NULL; + } else + group_char = yaml_get_c_string(wrapper, "Group"); + if (!script_get_constant(group_char, (int *)&group)) { + ShowWarning("achievement_read_db_sub: Invalid group %s for achievement %d in \"%s\", skipping.\n", group_char, achievement_id, source); + return NULL; + } + aFree(group_char); + + if (!yaml_node_is_defined(wrapper, "Name")) { + ShowWarning("achievement_read_db_sub: Missing achievement name for achievement %d in \"%s\", skipping.\n", name, achievement_id, source); + return NULL; + } else + name = yaml_get_c_string(wrapper, "Name"); + + CREATE(entry, struct achievement_db, 1); + entry->achievement_id = achievement_id; + entry->group = group; + safestrncpy(entry->name, name, sizeof(entry->name)); + aFree(name); + entry->mapindex = -1; + + if (yaml_node_is_defined(wrapper, "Target") && (t = yaml_get_subnode(wrapper, "Target")) && (it = yaml_get_iterator(t)) && yaml_iterator_is_valid(it)) { + yamlwrapper *tt = NULL; + + for (tt = yaml_iterator_first(it); yaml_iterator_has_next(it) && entry->target_count < MAX_ACHIEVEMENT_OBJECTIVES; tt = yaml_iterator_next(it)) { + int mobid = 0, count = 0; + + if (yaml_node_is_defined(tt, "MobID") && (mobid = yaml_get_int(tt, "MobID")) && !mobdb_exists(mobid)) { // The mob ID field is not required + ShowError("achievement_read_db_sub: Invalid mob ID %d for achievement %d in \"%s\", skipping.\n", mobid, achievement_id, source); + continue; + } + if (yaml_node_is_defined(tt, "Count") && (!(count = yaml_get_int(tt, "Count")) || count <= 0)) { + ShowError("achievement_read_db_sub: Invalid count %d for achievement %d in \"%s\", skipping.\n", count, achievement_id, source); + continue; + } + if (mobid && group == AG_BATTLE && !idb_exists(achievementmobs_db, mobid)) { + struct achievement_mob *entrymob = NULL; + + CREATE(entrymob, struct achievement_mob, 1); + idb_put(achievementmobs_db, mobid, entrymob); + } + + RECREATE(entry->targets, struct achievement_target, entry->target_count + 1); + entry->targets[entry->target_count].mob = mobid; + entry->targets[entry->target_count].count = count; + entry->target_count++; + yaml_destroy_wrapper(tt); + } + yaml_iterator_destroy(it); + } + + if (yaml_node_is_defined(wrapper, "Condition") && (condition = yaml_get_c_string(wrapper, "Condition"))){ + entry->condition = parse_condition(condition, source, n); + aFree(condition); + } + + if (yaml_node_is_defined(wrapper, "Map") && (mapname = yaml_get_c_string(wrapper, "Map"))) { + if (group != AG_CHAT) + ShowWarning("achievement_read_db_sub: The map argument can only be used with the group AG_CHATTING (achievement %d in \"%s\"), skipping.\n", achievement_id, source); + else { + entry->mapindex = map_mapname2mapid(mapname); + + if (entry->mapindex == -1) + ShowWarning("achievement_read_db_sub: Invalid map name %s for achievement %d in \"%s\".\n", mapname, achievement_id, source); + } + aFree(mapname); + } + + if (yaml_node_is_defined(wrapper, "Dependent") && (t = yaml_get_subnode(wrapper, "Dependent")) && (it = yaml_get_iterator(t))) { + if (yaml_iterator_is_valid(it)) { + yamlwrapper *tt = NULL; + + for (tt = yaml_iterator_first(it); yaml_iterator_has_next(it) && entry->dependent_count < MAX_ACHIEVEMENT_DEPENDENTS; tt = yaml_iterator_next(it)) { + RECREATE(entry->dependents, struct achievement_dependent, entry->dependent_count + 1); + entry->dependents[entry->dependent_count].achievement_id = yaml_as_int(tt); + entry->dependent_count++; + yaml_destroy_wrapper(tt); + } + yaml_iterator_destroy(it); + } else + ShowWarning("achievement_read_db_sub: Invalid dependent format for achievement %d in \"%s\".\n", achievement_id, source); + } + + if (yaml_node_is_defined(wrapper, "Reward") && (t = yaml_get_subnode(wrapper, "Reward"))) { + char *script_char = NULL; + int nameid = 0, amount = 0, titleid = 0; + + if (yaml_node_is_defined(t, "ItemID") && (nameid = yaml_get_int(t, "ItemID"))) { + if (itemdb_exists(nameid)) { + entry->rewards.nameid = nameid; + entry->rewards.amount = 1; // Default the amount to 1 + } else if (nameid && !itemdb_exists(nameid)) { + ShowWarning("achievement_read_db_sub: Invalid reward item ID %hu for achievement %d in \"%s\". Setting to 0.\n", nameid, achievement_id, source); + entry->rewards.nameid = nameid = 0; + } + + if (yaml_node_is_defined(t, "Amount") && (amount = yaml_get_int(t, "Amount")) && amount > 0 && nameid) + entry->rewards.amount = amount; + } + if (yaml_node_is_defined(t, "Script") && (script_char = yaml_get_c_string(t, "Script"))){ + entry->rewards.script = parse_script(script_char, source, achievement_id, SCRIPT_IGNORE_EXTERNAL_BRACKETS); + aFree(script_char); + } + if (yaml_node_is_defined(t, "TitleID") && (titleid = yaml_get_int(t, "TitleID")) && titleid > 0) + entry->rewards.title_id = titleid; + } + + if ((score = yaml_get_int(wrapper, "Score")) && score > 0) + entry->score = score; + + return entry; +} + +/** + * Loads achievements from the achievement db. + */ +void achievement_read_db(void) +{ + yamlwrapper *adb = NULL, *adb_sub = NULL; + yamliterator *it; + int i = 0; + const char *dbsubpath[] = { + "", + "/"DBIMPORT"/", + //add other path here + }; + + for (i = 0; i < ARRAYLENGTH(dbsubpath); i++) { + char filepath[256]; + int count = 0; + + if (!i) + sprintf(filepath, "%s/%s%s%s", db_path, DBPATH, dbsubpath[i], "achievement_db.yml"); + else + sprintf(filepath, "%s%s%s", db_path, dbsubpath[i], "achievement_db.yml"); + + if ((adb = yaml_load_file(filepath)) == NULL) { + ShowError("Failed to read '%s'.\n", filepath); + continue; + } + + if (!yaml_node_is_defined(adb, "Achievements")) + continue; // Skip if base structure isn't defined + adb_sub = yaml_get_subnode(adb, "Achievements"); + it = yaml_get_iterator(adb_sub); + if (yaml_iterator_is_valid(it)) { + yamlwrapper *id = NULL; + + for (id = yaml_iterator_first(it); yaml_iterator_has_next(it); id = yaml_iterator_next(it)) { + struct achievement_db *duplicate = &achievement_dummy, *entry = achievement_read_db_sub(id, count, filepath); + + if (!entry) { + ShowWarning("achievement_read_db: Failed to parse achievement entry %d.\n", count); + continue; + } + if ((duplicate = achievement_search(entry->achievement_id)) != &achievement_dummy) { + if (!i) { // Normal file read-in + ShowWarning("achievement_read_db: Duplicate achievement %d.\n", entry->achievement_id); + achievement_db_free_sub(entry, false); + continue; + } + else // Import file read-in, free previous value and store new value + achievement_db_free_sub(duplicate, false); + } + yaml_destroy_wrapper(id); + idb_put(achievement_db, entry->achievement_id, entry); + count++; + } + } + yaml_destroy_wrapper(adb_sub); + yaml_iterator_destroy(it); + + ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath); + } + + return; +} + +/** + * Recursive method to free an achievement condition + * @param condition: Condition to clear + */ +void achievement_script_free(struct av_condition *condition) +{ + if (condition->left) { + achievement_script_free(condition->left); + condition->left = NULL; + } + + if (condition->right) { + achievement_script_free(condition->right); + condition->right = NULL; + } + + aFree(condition); +} + +/** + * Clear achievement single entry + * @param achievement: Achievement to clear + * @param free: Will free achievement from memory + */ +void achievement_db_free_sub(struct achievement_db *achievement, bool free) +{ + if (achievement->targets) { + aFree(achievement->targets); + achievement->targets = NULL; + achievement->target_count = 0; + } + if (achievement->condition) { + achievement_script_free(achievement->condition); + achievement->condition = NULL; + } + if (achievement->dependents) { + aFree(achievement->dependents); + achievement->dependents = NULL; + achievement->dependent_count = 0; + } + if (achievement->rewards.script) { + script_free_code(achievement->rewards.script); + achievement->rewards.script = NULL; + } + if (free) + aFree(achievement); +} + +/** + * Clears the achievement database for shutdown or reload. + */ +static int achievement_db_free(DBKey key, DBData *data, va_list ap) +{ + struct achievement_db *achievement = (struct achievement_db *)db_data2ptr(data); + + if (!achievement) + return 0; + + achievement_db_free_sub(achievement, true); + return 1; +} + +static int achievementmobs_db_free(DBKey key, DBData *data, va_list ap) +{ + struct achievementmobs_db *achievement = (struct achievementmobs_db *)db_data2ptr(data); + + if (!achievement) + return 0; + + aFree(achievement); + return 1; +} + +void achievement_db_reload(void) +{ + if (!battle_config.feature_achievement) + return; + achievementmobs_db->clear(achievementmobs_db, achievementmobs_db_free); + achievement_db->clear(achievement_db, achievement_db_free); + achievement_read_db(); +} + +void do_init_achievement(void) +{ + if (!battle_config.feature_achievement) + return; + memset(&achievement_dummy, 0, sizeof(achievement_dummy)); + achievement_db = idb_alloc(DB_OPT_BASE); + achievementmobs_db = idb_alloc(DB_OPT_BASE); + achievement_read_db(); +} + +void do_final_achievement(void) +{ + if (!battle_config.feature_achievement) + return; + achievementmobs_db->destroy(achievementmobs_db, achievementmobs_db_free); + achievement_db->destroy(achievement_db, achievement_db_free); +} diff --git a/src/map/achievement.h b/src/map/achievement.h new file mode 100644 index 0000000000..c3b3b0eb13 --- /dev/null +++ b/src/map/achievement.h @@ -0,0 +1,135 @@ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL +// For more information, see LICENCE in the main folder + +#ifndef MAP_ACHIEVEMENTS_H +#define MAP_ACHIEVEMENTS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "../common/mmo.h" +#include "../common/db.h" + +enum e_achievement_group { + AG_NONE = 0, + AG_ADD_FRIEND, + AG_ADVENTURE, + AG_BABY, + AG_BATTLE, + AG_CHAT, + AG_CHAT_COUNT, + AG_CHAT_CREATE, + AG_CHAT_DYING, + AG_EAT, + AG_GET_ITEM, + AG_GET_ZENY, + AG_GOAL_ACHIEVE, + AG_GOAL_LEVEL, + AG_GOAL_STATUS, + AG_HEAR, + AG_JOB_CHANGE, + AG_MARRY, + AG_PARTY, + AG_REFINE_FAIL, + AG_REFINE_SUCCESS, + AG_SEE, + AG_SPEND_ZENY, + AG_TAMING, + AG_MAX +}; + +enum e_achievement_info { + ACHIEVEINFO_COUNT1 = 1, + ACHIEVEINFO_COUNT2, + ACHIEVEINFO_COUNT3, + ACHIEVEINFO_COUNT4, + ACHIEVEINFO_COUNT5, + ACHIEVEINFO_COUNT6, + ACHIEVEINFO_COUNT7, + ACHIEVEINFO_COUNT8, + ACHIEVEINFO_COUNT9, + ACHIEVEINFO_COUNT10, + ACHIEVEINFO_COMPLETE, + ACHIEVEINFO_COMPLETEDATE, + ACHIEVEINFO_GOTREWARD, + ACHIEVEINFO_LEVEL, + ACHIEVEINFO_SCORE, + ACHIEVEINFO_MAX, +}; + +struct achievement_mob { + int mod_id; +}; + +struct achievement_target { + int mob; + int count; +}; + +struct achievement_dependent { + int achievement_id; +}; + +struct av_condition { + int op; + struct av_condition *left; + struct av_condition *right; + long long value; +}; + +struct achievement_db { + int achievement_id; + char name[ACHIEVEMENT_NAME_LENGTH]; + enum e_achievement_group group; + uint8 target_count; + struct achievement_target *targets; + uint8 dependent_count; + struct achievement_dependent *dependents; + struct av_condition *condition; + int16 mapindex; + struct ach_reward { + unsigned short nameid, amount; + struct script_code *script; + int title_id; + } rewards; + int score; + int has_dependent; // Used for quick updating of achievements that depend on others - this is their ID +}; + +struct map_session_data; +struct block_list; +struct config_setting_t; +enum _sp; + +struct achievement_db achievement_dummy; ///< Dummy entry for invalid achievement lookups + +struct achievement_db *achievement_search(int achievement_id); +bool achievement_mobexists(int mob_id); +void achievement_get_reward(struct map_session_data *sd, int achievement_id, time_t rewarded); +struct achievement *achievement_add(struct map_session_data *sd, int achievement_id); +bool achievement_remove(struct map_session_data *sd, int achievement_id); +bool achievement_update_achievement(struct map_session_data *sd, int achievement_id, bool complete); +void achievement_check_reward(struct map_session_data *sd, int achievement_id); +void achievement_free(struct map_session_data *sd); +int achievement_check_progress(struct map_session_data *sd, int achievement_id, int type); +int *achievement_level(struct map_session_data *sd, bool flag); +void achievement_get_titles(uint32 char_id); +void achievement_update_objective(struct map_session_data *sd, enum e_achievement_group group, uint8 arg_count, ...); +void achievement_read_db(void); +void achievement_db_reload(void); + +void do_init_achievement(void); +void do_final_achievement(void); + +// Parser +const char *av_parse_subexpr(const char *p,int limit, struct av_condition *parent); +const char *av_parse_simpleexpr(const char *p, struct av_condition *parent); +long long achievement_check_condition(struct av_condition *condition, struct map_session_data *sd, int *count); +void achievement_script_free(struct av_condition *condition); + +#ifdef __cplusplus +} +#endif + +#endif /* MAP_ACHIEVEMENTS_H */ diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 0606430fd5..b9280b6c38 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -34,6 +34,7 @@ #include "mapreg.h" #include "quest.h" #include "pc.h" +#include "achievement.h" #include <stdlib.h> #include <math.h> @@ -1422,6 +1423,8 @@ ACMD_FUNC(baselevelup) status_calc_pc(sd, SCO_FORCE); status_percent_heal(&sd->bl, 100, 100); clif_misceffect(&sd->bl, 0); + achievement_update_objective(sd, AG_GOAL_LEVEL, 1, sd->status.base_level); + achievement_update_objective(sd, AG_GOAL_STATUS, 2, sd->status.base_level, sd->status.class_); clif_displaymessage(fd, msg_txt(sd,21)); // Base level raised. } else { if (sd->status.base_level == 1) { @@ -1483,6 +1486,7 @@ ACMD_FUNC(joblevelup) sd->status.job_level += (unsigned int)level; sd->status.skill_point += level; clif_misceffect(&sd->bl, 1); + achievement_update_objective(sd, AG_GOAL_LEVEL, 1, sd->status.job_level); clif_displaymessage(fd, msg_txt(sd,24)); // Job level raised. } else { if (sd->status.job_level == 1) { @@ -2277,6 +2281,7 @@ ACMD_FUNC(refine) clif_additem(sd, i, 1, 0); pc_equipitem(sd, i, current_position); clif_misceffect(&sd->bl, 3); + achievement_update_objective(sd, AG_REFINE_SUCCESS, 2, sd->inventory_data[i]->wlv, sd->inventory.u.items_inventory[i].refine); count++; } } @@ -3930,6 +3935,9 @@ ACMD_FUNC(reload) { } else if (strstr(command, "instancedb") || strncmp(message, "instancedb", 4) == 0) { instance_reload(); clif_displaymessage(fd, msg_txt(sd,516)); // Instance database has been reloaded. + } else if (strstr(command, "achievementdb") || strncmp(message, "achievementdb", 4) == 0) { + achievement_db_reload(); + clif_displaymessage(fd, msg_txt(sd,771)); // Achievement database has been reloaded. } return 0; @@ -10083,6 +10091,7 @@ void atcommand_basecommands(void) { ACMD_DEF2("reloadquestdb", reload), ACMD_DEF2("reloadmsgconf", reload), ACMD_DEF2("reloadinstancedb", reload), + ACMD_DEF2("reloadachievementdb",reload), ACMD_DEF(partysharelvl), ACMD_DEF(mapinfo), ACMD_DEF(dye), diff --git a/src/map/battle.c b/src/map/battle.c index 7754f85f12..0ea1cd84d4 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -8427,6 +8427,7 @@ static const struct _battle_data { { "banana_bomb_duration", &battle_config.banana_bomb_duration, 0, 0, UINT16_MAX, }, { "guild_leaderchange_delay", &battle_config.guild_leaderchange_delay, 1440, 0, INT32_MAX, }, { "guild_leaderchange_woe", &battle_config.guild_leaderchange_woe, 0, 0, 1, }, + { "feature.achievement", &battle_config.feature_achievement, 1, 0, 1, }, #include "../custom/battle_config_init.inc" }; @@ -8550,6 +8551,13 @@ void battle_adjust_conf() } #endif +#if PACKETVER < 20150513 + if (battle_config.feature_achievement) { + ShowWarning("conf/battle/feature.conf achievement is enabled but it requires PACKETVER 2015-05-13 or newer, disabling...\n"); + battle_config.feature_achievement = 0; + } +#endif + #ifndef CELL_NOSTACK if (battle_config.custom_cell_stack_limit != 1) ShowWarning("Battle setting 'custom_cell_stack_limit' takes no effect as this server was compiled without Cell Stack Limit support.\n"); diff --git a/src/map/battle.h b/src/map/battle.h index bd046a1ba6..b2ec1c5af0 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -627,6 +627,7 @@ extern struct Battle_Config int banana_bomb_duration; int guild_leaderchange_delay; int guild_leaderchange_woe; + int feature_achievement; #include "../custom/battle_config_struct.inc" } battle_config; diff --git a/src/map/chat.c b/src/map/chat.c index 3cbc904b9f..81ba0dab63 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -14,6 +14,7 @@ #include "npc.h" // npc_event_do() #include "pc.h" #include "chat.h" +#include "achievement.h" int chat_triggerevent(struct chat_data *cd); // forward declaration @@ -102,6 +103,11 @@ int chat_createpcchat(struct map_session_data* sd, const char* title, const char pc_stop_attack(sd); clif_createchat(sd,0); clif_dispchat(cd,0); + + if (status_isdead(&sd->bl)) + achievement_update_objective(sd, AG_CHAT_DYING, 1, 1); + else + achievement_update_objective(sd, AG_CHAT_CREATE, 1, 1); } else clif_createchat(sd,1); @@ -164,6 +170,9 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) chat_triggerevent(cd); //Event + if (cd->owner->type == BL_PC) + achievement_update_objective(map_id2sd(cd->owner->id), AG_CHAT_COUNT, 1, cd->users); + return 0; } diff --git a/src/map/chrif.c b/src/map/chrif.c index 1c96972fe4..2a11fa3892 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -362,6 +362,8 @@ int chrif_save(struct map_session_data *sd, int flag) { elemental_save(sd->ed); if( sd->save_quest ) intif_quest_save(sd); + if (sd->achievement_data.save) + intif_achievement_save(sd); return 0; } diff --git a/src/map/clif.c b/src/map/clif.c index 7f0c1f1d64..b8b7ae8452 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -45,6 +45,7 @@ #include "quest.h" #include "cashshop.h" #include "channel.h" +#include "achievement.h" #include <stdio.h> #include <stdlib.h> @@ -9464,7 +9465,7 @@ void clif_name( struct block_list* src, struct block_list *bl, send_target targe } #if PACKETVER >= 20150513 - WBUFL(buf,102) = 0; // Title ID + WBUFL(buf,102) = sd->status.title_id; // Title ID #endif } break; @@ -9489,7 +9490,11 @@ void clif_name( struct block_list* src, struct block_list *bl, send_target targe safestrncpy(WBUFCP(buf,6), md->name, NAME_LENGTH); if( md->guardian_data && md->guardian_data->guild_id ) { +#if PACKETVER >= 20150513 + WBUFW(buf, 0) = cmd = 0xa30; +#else WBUFW(buf, 0) = cmd = 0x195; +#endif WBUFB(buf,30) = 0; safestrncpy(WBUFCP(buf,54), md->guardian_data->guild_name, NAME_LENGTH); safestrncpy(WBUFCP(buf,78), md->guardian_data->castle->castle_name, NAME_LENGTH); @@ -9497,7 +9502,11 @@ void clif_name( struct block_list* src, struct block_list *bl, send_target targe else if( battle_config.show_mob_info ) { char mobhp[50], *str_p = mobhp; +#if PACKETVER >= 20150513 + WBUFW(buf, 0) = cmd = 0xa30; +#else WBUFW(buf, 0) = cmd = 0x195; +#endif if( battle_config.show_mob_info&4 ) str_p += sprintf(str_p, "Lv. %d | ", md->level); if( battle_config.show_mob_info&1 ) @@ -9514,6 +9523,9 @@ void clif_name( struct block_list* src, struct block_list *bl, send_target targe WBUFB(buf,78) = 0; } } +#if PACKETVER >= 20150513 + WBUFL(buf, 102) = 0; // Title ID +#endif } break; case BL_CHAT: //FIXME: Clients DO request this... what should be done about it? The chat's title may not fit... [Skotlex] @@ -10810,6 +10822,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd) // Chat logging type 'O' / Global Chat log_chat(LOG_CHAT_GLOBAL, 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, message); + //achievement_update_objective(sd, AG_CHAT, 1, sd->bl.m); //! TODO: What's the official use of this achievement type? } @@ -14431,6 +14444,8 @@ void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) safestrncpy(f_sd->status.friends[i].name, sd->status.name, NAME_LENGTH); clif_friendslist_reqack(f_sd, sd, 0); + achievement_update_objective(f_sd, AG_ADD_FRIEND, 1, i + 1); + if (battle_config.friend_auto_add) { // Also add f_sd to sd's friendlist. for (i = 0; i < MAX_FRIENDS; i++) { @@ -14448,6 +14463,8 @@ void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) sd->status.friends[i].char_id = f_sd->status.char_id; safestrncpy(sd->status.friends[i].name, f_sd->status.name, NAME_LENGTH); clif_friendslist_reqack(sd, f_sd, 0); + + achievement_update_objective(sd, AG_ADD_FRIEND, 1, i + 1); } } } @@ -18848,6 +18865,60 @@ void clif_clan_leave( struct map_session_data* sd ){ #endif } +/** + * Acknowledge the client about change title result (ZC_ACK_CHANGE_TITLE). + * 0A2F <result>.B <title_id>.L + */ +void clif_change_title_ack(struct map_session_data *sd, unsigned char result, unsigned long title_id) +{ +#if PACKETVER >= 20150513 + int fd; + + nullpo_retv(sd); + + if (!clif_session_isValid(sd)) + return; + fd = sd->fd; + + WFIFOHEAD(fd, packet_len(0xa2f)); + WFIFOW(fd, 0) = 0xa2f; + WFIFOB(fd, 2) = result; + WFIFOL(fd, 3) = title_id; + WFIFOSET(fd, packet_len(0xa2f)); +#endif +} + +/** + * Parsing a request from the client change title (CZ_REQ_CHANGE_TITLE). + * 0A2E <title_id>.L + */ +void clif_parse_change_title(int fd, struct map_session_data *sd) +{ + int title_id, i; + + nullpo_retv(sd); + + title_id = RFIFOL(fd, 2); + + if( title_id == sd->status.title_id ){ + // It is exactly the same as the old one + return; + }else if( title_id <= 0 ){ + sd->status.title_id = 0; + }else{ + ARR_FIND(0, sd->titleCount, i, sd->titles[i] == title_id); + if( i == sd->titleCount ){ + clif_change_title_ack(sd, 1, title_id); + return; + } + + sd->status.title_id = title_id; + } + + clif_name_area(&sd->bl); + clif_change_title_ack(sd, 0, title_id); +} + #ifdef DUMP_UNKNOWN_PACKET void DumpUnknown(int fd,TBL_PC *sd,int cmd,int packet_len) { @@ -19770,6 +19841,117 @@ void clif_parse_sale_remove( int fd, struct map_session_data* sd ){ #endif } +/// Achievement System +/// Author: Luxuri, Aleos + +/** + * Sends all achievement data to the client (ZC_ALL_AG_LIST). + * 0a23 <packetType>.W <packetLength>.W <ACHCount>.L <ACHPoint>.L + */ +void clif_achievement_list_all(struct map_session_data *sd) +{ + int i, j, len, fd, *info; + uint16 count = 0; + + nullpo_retv(sd); + + if (!battle_config.feature_achievement) { + clif_messagecolor(&sd->bl,color_table[COLOR_RED],msg_txt(sd,772),false,SELF); // Achievements are disabled. + return; + } + + fd = sd->fd; + count = sd->achievement_data.count; // All achievements should be sent to the client + len = (50 * count) + 22; + + if (len <= 22) + return; + + info = achievement_level(sd, true); + + WFIFOHEAD(fd,len); + WFIFOW(fd, 0) = 0xa23; + WFIFOW(fd, 2) = len; + WFIFOL(fd, 4) = count; // Amount of achievements the player has in their list (started/completed) + WFIFOL(fd, 8) = sd->achievement_data.total_score; // Top number + WFIFOW(fd, 12) = sd->achievement_data.level; // Achievement Level (gold circle) + WFIFOL(fd, 14) = info[0]; // Achievement EXP (left number in bar) + WFIFOL(fd, 18) = info[1]; // Achievement EXP TNL (right number in bar) + + for (i = 0; i < count; i++) { + WFIFOL(fd, i * 50 + 22) = (uint32)sd->achievement_data.achievements[i].achievement_id; + WFIFOB(fd, i * 50 + 26) = (uint32)sd->achievement_data.achievements[i].completed > 0; + for (j = 0; j < MAX_ACHIEVEMENT_OBJECTIVES; j++) + WFIFOL(fd, (i * 50) + 27 + (j * 4)) = (uint32)sd->achievement_data.achievements[i].count[j]; + WFIFOL(fd, i * 50 + 67) = (uint32)sd->achievement_data.achievements[i].completed; + WFIFOB(fd, i * 50 + 71) = sd->achievement_data.achievements[i].rewarded > 0; + } + WFIFOSET(fd, len); +} + +/** + * Sends a single achievement's data to the client (ZC_AG_UPDATE). + * 0a24 <packetType>.W <ACHPoint>.L + */ +void clif_achievement_update(struct map_session_data *sd, struct achievement *ach, int count) +{ + int fd, i, *info; + + nullpo_retv(sd); + + if (!battle_config.feature_achievement) { + clif_messagecolor(&sd->bl,color_table[COLOR_RED],msg_txt(sd,772),false,SELF); // Achievements are disabled. + return; + } + + fd = sd->fd; + info = achievement_level(sd, true); + + WFIFOHEAD(fd, packet_len(0xa24)); + WFIFOW(fd, 0) = 0xa24; + WFIFOL(fd, 2) = sd->achievement_data.total_score; // Total Achievement Points (top of screen) + WFIFOW(fd, 6) = sd->achievement_data.level; // Achievement Level (gold circle) + WFIFOL(fd, 8) = info[0]; // Achievement EXP (left number in bar) + WFIFOL(fd, 12) = info[1]; // Achievement EXP TNL (right number in bar) + if (ach) { + WFIFOL(fd, 16) = ach->achievement_id; // Achievement ID + WFIFOB(fd, 20) = ach->completed > 0; // Is it complete? + for (i = 0; i < MAX_ACHIEVEMENT_OBJECTIVES; i++) + WFIFOL(fd, 21 + (i * 4)) = (uint32)ach->count[i]; // 1~10 pre-reqs + WFIFOL(fd, 61) = (uint32)ach->completed; // Epoch time + WFIFOB(fd, 65) = ach->rewarded > 0; // Got reward? + } else + memset(WFIFOP(fd, 16), 0, 40); + WFIFOSET(fd, packet_len(0xa24)); +} + +/** + * Checks if an achievement reward can be rewarded (CZ_REQ_AG_REWARD). + * 0a25 <packetType>.W <achievementID>.L + */ +void clif_parse_AchievementCheckReward(int fd, struct map_session_data *sd) +{ + nullpo_retv(sd); + + if( sd->achievement_data.save ) + intif_achievement_save(sd); + + achievement_check_reward(sd, RFIFOL(fd,2)); +} + +/** + * Returns the result of achievement_check_reward (ZC_REQ_AG_REWARD_ACK). + * 0a26 <packetType>.W <result>.W <achievementID>.L + */ +void clif_achievement_reward_ack(int fd, unsigned char result, int achievement_id) +{ + WFIFOHEAD(fd, packet_len(0xa26)); + WFIFOW(fd, 0) = 0xa26; + WFIFOB(fd, 2) = result; + WFIFOL(fd, 3) = achievement_id; + WFIFOSET(fd, packet_len(0xa26)); +} + /*========================================== * Main client packet processing function *------------------------------------------*/ diff --git a/src/map/clif.h b/src/map/clif.h index 4bbd8910c2..874d871198 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -39,6 +39,7 @@ struct sale_item_data; enum mail_inbox_type; struct mail_message; enum mail_attachment_type; +struct achievement; #include <stdarg.h> enum { // packet DB @@ -1051,6 +1052,12 @@ void clif_dressing_room(struct map_session_data *sd, int flag); void clif_navigateTo(struct map_session_data *sd, const char* mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id ); void clif_SelectCart(struct map_session_data *sd); +/// Achievement System +void clif_achievement_list_all(struct map_session_data *sd); +void clif_achievement_update(struct map_session_data *sd, struct achievement *ach, int count); +void clif_pAchievementCheckReward(int fd, struct map_session_data *sd); +void clif_achievement_reward_ack(int fd, unsigned char result, int ach_id); + #ifdef __cplusplus } #endif diff --git a/src/map/clif_packetdb.h b/src/map/clif_packetdb.h index 773456b781..cdb1b6235c 100644 --- a/src/map/clif_packetdb.h +++ b/src/map/clif_packetdb.h @@ -2270,10 +2270,10 @@ // Achievement System packet(0x0A23,-1); // ZC_ALL_ACH_LIST packet(0x0A24,66); // ZC_ACH_UPDATE - parseable_packet(0x0A25,6,clif_parse_dull,0); // CZ_REQ_ACH_REWARD + parseable_packet(0x0A25,6,clif_parse_AchievementCheckReward,0); // CZ_REQ_ACH_REWARD packet(0x0A26,7); // ZC_REQ_ACH_REWARD_ACK // Title System - parseable_packet(0x0A2E,6,clif_parse_dull,0); // CZ_REQ_CHANGE_TITLE + parseable_packet(0x0A2E,6,clif_parse_change_title,0); // CZ_REQ_CHANGE_TITLE packet(0x0A2F,7); // ZC_ACK_CHANGE_TITLE packet(0x0A30,106); // ZC_ACK_REQNAMEALL2 // Pet Evolution System diff --git a/src/map/intif.c b/src/map/intif.c index ee6c524cff..2f9c934f64 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -23,6 +23,7 @@ #include "mail.h" #include "quest.h" #include "status.h" +#include "achievement.h" #include <stdlib.h> @@ -34,7 +35,7 @@ static const int packet_len_table[] = { 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830 -1, 0, 0,18, 0, 0, 0, 0, -1,75,-1,11, 11,-1, 38, 0, //0x3840 -1,-1, 7, 7, 7,11, 8,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus] itembound[Akinari] - -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish] + -1, 7,-1, 7, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish] / Achievements [Aleos] -1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil] 12,-1, 7, 3, 0, 0, 0, 0, 0, 0,-1, 9, -1, 0, 0, 0, //0x3880 Pet System, Storages -1,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] @@ -2076,6 +2077,160 @@ int intif_quest_save(struct map_session_data *sd) return 1; } +/*========================================== + * Achievement System + *------------------------------------------*/ + +/** + * Requests a character's achievement log entries to the inter server. + * @param char_id: Character ID + */ +void intif_request_achievements(uint32 char_id) +{ + if (CheckForCharServer()) + return; + + WFIFOHEAD(inter_fd, 6); + WFIFOW(inter_fd, 0) = 0x3062; + WFIFOL(inter_fd, 2) = char_id; + WFIFOSET(inter_fd, 6); +} + +/** + * Receive a character's achievements + * @param fd: char-serv link + */ +void intif_parse_achievements(int fd) +{ + uint32 char_id = RFIFOL(fd, 4), num_received = (RFIFOW(fd, 2) - 8) / sizeof(struct achievement); + struct map_session_data *sd = map_charid2sd(char_id); + + if (!sd) // User not online anymore + return; + + if (num_received == 0) { + if (sd->achievement_data.achievements) { + aFree(sd->achievement_data.achievements); + sd->achievement_data.achievements = NULL; + } + } else { + struct achievement *received = (struct achievement *)RFIFOP(fd, 8); + int i, k = num_received; + + if (sd->achievement_data.achievements) + RECREATE(sd->achievement_data.achievements, struct achievement, num_received); + else + CREATE(sd->achievement_data.achievements, struct achievement, num_received); + + for (i = 0; i < num_received; i++) { + struct achievement_db *adb = achievement_search(received[i].achievement_id); + + if (!adb) { + ShowError("intif_parse_achievementlog: Achievement %d not found in DB.\n", received[i].achievement_id); + continue; + } + + received[i].score = adb->score; + + if (received[i].completed == 0) // Insert at the beginning + memcpy(&sd->achievement_data.achievements[sd->achievement_data.incompleteCount++], &received[i], sizeof(struct achievement)); + else // Insert at the end + memcpy(&sd->achievement_data.achievements[--k], &received[i], sizeof(struct achievement)); + sd->achievement_data.count++; + } + if (sd->achievement_data.incompleteCount < k) { + // sd->achievement_data.incompleteCount and k didn't meet in the middle: some entries were skipped + if (k < num_received) // Move the entries at the end to fill the gap + memmove(&sd->achievement_data.achievements[k], &sd->achievement_data.achievements[sd->achievement_data.incompleteCount], sizeof(struct achievement) * (num_received - k)); + sd->achievement_data.achievements = (struct achievement *)aRealloc(sd->achievement_data.achievements, sizeof(struct achievement) * sd->achievement_data.count); + } + achievement_level(sd, false); // Calculate level info but don't give any AG_GOAL_ACHIEVE achievements + achievement_get_titles(sd->status.char_id); // Populate the title list for completed achievements + clif_achievement_update(sd, NULL, 0); + clif_achievement_list_all(sd); + } +} + +/** + * Parses the achievement log save ack for a character from the inter server. + * Received in reply to the requests made by intif_achievement_save. + * @see intif_parse + * @param fd : char-serv link + */ +void intif_parse_achievementsave(int fd) +{ + int cid = RFIFOL(fd, 2); + struct map_session_data *sd = map_charid2sd(cid); + + if (!sd) // User not online anymore + return; + + if (!RFIFOB(fd, 6)) + ShowError("intif_parse_achievementsave: Failed to save achievement(s) for character %s (%d)!\n", sd->status.name, cid); +} + +/** + * Requests to the inter server to save a character's achievement log entries. + * @param sd: Character's data + * @return 0 in case of success, nonzero otherwise + */ +int intif_achievement_save(struct map_session_data *sd) +{ + int len = sizeof(struct achievement) * sd->achievement_data.count + 8; + + if (CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd, len); + WFIFOW(inter_fd, 0) = 0x3063; + WFIFOW(inter_fd, 2) = len; + WFIFOL(inter_fd, 4) = sd->status.char_id; + if (sd->achievement_data.count) + memcpy(WFIFOP(inter_fd, 8), sd->achievement_data.achievements, sizeof(struct achievement) * sd->achievement_data.count); + WFIFOSET(inter_fd, len); + + sd->achievement_data.save = false; + + return 1; +} + +/** + * Parses the reply of the reward claiming for a achievement from the inter server. + * @see intif_parse + * @param fd : char-serv link + */ +void intif_parse_achievementreward(int fd){ + struct map_session_data *sd = map_charid2sd(RFIFOL(fd,2)); + + // User not online anymore + if( !sd ){ + return; + } + + achievement_get_reward(sd, RFIFOL(fd, 6), RFIFOL(fd, 10)); +} + +/** + * Request the achievement rewards from the inter server. + */ +int intif_achievement_reward(struct map_session_data *sd, struct achievement_db *adb){ + if( CheckForCharServer() ){ + return 0; + } + + WFIFOHEAD(inter_fd, 16+NAME_LENGTH+ACHIEVEMENT_NAME_LENGTH); + WFIFOW(inter_fd, 0) = 0x3064; + WFIFOL(inter_fd, 2) = sd->status.char_id; + WFIFOL(inter_fd, 6) = adb->achievement_id; + WFIFOW(inter_fd, 10) = adb->rewards.nameid; + WFIFOL(inter_fd, 12) = adb->rewards.amount; + safestrncpy(WFIFOCP(inter_fd, 16), sd->status.name, NAME_LENGTH); + safestrncpy(WFIFOCP(inter_fd, 16+NAME_LENGTH), adb->name, ACHIEVEMENT_NAME_LENGTH); + WFIFOSET(inter_fd, 16+NAME_LENGTH+ACHIEVEMENT_NAME_LENGTH); + + return 1; +} + /*========================================== * MAIL SYSTEM * By Zephyrus @@ -3601,6 +3756,11 @@ int intif_parse(int fd) case 0x3860: intif_parse_questlog(fd); break; case 0x3861: intif_parse_questsave(fd); break; + //Achievement system + case 0x3862: intif_parse_achievements(fd); break; + case 0x3863: intif_parse_achievementsave(fd); break; + case 0x3864: intif_parse_achievementreward(fd); break; + // Mercenary System case 0x3870: intif_parse_mercenary_received(fd); break; case 0x3871: intif_parse_mercenary_deleted(fd); break; diff --git a/src/map/intif.h b/src/map/intif.h index db09f1cb7c..76f2571556 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -18,6 +18,8 @@ struct s_mercenary; struct s_elemental; struct mail_message; struct auction_data; +enum storage_type; +struct achievement_db; int intif_parse(int fd); @@ -116,6 +118,10 @@ int intif_clan_requestclans(); int intif_clan_message(int clan_id,uint32 account_id,const char *mes,int len); int intif_clan_member_joined( int clan_id ); int intif_clan_member_left( int clan_id ); +// ACHIEVEMENT SYSTEM +void intif_request_achievements(uint32 char_id); +int intif_achievement_save(struct map_session_data *sd); +int intif_achievement_reward(struct map_session_data *sd, struct achievement_db *adb); int intif_request_accinfo(int u_fd, int aid, int group_lv, char* query, char type); diff --git a/src/map/map-server.vcxproj b/src/map/map-server.vcxproj index 477694b960..139b5dc7e6 100644 --- a/src/map/map-server.vcxproj +++ b/src/map/map-server.vcxproj @@ -159,6 +159,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClInclude Include="achievement.h" /> <ClInclude Include="atcommand.h" /> <ClInclude Include="battle.h" /> <ClInclude Include="battleground.h" /> @@ -204,6 +205,7 @@ <ClInclude Include="vending.h" /> </ItemGroup> <ItemGroup> + <ClCompile Include="achievement.c" /> <ClCompile Include="atcommand.c" /> <ClCompile Include="battle.c" /> <ClCompile Include="battleground.c" /> @@ -285,6 +287,7 @@ <Copy SourceFiles="$(SolutionDir)conf\msg_conf\import-tmpl\map_msg_spn_conf.txt" DestinationFolder="$(SolutionDir)conf\msg_conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\msg_conf\import\map_msg_spn_conf.txt')" /> <Copy SourceFiles="$(SolutionDir)conf\msg_conf\import-tmpl\map_msg_tha_conf.txt" DestinationFolder="$(SolutionDir)conf\msg_conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\msg_conf\import\map_msg_tha_conf.txt')" /> <Copy SourceFiles="$(SolutionDir)db\import-tmpl\abra_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\abra_db.txt')" /> + <Copy SourceFiles="$(SolutionDir)db\import-tmpl\achievement_db.yml" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\achievement_db.yml')" /> <Copy SourceFiles="$(SolutionDir)db\import-tmpl\attr_fix.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\attr_fix.txt')" /> <Copy SourceFiles="$(SolutionDir)db\import-tmpl\castle_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\castle_db.txt')" /> <Copy SourceFiles="$(SolutionDir)db\import-tmpl\create_arrow_db.txt" DestinationFolder="$(SolutionDir)db\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)db\import\create_arrow_db.txt')" /> diff --git a/src/map/map-server.vcxproj.filters b/src/map/map-server.vcxproj.filters index 2568e84f52..11f732c4b8 100644 --- a/src/map/map-server.vcxproj.filters +++ b/src/map/map-server.vcxproj.filters @@ -11,6 +11,9 @@ </Filter> </ItemGroup> <ItemGroup> + <ClInclude Include="achievement.h"> + <Filter>Header Files</Filter> + </ClInclude> <ClInclude Include="atcommand.h"> <Filter>Header Files</Filter> </ClInclude> @@ -142,6 +145,9 @@ </ClInclude> </ItemGroup> <ItemGroup> + <ClCompile Include="achievement.c"> + <Filter>Source Files</Filter> + </ClCompile> <ClCompile Include="atcommand.c"> <Filter>Source Files</Filter> </ClCompile> diff --git a/src/map/map.cpp b/src/map/map.cpp index 710e0f56cc..f8a73aa4a4 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -38,6 +38,7 @@ #include "elemental.h" #include "cashshop.h" #include "channel.h" +#include "achievement.h" #include <stdlib.h> #include <math.h> @@ -4385,6 +4386,7 @@ void do_final(void) do_final_clif(); do_final_npc(); do_final_quest(); + do_final_achievement(); do_final_script(); do_final_instance(); do_final_itemdb(); @@ -4739,6 +4741,7 @@ int do_init(int argc, char *argv[]) do_init_mercenary(); do_init_elemental(); do_init_quest(); + do_init_achievement(); do_init_npc(); do_init_unit(); do_init_battleground(); @@ -4758,10 +4761,6 @@ int do_init(int argc, char *argv[]) shutdown_callback = do_shutdown; runflag = MAPSERVER_ST_RUNNING; } -#if defined(BUILDBOT) - if( buildbotflag ) - exit(EXIT_FAILURE); -#endif if( console ){ //start listening add_timer_func_list(parse_console_timer, "parse_console_timer"); diff --git a/src/map/mob.c b/src/map/mob.c index 86e1cecdd2..639cd28553 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -24,6 +24,7 @@ #include "elemental.h" #include "party.h" #include "quest.h" +#include "achievement.h" #include <stdlib.h> #include <math.h> @@ -2905,6 +2906,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) else if (sd->avail_quests) quest_update_objective(sd, md->mob_id); + if (achievement_mobexists(md->mob_id)) + achievement_update_objective(sd, AG_BATTLE, 1, md->mob_id); + if (sd->md && src && src->type == BL_MER && mob_db(md->mob_id)->lv > sd->status.base_level / 2) mercenary_kills(sd->md); } diff --git a/src/map/party.c b/src/map/party.c index 9159ec3495..bc6c4f94a6 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -18,6 +18,7 @@ #include "intif.h" #include "mapreg.h" #include "trade.h" +#include "achievement.h" #include <stdlib.h> @@ -175,6 +176,8 @@ void party_created(uint32 account_id,uint32 char_id,int fail,int party_id,char * sd->status.party_id = party_id; clif_party_created(sd,0); // Success message + achievement_update_objective(sd, AG_PARTY, 1, 1); + // We don't do any further work here because the char-server sends a party info packet right after creating the party if(party_create_byscript) { // returns party id in $@party_create_id if party is created by script mapreg_setreg(add_str("$@party_create_id"),party_id); diff --git a/src/map/pc.c b/src/map/pc.c index e71f535c78..97a4e74998 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -34,6 +34,7 @@ #include "party.h" // party_search() #include "storage.h" #include "quest.h" +#include "achievement.h" #include <stdlib.h> #include <math.h> @@ -948,6 +949,10 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, pc_skill(p1_sd, WE_CALLBABY, 1, ADDSKILL_PERMANENT); pc_skill(p2_sd, WE_CALLBABY, 1, ADDSKILL_PERMANENT); + achievement_update_objective(b_sd, AG_BABY, 1, 1); + achievement_update_objective(p1_sd, AG_BABY, 1, 2); + achievement_update_objective(p2_sd, AG_BABY, 1, 2); + return true; } @@ -1454,6 +1459,17 @@ void pc_reg_received(struct map_session_data *sd) intif_Mail_requestinbox(sd->status.char_id, 0, MAIL_INBOX_NORMAL); // MAIL SYSTEM - Request Mail Inbox intif_request_questlog(sd); + if (battle_config.feature_achievement) { + sd->achievement_data.total_score = 0; + sd->achievement_data.level = 0; + sd->achievement_data.save = false; + sd->achievement_data.sendlist = false; + sd->achievement_data.count = 0; + sd->achievement_data.incompleteCount = 0; + sd->achievement_data.achievements = NULL; + intif_request_achievements(sd->status.char_id); + } + if (sd->state.connect_new == 0 && sd->fd) { //Character already loaded map! Gotta trigger LoadEndAck manually. sd->state.connect_new = 1; clif_parse_LoadEndAck(sd->fd, sd); @@ -4311,6 +4327,8 @@ char pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type type clif_messagecolor(&sd->bl, color_table[COLOR_LIGHT_GREEN], output, false, SELF); } + achievement_update_objective(sd, AG_GET_ZENY, 1, sd->status.zeny); + return 0; } @@ -4554,6 +4572,8 @@ char pc_additem(struct map_session_data *sd,struct item *item,int amount,e_log_p } } + achievement_update_objective(sd, AG_GET_ITEM, 1, id->value_sell); + return ADDITEM_SUCCESS; } @@ -6463,6 +6483,8 @@ int pc_checkbaselevelup(struct map_session_data *sd) { party_send_levelup(sd); pc_baselevelchanged(sd); + achievement_update_objective(sd, AG_GOAL_LEVEL, 1, sd->status.base_level); + achievement_update_objective(sd, AG_GOAL_STATUS, 2, sd->status.base_level, sd->status.class_); return 1; } @@ -6510,6 +6532,7 @@ int pc_checkjoblevelup(struct map_session_data *sd) clif_status_change(&sd->bl,SI_DEVIL, 1, 0, 0, 0, 1); //Permanent blind effect from SG_DEVIL. npc_script_event(sd, NPCE_JOBLVUP); + achievement_update_objective(sd, AG_GOAL_LEVEL, 1, sd->status.job_level); return 1; } @@ -6963,6 +6986,8 @@ bool pc_statusup(struct map_session_data* sd, int type, int increase) if( final_value > 255 ) clif_updatestatus(sd, type); // send after the 'ack' to override the truncated value + achievement_update_objective(sd, AG_GOAL_STATUS, 1, final_value); + return true; } @@ -8610,6 +8635,7 @@ bool pc_jobchange(struct map_session_data *sd,int job, char upper) pc_checkallowskill(sd); pc_equiplookall(sd); pc_show_questinfo(sd); + achievement_update_objective(sd, AG_JOB_CHANGE, 2, sd->status.base_level, job); if( sd->status.party_id ){ struct party_data* p; @@ -10161,6 +10187,10 @@ bool pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd) return false; sd->status.partner_id = dstsd->status.char_id; dstsd->status.partner_id = sd->status.char_id; + + achievement_update_objective(sd, AG_MARRY, 1, 1); + achievement_update_objective(dstsd, AG_MARRY, 1, 1); + return true; } diff --git a/src/map/pc.h b/src/map/pc.h index 7e72a76b9e..43153b49d7 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -603,6 +603,21 @@ struct map_session_data { struct quest *quest_log; ///< Quest log entries (note: Q_COMPLETE quests follow the first <avail_quests>th enties bool save_quest; ///< Whether the quest_log entries were modified and are waitin to be saved + // Achievement log system + struct s_achievement_data { + int total_score; ///< Total achievement points + int level; ///< Achievement level + bool save; ///< Flag to know if achievements need to be saved + bool sendlist; ///< Flag to know if all achievements should be sent to the player (refresh list if an achievement has a title) + uint16 count; ///< Total achievements in log + uint16 incompleteCount; ///< Total incomplete achievements in log + struct achievement *achievements; ///< Achievement log entries + } achievement_data; + + // Title system + int *titles; + uint8 titleCount; + /* ShowEvent Data Cache flags from map */ bool *qi_display; unsigned short qi_count; diff --git a/src/map/pet.c b/src/map/pet.c index d9205518a0..a07805b392 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -15,6 +15,7 @@ #include "intif.h" #include "chrif.h" #include "pet.h" +#include "achievement.h" #include <stdlib.h> @@ -672,6 +673,7 @@ int pet_catch_process2(struct map_session_data* sd, int target_id) pet_catch_rate = (pet_catch_rate*battle_config.pet_catch_rate)/100; if(rnd()%10000 < pet_catch_rate) { + achievement_update_objective(sd, AG_TAMING, 1, md->mob_id); unit_remove_map(&md->bl,CLR_OUTSIGHT); status_kill(&md->bl); clif_pet_roulette(sd,1); diff --git a/src/map/script.c b/src/map/script.c index 4340d7efdf..98223e58ff 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -50,6 +50,7 @@ #include "quest.h" #include "elemental.h" #include "channel.h" +#include "achievement.h" #include <math.h> #include <stdlib.h> // atoi, strtol, strtoll, exit @@ -2293,6 +2294,20 @@ static void add_buildin_func(void) } } +/// Retrieves the value of a constant parameter. +bool script_get_parameter(const char* name, int* value) +{ + int n = search_str(name); + + if (n == -1 || str_data[n].type != C_PARAM) + {// not found or not a parameter + return false; + } + value[0] = str_data[n].val; + + return true; +} + /// Retrieves the value of a constant. bool script_get_constant(const char* name, int* value) { @@ -8918,6 +8933,7 @@ BUILDIN_FUNC(successrefitem) { clif_additem(sd,i,1,0); pc_equipitem(sd,i,ep); clif_misceffect(&sd->bl,3); + achievement_update_objective(sd, AG_REFINE_SUCCESS, 2, sd->inventory_data[i]->wlv, sd->inventory.u.items_inventory[i].refine); if (sd->inventory.u.items_inventory[i].refine == MAX_REFINE && sd->inventory.u.items_inventory[i].card[0] == CARD0_FORGE && sd->status.char_id == (int)MakeDWord(sd->inventory.u.items_inventory[i].card[2],sd->inventory.u.items_inventory[i].card[3])) @@ -8967,6 +8983,7 @@ BUILDIN_FUNC(failedrefitem) { clif_refine(sd->fd,1,i,sd->inventory.u.items_inventory[i].refine); //notify client of failure pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); clif_misceffect(&sd->bl,2); // display failure effect + achievement_update_objective(sd, AG_REFINE_FAIL, 1, 1); script_pushint(st, 1); return SCRIPT_CMD_SUCCESS; } @@ -9015,6 +9032,7 @@ BUILDIN_FUNC(downrefitem) { clif_additem(sd,i,1,0); pc_equipitem(sd,i,ep); clif_misceffect(&sd->bl,2); + achievement_update_objective(sd, AG_REFINE_FAIL, 1, sd->inventory.u.items_inventory[i].refine); script_pushint(st, sd->inventory.u.items_inventory[i].refine); return SCRIPT_CMD_SUCCESS; } @@ -23226,6 +23244,127 @@ BUILDIN_FUNC(unloadnpc) { return SCRIPT_CMD_SUCCESS; } +/** + * Add an achievement to the player's log + * achievementadd(<achievement ID>{,<char ID>}); + */ +BUILDIN_FUNC(achievementadd) { + struct map_session_data *sd; + int achievement_id = script_getnum(st, 2); + + if (!script_charid2sd(3, sd)) { + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + if (achievement_search(achievement_id) == &achievement_dummy) { + ShowWarning("buildin_achievementadd: Achievement '%d' doesn't exist.\n", achievement_id); + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + if (achievement_add(sd, achievement_id)) + script_pushint(st, true); + else + script_pushint(st, false); + return SCRIPT_CMD_SUCCESS; +} + +/** + * Removes an achievement on a player. + * achievementremove(<achievement ID>{,<char ID>}); + * Just for Atemo. ;) + */ +BUILDIN_FUNC(achievementremove) { + struct map_session_data *sd; + int achievement_id = script_getnum(st, 2); + + if (!script_charid2sd(3, sd)) { + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + if (achievement_search(achievement_id) == &achievement_dummy) { + ShowWarning("buildin_achievementremove: Achievement '%d' doesn't exist.\n", achievement_id); + script_pushint(st, false); + return SCRIPT_CMD_SUCCESS; + } + + if (achievement_remove(sd, achievement_id)) + script_pushint(st, true); + else + script_pushint(st, false); + return SCRIPT_CMD_SUCCESS; +} + +/** + * Returns achievement progress + * achievementinfo(<achievement ID>,<type>{,<char ID>}); + */ +BUILDIN_FUNC(achievementinfo) { + struct map_session_data *sd; + int achievement_id = script_getnum(st, 2); + + if (!script_charid2sd(4, sd)) { + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + script_pushint(st, achievement_check_progress(sd, achievement_id, script_getnum(st, 3))); + return SCRIPT_CMD_SUCCESS; +} + +/** + * Award an achievement; Ignores requirements + * achievementcomplete(<achievement ID>{,<char ID>}); + */ +BUILDIN_FUNC(achievementcomplete) { + struct map_session_data *sd; + int i, achievement_id = script_getnum(st, 2); + + if (!script_charid2sd(3, sd)) { + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + if (achievement_search(achievement_id) == &achievement_dummy) { + ShowWarning("buildin_achievementcomplete: Achievement '%d' doesn't exist.\n", achievement_id); + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + if (i == sd->achievement_data.count) + achievement_add(sd, achievement_id); + achievement_update_achievement(sd, achievement_id, true); + script_pushint(st, true); + return SCRIPT_CMD_SUCCESS; +} + +/** + * Checks if the achievement exists on player. + * achievementexists(<achievement ID>{,<char ID>}); + */ +BUILDIN_FUNC(achievementexists) { + struct map_session_data *sd; + int i, achievement_id = script_getnum(st, 2); + + if (!script_charid2sd(3, sd)) { + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + if (achievement_search(achievement_id) == &achievement_dummy) { + ShowWarning("buildin_achievementexists: Achievement '%d' doesn't exist.\n", achievement_id); + script_pushint(st, false); + return SCRIPT_CMD_SUCCESS; + } + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + script_pushint(st, i < sd->achievement_data.count ? true : false); + return SCRIPT_CMD_SUCCESS; +} + #include "../custom/script.inc" // declarations that were supposed to be exported from npc_chat.c @@ -23857,6 +23996,13 @@ struct script_function buildin_func[] = { BUILDIN_DEF2(delitem2,"delitem3","viiiiiiiirrr?"), BUILDIN_DEF2(countitem,"countitem3","viiiiiiirrr?"), + // Achievement System + BUILDIN_DEF(achievementinfo,"ii?"), + BUILDIN_DEF(achievementadd,"i?"), + BUILDIN_DEF(achievementremove,"i?"), + BUILDIN_DEF(achievementcomplete,"i?"), + BUILDIN_DEF(achievementexists,"i?"), + #include "../custom/script_def.inc" {NULL,NULL,NULL}, diff --git a/src/map/script.h b/src/map/script.h index 12ac404c4c..b47f00587b 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -717,6 +717,7 @@ const char* skip_space(const char* p); void script_error(const char* src, const char* file, int start_line, const char* error_msg, const char* error_pos); void script_warning(const char* src, const char* file, int start_line, const char* error_msg, const char* error_pos); +bool is_number(const char *p); struct script_code* parse_script(const char* src,const char* file,int line,int options); void run_script(struct script_code *rootscript,int pos,int rid,int oid); @@ -740,6 +741,7 @@ struct DBMap* script_get_label_db(void); struct DBMap* script_get_userfunc_db(void); void script_run_autobonus(const char *autobonus, struct map_session_data *sd, unsigned int pos); +bool script_get_parameter(const char* name, int* value); bool script_get_constant(const char* name, int* value); void script_set_constant(const char* name, int value, bool isparameter, bool deprecated); void script_hardcoded_constants(void); diff --git a/src/map/script_constants.h b/src/map/script_constants.h index e74786e024..cf2cf5396d 100644 --- a/src/map/script_constants.h +++ b/src/map/script_constants.h @@ -3822,6 +3822,49 @@ export_constant(USW_FORCE_STOP); export_constant(USW_ALL); + /* achievement groups */ + export_constant2("AG_ADD_FRIEND", AG_ADD_FRIEND); + export_constant2("AG_ADVENTURE", AG_ADVENTURE); + export_constant2("AG_BABY", AG_BABY); + export_constant2("AG_BATTLE", AG_BATTLE); + export_constant2("AG_CHATTING", AG_CHAT); + export_constant2("AG_CHATTING_COUNT", AG_CHAT_COUNT); + export_constant2("AG_CHATTING_CREATE", AG_CHAT_CREATE); + export_constant2("AG_CHATTING_DYING", AG_CHAT_DYING); + export_constant2("AG_EAT", AG_EAT); + export_constant2("AG_GET_ITEM", AG_GET_ITEM); + export_constant2("AG_GET_ZENY", AG_GET_ZENY); + export_constant2("AG_GOAL_ACHIEVE", AG_GOAL_ACHIEVE); + export_constant2("AG_GOAL_LEVEL", AG_GOAL_LEVEL); + export_constant2("AG_GOAL_STATUS", AG_GOAL_STATUS); + export_constant2("AG_HEAR", AG_HEAR); + export_constant2("AG_JOB_CHANGE", AG_JOB_CHANGE); + export_constant2("AG_MARRY", AG_MARRY); + export_constant2("AG_PARTY", AG_PARTY); + export_constant2("AG_ENCHANT_FAIL", AG_REFINE_FAIL); + export_constant2("AG_ENCHANT_SUCCESS", AG_REFINE_SUCCESS); + export_constant2("AG_SEE", AG_SEE); + export_constant2("AG_SPEND_ZENY", AG_SPEND_ZENY); + export_constant2("AG_TAMING", AG_TAMING); + + /* achievement info */ + export_constant(ACHIEVEINFO_COUNT1); + export_constant(ACHIEVEINFO_COUNT2); + export_constant(ACHIEVEINFO_COUNT3); + export_constant(ACHIEVEINFO_COUNT4); + export_constant(ACHIEVEINFO_COUNT5); + export_constant(ACHIEVEINFO_COUNT6); + export_constant(ACHIEVEINFO_COUNT7); + export_constant(ACHIEVEINFO_COUNT8); + export_constant(ACHIEVEINFO_COUNT9); + export_constant(ACHIEVEINFO_COUNT10); + export_constant(ACHIEVEINFO_COMPLETE); + export_constant(ACHIEVEINFO_COMPLETEDATE); + export_constant(ACHIEVEINFO_GOTREWARD); + export_constant(ACHIEVEINFO_LEVEL); + export_constant(ACHIEVEINFO_SCORE); + export_constant(ACHIEVEINFO_MAX); + #undef export_constant #undef export_constant2 #undef export_parameter diff --git a/src/map/skill.c b/src/map/skill.c index dece786049..9656e5788c 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -34,6 +34,7 @@ #include "guild.h" #include "date.h" #include "unit.h" +#include "achievement.h" #include <stdio.h> #include <stdlib.h> @@ -16725,6 +16726,7 @@ void skill_weaponrefine(struct map_session_data *sd, int idx) clif_upgrademessage(sd->fd, 0, item->nameid); clif_inventorylist(sd); clif_refine(sd->fd,0,idx,item->refine); + achievement_update_objective(sd, AG_REFINE_SUCCESS, 2, ditem->wlv, item->refine); if (ep) pc_equipitem(sd,idx,ep); clif_misceffect(&sd->bl,3); @@ -16750,6 +16752,7 @@ void skill_weaponrefine(struct map_session_data *sd, int idx) pc_unequipitem(sd,idx,3); clif_upgrademessage(sd->fd, 1, item->nameid); clif_refine(sd->fd,1,idx,item->refine); + achievement_update_objective(sd, AG_REFINE_FAIL, 1, 1); pc_delitem(sd,idx,1,0,2, LOG_TYPE_OTHER); clif_misceffect(&sd->bl,2); clif_emotion(&sd->bl, E_OMG); diff --git a/src/map/unit.c b/src/map/unit.c index 1ac34bb3d0..c6694f6567 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -9,6 +9,7 @@ #include "../common/random.h" #include "../common/socket.h" +#include "achievement.h" #include "map.h" #include "path.h" #include "pc.h" @@ -3228,6 +3229,9 @@ int unit_free(struct block_list *bl, clr_type clrtype) } #endif + if (sd->achievement_data.achievements) + achievement_free(sd); + // Clearing... if (sd->bonus_script.head) pc_bonus_script_clear(sd, BSF_REM_ALL); diff --git a/src/map/vending.c b/src/map/vending.c index 54b1713d89..6cf5589b11 100755 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -13,6 +13,7 @@ #include "vending.h" #include "pc.h" #include "buyingstore.h" // struct s_autotrade_entry, struct s_autotrader +#include "achievement.h" #include <stdlib.h> // atoi @@ -191,6 +192,7 @@ void vending_purchasereq(struct map_session_data* sd, int aid, int uid, const ui } pc_payzeny(sd, (int)z, LOG_TYPE_VENDING, vsd); + achievement_update_objective(sd, AG_SPEND_ZENY, 1, (int)z); if( battle_config.vending_tax ) z -= z * (battle_config.vending_tax/10000.); pc_getzeny(vsd, (int)z, LOG_TYPE_VENDING, sd); From d113d24bce4a24fd9ec40a3c1c3fa435ff68bd71 Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Thu, 27 Jul 2017 15:33:12 +0200 Subject: [PATCH 038/124] SQL synchronization --- sql-files/item_db_re.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index bc7483ae3d..c00662158b 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -11110,7 +11110,7 @@ REPLACE INTO `item_db_re` VALUES (22870,'Christmas_Package','Christmas Package', REPLACE INTO `item_db_re` VALUES (22873,'Sealed_Beelzebub_Scroll_II','Sealed Beelzebub Scroll II',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getitem callfunc("F_Rand",22875,6238,6239,6228,6232,24231,24232,17474,6635),1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22874,'Sealed_Beelzebub_Card_Album','Sealed Beelzebub Card Album',2,10,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'/*No Info*/',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22875,'Sealed_Beelzebub_Card','Sealed Beelzebub Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bVariableCastrate,-15; /*Item removed on 2014-12-17*/',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (22876,'Old_Money_Pocket','Old Money Pocket',3,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22876,'Old_Money_Pocket','Old Money Pocket',3,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Zeny += rand(500,550);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22881,'Rope_Gallows','Rope Gallows',2,10,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'/*Used to catch a Lost Sheep*/',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22882,'Chocolate_Rice_Cake_Soup','Chocolate Rice Cake Soup',2,10,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'percentheal 10,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22883,'September_Gift_Box_','September Gift Box',2,10,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'/*2 Lucky Eggs*/',NULL,NULL); From 77718c325f770767b34d0146e70c0cefe17e806d Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Thu, 27 Jul 2017 15:42:29 +0200 Subject: [PATCH 039/124] Fixed weapon level of Tempest Fixes #2287 Thanks to @ToiletMaster --- db/re/item_db.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index c989981f2d..f659479c0f 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -7296,8 +7296,8 @@ 13195,RAG203_,RAG203,5,1800000,,1300,260,,9,0,0x40000000,63,2,34,3,140,1,18,{ bonus bHit,10; bonus bCriticalRate,15; bonus4 bAutoSpell,"AL_DECAGI",1,10,1; },{},{} 13196,Peace_Breaker_,Peace Breaker,5,1950000,,1400,250,,9,1,0x41000000,63,2,34,3,140,1,20,{ bonus bHit,-25; bonus bAspdRate,25; },{},{} 13197,Mini_Mei,Mini Mei,5,1600000,,2500,220,,9,2,0x41000000,63,2,34,2,106,1,19,{},{},{} -13198,Tempest_,Tempest,5,2200000,,2500,250,,9,0,0x41000000,63,2,34,2,140,1,19,{ bonus bHit,-25; bonus bCritical,10; bonus bLongAtkRate,20; },{},{} -13199,Tempest,Tempest,5,2200000,,2500,250,,9,1,0x41000000,63,2,34,2,140,1,19,{ bonus bHit,-25; bonus bCritical,10; bonus bLongAtkRate,20; },{},{} +13198,Tempest_,Tempest,5,2200000,,2500,250,,9,0,0x41000000,63,2,34,4,140,1,19,{ bonus bHit,-25; bonus bCritical,10; bonus bLongAtkRate,20; },{},{} +13199,Tempest,Tempest,5,2200000,,2500,250,,9,1,0x41000000,63,2,34,4,140,1,19,{ bonus bHit,-25; bonus bCritical,10; bonus bLongAtkRate,20; },{},{} //=================================================================== // Bullets //=================================================================== From 51ef5595af9d56ca007e8797edbdbd7957a7f070 Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Thu, 27 Jul 2017 15:43:09 +0200 Subject: [PATCH 040/124] SQL synchronization --- sql-files/item_db_re.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index c00662158b..26f78e7ec4 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -7328,8 +7328,8 @@ REPLACE INTO `item_db_re` VALUES (13194,'Peace_Breaker','Peace Breaker',5,195000 REPLACE INTO `item_db_re` VALUES (13195,'RAG203_','RAG203',5,1800000,NULL,1300,'260',NULL,9,0,0x40000000,63,2,34,3,'140',1,18,'bonus bHit,10; bonus bCriticalRate,15; bonus4 bAutoSpell,"AL_DECAGI",1,10,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (13196,'Peace_Breaker_','Peace Breaker',5,1950000,NULL,1400,'250',NULL,9,1,0x41000000,63,2,34,3,'140',1,20,'bonus bHit,-25; bonus bAspdRate,25;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (13197,'Mini_Mei','Mini Mei',5,1600000,NULL,2500,'220',NULL,9,2,0x41000000,63,2,34,2,'106',1,19,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (13198,'Tempest_','Tempest',5,2200000,NULL,2500,'250',NULL,9,0,0x41000000,63,2,34,2,'140',1,19,'bonus bHit,-25; bonus bCritical,10; bonus bLongAtkRate,20;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (13199,'Tempest','Tempest',5,2200000,NULL,2500,'250',NULL,9,1,0x41000000,63,2,34,2,'140',1,19,'bonus bHit,-25; bonus bCritical,10; bonus bLongAtkRate,20;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (13198,'Tempest_','Tempest',5,2200000,NULL,2500,'250',NULL,9,0,0x41000000,63,2,34,4,'140',1,19,'bonus bHit,-25; bonus bCritical,10; bonus bLongAtkRate,20;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (13199,'Tempest','Tempest',5,2200000,NULL,2500,'250',NULL,9,1,0x41000000,63,2,34,4,'140',1,19,'bonus bHit,-25; bonus bCritical,10; bonus bLongAtkRate,20;',NULL,NULL); #=================================================================== # Bullets #=================================================================== From 1bfd28ee67020ac1e6cda400f5b247d1417b4fd6 Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Thu, 27 Jul 2017 12:40:50 -0400 Subject: [PATCH 041/124] Corrected some new shield defines * Fixes #2292. * Fixed Scutum, Shield of Flame, Shield of Gust, Shield of Water, and Shield of Earth resolving as weapons. Thanks to @uddevil and @Lemongrass3110! --- db/re/item_db.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index f659479c0f..064faaee4a 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -11544,13 +11544,13 @@ 28900,Guardsmen's_Shield,Guardsmen's Shield,4,20,,3000,,30,,1,0xFFFFFFFF,63,2,32,,100,1,1,{ .@r = getrefine(); skill "LG_SHIELDSPELL",1; bonus3 bAutoSpellWhenHit,"HP_ASSUMPTIO",3,(10+(.@r*10)); bonus bDef,(.@r*10); bonus bMdef,.@r; },{},{} 28901,Cursed_Mad_Bunny,Cursed Mad Bunny,4,20,,100,,0,,0,0xFFFFFFFF,63,2,32,,1,1,1,{ bonus bAspd,3; bonus2 bAddRace,RC_All,5; bonus2 bMagicAddRace,RC_All,5; bonus bShortWeaponDamageReturn,10; autobonus2 "{ bonus bMagicDamageReturn,60; }",10,2000,BF_MAGIC,"{ specialeffect2 EF_WIND; }"; .@r = getrefine(); if(.@r>=7) { bonus bBaseAtk,5; bonus bMatk,5; } if(.@r>=9) { bonus bBaseAtk,15; bonus bMatk,15; } if(.@r>=12) { bonus bCritical,10; bonus bNoCastCancel,0; } },{},{} 28902,Mad_Bunny_,Mad Bunny,4,20,,100,,0,,1,0xFFFFFFFF,63,2,32,,1,1,1,{ bonus2 bAddRace,RC_All,5; bonus2 bMagicAddRace,RC_All,5; bonus bShortWeaponDamageReturn,10; autobonus2 "{ bonus bMagicDamageReturn,60; }",10,2000,BF_MAGIC,"{ specialeffect2 EF_WIND; }"; .@r = getrefine(); if(.@r>=7) { bonus bBaseAtk,5; bonus bMatk,5; } if(.@r>=9) { bonus bBaseAtk,15; bonus bMatk,15; } if(.@r>=12) { bonus bCritical,10; bonus bNoCastCancel,0; } },{},{} -28903,Scutum,Scutum,4,0,,500,,1,,1,0xFFFFFFFF,63,2,32,1,1,1,,{ .@r = getrefine(); bonus bFlee,5+(.@r*3); bonus bFlee2,1+(.@r*2); if (.@r > 10) { bonus bMaxHPrate,10; bonus bMaxSPrate,10; } },{},{} +28903,Scutum,Scutum,4,0,,500,,1,,1,0xFFFFFFFF,63,2,32,,1,1,1,{ .@r = getrefine(); bonus bFlee,5+(.@r*3); bonus bFlee2,1+(.@r*2); if (.@r > 10) { bonus bMaxHPrate,10; bonus bMaxSPrate,10; } },{},{} 28904,Unity_Guard,Unity Guard,4,20,,300,,60,,1,0xFFFFFFFF,63,2,32,,100,1,1,{ if(BaseLevel<100) { bonus bDef,12*getrefine(); } },{},{} 28905,Unity_Buckler,Unity Buckler,4,20,,300,,60,,1,0xFFFFFFFF,63,2,32,,100,1,1,{ if(BaseLevel<100) { bonus bMaxSPrate,2*getrefine(); } },{},{} -28906,Shield_Of_Flame,Shield Of Flame,4,0,,500,,80,,1,0xFFFFFFFF,63,2,32,1,90,1,,{ bonus2 bSubEle,Ele_Fire,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); } },{},{} -28907,Shield_Of_Gust,Shield Of Gust,4,0,,500,,80,,1,0xFFFFFFFF,63,2,32,1,90,1,,{ bonus2 bSubEle,Ele_Wind,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); } },{},{} -28908,Shield_Of_Water,Shield Of Water,4,0,,500,,80,,1,0xFFFFFFFF,63,2,32,1,90,1,,{ bonus2 bSubEle,Ele_Water,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); } },{},{} -28909,Shield_Of_Earth,Shield Of Earth,4,0,,500,,80,,1,0xFFFFFFFF,63,2,32,1,90,1,,{ bonus2 bSubEle,Ele_Earth,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); } },{},{} +28906,Shield_Of_Flame,Shield Of Flame,4,0,,500,,80,,1,0xFFFFFFFF,63,2,32,,90,1,1,{ bonus2 bSubEle,Ele_Fire,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); } },{},{} +28907,Shield_Of_Gust,Shield Of Gust,4,0,,500,,80,,1,0xFFFFFFFF,63,2,32,,90,1,1,{ bonus2 bSubEle,Ele_Wind,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); } },{},{} +28908,Shield_Of_Water,Shield Of Water,4,0,,500,,80,,1,0xFFFFFFFF,63,2,32,,90,1,1,{ bonus2 bSubEle,Ele_Water,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); } },{},{} +28909,Shield_Of_Earth,Shield Of Earth,4,0,,500,,80,,1,0xFFFFFFFF,63,2,32,,90,1,1,{ bonus2 bSubEle,Ele_Earth,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); } },{},{} 28910,Rectangular_Large_Sleeve,Rectangular Large Sleeve,4,20,,800,,80,,1,0xFFFFFFFF,63,2,32,,100,1,1,{ bonus bLongAtkDef,5; .@r = getrefine(); if(.@r>=5) { bonus bLongAtkDef,5; } if(.@r>=7) { bonus bLongAtkDef,10; } if(.@r>=9) { bonus bLongAtkDef,15; } },{},{} 28913,Ultralight_Magic_Shield,Ultralight Magic Shield,4,20,,100,,50,,1,0xFFFFFFFF,63,2,32,,100,1,1,{ bonus bAspdRate,5; bonus2 bIgnoreDefClassRate,Class_Normal,10; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); if(.@r>=7) { bonus2 bIgnoreDefClassRate,Class_Normal,2; bonus bAspdRate,2; } if(.@r>=9) { bonus2 bIgnoreDefClassRate,Class_Normal,3; bonus bAspdRate,3; } },{},{} 28915,Bunker_Shield,Bunker Shield,4,20,,3500,,90,,1,0xFFFFFFFF,63,2,32,,50,1,1,{ bonus2 bAddRace,RC_All,4; bonus bAspdRate,5; .@r = getrefine(); if(.@r>=5) { bonus2 bAddRace,RC_All,.@r; } },{},{} From 77e8d5157076e923e99917b96cf63ddb07b4e0b9 Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Thu, 27 Jul 2017 18:41:06 +0200 Subject: [PATCH 042/124] SQL synchronization --- sql-files/item_db_re.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 26f78e7ec4..33cf04ab8e 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -11576,13 +11576,13 @@ REPLACE INTO `item_db_re` VALUES (28706,'Dagger_of_Vicious_Mind','Dagger of Vici REPLACE INTO `item_db_re` VALUES (28900,'Guardsmen\'s_Shield','Guardsmen\'s Shield',4,20,NULL,3000,NULL,30,NULL,1,0xFFFFFFFF,63,2,32,NULL,'100',1,1,'.@r = getrefine(); skill "LG_SHIELDSPELL",1; bonus3 bAutoSpellWhenHit,"HP_ASSUMPTIO",3,(10+(.@r*10)); bonus bDef,(.@r*10); bonus bMdef,.@r;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28901,'Cursed_Mad_Bunny','Cursed Mad Bunny',4,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,32,NULL,'1',1,1,'bonus bAspd,3; bonus2 bAddRace,RC_All,5; bonus2 bMagicAddRace,RC_All,5; bonus bShortWeaponDamageReturn,10; autobonus2 "{ bonus bMagicDamageReturn,60; }",10,2000,BF_MAGIC,"{ specialeffect2 EF_WIND; }"; .@r = getrefine(); if(.@r>=7) { bonus bBaseAtk,5; bonus bMatk,5; } if(.@r>=9) { bonus bBaseAtk,15; bonus bMatk,15; } if(.@r>=12) { bonus bCritical,10; bonus bNoCastCancel,0; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28902,'Mad_Bunny_','Mad Bunny',4,20,NULL,100,NULL,0,NULL,1,0xFFFFFFFF,63,2,32,NULL,'1',1,1,'bonus2 bAddRace,RC_All,5; bonus2 bMagicAddRace,RC_All,5; bonus bShortWeaponDamageReturn,10; autobonus2 "{ bonus bMagicDamageReturn,60; }",10,2000,BF_MAGIC,"{ specialeffect2 EF_WIND; }"; .@r = getrefine(); if(.@r>=7) { bonus bBaseAtk,5; bonus bMatk,5; } if(.@r>=9) { bonus bBaseAtk,15; bonus bMatk,15; } if(.@r>=12) { bonus bCritical,10; bonus bNoCastCancel,0; }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28903,'Scutum','Scutum',4,0,NULL,500,NULL,1,NULL,1,0xFFFFFFFF,63,2,32,1,'1',1,NULL,'.@r = getrefine(); bonus bFlee,5+(.@r*3); bonus bFlee2,1+(.@r*2); if (.@r > 10) { bonus bMaxHPrate,10; bonus bMaxSPrate,10; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28903,'Scutum','Scutum',4,0,NULL,500,NULL,1,NULL,1,0xFFFFFFFF,63,2,32,NULL,'1',1,1,'.@r = getrefine(); bonus bFlee,5+(.@r*3); bonus bFlee2,1+(.@r*2); if (.@r > 10) { bonus bMaxHPrate,10; bonus bMaxSPrate,10; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28904,'Unity_Guard','Unity Guard',4,20,NULL,300,NULL,60,NULL,1,0xFFFFFFFF,63,2,32,NULL,'100',1,1,'if(BaseLevel<100) { bonus bDef,12*getrefine(); }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28905,'Unity_Buckler','Unity Buckler',4,20,NULL,300,NULL,60,NULL,1,0xFFFFFFFF,63,2,32,NULL,'100',1,1,'if(BaseLevel<100) { bonus bMaxSPrate,2*getrefine(); }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28906,'Shield_Of_Flame','Shield Of Flame',4,0,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,1,'90',1,NULL,'bonus2 bSubEle,Ele_Fire,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28907,'Shield_Of_Gust','Shield Of Gust',4,0,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,1,'90',1,NULL,'bonus2 bSubEle,Ele_Wind,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28908,'Shield_Of_Water','Shield Of Water',4,0,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,1,'90',1,NULL,'bonus2 bSubEle,Ele_Water,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28909,'Shield_Of_Earth','Shield Of Earth',4,0,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,1,'90',1,NULL,'bonus2 bSubEle,Ele_Earth,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28906,'Shield_Of_Flame','Shield Of Flame',4,0,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'90',1,1,'bonus2 bSubEle,Ele_Fire,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28907,'Shield_Of_Gust','Shield Of Gust',4,0,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'90',1,1,'bonus2 bSubEle,Ele_Wind,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28908,'Shield_Of_Water','Shield Of Water',4,0,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'90',1,1,'bonus2 bSubEle,Ele_Water,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28909,'Shield_Of_Earth','Shield Of Earth',4,0,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'90',1,1,'bonus2 bSubEle,Ele_Earth,25; .@r = getrefine(); if(.@r > 4) { bonus bAspd,1+((.@r > 6) ? 1 : 0); }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28910,'Rectangular_Large_Sleeve','Rectangular Large Sleeve',4,20,NULL,800,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'100',1,1,'bonus bLongAtkDef,5; .@r = getrefine(); if(.@r>=5) { bonus bLongAtkDef,5; } if(.@r>=7) { bonus bLongAtkDef,10; } if(.@r>=9) { bonus bLongAtkDef,15; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28913,'Ultralight_Magic_Shield','Ultralight Magic Shield',4,20,NULL,100,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,NULL,'100',1,1,'bonus bAspdRate,5; bonus2 bIgnoreDefClassRate,Class_Normal,10; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); if(.@r>=7) { bonus2 bIgnoreDefClassRate,Class_Normal,2; bonus bAspdRate,2; } if(.@r>=9) { bonus2 bIgnoreDefClassRate,Class_Normal,3; bonus bAspdRate,3; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28915,'Bunker_Shield','Bunker Shield',4,20,NULL,3500,NULL,90,NULL,1,0xFFFFFFFF,63,2,32,NULL,'50',1,1,'bonus2 bAddRace,RC_All,4; bonus bAspdRate,5; .@r = getrefine(); if(.@r>=5) { bonus2 bAddRace,RC_All,.@r; }',NULL,NULL); From 3a556135375759a9952ed1c73013f739e473a5c2 Mon Sep 17 00:00:00 2001 From: Vincent Stumpf <vincents.995@gmail.com> Date: Thu, 27 Jul 2017 10:23:25 -0700 Subject: [PATCH 043/124] Allows families to share exp (#2280) * Fixes #2265 * Family is Mother + Child, Father + Child, or Mother + Father + Child Thanks to @vstumpf! --- src/char/int_party.c | 58 +++++++++++++++++++++++++++++++++++--------- src/map/pc.c | 4 +++ 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/src/char/int_party.c b/src/char/int_party.c index 6a61b2990a..7a1147205e 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -31,6 +31,7 @@ int party_check_empty(struct party_data *p); int mapif_parse_PartyLeave(int fd, int party_id, uint32 account_id, uint32 char_id, char *name, enum e_party_member_withdraw type); int party_check_exp_share(struct party_data *p); int mapif_party_optionchanged(int fd,struct party *p, uint32 account_id, int flag); +int party_check_family_share(struct party_data *p); //Updates party's level range and unsets even share if broken. static int int_party_check_lv(struct party_data *p) { @@ -40,9 +41,9 @@ static int int_party_check_lv(struct party_data *p) { p->max_lv = 0; for(i=0;i<MAX_PARTY;i++){ /** - * - If not online OR if it's a family party and this is the child (doesn't affect exp range) + * - If not online (doesn't affect exp range) **/ - if(!p->party.member[i].online || p->party.member[i].char_id == p->family ) + if (!p->party.member[i].online) continue; lv=p->party.member[i].lv; @@ -69,7 +70,8 @@ static void int_party_calc_state(struct party_data *p) //Check party size for(i=0;i<MAX_PARTY;i++){ - if (!p->party.member[i].lv) continue; + if (!p->party.member[i].lv) + continue; p->size++; if(p->party.member[i].online) p->party.count++; @@ -91,11 +93,9 @@ static void int_party_calc_state(struct party_data *p) //max/min levels. for(i=0;i<MAX_PARTY;i++){ unsigned int lv=p->party.member[i].lv; - if (!lv) continue; - if(p->party.member[i].online && - //On families, the kid is not counted towards exp share rules. - p->party.member[i].char_id != p->family) - { + if (!lv) + continue; + if (p->party.member[i].online) { if( lv < p->min_lv ) p->min_lv=lv; if( p->max_lv < lv ) p->max_lv=lv; } @@ -301,10 +301,45 @@ struct party_data* search_partyname(char* str) return p; } +int party_check_family_share(struct party_data *p) { + int i; + unsigned short map = 0; + if (!p->family) + return 0; + for (i = 0; i < MAX_PARTY; i++) { + if (p->party.member[i].char_id == p->family) { + map = p->party.member[i].map; + break; + } + } + + for (i = 0; i < MAX_PARTY; i++) { + struct party_member * mem = &(p->party.member[i]); + if (mem->lv == 0) + continue; + if (p->family == mem->char_id) { + continue; + } + if (mem->online == 0) { + //everyone should be online to share + return 0; + } + if (mem->map != map) { + //everyone should be on the same map + return 0; + } + if (mem->lv < 70) { + //parents must both be above 70 + return 0; + } + } + return 1; +} + // Returns whether this party can keep having exp share or not. int party_check_exp_share(struct party_data *p) { - return (p->party.count < 2 || p->max_lv - p->min_lv <= party_share_level); + return (p->party.count < 2 || p->max_lv - p->min_lv <= party_share_level || party_check_family_share(p)); } // Is there any member in the party? @@ -521,7 +556,6 @@ static void mapif_parse_PartyInfo(int fd, int party_id, uint32 char_id) { struct party_data *p; p = inter_party_fromsql(party_id); - if (p) mapif_party_info(fd, &p->party, char_id); else @@ -575,7 +609,8 @@ int mapif_parse_PartyChangeOption(int fd,int party_id,uint32 account_id,int exp, if(!p) return 0; - + if (p->size == 2 || p->size == 3) //check family state. Also accept either of their parents. + int_party_calc_state(p); p->party.exp=exp; if( exp && !party_check_exp_share(p) ){ flag|=0x01; @@ -692,6 +727,7 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, uint32 account_id, uint32 c if (p->party.member[i].map != map) { p->party.member[i].map = map; mapif_party_membermoved(&p->party, i); + int_party_check_lv(p); } return 0; } diff --git a/src/map/pc.c b/src/map/pc.c index 97a4e74998..2ef5476187 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -949,6 +949,10 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, pc_skill(p1_sd, WE_CALLBABY, 1, ADDSKILL_PERMANENT); pc_skill(p2_sd, WE_CALLBABY, 1, ADDSKILL_PERMANENT); + chrif_save(p1_sd, CSAVE_NORMAL); + chrif_save(p2_sd, CSAVE_NORMAL); + chrif_save(b_sd, CSAVE_NORMAL); + achievement_update_objective(b_sd, AG_BABY, 1, 1); achievement_update_objective(p1_sd, AG_BABY, 1, 2); achievement_update_objective(p2_sd, AG_BABY, 1, 2); From 02135c4e2e1c72b65b8dd06b0c64ce0aa5b2eb9a Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Thu, 27 Jul 2017 21:52:43 +0200 Subject: [PATCH 044/124] Added support for RODEX 2017 (#2290) --- src/map/clif.c | 71 +++++++++++++++++++++++++++++++++++------ src/map/clif_packetdb.h | 6 ++++ 2 files changed, 67 insertions(+), 10 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index b8b7ae8452..6b99f71d36 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -14993,6 +14993,8 @@ void clif_Mail_window(int fd, int flag) /// { <mail id>.Q <read>.B <type>.B <sender>.24B <received>.L <expires>.L <title length>.W <title>.?B }* /// 0a7d <packet len>.W <type>.B <amount>.B <last page>.B (ZC_ACK_MAIL_LIST2) /// { <mail id>.Q <read>.B <type>.B <sender>.24B <received>.L <expires>.L <title length>.W <title>.?B }* +/// 0ac2 <packet len>.W <unknown>.B (ZC_ACK_MAIL_LIST3) +/// { <type>.B <mail id>.Q <read>.B <type>.B <sender>.24B <expires>.L <title length>.W <title>.?B }* void clif_Mail_refreshinbox(struct map_session_data *sd,enum mail_inbox_type type,int64 mailID){ #if PACKETVER < 20150513 int fd = sd->fd; @@ -15033,7 +15035,9 @@ void clif_Mail_refreshinbox(struct map_session_data *sd,enum mail_inbox_type typ int i, j, k, offset, titleLength; uint8 mailType, amount, remaining; uint32 now = (uint32)time(NULL); -#if PACKETVER >= 20160601 +#if PACKETVER >= 20170419 + int cmd = 0xac2; +#elif PACKETVER >= 20160601 int cmd = 0xa7d; #else int cmd = 0x9f0; @@ -15043,6 +15047,10 @@ void clif_Mail_refreshinbox(struct map_session_data *sd,enum mail_inbox_type typ mail_refresh_remaining_amount(sd); } +#if PACKETVER >= 20170419 + // Always send all + i = md->amount; +#else // If a starting mail id was sent if( mailID != 0 ){ ARR_FIND( 0, md->amount, i, md->msg[i].id == mailID ); @@ -15063,44 +15071,65 @@ void clif_Mail_refreshinbox(struct map_session_data *sd,enum mail_inbox_type typ }else{ i = md->amount; } +#endif // Count the remaining mails from the starting mail or the beginning - // Only count mails of the target type and those that should not have been deleted already + // Only count mails of the target type(before 2017-04-19) and those that should not have been deleted already for( j = i, remaining = 0; j >= 0; j-- ){ msg = &md->msg[j]; if (msg->id < 1) continue; +#if PACKETVER < 20170419 if (msg->type != type) continue; +#endif if (msg->scheduled_deletion > 0 && msg->scheduled_deletion <= now) continue; remaining++; } +#if PACKETVER >= 20170419 + // Always send all + amount = remaining; +#else if( remaining > MAIL_PAGE_SIZE ){ amount = MAIL_PAGE_SIZE; }else{ amount = remaining; } +#endif WFIFOHEAD(fd, 7 + ((44 + MAIL_TITLE_LENGTH) * amount)); WFIFOW(fd, 0) = cmd; +#if PACKETVER >= 20170419 + WFIFOB(fd, 4) = 1; // Unknown + offset = 5; +#else WFIFOB(fd, 4) = type; WFIFOB(fd, 5) = amount; WFIFOB(fd, 6) = ( remaining < MAIL_PAGE_SIZE ); // last page + offset = 7; +#endif - for( offset = 7, amount = 0; i >= 0; i-- ){ + for( amount = 0; i >= 0; i-- ){ msg = &md->msg[i]; if (msg->id < 1) continue; +#if PACKETVER < 20170419 if (msg->type != type) continue; +#endif if (msg->scheduled_deletion > 0 && msg->scheduled_deletion <= now) continue; +#if PACKETVER >= 20170419 + WFIFOB(fd, offset) = msg->type; + offset += 1; +#endif + WFIFOQ(fd, offset + 0) = (uint64)msg->id; WFIFOB(fd, offset + 8) = (msg->status != MAIL_UNREAD); @@ -15123,22 +15152,25 @@ void clif_Mail_refreshinbox(struct map_session_data *sd,enum mail_inbox_type typ WFIFOB(fd, offset + 9) = mailType; safestrncpy(WFIFOCP(fd, offset + 10), msg->send_name, NAME_LENGTH); +#if PACKETVER < 20170419 // How much time has passed since you received the mail WFIFOL(fd, offset + 34 ) = now - (uint32)msg->timestamp; + offset += 4; +#endif // If automatic return/deletion of mails is enabled, notify the client when it will kick in if( msg->scheduled_deletion > 0 ){ - WFIFOL(fd, offset + 38) = (uint32)msg->scheduled_deletion - now; + WFIFOL(fd, offset + 34) = (uint32)msg->scheduled_deletion - now; }else{ // Fake the scheduled deletion to one year in the future // Sadly the client always displays the scheduled deletion after 24 hours no matter how high this value gets [Lemongrass] - WFIFOL(fd, offset + 38) = 365 * 24 * 60 * 60; + WFIFOL(fd, offset + 34) = 365 * 24 * 60 * 60; } - WFIFOW(fd, offset + 42) = titleLength = (int16)(strlen(msg->title) + 1); - safestrncpy(WFIFOCP(fd, offset + 44), msg->title, titleLength); + WFIFOW(fd, offset + 38) = titleLength = (int16)(strlen(msg->title) + 1); + safestrncpy(WFIFOCP(fd, offset + 40), msg->title, titleLength); - offset += 44 + titleLength; + offset += 40 + titleLength; } WFIFOW(fd, 2) = (int16)offset; WFIFOSET(fd, offset); @@ -15150,6 +15182,8 @@ void clif_Mail_refreshinbox(struct map_session_data *sd,enum mail_inbox_type typ /// 09e8 <mail tab>.B <mail id>.Q (CZ_OPEN_MAILBOX) /// 09ee <mail tab>.B <mail id>.Q (CZ_REQ_NEXT_MAIL_LIST) /// 09ef <mail tab>.B <mail id>.Q (CZ_REQ_REFRESH_MAIL_LIST) +/// 0ac0 <mail id>.Q <unknown>.16B (CZ_OPEN_MAILBOX2) +/// 0ac1 <mail id>.Q <unknown>.16B (CZ_REQ_REFRESH_MAIL_LIST2) void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd){ #if PACKETVER < 20150513 struct mail_data* md = &sd->mail.inbox; @@ -15162,8 +15196,25 @@ void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd){ mail_removeitem(sd, 0, sd->mail.item[0].index, sd->mail.item[0].amount); mail_removezeny(sd, false); #else + int cmd = RFIFOW(fd, 0); +#if PACKETVER < 20170419 uint8 openType = RFIFOB(fd, 2); uint64 mailId = RFIFOQ(fd, 3); +#else + uint8 openType; + uint64 mailId = RFIFOQ(fd, 2); + int i; + + ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mailId); + + if( i == MAIL_MAX_INBOX ){ + openType = MAIL_INBOX_NORMAL; + mailId = 0; + }else{ + openType = sd->mail.inbox.msg[i].type; + mailId = 0; + } +#endif switch( openType ){ case MAIL_INBOX_NORMAL: @@ -15175,13 +15226,13 @@ void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd){ return; } - if( sd->mail.changed || RFIFOW(fd,0) == 0x9ef ){ + if( sd->mail.changed || ( cmd == 0x9ef || cmd == 0xac1 ) ){ intif_Mail_requestinbox(sd->status.char_id, 1, openType); return; } // If it is not a next page request - if( RFIFOW(fd,0) != 0x9ee ){ + if( cmd != 0x9ee ){ mailId = 0; } diff --git a/src/map/clif_packetdb.h b/src/map/clif_packetdb.h index cdb1b6235c..c5b1603fae 100644 --- a/src/map/clif_packetdb.h +++ b/src/map/clif_packetdb.h @@ -2323,6 +2323,12 @@ packet(0x0AA5,-1); #endif +// 2017-04-19bRagexeRE +#if PACKETVER >= 20170419 + parseable_packet(0x0AC0,26,clif_parse_Mail_refreshinbox,2,10); + parseable_packet(0x0AC1,26,clif_parse_Mail_refreshinbox,2,10); +#endif + // 2017-05-02dRagexeRE #if PACKETVER >= 20170502 packet(0x0A43,85); From b21f7c0a1fdb68fdc655ab5922a5f4c4339671a4 Mon Sep 17 00:00:00 2001 From: f0und3r <f0und3r@users.noreply.github.com> Date: Thu, 27 Jul 2017 23:18:52 +0300 Subject: [PATCH 045/124] Config for guild alliance only by master (#2291) Added a new configuration to allow to restrict alliance requests to the guild master. Thanks to @f0und3r --- conf/battle/guild.conf | 4 ++++ src/map/battle.c | 1 + src/map/battle.h | 1 + src/map/guild.c | 6 ++++++ 4 files changed, 12 insertions(+) diff --git a/conf/battle/guild.conf b/conf/battle/guild.conf index 2ef751b68e..9a89b03d5b 100644 --- a/conf/battle/guild.conf +++ b/conf/battle/guild.conf @@ -70,3 +70,7 @@ guild_leaderchange_delay: 1440 // Is changing the guild leader allowed during WoE? // Default: no guild_leaderchange_woe: no + +// Only guild master can accept alliance? +// Default: no +guild_alliance_onlygm: no diff --git a/src/map/battle.c b/src/map/battle.c index 0ea1cd84d4..f38a38230d 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -8427,6 +8427,7 @@ static const struct _battle_data { { "banana_bomb_duration", &battle_config.banana_bomb_duration, 0, 0, UINT16_MAX, }, { "guild_leaderchange_delay", &battle_config.guild_leaderchange_delay, 1440, 0, INT32_MAX, }, { "guild_leaderchange_woe", &battle_config.guild_leaderchange_woe, 0, 0, 1, }, + { "guild_alliance_onlygm", &battle_config.guild_alliance_onlygm, 0, 0, 1, }, { "feature.achievement", &battle_config.feature_achievement, 1, 0, 1, }, #include "../custom/battle_config_init.inc" diff --git a/src/map/battle.h b/src/map/battle.h index b2ec1c5af0..fabbd8edd2 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -627,6 +627,7 @@ extern struct Battle_Config int banana_bomb_duration; int guild_leaderchange_delay; int guild_leaderchange_woe; + int guild_alliance_onlygm; int feature_achievement; #include "../custom/battle_config_struct.inc" diff --git a/src/map/guild.c b/src/map/guild.c index 2efc3e60a2..2f4705385f 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1434,6 +1434,12 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd) if(tsd==NULL || tsd->status.guild_id<=0) return 0; + // Check, is tsd guild master, if not - cancel alliance. [f0und3r] + if (battle_config.guild_alliance_onlygm && !tsd->state.gmaster_flag) { + clif_guild_allianceack(sd, 5); + return 0; + } + g[0]=sd->guild; g[1]=tsd->guild; From 3f8ff5a3fbbe39d90af74d3363615db7b27d1b6f Mon Sep 17 00:00:00 2001 From: Jeybla <jey@toto-ro.de> Date: Thu, 27 Jul 2017 22:45:21 +0200 Subject: [PATCH 046/124] Fixes Item Combos in same equip index. (#2080) Fixes #1710 Thanks to @esu1214 --- src/map/pc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/map/pc.c b/src/map/pc.c index 2ef5476187..03f3ebe6ad 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9442,6 +9442,7 @@ static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { for( i = 0; i < data->combos_count; i++ ) { struct itemchk { int idx; + unsigned short nameid; short card[MAX_SLOTS]; } *combo_idx; int idx, j; @@ -9462,6 +9463,7 @@ static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { CREATE(combo_idx,struct itemchk,nb_itemCombo); for(j=0; j < nb_itemCombo; j++){ combo_idx[j].idx=-1; + combo_idx[j].nameid=-1; memset(combo_idx[j].card,-1,MAX_SLOTS); } @@ -9485,11 +9487,12 @@ static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { bool do_continue = false; //used to continue that specific loop with some check that also use some loop uint8 z; for (z = 0; z < nb_itemCombo-1; z++) - if(combo_idx[z].idx == index) //we already have that index recorded + if(combo_idx[z].idx == index && combo_idx[z].nameid == id) //we already have that index recorded do_continue=true; if(do_continue) continue; } + combo_idx[j].nameid = id; combo_idx[j].idx = index; pos |= sd->inventory.u.items_inventory[index].equip; found = true; @@ -9505,7 +9508,7 @@ static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { if(j>0){ int c1, c2; for (c1 = 0; c1 < nb_itemCombo-1; c1++){ - if(combo_idx[c1].idx == index){ + if(combo_idx[c1].idx == index && combo_idx[c1].nameid == id){ for (c2 = 0; c2 < sd->inventory_data[index]->slot; c2++){ if(combo_idx[c1].card[c2] == id){ //we already have that card recorded (at this same idx) do_continue = true; @@ -9517,6 +9520,7 @@ static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { } if(do_continue) continue; + combo_idx[j].nameid = id; combo_idx[j].idx = index; combo_idx[j].card[z] = id; pos |= sd->inventory.u.items_inventory[index].equip; From f0a07d6d8027005370ee179e9541dee9ddb70b8a Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Thu, 27 Jul 2017 23:07:05 +0200 Subject: [PATCH 047/124] Respecting enchants in combos Follow up to 3f8ff5a Thanks to @esu1214 --- src/map/pc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/map/pc.c b/src/map/pc.c index 03f3ebe6ad..7421eac76d 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9497,11 +9497,11 @@ static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { pos |= sd->inventory.u.items_inventory[index].equip; found = true; break; - } else { //Cards + } else { //Cards and enchants uint16 z; - if ( sd->inventory_data[index]->slot == 0 || itemdb_isspecial(sd->inventory.u.items_inventory[index].card[0]) ) + if ( itemdb_isspecial(sd->inventory.u.items_inventory[index].card[0]) ) continue; - for (z = 0; z < sd->inventory_data[index]->slot; z++) { + for (z = 0; z < MAX_SLOTS; z++) { bool do_continue=false; if (sd->inventory.u.items_inventory[index].card[z] != id) continue; @@ -9509,7 +9509,7 @@ static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { int c1, c2; for (c1 = 0; c1 < nb_itemCombo-1; c1++){ if(combo_idx[c1].idx == index && combo_idx[c1].nameid == id){ - for (c2 = 0; c2 < sd->inventory_data[index]->slot; c2++){ + for (c2 = 0; c2 < MAX_SLOTS; c2++){ if(combo_idx[c1].card[c2] == id){ //we already have that card recorded (at this same idx) do_continue = true; break; From a5e18f1250ff7f5ccc7219fa3c85fb4762c0442a Mon Sep 17 00:00:00 2001 From: aleos <aleos89@users.noreply.github.com> Date: Thu, 27 Jul 2017 19:03:01 -0400 Subject: [PATCH 048/124] Allow negative Equipment Attack * Fixes #2191. * In renewal Equipment Attack can become negative and is not capped to 0. Thanks to @jezznar and @reigneil! --- src/map/pc.c | 3 ++- src/map/status.c | 2 +- src/map/status.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/map/pc.c b/src/map/pc.c index 7421eac76d..4414299c88 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2504,7 +2504,8 @@ void pc_bonus(struct map_session_data *sd,int type,int val) case SP_BASE_ATK: if(sd->state.lr_flag != 2) { #ifdef RENEWAL - sd->bonus.eatk += val; + bonus = sd->bonus.eatk + val; + sd->bonus.eatk = cap_value(bonus, SHRT_MIN, SHRT_MAX); #else bonus = status->batk + val; status->batk = cap_value(bonus, 0, USHRT_MAX); diff --git a/src/map/status.c b/src/map/status.c index a487ac0c78..4e56eb84f1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3782,7 +3782,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) #else base_status->watk = status_weapon_atk(base_status->rhw, sd); base_status->watk2 = status_weapon_atk(base_status->lhw, sd); - base_status->eatk = max(sd->bonus.eatk,0); + base_status->eatk = sd->bonus.eatk; #endif // ----- HP MAX CALCULATION ----- diff --git a/src/map/status.h b/src/map/status.h index 0d2fb0a19f..bab74f9602 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -2096,13 +2096,13 @@ struct status_data { hp, sp, // see status_cpy before adding members before hp and sp max_hp, max_sp; short - str, agi, vit, int_, dex, luk; + str, agi, vit, int_, dex, luk, + eatk; unsigned short batk, #ifdef RENEWAL watk, watk2, - eatk, #endif matk_min, matk_max, speed, From fdbdcb266e630d55592769e171b82265d699f439 Mon Sep 17 00:00:00 2001 From: aleos <aleos89@users.noreply.github.com> Date: Thu, 27 Jul 2017 19:54:04 -0400 Subject: [PATCH 049/124] Renamed the Achievement SQL upgrade file * Renamed the Achievement SQL upgrade file date to match the release date. Thanks to @sikiro! --- sql-files/upgrades/{upgrade_20170407.sql => upgrade_20170727.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql-files/upgrades/{upgrade_20170407.sql => upgrade_20170727.sql} (100%) diff --git a/sql-files/upgrades/upgrade_20170407.sql b/sql-files/upgrades/upgrade_20170727.sql similarity index 100% rename from sql-files/upgrades/upgrade_20170407.sql rename to sql-files/upgrades/upgrade_20170727.sql From 1e63f892d9b7a6fc82acf2dfc67c3eff92d26d72 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 28 Jul 2017 15:09:55 +0200 Subject: [PATCH 050/124] Fixed release mode building of map-server Related to #2294 Thanks to @keitenai and @admkakaroto --- 3rdparty/yaml-cpp/yaml-cpp.vcxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/3rdparty/yaml-cpp/yaml-cpp.vcxproj b/3rdparty/yaml-cpp/yaml-cpp.vcxproj index fdf9f0ea1c..82af58f26c 100644 --- a/3rdparty/yaml-cpp/yaml-cpp.vcxproj +++ b/3rdparty/yaml-cpp/yaml-cpp.vcxproj @@ -96,7 +96,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <InlineFunctionExpansion>Disabled</InlineFunctionExpansion> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\;$(SolutionDir)3rdparty\yaml-cpp\src\;</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> </ClCompile> </ItemDefinitionGroup> @@ -108,7 +108,7 @@ </SDLCheck> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\;$(SolutionDir)3rdparty\yaml-cpp\src\;</AdditionalIncludeDirectories> <InlineFunctionExpansion>Disabled</InlineFunctionExpansion> - <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> </ClCompile> </ItemDefinitionGroup> @@ -121,7 +121,7 @@ <SDLCheck> </SDLCheck> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\;$(SolutionDir)3rdparty\yaml-cpp\src\;</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> </ClCompile> <Link> @@ -138,7 +138,7 @@ <SDLCheck> </SDLCheck> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\;$(SolutionDir)3rdparty\yaml-cpp\src\;</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> </ClCompile> <Link> From d7c7d58d5ddbb0b06d8eb357b0b2a021eaa0be65 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 28 Jul 2017 17:43:01 +0200 Subject: [PATCH 051/124] Fixed some compilation warnings in release mode Fixes #2219 Thanks to @keitenai, @CairoLee and @kukuasir1 --- src/map/intif.c | 4 ++-- src/map/pc.c | 6 ++++++ src/map/pc.h | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/map/intif.c b/src/map/intif.c index 2f9c934f64..5f0e3da387 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1370,7 +1370,7 @@ void intif_parse_Registers(int fd) } // have it not complain about insertion of vars before loading, and not set those vars as new or modified - reg_load = true; + pc_set_reg_load(true); if( RFIFOW(fd, 14) ) { char key[32]; @@ -1420,7 +1420,7 @@ void intif_parse_Registers(int fd) } } - reg_load = false; + pc_set_reg_load(false); if (flag && sd->vars_received&PRL_ACCG && sd->vars_received&PRL_ACCL && sd->vars_received&PRL_CHAR) pc_reg_received(sd); //Received all registry values, execute init scripts and what-not. [Skotlex] diff --git a/src/map/pc.c b/src/map/pc.c index 4414299c88..a3b11df20a 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -67,6 +67,8 @@ struct fame_list taekwon_fame_list[MAX_FAME_LIST]; #define MOTD_LINE_SIZE 128 static char motd_text[MOTD_LINE_SIZE][CHAT_SIZE_MAX]; // Message of the day buffer [Valaris] +bool reg_load; + /** * Translation table from athena equip index to aegis bitmask */ @@ -101,6 +103,10 @@ const struct sg_data sg_info[MAX_PC_FEELHATE] = { { SG_STAR_ANGER, SG_STAR_BLESS, SG_STAR_COMFORT, "PC_FEEL_STAR", "PC_HATE_MOB_STAR", is_day_of_star } }; +void pc_set_reg_load( bool val ){ + reg_load = val; +} + /** * Item Cool Down Delay Saving * Struct item_cd is not a member of struct map_session_data diff --git a/src/map/pc.h b/src/map/pc.h index 43153b49d7..892872a4b3 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -746,8 +746,6 @@ extern struct eri *pc_itemgrouphealrate_ers; /// Player's Item Group Heal Rate t **/ struct eri *num_reg_ers; struct eri *str_reg_ers; -/* */ -bool reg_load; /* Global Expiration Timer ID */ extern int pc_expiration_tid; @@ -986,6 +984,7 @@ short pc_maxaspd(struct map_session_data *sd); ) #endif +void pc_set_reg_load(bool val); int pc_split_atoi(char* str, int* val, char sep, int max); int pc_class2idx(int class_); int pc_get_group_level(struct map_session_data *sd); From 000786d9913e07530bcee922c9ae3816c3283c70 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 28 Jul 2017 17:50:51 +0200 Subject: [PATCH 052/124] Fixed some RODEX related compile warnings Fixes #2286 Thanks to @Valorro --- src/map/intif.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/map/intif.c b/src/map/intif.c index 5f0e3da387..18ec4d1401 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -2409,7 +2409,6 @@ int intif_parse_Mail_delete(int fd) uint32 char_id = RFIFOL(fd,2); int mail_id = RFIFOL(fd,6); bool failed = RFIFOB(fd,10); - enum mail_inbox_type type; struct map_session_data *sd = map_charid2sd(char_id); if (sd == NULL) @@ -2424,14 +2423,14 @@ int intif_parse_Mail_delete(int fd) ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id); if( i < MAIL_MAX_INBOX ) { + enum mail_inbox_type type = sd->mail.inbox.msg[i].type; clif_mail_delete(sd, &sd->mail.inbox.msg[i], !failed); - type = sd->mail.inbox.msg[i].type; memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message)); sd->mail.inbox.amount--; - } - if( sd->mail.inbox.full || sd->mail.inbox.unchecked > 0 ) - intif_Mail_requestinbox(sd->status.char_id, 1, type); // Free space is available for new mails + if( sd->mail.inbox.full || sd->mail.inbox.unchecked > 0 ) + intif_Mail_requestinbox(sd->status.char_id, 1, type); // Free space is available for new mails + } } return 1; @@ -2471,7 +2470,6 @@ int intif_parse_Mail_return(int fd) struct map_session_data *sd = map_charid2sd(RFIFOL(fd,2)); int mail_id = RFIFOL(fd,6); short fail = RFIFOB(fd,10); - enum mail_inbox_type type; if( sd == NULL ) { @@ -2485,13 +2483,13 @@ int intif_parse_Mail_return(int fd) ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id); if( i < MAIL_MAX_INBOX ) { - type = sd->mail.inbox.msg[i].type; + enum mail_inbox_type type = sd->mail.inbox.msg[i].type; memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message)); sd->mail.inbox.amount--; - } - if( sd->mail.inbox.full ) - intif_Mail_requestinbox(sd->status.char_id, 1, type); // Free space is available for new mails + if( sd->mail.inbox.full ) + intif_Mail_requestinbox(sd->status.char_id, 1, type); // Free space is available for new mails + } } clif_Mail_return(sd->fd, mail_id, fail); From dfbd6f6cc4c07de240a126c58462f941d35a6e18 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 28 Jul 2017 21:24:14 +0200 Subject: [PATCH 053/124] Fixed item selection dialog Fixes #2293 This was broken in 95!!! different client versions A real big thank you to @admkakaroto --- src/map/clif.c | 4 +- src/map/clif_shuffle.h | 190 ++++++++++++++++++++--------------------- 2 files changed, 96 insertions(+), 98 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index 6b99f71d36..4cb18fea1f 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17306,9 +17306,7 @@ void clif_parse_LessEffect(int fd, struct map_session_data* sd){ sd->state.lesseffect = ( isLess != 0 ); } -/// S 07e4 <length>.w <option>.l <val>.l {<index>.w <amount>.w).4b* (CZ_ITEMLISTWIN_RES) -/// S 0945 <length>.w <option>.l <val>.l {<index>.w <amount>.w).4b* (CZ_* RagexeRE 2012-04-10a) -/// S 0281 <length>.w <option>.l <val>.l {<index>.w <amount>.w).4b* (CZ_* Ragexe 2013-08-07) +/// 07e4 <length>.w <option>.l <val>.l {<index>.w <amount>.w).4b* (CZ_ITEMLISTWIN_RES) void clif_parse_ItemListWindowSelected(int fd, struct map_session_data* sd) { struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int n = (RFIFOW(fd,info->pos[0])-12) / 4; diff --git a/src/map/clif_shuffle.h b/src/map/clif_shuffle.h index a3e7f57003..fdae878953 100644 --- a/src/map/clif_shuffle.h +++ b/src/map/clif_shuffle.h @@ -379,7 +379,7 @@ // 2014-10-16Ragexe #elif PACKETVER == 20141016 parseable_packet(0x022D,8,clif_parse_MoveFromKafra,2,4); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035F,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -440,7 +440,7 @@ parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2015-01-07aRagexeRE #elif PACKETVER == 20150107 - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -471,7 +471,7 @@ parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2015-01-14aRagexe #elif PACKETVER == 20150114 - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -516,7 +516,7 @@ parseable_packet(0x0875,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); parseable_packet(0x0876,5,clif_parse_HomMenu,2,4); parseable_packet(0x087d,6,clif_parse_SolveCharName,2); - parseable_packet(0x0888,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0888,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x089a,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x08ab,6,clif_parse_TakeItem,2); parseable_packet(0x091f,6,clif_parse_TickSend,2); @@ -536,7 +536,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -582,7 +582,7 @@ parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x0867,18,clif_parse_PartyBookingRegisterReq,2,4); //parseable_packet(0x0885,4,NULL,0); // CZ_GANGSI_RANK - parseable_packet(0x0896,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0896,-1,clif_parse_ItemListWindowSelected,2,4,8,12); //parseable_packet(0x089b,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x089c,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x08a4,36,clif_parse_StoragePassword,0); @@ -604,7 +604,7 @@ parseable_packet(0x086a,6,clif_parse_GetCharNameRequest,2); parseable_packet(0x086c,36,clif_parse_StoragePassword,0); parseable_packet(0x087b,18,clif_parse_PartyBookingRegisterReq,2,4); - parseable_packet(0x0883,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0883,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0886,5,clif_parse_WalkToXY,2); parseable_packet(0x0888,2,clif_parse_SearchStoreInfoNextPage,0); parseable_packet(0x0896,7,clif_parse_ActionRequest,2,6); @@ -652,7 +652,7 @@ parseable_packet(0x0940,26,clif_parse_FriendsListAdd,2); parseable_packet(0x0947,2,clif_parse_ReqCloseBuyingStore,0); parseable_packet(0x094a,19,clif_parse_WantToConnection,2,6,10,14,18); - parseable_packet(0x0950,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0950,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0954,6,clif_parse_TickSend,2); parseable_packet(0x0969,8,clif_parse_MoveFromKafra,2,4); // 2015-04-01aRagexe @@ -663,7 +663,7 @@ parseable_packet(0x083c,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); parseable_packet(0x085e,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x086f,5,clif_parse_WalkToXY,2); - parseable_packet(0x0875,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0875,-1,clif_parse_ItemListWindowSelected,2,4,8,12); //parseable_packet(0x087e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x088c,6,clif_parse_DropItem,2,4); parseable_packet(0x088f,6,clif_parse_TickSend,2); @@ -691,7 +691,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -740,7 +740,7 @@ parseable_packet(0x088f,5,clif_parse_HomMenu,2,4); parseable_packet(0x0894,6,clif_parse_DropItem,2,4); parseable_packet(0x0899,8,clif_parse_MoveToKafra,2,4); - parseable_packet(0x089f,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x089f,-1,clif_parse_ItemListWindowSelected,2,4,8,12); //parseable_packet(0x08a6,8,NULL,0); // CZ_JOIN_BATTLE_FIELD //parseable_packet(0x08a8,4,NULL,0); // CZ_GANGSI_RANK parseable_packet(0x08ad,18,clif_parse_PartyBookingRegisterReq,2,4); @@ -771,7 +771,7 @@ //parseable_packet(0x0887,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0889,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x0924,19,clif_parse_WantToConnection,2,6,10,14,18); - parseable_packet(0x092e,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x092e,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x093b,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0941,8,clif_parse_MoveFromKafra,2,4); //parseable_packet(0x0942,4,NULL,0); // CZ_GANGSI_RANK @@ -815,7 +815,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -847,7 +847,7 @@ parseable_packet(0x0360,6,clif_parse_TakeItem,2); parseable_packet(0x0362,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0363,36,clif_parse_StoragePassword,0); - parseable_packet(0x0365,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0365,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x0368,6,clif_parse_SolveCharName,2); parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); @@ -874,7 +874,7 @@ parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2015-08-19aRagexeRE #elif PACKETVER == 20150819 - parseable_packet(0x0202,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0202,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x022d,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x0281,6,clif_parse_TakeItem,2); parseable_packet(0x035f,6,clif_parse_TickSend,2); @@ -930,7 +930,7 @@ parseable_packet(0x0945,5,clif_parse_HomMenu,2,4); parseable_packet(0x094f,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0951,6,clif_parse_TickSend,2); - parseable_packet(0x0959,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0959,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0964,19,clif_parse_WantToConnection,2,6,10,14,18); //parseable_packet(0x0968,4,NULL,0); // CZ_GANGSI_RANK parseable_packet(0x0969,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); @@ -999,7 +999,7 @@ // 2015-10-07aRagexeRE #elif PACKETVER == 20151007 parseable_packet(0x0202,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -1041,7 +1041,7 @@ parseable_packet(0x0874,10,clif_parse_UseSkillToPos,2,4,6,8); parseable_packet(0x0881,8,clif_parse_MoveFromKafra,2,4); parseable_packet(0x0883,6,clif_parse_TickSend,2); - parseable_packet(0x0884,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0884,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0889,6,clif_parse_ReqClickBuyingStore,2); //parseable_packet(0x088e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD //parseable_packet(0x089a,4,NULL,0); // CZ_GANGSI_RANK @@ -1063,7 +1063,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -1094,7 +1094,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023B,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035F,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -1238,7 +1238,7 @@ parseable_packet(0x091D,26,clif_parse_FriendsListAdd,2); parseable_packet(0x0944,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); parseable_packet(0x0947,19,clif_parse_WantToConnection,2,6,10,14,18); - parseable_packet(0x0949,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0949,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0954,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); parseable_packet(0x0960,2,clif_parse_SearchStoreInfoNextPage,0); parseable_packet(0x0966,6,clif_parse_DropItem,2,4); @@ -1260,7 +1260,7 @@ parseable_packet(0x0884,8,clif_parse_MoveFromKafra,2,4); parseable_packet(0x0886,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); parseable_packet(0x088d,5,clif_parse_HomMenu,2,4); - parseable_packet(0x0890,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0890,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0891,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x0898,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x08aa,26,clif_parse_PartyInvite2,2); @@ -1302,7 +1302,7 @@ parseable_packet(0x088a,26,clif_parse_PartyInvite2,2); parseable_packet(0x0891,8,clif_parse_MoveFromKafra,2,4); parseable_packet(0x08a0,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x091d,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x091d,-1,clif_parse_ItemListWindowSelected,2,4,8,12); //parseable_packet(0x0940,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2016-01-13cRagexeRE @@ -1332,7 +1332,7 @@ parseable_packet(0x0930,6,clif_parse_SolveCharName,2); parseable_packet(0x0932,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x093c,8,clif_parse_MoveFromKafra,2,4); - parseable_packet(0x0941,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0941,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x094d,19,clif_parse_WantToConnection,2,6,10,14,18); //parseable_packet(0x094f,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0967,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); @@ -1341,7 +1341,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -1370,7 +1370,7 @@ // 2016-01-27bRagexeRE #elif PACKETVER == 20160127 parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -1414,7 +1414,7 @@ parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); parseable_packet(0x0819,19,clif_parse_WantToConnection,2,6,10,14,18); - parseable_packet(0x0835,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0835,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x086c,18,clif_parse_PartyBookingRegisterReq,2,4); @@ -1433,7 +1433,7 @@ #elif PACKETVER == 20160211 parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,18,clif_parse_PartyBookingRegisterReq,2,4); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -1482,7 +1482,7 @@ parseable_packet(0x0920,7,clif_parse_ActionRequest,2,6); parseable_packet(0x0926,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x092e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); - parseable_packet(0x093b,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x093b,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x093e,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); parseable_packet(0x0941,6,clif_parse_TakeItem,2); parseable_packet(0x094a,10,clif_parse_UseSkillToPos,2,4,6,8); @@ -1516,7 +1516,7 @@ parseable_packet(0x08a9,26,clif_parse_FriendsListAdd,2); //parseable_packet(0x0920,4,NULL,0); // CZ_GANGSI_RANK parseable_packet(0x0929,5,clif_parse_ChangeDir,2,4); - parseable_packet(0x092f,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x092f,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0936,36,clif_parse_StoragePassword,0); parseable_packet(0x0938,6,clif_parse_TakeItem,2); parseable_packet(0x094c,18,clif_parse_PartyBookingRegisterReq,2,4); @@ -1547,7 +1547,7 @@ parseable_packet(0x0945,6,clif_parse_GetCharNameRequest,2); parseable_packet(0x094e,36,clif_parse_StoragePassword,0); //parseable_packet(0x0950,8,NULL,0); // CZ_JOIN_BATTLE_FIELD - parseable_packet(0x0957,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0957,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x095a,6,clif_parse_TickSend,2); parseable_packet(0x0960,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x0961,18,clif_parse_PartyBookingRegisterReq,2,4); @@ -1570,7 +1570,7 @@ //parseable_packet(0x0873,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x087c,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x087e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); - parseable_packet(0x089b,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x089b,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x089d,5,clif_parse_ChangeDir,2,4); parseable_packet(0x08a7,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x091d,6,clif_parse_GetCharNameRequest,2); @@ -1589,7 +1589,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -1638,7 +1638,7 @@ parseable_packet(0x0872,36,clif_parse_StoragePassword,0); parseable_packet(0x0878,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x0883,26,clif_parse_PartyInvite2,2); - parseable_packet(0x0896,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0896,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x089a,5,clif_parse_HomMenu,2,4); //parseable_packet(0x091b,4,NULL,0); // CZ_GANGSI_RANK parseable_packet(0x0926,8,clif_parse_MoveToKafra,2,4); @@ -1671,7 +1671,7 @@ //parseable_packet(0x088d,4,NULL,0); // CZ_GANGSI_RANK parseable_packet(0x0918,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x0925,19,clif_parse_WantToConnection,2,6,10,14,18); - parseable_packet(0x092a,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x092a,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x092c,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x0930,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0939,6,clif_parse_DropItem,2,4); @@ -1702,7 +1702,7 @@ parseable_packet(0x0933,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0934,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x0940,6,clif_parse_TickSend,2); - parseable_packet(0x0949,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0949,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x094d,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0953,36,clif_parse_StoragePassword,0); parseable_packet(0x095d,5,clif_parse_HomMenu,2,4); @@ -1712,7 +1712,7 @@ #elif PACKETVER == 20160414 parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); - parseable_packet(0x0362,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0362,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0363,6,clif_parse_TakeItem,2); parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x0368,6,clif_parse_SolveCharName,2); @@ -1767,7 +1767,7 @@ parseable_packet(0x08a5,36,clif_parse_StoragePassword,0); parseable_packet(0x092f,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x0935,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x094e,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x094e,-1,clif_parse_ItemListWindowSelected,2,4,8,12); //parseable_packet(0x095c,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2016-04-27aRagexeRE @@ -1775,7 +1775,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -1815,7 +1815,7 @@ parseable_packet(0x0887,26,clif_parse_PartyInvite2,2); parseable_packet(0x088a,6,clif_parse_TakeItem,2); parseable_packet(0x088d,10,clif_parse_UseSkillToId,2,4,6); - parseable_packet(0x088f,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x088f,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0890,6,clif_parse_DropItem,2,4); parseable_packet(0x0893,18,clif_parse_PartyBookingRegisterReq,2,4); //parseable_packet(0x0898,8,NULL,0); // CZ_JOIN_BATTLE_FIELD @@ -1834,7 +1834,7 @@ parseable_packet(0x0969,36,clif_parse_StoragePassword,0); // 2016-05-11aRagexeRE #elif PACKETVER == 20160511 - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -1865,7 +1865,7 @@ parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2016-05-18aRagexeRE #elif PACKETVER == 20160518 - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -1918,7 +1918,7 @@ parseable_packet(0x089c,5,clif_parse_ChangeDir,2,4); parseable_packet(0x091d,36,clif_parse_StoragePassword,0); parseable_packet(0x092c,18,clif_parse_PartyBookingRegisterReq,2,4); - parseable_packet(0x0937,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0937,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0945,26,clif_parse_PartyInvite2,2); parseable_packet(0x094a,8,clif_parse_MoveToKafra,2,4); //parseable_packet(0x094e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD @@ -1945,7 +1945,7 @@ parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x0863,6,clif_parse_TakeItem,2); parseable_packet(0x0870,8,clif_parse_MoveFromKafra,2,4); - parseable_packet(0x087d,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x087d,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x088d,6,clif_parse_DropItem,2,4); parseable_packet(0x088f,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x0895,5,clif_parse_HomMenu,2,4); @@ -1958,7 +1958,7 @@ parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2016-06-08aRagexeRE #elif PACKETVER == 20160608 - parseable_packet(0x022d,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x022d,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x02c4,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x035f,26,clif_parse_PartyInvite2,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); @@ -2003,7 +2003,7 @@ parseable_packet(0x0887,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); parseable_packet(0x0888,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x088a,6,clif_parse_TickSend,2); - parseable_packet(0x088d,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x088d,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0891,10,clif_parse_UseSkillToPos,2,4,6,8); parseable_packet(0x0898,6,clif_parse_DropItem,2,4); parseable_packet(0x092f,2,clif_parse_SearchStoreInfoNextPage,0); @@ -2045,7 +2045,7 @@ parseable_packet(0x0937,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x093b,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x093f,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); - parseable_packet(0x0946,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0946,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0959,6,clif_parse_GetCharNameRequest,2); parseable_packet(0x0965,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0969,6,clif_parse_DropItem,2,4); @@ -2055,7 +2055,7 @@ parseable_packet(0x022d,5,clif_parse_WalkToXY,2); //parseable_packet(0x035f,4,NULL,0); // CZ_GANGSI_RANK parseable_packet(0x0363,6,clif_parse_ReqClickBuyingStore,2); - parseable_packet(0x0368,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0368,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x085c,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); //parseable_packet(0x085e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0860,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); @@ -2097,7 +2097,7 @@ parseable_packet(0x08a5,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x08a8,6,clif_parse_TickSend,2); parseable_packet(0x0918,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); - parseable_packet(0x091b,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x091b,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0924,10,clif_parse_UseSkillToPos,2,4,6,8); parseable_packet(0x0926,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0927,2,clif_parse_SearchStoreInfoNextPage,0); @@ -2115,7 +2115,7 @@ #elif PACKETVER == 20160713 parseable_packet(0x022d,36,clif_parse_StoragePassword,0); parseable_packet(0x0363,5,clif_parse_ChangeDir,2,4); - parseable_packet(0x0364,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0364,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0838,6,clif_parse_TakeItem,2); parseable_packet(0x0860,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0865,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); @@ -2161,7 +2161,7 @@ parseable_packet(0x089c,5,clif_parse_HomMenu,2,4); parseable_packet(0x089e,8,clif_parse_MoveFromKafra,2,4); parseable_packet(0x08a0,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); - parseable_packet(0x08aa,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x08aa,-1,clif_parse_ItemListWindowSelected,2,4,8,12); //parseable_packet(0x0917,4,NULL,0); // CZ_GANGSI_RANK parseable_packet(0x091c,6,clif_parse_TakeItem,2); parseable_packet(0x092a,26,clif_parse_FriendsListAdd,2); @@ -2203,7 +2203,7 @@ parseable_packet(0x0951,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x095f,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x0966,2,clif_parse_ReqCloseBuyingStore,0); - parseable_packet(0x0969,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0969,-1,clif_parse_ItemListWindowSelected,2,4,8,12); // 2016-08-03bRagexeRE #elif PACKETVER == 20160803 parseable_packet(0x0364,19,clif_parse_WantToConnection,2,6,10,14,18); @@ -2231,7 +2231,7 @@ parseable_packet(0x093f,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); parseable_packet(0x0952,5,clif_parse_HomMenu,2,4); parseable_packet(0x0955,8,clif_parse_MoveFromKafra,2,4); - parseable_packet(0x0956,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0956,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0959,6,clif_parse_SolveCharName,2); parseable_packet(0x095a,26,clif_parse_PartyInvite2,2); parseable_packet(0x096a,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); @@ -2252,7 +2252,7 @@ parseable_packet(0x0888,26,clif_parse_FriendsListAdd,2); parseable_packet(0x0890,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); parseable_packet(0x089d,5,clif_parse_ChangeDir,2,4); - parseable_packet(0x089f,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x089f,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x08a9,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x091a,6,clif_parse_TakeItem,2); parseable_packet(0x091b,6,clif_parse_GetCharNameRequest,2); @@ -2291,7 +2291,7 @@ parseable_packet(0x094a,5,clif_parse_ChangeDir,2,4); parseable_packet(0x094f,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x0950,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); - parseable_packet(0x0954,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0954,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0957,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); parseable_packet(0x095e,8,clif_parse_MoveFromKafra,2,4); parseable_packet(0x0960,6,clif_parse_TakeItem,2); @@ -2302,7 +2302,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -2339,7 +2339,7 @@ parseable_packet(0x0879,6,clif_parse_DropItem,2,4); //parseable_packet(0x087a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x087b,2,clif_parse_SearchStoreInfoNextPage,0); - parseable_packet(0x0887,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0887,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0889,6,clif_parse_TakeItem,2); parseable_packet(0x088e,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x088f,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); @@ -2364,7 +2364,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -2392,7 +2392,7 @@ parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2016-09-28dRagexeRE #elif PACKETVER == 20160928 - parseable_packet(0x0202,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0202,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_GetCharNameRequest,2); parseable_packet(0x0366,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x0436,6,clif_parse_ReqClickBuyingStore,2); @@ -2427,7 +2427,7 @@ parseable_packet(0x0368,7,clif_parse_ActionRequest,2,6); parseable_packet(0x0838,36,clif_parse_StoragePassword,0); parseable_packet(0x0863,6,clif_parse_GetCharNameRequest,2); - parseable_packet(0x0886,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0886,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x088e,8,clif_parse_MoveFromKafra,2,4); parseable_packet(0x0891,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0892,18,clif_parse_PartyBookingRegisterReq,2,4); @@ -2456,7 +2456,7 @@ #elif PACKETVER == 20161012 parseable_packet(0x023b,2,clif_parse_SearchStoreInfoNextPage,0); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); - parseable_packet(0x0364,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0364,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0365,6,clif_parse_TickSend,2); parseable_packet(0x0369,26,clif_parse_PartyInvite2,2); parseable_packet(0x07ec,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); @@ -2486,7 +2486,7 @@ // 2016-10-19aRagexeRE #elif PACKETVER == 20161019 parseable_packet(0x022d,6,clif_parse_ReqClickBuyingStore,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,5,clif_parse_HomMenu,2,4); parseable_packet(0x0361,5,clif_parse_WalkToXY,2); @@ -2542,7 +2542,7 @@ parseable_packet(0x0930,6,clif_parse_GetCharNameRequest,2); parseable_packet(0x094b,8,clif_parse_MoveFromKafra,2,4); parseable_packet(0x0953,26,clif_parse_PartyInvite2,2); - parseable_packet(0x095c,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x095c,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x095e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x0962,5,clif_parse_ChangeDir,2,4); // 2016-11-03aRagexeRE @@ -2573,7 +2573,7 @@ parseable_packet(0x0946,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x0949,5,clif_parse_ChangeDir,2,4); parseable_packet(0x095e,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); - parseable_packet(0x0964,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0964,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0965,10,clif_parse_UseSkillToPos,2,4,6,8); parseable_packet(0x0966,6,clif_parse_TickSend,2); // 2016-11-09bRagexeRE @@ -2593,7 +2593,7 @@ parseable_packet(0x0876,6,clif_parse_ReqClickBuyingStore,2); //parseable_packet(0x087a,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0881,8,clif_parse_MoveToKafra,2,4); - parseable_packet(0x088e,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x088e,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0891,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x0898,6,clif_parse_TakeItem,2); parseable_packet(0x089a,6,clif_parse_DropItem,2,4); @@ -2620,7 +2620,7 @@ parseable_packet(0x088d,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x088f,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x0890,5,clif_parse_WalkToXY,2); - parseable_packet(0x0892,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0892,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0893,7,clif_parse_ActionRequest,2,6); parseable_packet(0x08a1,5,clif_parse_ChangeDir,2,4); parseable_packet(0x08a2,18,clif_parse_PartyBookingRegisterReq,2,4); @@ -2640,7 +2640,7 @@ //parseable_packet(0x0967,8,NULL,0); // CZ_JOIN_BATTLE_FIELD // 2016-11-23aRagexeRE #elif PACKETVER == 20161123 - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x0362,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); parseable_packet(0x0437,6,clif_parse_TickSend,2); @@ -2671,7 +2671,7 @@ parseable_packet(0x096a,6,clif_parse_SolveCharName,2); // 2016-11-30bRagexeRE #elif PACKETVER == 20161130 - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,6,clif_parse_TickSend,2); @@ -2720,7 +2720,7 @@ parseable_packet(0x0867,26,clif_parse_FriendsListAdd,2); //parseable_packet(0x0868,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0875,8,clif_parse_MoveToKafra,2,4); - parseable_packet(0x087e,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x087e,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0886,7,clif_parse_ActionRequest,2,6); parseable_packet(0x08a1,5,clif_parse_ChangeDir,2,4); parseable_packet(0x08a2,6,clif_parse_TakeItem,2); @@ -2752,7 +2752,7 @@ parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); - parseable_packet(0x085a,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x085a,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0862,26,clif_parse_FriendsListAdd,2); parseable_packet(0x086d,26,clif_parse_PartyInvite2,2); parseable_packet(0x0887,6,clif_parse_DropItem,2,4); @@ -2774,7 +2774,7 @@ parseable_packet(0x0876,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x0881,6,clif_parse_GetCharNameRequest,2); //parseable_packet(0x0884,8,NULL,0); // CZ_JOIN_BATTLE_FIELD - parseable_packet(0x0885,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0885,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x088c,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); parseable_packet(0x0890,36,clif_parse_StoragePassword,0); //parseable_packet(0x0899,4,NULL,0); // CZ_GANGSI_RANK @@ -2807,7 +2807,7 @@ parseable_packet(0x0875,2,clif_parse_ReqCloseBuyingStore,0); parseable_packet(0x087f,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x0886,5,clif_parse_WalkToXY,2); - parseable_packet(0x0889,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0889,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0893,6,clif_parse_DropItem,2,4); parseable_packet(0x089f,8,clif_parse_MoveToKafra,2,4); parseable_packet(0x08a2,10,clif_parse_UseSkillToId,2,4,6); @@ -2826,7 +2826,7 @@ parseable_packet(0x0944,6,clif_parse_TickSend,2); // 2017-01-04bRagexeRE #elif PACKETVER == 20170104 - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -2883,7 +2883,7 @@ parseable_packet(0x091b,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x0940,6,clif_parse_DropItem,2,4); parseable_packet(0x094c,8,clif_parse_MoveFromKafra,2,4); - parseable_packet(0x0961,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0961,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0969,26,clif_parse_PartyInvite2,2); parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2017-01-18aRagexeRE @@ -2910,7 +2910,7 @@ parseable_packet(0x086f,6,clif_parse_TakeItem,2); //parseable_packet(0x0873,4,NULL,0); // CZ_GANGSI_RANK parseable_packet(0x089e,26,clif_parse_PartyInvite2,2); - parseable_packet(0x08ad,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x08ad,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x091f,18,clif_parse_PartyBookingRegisterReq,2,4); //parseable_packet(0x0927,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0933,6,clif_parse_DropItem,2,4); @@ -2931,7 +2931,7 @@ //parseable_packet(0x0884,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0893,36,clif_parse_StoragePassword,0); //parseable_packet(0x0894,4,NULL,0); // CZ_GANGSI_RANK - parseable_packet(0x0895,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0895,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0898,6,clif_parse_SolveCharName,2); parseable_packet(0x089b,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x08a5,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); @@ -2977,7 +2977,7 @@ parseable_packet(0x0940,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x094c,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x0966,8,clif_parse_MoveFromKafra,2,4); - parseable_packet(0x0969,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0969,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2017-02-08aRagexeRE #elif PACKETVER == 20170208 @@ -2985,7 +2985,7 @@ parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); - parseable_packet(0x0367,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0367,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0368,6,clif_parse_SolveCharName,2); parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); parseable_packet(0x0437,5,clif_parse_WalkToXY,2); @@ -3019,7 +3019,7 @@ parseable_packet(0x083c,7,clif_parse_ActionRequest,2,6); parseable_packet(0x085c,6,clif_parse_DropItem,2,4); parseable_packet(0x0876,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x087c,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x087c,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x087d,5,clif_parse_ChangeDir,2,4); parseable_packet(0x087e,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x0883,6,clif_parse_SolveCharName,2); @@ -3066,7 +3066,7 @@ parseable_packet(0x0894,6,clif_parse_TakeItem,2); parseable_packet(0x08a3,5,clif_parse_ChangeDir,2,4); parseable_packet(0x08a8,26,clif_parse_PartyInvite2,2); - parseable_packet(0x0937,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0937,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0939,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x0943,36,clif_parse_StoragePassword,0); parseable_packet(0x095d,8,clif_parse_MoveToKafra,2,4); @@ -3081,7 +3081,7 @@ parseable_packet(0x085e,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x0863,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); parseable_packet(0x086b,19,clif_parse_WantToConnection,2,6,10,14,18); - parseable_packet(0x0873,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0873,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0874,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x0876,2,clif_parse_ReqCloseBuyingStore,0); parseable_packet(0x0883,2,clif_parse_SearchStoreInfoNextPage,0); @@ -3108,7 +3108,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -3159,7 +3159,7 @@ parseable_packet(0x091b,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x091d,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x0920,6,clif_parse_SolveCharName,2); - parseable_packet(0x0922,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0922,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0944,6,clif_parse_GetCharNameRequest,2); parseable_packet(0x094a,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x094e,19,clif_parse_WantToConnection,2,6,10,14,18); @@ -3170,7 +3170,7 @@ parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); parseable_packet(0x022d,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x023b,26,clif_parse_FriendsListAdd,2); - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); @@ -3222,7 +3222,7 @@ parseable_packet(0x0926,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0929,6,clif_parse_TakeItem,2); parseable_packet(0x092e,19,clif_parse_WantToConnection,2,6,10,14,18); - parseable_packet(0x0937,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0937,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0939,26,clif_parse_FriendsListAdd,2); parseable_packet(0x0949,8,clif_parse_MoveFromKafra,2,4); //parseable_packet(0x095f,4,NULL,0); // CZ_GANGSI_RANK @@ -3248,7 +3248,7 @@ parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x085f,8,clif_parse_MoveToKafra,2,4); - parseable_packet(0x0860,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0860,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0864,26,clif_parse_PartyInvite2,2); parseable_packet(0x0865,5,clif_parse_ChangeDir,2,4); parseable_packet(0x086f,26,clif_parse_FriendsListAdd,2); @@ -3269,7 +3269,7 @@ //parseable_packet(0x0879,4,NULL,0); // CZ_GANGSI_RANK parseable_packet(0x087b,10,clif_parse_UseSkillToId,2,4,6); parseable_packet(0x088b,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); - parseable_packet(0x0890,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0890,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0893,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x0898,6,clif_parse_SolveCharName,2); parseable_packet(0x089a,5,clif_parse_HomMenu,2,4); @@ -3301,7 +3301,7 @@ parseable_packet(0x086a,18,clif_parse_PartyBookingRegisterReq,2,4); //parseable_packet(0x0872,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0881,36,clif_parse_StoragePassword,0); - parseable_packet(0x088d,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x088d,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x088f,5,clif_parse_HomMenu,2,4); parseable_packet(0x0897,6,clif_parse_DropItem,2,4); parseable_packet(0x0898,6,clif_parse_TickSend,2); @@ -3337,7 +3337,7 @@ parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); parseable_packet(0x083c,10,clif_parse_UseSkillToId,2,4,6); - parseable_packet(0x0866,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0866,-1,clif_parse_ItemListWindowSelected,2,4,8,12); //parseable_packet(0x086f,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x087a,18,clif_parse_PartyBookingRegisterReq,2,4); parseable_packet(0x0887,6,clif_parse_SolveCharName,2); @@ -3353,7 +3353,7 @@ parseable_packet(0x096a,6,clif_parse_GetCharNameRequest,2); // 2017-05-02dRagexeRE #elif PACKETVER == 20170502 - parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x035f,6,clif_parse_TickSend,2); parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0362,6,clif_parse_DropItem,2,4); @@ -3407,7 +3407,7 @@ parseable_packet(0x091b,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); parseable_packet(0x0923,19,clif_parse_WantToConnection,2,6,10,14,18); parseable_packet(0x093b,6,clif_parse_DropItem,2,4); - parseable_packet(0x0945,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0945,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0946,6,clif_parse_ReqClickBuyingStore,2); parseable_packet(0x0947,36,clif_parse_StoragePassword,0); parseable_packet(0x0958,5,clif_parse_HomMenu,2,4); @@ -3434,7 +3434,7 @@ parseable_packet(0x089c,5,clif_parse_WalkToXY,2); parseable_packet(0x08a1,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); //parseable_packet(0x091e,8,NULL,0); // CZ_JOIN_BATTLE_FIELD - parseable_packet(0x0923,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0923,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0925,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x0934,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0946,10,clif_parse_UseSkillToPos,2,4,6,8); @@ -3459,7 +3459,7 @@ parseable_packet(0x0875,10,clif_parse_UseSkillToPos,2,4,6,8); parseable_packet(0x0878,26,clif_parse_PartyInvite2,2); parseable_packet(0x087b,7,clif_parse_ActionRequest,2,6); - parseable_packet(0x0885,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0885,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x088b,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x088d,6,clif_parse_DropItem,2,4); parseable_packet(0x0894,19,clif_parse_WantToConnection,2,6,10,14,18); @@ -3477,7 +3477,7 @@ parseable_packet(0x0968,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); // 2017-06-07cRagexeRE #elif PACKETVER == 20170607 - parseable_packet(0x0361,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x0361,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x0364,36,clif_parse_StoragePassword,0); parseable_packet(0x07e4,6,clif_parse_TickSend,2); parseable_packet(0x085a,5,clif_parse_ChangeDir,2,4); @@ -3527,7 +3527,7 @@ parseable_packet(0x087E,5,clif_parse_ChangeDir,2,4); parseable_packet(0x0889,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); parseable_packet(0x0899,26,clif_parse_PartyInvite2,2); - parseable_packet(0x089D,-1,clif_parse_ItemListWindowSelected,2,4,8); + parseable_packet(0x089D,-1,clif_parse_ItemListWindowSelected,2,4,8,12); parseable_packet(0x08A2,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); parseable_packet(0x08AD,6,clif_parse_TakeItem,2); parseable_packet(0x091B,10,clif_parse_UseSkillToId,2,4,6); From 0126759d0078190d07f954a63c0551b7ba70cf43 Mon Sep 17 00:00:00 2001 From: aleos <aleos89@users.noreply.github.com> Date: Fri, 28 Jul 2017 16:47:16 -0400 Subject: [PATCH 054/124] Fixed some typos in the achievement database * Corrected documentation in the import database. * Corrected a typo for dependent achievements in renewal. Thanks to @Atemo! --- db/import-tmpl/achievement_db.yml | 6 +- db/re/achievement_db.yml | 94 +++++++++++++++---------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/db/import-tmpl/achievement_db.yml b/db/import-tmpl/achievement_db.yml index 92044f77aa..2565e1751f 100644 --- a/db/import-tmpl/achievement_db.yml +++ b/db/import-tmpl/achievement_db.yml @@ -22,7 +22,7 @@ # Achievement Settings # ########################################################################### -# Id - Unique achievement ID. +# ID - Unique achievement ID. ########################################################################### # Group - Achievement group type. Each achievement type calls a specific # objective check. @@ -69,10 +69,10 @@ ########################################################################### # Reward - A list of rewards that are given on completion. All fields are # optional. -# ItemId: Item ID +# ItemID: Item ID # Amount: Amount of Item ID (default 1) # Script: Bonus Script -# TitleId: Title ID +# TitleID: Title ID ########################################################################### # Score - Achievement points that are given on completion. ########################################################################### diff --git a/db/re/achievement_db.yml b/db/re/achievement_db.yml index fa72b9259a..ff756f9524 100644 --- a/db/re/achievement_db.yml +++ b/db/re/achievement_db.yml @@ -1399,140 +1399,140 @@ Achievements: - ID: 129001 Group: "AG_ADVENTURE" Name: "Prontera Explorer" - Depdendent: [120001, 120002, 120003, 120004, 120005, 120006, 120007, 120008, 120009, 120010] + Dependent: [120001, 120002, 120003, 120004, 120005, 120006, 120007, 120008, 120009, 120010] Reward: ItemID: 644 Score: 20 - ID: 129002 Group: "AG_ADVENTURE" Name: "Geffen Explorer" - Depdendent: [120011, 120012, 120013, 120014, 120015, 120016, 120017] + Dependent: [120011, 120012, 120013, 120014, 120015, 120016, 120017] Reward: ItemID: 644 Score: 20 - ID: 129003 Group: "AG_ADVENTURE" Name: "Sograt Desert Explorer" - Depdendent: [120018, 120019, 120020, 120021, 120022, 120023] + Dependent: [120018, 120019, 120020, 120021, 120022, 120023] Reward: ItemID: 644 Score: 20 - ID: 129004 Group: "AG_ADVENTURE" Name: "Payon Explorer" - Depdendent: [120024, 120025, 120026, 120027, 120028, 120029, 120030, 120031] + Dependent: [120024, 120025, 120026, 120027, 120028, 120029, 120030, 120031] Reward: ItemID: 644 Score: 20 - ID: 129005 Group: "AG_ADVENTURE" Name: "North Mjolnir Explorer" - Depdendent: [120032, 120033, 120034, 120035, 120036] + Dependent: [120032, 120033, 120034, 120035, 120036] Reward: ItemID: 644 Score: 20 - ID: 129006 Group: "AG_ADVENTURE" Name: "South Mjolnir Explorer" - Depdendent: [120037, 120038, 120039, 120040, 120041, 120042, 120043] + Dependent: [120037, 120038, 120039, 120040, 120041, 120042, 120043] Reward: ItemID: 644 Score: 20 - ID: 129007 Group: "AG_ADVENTURE" Name: "Comodo Explorer" - Depdendent: [120044, 120045, 120046, 120047, 120048, 120049, 120050, 120051] + Dependent: [120044, 120045, 120046, 120047, 120048, 120049, 120050, 120051] Reward: ItemID: 644 Score: 20 - ID: 129008 Group: "AG_ADVENTURE" Name: "Rune Midgard Explorer" - Depdendent: [129001, 129002, 129003, 129004, 129005, 129006, 129007] + Dependent: [129001, 129002, 129003, 129004, 129005, 129006, 129007] Reward: ItemID: 617 Score: 50 - ID: 129009 Group: "AG_ADVENTURE" Name: "Yuno Explorer" - Depdendent: [120052, 120053, 120054, 120055, 120056, 120057, 120058, 120059, 120060, 120061] + Dependent: [120052, 120053, 120054, 120055, 120056, 120057, 120058, 120059, 120060, 120061] Reward: ItemID: 644 Score: 20 - ID: 129010 Group: "AG_ADVENTURE" Name: "Hugel Explorer" - Depdendent: [120062, 120063, 120064, 120065, 120066] + Dependent: [120062, 120063, 120064, 120065, 120066] Reward: ItemID: 644 Score: 20 - ID: 129011 Group: "AG_ADVENTURE" Name: "Einbroch Explorer" - Depdendent: [120067, 120068, 120069, 120070, 120071, 120072, 120073, 120074] + Dependent: [120067, 120068, 120069, 120070, 120071, 120072, 120073, 120074] Reward: ItemID: 644 Score: 20 - ID: 129012 Group: "AG_ADVENTURE" Name: "Lighthalzen Explorer" - Depdendent: [120075, 120076, 120077] + Dependent: [120075, 120076, 120077] Reward: ItemID: 644 Score: 20 - ID: 129013 Group: "AG_ADVENTURE" Name: "Schwarzwald Explorer" - Depdendent: [129009, 129010, 129011, 129012] + Dependent: [129009, 129010, 129011, 129012] Reward: ItemID: 617 Score: 50 - ID: 129014 Group: "AG_ADVENTURE" Name: "Rachel Explorer" - Depdendent: [120078, 120079, 120080, 120081, 120082, 120083, 120084] + Dependent: [120078, 120079, 120080, 120081, 120082, 120083, 120084] Reward: ItemID: 644 Score: 20 - ID: 129015 Group: "AG_ADVENTURE" Name: "Veins Explorer" - Depdendent: [120085, 120086, 120087, 120088, 120089] + Dependent: [120085, 120086, 120087, 120088, 120089] Reward: ItemID: 644 Score: 20 - ID: 129016 Group: "AG_ADVENTURE" Name: "Arunafeltz Explorer" - Depdendent: [129014, 129015] + Dependent: [129014, 129015] Reward: ItemID: 617 Score: 50 - ID: 129017 Group: "AG_ADVENTURE" Name: "Laphine Explorer" - Depdendent: [120090, 120091, 120092, 120093, 120094, 120095] + Dependent: [120090, 120091, 120092, 120093, 120094, 120095] Reward: ItemID: 644 Score: 20 - ID: 129018 Group: "AG_ADVENTURE" Name: "Manuk Explorer" - Depdendent: [120096, 120097, 120098, 120099, 120100] + Dependent: [120096, 120097, 120098, 120099, 120100] Reward: ItemID: 644 Score: 20 - ID: 129019 Group: "AG_ADVENTURE" Name: "Eclage Explorer" - Depdendent: [129017, 129018] + Dependent: [129017, 129018] Reward: ItemID: 617 Score: 50 - ID: 129020 Group: "AG_ADVENTURE" Name: "Localizing fields explorer" - Depdendent: [120101, 120102, 120103, 120104, 120105, 120106, 120107, 120108, 120109] + Dependent: [120101, 120102, 120103, 120104, 120105, 120106, 120107, 120108, 120109] Reward: ItemID: 617 Score: 50 @@ -1563,7 +1563,7 @@ Achievements: Group: "AG_GOAL_LEVEL" Name: "Acquire the second aura!" Condition: " BaseLevel >= 150 " - Depdendent: [200000] + Dependent: [200000] Reward: ItemID: 5364 Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " @@ -1573,7 +1573,7 @@ Achievements: Group: "AG_GOAL_LEVEL" Name: "Acquire the third aura!" Condition: " BaseLevel >= 175 " - Depdendent: [200001] + Dependent: [200001] Reward: ItemID: 18880 Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " @@ -1592,7 +1592,7 @@ Achievements: Group: "AG_GOAL_LEVEL" Name: "Grandmaster Job level!" Condition: " JobLevel >= 70 " - Depdendent: [200003] + Dependent: [200003] Reward: ItemID: 12817 Script: " specialeffect2 EF_BLESSING; sc_start SC_BLESSING,30000,10; " @@ -1786,7 +1786,7 @@ Achievements: - ID: 230100 Group: "AG_TAMING" Name: "Poring is Love" - Depdendent: [230101, 230102, 230103, 230104] + Dependent: [230101, 230102, 230103, 230104] Reward: Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " TitleID: 1025 @@ -1794,7 +1794,7 @@ Achievements: - ID: 230110 Group: "AG_TAMING" Name: "Entomologist" - Depdendent: [230111, 230112, 230113, 230114, 230115, 230116] + Dependent: [230111, 230112, 230113, 230114, 230115, 230116] Reward: Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " TitleID: 1026 @@ -1802,7 +1802,7 @@ Achievements: - ID: 230120 Group: "AG_TAMING" Name: "Animals are also our friend" - Depdendent: [230121, 230122, 230123, 230124, 230125, 230126, 230127, 230128] + Dependent: [230121, 230122, 230123, 230124, 230125, 230126, 230127, 230128] Reward: Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " TitleID: 1027 @@ -1810,7 +1810,7 @@ Achievements: - ID: 230140 Group: "AG_TAMING" Name: "Monster Girls Unite!!" - Depdendent: [230141, 230142, 230143, 230144, 230145, 230146, 230147] + Dependent: [230141, 230142, 230143, 230144, 230145, 230146, 230147] Reward: Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " TitleID: 1029 @@ -2189,7 +2189,7 @@ Achievements: - ID: 230200 Group: "AG_BATTLE" Name: "Poring seeker" - Depdendent: [230201, 230202, 230203] + Dependent: [230201, 230202, 230203] Score: 10 - ID: 230201 Group: "AG_BATTLE" @@ -2246,7 +2246,7 @@ Achievements: - ID: 240002 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 2" - Depdendent: [240001] + Dependent: [240001] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2254,7 +2254,7 @@ Achievements: - ID: 240003 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 3" - Depdendent: [240002] + Dependent: [240002] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2262,7 +2262,7 @@ Achievements: - ID: 240004 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 4" - Depdendent: [240003] + Dependent: [240003] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2270,7 +2270,7 @@ Achievements: - ID: 240005 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 5" - Depdendent: [240004] + Dependent: [240004] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2278,7 +2278,7 @@ Achievements: - ID: 240006 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 6" - Depdendent: [240005] + Dependent: [240005] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2286,7 +2286,7 @@ Achievements: - ID: 240007 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 7" - Depdendent: [240006] + Dependent: [240006] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2294,7 +2294,7 @@ Achievements: - ID: 240008 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 8" - Depdendent: [240007] + Dependent: [240007] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2302,7 +2302,7 @@ Achievements: - ID: 240009 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 9" - Depdendent: [240008] + Dependent: [240008] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2310,7 +2310,7 @@ Achievements: - ID: 240010 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 10" - Depdendent: [240009] + Dependent: [240009] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2319,7 +2319,7 @@ Achievements: - ID: 240011 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 11" - Depdendent: [240010] + Dependent: [240010] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2327,7 +2327,7 @@ Achievements: - ID: 240012 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 12" - Depdendent: [240011] + Dependent: [240011] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2335,7 +2335,7 @@ Achievements: - ID: 240013 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 13" - Depdendent: [240012] + Dependent: [240012] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2343,7 +2343,7 @@ Achievements: - ID: 240014 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 14" - Depdendent: [240013] + Dependent: [240013] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2351,7 +2351,7 @@ Achievements: - ID: 240015 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 15" - Depdendent: [240014] + Dependent: [240014] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2359,7 +2359,7 @@ Achievements: - ID: 240016 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 16" - Depdendent: [240015] + Dependent: [240015] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2367,7 +2367,7 @@ Achievements: - ID: 240017 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 17" - Depdendent: [240016] + Dependent: [240016] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2375,7 +2375,7 @@ Achievements: - ID: 240018 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 18" - Depdendent: [240017] + Dependent: [240017] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2383,7 +2383,7 @@ Achievements: - ID: 240019 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 19" - Depdendent: [240018] + Dependent: [240018] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " @@ -2391,7 +2391,7 @@ Achievements: - ID: 240020 Group: "AG_GOAL_ACHIEVE" Name: "Reaching Level 20" - Depdendent: [240019] + Dependent: [240019] Reward: ItemID: 644 Script: " specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,30000,10; " From 6748ff7e1712b7bcb189dd191bb3cfd74dc5db44 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 28 Jul 2017 22:50:35 +0200 Subject: [PATCH 055/124] Fixed pre-increment and pre-decrement operators Fixes #2176 --- src/map/script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/script.c b/src/map/script.c index 98223e58ff..e845843bec 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1471,8 +1471,8 @@ const char* parse_subexpr(const char* p,int limit) p = skip_space(p); while(( (op=C_OP3,opl=0,len=1,*p=='?') || - (op=C_ADD,opl=9,len=1,*p=='+') || - (op=C_SUB,opl=9,len=1,*p=='-') || + ((op=C_ADD,opl=9,len=1,*p=='+') && p[1]!='+') || + ((op=C_SUB,opl=9,len=1,*p=='-') && p[1]!='-') || (op=C_MUL,opl=10,len=1,*p=='*') || (op=C_DIV,opl=10,len=1,*p=='/') || (op=C_MOD,opl=10,len=1,*p=='%') || From b2c5424af1e8ceec4722cb81f5d34f022e467ee2 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 30 Jul 2017 16:40:48 +0200 Subject: [PATCH 056/124] Fixed some memleaks in skill_require_db Thanks to @Everade --- src/map/skill.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/map/skill.c b/src/map/skill.c index 9656e5788c..70d0d52317 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -20879,6 +20879,11 @@ static bool skill_parse_row_requiredb(char* split[], int columns, int current) trim(split[11]); if (split[11][0] != '\0' || atoi(split[11])) { int require[MAX_SKILL_STATUS_REQUIRE]; + + if( skill_db[idx]->require.status_count > 0 ){ + aFree(skill_db[idx]->require.status); + } + if ((skill_db[idx]->require.status_count = skill_split_atoi2(split[11], require, ":", SC_STONE, ARRAYLENGTH(require)))) { CREATE(skill_db[idx]->require.status, enum sc_type, skill_db[idx]->require.status_count); for (i = 0; i < skill_db[idx]->require.status_count; i++){ @@ -20906,6 +20911,10 @@ static bool skill_parse_row_requiredb(char* split[], int columns, int current) if (split[33][0] != '\0' || atoi(split[33])) { int require[MAX_SKILL_EQUIP_REQUIRE]; + if( skill_db[idx]->require.eqItem_count > 0 ){ + aFree(skill_db[idx]->require.eqItem); + } + if ((skill_db[idx]->require.eqItem_count = skill_split_atoi2(split[33], require, ":", 500, ARRAYLENGTH(require)))) { CREATE(skill_db[idx]->require.eqItem, uint16, skill_db[idx]->require.eqItem_count); for (i = 0; i < skill_db[idx]->require.eqItem_count; i++){ From 4af6860302b1d7871e63821280eecc5922c77e08 Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Mon, 31 Jul 2017 10:17:57 -0400 Subject: [PATCH 057/124] Corrected Crimson Spear class requirement * Fixes #2297. * Added missing support for Swordman, Transcendent Swordman, and Baby Swordman. Thanks to @ToiletMaster! --- db/re/item_db.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 064faaee4a..570b533112 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -784,7 +784,7 @@ 1440,Battle_Hook_,Battle Hook,5,20,,900,140,,3,3,0x00004082,18,2,2,4,65,1,4,{ bonus2 bAddEff,Eff_Stun,500; bonus2 bAddRace,RC_DemiHuman,20; bonus2 bAddRace,RC_Player,20; skill "KN_PIERCE",3; },{},{} 1441,Blue_Spear,Blue Spear,5,10,,1200,180:170,,3,1,0x00004000,56,2,2,3,100,1,4,{ bonus bDex,5; bonus bInt,5; },{},{} 1442,Ru_Gold_Spear,Ru Gold Spear,5,0,,1200,180,,3,2,0x00004000,56,2,2,3,120,1,4,{ bonus bStr,8; bonus bAgi,8; },{},{} -1443,Crimson_Spear,Crimson Spear,5,20,,900,90,,3,2,0x00004082,56,2,2,3,70,1,4,{ .@r = getrefine(); bonus bBaseAtk,((BaseLevel/10)*5)+(.@r<=15?pow(.@r,2):225); },{},{} +1443,Crimson_Spear,Crimson Spear,5,20,,900,90,,3,2,0x00004082,63,2,2,3,70,1,4,{ .@r = getrefine(); bonus bBaseAtk,((BaseLevel/10)*5)+(.@r<=15?pow(.@r,2):225); },{},{} 1446,Requiem_Spear,Requiem Spear,5,20,,1000,130,,3,,0x00004080,63,2,2,4,100,1,4,{ .@r = getrefine(); .@b = 40; bonus bUnbreakableWeapon,1; if(.@r>=5){ .@b += (.@r-5)*15+20; } bonus2 bAddRace2,RC2_BioLab,.@b; },{},{} //=================================================================== // 2-Handed Spears From 1e71d50cb4903235bdff707c4f17fc683d6ec3ef Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Mon, 31 Jul 2017 16:18:15 +0200 Subject: [PATCH 058/124] SQL synchronization --- sql-files/item_db_re.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 33cf04ab8e..5332c25dec 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -816,7 +816,7 @@ REPLACE INTO `item_db_re` VALUES (1439,'Half_BF_Spear1','Half BF Spear1',5,20,NU REPLACE INTO `item_db_re` VALUES (1440,'Battle_Hook_','Battle Hook',5,20,NULL,900,'140',NULL,3,3,0x00004082,18,2,2,4,'65',1,4,'bonus2 bAddEff,Eff_Stun,500; bonus2 bAddRace,RC_DemiHuman,20; bonus2 bAddRace,RC_Player,20; skill "KN_PIERCE",3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (1441,'Blue_Spear','Blue Spear',5,10,NULL,1200,'180:170',NULL,3,1,0x00004000,56,2,2,3,'100',1,4,'bonus bDex,5; bonus bInt,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (1442,'Ru_Gold_Spear','Ru Gold Spear',5,0,NULL,1200,'180',NULL,3,2,0x00004000,56,2,2,3,'120',1,4,'bonus bStr,8; bonus bAgi,8;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (1443,'Crimson_Spear','Crimson Spear',5,20,NULL,900,'90',NULL,3,2,0x00004082,56,2,2,3,'70',1,4,'.@r = getrefine(); bonus bBaseAtk,((BaseLevel/10)*5)+(.@r<=15?pow(.@r,2):225);',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (1443,'Crimson_Spear','Crimson Spear',5,20,NULL,900,'90',NULL,3,2,0x00004082,63,2,2,3,'70',1,4,'.@r = getrefine(); bonus bBaseAtk,((BaseLevel/10)*5)+(.@r<=15?pow(.@r,2):225);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (1446,'Requiem_Spear','Requiem Spear',5,20,NULL,1000,'130',NULL,3,NULL,0x00004080,63,2,2,4,'100',1,4,'.@r = getrefine(); .@b = 40; bonus bUnbreakableWeapon,1; if(.@r>=5){ .@b += (.@r-5)*15+20; } bonus2 bAddRace2,RC2_BioLab,.@b;',NULL,NULL); #=================================================================== # 2-Handed Spears From 6581bac83b36ab842722f2c3d6a41ca59e2f0f8b Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Mon, 31 Jul 2017 12:57:16 -0400 Subject: [PATCH 059/124] Added script command achievementupdate * Updates the specified achievement's value. Thanks to @Tokeiburu! --- doc/script_commands.txt | 16 +++++++++++-- src/map/script.c | 53 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 75a216fd1c..2af352e805 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -9761,7 +9761,7 @@ Returns true on success and false on failure. This function will return the specified <type> value for an achievement of the attached player or the supplied <char id>. If the player doesn't have the -achievement active (no progress has been made), if the achievement doesn't +achievement active (no progress has been made): if the achievement doesn't exist -1 will be returned, or -2 will be returned on any other error such as an invalid <type>. @@ -9798,4 +9798,16 @@ This function will return if the achievement exists on the player or the supplie <char id>. Returns true on success and false on failure. ---------------------------------------- \ No newline at end of file +--------------------------------------- + +*achievementupdate(<achievement id>,<type>,<value>{,<char id>}) + +This function will update an achievement's value for an achievement of the attached +player or the supplied <char id>. If the player does not have the achievement active +(no progress has been made) it will be added to the player's log first before updating +the <type> value. +Returns true on success and false on failure. + +See 'achievementinfo' for valid <type> values. Excludes ACHIEVEINFO_LEVEL and ACHIEVEINFO_SCORE. + +--------------------------------------- diff --git a/src/map/script.c b/src/map/script.c index e845843bec..4ad865a310 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -23365,6 +23365,58 @@ BUILDIN_FUNC(achievementexists) { return SCRIPT_CMD_SUCCESS; } +/** + * Updates an achievement's value. + * achievementupdate(<achievement ID>,<type>,<value>{,<char ID>}); + */ +BUILDIN_FUNC(achievementupdate) { + struct map_session_data *sd; + int i, achievement_id, type, value; + + achievement_id = script_getnum(st, 2); + type = script_getnum(st, 3); + value = script_getnum(st, 4); + + if (!script_charid2sd(5, sd)) { + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + if (achievement_search(achievement_id) == &achievement_dummy) { + ShowWarning("buildin_achievementupdate: Achievement '%d' doesn't exist.\n", achievement_id); + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + if (i == sd->achievement_data.count) + achievement_add(sd, achievement_id); + + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); + if (i == sd->achievement_data.count) { + script_pushint(st, false); + return SCRIPT_CMD_SUCCESS; + } + + if (type >= ACHIEVEINFO_COUNT1 && type <= ACHIEVEINFO_COUNT10) + sd->achievement_data.achievements[i].count[type - 1] = value; + else if (type == ACHIEVEINFO_COMPLETE) + sd->achievement_data.achievements[i].complete = value ? true : false; + else if (type == ACHIEVEINFO_COMPLETEDATE) + sd->achievement_data.achievements[i].completeDate = value; + else if (type == ACHIEVEINFO_GOTREWARD) + sd->achievement_data.achievements[i].gotReward = value ? true : false; + else { + ShowWarning("buildin_achievementupdate: Unknown type '%d'.\n", type); + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + achievement_update_achievement(sd, achievement_id, false); + script_pushint(st, true); + return SCRIPT_CMD_SUCCESS; +} + #include "../custom/script.inc" // declarations that were supposed to be exported from npc_chat.c @@ -24002,6 +24054,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(achievementremove,"i?"), BUILDIN_DEF(achievementcomplete,"i?"), BUILDIN_DEF(achievementexists,"i?"), + BUILDIN_DEF(achievementupdate,"iii?"), #include "../custom/script_def.inc" From f4338adab70d919395842e2b7e2f3c113d007c90 Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Mon, 31 Jul 2017 13:13:23 -0400 Subject: [PATCH 060/124] Follow up to 6581bac * Fixed some compile errors. * Clarified documentation for script command achievementupdate a bit more. --- doc/script_commands.txt | 5 ++++- src/map/script.c | 8 +++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 2af352e805..0c20f96a28 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -9808,6 +9808,9 @@ player or the supplied <char id>. If the player does not have the achievement ac the <type> value. Returns true on success and false on failure. -See 'achievementinfo' for valid <type> values. Excludes ACHIEVEINFO_LEVEL and ACHIEVEINFO_SCORE. +See 'achievementinfo' for valid <type> values. +- ACHIEVEINFO_COMPLETE, ACHIEVEINFO_COMPLETEDATE, and ACHIEVEINFO_GOTREWARD require the + specific value returned from 'gettimetick(2)'. +- Excludes ACHIEVEINFO_LEVEL and ACHIEVEINFO_SCORE. --------------------------------------- diff --git a/src/map/script.c b/src/map/script.c index 4ad865a310..ab2feca4c1 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -23400,12 +23400,10 @@ BUILDIN_FUNC(achievementupdate) { if (type >= ACHIEVEINFO_COUNT1 && type <= ACHIEVEINFO_COUNT10) sd->achievement_data.achievements[i].count[type - 1] = value; - else if (type == ACHIEVEINFO_COMPLETE) - sd->achievement_data.achievements[i].complete = value ? true : false; - else if (type == ACHIEVEINFO_COMPLETEDATE) - sd->achievement_data.achievements[i].completeDate = value; + else if (type == ACHIEVEINFO_COMPLETE || type == ACHIEVEINFO_COMPLETEDATE) + sd->achievement_data.achievements[i].completed = value; else if (type == ACHIEVEINFO_GOTREWARD) - sd->achievement_data.achievements[i].gotReward = value ? true : false; + sd->achievement_data.achievements[i].rewarded = value; else { ShowWarning("buildin_achievementupdate: Unknown type '%d'.\n", type); script_pushint(st, false); From c0556a397e864f8a73dce6f2ff32bb367443e18b Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Mon, 31 Jul 2017 14:25:31 -0400 Subject: [PATCH 061/124] Follow up to 6748ff7 * Fixed pre-increment and pre-decrement operators for achievement condition parsing. Thanks to @Lemongrass3110! --- src/map/achievement.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/achievement.c b/src/map/achievement.c index 90b1059a34..dc6c45a516 100644 --- a/src/map/achievement.c +++ b/src/map/achievement.c @@ -879,8 +879,8 @@ const char* av_parse_subexpr(const char* p, int limit, struct av_condition *pare p = skip_space(p); while(( - (op=C_ADD,opl=9,len=1,*p=='+') || - (op=C_SUB,opl=9,len=1,*p=='-') || + ((op=C_ADD,opl=9,len=1,*p=='+') && p[1]!='+') || + ((op=C_SUB,opl=9,len=1,*p=='-') && p[1]!='-') || (op=C_MUL,opl=10,len=1,*p=='*') || (op=C_DIV,opl=10,len=1,*p=='/') || (op=C_MOD,opl=10,len=1,*p=='%') || From 4c62f581a8caa7ffa867679f6749b2179287ab91 Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Tue, 1 Aug 2017 14:20:58 -0400 Subject: [PATCH 062/124] Corrected guild bound item retrieval deletion * Corrected a SQL statement deleting all guild bound items in the inventory table for offline characters. Thanks to @Canoe! --- src/char/int_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 99170dc87e..f53811d4ca 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -393,7 +393,7 @@ bool mapif_parse_itembound_retrieve(int fd) // Delete bound items from player's inventory StringBuf_Clear(&buf); - StringBuf_Printf(&buf, "DELETE FROM `%s` WHERE `bound` = %d",schema_config.inventory_db, BOUND_GUILD); + StringBuf_Printf(&buf, "DELETE FROM `%s` WHERE `char_id` = %d AND `bound` = %d",schema_config.inventory_db, char_id, BOUND_GUILD); if( SQL_ERROR == SqlStmt_PrepareStr(stmt, StringBuf_Value(&buf)) || SQL_ERROR == SqlStmt_Execute(stmt) ) { From cd3f42eb6afc907c879efdf09bff425257df40a2 Mon Sep 17 00:00:00 2001 From: Temtaime <temtaime@gmail.com> Date: Thu, 3 Aug 2017 20:38:59 +0300 Subject: [PATCH 063/124] Fix swapped accsessories (#2281) * Enum was swapped, you can view it by calling @itemlist with one accessory equipped. Thanks to @Temtaime! --- src/common/mmo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/mmo.h b/src/common/mmo.h index 83bef472b5..58c1080827 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -220,8 +220,8 @@ enum equip_pos { EQP_ARMOR = 0x000010, // 16 EQP_SHOES = 0x000040, // 64 EQP_GARMENT = 0x000004, // 4 - EQP_ACC_L = 0x000008, // 8 - EQP_ACC_R = 0x000080, // 128 + EQP_ACC_R = 0x000008, // 8 + EQP_ACC_L = 0x000080, // 128 EQP_COSTUME_HEAD_TOP = 0x000400, // 1024 EQP_COSTUME_HEAD_MID = 0x000800, // 2048 EQP_COSTUME_HEAD_LOW = 0x001000, // 4096 From 166836d7b39e52eaaa04bd565c691e2ac49cc2cf Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Thu, 3 Aug 2017 13:40:50 -0400 Subject: [PATCH 064/124] Follow up to cd3f42e * Swapped equip locations for Sarah's Left Earring (28310) and Sarah's Right Earring (28311). --- db/re/item_db.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 570b533112..ae260ab1d0 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -11455,8 +11455,8 @@ 28316,RCC2013_ARMLET_,RCC2013_ARMLET_,4,200,,200,,,,1,0xFFFFFFFF,63,2,136,,1,0,,{ bonus2 bAddClass,Class_All,1; },{},{} 28317,RCC2013_RING,RCC2013_RING,4,200,,200,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus2 bAddClass,Class_All,1; },{},{} 28318,RCC2013_RING_,RCC2013_RING_,4,200,,200,,,,1,0xFFFFFFFF,63,2,136,,1,0,,{ bonus2 bAddClass,Class_All,1; },{},{} -28310,Sarah's_Left_Earring,Sarah's Left Earring,4,10,,100,,,,0,0xFFFFFFFF,63,2,128,,145,0,,{ skill "AL_HEAL",1; },{},{} -28311,Sarah's_Right_Earring,Sarah's Right Earring,4,10,,100,,,,0,0xFFFFFFFF,63,2,8,,145,0,,{ skill "AL_TELEPORT",1; },{},{} +28310,Sarah's_Left_Earring,Sarah's Left Earring,4,10,,100,,,,0,0xFFFFFFFF,63,2,8,,145,0,,{ skill "AL_HEAL",1; },{},{} +28311,Sarah's_Right_Earring,Sarah's Right Earring,4,10,,100,,,,0,0xFFFFFFFF,63,2,128,,145,0,,{ skill "AL_TELEPORT",1; },{},{} 28321,Falconer_Claw,Falconer Claw,4,0,,100,,5,,1,0x00000800,63,2,136,0,80,0,,{ bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10; },{},{} 28322,Falconer_Glove,Falconer Glove,4,0,,100,,5,,1,0x00000800,63,2,136,0,80,0,,{ bonus bDex,1; bonus bUseSPrate,-5; },{},{} 28326,Broken_Chips_01,Broken Chips 01,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,100,0,,{ bonus bStr,4; },{},{} From 915c9ddb265847af3ef6d0a5744a16b5125180ee Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Thu, 3 Aug 2017 19:41:11 +0200 Subject: [PATCH 065/124] SQL synchronization --- sql-files/item_db_re.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 5332c25dec..187f0aa8b4 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -11487,8 +11487,8 @@ REPLACE INTO `item_db_re` VALUES (28315,'RCC2013_ARMLET','RCC2013_ARMLET',4,200, REPLACE INTO `item_db_re` VALUES (28316,'RCC2013_ARMLET_','RCC2013_ARMLET_',4,200,NULL,200,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus2 bAddClass,Class_All,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28317,'RCC2013_RING','RCC2013_RING',4,200,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus2 bAddClass,Class_All,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28318,'RCC2013_RING_','RCC2013_RING_',4,200,NULL,200,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus2 bAddClass,Class_All,1;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28310,'Sarah\'s_Left_Earring','Sarah\'s Left Earring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,128,NULL,'145',0,NULL,'skill "AL_HEAL",1;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28311,'Sarah\'s_Right_Earring','Sarah\'s Right Earring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,8,NULL,'145',0,NULL,'skill "AL_TELEPORT",1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28310,'Sarah\'s_Left_Earring','Sarah\'s Left Earring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,8,NULL,'145',0,NULL,'skill "AL_HEAL",1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28311,'Sarah\'s_Right_Earring','Sarah\'s Right Earring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,128,NULL,'145',0,NULL,'skill "AL_TELEPORT",1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28321,'Falconer_Claw','Falconer Claw',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,0,'80',0,NULL,'bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28322,'Falconer_Glove','Falconer Glove',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,0,'80',0,NULL,'bonus bDex,1; bonus bUseSPrate,-5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28326,'Broken_Chips_01','Broken Chips 01',4,10,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'100',0,NULL,'bonus bStr,4;',NULL,NULL); From 627a178ca93c52ce7ce80c46e59179b95adb6b54 Mon Sep 17 00:00:00 2001 From: Daegaladh <Daegaladh@users.noreply.github.com> Date: Thu, 3 Aug 2017 20:17:21 +0200 Subject: [PATCH 066/124] Fixed a lot of "next" on Old Pharmacist (#2308) * Corrected the usage of script command next which was causing the NPC dialogue to be combined in certain cases. Thanks to @Daegaladh! --- npc/merchants/old_pharmacist.txt | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/npc/merchants/old_pharmacist.txt b/npc/merchants/old_pharmacist.txt index ef653609d8..3f549686e0 100644 --- a/npc/merchants/old_pharmacist.txt +++ b/npc/merchants/old_pharmacist.txt @@ -36,9 +36,9 @@ alberta_in,16,28,4 script Pharmacist 61,{ mes "[Old Pharmacist]"; mes "Ummmm..."; mes "What brings you here...?"; + next; switch(select("Make Potion:Talk.:Mixing Information:Cancel")) { case 1: - next; if (MaxWeight - Weight < 5000) { mes "[Old Pharmacist]"; mes "Why are you carrying these so many!"; @@ -51,11 +51,11 @@ alberta_in,16,28,4 script Pharmacist 61,{ } else { mes "[Old Pharmacist]"; mes "You have all the stuff ready, right? Which one would you like?"; + next; switch(select("Red Potion.:Orange Potion.:Yellow Potion.:White Potion.:Blue Potion.:Green Potion.:Actually, I don't want anything.")) { case 1: callsub L_Making,507,3,501; case 2: - next; mes "[Old Pharmacist]"; if (countitem(507) < countitem(713)) { set .@max,countitem(507); @@ -77,9 +77,9 @@ alberta_in,16,28,4 script Pharmacist 61,{ close; } mes "How many?"; + next; switch(select("Make as many as I can.:I want to choose an amount.:Actually, I don't want anything.")) { case 1: - next; if ((countitem(507) < .@max) || (countitem(508) < .@max) || (countitem(713) < .@max) || (Zeny < .@max*3)) { mes "[Old Pharmacist]"; mes "You rascal! You don't even have all the materials and you want me to make you potions?!"; @@ -92,24 +92,21 @@ alberta_in,16,28,4 script Pharmacist 61,{ getitem 502,.@max; //Orange_Potion break; case 2: - next; mes "[Old Pharmacist]"; mes "Then pick a number below 100. If you don't want any, just enter '0'. With the materials you have, you can make about "+.@max+" potions."; + next; input .@amount,0,101; if (.@amount == 0) { - next; mes "[Old Pharmacist]"; mes "Make up your mind, will you?!"; close; } if (.@amount > 100) { - next; mes "[Old Pharmacist]"; mes "Are you deaf? I said less than 100!"; close; } if ((countitem(507) < .@amount) || (countitem(508) < .@amount) || (countitem(713) < .@amount) || (Zeny < .@amount*3)) { - next; mes "[Old Pharmacist]"; mes "You rascal! You don't even have all the materials and you want me to make you potions?!"; close; @@ -122,7 +119,6 @@ alberta_in,16,28,4 script Pharmacist 61,{ getitem 502,.@amount; //Orange_Potion break; case 3: - next; mes "[Old Pharmacist]"; mes "What?!"; mes "Grrr..."; @@ -188,7 +184,6 @@ L_Making: .@item_req = getarg(0); .@req_amount = getarg(1); - next; mes "[Old Pharmacist]"; if ((countitem(.@item_req)/2) < countitem(713)) { .@max = countitem(.@item_req) /2; @@ -206,9 +201,9 @@ L_Making: close; } mes "How many?"; + next; switch(select("Make as many as I can.:I want to choose an amount.:Actually, I don't want anything.")) { case 1: - next; if ((countitem(.@item_req) < .@max*2) || countitem(713) < .@max || (Zeny < .@max*.@req_amount)) { mes "[Old Pharmacist]"; mes "You rascal! You don't even have all the materials and you want me to make you potions?!"; @@ -220,11 +215,10 @@ L_Making: getitem getarg(2),.@max; break; case 2: - next; mes "[Old Pharmacist]"; mes "Then pick a number below 100. If you don't want any, just enter '0'. With the materials you have, you can make about "+.@max+" potions."; - input .@amount; next; + input .@amount; if (.@amount == 0) { mes "[Old Pharmacist]"; mes "Make up your mind, will you?!"; @@ -246,7 +240,6 @@ L_Making: getitem getarg(2),.@amount; break; case 3: - next; mes "[Old Pharmacist]"; mes "What?!"; mes "Grrr..."; From 9d6b3d06a9d75345d6802087d587a4521a1c3fae Mon Sep 17 00:00:00 2001 From: Atemo <capucrath@gmail.com> Date: Fri, 4 Aug 2017 15:45:57 +0200 Subject: [PATCH 067/124] Fixed readparam when 2nd parameter is a variable Related issue #2276 --- npc/custom/quests/hunting_missions.txt | 2 +- src/map/script.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/npc/custom/quests/hunting_missions.txt b/npc/custom/quests/hunting_missions.txt index 98ad6c1f54..8b6d0db869 100644 --- a/npc/custom/quests/hunting_missions.txt +++ b/npc/custom/quests/hunting_missions.txt @@ -287,7 +287,7 @@ OnNPCKillEvent: if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { set .@Mission_Count, getvar(#Mission_Count, $@partymembercid[.@i]); set .@Mission0, getvar(Mission0, $@partymembercid[.@i]); - set .@HP, getvar(HP, $@partymembercid[.@i]); + set .@HP, readparam(HP, $@partymembercid[.@i]); if (.@Mission_Count && .@Mission0 && .@HP > 0) { getmapxy(.@map2$,.@x2,.@y2,UNITTYPE_PC); diff --git a/src/map/script.c b/src/map/script.c index ab2feca4c1..036a30705d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8152,12 +8152,15 @@ BUILDIN_FUNC(readparam) { int value; struct script_data *data = script_getdata(st, 2); - TBL_PC *sd; + TBL_PC *sd = NULL; if( script_hasdata(st, 3) ){ - if( script_isint(st, 3) ){ + struct script_data *data2 = script_getdata(st, 3); + + get_val(st, data2); + if (data_isint(data2) || script_getnum(st, 3)) { script_charid2sd(3, sd); - }else{ + } else if (data_isstring(data2)) { script_nick2sd(3, sd); } }else{ From fe5f1e115d0f0444b098b9b027108948ec97004e Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Fri, 4 Aug 2017 18:38:39 -0400 Subject: [PATCH 068/124] Added a new item flag for delayed consumption (#2300) * Added a new item flag for delayed consumption * Fixes #550. * The new flag will never consume the item. * Supports script command itemskill. Thanks to @cydh! --- db/import-tmpl/item_flag.txt | 10 ++++++---- db/pre-re/item_flag.txt | 1 + db/re/item_db.txt | 6 +++--- db/re/item_flag.txt | 6 ++++++ src/map/itemdb.c | 1 + src/map/itemdb.h | 2 +- src/map/skill.c | 2 +- 7 files changed, 19 insertions(+), 9 deletions(-) diff --git a/db/import-tmpl/item_flag.txt b/db/import-tmpl/item_flag.txt index a4419df723..b86479885f 100644 --- a/db/import-tmpl/item_flag.txt +++ b/db/import-tmpl/item_flag.txt @@ -2,8 +2,10 @@ // <ItemID>,<Flag> // // <Flag>: -// 1 - As Dead Branch item (will be logged at `branchlog` table and cannot be used at 'nobranch' mapflag) -// 2 - As item group container, check player's inventory and weight before consumed -// 4 - GUID item, cannot be stacked even same or stackable item -// 8 - Item will be bound item when equipped +// 1 - As Dead Branch item (will be logged at `branchlog` table and cannot be used at 'nobranch' mapflag) +// 2 - As item group container, check player's inventory and weight before consumed +// 4 - GUID item, cannot be stacked even same or stackable item +// 8 - Item will be bound item when equipped +// 16 - Special Broadcast: When item dropped by monster and player loot it, will be broadcasted! +// 32 - Item will not be removed on consumption. Also supports 'itemskill' // NOTE: For removing flag by import file, use "-" to remove the flag. Example, 604,-1 will removes flag 1 from Branch_Of_Dead_Tree diff --git a/db/pre-re/item_flag.txt b/db/pre-re/item_flag.txt index 4639dc22f0..ef9cce5b80 100644 --- a/db/pre-re/item_flag.txt +++ b/db/pre-re/item_flag.txt @@ -7,6 +7,7 @@ // 4 - GUID Item: When this item is obtained, will generates GUID that cannot be stacked even same or stackable item // 8 - Item will be bound item when equipped // 16 - Special Broadcast: When item dropped by monster and player loot it, will be broadcasted! +// 32 - Item will not be removed on consumption. Also supports 'itemskill' // NOTE: For removing flag by import file, use "-" to remove the flag. Example, 604,-1 will removes flag 1 from Branch_Of_Dead_Tree // Logged as Dead Branch item diff --git a/db/re/item_db.txt b/db/re/item_db.txt index ae260ab1d0..ac5d7814e6 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -6752,7 +6752,7 @@ 12619,Cgrade_Pocket,C Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getgroupitem(IG_Cgrade_Pocket); },{},{} 12620,Dgrade_Pocket,D Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getgroupitem(IG_Dgrade_Pocket); },{},{} 12621,Egrade_Pocket,E Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getgroupitem(IG_Egrade_Pocket); },{},{} -12622,Boarding_Halter,Reins Of Mount,11,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setmounting(); },{},{ if (ismounting()) setmounting(); } +12622,Boarding_Halter,Reins Of Mount,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setmounting(); },{},{ if (ismounting()) setmounting(); } 12623,High_Weapon_Box,Advanced Weapons Box,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getrandgroupitem(IG_Advanced_Weapons_Box,1); },{},{} 12624,Delicious_Jelly,Delicious Jelly,0,20,,50,,,,,0xFFFFFFFF,63,2,,,,,,{ percentheal 3,3; },{},{} 12625,Sapa_Feat_Cert_Pack,Sapa Feat Cert Pack,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} @@ -7007,7 +7007,7 @@ 12884,Infinite_Concentration_Potion,Infinite Concentration Potion,11,10,,0,,,,0,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_ASPDPOTION0,1800000,4; },{},{} 12885,Infinite_Awakening_Potion,Infinite Awakening Potion,11,10,,0,,,,0,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_ASPDPOTION1,1800000,6; },{},{} 12886,Infinite_Berserk_Potion,Infinite Berserk Potion,11,10,,0,,,,0,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_ASPDPOTION2,1800000,9; },{},{} -12887,C_Wing_Of_Fly,Infinite Flywing,11,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ unitskilluseid getcharid(3),"AL_TELEPORT",1; },{},{} +12887,C_Wing_Of_Fly,Infinite Flywing,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ itemskill "AL_TELEPORT",1; },{},{} 12888,Siege_Kit_Box,Siege Kit Box,18,0,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} 12889,Weapon_Box_Spear,Weapon Box(Spear),2,10,,200,,,,0,0xFFFFFFFF,63,2,,,,,,{},{},{} 12890,Weapon_Box_Mace,Weapon Box(Mace),2,10,,200,,,,0,0xFFFFFFFF,63,2,,,,,,{},{},{} @@ -10873,7 +10873,7 @@ //=================================================================== // New Usable items //=================================================================== -22508,Para_Team_Mark_,Eden Group Mark,11,0,,0,,,,0,0xFFFFFFFF,63,2,,,,,,{ warp "moc_para01",171,115; },{},{} +22508,Para_Team_Mark_,Eden Group Mark,2,0,,0,,,,0,0xFFFFFFFF,63,2,,,,,,{ warp "moc_para01",171,115; },{},{} 22507,ShabbyOldScroll,Old Scroll,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ callfunc "F_22507"; },{},{} 22510,King_Wolf_Scroll,King Wolf Scroll,2,10,,10,,,,0,0xFFFFFFFF,63,2,,,,,,{ /*TODO, confirm the rates*/ getitem callfunc("F_Rand",6635,19598,5658,6238,6239),1; },{},{} 22511,Fenrirs_Power_Scroll,Fenrir's Power Scroll,2,10,,10,,,,0,0xFFFFFFFF,63,2,,,,,,{ bonus_script "bonus bMatk,25; bonus bFixedCastRate,-50;",300,1025; },{},{} diff --git a/db/re/item_flag.txt b/db/re/item_flag.txt index 37d081b862..b68c97c2c0 100644 --- a/db/re/item_flag.txt +++ b/db/re/item_flag.txt @@ -7,6 +7,7 @@ // 4 - GUID Item: When this item is obtained, will generates GUID that cannot be stacked even same or stackable item // 8 - Item will be bound item when equipped // 16 - Special Broadcast: When item dropped by monster and player loot it, will be broadcasted! +// 32 - Item will not be removed on consumption. Also supports 'itemskill' // NOTE: For removing flag by import file, use "-" to remove the flag. Example, 604,-1 will removes flag 1 from Branch_Of_Dead_Tree // Logged as Dead Branch item @@ -1772,3 +1773,8 @@ // Special Broadcast 7782,16 //Gold_Key77 7783,16 //Silver_Key77 + +// Not removed after consumption +12622,32 //Boarding_Halter +12887,32 //C_Wing_Of_Fly +22508,32 //Para_Team_Mark_ diff --git a/src/map/itemdb.c b/src/map/itemdb.c index d32dc933c5..27ecedec70 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -907,6 +907,7 @@ static bool itemdb_read_flag(char* fields[], int columns, int current) { if (flag&4 && itemdb_isstackable2(id)) id->flag.guid = set ? 1 : 0; if (flag&8) id->flag.bindOnEquip = true; if (flag&16) id->flag.broadcast = 1; + if (flag&32) id->flag.delay_consume = 2; return true; } diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 6cbd10b758..4e43123063 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -829,7 +829,7 @@ struct item_data unsigned available : 1; uint32 no_equip; unsigned no_refine : 1; // [celest] - unsigned delay_consume : 1; // Signifies items that are not consumed immediately upon double-click [Skotlex] + unsigned delay_consume : 2; // 1 - Signifies items that are not consumed immediately upon double-click; 2 - Signifies items that are not removed on consumption [Skotlex] unsigned trade_restriction : 9; //Item restrictions mask [Skotlex] unsigned autoequip: 1; unsigned buyingstore : 1; diff --git a/src/map/skill.c b/src/map/skill.c index 70d0d52317..e8139dcff0 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -14865,7 +14865,7 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i } //Consume sd->itemid = sd->itemindex = -1; - if( skill_id == WZ_EARTHSPIKE && sc && sc->data[SC_EARTHSCROLL] && rnd()%100 > sc->data[SC_EARTHSCROLL]->val2 ) // [marquis007] + if( (skill_id == WZ_EARTHSPIKE && sc && sc->data[SC_EARTHSCROLL] && rnd()%100 > sc->data[SC_EARTHSCROLL]->val2) || sd->inventory_data[i]->flag.delay_consume == 2 ) // [marquis007] ; //Do not consume item. else if( sd->inventory.u.items_inventory[i].expire_time == 0 ) pc_delitem(sd,i,1,0,0,LOG_TYPE_CONSUME); // Rental usable items are not consumed until expiration From de3f924afc03a1bd0f7919465ed8cc283ef8695f Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Sat, 5 Aug 2017 00:38:48 +0200 Subject: [PATCH 069/124] SQL synchronization --- sql-files/item_db_re.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 187f0aa8b4..c6b9ef2339 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -6784,7 +6784,7 @@ REPLACE INTO `item_db_re` VALUES (12618,'Bgrade_Pocket','B Grade Coin Bag',2,20, REPLACE INTO `item_db_re` VALUES (12619,'Cgrade_Pocket','C Grade Coin Bag',2,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getgroupitem(IG_Cgrade_Pocket);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12620,'Dgrade_Pocket','D Grade Coin Bag',2,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getgroupitem(IG_Dgrade_Pocket);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12621,'Egrade_Pocket','E Grade Coin Bag',2,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getgroupitem(IG_Egrade_Pocket);',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (12622,'Boarding_Halter','Reins Of Mount',11,0,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'setmounting();',NULL,'if (ismounting()) setmounting();'); +REPLACE INTO `item_db_re` VALUES (12622,'Boarding_Halter','Reins Of Mount',2,0,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'setmounting();',NULL,'if (ismounting()) setmounting();'); REPLACE INTO `item_db_re` VALUES (12623,'High_Weapon_Box','Advanced Weapons Box',2,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getrandgroupitem(IG_Advanced_Weapons_Box,1);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12624,'Delicious_Jelly','Delicious Jelly',0,20,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'percentheal 3,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12625,'Sapa_Feat_Cert_Pack','Sapa Feat Cert Pack',2,0,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); @@ -7039,7 +7039,7 @@ REPLACE INTO `item_db_re` VALUES (12883,'Almighty','Almighty',2,20,NULL,10,NULL, REPLACE INTO `item_db_re` VALUES (12884,'Infinite_Concentration_Potion','Infinite Concentration Potion',11,10,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ASPDPOTION0,1800000,4;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12885,'Infinite_Awakening_Potion','Infinite Awakening Potion',11,10,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ASPDPOTION1,1800000,6;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12886,'Infinite_Berserk_Potion','Infinite Berserk Potion',11,10,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ASPDPOTION2,1800000,9;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (12887,'C_Wing_Of_Fly','Infinite Flywing',11,0,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"AL_TELEPORT",1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (12887,'C_Wing_Of_Fly','Infinite Flywing',2,0,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'itemskill "AL_TELEPORT",1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12888,'Siege_Kit_Box','Siege Kit Box',18,0,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (12889,'Weapon_Box_Spear','Weapon Box(Spear)',2,10,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (12890,'Weapon_Box_Mace','Weapon Box(Mace)',2,10,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); @@ -10905,7 +10905,7 @@ REPLACE INTO `item_db_re` VALUES (22126,'Para_Team_Boots160','Awakened Eden Grou #=================================================================== # New Usable items #=================================================================== -REPLACE INTO `item_db_re` VALUES (22508,'Para_Team_Mark_','Eden Group Mark',11,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "moc_para01",171,115;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22508,'Para_Team_Mark_','Eden Group Mark',2,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "moc_para01",171,115;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22507,'ShabbyOldScroll','Old Scroll',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'callfunc "F_22507";',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22510,'King_Wolf_Scroll','King Wolf Scroll',2,10,NULL,10,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'/*TODO, confirm the rates*/ getitem callfunc("F_Rand",6635,19598,5658,6238,6239),1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22511,'Fenrirs_Power_Scroll','Fenrir\'s Power Scroll',2,10,NULL,10,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'bonus_script "bonus bMatk,25; bonus bFixedCastRate,-50;",300,1025;',NULL,NULL); From bbd42e7f12ee2b06807feed62d25f5a94ce5aa09 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sat, 5 Aug 2017 00:46:17 +0200 Subject: [PATCH 070/124] Cleaned up character deletion code (#2296) * Fixes #2271 Thanks to @Tokeiburu --- src/char/char.cpp | 44 ++++++++++++---- src/char/char.h | 12 ++++- src/char/char_clif.c | 120 ++++++++++++++++++------------------------- 3 files changed, 95 insertions(+), 81 deletions(-) diff --git a/src/char/char.cpp b/src/char/char.cpp index 2ff09d9fc5..688df3da43 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -1518,22 +1518,34 @@ int char_divorce_char_sql(int partner_id1, int partner_id2){ /* Returns 0 if successful * Returns < 0 for error */ -int char_delete_char_sql(uint32 char_id){ +enum e_char_del_response char_delete(struct char_session_data* sd, uint32 char_id){ char name[NAME_LENGTH]; char esc_name[NAME_LENGTH*2+1]; //Name needs be escaped. uint32 account_id; int party_id, guild_id, hom_id, base_level, partner_id, father_id, mother_id, elemental_id; + time_t delete_date; char *data; size_t len; + int i, k; - if (SQL_ERROR == Sql_Query(sql_handle, "SELECT `name`,`account_id`,`party_id`,`guild_id`,`base_level`,`homun_id`,`partner_id`,`father`,`mother`,`elemental_id` FROM `%s` WHERE `char_id`='%d'", schema_config.char_db, char_id)) + ARR_FIND(0, MAX_CHARS, i, sd->found_char[i] == char_id); + + // Such a character does not exist in the account + if (i == MAX_CHARS) { + ShowInfo("Char deletion aborted: %s, Account ID: %u, Character ID: %u\n", name, sd->account_id, char_id); + return CHAR_DELETE_NOTFOUND; + } + + if (SQL_ERROR == Sql_Query(sql_handle, "SELECT `name`,`account_id`,`party_id`,`guild_id`,`base_level`,`homun_id`,`partner_id`,`father`,`mother`,`elemental_id`,`delete_date` FROM `%s` WHERE `account_id`='%u' AND `char_id`='%u'", schema_config.char_db, sd->account_id, char_id)){ Sql_ShowDebug(sql_handle); + return CHAR_DELETE_DATABASE; + } if( SQL_SUCCESS != Sql_NextRow(sql_handle) ) { - ShowError("delete_char_sql: Unable to fetch character data, deletion aborted.\n"); + ShowInfo("Char deletion aborted: %s, Account ID: %u, Character ID: %u\n", name, sd->account_id, char_id); Sql_FreeResult(sql_handle); - return -1; + return CHAR_DELETE_NOTFOUND; } Sql_GetData(sql_handle, 0, &data, &len); safestrncpy(name, data, NAME_LENGTH); @@ -1546,29 +1558,34 @@ int char_delete_char_sql(uint32 char_id){ Sql_GetData(sql_handle, 7, &data, NULL); father_id = atoi(data); Sql_GetData(sql_handle, 8, &data, NULL); mother_id = atoi(data); Sql_GetData(sql_handle, 9, &data, NULL); elemental_id = atoi(data); + Sql_GetData(sql_handle,10, &data, NULL); delete_date = strtoul(data, NULL, 10); Sql_EscapeStringLen(sql_handle, esc_name, name, zmin(len, NAME_LENGTH)); Sql_FreeResult(sql_handle); //check for config char del condition [Lupus] - // TODO: Move this out to packet processing (0x68/0x1fb). if( ( charserv_config.char_config.char_del_level > 0 && base_level >= charserv_config.char_config.char_del_level ) || ( charserv_config.char_config.char_del_level < 0 && base_level <= -charserv_config.char_config.char_del_level ) ) { ShowInfo("Char deletion aborted: %s, BaseLevel: %i\n", name, base_level); - return -1; + return CHAR_DELETE_BASELEVEL; } if (charserv_config.char_config.char_del_restriction&CHAR_DEL_RESTRICT_GUILD && guild_id) // character is in guild { ShowInfo("Char deletion aborted: %s, Guild ID: %i\n", name, guild_id); - return -1; + return CHAR_DELETE_GUILD; } if (charserv_config.char_config.char_del_restriction&CHAR_DEL_RESTRICT_PARTY && party_id) // character is in party { ShowInfo("Char deletion aborted: %s, Party ID: %i\n", name, party_id); - return -1; + return CHAR_DELETE_PARTY; + } + + if( charserv_config.char_config.char_del_delay > 0 && ( !delete_date || delete_date > time(NULL) ) ){ // not queued or delay not yet passed + ShowInfo("Char deletion aborted: %s, Time was not set or has not been reached ye\n", name ); + return CHAR_DELETE_TIME; } /* Divorce [Wizputer] */ @@ -1582,7 +1599,7 @@ int char_delete_char_sql(uint32 char_id){ if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `child`='0' WHERE `char_id`='%d' OR `char_id`='%d'", schema_config.char_db, father_id, mother_id) ) Sql_ShowDebug(sql_handle); - if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `id` = '410'AND (`char_id`='%d' OR `char_id`='%d')", schema_config.skill_db, father_id, mother_id) ) + if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `id` = '410' AND (`char_id`='%d' OR `char_id`='%d')", schema_config.skill_db, father_id, mother_id) ) Sql_ShowDebug(sql_handle); WBUFW(buf,0) = 0x2b25; @@ -1699,7 +1716,14 @@ int char_delete_char_sql(uint32 char_id){ mapif_parse_BreakGuild(0,guild_id); else if( guild_id ) inter_guild_leave(guild_id, account_id, char_id);// Leave your guild. - return 0; + + // refresh character list cache + for(k = i; k < MAX_CHARS-1; k++){ + sd->found_char[k] = sd->found_char[k+1]; + } + sd->found_char[MAX_CHARS-1] = -1; + + return CHAR_DELETE_OK; } /** diff --git a/src/char/char.h b/src/char/char.h index 0163898ea7..9aabae96f2 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -38,6 +38,16 @@ enum e_char_delete_restriction { CHAR_DEL_RESTRICT_ALL }; +enum e_char_del_response { + CHAR_DELETE_OK = 0, + CHAR_DELETE_DATABASE, + CHAR_DELETE_NOTFOUND, + CHAR_DELETE_BASELEVEL, + CHAR_DELETE_GUILD, + CHAR_DELETE_PARTY, + CHAR_DELETE_TIME, +}; + struct Schema_Config { int db_use_sqldbs; char db_path[1024]; @@ -272,7 +282,7 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p); int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p); int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_everything); int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf); -int char_delete_char_sql(uint32 char_id); +enum e_char_del_response char_delete(struct char_session_data* sd, uint32 char_id); int char_rename_char_sql(struct char_session_data *sd, uint32 char_id); int char_divorce_char_sql(int partner_id1, int partner_id2); int char_memitemdata_to_sql(const struct item items[], int max, int id, enum storage_type tableswitch, uint8 stor_id); diff --git a/src/char/char_clif.c b/src/char/char_clif.c index 83c21ff2f1..66cb2262f9 100644 --- a/src/char/char_clif.c +++ b/src/char/char_clif.c @@ -437,8 +437,10 @@ void chclif_char_delete2_ack(int fd, uint32 char_id, uint32 result, time_t delet /// 3 (0x719): A database error occurred. /// 4 (0x71d): Deleting not yet possible time. /// 5 (0x71e): Date of birth do not match. +/// 6 Name does not match. +/// 7 Character Deletion has failed because you have entered an incorrect e-mail address. /// Any (0x718): An unknown error has occurred. -/// HC: <082a>.W <char id>.L <Msg:0-5>.L +/// HC: <082a>.W <char id>.L <Msg>.L void chclif_char_delete2_accept_ack(int fd, uint32 char_id, uint32 result) { #if PACKETVER >= 20130000 if(result == 1 ){ @@ -563,10 +565,7 @@ int chclif_parse_char_delete2_accept(int fd, struct char_session_data* sd) { FIFOSD_CHECK(12) { char birthdate[8+1]; - uint32 char_id, i, k; - unsigned int base_level; - char* data; - time_t delete_date; + uint32 char_id; char_id = RFIFOL(fd,2); ShowInfo(CL_RED"Request Char Deletion: "CL_GREEN"%d (%d)"CL_RESET"\n", sd->account_id, char_id); @@ -583,54 +582,36 @@ int chclif_parse_char_delete2_accept(int fd, struct char_session_data* sd) { birthdate[8] = 0; RFIFOSKIP(fd,12); - ARR_FIND( 0, MAX_CHARS, i, sd->found_char[i] == char_id ); - if( i == MAX_CHARS ) - {// character not found - chclif_char_delete2_accept_ack(fd, char_id, 3); - return 1; - } - - if( SQL_SUCCESS != Sql_Query(sql_handle, "SELECT `base_level`,`delete_date` FROM `%s` WHERE `char_id`='%d'", schema_config.char_db, char_id) || SQL_SUCCESS != Sql_NextRow(sql_handle) ) - {// data error - Sql_ShowDebug(sql_handle); - chclif_char_delete2_accept_ack(fd, char_id, 3); - return 1; - } - - Sql_GetData(sql_handle, 0, &data, NULL); base_level = (unsigned int)strtoul(data, NULL, 10); - Sql_GetData(sql_handle, 1, &data, NULL); delete_date = strtoul(data, NULL, 10); - - if( !delete_date || delete_date>time(NULL) ) - {// not queued or delay not yet passed - chclif_char_delete2_accept_ack(fd, char_id, 4); - return 1; - } - - if (!chclif_delchar_check(sd, birthdate, CHAR_DEL_BIRTHDATE)) { // Only check for birthdate + // Only check for birthdate + if (!chclif_delchar_check(sd, birthdate, CHAR_DEL_BIRTHDATE)) { chclif_char_delete2_accept_ack(fd, char_id, 5); return 1; } - if( ( charserv_config.char_config.char_del_level > 0 && base_level >= (unsigned int)charserv_config.char_config.char_del_level ) - || ( charserv_config.char_config.char_del_level < 0 && base_level <= (unsigned int)(-charserv_config.char_config.char_del_level) ) ) - {// character level config restriction - chclif_char_delete2_accept_ack(fd, char_id, 2); - return 1; + switch( char_delete(sd,char_id) ){ + // success + case CHAR_DELETE_OK: + chclif_char_delete2_accept_ack(fd, char_id, 1); + break; + // data error + case CHAR_DELETE_DATABASE: + // character not found + case CHAR_DELETE_NOTFOUND: + chclif_char_delete2_accept_ack(fd, char_id, 3); + break; + // in a party + case CHAR_DELETE_PARTY: + // in a guild + case CHAR_DELETE_GUILD: + // character level config restriction + case CHAR_DELETE_BASELEVEL: + chclif_char_delete2_accept_ack(fd, char_id, 2); + break; + // not queued or delay not yet passed + case CHAR_DELETE_TIME: + chclif_char_delete2_accept_ack(fd, char_id, 4); + break; } - - // success - if( char_delete_char_sql(char_id) < 0 ){ - chclif_char_delete2_accept_ack(fd, char_id, 3); - return 1; - } - - // refresh character list cache - for(k = i; k < MAX_CHARS-1; k++){ - sd->found_char[k] = sd->found_char[k+1]; - } - sd->found_char[MAX_CHARS-1] = -1; - - chclif_char_delete2_accept_ack(fd, char_id, 1); } return 1; } @@ -993,7 +974,9 @@ int chclif_parse_createnewchar(int fd, struct char_session_data* sd,int cmd){ * 0x70 <ErrorCode>B HC_REFUSE_DELETECHAR * @param fd * @param ErrorCode - * 00 = Incorrect Email address + * 00 = Incorrect Email address + * 01 = Invalid Slot + * 02 = In a party or guild */ void chclif_refuse_delchar(int fd, uint8 errCode){ WFIFOHEAD(fd,3); @@ -1008,10 +991,9 @@ int chclif_parse_delchar(int fd,struct char_session_data* sd, int cmd){ else return 0; { char email[40]; - int i, ch; - int cid = RFIFOL(fd,2); + uint32 cid = RFIFOL(fd,2); - ShowInfo(CL_RED"Request Char Deletion: "CL_GREEN"%d (%d)"CL_RESET"\n", sd->account_id, cid); + ShowInfo(CL_RED"Request Char Deletion: "CL_GREEN"%u (%u)"CL_RESET"\n", sd->account_id, cid); memcpy(email, RFIFOP(fd,6), 40); RFIFOSKIP(fd,( cmd == 0x68) ? 46 : 56); @@ -1020,26 +1002,24 @@ int chclif_parse_delchar(int fd,struct char_session_data* sd, int cmd){ return 1; } - // check if this char exists - ARR_FIND( 0, MAX_CHARS, i, sd->found_char[i] == cid ); - if( i == MAX_CHARS ) { // Such a character does not exist in the account - chclif_refuse_delchar(fd,0); - return 1; - } - - // remove char from list and compact it - for(ch = i; ch < MAX_CHARS-1; ch++) - sd->found_char[ch] = sd->found_char[ch+1]; - sd->found_char[MAX_CHARS-1] = -1; - /* Delete character */ - if(char_delete_char_sql(cid)<0){ - //can't delete the char - //either SQL error or can't delete by some CONFIG conditions - //del fail - chclif_refuse_delchar(fd,0); - return 1; + switch( char_delete(sd,cid) ){ + case CHAR_DELETE_OK: + break; + case CHAR_DELETE_DATABASE: + case CHAR_DELETE_BASELEVEL: + case CHAR_DELETE_TIME: + chclif_refuse_delchar(fd, 0); + return 1; + case CHAR_DELETE_NOTFOUND: + chclif_refuse_delchar(fd, 1); + return 1; + case CHAR_DELETE_GUILD: + case CHAR_DELETE_PARTY: + chclif_refuse_delchar(fd, 2); + return 1; } + /* Char successfully deleted.*/ WFIFOHEAD(fd,2); WFIFOW(fd,0) = 0x6f; From cd164d74cd691c8a469995f7fb97b8f613f4c3c6 Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Fri, 4 Aug 2017 19:11:05 -0400 Subject: [PATCH 071/124] Removed some hardcoded item checks (#2303) * Fixes #991. * Removed hardcoded checks for SC_ITEMBOOST, SC_EXPBOOST, and SC_JEXPBOOST. * Players are able to still consume these items even if the status is already active. * Corrected the item bonus for Malangdo Cat Can. Thanks to @cydh! --- db/re/item_db.txt | 2 +- src/map/itemdb.h | 10 ---------- src/map/pc.c | 19 ------------------- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index ac5d7814e6..9c6e0e99a6 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -6763,7 +6763,7 @@ 12630,Teddy_Bear_Scroll,Teddy Bear Scroll,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ mercenary_create 2217,1800000; },{},{} 12631,Macro_Stone_A,Macro Stone A,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} 12632,Macro_Stone_B,Macro Stone B,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} -12633,Malang_Cat_Can,Malangdo Cat Can,2,20,,50,,,,,0xFFFFFFFF,63,2,,,,,,{ specialeffect2 EF_MAGICALATTHIT; bonus_script "{ bonus2 bExpAddRace,RC_All,10; }",1200; sc_start SC_ITEMBOOST,1200000,20; },{},{} +12633,Malang_Cat_Can,Malangdo Cat Can,2,20,,50,,,,,0xFFFFFFFF,63,2,,,,,,{ specialeffect2 EF_MAGICALATTHIT; bonus_script "{ bonus2 bExpAddRace,RC_All,10; bonus2 bDropAddRace,RC_All,20; }",1200,1,0,SI_OVERLAPEXPUP; },{},{} 12634,Macro_Stone_A1,Macro Stone A1,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} 12635,Macro_Stone_A2,Macro Stone A2,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} 12636,Malang_Sp_Can,Malangdo Canned Specialties,2,20,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "malangdo",140,114; },{},{} diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 4e43123063..fe3171335a 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -97,34 +97,24 @@ enum item_itemid ITEMID_CATNIP_FRUIT = 11602, ITEMID_MERCENARY_RED_POTION = 12184, ITEMID_MERCENARY_BLUE_POTION = 12185, - ITEMID_BATTLE_MANUAL = 12208, - ITEMID_BUBBLE_GUM = 12210, ITEMID_GIANT_FLY_WING = 12212, ITEMID_NEURALIZER = 12213, ITEMID_M_CENTER_POTION = 12241, ITEMID_M_AWAKENING_POTION = 12242, ITEMID_M_BERSERK_POTION = 12243, - ITEMID_COMP_BATTLE_MANUAL = 12263, - ITEMID_THICK_BATTLE_MANUAL = 12312, ITEMID_N_FLY_WING = 12323, ITEMID_N_BUTTERFLY_WING = 12324, ITEMID_NOVICE_MAGNIFIER = 12325, ITEMID_ANCILLA = 12333, ITEMID_DUN_TELE_SCROLL3 = 12352, ITEMID_REINS_OF_MOUNT = 12622, - ITEMID_COMP_BUBBLE_GUM = 12264, - ITEMID_NOBLE_NAMEPLATE = 12705, ITEMID_DUN_TELE_SCROLL1 = 14527, - ITEMID_BATTLE_MANUAL25 = 14532, - ITEMID_BATTLE_MANUAL100 = 14533, - ITEMID_BATTLE_MANUAL300 = 14545, ITEMID_DUN_TELE_SCROLL2 = 14581, ITEMID_WOB_RUNE = 14582, ITEMID_WOB_SCHWALTZ = 14583, ITEMID_WOB_RACHEL = 14584, ITEMID_WOB_LOCAL = 14585, ITEMID_SIEGE_TELEPORT_SCROLL = 14591, - ITEMID_JOB_MANUAL50 = 14592, }; ///Rune Knight diff --git a/src/map/pc.c b/src/map/pc.c index a3b11df20a..7718840ae1 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4835,25 +4835,6 @@ bool pc_isUseitem(struct map_session_data *sd,int n) if( map[sd->bl.m].flag.noreturn && nameid != ITEMID_WING_OF_FLY && nameid != ITEMID_GIANT_FLY_WING && nameid != ITEMID_N_FLY_WING ) return false; break; - case ITEMID_BUBBLE_GUM: - case ITEMID_COMP_BUBBLE_GUM: - if( sd->sc.data[SC_ITEMBOOST] ) - return false; - break; - case ITEMID_BATTLE_MANUAL: - case ITEMID_COMP_BATTLE_MANUAL: - case ITEMID_THICK_BATTLE_MANUAL: - case ITEMID_NOBLE_NAMEPLATE: - case ITEMID_BATTLE_MANUAL25: - case ITEMID_BATTLE_MANUAL100: - case ITEMID_BATTLE_MANUAL300: - if( sd->sc.data[SC_EXPBOOST] ) - return false; - break; - case ITEMID_JOB_MANUAL50: - if( sd->sc.data[SC_JEXPBOOST] ) - return false; - break; case ITEMID_MERCENARY_RED_POTION: case ITEMID_MERCENARY_BLUE_POTION: case ITEMID_M_CENTER_POTION: From 93cf197a2f2e6355d05adc5bdfb405c6e610e469 Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Sat, 5 Aug 2017 01:11:12 +0200 Subject: [PATCH 072/124] SQL synchronization --- sql-files/item_db_re.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index c6b9ef2339..0b8f91ad47 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -6795,7 +6795,7 @@ REPLACE INTO `item_db_re` VALUES (12629,'Salamander_Scroll','Salamander Scroll', REPLACE INTO `item_db_re` VALUES (12630,'Teddy_Bear_Scroll','Teddy Bear Scroll',2,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'mercenary_create 2217,1800000;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12631,'Macro_Stone_A','Macro Stone A',2,0,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (12632,'Macro_Stone_B','Macro Stone B',2,0,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (12633,'Malang_Cat_Can','Malangdo Cat Can',2,20,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'specialeffect2 EF_MAGICALATTHIT; bonus_script "{ bonus2 bExpAddRace,RC_All,10; }",1200; sc_start SC_ITEMBOOST,1200000,20;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (12633,'Malang_Cat_Can','Malangdo Cat Can',2,20,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'specialeffect2 EF_MAGICALATTHIT; bonus_script "{ bonus2 bExpAddRace,RC_All,10; bonus2 bDropAddRace,RC_All,20; }",1200,1,0,SI_OVERLAPEXPUP;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12634,'Macro_Stone_A1','Macro Stone A1',2,0,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (12635,'Macro_Stone_A2','Macro Stone A2',2,0,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (12636,'Malang_Sp_Can','Malangdo Canned Specialties',2,20,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "malangdo",140,114;',NULL,NULL); From 115c1b9f5f521c2b15f8989d1320c3ec7e80676f Mon Sep 17 00:00:00 2001 From: Atemo <capucrath@gmail.com> Date: Sat, 5 Aug 2017 13:42:39 +0200 Subject: [PATCH 073/124] Fixed a typo in quests_eclage.txt issue #2311 --- npc/re/quests/quests_eclage.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/npc/re/quests/quests_eclage.txt b/npc/re/quests/quests_eclage.txt index 4aac99ca2a..7aa00d55fd 100644 --- a/npc/re/quests/quests_eclage.txt +++ b/npc/re/quests/quests_eclage.txt @@ -2105,7 +2105,6 @@ ecl_fild01,97,315,4 script Traveler#ep14_2 4_M_JOB_HUNTER,{ mes "Oh, you came to ask me about the feather, too?"; mes "It's just a plain old decoration, but everyone really likes to bother me about it."; next; - mes "Traveler#ep14_2fl"; mes "[Traveler]"; mes "If you are thinking about selling it, you should just give up."; next; From ee1242908b0897b704d0b48b02d6fa281c95e2d4 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 6 Aug 2017 12:55:59 +0200 Subject: [PATCH 074/124] Fixed a memory leak in achievementremove Fixes #2313 Thanks to @CairoLee --- src/map/achievement.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/map/achievement.c b/src/map/achievement.c index dc6c45a516..875724709a 100644 --- a/src/map/achievement.c +++ b/src/map/achievement.c @@ -131,6 +131,7 @@ bool achievement_remove(struct map_session_data *sd, int achievement_id) if (i != sd->achievement_data.count - 1) memmove(&sd->achievement_data.achievements[i], &sd->achievement_data.achievements[i + 1], sizeof(struct achievement) * (sd->achievement_data.count - 1 - i)); + aFree(&sd->achievement_data.achievements[sd->achievement_data.count-1]); sd->achievement_data.count--; if (!sd->achievement_data.achievements[i].completed) sd->achievement_data.incompleteCount--; From 70c14fa567a6c5997a0db802f1bf1363f1e7672e Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 6 Aug 2017 13:10:34 +0200 Subject: [PATCH 075/124] Fixed achievement handling in OnPCStatCalcEvent Fixes #2314 Thanks to @CairoLee --- src/char/int_achievement.c | 4 ++++ src/map/intif.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/char/int_achievement.c b/src/char/int_achievement.c index 1599dcc6b6..9eed8239c1 100644 --- a/src/char/int_achievement.c +++ b/src/char/int_achievement.c @@ -4,6 +4,7 @@ #include "../common/db.h" #include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/showmsg.h" #include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" @@ -78,6 +79,9 @@ struct achievement *mapif_achievements_fromsql(uint32 char_id, int *count) SqlStmt_Free(stmt); StringBuf_Clear(&buf); + + ShowInfo("achievement load complete from DB - id: %d (total: %d)\n", char_id, *count); + return achievelog; } diff --git a/src/map/intif.c b/src/map/intif.c index 18ec4d1401..f0720eec14 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -2112,6 +2112,8 @@ void intif_parse_achievements(int fd) if (sd->achievement_data.achievements) { aFree(sd->achievement_data.achievements); sd->achievement_data.achievements = NULL; + sd->achievement_data.incompleteCount = 0; + sd->achievement_data.count = 0; } } else { struct achievement *received = (struct achievement *)RFIFOP(fd, 8); From 43949b8ab6bfc9134b56ba47cc3787cf85253430 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 6 Aug 2017 13:23:30 +0200 Subject: [PATCH 076/124] Fixed misleading indentation in script.c Fixes #2307 Thanks to @Akkarinage --- src/map/script.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/map/script.c b/src/map/script.c index 036a30705d..fd11064720 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3461,6 +3461,7 @@ void pop_stack(struct script_state* st, int start, int end) } data->type = C_NOP; } + // move the rest of the elements if( stack->sp > end ) { @@ -3468,13 +3469,26 @@ void pop_stack(struct script_state* st, int start, int end) for( i = start + stack->sp - end; i < stack->sp; ++i ) stack->stack_data[i].type = C_NOP; } + // adjust stack pointers - if( st->start > end ) st->start -= end - start; - else if( st->start > start ) st->start = start; - if( st->end > end ) st->end -= end - start; - else if( st->end > start ) st->end = start; - if( stack->defsp > end ) stack->defsp -= end - start; - else if( stack->defsp > start ) stack->defsp = start; + if( st->start > end ){ + st->start -= end - start; + }else if( st->start > start ){ + st->start = start; + } + + if( st->end > end ){ + st->end -= end - start; + }else if( st->end > start ){ + st->end = start; + } + + if( stack->defsp > end ){ + stack->defsp -= end - start; + }else if( stack->defsp > start ){ + stack->defsp = start; + } + stack->sp -= end - start; } From 983d164b7da53438723b2dd078a936ddf06b60a2 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 6 Aug 2017 13:49:29 +0200 Subject: [PATCH 077/124] Fixed public equip switch not being saved Fixes #2310 Thanks to @mrjnumber1 --- sql-files/main.sql | 1 + sql-files/upgrades/upgrade_20170806.sql | 2 ++ src/char/char.cpp | 19 +++++++++++-------- src/common/mmo.h | 6 ------ 4 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 sql-files/upgrades/upgrade_20170806.sql diff --git a/sql-files/main.sql b/sql-files/main.sql index 57be49e635..78cff49c03 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -255,6 +255,7 @@ CREATE TABLE IF NOT EXISTS `char` ( `clan_id` int(11) unsigned NOT NULL default '0', `last_login` datetime DEFAULT NULL, `title_id` INT(11) unsigned NOT NULL default '0', + `show_equip` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`), UNIQUE KEY `name_key` (`name`), KEY `account_id` (`account_id`), diff --git a/sql-files/upgrades/upgrade_20170806.sql b/sql-files/upgrades/upgrade_20170806.sql new file mode 100644 index 0000000000..041474e37d --- /dev/null +++ b/sql-files/upgrades/upgrade_20170806.sql @@ -0,0 +1,2 @@ +ALTER TABLE `char` + ADD COLUMN `show_equip` tinyint(3) unsigned NOT NULL default '0' AFTER `title_id`; diff --git a/src/char/char.cpp b/src/char/char.cpp index 688df3da43..9b75314fab 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -300,7 +300,8 @@ int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p){ (p->head_mid != cp->head_mid) || (p->head_bottom != cp->head_bottom) || (p->delete_date != cp->delete_date) || (p->rename != cp->rename) || (p->robe != cp->robe) || (p->character_moves != cp->character_moves) || (p->unban_time != cp->unban_time) || (p->font != cp->font) || (p->uniqueitem_counter != cp->uniqueitem_counter) || - (p->hotkey_rowshift != cp->hotkey_rowshift) || (p->clan_id != cp->clan_id ) || (p->title_id != cp->title_id) + (p->hotkey_rowshift != cp->hotkey_rowshift) || (p->clan_id != cp->clan_id ) || (p->title_id != cp->title_id) || + (p->show_equip != cp->show_equip) ) { //Save status if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `base_level`='%d', `job_level`='%d'," @@ -311,7 +312,7 @@ int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p){ "`weapon`='%d',`shield`='%d',`head_top`='%d',`head_mid`='%d',`head_bottom`='%d'," "`last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d', `rename`='%d'," "`delete_date`='%lu',`robe`='%d',`moves`='%d',`font`='%u',`uniqueitem_counter`='%u'," - "`hotkey_rowshift`='%d', `clan_id`='%d', `title_id`='%lu'" + "`hotkey_rowshift`='%d', `clan_id`='%d', `title_id`='%lu', `show_equip`='%d'" " WHERE `account_id`='%d' AND `char_id` = '%d'", schema_config.char_db, p->base_level, p->job_level, p->base_exp, p->job_exp, p->zeny, @@ -323,7 +324,7 @@ int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p){ mapindex_id2name(p->save_point.map), p->save_point.x, p->save_point.y, p->rename, (unsigned long)p->delete_date, // FIXME: platform-dependent size p->robe, p->character_moves, p->font, p->uniqueitem_counter, - p->hotkey_rowshift, p->clan_id, p->title_id, + p->hotkey_rowshift, p->clan_id, p->title_id, p->show_equip, p->account_id, p->char_id) ) { Sql_ShowDebug(sql_handle); @@ -917,7 +918,7 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) { "`str`,`agi`,`vit`,`int`,`dex`,`luk`,`max_hp`,`hp`,`max_sp`,`sp`," "`status_point`,`skill_point`,`option`,`karma`,`manner`,`hair`,`hair_color`," "`clothes_color`,`body`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,`last_map`,`rename`,`delete_date`," - "`robe`,`moves`,`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`title_id`" + "`robe`,`moves`,`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`title_id`,`show_equip`" " FROM `%s` WHERE `account_id`='%d' AND `char_num` < '%d'", schema_config.char_db, sd->account_id, MAX_CHARS) || SQL_ERROR == SqlStmt_Execute(stmt) || SQL_ERROR == SqlStmt_BindColumn(stmt, 0, SQLDT_INT, &p.char_id, 0, NULL, NULL) @@ -962,8 +963,9 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) { || SQL_ERROR == SqlStmt_BindColumn(stmt, 39, SQLDT_UCHAR, &p.font, 0, NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 40, SQLDT_UINT, &p.uniqueitem_counter, 0, NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 41, SQLDT_ENUM, &sex, sizeof(sex), NULL, NULL) - || SQL_ERROR == SqlStmt_BindColumn(stmt, 42, SQLDT_UCHAR, &p.hotkey_rowshift, 0, NULL, NULL) - || SQL_ERROR == SqlStmt_BindColumn(stmt, 43, SQLDT_ULONG, &p.title_id, 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 42, SQLDT_UCHAR, &p.hotkey_rowshift, 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 43, SQLDT_ULONG, &p.title_id, 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 44, SQLDT_UINT16, &p.show_equip, 0, NULL, NULL) ) { SqlStmt_ShowDebug(stmt); @@ -1027,7 +1029,7 @@ int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_ev "`status_point`,`skill_point`,`option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`,`homun_id`,`elemental_id`,`hair`," "`hair_color`,`clothes_color`,`body`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,`last_map`,`last_x`,`last_y`," "`save_map`,`save_x`,`save_y`,`partner_id`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`,`robe`, `moves`," - "`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`clan_id`,`title_id`" + "`unban_time`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`clan_id`,`title_id`,`show_equip`" " FROM `%s` WHERE `char_id`=? LIMIT 1", schema_config.char_db) || SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0) || SQL_ERROR == SqlStmt_Execute(stmt) @@ -1091,7 +1093,8 @@ int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_ev || SQL_ERROR == SqlStmt_BindColumn(stmt, 57, SQLDT_ENUM, &sex, sizeof(sex), NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 58, SQLDT_UCHAR, &p->hotkey_rowshift, 0, NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 59, SQLDT_INT, &p->clan_id, 0, NULL, NULL) - || SQL_ERROR == SqlStmt_BindColumn(stmt, 60, SQLDT_ULONG, &p->title_id, 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 60, SQLDT_ULONG, &p->title_id, 0, NULL, NULL) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 61, SQLDT_UINT16, &p->show_equip, 0, NULL, NULL) ) { SqlStmt_ShowDebug(stmt); diff --git a/src/common/mmo.h b/src/common/mmo.h index 58c1080827..d793e162e9 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -262,12 +262,6 @@ enum e_skill_flag SKILL_FLAG_REPLACED_LV_0 = 10, // temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0', }; -enum e_mmo_charstatus_opt { - OPT_NONE = 0x0, - OPT_SHOW_EQUIP = 0x1, - OPT_ALLOW_PARTY = 0x2, -}; - struct s_skill { uint16 id; uint8 lv; From f8e4aabf87744c9bdc048548a0a60f7de20a4165 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 6 Aug 2017 17:48:24 +0200 Subject: [PATCH 078/124] Follow up to 70c14fa --- src/map/script.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/src/map/script.c b/src/map/script.c index fd11064720..ebf895bf28 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -23280,6 +23280,16 @@ BUILDIN_FUNC(achievementadd) { return SCRIPT_CMD_FAILURE; } + if( !sd->state.pc_loaded ){ + if( !running_npc_stat_calc_event ){ + ShowError( "buildin_achievementadd: call was too early. Character %s(CID: '%u') was not loaded yet.\n", sd->status.name, sd->status.char_id ); + return SCRIPT_CMD_FAILURE; + }else{ + // Simply ignore it on the first call, because the status will be recalculated after loading anyway + return SCRIPT_CMD_SUCCESS; + } + } + if (achievement_add(sd, achievement_id)) script_pushint(st, true); else @@ -23307,6 +23317,16 @@ BUILDIN_FUNC(achievementremove) { return SCRIPT_CMD_SUCCESS; } + if( !sd->state.pc_loaded ){ + if( !running_npc_stat_calc_event ){ + ShowError( "buildin_achievementremove: call was too early. Character %s(CID: '%u') was not loaded yet.\n", sd->status.name, sd->status.char_id ); + return SCRIPT_CMD_FAILURE; + }else{ + // Simply ignore it on the first call, because the status will be recalculated after loading anyway + return SCRIPT_CMD_SUCCESS; + } + } + if (achievement_remove(sd, achievement_id)) script_pushint(st, true); else @@ -23327,6 +23347,23 @@ BUILDIN_FUNC(achievementinfo) { return SCRIPT_CMD_FAILURE; } + if (achievement_search(achievement_id) == &achievement_dummy) { + ShowWarning("buildin_achievementinfo: Achievement '%d' doesn't exist.\n", achievement_id); + script_pushint(st, false); + return SCRIPT_CMD_FAILURE; + } + + if( !sd->state.pc_loaded ){ + script_pushint(st, false); + if( !running_npc_stat_calc_event ){ + ShowError( "buildin_achievementinfo: call was too early. Character %s(CID: '%u') was not loaded yet.\n", sd->status.name, sd->status.char_id ); + return SCRIPT_CMD_FAILURE; + }else{ + // Simply ignore it on the first call, because the status will be recalculated after loading anyway + return SCRIPT_CMD_SUCCESS; + } + } + script_pushint(st, achievement_check_progress(sd, achievement_id, script_getnum(st, 3))); return SCRIPT_CMD_SUCCESS; } @@ -23350,6 +23387,17 @@ BUILDIN_FUNC(achievementcomplete) { return SCRIPT_CMD_FAILURE; } + + if( !sd->state.pc_loaded ){ + if( !running_npc_stat_calc_event ){ + ShowError( "buildin_achievementcomplete: call was too early. Character %s(CID: '%u') was not loaded yet.\n", sd->status.name, sd->status.char_id ); + return SCRIPT_CMD_FAILURE; + }else{ + // Simply ignore it on the first call, because the status will be recalculated after loading anyway + return SCRIPT_CMD_SUCCESS; + } + } + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); if (i == sd->achievement_data.count) achievement_add(sd, achievement_id); @@ -23377,6 +23425,17 @@ BUILDIN_FUNC(achievementexists) { return SCRIPT_CMD_SUCCESS; } + if( !sd->state.pc_loaded ){ + script_pushint(st, false); + if( !running_npc_stat_calc_event ){ + ShowError( "buildin_achievementexists: call was too early. Character %s(CID: '%u') was not loaded yet.\n", sd->status.name, sd->status.char_id ); + return SCRIPT_CMD_FAILURE; + }else{ + // Simply ignore it on the first call, because the status will be recalculated after loading anyway + return SCRIPT_CMD_SUCCESS; + } + } + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); script_pushint(st, i < sd->achievement_data.count ? true : false); return SCRIPT_CMD_SUCCESS; @@ -23405,6 +23464,16 @@ BUILDIN_FUNC(achievementupdate) { return SCRIPT_CMD_FAILURE; } + if( !sd->state.pc_loaded ){ + if( !running_npc_stat_calc_event ){ + ShowError( "buildin_achievementupdate: call was too early. Character %s(CID: '%u') was not loaded yet.\n", sd->status.name, sd->status.char_id ); + return SCRIPT_CMD_FAILURE; + }else{ + // Simply ignore it on the first call, because the status will be recalculated after loading anyway + return SCRIPT_CMD_SUCCESS; + } + } + ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id); if (i == sd->achievement_data.count) achievement_add(sd, achievement_id); From 5424ab85c974fb2c0d0a5f070c12265f2fd0ae98 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 6 Aug 2017 18:11:54 +0200 Subject: [PATCH 079/124] Fixed mob database reloading Fixes #2304 Thanks to @uddevil and @anacondaqq Closes #2305 Thanks to @vstumpf --- src/map/mob.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/src/map/mob.c b/src/map/mob.c index 639cd28553..714124d4e5 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -5189,24 +5189,23 @@ static void mob_load(void) mob_skill_db_set(); } -void mob_reload(void) { - int i; - - //Mob skills need to be cleared before re-reading them. [Skotlex] - for (i = 0; i < MAX_MOB_DB; i++) { - if (mob_db_data[i]) { - memset(&mob_db_data[i]->skill,0,sizeof(mob_db_data[i]->skill)); - mob_db_data[i]->maxskill = 0; - } - } - - // Clear item_drop_ratio_db - mob_item_drop_ratio->clear(mob_item_drop_ratio, mob_item_drop_ratio_free); - mob_skill_db->clear(mob_skill_db, mob_skill_db_free); - mob_summon_db->clear(mob_summon_db, mob_summon_db_free); +void mob_db_load(void){ + memset(mob_db_data,0,sizeof(mob_db_data)); //Clear the array + mob_db_data[0] = (struct mob_db*)aCalloc(1, sizeof (struct mob_db)); //This mob is used for random spawns + mob_makedummymobdb(0); //The first time this is invoked, it creates the dummy mob + item_drop_ers = ers_new(sizeof(struct item_drop),"mob.c::item_drop_ers",ERS_OPT_CLEAN); + item_drop_list_ers = ers_new(sizeof(struct item_drop_list),"mob.c::item_drop_list_ers",ERS_OPT_NONE); + mob_item_drop_ratio = idb_alloc(DB_OPT_BASE); + mob_skill_db = idb_alloc(DB_OPT_BASE); + mob_summon_db = idb_alloc(DB_OPT_BASE); mob_load(); } +void mob_reload(void) { + do_final_mob(); + mob_db_load(); +} + void mob_clear_spawninfo() { //Clears spawn related information for a script reload. int i; @@ -5219,15 +5218,7 @@ void mob_clear_spawninfo() * Circumference initialization of mob *------------------------------------------*/ void do_init_mob(void){ - memset(mob_db_data,0,sizeof(mob_db_data)); //Clear the array - mob_db_data[0] = (struct mob_db*)aCalloc(1, sizeof (struct mob_db)); //This mob is used for random spawns - mob_makedummymobdb(0); //The first time this is invoked, it creates the dummy mob - item_drop_ers = ers_new(sizeof(struct item_drop),"mob.c::item_drop_ers",ERS_OPT_CLEAN); - item_drop_list_ers = ers_new(sizeof(struct item_drop_list),"mob.c::item_drop_list_ers",ERS_OPT_NONE); - mob_item_drop_ratio = idb_alloc(DB_OPT_BASE); - mob_skill_db = idb_alloc(DB_OPT_BASE); - mob_summon_db = idb_alloc(DB_OPT_BASE); - mob_load(); + mob_db_load(); add_timer_func_list(mob_delayspawn,"mob_delayspawn"); add_timer_func_list(mob_delay_item_drop,"mob_delay_item_drop"); From 829f0a1f597a545d1ea635233aea273a6ab3f361 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 6 Aug 2017 22:25:47 +0200 Subject: [PATCH 080/124] Added dummy entries for the equip switch feature With this the players will not get disconnected when they click the button or drag an item into the new part of the equip window. --- src/map/clif_packetdb.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/map/clif_packetdb.h b/src/map/clif_packetdb.h index c5b1603fae..a3fdc3724f 100644 --- a/src/map/clif_packetdb.h +++ b/src/map/clif_packetdb.h @@ -2318,6 +2318,13 @@ packet(0x0A37,59); #endif +// 2016-09-28cRagexeRE +#if PACKETVER >= 20160928 + parseable_packet(0x0A97,8,clif_parse_dull); + parseable_packet(0x0A99,4,clif_parse_dull); + parseable_packet(0x0A9C,2,clif_parse_dull); +#endif + // 2016-10-26bRagexeRE #if PACKETVER >= 20161026 packet(0x0AA5,-1); From a46e012619cc02d7bd5fd1f4fc14ef44284f9de0 Mon Sep 17 00:00:00 2001 From: Jittapan Pluemsumran <nightsheep@outlook.com> Date: Mon, 7 Aug 2017 06:33:47 +0700 Subject: [PATCH 081/124] Made cbasetypes.h more C++ compatible (#2315) * Removed inline macro in cbasetypes.h * Renamed swap macro to avoid name clash with std::swap --- src/char/int_mail.c | 2 +- src/common/cbasetypes.h | 12 +++++++----- src/common/timer.c | 8 ++++---- src/map/atcommand.c | 4 ++-- src/map/map.cpp | 20 ++++++++++---------- src/map/mob.c | 4 ++-- src/map/path.c | 4 ++-- src/map/pc.c | 2 +- src/map/script.c | 10 +++++----- src/map/searchstore.c | 2 +- src/map/skill.c | 8 ++++---- 11 files changed, 39 insertions(+), 37 deletions(-) diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 9859a19124..6592692b68 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -485,7 +485,7 @@ static void mapif_Mail_return(int fd, uint32 char_id, int mail_id) char temp_[MAIL_TITLE_LENGTH]; // swap sender and receiver - swap(msg.send_id, msg.dest_id); + SWAP(msg.send_id, msg.dest_id); safestrncpy(temp_, msg.send_name, NAME_LENGTH); safestrncpy(msg.send_name, msg.dest_name, NAME_LENGTH); safestrncpy(msg.dest_name, temp_, NAME_LENGTH); diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index a2c06e8493..d874e6db6e 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -249,7 +249,9 @@ typedef uintptr_t uintptr; // keyword replacement #ifdef _MSC_VER // For MSVC (windows) +#ifndef __cplusplus #define inline __inline +#endif #define forceinline __forceinline #define ra_align(n) __declspec(align(n)) #define _chdir chdir @@ -277,15 +279,15 @@ typedef char bool; ////////////////////////////////////////////////////////////////////////// // macro tools -#ifdef swap // just to be sure -#undef swap +#ifdef SWAP // just to be sure +#undef SWAP #endif // hmm only ints? -//#define swap(a,b) { int temp=a; a=b; b=temp;} +//#define SWAP(a,b) { int temp=a; a=b; b=temp;} // if using macros then something that is type independent -//#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b))) +//#define SWAP(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b))) // Avoid "value computed is not used" warning and generates the same assembly code -#define swap(a,b) if (a != b) ((a ^= b), (b ^= a), (a ^= b)) +#define SWAP(a,b) if (a != b) ((a ^= b), (b ^= a), (a ^= b)) #define swap_ptr(a,b) if ((a) != (b)) ((a) = (void*)((intptr_t)(a) ^ (intptr_t)(b)), (b) = (void*)((intptr_t)(a) ^ (intptr_t)(b)), (a) = (void*)((intptr_t)(a) ^ (intptr_t)(b))) ////////////////////////////////////////////////////////////////////////// diff --git a/src/common/timer.c b/src/common/timer.c index 32a368fe92..0ef2a1c00b 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -198,7 +198,7 @@ unsigned int gettick(void) static void push_timer_heap(int tid) { BHEAP_ENSURE(timer_heap, 1, 256); - BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP, swap); + BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP, SWAP); } /*========================== @@ -335,9 +335,9 @@ int settick_timer(int tid, unsigned int tick) return (int)tick;// nothing to do, already in propper position // pop and push adjusted timer - BHEAP_POPINDEX(timer_heap, i, DIFFTICK_MINTOPCMP, swap); + BHEAP_POPINDEX(timer_heap, i, DIFFTICK_MINTOPCMP, SWAP); timer_data[tid].tick = tick; - BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP, swap); + BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP, SWAP); return (int)tick; } @@ -357,7 +357,7 @@ int do_timer(unsigned int tick) break; // no more expired timers to process // remove timer - BHEAP_POP(timer_heap, DIFFTICK_MINTOPCMP, swap); + BHEAP_POP(timer_heap, DIFFTICK_MINTOPCMP, SWAP); timer_data[tid].type |= TIMER_REMOVE_HEAP; if( timer_data[tid].func ) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index b9280b6c38..ea3a9ad0b2 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -428,8 +428,8 @@ static void warp_get_suggestions(struct map_session_data* sd, const char *name) strcat(buffer, " "); // swap elements - swap(distance[i][0], distance[min][0]); - swap(distance[i][1], distance[min][1]); + SWAP(distance[i][0], distance[min][0]); + SWAP(distance[i][1], distance[min][1]); } } diff --git a/src/map/map.cpp b/src/map/map.cpp index f8a73aa4a4..5e1c1a0dbd 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -697,9 +697,9 @@ int map_foreachinareaV(int(*func)(struct block_list*, va_list), int16 m, int16 x return 0; if (x1 < x0) - swap(x0, x1); + SWAP(x0, x1); if (y1 < y0) - swap(y0, y1); + SWAP(y0, y1); x0 = i16max(x0, 0); y0 = i16max(y0, 0); @@ -863,9 +863,9 @@ int map_forcountinarea(int (*func)(struct block_list*,va_list), int16 m, int16 x return 0; if ( x1 < x0 ) - swap(x0, x1); + SWAP(x0, x1); if ( y1 < y0 ) - swap(y0, y1); + SWAP(y0, y1); x0 = i16max(x0, 0); y0 = i16max(y0, 0); @@ -930,9 +930,9 @@ int map_foreachinmovearea(int (*func)(struct block_list*,va_list), struct block_ y1 = center->y + range; if ( x1 < x0 ) - swap(x0, x1); + SWAP(x0, x1); if ( y1 < y0 ) - swap(y0, y1); + SWAP(y0, y1); if( dx == 0 || dy == 0 ) { //Movement along one axis only. @@ -1158,9 +1158,9 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int16 m,int16 x0,i //The two fors assume mx0 < mx1 && my0 < my1 if ( mx0 > mx1 ) - swap(mx0, mx1); + SWAP(mx0, mx1); if ( my0 > my1 ) - swap(my0, my1); + SWAP(my0, my1); mx0 = max(mx0, 0); my0 = max(my0, 0); @@ -1308,9 +1308,9 @@ int map_foreachindir(int(*func)(struct block_list*, va_list), int16 m, int16 x0, //The following assumes mx0 < mx1 && my0 < my1 if (mx0 > mx1) - swap(mx0, mx1); + SWAP(mx0, mx1); if (my0 > my1) - swap(my0, my1); + SWAP(my0, my1); //Apply width to the path by turning 90 degrees mx0 -= abs(range*dirx[(dir + 2) % 8]); diff --git a/src/map/mob.c b/src/map/mob.c index 714124d4e5..980da6a2b1 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -644,9 +644,9 @@ int mob_once_spawn_area(struct map_session_data* sd, int16 m, int16 x0, int16 y0 // normalize x/y coordinates if (x0 > x1) - swap(x0, x1); + SWAP(x0, x1); if (y0 > y1) - swap(y0, y1); + SWAP(y0, y1); // choose a suitable max. number of attempts max = (y1 - y0 + 1)*(x1 - x0 + 1)*3; diff --git a/src/map/path.c b/src/map/path.c index fa33937f44..f9cb87a72f 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -145,8 +145,8 @@ bool path_search_long(struct shootpath_data *spd,int16 m,int16 x0,int16 y0,int16 dx = (x1 - x0); if (dx < 0) { - swap(x0, x1); - swap(y0, y1); + SWAP(x0, x1); + SWAP(y0, y1); dx = -dx; } dy = (y1 - y0); diff --git a/src/map/pc.c b/src/map/pc.c index 7718840ae1..b28eeea4ae 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6886,7 +6886,7 @@ int pc_need_status_point(struct map_session_data* sd, int type, int val) high = low + val; if ( val < 0 ) - swap(low, high); + SWAP(low, high); for ( ; low < high; low++ ) sp += PC_STATUS_POINT_COST(low); diff --git a/src/map/script.c b/src/map/script.c index ebf895bf28..5523eceb9b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5650,7 +5650,7 @@ BUILDIN_FUNC(rand) int max = script_getnum(st,3); min = script_getnum(st,2); if( max < min ) - swap(min, max); + SWAP(min, max); range = max - min + 1; } else @@ -5759,8 +5759,8 @@ BUILDIN_FUNC(areawarp) y3 = 0; } else if( x3 && y3 ) { // normalize x3/y3 coordinates - if( x3 < x2 ) swap(x3,x2); - if( y3 < y2 ) swap(y3,y2); + if( x3 < x2 ) SWAP(x3,x2); + if( y3 < y2 ) SWAP(y3,y2); } } @@ -18756,8 +18756,8 @@ BUILDIN_FUNC(setcell) int x,y; - if( x1 > x2 ) swap(x1,x2); - if( y1 > y2 ) swap(y1,y2); + if( x1 > x2 ) SWAP(x1,x2); + if( y1 > y2 ) SWAP(y1,y2); for( y = y1; y <= y2; ++y ) for( x = x1; x <= x2; ++x ) diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 183ce8f565..0bab6400ef 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -185,7 +185,7 @@ void searchstore_query(struct map_session_data* sd, unsigned char type, unsigned } if( max_price < min_price ) - swap(min_price, max_price); + SWAP(min_price, max_price); sd->searchstore.uses--; sd->searchstore.type = type; diff --git a/src/map/skill.c b/src/map/skill.c index e8139dcff0..4ea9f1ec16 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5490,8 +5490,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint for( i = 0; i <= j - 2; i++ ) for( k = i + 1; k <= j - 1; k++ ) if( positions[i] < positions[k] ) { - swap(positions[i],positions[k]); - swap(spheres[i],spheres[k]); + SWAP(positions[i],positions[k]); + SWAP(spheres[i],spheres[k]); } if(j == 5) { // If 5 spheres, remove last one and only do 4 actions (Official behavior) @@ -5601,8 +5601,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint for( k = i + 1; k <= j - 1; k++ ) if( positions[i] > positions[k] ) { - swap(positions[i],positions[k]); - swap(spheres[i],spheres[k]); + SWAP(positions[i],positions[k]); + SWAP(spheres[i],spheres[k]); } if( skill_lv == 1 ) j = 1; // Limit only to one ball From 9084d01536fe12f242b88c6974b3fe13bd539879 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 7 Aug 2017 07:59:09 +0200 Subject: [PATCH 082/124] Fixed a compilation problem with CentOS Fixes #2317 Thanks to @keitenai and @sanny1128 --- src/map/clif_packetdb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/clif_packetdb.h b/src/map/clif_packetdb.h index a3fdc3724f..732ed028a8 100644 --- a/src/map/clif_packetdb.h +++ b/src/map/clif_packetdb.h @@ -2320,9 +2320,9 @@ // 2016-09-28cRagexeRE #if PACKETVER >= 20160928 - parseable_packet(0x0A97,8,clif_parse_dull); - parseable_packet(0x0A99,4,clif_parse_dull); - parseable_packet(0x0A9C,2,clif_parse_dull); + parseable_packet(0x0A97,8,clif_parse_dull,0); + parseable_packet(0x0A99,4,clif_parse_dull,0); + parseable_packet(0x0A9C,2,clif_parse_dull,0); #endif // 2016-10-26bRagexeRE From 34aa59d82b7413715c4b62b6af313577db8ae4d9 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 7 Aug 2017 09:31:32 +0200 Subject: [PATCH 083/124] Added missing MySQL column check for show_equip Follow up to 983d164 --- src/char/char.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/char/char.cpp b/src/char/char.cpp index 9b75314fab..91a2cdaf86 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -2285,7 +2285,7 @@ bool char_checkdb(void){ "`guild_id`,`pet_id`,`homun_id`,`elemental_id`,`hair`,`hair_color`,`clothes_color`,`weapon`," "`shield`,`head_top`,`head_mid`,`head_bottom`,`robe`,`last_map`,`last_x`,`last_y`,`save_map`," "`save_x`,`save_y`,`partner_id`,`online`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`," - "`moves`,`unban_time`,`font`,`sex`,`hotkey_rowshift`,`clan_id`,`last_login`,`title_id`" + "`moves`,`unban_time`,`font`,`sex`,`hotkey_rowshift`,`clan_id`,`last_login`,`title_id`,`show_equip`" " FROM `%s` LIMIT 1;", schema_config.char_db) ){ Sql_ShowDebug(sql_handle); return false; From 8310253b8413252a7d7be6ffcbbb80ce6a761dea Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 7 Aug 2017 12:54:16 +0200 Subject: [PATCH 084/124] Follow up to ee12429 The incomplete count was not updated before moving the memory that way the counter had the wrong value. Also the memory manager would complain that the pointer is invalid when we have zero achievements. Thanks to @CairoLee --- src/map/achievement.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/map/achievement.c b/src/map/achievement.c index 875724709a..0fe30c178e 100644 --- a/src/map/achievement.c +++ b/src/map/achievement.c @@ -128,14 +128,19 @@ bool achievement_remove(struct map_session_data *sd, int achievement_id) return false; } + if (!sd->achievement_data.achievements[i].completed) + sd->achievement_data.incompleteCount--; + if (i != sd->achievement_data.count - 1) memmove(&sd->achievement_data.achievements[i], &sd->achievement_data.achievements[i + 1], sizeof(struct achievement) * (sd->achievement_data.count - 1 - i)); aFree(&sd->achievement_data.achievements[sd->achievement_data.count-1]); sd->achievement_data.count--; - if (!sd->achievement_data.achievements[i].completed) - sd->achievement_data.incompleteCount--; - RECREATE(sd->achievement_data.achievements, struct achievement, sd->achievement_data.count); + if( sd->achievement_data.count == 0 ){ + sd->achievement_data.achievements = NULL; + }else{ + RECREATE(sd->achievement_data.achievements, struct achievement, sd->achievement_data.count); + } sd->achievement_data.save = true; // Send a removed fake achievement From 71421a4268f730d5f899873cd978a12e20e5f3a3 Mon Sep 17 00:00:00 2001 From: Jittapan Pluemsumran <nightsheep@outlook.com> Date: Tue, 8 Aug 2017 15:33:39 +0700 Subject: [PATCH 085/124] Made global variables in header files extern and implement them in their respective source file. (#2318) --- src/map/atcommand.c | 2 ++ src/map/atcommand.h | 2 +- src/map/chrif.h | 8 ++++---- src/map/clif.c | 2 ++ src/map/clif.h | 2 +- src/map/itemdb.c | 2 ++ src/map/itemdb.h | 2 +- src/map/map.cpp | 10 ++++++++++ src/map/map.h | 18 +++++++++--------- src/map/mapreg.c | 1 + src/map/mapreg.h | 2 +- src/map/npc.c | 2 ++ src/map/npc.h | 2 +- src/map/pc.c | 4 ++++ src/map/pc.h | 6 +++--- src/map/script.c | 6 ++++++ src/map/script.h | 12 ++++++------ src/map/status.c | 8 ++++++++ src/map/status.h | 14 +++++++------- 19 files changed, 71 insertions(+), 34 deletions(-) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index ea3a9ad0b2..d8d52b9ccc 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -80,6 +80,8 @@ static char atcmd_output[CHAT_SIZE_MAX]; static char atcmd_player_name[NAME_LENGTH]; const char *parent_cmd; +struct atcmd_binding_data** atcmd_binding; + static AtCommandInfo* get_atcommandinfo_byname(const char *name); // @help static const char* atcommand_checkalias(const char *aliasname); // @help static void atcommand_get_suggestions(struct map_session_data* sd, const char *name, bool atcommand); // @help diff --git a/src/map/atcommand.h b/src/map/atcommand.h index 6fd1bc0000..54d0ca3cfa 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -45,7 +45,7 @@ struct atcmd_binding_data { int level; int level2; }; -struct atcmd_binding_data** atcmd_binding; +extern struct atcmd_binding_data** atcmd_binding; struct atcmd_binding_data* get_atcommandbind_byname(const char* name); #ifdef __cplusplus diff --git a/src/map/chrif.h b/src/map/chrif.h index 70c5149f61..2c2aaec833 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -4,14 +4,14 @@ #ifndef _CHRIF_H_ #define _CHRIF_H_ -#ifdef __cplusplus -extern "C" { -#endif - #include "../common/cbasetypes.h" #include "../common/socket.h" // enum chrif_req_op #include <time.h> +#ifdef __cplusplus +extern "C" { +#endif + enum sd_state { ST_LOGIN, ST_LOGOUT, ST_MAPCHANGE }; enum e_chrif_save_opt { diff --git a/src/map/clif.c b/src/map/clif.c index 4cb18fea1f..a2ad011540 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -58,6 +58,8 @@ static struct eri *delay_clearunit_ers; struct s_packet_db packet_db[MAX_PACKET_DB + 1]; int packet_db_ack[MAX_ACK_FUNC + 1]; +unsigned long color_table[COLOR_MAX]; + #include "clif_obfuscation.h" static bool clif_session_isValid(struct map_session_data *sd); diff --git a/src/map/clif.h b/src/map/clif.h index 874d871198..262078a1c6 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -1027,7 +1027,7 @@ enum clif_colors { COLOR_LIGHT_GREEN, COLOR_MAX }; -unsigned long color_table[COLOR_MAX]; +extern unsigned long color_table[COLOR_MAX]; void clif_channel_msg(struct Channel *channel, const char *msg, unsigned long color); diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 27ecedec70..d581e5640b 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -22,6 +22,8 @@ static DBMap *itemdb_randomopt_group; /// Random option group DB struct item_data *dummy_item; /// This is the default dummy item used for non-existant items. [Skotlex] +struct s_roulette_db rd; + /** * Check if combo exists * @param combo_id diff --git a/src/map/itemdb.h b/src/map/itemdb.h index fe3171335a..b26b06a4bd 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -769,7 +769,7 @@ struct s_item_group_db }; /// Struct of Roulette db -struct s_roulette_db { +extern struct s_roulette_db { unsigned short *nameid[MAX_ROULETTE_LEVEL], /// Item ID *qty[MAX_ROULETTE_LEVEL]; /// Amount of Item ID int *flag[MAX_ROULETTE_LEVEL]; /// Whether the item is for loss or win diff --git a/src/map/map.cpp b/src/map/map.cpp index 5e1c1a0dbd..983c2e4fb9 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -162,6 +162,16 @@ char help2_txt[256] = "conf/help2.txt"; char charhelp_txt[256] = "conf/charhelp.txt"; char channel_conf[256] = "conf/channels.conf"; +const char *MSG_CONF_NAME_RUS; +const char *MSG_CONF_NAME_SPN; +const char *MSG_CONF_NAME_GRM; +const char *MSG_CONF_NAME_CHN; +const char *MSG_CONF_NAME_MAL; +const char *MSG_CONF_NAME_IDN; +const char *MSG_CONF_NAME_FRN; +const char *MSG_CONF_NAME_POR; +const char *MSG_CONF_NAME_THA; + char wisp_server_name[NAME_LENGTH] = "Server"; // can be modified in char-server configuration file struct s_map_default map_default; diff --git a/src/map/map.h b/src/map/map.h index d790b42fe7..fd5a6b0464 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -940,15 +940,15 @@ extern const char*SCRIPT_CONF_NAME; extern const char*MSG_CONF_NAME_EN; extern const char*GRF_PATH_FILENAME; //Other languages supported -const char*MSG_CONF_NAME_RUS; -const char*MSG_CONF_NAME_SPN; -const char*MSG_CONF_NAME_GRM; -const char*MSG_CONF_NAME_CHN; -const char*MSG_CONF_NAME_MAL; -const char*MSG_CONF_NAME_IDN; -const char*MSG_CONF_NAME_FRN; -const char*MSG_CONF_NAME_POR; -const char*MSG_CONF_NAME_THA; +extern const char*MSG_CONF_NAME_RUS; +extern const char*MSG_CONF_NAME_SPN; +extern const char*MSG_CONF_NAME_GRM; +extern const char*MSG_CONF_NAME_CHN; +extern const char*MSG_CONF_NAME_MAL; +extern const char*MSG_CONF_NAME_IDN; +extern const char*MSG_CONF_NAME_FRN; +extern const char*MSG_CONF_NAME_POR; +extern const char*MSG_CONF_NAME_THA; //Useful typedefs from jA [Skotlex] typedef struct map_session_data TBL_PC; diff --git a/src/map/mapreg.c b/src/map/mapreg.c index 500c42b57b..afb644c605 100644 --- a/src/map/mapreg.c +++ b/src/map/mapreg.c @@ -22,6 +22,7 @@ bool skip_insert = false; static char mapreg_table[32] = "mapreg"; static bool mapreg_dirty = false; // Whether there are modified regs to be saved +struct reg_db regs; #define MAPREG_AUTOSAVE_INTERVAL (300*1000) diff --git a/src/map/mapreg.h b/src/map/mapreg.h index b73b731fa6..b70282443e 100644 --- a/src/map/mapreg.h +++ b/src/map/mapreg.h @@ -20,7 +20,7 @@ struct mapreg_save { bool save; ///< Whether a save operation is pending }; -struct reg_db regs; +extern struct reg_db regs; extern bool skip_insert; void mapreg_reload(void); diff --git a/src/map/npc.c b/src/map/npc.c index 6821a84628..34fdd583cf 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -42,6 +42,8 @@ static int npc_mob=0; static int npc_delay_mob=0; static int npc_cache_mob=0; +struct eri *npc_sc_display_ers; + // Market Shop #if PACKETVER >= 20131223 struct s_npc_market { diff --git a/src/map/npc.h b/src/map/npc.h index 3bade6a106..67e799579f 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -106,7 +106,7 @@ struct npc_data { } progressbar; }; -struct eri *npc_sc_display_ers; +extern struct eri *npc_sc_display_ers; #define START_NPC_NUM 110000000 diff --git a/src/map/pc.c b/src/map/pc.c index b28eeea4ae..4161ad485f 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -58,12 +58,16 @@ int night_timer_tid = INVALID_TIMER; struct eri *pc_sc_display_ers = NULL; struct eri *pc_itemgrouphealrate_ers = NULL; +struct eri *num_reg_ers; +struct eri *str_reg_ers; int pc_expiration_tid = INVALID_TIMER; struct fame_list smith_fame_list[MAX_FAME_LIST]; struct fame_list chemist_fame_list[MAX_FAME_LIST]; struct fame_list taekwon_fame_list[MAX_FAME_LIST]; +struct s_job_info job_info[CLASS_COUNT]; + #define MOTD_LINE_SIZE 128 static char motd_text[MOTD_LINE_SIZE][CHAT_SIZE_MAX]; // Message of the day buffer [Valaris] diff --git a/src/map/pc.h b/src/map/pc.h index 892872a4b3..d0ab0e3630 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -744,8 +744,8 @@ extern struct eri *pc_itemgrouphealrate_ers; /// Player's Item Group Heal Rate t /** * ERS for the bulk of pc vars **/ -struct eri *num_reg_ers; -struct eri *str_reg_ers; +extern struct eri *num_reg_ers; +extern struct eri *str_reg_ers; /* Global Expiration Timer ID */ extern int pc_expiration_tid; @@ -832,7 +832,7 @@ enum item_check { ITMCHK_ALL = ITMCHK_INVENTORY|ITMCHK_CART|ITMCHK_STORAGE, }; -struct { +extern struct s_job_info { unsigned int base_hp[MAX_LEVEL], base_sp[MAX_LEVEL]; //Storage for the first calculation with hp/sp factor and multiplicator int hp_factor, hp_multiplicator, sp_factor; int max_weight_base; diff --git a/src/map/script.c b/src/map/script.c index 5523eceb9b..099d4cf072 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -58,6 +58,12 @@ #include <errno.h> +struct eri *array_ers; +DBMap *st_db; +unsigned int active_scripts; +unsigned int next_id; +struct eri *st_ers; +struct eri *stack_ers; static bool script_rid2sd_( struct script_state *st, struct map_session_data** sd, const char *func ); diff --git a/src/map/script.h b/src/map/script.h index b47f00587b..338ffe0bb5 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -706,12 +706,12 @@ enum vip_status_type { /** * used to generate quick script_array entries **/ -struct eri *array_ers; -DBMap *st_db; -unsigned int active_scripts; -unsigned int next_id; -struct eri *st_ers; -struct eri *stack_ers; +extern struct eri *array_ers; +extern DBMap *st_db; +extern unsigned int active_scripts; +extern unsigned int next_id; +extern struct eri *st_ers; +extern struct eri *stack_ers; const char* skip_space(const char* p); void script_error(const char* src, const char* file, int start_line, const char* error_msg, const char* error_pos); diff --git a/src/map/status.c b/src/map/status.c index 4e56eb84f1..4d13b2da7b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -55,6 +55,14 @@ short current_equip_opt_index; /// Contains random option index of an equipped i unsigned int SCDisabled[SC_MAX]; ///< List of disabled SC on map zones. [Cydh] +sc_type SkillStatusChangeTable[MAX_SKILL]; +int StatusIconChangeTable[SC_MAX]; +unsigned int StatusChangeFlagTable[SC_MAX]; +int StatusSkillChangeTable[SC_MAX]; +int StatusRelevantBLTypes[SI_MAX]; +unsigned int StatusChangeStateTable[SC_MAX]; +unsigned int StatusDisplayType[SC_MAX]; + static unsigned short status_calc_str(struct block_list *,struct status_change *,int); static unsigned short status_calc_agi(struct block_list *,struct status_change *,int); static unsigned short status_calc_vit(struct block_list *,struct status_change *,int); diff --git a/src/map/status.h b/src/map/status.h index bab74f9602..d8d7f761e9 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -2082,13 +2082,13 @@ struct weapon_atk { #endif }; -sc_type SkillStatusChangeTable[MAX_SKILL]; /// skill -> status -int StatusIconChangeTable[SC_MAX]; /// status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated) -unsigned int StatusChangeFlagTable[SC_MAX]; /// status -> flags -int StatusSkillChangeTable[SC_MAX]; /// status -> skill -int StatusRelevantBLTypes[SI_MAX]; /// "icon" -> enum bl_type (for clif->status_change to identify for which bl types to send packets) -unsigned int StatusChangeStateTable[SC_MAX]; /// status -> flags -unsigned int StatusDisplayType[SC_MAX]; +extern sc_type SkillStatusChangeTable[MAX_SKILL]; /// skill -> status +extern int StatusIconChangeTable[SC_MAX]; /// status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated) +extern unsigned int StatusChangeFlagTable[SC_MAX]; /// status -> flags +extern int StatusSkillChangeTable[SC_MAX]; /// status -> skill +extern int StatusRelevantBLTypes[SI_MAX]; /// "icon" -> enum bl_type (for clif->status_change to identify for which bl types to send packets) +extern unsigned int StatusChangeStateTable[SC_MAX]; /// status -> flags +extern unsigned int StatusDisplayType[SC_MAX]; ///For holding basic status (which can be modified by status changes) struct status_data { From 4a28c8c1b095175f21d3ed2b2372ce01f1dbd59b Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Wed, 9 Aug 2017 00:45:51 +0200 Subject: [PATCH 086/124] Follow up to 8310253 Achievement code now matches the Quest code. Fixed a few small typos and removed some leftovers by @aleos89 Thanks to @CairoLee and @Tokeiburu --- src/map/achievement.c | 11 ++++++----- src/map/achievement.h | 2 -- src/map/script.c | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/map/achievement.c b/src/map/achievement.c index 0fe30c178e..177e7aff3a 100644 --- a/src/map/achievement.c +++ b/src/map/achievement.c @@ -134,9 +134,9 @@ bool achievement_remove(struct map_session_data *sd, int achievement_id) if (i != sd->achievement_data.count - 1) memmove(&sd->achievement_data.achievements[i], &sd->achievement_data.achievements[i + 1], sizeof(struct achievement) * (sd->achievement_data.count - 1 - i)); - aFree(&sd->achievement_data.achievements[sd->achievement_data.count-1]); sd->achievement_data.count--; if( sd->achievement_data.count == 0 ){ + aFree(sd->achievement_data.achievements); sd->achievement_data.achievements = NULL; }else{ RECREATE(sd->achievement_data.achievements, struct achievement, sd->achievement_data.count); @@ -212,7 +212,7 @@ static int achievement_check_groups(DBKey key, DBData *data, va_list ap) return 0; ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == ad->achievement_id); - if (i == sd->achievement_data.count) { // Achievment isn't in player's log + if (i == sd->achievement_data.count) { // Achievement isn't in player's log if (achievement_check_dependent(sd, ad->achievement_id) == true) { achievement_add(sd, ad->achievement_id); achievement_update_achievement(sd, ad->achievement_id, true); @@ -496,8 +496,9 @@ int *achievement_level(struct map_session_data *sd, bool flag) if (flag == true && old_level != sd->achievement_data.level) { int achievement_id = 240000 + sd->achievement_data.level; - achievement_add(sd, achievement_id); - achievement_update_achievement(sd, achievement_id, true); + if( achievement_add(sd, achievement_id) ){ + achievement_update_achievement(sd, achievement_id, true); + } } return info; @@ -533,7 +534,7 @@ static int achievement_update_objectives(DBKey key, DBData *data, va_list ap) memset(objective_count, 0, sizeof(objective_count)); // Current objectives count ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == ad->achievement_id); - if (i == sd->achievement_data.count) { // Achievment isn't in player's log + if (i == sd->achievement_data.count) { // Achievement isn't in player's log if (achievement_check_dependent(sd, ad->achievement_id) == false) // Check to see if dependents are complete before adding to player's log return 0; isNew = true; diff --git a/src/map/achievement.h b/src/map/achievement.h index c3b3b0eb13..e1e6caeaf2 100644 --- a/src/map/achievement.h +++ b/src/map/achievement.h @@ -99,8 +99,6 @@ struct achievement_db { struct map_session_data; struct block_list; -struct config_setting_t; -enum _sp; struct achievement_db achievement_dummy; ///< Dummy entry for invalid achievement lookups diff --git a/src/map/script.c b/src/map/script.c index 099d4cf072..269aea4c13 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -23392,7 +23392,6 @@ BUILDIN_FUNC(achievementcomplete) { script_pushint(st, false); return SCRIPT_CMD_FAILURE; } - if( !sd->state.pc_loaded ){ if( !running_npc_stat_calc_event ){ From dcbb2df776387da8ada95ce4d26ca68b68237972 Mon Sep 17 00:00:00 2001 From: aleos <aleos89@users.noreply.github.com> Date: Tue, 8 Aug 2017 20:50:09 -0400 Subject: [PATCH 087/124] Corrected YAML file parsing * Fixes #2323. * YAML file parsing will now properly catch and display warnings when unable to read a file. Thanks to @CairoLee! --- 3rdparty/yaml-cpp/src/parse.cpp | 2 +- src/common/yamlwrapper.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/3rdparty/yaml-cpp/src/parse.cpp b/3rdparty/yaml-cpp/src/parse.cpp index 0b2ae4a4f6..a215e23f99 100644 --- a/3rdparty/yaml-cpp/src/parse.cpp +++ b/3rdparty/yaml-cpp/src/parse.cpp @@ -31,7 +31,7 @@ Node Load(std::istream& input) { Node LoadFile(const std::string& filename) { std::ifstream fin(filename.c_str()); - if (!fin) { + if (fin.bad()) { throw BadFile(); } return Load(fin); diff --git a/src/common/yamlwrapper.cpp b/src/common/yamlwrapper.cpp index a63532f4cb..f14bf513e2 100644 --- a/src/common/yamlwrapper.cpp +++ b/src/common/yamlwrapper.cpp @@ -47,6 +47,8 @@ yamlwrapper* yaml_load_file(const char* file_name) { node = YAML::LoadFile(file_name); if (!node.IsDefined()) return NULL; + if (node.IsNull()) + return NULL; } catch (YAML::ParserException &e) { ShowError("YAML Exception Caught: %s\n", e.what()); return NULL; From ac1cf0499a0ac4c6917e2912b572afcdb3844144 Mon Sep 17 00:00:00 2001 From: aleos <aleos89@users.noreply.github.com> Date: Tue, 8 Aug 2017 21:12:20 -0400 Subject: [PATCH 088/124] Follow up to dcbb2df * Adjusted the checks to one-line. * Corrected the map-server from spitting out an error for the achievements import file. --- 3rdparty/yaml-cpp/src/parse.cpp | 2 +- db/import-tmpl/achievement_db.yml | 2 ++ src/common/yamlwrapper.cpp | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3rdparty/yaml-cpp/src/parse.cpp b/3rdparty/yaml-cpp/src/parse.cpp index a215e23f99..d864907edb 100644 --- a/3rdparty/yaml-cpp/src/parse.cpp +++ b/3rdparty/yaml-cpp/src/parse.cpp @@ -31,7 +31,7 @@ Node Load(std::istream& input) { Node LoadFile(const std::string& filename) { std::ifstream fin(filename.c_str()); - if (fin.bad()) { + if (!fin || fin.bad()) { throw BadFile(); } return Load(fin); diff --git a/db/import-tmpl/achievement_db.yml b/db/import-tmpl/achievement_db.yml index 2565e1751f..eb8448ccd6 100644 --- a/db/import-tmpl/achievement_db.yml +++ b/db/import-tmpl/achievement_db.yml @@ -76,3 +76,5 @@ ########################################################################### # Score - Achievement points that are given on completion. ########################################################################### + +Achievements: diff --git a/src/common/yamlwrapper.cpp b/src/common/yamlwrapper.cpp index f14bf513e2..36008da7e8 100644 --- a/src/common/yamlwrapper.cpp +++ b/src/common/yamlwrapper.cpp @@ -45,9 +45,7 @@ yamlwrapper* yaml_load_file(const char* file_name) { try { node = YAML::LoadFile(file_name); - if (!node.IsDefined()) - return NULL; - if (node.IsNull()) + if (!node.IsDefined() || node.IsNull()) return NULL; } catch (YAML::ParserException &e) { ShowError("YAML Exception Caught: %s\n", e.what()); From 8417d7616b31762695dd75791de3dcc3de2fd50f Mon Sep 17 00:00:00 2001 From: Akkarinage <akkarin@rathena.org> Date: Thu, 10 Aug 2017 00:34:43 +0100 Subject: [PATCH 089/124] Details of import/ dirs and examples Signed-off-by: Akkarinage <akkarin@rathena.org> --- conf/readme.md | 118 ++++++++++++++++++++++++++++++++++++++++++++++++ conf/readme.txt | 22 --------- db/readme.md | 106 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 224 insertions(+), 22 deletions(-) create mode 100644 conf/readme.md delete mode 100644 conf/readme.txt create mode 100644 db/readme.md diff --git a/conf/readme.md b/conf/readme.md new file mode 100644 index 0000000000..3bfa45acd6 --- /dev/null +++ b/conf/readme.md @@ -0,0 +1,118 @@ +# Import Directories + +## What is the import directory for? + +The `import/` directory provides a way for you to change your config settings without the need to even touch the main `/conf/` and `/db/` files. + +By placing your custom entries into the `import/` directory within these two locations, your core files will not need to have any conflicts resolved when you update your server. You store your changes, and the rest is updated with rAthena. + +## How does this work? + +Think of "import" as in "override". Place only the settings you have changed in the import files, or settings you are "overriding". + +For example, when setting up a server there are always a few config settings that users would like to change in order for rAthena to suit their needs. The following example will show you how to use the `/conf/import/` directory correctly. (for `/db/import/` examples, see [/db/readme.md](/db/readme.md)) + +### Login Server +--- +We want to use MD5 passwords and disable `_m/f` account creation methods. + +#### /conf/import/login_conf.txt + + new_account: no + use_MD5_passwords: yes + + +### Char Server +--- +We want to change the server name to "Odin". + +#### /conf/import/char_conf.txt + + server_name: Odin + + +### Map Server +--- +We want to hide all error messages and add a few custom maps. + +#### /conf/import/map_conf.txt + + //Makes server output more silent by omitting certain types of messages: + //16: Hide Error and SQL Error messages. + console_silent: 16 + map: 1@toy + map: 1@valley + map: shops + + +### Inter Server +--- +We want to use MySQL tables instead of .txt files. + +#### /conf/import/inter_conf.txt + + use_sql_db: yes + + +### Logging Settings +--- +We want to log all items and all chat messages. + +#### /conf/import/log_conf.txt + + log_filter: 1 + // Log CHAT (Global, Whisper, Party, Guild, Main chat, Clan) (Note 3) + // log_chat: 63 = logs everything + log_chat: 63 + + +### Battle Configs +--- +We want to change the way various mechanics work. For anything that would be configured in the `/conf/battle/` directory, it will go into `import/battle_conf.txt`. To help you find which configs came from where, it's generally a good idea to comment out the name of the file that specific collection of configs came from. + +#### /conf/import/battle_conf.txt + + // guild.conf + guild_exp_limit: 90 + + // items.conf + vending_over_max: no + vending_tax: 100 + weapon_produce_rate: 200 + potion_produce_rate: 200 + produce_item_name_input: 0x03 + + // misc.conf + duel_time_interval: 2 + at_mapflag: yes + at_monsterignore: yes + cashshop_show_points: yes + hide_fav_sell: yes + // Whether or not mail box status is displayed upon login. + // Default: 0 + // 0 = No + // 1 = Yes + // 2 = Yes, when there are unread mails + mail_show_status: 2 + + // monster.conf + show_mob_info: 3 + + // party.conf + party_hp_mode: 1 + display_party_name: yes + + // pet.conf + pet_rename: yes + + // player.conf + max_aspd: 196 + max_third_aspd: 196 + max_extended_aspd: 196 + vip_disp_rate: no + + // status.conf + debuff_on_logout: 3 + + +We cannot stress enough how helpful this system is for everyone. The majority of git conflicts will simply go away if users make use of the `import/` system. diff --git a/conf/readme.txt b/conf/readme.txt deleted file mode 100644 index 7acc986564..0000000000 --- a/conf/readme.txt +++ /dev/null @@ -1,22 +0,0 @@ -What is the import folder for? -------------------------------------------------------------------------------- - -The folder provides a way for you to change your config settings without having -to update the files every time you update your server. You store your changes, -and the rest is updated with rAthena. - -How does this work? -------------------------------------------------------------------------------- - -Place only the settings you have changed in the import files. -For example, if you want to change a value in /battle/exp.conf: - - // Rate at which exp. is given. (Note 2) - base_exp_rate: 700 - -You could instead copy the setting into /import/battle_conf.txt, -and you'll eliminate any problems updating in the future. - -Neat, isn't it? - -- Semi-guide by Ajarn / Euphy diff --git a/db/readme.md b/db/readme.md new file mode 100644 index 0000000000..eeddb1faed --- /dev/null +++ b/db/readme.md @@ -0,0 +1,106 @@ +# Import Directories + +## What is the import directory for? + +The `import/` directory provides a way for you to change your config settings without the need to even touch the main `/conf/` and `/db/` files. + +By placing your custom entries into the `import/` directory within these two locations, your core files will not need to have any conflicts resolved when you update your server. You store your changes, and the rest is updated with rAthena. + +## How does this work? + +Think of "import" as in "override". Place only the settings you have changed in the import files, or settings you are "overriding". + +For example, when setting up a server there are always a few config settings that users would like to change in order for rAthena to suit their needs. The following example will show you how to use the `/db/import/` directory correctly. (for `/conf/import/` examples, see [/conf/readme.md](/conf/readme.md)) + +### Achievements +--- +We want to add our own custom achievement that can be given to a player via an NPC Script and another that we can give to our GMs. + +#### /db/import/achievement_db.yml + + + Achievements: + - ID: 280000 + Group: "AG_GOAL_ACHIEVE" + Name: "Emperio" + Reward: + TitleID: 1035 + Score: 50 + - ID: 280001 + Group: "AG_GOAL_ACHIEVE" + Name: "Staff" + Reward: + TitleID: 1036 + Score: 50 + + +### Instances +--- +We want to add our own customized Housing Instance. + +#### /db/import/instance_db.txt + + // ID,Name,LimitTime,IdleTimeOut,EnterMap,EnterX,EnterY,Map2,Map3,...,Map255 + 35,Home,3600,900,1@home,24,6,2@home,3@home + + +### Mob Alias +--- +We want to give a custom mob a Novice player sprite. + +#### /db/import/mob_avail.txt + + // Structure of Database: + // MobID,SpriteID{,Equipment} + 3850,0 + + +### Custom Maps +--- +We want to add our own custom maps. For this we need to add our map names to `import/map_index.txt` and then to the `import/map_cache.dat` file for the Map Server to load. + +#### /db/import/map_index.txt + + 1@home 1250 + 2@home + 3@home + ev_has + shops + prt_pvp + + +### Item Trade Restrictions +--- +We want to ensure that specific items cannot be traded, sold, dropped, placed in storage, etc. + +#### /db/import/item_trade.txt + + // Legend for 'TradeMask' field (bitmask): + // 1 - item can't be dropped + // 2 - item can't be traded (nor vended) + // 4 - wedded partner can override restriction 2 + // 8 - item can't be sold to npcs + // 16 - item can't be placed in the cart + // 32 - item can't be placed in the storage + // 64 - item can't be placed in the guild storage + // 128 - item can't be attached to mail + // 256 - item can't be auctioned + // Full outright value = 511 + 34000,511,100 // Old Green Box + 34001,511,100 // House Keys + 34002,511,100 // Reputation Journal + + +### Custom Quests +--- +We want to add our own custom quests to the quest_db. + +#### /db/import/quest_db.txt + + // Quest ID,Time Limit,Target1,Val1,Target2,Val2,Target3,Val3,MobID1,NameID1,Rate1,MobID2,NameID2,Rate2,MobID3,NameID3,Rate3,Quest Title + 89001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Reputation Quest" + 89002,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Reputation Quest" + + + +We cannot stress enough how helpful this system is for everyone. The majority of git conflicts will simply go away if users make use of the `import/` system. From 74cc00f88e69d2ebc905ddc4fa5372d1e34c14ea Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Thu, 10 Aug 2017 23:33:41 +0200 Subject: [PATCH 090/124] Follow up to ac1cf04 Thanks to @CairoLee --- src/common/yamlwrapper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/yamlwrapper.cpp b/src/common/yamlwrapper.cpp index 36008da7e8..079cc324de 100644 --- a/src/common/yamlwrapper.cpp +++ b/src/common/yamlwrapper.cpp @@ -50,6 +50,8 @@ yamlwrapper* yaml_load_file(const char* file_name) { } catch (YAML::ParserException &e) { ShowError("YAML Exception Caught: %s\n", e.what()); return NULL; + } catch (YAML::BadFile &e) { + return NULL; } return new yamlwrapper(node); From b30d0fdf64445dc0d4d564d20214dc180527cb25 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 11 Aug 2017 00:53:35 +0200 Subject: [PATCH 091/124] New NPC IDs and mob ID placeholders --- db/const.txt | 10 ++++++++++ db/re/mob_db.txt | 39 +++++++++++++++++++++++++++++++++++++++ src/map/npc.h | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/db/const.txt b/db/const.txt index ad6fb083a2..a10cc018bc 100644 --- a/db/const.txt +++ b/db/const.txt @@ -2298,6 +2298,16 @@ JP_NPC01 10236 4_PCCOUNT 10253 4_LAVAGOLEM 10254 +JP_NPC02 10261 +JP_NPC03 10262 +JP_NPC04 10263 +JP_NPC05 10264 +JP_NPC06 10265 +JP_NPC07 10266 +JP_NPC08 10267 +JP_NPC09 10268 +JP_NPC10 10269 + SWORDCLAN 1 ARCWANDCLAN 2 GOLDENMACECLAN 3 diff --git a/db/re/mob_db.txt b/db/re/mob_db.txt index 238f70cde9..313d420e10 100644 --- a/db/re/mob_db.txt +++ b/db/re/mob_db.txt @@ -3061,3 +3061,42 @@ //3901,MD_ORK_HERO //3902,MD_ORC_LORD //3903,MD_ORC_FLOWER + +//3910,E_EMPEL_1 +//3911,E_GIBBET +//3912,E_LOLI_RURI +//3913,E_DULLAHAN +//3914,E_BLOODY_MURDERER +//3915,E_EMPEL_1B +//3916,JP_E_MONSTER_74 +//3917,JP_E_MONSTER_75 +//3918,JP_E_MONSTER_76 +//3919,JP_E_MONSTER_77 +//3920,JP_E_MONSTER_78 +//3921,JP_E_MONSTER_79 +//3922,JP_E_MONSTER_80 +//3923,JP_E_MONSTER_81 +//3924,JP_E_MONSTER_82 +//3925,JP_E_MONSTER_83 +//3926,JP_E_MONSTER_84 +//3927,JP_E_MONSTER_85 +//3928,JP_E_MONSTER_86 +//3929,JP_E_MONSTER_87 +//3930,JP_E_MONSTER_88 +//3931,JP_E_MONSTER_89 +//3932,JP_E_MONSTER_90 +//3933,JP_E_MONSTER_91 +//3934,JP_E_MONSTER_92 +//3935,JP_E_MONSTER_93 +//3936,JP_E_MONSTER_94 +//3937,JP_E_MONSTER_95 +//3938,JP_E_MONSTER_96 +//3939,JP_E_MONSTER_97 +//3940,JP_E_MONSTER_98 +//3941,JP_E_MONSTER_99 +//3942,JP_E_MONSTER_100 +//3943,JP_E_MONSTER_101 +//3944,JP_E_MONSTER_102 +//3945,JP_E_MONSTER_103 +//3946,JP_E_MONSTER_104 +//3947,JP_E_MONSTER_105 diff --git a/src/map/npc.h b/src/map/npc.h index 67e799579f..893189d202 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -123,7 +123,7 @@ enum actor_classes #define MAX_NPC_CLASS 1000 // New NPC range #define MAX_NPC_CLASS2_START 10000 -#define MAX_NPC_CLASS2_END 10255 +#define MAX_NPC_CLASS2_END 10270 //Checks if a given id is a valid npc id. [Skotlex] //Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001) From 9c6a89076d88cc50e1d596aefa1dc37054014c1e Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Fri, 11 Aug 2017 00:53:48 +0200 Subject: [PATCH 092/124] SQL synchronization --- sql-files/mob_db_re.sql | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql index 42b90dfd15..16965cdd67 100644 --- a/sql-files/mob_db_re.sql +++ b/sql-files/mob_db_re.sql @@ -3128,3 +3128,42 @@ REPLACE INTO `mob_db_re` VALUES (3508,'DR_EGGRING_G','Eggring','Eggring',20,220, #3902,MD_ORC_LORD #3903,MD_ORC_FLOWER +#3910,E_EMPEL_1 +#3911,E_GIBBET +#3912,E_LOLI_RURI +#3913,E_DULLAHAN +#3914,E_BLOODY_MURDERER +#3915,E_EMPEL_1B +#3916,JP_E_MONSTER_74 +#3917,JP_E_MONSTER_75 +#3918,JP_E_MONSTER_76 +#3919,JP_E_MONSTER_77 +#3920,JP_E_MONSTER_78 +#3921,JP_E_MONSTER_79 +#3922,JP_E_MONSTER_80 +#3923,JP_E_MONSTER_81 +#3924,JP_E_MONSTER_82 +#3925,JP_E_MONSTER_83 +#3926,JP_E_MONSTER_84 +#3927,JP_E_MONSTER_85 +#3928,JP_E_MONSTER_86 +#3929,JP_E_MONSTER_87 +#3930,JP_E_MONSTER_88 +#3931,JP_E_MONSTER_89 +#3932,JP_E_MONSTER_90 +#3933,JP_E_MONSTER_91 +#3934,JP_E_MONSTER_92 +#3935,JP_E_MONSTER_93 +#3936,JP_E_MONSTER_94 +#3937,JP_E_MONSTER_95 +#3938,JP_E_MONSTER_96 +#3939,JP_E_MONSTER_97 +#3940,JP_E_MONSTER_98 +#3941,JP_E_MONSTER_99 +#3942,JP_E_MONSTER_100 +#3943,JP_E_MONSTER_101 +#3944,JP_E_MONSTER_102 +#3945,JP_E_MONSTER_103 +#3946,JP_E_MONSTER_104 +#3947,JP_E_MONSTER_105 + From abfd1980de514aecaf5bafd68326a0cefd5dbe46 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 11 Aug 2017 19:27:33 +0200 Subject: [PATCH 093/124] Made view_data for mob unit changes persistent (#2316) Made view_data for mobs changes persistent Fixes #2269 Thanks to @Yuchinin --- Fixed reloadmobdb breaking the view ids Fixes #2326 Thanks to @karlseven --- Allowed updating mob's class to a pc class Fixed sex change so that the client is automatically refreshed Respawn the monster on clientside if the class is changed Thanks to @Jeybla and @aleos89 for helping! --- src/map/mob.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++- src/map/mob.h | 3 ++ src/map/script.c | 21 +++++++++++-- src/map/status.c | 10 +++++-- src/map/unit.c | 2 ++ 5 files changed, 107 insertions(+), 5 deletions(-) diff --git a/src/map/mob.c b/src/map/mob.c index 980da6a2b1..f1fc875302 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -336,9 +336,49 @@ int mobdb_checkid(const int id) struct view_data * mob_get_viewdata(int mob_id) { if (mob_db(mob_id) == mob_dummy) - return 0; + return NULL; return &mob_db(mob_id)->vd; } + +/** + * Create unique view data associated to a spawned monster. + * @param md: Mob to adjust + */ +void mob_set_dynamic_viewdata( struct mob_data* md ){ + // If it is a valid monster and it has not already been created + if( md && !md->vd_changed ){ + // Allocate a dynamic entry + struct view_data* vd = (struct view_data*)aMalloc( sizeof( struct view_data ) ); + + // Copy the current values + memcpy( vd, md->vd, sizeof( struct view_data ) ); + + // Update the pointer to the new entry + md->vd = vd; + + // Flag it as changed so it is freed later on + md->vd_changed = true; + } +} + +/** + * Free any view data associated to a spawned monster. + * @param md: Mob to free + */ +void mob_free_dynamic_viewdata( struct mob_data* md ){ + // If it is a valid monster and it has already been allocated + if( md && md->vd_changed ){ + // Free it + aFree( md->vd ); + + // Remove the reference + md->vd = NULL; + + // Unflag it as changed + md->vd_changed = false; + } +} + /*========================================== * Cleans up mob-spawn data to make it "valid" *------------------------------------------*/ @@ -5189,6 +5229,9 @@ static void mob_load(void) mob_skill_db_set(); } +/** + * Initialize monster data + */ void mob_db_load(void){ memset(mob_db_data,0,sizeof(mob_db_data)); //Clear the array mob_db_data[0] = (struct mob_db*)aCalloc(1, sizeof (struct mob_db)); //This mob is used for random spawns @@ -5201,11 +5244,42 @@ void mob_db_load(void){ mob_load(); } +/** + * Apply the proper view data on monsters during mob_db reload. + * @param md: Mob to adjust + * @param args: va_list of arguments + * @return 0 + */ +static int mob_reload_sub( struct mob_data *md, va_list args ){ + if( md->bl.prev == NULL ){ + return 0; + } + + // If the view data was not overwritten manually + if( !md->vd_changed ){ + // Get the new view data from the mob database + md->vd = mob_get_viewdata(md->mob_id); + + // Respawn all mobs on client side so that they are displayed correctly(if their view id changed) + clif_clearunit_area(&md->bl, CLR_OUTSIGHT); + clif_spawn(&md->bl); + } + + return 0; +} + +/** + * Reload monster data + */ void mob_reload(void) { do_final_mob(); mob_db_load(); + map_foreachmob(mob_reload_sub); } +/** + * Clear spawn data for all monsters + */ void mob_clear_spawninfo() { //Clears spawn related information for a script reload. int i; diff --git a/src/map/mob.h b/src/map/mob.h index 36bedac84f..41adc25963 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -173,6 +173,7 @@ struct mob_data { struct block_list bl; struct unit_data ud; struct view_data *vd; + bool vd_changed; struct status_data status, *base_status; //Second one is in case of leveling up mobs, or tiny/large mobs. struct status_change sc; struct mob_db *db; //For quick data access (saves doing mob_db(md->mob_id) all the time) [Skotlex] @@ -298,6 +299,8 @@ int mobdb_searchname(const char *str); int mobdb_searchname_array(struct mob_db** data, int size, const char *str); int mobdb_checkid(const int id); struct view_data* mob_get_viewdata(int mob_id); +void mob_set_dynamic_viewdata( struct mob_data* md ); +void mob_free_dynamic_viewdata( struct mob_data* md ); struct mob_data *mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int mob_id, const char *event, unsigned int size, unsigned int ai); diff --git a/src/map/script.c b/src/map/script.c index 269aea4c13..fb9d6401a6 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -17769,6 +17769,23 @@ BUILDIN_FUNC(setunitdata) md->base_status = (struct status_data*)aCalloc(1, sizeof(struct status_data)); memcpy(md->base_status, &md->db->status, sizeof(struct status_data)); } + + // Check if the view data will be modified + switch( type ){ + case UMOB_SEX: + //case UMOB_CLASS: // Called by status_set_viewdata + case UMOB_HAIRSTYLE: + case UMOB_HAIRCOLOR: + case UMOB_HEADBOTTOM: + case UMOB_HEADMIDDLE: + case UMOB_HEADTOP: + case UMOB_CLOTHCOLOR: + case UMOB_SHIELD: + case UMOB_WEAPON: + mob_set_dynamic_viewdata( md ); + break; + } + switch (type) { case UMOB_SIZE: md->base_status->size = (unsigned char)value; calc_status = true; break; case UMOB_LEVEL: md->level = (unsigned short)value; break; @@ -17782,8 +17799,8 @@ BUILDIN_FUNC(setunitdata) case UMOB_MODE: md->base_status->mode = (enum e_mode)value; calc_status = true; break; case UMOB_AI: md->special_state.ai = (enum mob_ai)value; break; case UMOB_SCOPTION: md->sc.option = (unsigned short)value; break; - case UMOB_SEX: md->vd->sex = (char)value; break; - case UMOB_CLASS: status_set_viewdata(bl, (unsigned short)value); break; + case UMOB_SEX: md->vd->sex = (char)value; clif_clearunit_area(bl, CLR_OUTSIGHT); clif_spawn(bl); break; + case UMOB_CLASS: status_set_viewdata(bl, (unsigned short)value); clif_clearunit_area(bl, CLR_OUTSIGHT); clif_spawn(bl); break; case UMOB_HAIRSTYLE: clif_changelook(bl, LOOK_HAIR, (unsigned short)value); break; case UMOB_HAIRCOLOR: clif_changelook(bl, LOOK_HAIR_COLOR, (unsigned short)value); break; case UMOB_HEADBOTTOM: clif_changelook(bl, LOOK_HEAD_BOTTOM, (unsigned short)value); break; diff --git a/src/map/status.c b/src/map/status.c index 4d13b2da7b..516aab0aca 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -7680,9 +7680,15 @@ void status_set_viewdata(struct block_list *bl, int class_) case BL_MOB: { TBL_MOB* md = (TBL_MOB*)bl; - if (vd) + if (vd){ + mob_free_dynamic_viewdata( md ); + md->vd = vd; - else + }else if( pcdb_checkid( class_ ) ){ + mob_set_dynamic_viewdata( md ); + + md->vd->class_ = class_; + }else ShowError("status_set_viewdata (MOB): No view data for class %d\n", class_); } break; diff --git a/src/map/unit.c b/src/map/unit.c index c6694f6567..ef713e1ed2 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -3305,6 +3305,8 @@ int unit_free(struct block_list *bl, clr_type clrtype) case BL_MOB: { struct mob_data *md = (struct mob_data*)bl; + mob_free_dynamic_viewdata( md ); + if( md->spawn_timer != INVALID_TIMER ) { delete_timer(md->spawn_timer,mob_delayspawn); md->spawn_timer = INVALID_TIMER; From 6b18ea56a001501515d5f4cc7069357e18a93d61 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 11 Aug 2017 21:21:09 +0200 Subject: [PATCH 094/124] Fixed x64 release mode not building all servers --- rAthena.sln | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rAthena.sln b/rAthena.sln index f28c81e592..27346a5ca5 100644 --- a/rAthena.sln +++ b/rAthena.sln @@ -76,6 +76,7 @@ Global {F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559}.Release|Win32.ActiveCfg = Release|Win32 {F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559}.Release|Win32.Build.0 = Release|Win32 {F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559}.Release|x64.ActiveCfg = Release|x64 + {F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559}.Release|x64.Build.0 = Release|x64 {F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Debug|Win32.ActiveCfg = Debug|Win32 {F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Debug|Win32.Build.0 = Debug|Win32 {F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Debug|x64.ActiveCfg = Debug|x64 @@ -83,6 +84,7 @@ Global {F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Release|Win32.ActiveCfg = Release|Win32 {F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Release|Win32.Build.0 = Release|Win32 {F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Release|x64.ActiveCfg = Release|x64 + {F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Release|x64.Build.0 = Release|x64 {7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Debug|Win32.ActiveCfg = Debug|Win32 {7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Debug|Win32.Build.0 = Debug|Win32 {7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Debug|x64.ActiveCfg = Debug|x64 @@ -90,6 +92,7 @@ Global {7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Release|Win32.ActiveCfg = Release|Win32 {7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Release|Win32.Build.0 = Release|Win32 {7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Release|x64.ActiveCfg = Release|x64 + {7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Release|x64.Build.0 = Release|x64 {864805EA-FD39-453D-9248-C581951BA058}.Debug|Win32.ActiveCfg = Debug|Win32 {864805EA-FD39-453D-9248-C581951BA058}.Debug|Win32.Build.0 = Debug|Win32 {864805EA-FD39-453D-9248-C581951BA058}.Debug|x64.ActiveCfg = Debug|x64 @@ -97,6 +100,7 @@ Global {864805EA-FD39-453D-9248-C581951BA058}.Release|Win32.ActiveCfg = Release|Win32 {864805EA-FD39-453D-9248-C581951BA058}.Release|Win32.Build.0 = Release|Win32 {864805EA-FD39-453D-9248-C581951BA058}.Release|x64.ActiveCfg = Release|x64 + {864805EA-FD39-453D-9248-C581951BA058}.Release|x64.Build.0 = Release|x64 {FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Debug|Win32.ActiveCfg = Debug|Win32 {FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Debug|Win32.Build.0 = Debug|Win32 {FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Debug|x64.ActiveCfg = Debug|x64 @@ -104,6 +108,7 @@ Global {FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Release|Win32.ActiveCfg = Release|Win32 {FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Release|Win32.Build.0 = Release|Win32 {FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Release|x64.ActiveCfg = Release|x64 + {FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Release|x64.Build.0 = Release|x64 {B4114A9C-EEA4-433C-A830-56119A984F24}.Debug|Win32.ActiveCfg = Debug|Win32 {B4114A9C-EEA4-433C-A830-56119A984F24}.Debug|Win32.Build.0 = Debug|Win32 {B4114A9C-EEA4-433C-A830-56119A984F24}.Debug|x64.ActiveCfg = Debug|x64 @@ -111,6 +116,7 @@ Global {B4114A9C-EEA4-433C-A830-56119A984F24}.Release|Win32.ActiveCfg = Release|Win32 {B4114A9C-EEA4-433C-A830-56119A984F24}.Release|Win32.Build.0 = Release|Win32 {B4114A9C-EEA4-433C-A830-56119A984F24}.Release|x64.ActiveCfg = Release|x64 + {B4114A9C-EEA4-433C-A830-56119A984F24}.Release|x64.Build.0 = Release|x64 {352B45B3-FE88-4431-9D89-48CF811446DB}.Debug|Win32.ActiveCfg = Debug|Win32 {352B45B3-FE88-4431-9D89-48CF811446DB}.Debug|Win32.Build.0 = Debug|Win32 {352B45B3-FE88-4431-9D89-48CF811446DB}.Debug|x64.ActiveCfg = Debug|x64 @@ -118,6 +124,7 @@ Global {352B45B3-FE88-4431-9D89-48CF811446DB}.Release|Win32.ActiveCfg = Release|Win32 {352B45B3-FE88-4431-9D89-48CF811446DB}.Release|Win32.Build.0 = Release|Win32 {352B45B3-FE88-4431-9D89-48CF811446DB}.Release|x64.ActiveCfg = Release|x64 + {352B45B3-FE88-4431-9D89-48CF811446DB}.Release|x64.Build.0 = Release|x64 {FC4C071B-2C26-4B03-948A-335C94A88B5E}.Debug|Win32.ActiveCfg = Debug|Win32 {FC4C071B-2C26-4B03-948A-335C94A88B5E}.Debug|Win32.Build.0 = Debug|Win32 {FC4C071B-2C26-4B03-948A-335C94A88B5E}.Debug|x64.ActiveCfg = Debug|x64 @@ -125,6 +132,7 @@ Global {FC4C071B-2C26-4B03-948A-335C94A88B5E}.Release|Win32.ActiveCfg = Release|Win32 {FC4C071B-2C26-4B03-948A-335C94A88B5E}.Release|Win32.Build.0 = Release|Win32 {FC4C071B-2C26-4B03-948A-335C94A88B5E}.Release|x64.ActiveCfg = Release|x64 + {FC4C071B-2C26-4B03-948A-335C94A88B5E}.Release|x64.Build.0 = Release|x64 {61D6A599-6BED-4154-A9FC-40553BD972E0}.Debug|Win32.ActiveCfg = Debug|Win32 {61D6A599-6BED-4154-A9FC-40553BD972E0}.Debug|Win32.Build.0 = Debug|Win32 {61D6A599-6BED-4154-A9FC-40553BD972E0}.Debug|x64.ActiveCfg = Debug|x64 From dce6ff1beac4ebb426b2578296e49dddb49767d8 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 11 Aug 2017 22:52:51 +0200 Subject: [PATCH 095/124] Fixed a memory leak in the script engine Returning NPC variables in a user defined script function inside the same NPC does not require to allocate any additional stack. Fixes #1205 Thanks to @Jeybla --- src/map/script.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/map/script.c b/src/map/script.c index fb9d6401a6..31013b6797 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5623,13 +5623,6 @@ BUILDIN_FUNC(return) get_val(st, data); // current scope, convert to value if( data->ref && data->ref->vars == st->stack->stack_data[st->stack->defsp-1].u.ri->scope.vars ) data->ref = NULL; // Reference to the parent scope, remove reference pointer - } else if( name[0] == '.' && !data->ref ) { // script variable, link to current script - data->ref = (struct reg_db *)aCalloc(sizeof(struct reg_db), 1); - data->ref->vars = st->script->local.vars; - - if (!st->script->local.arrays) - st->script->local.arrays = idb_alloc(DB_OPT_BASE); - data->ref->arrays = st->script->local.arrays; } } } From 087a72731dfaf02e5ffeca838be4a79e787c16b7 Mon Sep 17 00:00:00 2001 From: Atemo <capucrath@gmail.com> Date: Sat, 12 Aug 2017 14:13:51 +0200 Subject: [PATCH 096/124] Fixed storage condition in lasagna town From https://github.com/idathena/trunk/commit/cb580e1f0dfab702239027e3ee1493fdda7de24f Credits @exneval --- npc/re/custom/lasagna/lasagna_npcs.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/npc/re/custom/lasagna/lasagna_npcs.txt b/npc/re/custom/lasagna/lasagna_npcs.txt index 20e4c0cccd..3a393b0552 100644 --- a/npc/re/custom/lasagna/lasagna_npcs.txt +++ b/npc/re/custom/lasagna/lasagna_npcs.txt @@ -1628,12 +1628,18 @@ lasagna,208,188,3 script Cat Paw Service#lasagna 4_M_MERCAT1,4,4,{ savepoint "lasagna",193,183,1,1; close; case 2: - if (getskilllv("SU_BASIC_SKILL") < 1) { + if (!callfunc("F_CanOpenStorage")) { mes "[Cat Paw Commerce Group]"; mes "I'm sorry, but..."; - mes "You should learn some basic skills first if you want to use the warehouse."; - mes "Go and learn the skills until you reach the level to use the warehouse."; - mes "I believe it should be ^4d4dffbasic level 6^000000 for humans."; + if (Class == Job_Summoner) { + mes "You should learn the new basic skill first."; + mes "Go and learn the skill if you want to use the warehouse."; + } + else { + mes "You should learn some basic skills first if you want to use the warehouse."; + mes "Go and learn the skills until you reach the level to use the warehouse."; + mes "I believe it should be ^4d4dffbasic level 6^000000 for humans."; + } close; } if (countitem(7059) > 0)// Free Ticket for Kafra Storage From 37f7fc570809dc64bbc4dd96c2c89af156782baa Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sat, 12 Aug 2017 16:50:00 +0200 Subject: [PATCH 097/124] Fixed memory manager still using SVN revision --- src/common/core.cpp | 10 ++++------ src/common/malloc.c | 11 +++++++++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/common/core.cpp b/src/common/core.cpp index 758850d234..a333e8b15b 100644 --- a/src/common/core.cpp +++ b/src/common/core.cpp @@ -148,12 +148,10 @@ void signals_init (void) { } #endif -#ifdef SVNVERSION -const char *get_svn_revision(void) { - return EXPAND_AND_QUOTE(SVNVERSION); - } -#else// not SVNVERSION const char* get_svn_revision(void) { +#ifdef SVNVERSION + return EXPAND_AND_QUOTE(SVNVERSION); +#else// not SVNVERSION static char svn_version_buffer[16] = ""; FILE *fp; @@ -244,8 +242,8 @@ const char* get_svn_revision(void) { // fallback svn_version_buffer[0] = UNKNOWN_VERSION; return svn_version_buffer; -} #endif +} // Grabs the hash from the last time the user updated their working copy (last pull) const char *get_git_hash (void) { diff --git a/src/common/malloc.c b/src/common/malloc.c index 4eb1f29c79..179c73a9e0 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -529,6 +529,7 @@ static void memmgr_log (char *buf) { if( !log_fp ) { + const char* version; time_t raw; struct tm* t; @@ -537,8 +538,14 @@ static void memmgr_log (char *buf) time(&raw); t = localtime(&raw); - fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (Revision %s).\n", - (t->tm_year+1900), (t->tm_mon+1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, get_svn_revision()); + + if( ( version = get_git_hash() ) && version[0] != UNKNOWN_VERSION ){ + fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (Git Hash %s).\n", (t->tm_year+1900), (t->tm_mon+1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, version ); + }else if( ( version = get_svn_revision() ) && version[0] != UNKNOWN_VERSION ){ + fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (SVN Revision %s).\n", (t->tm_year + 1900), (t->tm_mon + 1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, version ); + }else{ + fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (Unknown version).\n", (t->tm_year + 1900), (t->tm_mon + 1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec ); + } } fprintf(log_fp, "%s", buf); return; From a2fc7d51b3b5df551147cb9a5cfc10046f7c3ec2 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 13 Aug 2017 00:30:54 +0200 Subject: [PATCH 098/124] Fixed a PACKETVER mismatch for the random options Fixes #2332 Thanks to @Milchdealer --- src/map/clif.c | 54 ++++++++++++++++++++--------------------- src/map/clif_packetdb.h | 21 +++++++++------- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index a2ad011540..83b06d34da 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2458,7 +2458,7 @@ static void clif_addcards(unsigned char* buf, struct item* item) /// Fills in part of the item buffers that calls for variable bonuses data. [Napster] /// A maximum of 5 random options can be supported. void clif_add_random_options(unsigned char* buf, struct item *it) { -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 int i; for (i = 0; i < MAX_ITEM_RDM_OPT; i++) { @@ -2493,7 +2493,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, unsigned char header = 0x29a; #elif PACKETVER < 20120925 header = 0x2d4; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 header = 0x990; #elif PACKETVER < 20160921 header = 0xa0c; @@ -2533,7 +2533,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, unsigned char #endif #if PACKETVER >= 20071002 WFIFOW(fd,offs+27) = 0; // HireExpireDate -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 clif_add_random_options(WFIFOP(fd,offs+31), &sd->inventory.u.items_inventory[n]); #if PACKETVER >= 20160921 WFIFOB(fd,offs+54) = 0; // Favorite @@ -2573,7 +2573,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, unsigned char /* Yellow color only for non-stackable item */ WFIFOW(fd,offs+27)=(sd->inventory.u.items_inventory[n].bound && !itemdb_isstackable(sd->inventory.u.items_inventory[n].nameid)) ? BOUND_DISPYELLOW : sd->inventory_data[n]->flag.bindOnEquip ? BOUND_ONEQUIP : 0; #endif -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 clif_add_random_options(WFIFOP(fd,31), &sd->inventory.u.items_inventory[n]); #if PACKETVER >= 20160921 WFIFOB(fd,offs+54) = sd->inventory.u.items_inventory[n].favorite; @@ -2650,7 +2650,7 @@ void clif_item_sub_v5(unsigned char *buf, int n, int idx, struct item *it, struc WBUFL(buf,n+22) = it->expire_time; WBUFW(buf,n+26) = it->bound ? BOUND_DISPYELLOW : id->flag.bindOnEquip ? BOUND_ONEQUIP : 0; //bindOnEquipType WBUFW(buf,n+28) = (id->equip&EQP_VISIBLE) ? id->look : 0; -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 //V6_ITEM_Option WBUFB(buf,n+30) = 0; // nRandomOptionCnt clif_add_random_options(WBUFP(buf, n+31), it);// optionData @@ -2731,7 +2731,7 @@ void clif_inventorylist(struct map_session_data *sd) { const int se = 26; #elif PACKETVER < 20120925 const int se = 28; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 const int se = 31; #else const int se = 57; @@ -2779,7 +2779,7 @@ void clif_inventorylist(struct map_session_data *sd) { WBUFW(bufe,0)=0xa4; #elif PACKETVER < 20120925 WBUFW(bufe,0)=0x2d0; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 WBUFW(bufe,0)=0x992; #else WBUFW(bufe,0)=0xa0d; @@ -2811,7 +2811,7 @@ void clif_equiplist(struct map_session_data *sd) const int cmd = 26; #elif PACKETVER < 20120925 const int cmd = 28; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 const int cmd = 31; #else const int cmd = 57; @@ -2835,7 +2835,7 @@ void clif_equiplist(struct map_session_data *sd) WBUFW(buf,0)=0xa4; #elif PACKETVER < 20120925 WBUFW(buf,0)=0x2d0; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 WBUFW(buf,0)=0x992; #else WBUFW(buf,0)=0xa0d; @@ -2881,7 +2881,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items const int se = 28; const int sidxe = 4; const int cmde = 0x2d1; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 const int se = 31; const int sidxe = 4+24; const int cmde = 0x996; @@ -2969,7 +2969,7 @@ void clif_cartlist(struct map_session_data *sd) const int cmd = 26; #elif PACKETVER < 20120925 const int cmd = 28; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 const int cmd = 31; #else const int cmd = 57; @@ -3012,7 +3012,7 @@ void clif_cartlist(struct map_session_data *sd) WBUFW(bufe,0)=0x122; #elif PACKETVER < 20120925 WBUFW(bufe,0)=0x2d2; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 WBUFW(bufe,0)=0x994; #else WBUFW(bufe,0)=0xa0f; @@ -4308,7 +4308,7 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd unsigned char *buf; #if PACKETVER < 20100223 const int cmd = 0xe9; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 const int cmd = 0x80f; #else const int cmd = 0xa09; @@ -4338,7 +4338,7 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd WBUFW(buf,13)= 0; //card (4w) WBUFW(buf,15)= 0; //card (4w) WBUFW(buf,17)= 0; //card (4w) -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 clif_add_random_options(WBUFP(buf, 19), &sd->inventory.u.items_inventory[index]); #endif } @@ -4364,7 +4364,7 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd WBUFB(buf,9) = sd->inventory.u.items_inventory[index].attribute; // attribute WBUFB(buf,10)= sd->inventory.u.items_inventory[index].refine; //refine clif_addcards(WBUFP(buf, 11), &sd->inventory.u.items_inventory[index]); -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 clif_add_random_options(WBUFP(buf, 19), &sd->inventory.u.items_inventory[index]); #endif } @@ -4481,7 +4481,7 @@ void clif_storageitemadded(struct map_session_data* sd, struct item* i, int inde { #if PACKETVER < 5 const int cmd = 0xf4; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 const int cmd = 0x1c4; #else const int cmd = 0xa0a; @@ -4507,7 +4507,7 @@ void clif_storageitemadded(struct map_session_data* sd, struct item* i, int inde WFIFOB(fd,11+offset) = i->attribute; // attribute WFIFOB(fd,12+offset) = i->refine; //refine clif_addcards(WFIFOP(fd,13+offset), i); -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 clif_add_random_options(WFIFOP(fd,21+offset), i); #endif WFIFOSET(fd,packet_len(cmd)); @@ -6764,7 +6764,7 @@ void clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail) { #if PACKETVER < 5 const int cmd = 0x124; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 const int cmd = 0x1c5; #else const int cmd = 0xa0b; @@ -6796,7 +6796,7 @@ void clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail) WBUFB(buf,11+offset)=sd->cart.u.items_cart[n].attribute; WBUFB(buf,12+offset)=sd->cart.u.items_cart[n].refine; clif_addcards(WBUFP(buf,13+offset), &sd->cart.u.items_cart[n]); -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 clif_add_random_options(WBUFP(buf,21+offset), &sd->cart.u.items_cart[n]); #endif WFIFOSET(fd,packet_len(cmd)); @@ -7126,7 +7126,7 @@ void clif_vendinglist(struct map_session_data* sd, int id, struct s_vending* ven const int offset = 12; #endif -#if PACKETVER < 20150226 +#if PACKETVER < 20150225 const int item_length = 22; #elif PACKETVER < 20160921 const int item_length = 47; @@ -7162,7 +7162,7 @@ void clif_vendinglist(struct map_session_data* sd, int id, struct s_vending* ven WFIFOB(fd,offset+12+i*item_length) = vsd->cart.u.items_cart[index].attribute; WFIFOB(fd,offset+13+i*item_length) = vsd->cart.u.items_cart[index].refine; clif_addcards(WFIFOP(fd,offset+14+i*item_length), &vsd->cart.u.items_cart[index]); -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 clif_add_random_options(WFIFOP(fd,offset+22+i*item_length), &vsd->cart.u.items_cart[index]); #if PACKETVER >= 20160921 WFIFOL(fd,offset+47+i*item_length) = pc_equippoint_sub(sd,data); @@ -7224,7 +7224,7 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven int i,fd; int count; -#if PACKETVER < 20150226 +#if PACKETVER < 20150225 const int item_length = 22; #else const int item_length = 47; @@ -7251,7 +7251,7 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven WFIFOB(fd,20+i*item_length) = sd->cart.u.items_cart[index].attribute; WFIFOB(fd,21+i*item_length) = sd->cart.u.items_cart[index].refine; clif_addcards(WFIFOP(fd,22+i*item_length), &sd->cart.u.items_cart[index]); -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 clif_add_random_options(WFIFOP(fd,30+i*item_length), &sd->cart.u.items_cart[index]); #endif } @@ -9771,7 +9771,7 @@ void clif_equipcheckbox(struct map_session_data* sd) /// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.28B* (ZC_EQUIPWIN_MICROSCOPE2, PACKETVER >= 20101124) /// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.28B* (ZC_EQUIPWIN_MICROSCOPE2, PACKETVER >= 20110111) /// 0997 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.31B* (ZC_EQUIPWIN_MICROSCOPE_V5, PACKETVER >= 20120925) -/// 0a2d <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.57B* (ZC_EQUIPWIN_MICROSCOPE_V6, PACKETVER >= 20150226) +/// 0a2d <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.57B* (ZC_EQUIPWIN_MICROSCOPE_V6, PACKETVER >= 20150225) void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* tsd) { uint8* buf; @@ -9780,7 +9780,7 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts const int s = 26; #elif PACKETVER < 20120925 const int s = 28; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 const int s = 31; #else const int s = 57; @@ -9796,7 +9796,7 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts WBUFW(buf, 0) = 0x2d7; #elif PACKETVER < 20120925 WBUFW(buf, 0) = 0x859; -#elif PACKETVER < 20150226 +#elif PACKETVER < 20150225 WBUFW(buf, 0) = 0x997; #else WBUFW(buf, 0) = 0xa2d; @@ -17781,7 +17781,7 @@ static void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) /// 1 = "next" label to retrieve more results void clif_search_store_info_ack(struct map_session_data* sd) { -#if PACKETVER >= 20150226 +#if PACKETVER >= 20150225 const unsigned int blocksize = MESSAGE_SIZE+26+5*MAX_ITEM_RDM_OPT; #else const unsigned int blocksize = MESSAGE_SIZE+26; diff --git a/src/map/clif_packetdb.h b/src/map/clif_packetdb.h index 732ed028a8..56f0a129ed 100644 --- a/src/map/clif_packetdb.h +++ b/src/map/clif_packetdb.h @@ -2225,6 +2225,18 @@ //packet(0x09F8,-1); // ZC_ALL_QUEST_LIST3 #endif +// 2015-02-25aRagexeRE +#if PACKETVER >= 20150225 + packet(0x0A09,45); // ZC_ADD_EXCHANGE_ITEM3 + packet(0x0A0A,47); // ZC_ADD_ITEM_TO_STORE3 + packet(0x0A0B,47); // ZC_ADD_ITEM_TO_CART3 + packet(0x0A0C,56); // ZC_ITEM_PICKUP_ACK_V6 + packet(0x0A0D,-1); // ZC_INVENTORY_ITEMLIST_EQUIP_V6 + packet(0x0A0F,-1); // ZC_CART_ITEMLIST_EQUIP_V6 + packet(0x0A10,-1); // ZC_STORE_ITEMLIST_EQUIP_V6 + packet(0x0A2D,-1); // ZC_EQUIPWIN_MICROSCOPE_V6 +#endif + // 2015-05-13aRagexe #if PACKETVER >= 20150513 // New Packets @@ -2256,15 +2268,6 @@ parseable_packet(0x0A13,26,clif_parse_Mail_Receiver_Check,2); // CZ_CHECK_RECEIVE_CHARACTER_NAME packet(0x0A14,10); // ZC_CHECK_RECEIVE_CHARACTER_NAME packet(0x0A32,2); // ZC_OPEN_RODEX_THROUGH_NPC_ONLY - // New EquipPackets Support - packet(0x0A09,45); // ZC_ADD_EXCHANGE_ITEM3 - packet(0x0A0A,47); // ZC_ADD_ITEM_TO_STORE3 - packet(0x0A0B,47); // ZC_ADD_ITEM_TO_CART3 - packet(0x0A0C,56); // ZC_ITEM_PICKUP_ACK_V6 - packet(0x0A0D,-1); // ZC_INVENTORY_ITEMLIST_EQUIP_V6 - packet(0x0A0F,-1); // ZC_CART_ITEMLIST_EQUIP_V6 - packet(0x0A10,-1); // ZC_STORE_ITEMLIST_EQUIP_V6 - packet(0x0A2D,-1); // ZC_EQUIPWIN_MICROSCOPE_V6 // OneClick Itemidentify parseable_packet(0x0A35,4,clif_parse_Oneclick_Itemidentify,2); // CZ_REQ_ONECLICK_ITEMIDENTIFY // Achievement System From fcc4936b234a8f806e6978277f334b1cc25671a9 Mon Sep 17 00:00:00 2001 From: keitenai <keitenai@users.noreply.github.com> Date: Sun, 13 Aug 2017 20:35:51 +0800 Subject: [PATCH 099/124] Fixed script dialogue's NPC name to its proper order. (#2320) Fixed script dialogue's NPC name to its proper order. Credit @keitenai --- npc/re/quests/quests_eclage.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/re/quests/quests_eclage.txt b/npc/re/quests/quests_eclage.txt index 7aa00d55fd..2b29c9da8d 100644 --- a/npc/re/quests/quests_eclage.txt +++ b/npc/re/quests/quests_eclage.txt @@ -2107,8 +2107,8 @@ ecl_fild01,97,315,4 script Traveler#ep14_2 4_M_JOB_HUNTER,{ next; mes "[Traveler]"; mes "If you are thinking about selling it, you should just give up."; - next; mes "I have no wishes to sell it no matter how much you beg."; + next; mes "[Traveler]"; mes "This feather.."; } From f9c6b92a6323f2eee3aec2e434bc54e8a8c4ea93 Mon Sep 17 00:00:00 2001 From: Vincent Stumpf <vincents.995@gmail.com> Date: Sun, 13 Aug 2017 14:44:18 -0700 Subject: [PATCH 100/124] Fixes memory leak in char-server (#2335) Fixes #2330 Allocated memory in various StringBuf instances was being cleared instead of freeing it completely. --- src/char/int_achievement.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/char/int_achievement.c b/src/char/int_achievement.c index 9eed8239c1..738cdc0099 100644 --- a/src/char/int_achievement.c +++ b/src/char/int_achievement.c @@ -78,7 +78,7 @@ struct achievement *mapif_achievements_fromsql(uint32 char_id, int *count) } SqlStmt_Free(stmt); - StringBuf_Clear(&buf); + StringBuf_Destroy(&buf); ShowInfo("achievement load complete from DB - id: %d (total: %d)\n", char_id, *count); @@ -134,11 +134,11 @@ bool mapif_achievement_add(uint32 char_id, struct achievement ad) if (SQL_ERROR == Sql_QueryStr(sql_handle, StringBuf_Value(&buf))) { Sql_ShowDebug(sql_handle); - StringBuf_Clear(&buf); + StringBuf_Destroy(&buf); return false; } - StringBuf_Clear(&buf); + StringBuf_Destroy(&buf); return true; } @@ -172,11 +172,11 @@ bool mapif_achievement_update(uint32 char_id, struct achievement ad) if (SQL_ERROR == Sql_QueryStr(sql_handle, StringBuf_Value(&buf))) { Sql_ShowDebug(sql_handle); - StringBuf_Clear(&buf); + StringBuf_Destroy(&buf); return false; } - StringBuf_Clear(&buf); + StringBuf_Destroy(&buf); return true; } From cc1d26fe741dcc57a55f160b95dd4611bcdb4e8b Mon Sep 17 00:00:00 2001 From: Jittapan Pluemsumran <nightsheep@outlook.com> Date: Mon, 14 Aug 2017 06:27:58 +0700 Subject: [PATCH 101/124] Inter server C++ conversion (#2322) * Renamed inter.c to inter.cpp and refactored it * Converted inter_server.conf to inter_server.yml * Updated the makefiles * Refactored inter-server storage handling logic * Fixed a bug with wrong maximum being displayed When you took out an item of the storage it would always display the maximum amount of the normal storage. * Fixed a bug with storages that are over maximum Thanks to @Akkarinage, @Lemongrass3110 and @Jeybla --- Makefile.in | 2 +- conf/import-tmpl/inter_server.conf | 0 conf/import-tmpl/inter_server.yml | 17 +++ conf/inter_athena.conf | 2 +- conf/inter_server.conf | 26 ---- conf/inter_server.yml | 34 +++++ configure | 2 +- configure.in | 1 + doc/script_commands.txt | 2 +- rAthena.sln | 1 + src/char/Makefile.in | 23 ++- src/char/char-server.vcxproj | 8 +- src/char/char-server.vcxproj.filters | 4 +- src/char/int_achievement.h | 7 + src/char/int_auction.h | 8 + src/char/int_clan.h | 15 +- src/char/int_quest.h | 8 + src/char/{int_storage.c => int_storage.cpp} | 55 ++----- src/char/int_storage.h | 2 + src/char/{inter.c => inter.cpp} | 154 +++++++++++--------- src/char/inter.h | 18 ++- src/common/Makefile.in | 6 +- src/common/malloc.h | 3 +- src/common/sql.h | 8 +- src/common/strlib.h | 8 +- src/login/Makefile.in | 2 - src/map/Makefile.in | 2 - src/map/intif.c | 5 - src/map/map-server.vcxproj | 2 +- src/map/storage.c | 5 +- 30 files changed, 246 insertions(+), 184 deletions(-) delete mode 100644 conf/import-tmpl/inter_server.conf create mode 100644 conf/import-tmpl/inter_server.yml delete mode 100644 conf/inter_server.conf create mode 100644 conf/inter_server.yml rename src/char/{int_storage.c => int_storage.cpp} (91%) rename src/char/{inter.c => inter.cpp} (93%) diff --git a/Makefile.in b/Makefile.in index bf4e105e0d..05e4d4e81e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,7 +7,7 @@ ifeq ($(HAVE_MYSQL),yes) SERVER_DEPENDS=common login char map import COMMON_DEPENDS=mt19937ar libconfig yaml-cpp LOGIN_DEPENDS=mt19937ar libconfig common - CHAR_DEPENDS=mt19937ar libconfig common + CHAR_DEPENDS=mt19937ar libconfig common yaml-cpp MAP_DEPENDS=mt19937ar libconfig common yaml-cpp else ALL_DEPENDS=needs_mysql diff --git a/conf/import-tmpl/inter_server.conf b/conf/import-tmpl/inter_server.conf deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/conf/import-tmpl/inter_server.yml b/conf/import-tmpl/inter_server.yml new file mode 100644 index 0000000000..85e71fe78e --- /dev/null +++ b/conf/import-tmpl/inter_server.yml @@ -0,0 +1,17 @@ +# Config for Storages +# +# To access the premium storage, use script command 'openstorage2'. +# If premium storages are added, copy the structure of the storage table and match the table name in this config. +# The 'max' of premium storages are not adjusted by 'vip_storage_increase' config nor MIN_STORAGE. +# +# Structure: +# - ID: <storage_id> // (int) Storage ID will be used for script command 'openstorage2'. +# Name: "<storage name>" // (string) Storage name will be sent to the client to display on the title bar. +# Table: "<storage_table>" // (string) Name of table where storage is saved. The table stucture is the same as the default storage table. +# Max: <max_amount> // (int) *optional* Maximum number of items in storage. MAX_STORAGE will be used if no value is defined. +############################################################################################################################################### +#Storages: +# - ID: 1 +# Name: "VIP Storage" +# Table: "vip_storage" +# Max: 300 diff --git a/conf/inter_athena.conf b/conf/inter_athena.conf index 8328e5ca50..5938f2e20e 100644 --- a/conf/inter_athena.conf +++ b/conf/inter_athena.conf @@ -153,6 +153,6 @@ roulette_table: db_roulette // Use SQL item_db, mob_db and mob_skill_db for the map server? (yes/no) use_sql_db: no -inter_server_conf: conf/inter_server.conf +inter_server_conf: inter_server.yml import: conf/import/inter_conf.txt diff --git a/conf/inter_server.conf b/conf/inter_server.conf deleted file mode 100644 index 3f0bc2f852..0000000000 --- a/conf/inter_server.conf +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Config for Storages - * - * To access the premium storage, use script command 'openstorage2'. - * If premium storages are added, copy the structure of the storage table and match the table name in this config. - * The 'max' of premium storages are not adjusted by 'vip_storage_increase' config nor MIN_STORAGE. - * - * Structure: -{ - id: <storage_id> // (int) Storage ID will be used for script command 'openstorage2'. - name: "<storage name>" // (string) Storage name will be sent to the client to display on the title bar. - table: "<storage_table>" // (string) Name of table where storage is saved. The table stucture is the same as the default storage table. - max: <max_amount> // (int) *optional* Maximum number of items in storage. MAX_STORAGE will be used if no value is defined. -}, // Use comma to add more storages - **/ - -storages: ( -{ - // Default Storage - // DO NOT CHANGE THIS UNLESS YOU KNOW WHAT YOU ARE DOING - id: 0 - name: "Storage" - table: "storage" - //max: 600 -} -) diff --git a/conf/inter_server.yml b/conf/inter_server.yml new file mode 100644 index 0000000000..70cd3d09c7 --- /dev/null +++ b/conf/inter_server.yml @@ -0,0 +1,34 @@ +# This file is a part of rAthena. +# Copyright(C) 2017 rAthena Development Team +# https://rathena.org - https://github.com/rathena +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +########################################################################### +# Config for Storages +# +# To access the premium storage, use script command 'openstorage2'. +# If premium storages are added, copy the structure of the storage table and match the table name in this config. +# The 'max' of premium storages are not adjusted by 'vip_storage_increase' config nor MIN_STORAGE. +# +# Structure: +# - ID: <storage_id> // (int) Storage ID will be used for script command 'openstorage2'. +# Name: "<storage name>" // (string) Storage name will be sent to the client to display on the title bar. +# Table: "<storage_table>" // (string) Name of table where storage is saved. The table stucture is the same as the default storage table. +# Max: <max_amount> // (int) *optional* Maximum number of items in storage. MAX_STORAGE will be used if no value is defined. + +Storages: + - ID: 0 + Name: "Storage" + Table: "storage" diff --git a/configure b/configure index ffd6e161eb..53ab81fe6c 100755 --- a/configure +++ b/configure @@ -4951,7 +4951,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CFLAGS="$CFLAGS -pipe -ffast-math -Wall" CPPFLAGS="$CPPFLAGS -I../common" - +CXXFLAGS="$CXXFLAGS -std=c++11" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 diff --git a/configure.in b/configure.in index 6d527190af..1f22fdb709 100644 --- a/configure.in +++ b/configure.in @@ -440,6 +440,7 @@ AC_LANG([C++]) CFLAGS="$CFLAGS -pipe -ffast-math -Wall" CPPFLAGS="$CPPFLAGS -I../common" +CXXFLAGS="$CXXFLAGS -std=c++11" AC_C_BIGENDIAN( diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 0c20f96a28..9d5df1faca 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -5158,7 +5158,7 @@ window, to avoid any disruption when both windows overlap. *openstorage2 <storage_id>,<mode>{,<account_id>}; Just like the 'openstorage' command, except this command can open additional storages -by the specified <storage_id>. For <storage_id>, please read the conf/inter_server.conf +by the specified <storage_id>. For <storage_id>, please read the conf/inter_server.yml for storage groups. Values for <mode> are: diff --git a/rAthena.sln b/rAthena.sln index 27346a5ca5..410c2620fc 100644 --- a/rAthena.sln +++ b/rAthena.sln @@ -43,6 +43,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "src\char\char-server.vcxproj", "{FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}" ProjectSection(ProjectDependencies) = postProject {F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559} = {F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559} + {61D6A599-6BED-4154-A9FC-40553BD972E0} = {61D6A599-6BED-4154-A9FC-40553BD972E0} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server", "src\map\map-server.vcxproj", "{B4114A9C-EEA4-433C-A830-56119A984F24}" diff --git a/src/char/Makefile.in b/src/char/Makefile.in index 1d3dfe9af0..1bd34581f9 100644 --- a/src/char/Makefile.in +++ b/src/char/Makefile.in @@ -18,6 +18,12 @@ CHAR_OBJ = $(shell ls *.c | sed -e "s/\.c/\.o/g") $(shell ls *.cpp | sed -e "s/\ CHAR_DIR_OBJ = $(CHAR_OBJ:%=obj/%) CHAR_H = $(shell ls ../char/*.h) +YAML_CPP_OBJ = $(shell find ../../3rdparty/yaml-cpp/ -type f -name "*.cpp" | sed -e "s/\.cpp/\.o/g" ) +YAML_CPP_DIR_OBJ = $(YAML_CPP_OBJ:%=obj/%) +YAML_CPP_AR = ../../3rdparty/yaml-cpp/obj/yaml-cpp.a +YAML_CPP_H = $(shell find ../../3rdparty/yaml-cpp/ -type f -name "*.h") +YAML_CPP_INCLUDE = -I../../3rdparty/yaml-cpp/include + HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) SERVER_DEPENDS=char-server @@ -26,8 +32,6 @@ else endif ALL_DEPENDS=server -CXXFLAGS=-std=c++11 - @SET_MAKE@ ##################################################################### @@ -51,9 +55,9 @@ help: ##################################################################### -char-server: obj $(CHAR_DIR_OBJ) $(LIBCONFIG_AR) $(COMMON_AR) +char-server: obj $(CHAR_DIR_OBJ) $(LIBCONFIG_AR) $(COMMON_AR) $(YAML_CPP_AR) @echo " LD @OCHR@@EXEEXT@" - @@CXX@ @LDFLAGS@ -o ../../@OCHR@@EXEEXT@ $(CHAR_DIR_OBJ) $(LIBCONFIG_AR) $(COMMON_AR) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ + @@CXX@ @LDFLAGS@ -o ../../@OCHR@@EXEEXT@ $(CHAR_DIR_OBJ) $(LIBCONFIG_AR) $(COMMON_AR) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(YAML_CPP_AR) @LIBS@ @MYSQL_LIBS@ needs_mysql: @echo "MySQL not found or disabled by the configure script" @@ -63,13 +67,13 @@ obj: @echo " MKDIR obj" @-mkdir obj -obj/%.o: %.c $(CHAR_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj/%.o: %.c $(CHAR_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CC $<" - @@CC@ @CFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CC@ @CFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< -obj/%.o: %.cpp $(CHAR_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj/%.o: %.cpp $(CHAR_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CXX $<" - @@CXX@ @CXXFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CXX@ @CXXFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< # missing object files $(COMMON_AR): @@ -80,3 +84,6 @@ $(MT19937AR_OBJ): $(LIBCONFIG_AR): @$(MAKE) -C ../../3rdparty/libconfig + +$(YAML_CPP_AR): + @$(MAKE) -C ../../3rdparty/yaml-cpp diff --git a/src/char/char-server.vcxproj b/src/char/char-server.vcxproj index f515e8ad25..18471e7c2c 100644 --- a/src/char/char-server.vcxproj +++ b/src/char/char-server.vcxproj @@ -94,6 +94,7 @@ <Optimization>Disabled</Optimization> <PreprocessorDefinitions>$(DefineConstants);WIN32;FD_SETSIZE=4096;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;LIBCONFIG_STATIC;YY_USE_CONST;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\</AdditionalIncludeDirectories> </ClCompile> <Link> <SubSystem>Console</SubSystem> @@ -109,6 +110,7 @@ <Optimization>Disabled</Optimization> <PreprocessorDefinitions>$(DefineConstants);WIN32;FD_SETSIZE=4096;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;LIBCONFIG_STATIC;YY_USE_CONST;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\</AdditionalIncludeDirectories> </ClCompile> <Link> <SubSystem>Console</SubSystem> @@ -126,6 +128,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>$(DefineConstants);WIN32;FD_SETSIZE=4096;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;LIBCONFIG_STATIC;YY_USE_CONST;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\</AdditionalIncludeDirectories> </ClCompile> <Link> <SubSystem>Console</SubSystem> @@ -145,6 +148,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>$(DefineConstants);WIN32;FD_SETSIZE=4096;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;LIBCONFIG_STATIC;YY_USE_CONST;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\</AdditionalIncludeDirectories> </ClCompile> <Link> <SubSystem>Console</SubSystem> @@ -182,7 +186,7 @@ <ClCompile Include="char_cnslif.c" /> <ClCompile Include="char_logif.c" /> <ClCompile Include="char_mapif.c" /> - <ClCompile Include="inter.c" /> + <ClCompile Include="inter.cpp" /> <ClCompile Include="int_achievement.c" /> <ClCompile Include="int_auction.c" /> <ClCompile Include="int_clan.c" /> @@ -194,7 +198,7 @@ <ClCompile Include="int_party.c" /> <ClCompile Include="int_pet.c" /> <ClCompile Include="int_quest.c" /> - <ClCompile Include="int_storage.c" /> + <ClCompile Include="int_storage.cpp" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> diff --git a/src/char/char-server.vcxproj.filters b/src/char/char-server.vcxproj.filters index cc6aa2d202..74a9c20510 100644 --- a/src/char/char-server.vcxproj.filters +++ b/src/char/char-server.vcxproj.filters @@ -112,10 +112,10 @@ <ClCompile Include="int_quest.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="int_storage.c"> + <ClCompile Include="int_storage.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="inter.c"> + <ClCompile Include="inter.cpp"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="int_clan.c"> diff --git a/src/char/int_achievement.h b/src/char/int_achievement.h index 908c61dcbc..1e9e501ab1 100644 --- a/src/char/int_achievement.h +++ b/src/char/int_achievement.h @@ -4,6 +4,13 @@ #ifndef _INT_ACHIEVEMENT_SQL_H_ #define _INT_ACHIEVEMENT_SQL_H_ +#ifdef __cplusplus +extern "C" { +#endif + int inter_achievement_parse_frommap(int fd); +#ifdef __cplusplus +} +#endif #endif /* _INT_ACHIEVEMENT_SQL_H_ */ diff --git a/src/char/int_auction.h b/src/char/int_auction.h index bf26b152c0..83a3428f1c 100644 --- a/src/char/int_auction.h +++ b/src/char/int_auction.h @@ -4,9 +4,17 @@ #ifndef _INT_AUCTION_SQL_H_ #define _INT_AUCTION_SQL_H_ +#ifdef __cplusplus +extern "C" { +#endif + int inter_auction_parse_frommap(int fd); int inter_auction_sql_init(void); void inter_auction_sql_final(void); +#ifdef __cplusplus +} +#endif + #endif /* _INT_AUCTION_SQL_H_ */ diff --git a/src/char/int_clan.h b/src/char/int_clan.h index c21e6ecffa..d698bcd152 100644 --- a/src/char/int_clan.h +++ b/src/char/int_clan.h @@ -4,7 +4,16 @@ #ifndef _INT_CLAN_H_ #define _INT_CLAN_H_ - int inter_clan_parse_frommap( int fd ); - int inter_clan_init(void); - void inter_clan_final(void); +#ifdef __cplusplus +extern "C" { +#endif + +int inter_clan_parse_frommap( int fd ); +int inter_clan_init(void); +void inter_clan_final(void); + +#ifdef __cplusplus +} +#endif + #endif /* _INT_CLAN_H_ */ diff --git a/src/char/int_quest.h b/src/char/int_quest.h index b0403f4361..8da9b3efdf 100644 --- a/src/char/int_quest.h +++ b/src/char/int_quest.h @@ -4,7 +4,15 @@ #ifndef _QUEST_H_ #define _QUEST_H_ +#ifdef __cplusplus +extern "C" { +#endif + int inter_quest_parse_frommap(int fd); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/char/int_storage.c b/src/char/int_storage.cpp similarity index 91% rename from src/char/int_storage.c rename to src/char/int_storage.cpp index f53811d4ca..c450882cb4 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.cpp @@ -1,6 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#include "int_storage.h" + #include "../common/malloc.h" #include "../common/mmo.h" #include "../common/showmsg.h" @@ -12,23 +14,13 @@ #include <stdlib.h> - -#define STORAGE_MEMINC 16 - /** - * Check if sotrage ID is valid + * Check if storage ID is valid * @param id Storage ID * @return True:Valid, False:Invalid **/ bool inter_premiumStorage_exists(uint8 id) { - if (interserv_config.storages && interserv_config.storage_count) { - int i; - for (i = 0; i < interserv_config.storage_count; i++) { - if (interserv_config.storages[i].id == id) - return true; - } - } - return false; + return interserv_config.storages.find(id) != interserv_config.storages.end(); } /** @@ -37,13 +29,8 @@ bool inter_premiumStorage_exists(uint8 id) { * @return Max amount **/ int inter_premiumStorage_getMax(uint8 id) { - if (interserv_config.storages && interserv_config.storage_count) { - int i; - for (i = 0; i < interserv_config.storage_count; i++) { - if (&interserv_config.storages[i] && interserv_config.storages[i].id == id) - return interserv_config.storages[i].max_num; - } - } + if (inter_premiumStorage_exists(id)) + return interserv_config.storages[id]->max_num; return MAX_STORAGE; } @@ -53,13 +40,8 @@ int inter_premiumStorage_getMax(uint8 id) { * @return Table name **/ const char *inter_premiumStorage_getTableName(uint8 id) { - if (interserv_config.storages && interserv_config.storage_count) { - int i; - for (i = 0; i < interserv_config.storage_count; i++) { - if (&interserv_config.storages[i] && interserv_config.storages[i].id == id) - return interserv_config.storages[i].table; - } - } + if (inter_premiumStorage_exists(id)) + return interserv_config.storages[id]->table; return schema_config.storage_db; } @@ -69,13 +51,8 @@ const char *inter_premiumStorage_getTableName(uint8 id) { * @return printable name **/ const char *inter_premiumStorage_getPrintableName(uint8 id) { - if (interserv_config.storages && interserv_config.storage_count) { - int i; - for (i = 0; i < interserv_config.storage_count; i++) { - if (&interserv_config.storages[i] && interserv_config.storages[i].id == id) - return interserv_config.storages[i].name; - } - } + if (inter_premiumStorage_exists(id)) + return interserv_config.storages[id]->name; return "Storage"; } @@ -170,20 +147,18 @@ bool guild_storage_fromsql(int guild_id, struct s_storage* p) } static void inter_storage_checkDB(void) { - int i = 0; // Checking storage tables - for (i = 0; i < interserv_config.storage_count; i++) { - if (!&interserv_config.storages[i] || !interserv_config.storages[i].name || !interserv_config.storages[i].table || *interserv_config.storages[i].table == '\0') - continue; + for (auto storage_table : interserv_config.storages) { if (SQL_ERROR == Sql_Query(sql_handle, "SELECT `id`,`account_id`,`nameid`,`amount`,`equip`,`identify`,`refine`," "`attribute`,`card0`,`card1`,`card2`,`card3`,`option_id0`,`option_val0`,`option_parm0`,`option_id1`,`option_val1`,`option_parm1`," "`option_id2`,`option_val2`,`option_parm2`,`option_id3`,`option_val3`,`option_parm3`,`option_id4`,`option_val4`,`option_parm4`," "`expire_time`,`bound`,`unique_id`" - " FROM `%s` LIMIT 1;", interserv_config.storages[i].table) ){ + " FROM `%s` LIMIT 1;", storage_table.second->table)) { Sql_ShowDebug(sql_handle); + }else{ + Sql_FreeResult(sql_handle); } } - Sql_FreeResult(sql_handle); } //--------------------------------------------------------- @@ -381,7 +356,7 @@ bool mapif_parse_itembound_retrieve(int fd) memcpy(&items[count++], &item, sizeof(struct item)); Sql_FreeResult(sql_handle); - ShowInfo("Found '"CL_WHITE"%d"CL_RESET"' guild bound item(s) from CID = "CL_WHITE"%d"CL_RESET", AID = %d, Guild ID = "CL_WHITE"%d"CL_RESET".\n", count, char_id, account_id, guild_id); + ShowInfo("Found '" CL_WHITE "%d" CL_RESET "' guild bound item(s) from CID = " CL_WHITE "%d" CL_RESET ", AID = %d, Guild ID = " CL_WHITE "%d" CL_RESET ".\n", count, char_id, account_id, guild_id); if (!count) { //No items found - No need to continue StringBuf_Destroy(&buf); SqlStmt_Free(stmt); diff --git a/src/char/int_storage.h b/src/char/int_storage.h index bb7910b3aa..d1435d0ce1 100644 --- a/src/char/int_storage.h +++ b/src/char/int_storage.h @@ -4,6 +4,8 @@ #ifndef _INT_STORAGE_SQL_H_ #define _INT_STORAGE_SQL_H_ +#include "../common/cbasetypes.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/src/char/inter.c b/src/char/inter.cpp similarity index 93% rename from src/char/inter.c rename to src/char/inter.cpp index 135c944107..a0843e069f 100644 --- a/src/char/inter.c +++ b/src/char/inter.cpp @@ -2,6 +2,7 @@ // For more information, see LICENCE in the main folder #include "../common/mmo.h" +#include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/strlib.h" #include "../common/showmsg.h" @@ -24,6 +25,10 @@ #include "int_clan.h" #include "int_achievement.h" +#include <yaml-cpp/yaml.h> + +#include <string> +#include <vector> #include <stdlib.h> #include <sys/stat.h> // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool] @@ -345,7 +350,7 @@ void geoip_readdb(void){ geoip_cache = (unsigned char *) aMalloc(sizeof(unsigned char) * bufa.st_size); if(fread(geoip_cache, sizeof(unsigned char), bufa.st_size, db) != bufa.st_size) { ShowError("geoip_cache reading didn't read all elements \n"); } fclose(db); - ShowStatus("Finished Reading "CL_GREEN"GeoIP"CL_RESET" Database.\n"); + ShowStatus("Finished Reading " CL_GREEN "GeoIP" CL_RESET " Database.\n"); } /* [Dekamaster/Nightroad] */ /* WHY NOT A DBMAP: There are millions of entries in GeoIP and it has its own algorithm to go quickly through them, a DBMap wouldn't be efficient */ @@ -804,7 +809,7 @@ static int inter_config_read(const char* cfgName) else if(!strcmpi(w1,"log_inter")) charserv_config.log_inter = atoi(w2); else if(!strcmpi(w1,"inter_server_conf")) - strcpy(interserv_config.cfgFile, w2); + interserv_config.cfgFile = w2; else if(!strcmpi(w1,"import")) inter_config_read(w2); } @@ -833,85 +838,102 @@ int inter_log(char* fmt, ...) return 0; } +static void yaml_invalid_warning(const char* fmt, YAML::Node &node, std::string &file) { + YAML::Emitter out; + out << node; + ShowWarning(fmt, file.c_str()); + ShowMessage("%s\n", out.c_str()); +} + /** * Read inter config file **/ static void inter_config_readConf(void) { - int count = 0; - config_setting_t *config = NULL; + std::vector<std::string> directories = { "conf/", "conf/import/" }; + static const std::string file_name(interserv_config.cfgFile); - if (conf_read_file(&interserv_config.cfg, interserv_config.cfgFile)) - return; + for (auto directory : directories) { + std::string current_file = directory + file_name; + YAML::Node config; + int count = 0; - // Read storages - config = config_lookup(&interserv_config.cfg, "storages"); - if (config && (count = config_setting_length(config))) { - int i; - for (i = 0; i < count; i++) { - int id, max_num; - const char *name, *tablename; - struct s_storage_table table; - config_setting_t *entry = config_setting_get_elem(config, i); - - if (!config_setting_lookup_int(entry, "id", &id)) { - ShowConfigWarning(entry, "inter_config_readConf: Cannot find storage \"id\" in member %d", i); - continue; - } - - if (!config_setting_lookup_string(entry, "name", &name)) { - ShowConfigWarning(entry, "inter_config_readConf: Cannot find storage \"name\" in member %d", i); - continue; - } - - if (!config_setting_lookup_string(entry, "table", &tablename)) { - ShowConfigWarning(entry, "inter_config_readConf: Cannot find storage \"table\" in member %d", i); - continue; - } - - if (!config_setting_lookup_int(entry, "max", &max_num)) - max_num = MAX_STORAGE; - else if (max_num > MAX_STORAGE) { - ShowConfigWarning(entry, "Storage \"%s\" has \"max\" %d, max is MAX_STORAGE (%d)!\n", name, max_num, MAX_STORAGE); - max_num = MAX_STORAGE; - } - - memset(&table, 0, sizeof(struct s_storage_table)); - - RECREATE(interserv_config.storages, struct s_storage_table, interserv_config.storage_count+1); - interserv_config.storages[interserv_config.storage_count].id = id; - safestrncpy(interserv_config.storages[interserv_config.storage_count].name, name, NAME_LENGTH); - safestrncpy(interserv_config.storages[interserv_config.storage_count].table, tablename, DB_NAME_LEN); - interserv_config.storages[interserv_config.storage_count].max_num = max_num; - interserv_config.storage_count++; + try { + config = YAML::LoadFile(current_file); + } + catch (std::exception &e) { + ShowError("Cannot read storage definition file '" CL_WHITE "%s" CL_RESET "' (Caused by : " CL_WHITE "%s" CL_RESET ").\n", current_file.c_str(), e.what()); + return; } - } - ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' storage informations in '"CL_WHITE"%s"CL_RESET"'\n", interserv_config.storage_count, interserv_config.cfgFile); + if (config["Storages"]) { + for (auto node : config["Storages"]) { + unsigned int id; + + if (!node["ID"]) { + yaml_invalid_warning("inter_config_readConf: Storage definition with no ID field in '" CL_WHITE "%s" CL_RESET "', skipping.\n", node, current_file); + continue; + } + + try { + id = node["ID"].as<unsigned int>(); + } + catch (std::exception) { + yaml_invalid_warning("inter_config_readConf: Storage definition with invalid ID field in '" CL_WHITE "%s" CL_RESET "', skipping.\n", node, current_file); + continue; + } + + if( id > UINT8_MAX ){ + yaml_invalid_warning("inter_config_readConf: Storage definition with invalid ID field in '" CL_WHITE "%s" CL_RESET "', skipping.\n", node, current_file); + continue; + } + + bool existing = inter_premiumStorage_exists(id); + auto storage_table = existing ? interserv_config.storages[id] : std::make_shared<s_storage_table>(); + + if (!existing && (!node["Name"] || !node["Table"])) { + yaml_invalid_warning("inter_config_readConf: Invalid storage definition in '" CL_WHITE "%s" CL_RESET "'.\n", node, current_file); + continue; + } + + if (node["Name"]) + safestrncpy(storage_table->name, node["Name"].as<std::string>().c_str(), NAME_LENGTH); + if(node["Table"]) + safestrncpy(storage_table->table, node["Table"].as<std::string>().c_str(), DB_NAME_LEN); + if (node["Max"]) { + try { + storage_table->max_num = node["Max"].as<uint16>(); + } + catch (std::exception) { + yaml_invalid_warning("inter_config_readConf: Storage definition with invalid Max field in '" CL_WHITE "%s" CL_RESET "', skipping.\n", node, current_file); + continue; + } + } + else if (!existing) + storage_table->max_num = MAX_STORAGE; + + if (!existing) { + storage_table->id = (uint8)id; + interserv_config.storages[id] = storage_table; + } + + count++; + } + } + ShowStatus("Done reading '" CL_WHITE "%d" CL_RESET "' storage information in '" CL_WHITE "%s" CL_RESET "'\n", count, current_file.c_str()); + } } void inter_config_finalConf(void) { - if (interserv_config.storages) - aFree(interserv_config.storages); - interserv_config.storages = NULL; - interserv_config.storage_count = 0; - - config_destroy(&interserv_config.cfg); } static void inter_config_defaults(void) { - interserv_config.storage_count = 0; - interserv_config.storages = NULL; - - safestrncpy(interserv_config.cfgFile, "conf/inter_server.conf", sizeof(interserv_config.cfgFile)); + interserv_config.cfgFile = "inter_server.yml"; } // initialize int inter_init_sql(const char *file) { - //int i; - - inter_config_defaults(); inter_config_read(file); @@ -977,15 +999,15 @@ void inter_final(void) * @param fd **/ void inter_Storage_sendInfo(int fd) { - int size = sizeof(struct s_storage_table), len = 4 + interserv_config.storage_count * size, i = 0; + int size = sizeof(struct s_storage_table), len = 4 + interserv_config.storages.size() * size, offset; // Send storage table information WFIFOHEAD(fd, len); WFIFOW(fd, 0) = 0x388c; WFIFOW(fd, 2) = len; - for (i = 0; i < interserv_config.storage_count; i++) { - if (!&interserv_config.storages[i] || !interserv_config.storages[i].name) - continue; - memcpy(WFIFOP(fd, 4 + size*i), &interserv_config.storages[i], size); + offset = 4; + for (auto storage : interserv_config.storages) { + memcpy(WFIFOP(fd, offset), storage.second.get(), size); + offset += size; } WFIFOSET(fd, len); } diff --git a/src/char/inter.h b/src/char/inter.h index e437cd710e..9469c814c1 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -4,20 +4,22 @@ #ifndef _INTER_SQL_H_ #define _INTER_SQL_H_ -#ifdef __cplusplus -extern "C" { -#endif - +#include "../common/cbasetypes.h" #include "../common/conf.h" #include "../common/mmo.h" #include "../common/sql.h" +#ifdef __cplusplus // C codes can't see this +#include <memory> +#include <unordered_map> + +extern "C" { + struct Inter_Config { - char cfgFile[128]; ///< Inter-Config file - config_t cfg; ///< Config - struct s_storage_table *storages; ///< Storage name & table information - uint8 storage_count; ///< Number of available storage + std::string cfgFile; ///< Inter-Config file + std::unordered_map< uint8, std::shared_ptr<s_storage_table> > storages; ///< Storage name & table information }; +#endif extern struct Inter_Config interserv_config; diff --git a/src/common/Makefile.in b/src/common/Makefile.in index c3f07ceeb4..3416f614b3 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -29,8 +29,6 @@ else endif ALL_DEPENDS=server -CXXFLAG =-std=c++11 - @SET_MAKE@ ##################################################################### @@ -73,7 +71,7 @@ obj/%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) obj/%.o: %.cpp $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CXX $<" - @@CXX@ $(CXXFLAG) @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CXX@ @CXXFLAGS@ @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< obj/mini%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CC $<" @@ -81,7 +79,7 @@ obj/mini%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) obj/mini%.o: %.cpp $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H) @echo " CXX $<" - @@CXX@ $(CXXFLAG) @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @@CXX@ @CXXFLAGS@ @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $< # missing object files $(MT19937AR_OBJ): diff --git a/src/common/malloc.h b/src/common/malloc.h index 1f273c9335..1660b870cd 100644 --- a/src/common/malloc.h +++ b/src/common/malloc.h @@ -4,10 +4,11 @@ #ifndef _MALLOC_H_ #define _MALLOC_H_ +#include "cbasetypes.h" + #ifdef __cplusplus extern "C" { #endif -#include "cbasetypes.h" #define ALC_MARK __FILE__, __LINE__, __func__ diff --git a/src/common/sql.h b/src/common/sql.h index e86b0b3b2d..8b03e1bf34 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -4,14 +4,12 @@ #ifndef _COMMON_SQL_H_ #define _COMMON_SQL_H_ -#ifdef __cplusplus -extern "C" { -#endif - #include "cbasetypes.h" #include <stdarg.h>// va_list - +#ifdef __cplusplus +extern "C" { +#endif // Return codes #define SQL_ERROR -1 diff --git a/src/common/strlib.h b/src/common/strlib.h index 441d51993e..930f65526d 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -4,10 +4,6 @@ #ifndef _STRLIB_H_ #define _STRLIB_H_ -#ifdef __cplusplus -extern "C" { -#endif - #include "cbasetypes.h" #include <stdarg.h> @@ -21,6 +17,10 @@ extern "C" { #undef __USED_GNU #endif +#ifdef __cplusplus +extern "C" { +#endif + char* jstrescape (char* pt); char* jstrescapecpy (char* pt, const char* spt); int jmemescapecpy (char* pt, const char* spt, int size); diff --git a/src/login/Makefile.in b/src/login/Makefile.in index f6d3ba67a7..7c13d48ef6 100644 --- a/src/login/Makefile.in +++ b/src/login/Makefile.in @@ -23,8 +23,6 @@ else endif ALL_DEPENDS=server -CXXFLAGS=-std=c++11 - @SET_MAKE@ ##################################################################### diff --git a/src/map/Makefile.in b/src/map/Makefile.in index 41079d0980..35d5f368df 100644 --- a/src/map/Makefile.in +++ b/src/map/Makefile.in @@ -37,8 +37,6 @@ else PCRE_CFLAGS= endif -CXXFLAGS=-std=c++11 - @SET_MAKE@ ##################################################################### diff --git a/src/map/intif.c b/src/map/intif.c index f0720eec14..408da1c51f 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -3509,11 +3509,6 @@ void intif_parse_StorageInfo_recv(int fd) { storage_db = NULL; for (i = 0; i < count; i++) { - char name[NAME_LENGTH + 1]; - - safestrncpy(name, RFIFOCP(fd, 5 + size * i), NAME_LENGTH); - if (name[0] == '\0') - continue; RECREATE(storage_db, struct s_storage_table, storage_count+1); memcpy(&storage_db[storage_count], RFIFOP(fd, 4 + size * i), size); storage_count++; diff --git a/src/map/map-server.vcxproj b/src/map/map-server.vcxproj index 139b5dc7e6..bbc87e1c7a 100644 --- a/src/map/map-server.vcxproj +++ b/src/map/map-server.vcxproj @@ -270,7 +270,7 @@ <Copy SourceFiles="$(SolutionDir)conf\import-tmpl\battle_conf.txt" DestinationFolder="$(SolutionDir)conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\import\battle_conf.txt')" /> <Copy SourceFiles="$(SolutionDir)conf\import-tmpl\char_conf.txt" DestinationFolder="$(SolutionDir)conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\import\char_conf.txt')" /> <Copy SourceFiles="$(SolutionDir)conf\import-tmpl\inter_conf.txt" DestinationFolder="$(SolutionDir)conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\import\inter_conf.txt')" /> - <Copy SourceFiles="$(SolutionDir)conf\import-tmpl\inter_server.conf" DestinationFolder="$(SolutionDir)conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\import\inter_server.conf')" /> + <Copy SourceFiles="$(SolutionDir)conf\import-tmpl\inter_server.yml" DestinationFolder="$(SolutionDir)conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\import\inter_server.yml')" /> <Copy SourceFiles="$(SolutionDir)conf\import-tmpl\log_conf.txt" DestinationFolder="$(SolutionDir)conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\import\log_conf.txt')" /> <Copy SourceFiles="$(SolutionDir)conf\import-tmpl\login_conf.txt" DestinationFolder="$(SolutionDir)conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\import\login_conf.txt')" /> <Copy SourceFiles="$(SolutionDir)conf\import-tmpl\map_conf.txt" DestinationFolder="$(SolutionDir)conf\import\" ContinueOnError="true" Condition="!Exists('$(SolutionDir)conf\import\map_conf.txt')" /> diff --git a/src/map/storage.c b/src/map/storage.c index 5895ce7854..8f6a8174c8 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -290,6 +290,9 @@ static int storage_additem(struct map_session_data* sd, struct s_storage *stor, } } + if( stor->amount >= stor->max_amount ) + return 2; + // find free slot ARR_FIND( 0, stor->max_amount, i, stor->u.items_storage[i].nameid == 0 ); if( i >= stor->max_amount ) @@ -325,7 +328,7 @@ int storage_delitem(struct map_session_data* sd, struct s_storage *stor, int ind memset(&stor->u.items_storage[index],0,sizeof(stor->u.items_storage[0])); stor->amount--; if( sd->state.storage_flag == 1 || sd->state.storage_flag == 3 ) - clif_updatestorageamount(sd, stor->amount, sd->storage.max_amount); + clif_updatestorageamount(sd, stor->amount, stor->max_amount); } if( sd->state.storage_flag == 1 || sd->state.storage_flag == 3 ) From 693e958525243c894f55a1478d73ae84b77115d5 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 14 Aug 2017 03:06:58 +0200 Subject: [PATCH 102/124] Fixed wrong crimson staff being dropped Thanks to @Everade --- db/re/mob_drop.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db/re/mob_drop.txt b/db/re/mob_drop.txt index cd45806656..3f866df901 100644 --- a/db/re/mob_drop.txt +++ b/db/re/mob_drop.txt @@ -46,11 +46,11 @@ 2700,28705,250,RDMOPTG_Crimson_Weapon // C2_PORCELLIO 2745,13127,250,RDMOPTG_None // C2_MOLE 2746,1939,250,RDMOPTG_Crimson_Weapon // C3_MIYABI_NINGYO -1102,2009,50,RDMOPTG_None // BATHORY +1102,1680,50,RDMOPTG_None // BATHORY 1155,16040,50,RDMOPTG_Crimson_Weapon // PETIT 2714,16040,250,RDMOPTG_Crimson_Weapon // C1_PETIT 2715,16040,250,RDMOPTG_Crimson_Weapon // C2_PETIT -2885,2009,250,RDMOPTG_None // C4_BATHORY +2885,1680,250,RDMOPTG_None // C4_BATHORY 2199,28705,50,RDMOPTG_Crimson_Weapon // SIORAVA 1143,16040,50,RDMOPTG_Crimson_Weapon // MARIONETTE 1413,1995,50,RDMOPTG_Crimson_Weapon // WILD_GINSENG @@ -106,9 +106,9 @@ 1653,28705,50,RDMOPTG_Crimson_Weapon // WHIKEBAIN 1655,1839,50,RDMOPTG_Crimson_Weapon // EREND 1655,16040,50,RDMOPTG_Crimson_Weapon // EREND -1657,2009,50,RDMOPTG_None // RAWREL +1657,1680,50,RDMOPTG_None // RAWREL 1829,21015,50,RDMOPTG_Crimson_Weapon // SWORD_GUARDIAN -2692,2009,250,RDMOPTG_None // C3_RAWREL +2692,1680,250,RDMOPTG_None // C3_RAWREL 1654,13454,50,RDMOPTG_Crimson_Weapon // ARMAIA 1654,28106,50,RDMOPTG_Crimson_Weapon // ARMAIA 1656,1939,50,RDMOPTG_Crimson_Weapon // KAVAC From d673d2597874fc55627de509002820c165d4d8dd Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 14 Aug 2017 04:22:55 +0200 Subject: [PATCH 103/124] Fixed another error from mobdb reloading Thanks to @Everade --- src/map/mob.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/map/mob.c b/src/map/mob.c index f1fc875302..3091deaf58 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -5251,6 +5251,9 @@ void mob_db_load(void){ * @return 0 */ static int mob_reload_sub( struct mob_data *md, va_list args ){ + // Relink the mob to the new database entry + md->db = mob_db(md->mob_id); + if( md->bl.prev == NULL ){ return 0; } @@ -5268,6 +5271,30 @@ static int mob_reload_sub( struct mob_data *md, va_list args ){ return 0; } +/** + * Apply the proper view data on NPCs during mob_db reload. + * @param md: NPC to adjust + * @param args: va_list of arguments + * @return 0 + */ +static int mob_reload_sub_npc( struct npc_data *nd, va_list args ){ + if( nd->bl.prev == NULL ){ + return 0; + } + + // If the view data points to a mob + if( mobdb_checkid(nd->class_) ){ + // Get the new view data from the mob database + nd->vd = mob_get_viewdata(nd->class_); + + // Respawn all NPCs on client side so that they are displayed correctly(if their view id changed) + clif_clearunit_area(&nd->bl, CLR_OUTSIGHT); + clif_spawn(&nd->bl); + } + + return 0; +} + /** * Reload monster data */ @@ -5275,6 +5302,7 @@ void mob_reload(void) { do_final_mob(); mob_db_load(); map_foreachmob(mob_reload_sub); + map_foreachnpc(mob_reload_sub_npc); } /** From f4de91b407387c7aa4cbea6296c1ec941389f519 Mon Sep 17 00:00:00 2001 From: keitenai <keitenai@users.noreply.github.com> Date: Mon, 14 Aug 2017 23:25:29 +0800 Subject: [PATCH 104/124] Fixed incorrect use of 'close' command --- npc/quests/quests_moscovia.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npc/quests/quests_moscovia.txt b/npc/quests/quests_moscovia.txt index 0699bf26b6..1b3f7a86ec 100644 --- a/npc/quests/quests_moscovia.txt +++ b/npc/quests/quests_moscovia.txt @@ -9075,7 +9075,7 @@ OnTouch_: } } emotion e_what,1; - close; + end; } mosk_que,45,131,0 script Stone Furnace#rus28 HIDDEN_NPC,{ @@ -9124,7 +9124,7 @@ mosk_que,45,131,0 script Stone Furnace#rus28 HIDDEN_NPC,{ } } emotion e_what,1; - close; + end; OnMyMobDead: stopnpctimer; @@ -9173,7 +9173,7 @@ mosk_que,56,202,0 script Occult Apple Tree#rus29 HIDDEN_NPC,{ } } emotion e_what,1; - close; + end; } mosk_que,47,217,0 warp Escape#rus30 3,3,mosk_fild02,237,266 From 7554b53d68dd19a934f643c400a3700aed4b33f5 Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Mon, 14 Aug 2017 13:51:18 -0400 Subject: [PATCH 105/124] Adjusted script command gettimestr (#2329) * Fixes #2328. * Added an optional parameter to pass in a Unix tick value to convert to a readable format. Thanks to @hendra814 and @Lemongrass3110! --- doc/script_commands.txt | 10 +++++++--- src/map/script.c | 28 +++++++++++++++++++--------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 9d5df1faca..d89bb0a889 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3019,10 +3019,10 @@ It will only return numbers. If another type is supplied -1 will be returned. --------------------------------------- -*gettimestr(<format string>,<max length>) +*gettimestr(<"time format">,<max length>{,<time_tick>}) This function will return a string containing time data as specified by the -format string. +time format. This uses the C function 'strfmtime', which obeys special format characters. For a full description see, for example, the description of 'strfmtime' at @@ -3034,7 +3034,11 @@ The example given in rAthena sample scripts works like this: mes gettimestr("%Y-%m/%d %H:%M:%S",21); -This will print a full date and time like 'YYYY-MM/DD HH:MM:SS'. +The example above will print the current date and time like 'YYYY-MM/DD HH:MM:SS'. +The following example will print the date and time when the player's VIP status +expires by the given <time_tick>: + + mes gettimestr("%Y-%m/%d %H:%M:%S",21,vip_status(VIP_STATUS_EXPIRE)); --------------------------------------- diff --git a/src/map/script.c b/src/map/script.c index 31013b6797..2d2146c123 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9945,22 +9945,32 @@ BUILDIN_FUNC(gettime) return SCRIPT_CMD_SUCCESS; } -/*========================================== - * GetTimeStr("TimeFMT", Length); - *------------------------------------------*/ +/** + * Returns the current server time or the provided time in a readable format. + * gettimestr(<"time_format">,<max_length>{,<time_tick>}); + */ BUILDIN_FUNC(gettimestr) { char *tmpstr; const char *fmtstr; int maxlen; - time_t now = time(NULL); + time_t now; - fmtstr=script_getstr(st,2); - maxlen=script_getnum(st,3); + fmtstr = script_getstr(st,2); + maxlen = script_getnum(st,3); - tmpstr=(char *)aMalloc((maxlen+1)*sizeof(char)); + if (script_hasdata(st, 4)) { + if (script_getnum(st, 4) < 0) { + ShowWarning("buildin_gettimestr: a positive value must be supplied to be valid.\n"); + return SCRIPT_CMD_FAILURE; + } else + now = (time_t)script_getnum(st, 4); + } else + now = time(NULL); + + tmpstr = (char *)aMalloc((maxlen+1)*sizeof(char)); strftime(tmpstr,maxlen,fmtstr,localtime(&now)); - tmpstr[maxlen]='\0'; + tmpstr[maxlen] = '\0'; script_pushstr(st,tmpstr); return SCRIPT_CMD_SUCCESS; @@ -23692,7 +23702,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(savepoint,"sii???"), BUILDIN_DEF(gettimetick,"i"), BUILDIN_DEF(gettime,"i"), - BUILDIN_DEF(gettimestr,"si"), + BUILDIN_DEF(gettimestr,"si?"), BUILDIN_DEF(openstorage,""), BUILDIN_DEF(guildopenstorage,""), BUILDIN_DEF(itemskill,"vi?"), From 641a1f1e886035ce44c33a8db615680481fe9b28 Mon Sep 17 00:00:00 2001 From: Atemo <capucrath@gmail.com> Date: Mon, 14 Aug 2017 19:57:24 +0200 Subject: [PATCH 106/124] Updated item_db.txt (16.1 episode) --- db/re/item_db.txt | 28 +++++++++++++++++++++++++--- db/re/item_trade.txt | 2 +- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 9c6e0e99a6..807efe961c 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -3118,6 +3118,12 @@ 4948,Skill_Delay1,After Skill Delay Lv1,6,10,,,,,,,,,,,,,,,{ bonus bDelayrate,-2; },{},{} 4949,Skill_Delay2,After Skill Delay Lv2,6,10,,,,,,,,,,,,,,,{ bonus bDelayrate,-4; },{},{} 4950,Skill_Delay3,After Skill Delay Lv3,6,10,,,,,,,,,,,,,,,{ bonus bDelayrate,-6; },{},{} +4994,Rune_of_Strength_Lv_1,Rune of Strength Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bStr,5; } if (.@r>=10) { bonus bAtkRate,5; } },{},{} +4995,Rune_of_Strength_Lv_2,Rune of Strength Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bStr,6; } if (.@r>=11) { bonus bStr,1; bonus bAtkRate,7; } },{},{} +4996,Rune_of_Strength_Lv_3,Rune of Strength_Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bStr,7; } if (.@r>=12) { bonus bStr,1; bonus bAtkRate,8; } if (.@r>=13) { bonus bStr,1; bonus bAtkRate,2; } },{},{} +4997,Rune_of_Agility_Lv_1,Rune of Agility Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bAgi,5; } if (.@r>=10) { bonus bFlee2,5; } },{},{} +4998,Rune_of_Agility_Lv_2,Rune of Agility Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bAgi,6; } if (.@r>=11) { bonus bAgi,1; bonus bFlee2,7; } },{},{} +4999,Rune_of_Agility_Lv_3,Rune of Agility Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bAgi,7; } if (.@r>=12) { bonus bAgi,1; bonus bFlee2,5; } if (.@r>=13) { bonus bAgi,1; bonus bFlee2,5; } },{},{} //=================================================================== // More Headgears //=================================================================== @@ -4839,7 +4845,8 @@ 6915,Captured_Soul,Captured Soul,3,10,,0,,,,,,,,,,,,,{},{},{} 6916,Piece_Of_Soul_Monkey,Piece Of Soul Monkey,3,10,,0,,,,,,,,,,,,,{},{},{} 6917,Piece_Of_Soul_Chicken,Piece Of Soul Chicken,3,10,,0,,,,,,,,,,,,,{},{},{} -6919,Honor_Proof,Honor Proof,3,10,,10,,,,,,,,,,,,,{},{},{} +6919,Honor_Proof,Honor Token,3,10,,10,,,,,,,,,,,,,{},{},{} +6920,Rune_Magic_Powder,Rune Magic Powder,3,10,,10,,,,,,,,,,,,,{},{},{} 6921,Dehumidifiers,Dehumidifiers,3,10,,10,,,,,,,,,,,,,{},{},{} 6922,Sandpaper,Sandpaper,3,10,,10,,,,,,,,,,,,,{},{},{} 6923,Bright_Fire_Lights,Bright Fire Lights,3,10,,10,,,,,,,,,,,,,{},{},{} @@ -11057,9 +11064,9 @@ 22844,Sealed_Dracula_Card_Album,Sealed Dracula Card Album,2,10,,10,,,,,,,,,,,,,{/*No Info*/},{},{} 22845,Sealed_Fortune_Egg,Sealed Fortune Egg,2,10,,10,,,,0,0xFFFFFFFF,63,2,,,1,,,{ getitem callfunc("F_Rand",4488,4497,4486,4480,4485,4539,4487,4494,4538,4489,4490,4482,4503,22846),1; },{},{} 22846,Sealed_Dracula_Card_,Sealed Dracula Card,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ bonus_script "{ bonus2 bSPDrainRate,50,5; }",300; },{},{} -22847,Prontera_Medal,Prontera Medal,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prontera",0,0; /*No coord info*/ },{},{} +22847,Prontera_Medal,Prontera Medal,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prontera",159,192; /*No coord info*/ },{},{} 22848,Prison_Key,Prison Key,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prt_prison",0,0; /*No coord info*/ },{},{} -22849,Prontera_Time_Crystal,Prontera Time Crystal,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prt_lib_q",0,0; /*No map+coord info*/ },{},{} +22849,Prontera_Time_Crystal,Prontera Time Crystal,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prt_q",155,27; },{},{} 22850,January_Gift_Box_,January Gift Box,2,10,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ rentitem 19052,604800; },{},{} 22851,February_Gift_Box_,February Gift Box,2,10,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 12105,2; },{},{} 22852,March_Gift_Box_,March Gift Box,2,10,,100,,,,,0xFFFFFFFF,63,2,,,,,,{/*2 Lucky Eggs*/},{},{} @@ -11464,6 +11471,9 @@ 28332,Jewerly_Ring,Jewerly Ring,4,10,,100,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bLuk,20; autobonus "{ bonus bAspd,2; }",50,2000,BF_WEAPON|BF_MAGIC; },{},{} 28333,Gold_PC_Room_Ring,Gold PC Room Ring,4,10,,0,,,,1,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bMaxHPrate,3; bonus bMaxSPrate,3; },{},{} 28342,Critical_Anklet,Critical Anklet,4,0,,200,,3,,1,0xFFFFFFFF,63,2,136,,,0,,{ bonus bCritical,5; },{},{} +28354,City_Map,City Map,4,0,,100,,0,,1,0xFFFFFFFF,63,2,136,,1,0,0,{ /* todo */ },{},{} +28355,Shining_Holy_Water,Shining Holy Water,4,0,,100,,0,,1,0xFFFFFFFF,63,2,136,,1,0,0,{ /* todo */ },{},{} +28356,Prontera_Badge,Prontera Badge,4,0,,100,,0,,0,0xFFFFFFFF,63,2,136,,1,0,0,{ /*warp "prontera",159,192; 15 mins cooldown */ },{},{} 28358,Cursed_Lucky_Clover,Cursed Lucky Clover,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,0,100,0,,{ bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5; },{},{ sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/ } 28372,Imperial_Ring,Imperial Ring,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,0,50,0,,{ bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3; },{},{} 28374,Foxtail_Ring,Foxtail Ring,4,20,,100,,0,,0,0x80000000,7,2,136,,1,0,,{ bonus2 bExpAddRace,RC_All,5; .@lvl = min(BaseLevel/5,10); bonus bAtk,2*.@lvl; bonus bMatk,2*.@lvl; bonus bMaxHP,10*.@lvl; bonus bMaxSP,5*.@lvl; },{},{} @@ -11559,6 +11569,18 @@ //=================================================================== // Enchantment stones //=================================================================== +29000,Rune_of_Intellect_Lv_1,Rune of Intellect Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bInt,5; } if (.@r>=10) { bonus bMatkRate,5; } },{},{} +29001,Rune_of_Intellect_Lv_2,Rune of Intellect Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bInt,6; } if (.@r>=11) { bonus bInt,1; bonus bMatkRate,7; } },{},{} +29002,Rune_of_Intellect_Lv_3,Rune of Intellect Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bInt,7; } if (.@r>=12) { bonus bInt,1; bonus bMatkRate,8; } if (.@r>=13) { bonus bInt,1; bonus bMatkRate,2; } },{},{} +29003,Rune_of_Dexterity_Lv_1,Rune of Dexterity Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bDex,5; } if (.@r>=10) { bonus bLongAtkRate,5; } },{},{} +29004,Rune_of_Dexterity_Lv_2,Rune of Dexterity Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bDex,6; } if (.@r>=11) { bonus bDex,1; bonus bLongAtkRate,7; } },{},{} +29005,Rune_of_Dexterity_Lv_3,Rune of Dexterity Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bDex,7; } if (.@r>=12) { bonus bDex,1; bonus bLongAtkRate,8; } if (.@r>=13) { bonus bDex,1; bonus bLongAtkRate,2; } },{},{} +29006,Rune_of_Luck_Lv_1,Rune of Luck Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bLuk,5; } if (.@r>=10) { bonus bCritAtkRate,5; } },{},{} +29007,Rune_of_Luck_Lv_2,Rune of Luck Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bLuk,6; } if (.@r>=11) { bonus bLuk,1; bonus bCritAtkRate,7; } },{},{} +29008,Rune_of_Luck_Lv_3,Rune of Luck Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bLuk,7; } if (.@r>=12) { bonus bLuk,1; bonus bCritAtkRate,8; } if (.@r>=13) { bonus bLuk,1; bonus bCritAtkRate,6; } },{},{} +29009,Rune_of_Vitality_Lv_1,Rune of Vitality Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bVit,5; } if (.@r>=10) { bonus bMaxHPrate,5; } },{},{} +29010,Rune_of_Vitality_Lv_2,Rune of Vitality Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bVit,6; } if (.@r>=11) { bonus bVit,1; bonus bMaxHPrate,7; } },{},{} +29011,Rune_of_Vitality_Lv_3,Rune of Vitality Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bVit,7; } if (.@r>=12) { bonus bVit,1; bonus bMaxHPrate,8; } if (.@r>=13) { bonus bVit,1; bonus bMaxHPrate,2; } },{},{} 29061,Ambition1Lv,Ambition1Lv,6,10,,0,,,,,,,,,,,,,{ bonus2 bAddClass,Class_All,3; bonus bHit,3; },{},{} 29062,Ambition2Lv,Ambition2Lv,6,10,,0,,,,,,,,,,,,,{ bonus2 bAddClass,Class_All,6; bonus bHit,6; },{},{} 29063,Ambition3Lv,Ambition3Lv,6,10,,0,,,,,,,,,,,,,{ bonus2 bAddClass,Class_All,9; bonus bHit,9; },{},{} diff --git a/db/re/item_trade.txt b/db/re/item_trade.txt index bb44666654..e3547420cd 100644 --- a/db/re/item_trade.txt +++ b/db/re/item_trade.txt @@ -914,7 +914,7 @@ 6916,499,100 // Piece_Of_Soul_Monkey 6917,499,100 // Piece_Of_Soul_Chicken 6919,499,100 // Honor_Proof -//6920,467,100 // +6920,499,100 // Rune_Magic_Powder 6923,499,100 // Bright_Fire_Lights 6925,499,100 // Letter_Of_Prisoner 6926,499,100 // Rune-Midgard_History_Book From b04f79ed862e5275e914f513804fc9bc18f71fc9 Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Mon, 14 Aug 2017 19:57:44 +0200 Subject: [PATCH 107/124] SQL synchronization --- sql-files/item_db_re.sql | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 0b8f91ad47..d7da4a3f0c 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -3150,6 +3150,12 @@ REPLACE INTO `item_db_re` VALUES (4947,'Thrift3','Economy Lv3',6,10,NULL,0,NULL, REPLACE INTO `item_db_re` VALUES (4948,'Skill_Delay1','After Skill Delay Lv1',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus bDelayrate,-2;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (4949,'Skill_Delay2','After Skill Delay Lv2',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus bDelayrate,-4;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (4950,'Skill_Delay3','After Skill Delay Lv3',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus bDelayrate,-6;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (4994,'Rune_of_Strength_Lv_1','Rune of Strength Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bStr,5; } if (.@r>=10) { bonus bAtkRate,5; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (4995,'Rune_of_Strength_Lv_2','Rune of Strength Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bStr,6; } if (.@r>=11) { bonus bStr,1; bonus bAtkRate,7; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (4996,'Rune_of_Strength_Lv_3','Rune of Strength_Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bStr,7; } if (.@r>=12) { bonus bStr,1; bonus bAtkRate,8; } if (.@r>=13) { bonus bStr,1; bonus bAtkRate,2; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (4997,'Rune_of_Agility_Lv_1','Rune of Agility Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bAgi,5; } if (.@r>=10) { bonus bFlee2,5; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (4998,'Rune_of_Agility_Lv_2','Rune of Agility Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bAgi,6; } if (.@r>=11) { bonus bAgi,1; bonus bFlee2,7; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (4999,'Rune_of_Agility_Lv_3','Rune of Agility Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bAgi,7; } if (.@r>=12) { bonus bAgi,1; bonus bFlee2,5; } if (.@r>=13) { bonus bAgi,1; bonus bFlee2,5; }',NULL,NULL); #=================================================================== # More Headgears #=================================================================== @@ -4871,7 +4877,8 @@ REPLACE INTO `item_db_re` VALUES (6914,'Black_Horn','Black Horn',3,10,NULL,0,NUL REPLACE INTO `item_db_re` VALUES (6915,'Captured_Soul','Captured Soul',3,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (6916,'Piece_Of_Soul_Monkey','Piece Of Soul Monkey',3,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (6917,'Piece_Of_Soul_Chicken','Piece Of Soul Chicken',3,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (6919,'Honor_Proof','Honor Proof',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (6919,'Honor_Proof','Honor Token',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (6920,'Rune_Magic_Powder','Rune Magic Powder',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (6921,'Dehumidifiers','Dehumidifiers',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (6922,'Sandpaper','Sandpaper',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (6923,'Bright_Fire_Lights','Bright Fire Lights',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); @@ -11089,9 +11096,9 @@ REPLACE INTO `item_db_re` VALUES (22843,'Superstar_Snack','Superstar Snack',2,10 REPLACE INTO `item_db_re` VALUES (22844,'Sealed_Dracula_Card_Album','Sealed Dracula Card Album',2,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'/*No Info*/',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22845,'Sealed_Fortune_Egg','Sealed Fortune Egg',2,10,NULL,10,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,'1',NULL,NULL,'getitem callfunc("F_Rand",4488,4497,4486,4480,4485,4539,4487,4494,4538,4489,4490,4482,4503,22846),1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22846,'Sealed_Dracula_Card_','Sealed Dracula Card',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'bonus_script "{ bonus2 bSPDrainRate,50,5; }",300;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (22847,'Prontera_Medal','Prontera Medal',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prontera",0,0; /*No coord info*/',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22847,'Prontera_Medal','Prontera Medal',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prontera",159,192; /*No coord info*/',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22848,'Prison_Key','Prison Key',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prt_prison",0,0; /*No coord info*/',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (22849,'Prontera_Time_Crystal','Prontera Time Crystal',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prt_lib_q",0,0; /*No map+coord info*/',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22849,'Prontera_Time_Crystal','Prontera Time Crystal',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prt_q",155,27;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22850,'January_Gift_Box_','January Gift Box',2,10,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'rentitem 19052,604800;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22851,'February_Gift_Box_','February Gift Box',2,10,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getitem 12105,2;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22852,'March_Gift_Box_','March Gift Box',2,10,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'/*2 Lucky Eggs*/',NULL,NULL); @@ -11496,6 +11503,9 @@ REPLACE INTO `item_db_re` VALUES (28327,'Broken_Chips_02','Broken Chips 02',4,10 REPLACE INTO `item_db_re` VALUES (28332,'Jewerly_Ring','Jewerly Ring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bLuk,20; autobonus "{ bonus bAspd,2; }",50,2000,BF_WEAPON|BF_MAGIC;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28333,'Gold_PC_Room_Ring','Gold PC Room Ring',4,10,NULL,0,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bMaxHPrate,3; bonus bMaxSPrate,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28342,'Critical_Anklet','Critical Anklet',4,0,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,NULL,0,NULL,'bonus bCritical,5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28354,'City_Map','City Map',4,0,NULL,100,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,0,'/* todo */',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28355,'Shining_Holy_Water','Shining Holy Water',4,0,NULL,100,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,0,'/* todo */',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28356,'Prontera_Badge','Prontera Badge',4,0,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,0,'/*warp "prontera",159,192; 15 mins cooldown */',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28358,'Cursed_Lucky_Clover','Cursed Lucky Clover',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,0,'100',0,NULL,'bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5;',NULL,'sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/'); REPLACE INTO `item_db_re` VALUES (28372,'Imperial_Ring','Imperial Ring',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,0,'50',0,NULL,'bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28374,'Foxtail_Ring','Foxtail Ring',4,20,NULL,100,NULL,0,NULL,0,0x80000000,7,2,136,NULL,'1',0,NULL,'bonus2 bExpAddRace,RC_All,5; .@lvl = min(BaseLevel/5,10); bonus bAtk,2*.@lvl; bonus bMatk,2*.@lvl; bonus bMaxHP,10*.@lvl; bonus bMaxSP,5*.@lvl;',NULL,NULL); @@ -11591,6 +11601,18 @@ REPLACE INTO `item_db_re` VALUES (28920,'Diamond_Shield','Diamond Shield',4,20,N #=================================================================== # Enchantment stones #=================================================================== +REPLACE INTO `item_db_re` VALUES (29000,'Rune_of_Intellect_Lv_1','Rune of Intellect Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bInt,5; } if (.@r>=10) { bonus bMatkRate,5; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29001,'Rune_of_Intellect_Lv_2','Rune of Intellect Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bInt,6; } if (.@r>=11) { bonus bInt,1; bonus bMatkRate,7; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29002,'Rune_of_Intellect_Lv_3','Rune of Intellect Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bInt,7; } if (.@r>=12) { bonus bInt,1; bonus bMatkRate,8; } if (.@r>=13) { bonus bInt,1; bonus bMatkRate,2; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29003,'Rune_of_Dexterity_Lv_1','Rune of Dexterity Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bDex,5; } if (.@r>=10) { bonus bLongAtkRate,5; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29004,'Rune_of_Dexterity_Lv_2','Rune of Dexterity Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bDex,6; } if (.@r>=11) { bonus bDex,1; bonus bLongAtkRate,7; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29005,'Rune_of_Dexterity_Lv_3','Rune of Dexterity Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bDex,7; } if (.@r>=12) { bonus bDex,1; bonus bLongAtkRate,8; } if (.@r>=13) { bonus bDex,1; bonus bLongAtkRate,2; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29006,'Rune_of_Luck_Lv_1','Rune of Luck Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bLuk,5; } if (.@r>=10) { bonus bCritAtkRate,5; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29007,'Rune_of_Luck_Lv_2','Rune of Luck Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bLuk,6; } if (.@r>=11) { bonus bLuk,1; bonus bCritAtkRate,7; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29008,'Rune_of_Luck_Lv_3','Rune of Luck Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bLuk,7; } if (.@r>=12) { bonus bLuk,1; bonus bCritAtkRate,8; } if (.@r>=13) { bonus bLuk,1; bonus bCritAtkRate,6; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29009,'Rune_of_Vitality_Lv_1','Rune of Vitality Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bVit,5; } if (.@r>=10) { bonus bMaxHPrate,5; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29010,'Rune_of_Vitality_Lv_2','Rune of Vitality Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bVit,6; } if (.@r>=11) { bonus bVit,1; bonus bMaxHPrate,7; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (29011,'Rune_of_Vitality_Lv_3','Rune of Vitality Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bVit,7; } if (.@r>=12) { bonus bVit,1; bonus bMaxHPrate,8; } if (.@r>=13) { bonus bVit,1; bonus bMaxHPrate,2; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (29061,'Ambition1Lv','Ambition1Lv',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus2 bAddClass,Class_All,3; bonus bHit,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (29062,'Ambition2Lv','Ambition2Lv',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus2 bAddClass,Class_All,6; bonus bHit,6;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (29063,'Ambition3Lv','Ambition3Lv',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus2 bAddClass,Class_All,9; bonus bHit,9;',NULL,NULL); From bfb92940d5231eb471724de7bcb9301b27640a16 Mon Sep 17 00:00:00 2001 From: Jittapan Pluemsumran <nightsheep@outlook.com> Date: Tue, 15 Aug 2017 11:17:16 +0700 Subject: [PATCH 108/124] Fixed std::string reference being an incomplete type in inter.h Fixes #2339 --- src/char/inter.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/char/inter.h b/src/char/inter.h index 9469c814c1..613ecbd64f 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -11,6 +11,7 @@ #ifdef __cplusplus // C codes can't see this #include <memory> +#include <string> #include <unordered_map> extern "C" { From 11d33007d92baac6841c8707497647e9be0d89a2 Mon Sep 17 00:00:00 2001 From: Atemo <Atemo@users.noreply.github.com> Date: Tue, 15 Aug 2017 20:11:50 +0200 Subject: [PATCH 109/124] Initial release of Ghost Palace Memorial (#2331) * Initial release of Ghost Palace Memorial (Walkthrough conversion) Thanks @Lemongrass3110, @aleos89 and @Jeybla for their help! Thanks to Divine Pride for the monsters datas ! --- db/re/instance_db.txt | 1 + db/re/mob_db.txt | 26 +- db/re/mob_skill_db.txt | 48 ++ db/re/quest_db.txt | 4 + npc/re/instances/GhostPalace.txt | 991 +++++++++++++++++++++++++++++++ npc/re/scripts_athena.conf | 1 + 6 files changed, 1058 insertions(+), 13 deletions(-) create mode 100644 npc/re/instances/GhostPalace.txt diff --git a/db/re/instance_db.txt b/db/re/instance_db.txt index 9b585d55db..c3bfed1895 100644 --- a/db/re/instance_db.txt +++ b/db/re/instance_db.txt @@ -22,3 +22,4 @@ 15,Geffen Magic Tournament,7200,300,1@gef,119,209,1@gef_in,1@ge_st 16,Horror Toy Factory,3600,300,1@xm_d,111,22 17,Faceworm's Nest,3600,300,1@face,112,374 +18,Ghost Palace,3600,300,1@spa,42,196 diff --git a/db/re/mob_db.txt b/db/re/mob_db.txt index 313d420e10..23509d25a6 100644 --- a/db/re/mob_db.txt +++ b/db/re/mob_db.txt @@ -2102,20 +2102,20 @@ //2945,J_MUMMY //2946,J_ANUBIS //2947,J_EGGYRA -//2948,CURSED_SOLDIER -//2949,CURSED_SENTINEL -//2950,BROKEN_MIND -//2951,FLOATING_WORD -//2952,LIKE_LOVE -//2953,CURSED_MEMORY -//2954,COLORLESS_VOW -//2955,OLD_FRIENDSHIP -//2956,SWEET_SLAUGHTER -//2957,FORGOTTEN_NAME -//2958,FATAL_DAYS -//2959,TORTUROUS_REDEEMER +2948,CURSED_SOLDIER,Cursed Soldier,Cursed Soldier,110,18574,1,1907,1851,9,1258,1791,85,35,81,50,64,56,178,23,10,12,1,1,69,0x3885,150,1960,576,420,0,0,0,0,0,0,0,6672,1000,957,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2949,CURSED_SENTINEL,Cursed Sentinel,Cursed Sentinel,110,14099,1,1634,1346,2,1347,1906,84,41,120,65,66,41,107,26,10,12,2,7,67,0x3885,175,914,1344,384,0,0,0,0,0,0,0,6672,1000,934,2500,1097,1500,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2950,BROKEN_MIND,Broken Mind,Broken Mind,110,13520,1,1545,1557,1,1259,1799,67,27,69,37,36,10,64,5,10,12,1,6,67,0x2003885,200,920,720,200,0,0,0,0,0,0,0,6672,1000,6086,2500,683,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2951,FLOATING_WORD,Floating Word,Floating Word,110,11276,1,1166,1034,1,1080,1509,93,40,111,90,60,70,139,65,10,12,0,6,68,0x2003885,150,972,648,432,0,0,0,0,0,0,0,6672,1000,938,3000,947,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2952,LIKE_LOVE,Like Love,Like Love,110,14008,1,1505,1667,2,1182,1183,64,51,62,27,25,55,102,20,10,12,1,6,64,0x2003885,150,1056,1056,336,0,0,0,0,0,0,0,6672,1000,929,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2953,CURSED_MEMORY,Cursed Memory,Cursed Memory,110,18045,1,1802,1623,1,1310,1867,89,28,87,39,58,5,82,10,10,12,1,1,69,0x3885,350,1768,500,192,0,0,0,0,0,0,0,6672,1000,957,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2954,COLORLESS_VOW,Colorless Vow,Colorless Vow,110,19194,0,1939,1881,1,1478,2121,95,41,84,35,60,20,85,15,10,12,1,1,69,0x3885,350,0,500,0,0,0,0,0,0,0,0,6672,1000,958,3500,1063,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2955,OLD_FRIENDSHIP,Old Friendship,Old Friendship,110,12614,0,1306,1328,0,1147,1638,78,5,56,12,19,11,30,10,10,12,1,1,49,0x3885,250,2460,912,0,0,0,0,0,0,0,0,6672,1000,932,3500,1098,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2956,SWEET_SLAUGHTER,Sweet Slaughter,Sweet Slaughter,110,13986,0,1960,1587,0,1216,1709,125,10,121,48,40,31,125,32,10,12,2,1,29,0x3885,350,1538,1000,396,0,0,0,0,0,0,0,6672,1000,929,2000,682,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2957,FORGOTTEN_NAME,Forgotten Name,Forgotten Name,120,19546,1,1505,1485,2,1093,1520,111,38,121,29,51,43,100,3,10,12,1,1,49,0x3885,155,1169,1152,480,0,0,0,0,0,0,0,6672,1500,682,5000,683,5000,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2958,FATAL_DAYS,Fatal Days,Fatal Days,120,24240,1,2052,2026,2,1025,1428,72,15,100,71,63,85,115,37,10,12,1,6,67,0x2003885,190,720,384,480,0,0,0,0,0,0,0,6672,1500,1050,2500,1038,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +2959,TORTUROUS_REDEEMER,Torturous Redeemer,Torturous Redeemer,120,103342,0,10590,8378,0,1253,1753,144,28,133,69,72,55,165,44,10,12,1,7,62,0x3885,200,672,420,360,0,0,0,0,0,0,0,6672,10000,6672,10000,923,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //2960,MM_FLAMECROSS -//2961,E_TORTUROUS_REDEEMER +2961,E_TORTUROUS_REDEEMER,Torturous Redeemer,Torturous Redeemer,120,103342,1,10590,8378,1,1253,1753,144,28,133,69,72,55,165,44,10,12,1,7,62,0x3885,200,672,420,360,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 //2962,E_DEVILING //2963,WOODIE //2964,EXP_1000 diff --git a/db/re/mob_skill_db.txt b/db/re/mob_skill_db.txt index 510ad74480..94a9b2fd8a 100644 --- a/db/re/mob_skill_db.txt +++ b/db/re/mob_skill_db.txt @@ -10916,6 +10916,54 @@ 2923,Owl Marquees@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,, 2923,Owl Marquees@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,2922,,,,,, +// Ghost Palace Memorial +2948,Cursed Soldier@NPC_BLINDATTACK,attack,177,5,500,0,5000,no,target,always,0,,,,,,, +2948,Cursed Soldier@AC_DOUBLE,attack,46,5,500,0,5000,no,target,always,0,,,,,,, +2948,Cursed Soldier@NPC_MAGICALATTACK,attack,192,1,500,800,5000,yes,target,always,0,,,,,,, +2948,Cursed Soldier@AC_SHOWER,attack,47,3,500,0,5000,no,target,always,0,,,,,,, +2949,Cursed Sentinel@AS_SONICBLOW,attack,136,7,500,800,5000,yes,target,always,0,,,,,,29, +2949,Cursed Sentinel@NPC_CURSEATTACK,attack,181,5,500,800,5000,yes,target,always,0,,,,,,29, +2950,Broken Mind@NPC_BLINDATTACK,attack,177,3,1500,0,5000,no,target,always,0,,,,,,1, +2950,Broken Mind@NPC_BLINDATTACK,chase,177,3,1500,0,5000,no,target,always,0,,,,,,1, +2950,Broken Mind@NPC_BLOODDRAIN,attack,199,1,500,0,5000,no,target,always,0,,,,,,26, +2950,Broken Mind@NPC_CURSEATTACK,attack,181,3,500,800,5000,yes,target,always,0,,,,,,0, +2950,Broken Mind@NPC_CURSEATTACK,chase,181,3,500,800,5000,yes,target,always,0,,,,,,0, +2950,Broken Mind@CR_REFLECTSHIELD,attack,252,2,500,0,300000,yes,self,always,0,,,,,,7, +2950,Broken Mind@NPC_PETRIFYATTACK,attack,180,3,500,500,5000,yes,target,always,0,,,,,,2, +2950,Broken Mind@NPC_PETRIFYATTACK,chase,180,3,500,500,5000,yes,target,always,0,,,,,,2, +2951,Floating Word@NPC_BLOODDRAIN,attack,199,1,500,0,5000,no,target,always,0,,,,,,2, +2951,Floating Word@NPC_EMOTION,idle,197,1,2000,0,5000,no,self,always,0,29,,,,,, +2951,Floating Word@MG_FIREBALL,chase,17,5,1500,500,5000,yes,target,always,0,,,,,,, +2951,Floating Word@MO_BODYRELOCATION,chase,264,1,2000,500,5000,yes,target,always,0,,,,,,, +2952,Like Love@HT_SHOCKWAVE,idle,118,5,500,0,300000,no,around2,always,0,,,,,,29, +2952,Like Love@MG_LIGHTNINGBOLT,attack,20,5,500,1500,5000,no,target,always,0,,,,,,6, +2952,Like Love@MG_LIGHTNINGBOLT,chase,20,5,500,1500,5000,no,target,always,0,,,,,,6, +2952,Like Love@NPC_EMOTION,idle,197,1,2000,0,5000,no,self,always,0,29,,,,,, +2952,Like Love@NPC_MAGICALATTACK,attack,192,1,500,1000,5000,yes,target,always,0,,,,,,9, +2952,Like Love@NPC_UNDEADATTACK,attack,347,2,2000,0,5000,no,target,always,0,,,,,,, +2952,Like Love@WZ_JUPITEL,attack,84,3,500,1500,5000,no,target,always,0,,,,,,6, +2952,Like Love@WZ_JUPITEL,chase,84,3,500,1500,5000,no,target,always,0,,,,,,6, +2953,Cursed Memory@NPC_POISON,attack,176,3,500,800,5000,yes,target,always,0,,,,,,, +2953,Cursed Memory@NPC_POISONATTACK,attack,188,3,500,800,5000,yes,target,always,0,,,,,,, +2953,Cursed Memory@NPC_UNDEADATTACK,attack,347,2,500,500,5000,yes,target,always,0,,,,,,, +2954,Colorless Vow@NPC_CRITICALSLASH,attack,170,1,500,500,5000,yes,target,always,0,,,,,,, +2954,Colorless Vow@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,no,target,always,0,,,,,,, +2955,Old Friendship@NPC_POISON,attack,176,3,500,800,5000,yes,target,always,0,,,,,,, +2955,Old Friendship@NPC_POISON,angry,176,3,500,800,5000,yes,target,always,0,,,,,,, +2956,Sweet Slaughter@AS_GRIMTOOTH,chase,137,5,2000,0,5000,no,target,always,0,,,,,,, +2956,Sweet Slaughter@BS_MAXIMIZE,attack,114,5,500,1000,5000,yes,self,always,0,,,,,,, +2956,Sweet Slaughter@BS_MAXIMIZE,chase,114,5,500,1000,5000,yes,self,always,0,,,,,,, +2956,Sweet Slaughter@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,no,target,always,0,,,,,,9, +2956,Sweet Slaughter@NPC_STUNATTACK,attack,179,3,500,1500,5000,yes,target,always,0,,,,,,, +2957,Forgotten Name@NPC_CRITICALSLASH,attack,170,1,1000,500,5000,yes,target,always,0,,,,,,, +2957,Forgotten Name@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,yes,target,always,0,,,,,,6, +2958,Fatal Days@MG_SOULSTRIKE,chase,13,5,2000,0,3000,no,target,always,0,,,,,,, +2958,Fatal Days@AS_GRIMTOOTH,attack,137,5,10000,0,700,no,target,always,0,,,,,,, +2959,Torturous Redeemer@SM_MAGNUM,attack,7,5,500,0,10000,no,self,always,0,,,,,,, +2959,Torturous Redeemer@NPC_FIREATTACK,attack,186,3,1000,1000,200000,yes,target,always,0,,,,,,, +2959,Torturous Redeemer@WZ_FIREPILLAR,attack,80,5,500,0,10000,no,around2,always,0,,,,,,, +2959,Torturous Redeemer@SM_BASH,attack,5,5,500,0,5000,no,target,always,0,,,,,,, + // Horror Toy Factory 2987,Decorated Evil Tree@AS_GRIMTOOTH,chase,137,5,2000,0,5000,yes,target,always,0,,,,,,, 2987,Decorated Evil Tree@NPC_CURSEATTACK,attack,181,3,1000,0,5000,yes,target,always,0,,,,,,6, diff --git a/db/re/quest_db.txt b/db/re/quest_db.txt index 5f90d5f1a7..c87d7b9e32 100644 --- a/db/re/quest_db.txt +++ b/db/re/quest_db.txt @@ -136,6 +136,10 @@ 1239,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Shop guide" 1240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Shop guide" +// Ghost Palace memorial +1261,82800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Cursed Swordman" +1263,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Cursed Swordman" + 2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Job Change to Blacksmith" 2001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Job Change to Blacksmith" 2002,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Job Change to Blacksmith" diff --git a/npc/re/instances/GhostPalace.txt b/npc/re/instances/GhostPalace.txt new file mode 100644 index 0000000000..af243957ea --- /dev/null +++ b/npc/re/instances/GhostPalace.txt @@ -0,0 +1,991 @@ +//===== rAthena Script ======================================= +//= Ghost Palace +//===== Description: ========================================= +//= [Walkthrough Conversion] +//= Ghost Palace Instance +//===== Changelogs: ========================================== +//= 1.0 First version. [Capuche] +//============================================================ + +dali02,43,129,5 script Unpleasant Royal Guard# 4_M_SAKRAYROYAL,{ + if (BaseLevel < 120) { + mes "[Unpleasant Royal Guard]"; + mes "Althought I need help with a task, you are not strong enough to assist me, noob~!"; + next; + mes "[Unpleasant Royal Guard]"; + mes "Come back later when you have done some training and are at least level 120!"; + close; + } + .@party_id = getcharid(1); + if (getcharid(0) != getpartyleader(.@party_id,2) || .@party_id < 1) { + mes "[Unpleasant Royal Guard]"; + mes "I can only open the secret passage for party leaders. Please have your party leader talk to me."; + close; + } + switch( checkquest(1261,PLAYTIME) ) { + case -1: + break; + case 0: + case 1: + mes "[Unpleasant Royal Guard]"; + mes "Have you found the princess yet?! Is she safe?"; + close; + case 2: + mes "[Unpleasant Royal Guard]"; + mes "The monsters around the secret passage have disappeared. Now is our chance to save the princess!"; + erasequest 1261;// Cursed Swordman + close; + } + mes "[Unpleasant Royal Guard]"; + mes "I need help, even from the likes of you."; + next; + mes "[Unpleasant Royal Guard]"; + mes "In the middle of battle the princess disappeared while I was guarding the palace."; + next; + mes "[Unpleasant Royal Guard]"; + mes "You run ahead and I will catch up. We must save her."; + next; + if (select( "I will help.", "This is not a good time." ) == 2) { + mes "[Unpleasant Royal Guard]"; + mes "Even now all the royal guards are fighting and dying from the monsters."; + next; + mes "[Unpleasant Royal Guard]"; + mes "We must, no matter how much fear grips our hearts, save the princess!"; + close; + } + instance_create("Ghost Palace"); + mes "[Unpleasant Royal Guard]"; + mes "Thank you.."; + mes "I will open the secret passage to the ^0000ffGhost Palace^000000."; + mes "Please be ready!"; + close; +} + +dali02,40,134,5 script Interdimensional Device#dk PORTAL,{ + if (BaseLevel < 120) { + mes "[Unpleasant Royal Guard]"; + mes "Althought I need help with a task, you are not strong enough to assist me, noob~!"; + next; + mes "[Unpleasant Royal Guard]"; + mes "Come back later when you have done some training and are at least level 120!"; + close; + } + mes "[Unpleasant Royal Guard]"; + mes "I can see the secret passage into the palace. Are you ready to save the princess?!"; + next; + if (select( "Enter", "Stop" ) == 2) { + mes "[Unpleasant Royal Guard]"; + mes "Even now all the royal guards are fighting and dying from the monsters."; + next; + mes "[Unpleasant Royal Guard]"; + mes "We must, no matter how much fear grips our hearts, save the princess!"; + close; + } + switch( checkquest(1261,PLAYTIME) ) { + case -1: + break; + case 0: + case 1: + mes "[Unpleasant Royal Guard]"; + mes "The monsters that attacked the palace are wandering around the secret entrance. It would be very bad if they spotted us... Please wait."; + next; + mes "When the time limit for the entrance is up"; + mes "let's try to re-enter."; + close; + case 2: + mes "^0000ffThe time limit for entering to the Curse of the Swordsman is finished. Please try to talk to the Unpleasent Royal Guard again..^000000"; + erasequest 1261;// Cursed Swordman + close; + } + .@party_id = getcharid(1); + if (getcharid(0) != getpartyleader(.@party_id,2) || .@party_id < 1) { + mes "[Unpleasant Royal Guard]"; + mes "I can only open the secret passage for party leaders. Please have your party leader talk to me."; + close; + } + + .@md_name$ = "Ghost Palace"; + switch( instance_enter(.@md_name$) ) { + case IE_OTHER: + mes "An unknown error occurred."; + close; + case IE_NOINSTANCE: + mes "^ff0000Inside the devices you see a dark hole. If you wish to enter you must to talk to the Unpleasent Royal Guard first.^000000"; + close; + case IE_NOMEMBER: + mes "Only registered members can enter the " + .@md_name$ + " instance."; + close; + case IE_OK: + mapannounce "dali", "" + strcharinfo(0) + " of the party, " + getpartyname(.@party_id) + ", is entering the Ghost Palace.", bc_map, 0x00ff99; + // warp "1@spa",42,196; + setquest 1261;// Cursed Swordman + end; + } +} + +// 1st floor +1@spa,41,204,5 script King#dk 4_M_RUSKING,{ + mes "[King]"; + mes "You are hereby appointed as the personal guard to Princess Tiara. I trust your loyalty above all else."; + npctalk "King: You are hereby appointed as the personal guard to Princess Tiara. I trust your loyalty above all else."; + next; + mes "[Lurid Royal Guard]"; + mes "I will protect the princess with my life."; + npctalk "Lurid Royal Guard: I will protect the princess with my life.", instance_npcname("Lurid Royal Guard#dk"); + next; + mes "[King]"; + mes "The marriage arrangements are going as planned. The prince is here to meet with the princess."; + npctalk "King: The marriage arrangements are going as planned. The prince is here to meet with the princess."; + next; + mes "[Lurid Royal Guard]"; + mes "...Yes, your majesty."; + npctalk "Lurid Royal Guard: ...Yes, your majesty.", instance_npcname("Lurid Royal Guard#dk"); + next; + mes "[King]"; + mes "My gods, there are monsters in the castle! Get rid of them now!"; + npctalk "King: My gods, there are monsters in the castle! Get rid of them now!"; + close2; + donpcevent instance_npcname("#gp_control_1") + "::OnStart"; + end; + +OnInstanceInit: + // 1: enabled potential double spawn (official), 0: disabled + 'bool_double_spawn = 1; + + 'map_spa$ = instance_mapname("1@spa"); + + // warps + disablenpc instance_npcname("The second floor of Palace"); + disablenpc instance_npcname("3rd floor in the palace"); + disablenpc instance_npcname("4th floor in the palace"); + disablenpc instance_npcname("5th floor of Palace"); + disablenpc instance_npcname("Way out of Palace"); + + // first floor + disablenpc instance_npcname("#gp_control_1"); + + // second floor + disablenpc instance_npcname("Lurid Royal Guard#dk1"); + disablenpc instance_npcname("Princess Tiara#dk"); + disablenpc instance_npcname("#gp_control_2"); + + // 3rd floor + disablenpc instance_npcname("King#dk1"); + disablenpc instance_npcname("Lurid Royal Guard#dk2"); + disablenpc instance_npcname("Captain of the Guard#dk"); + disablenpc instance_npcname("Soldier#dk1"); + disablenpc instance_npcname("Soldier#dk2"); + disablenpc instance_npcname("Soldier#dk3"); + disablenpc instance_npcname("Lurid Royal Guard#dk3"); + disablenpc instance_npcname("Thanatos Magic Trace#dk1"); + disablenpc instance_npcname("#gp_control_3"); + + // 4th floor + disablenpc instance_npcname("#gp_control_4"); + disablenpc instance_npcname("#gp_control_5"); + disablenpc instance_npcname("Thanatos Magic Trace#dk2"); + disablenpc instance_npcname("Visiting Prince#dk"); + disablenpc instance_npcname("Lurid Royal Guard#dk4"); + disablenpc instance_npcname("King's Corpse#dk"); + disablenpc instance_npcname("Captain's Corpse#dk"); + disablenpc instance_npcname("Soldier's Corpse#dk"); + disablenpc instance_npcname("Soldier's Corpse#dk1"); + disablenpc instance_npcname("Soldier's Corpse#dk2"); + disablenpc instance_npcname("Soldier's Corpse#dk3"); + disablenpc instance_npcname("Soldier's Corpse#dk4"); + + // 5th floor + disablenpc instance_npcname("#gp_control_6"); + disablenpc instance_npcname("Princess Tiara#dk1"); + disablenpc instance_npcname("Lurid Royal Guard#dk5"); + disablenpc instance_npcname("King#dk11"); + disablenpc instance_npcname("Sakray#dk"); + disablenpc instance_npcname("Thanatos Magic Trace#dk3"); + disablenpc instance_npcname("#tb"); + disablenpc instance_npcname("#sv"); + disablenpc instance_npcname("#tv"); + end; +} + +1@spa,42,201,1 script Lurid Royal Guard#dk 4_M_SAKRAYROYAL,{ end; } + +1@spa,1,1,1 script #gp_control_1 HIDDEN_WARP_NPC,{ + end; +OnStart: + enablenpc instance_npcname("#gp_control_1"); + disablenpc instance_npcname("King#dk"); + disablenpc instance_npcname("Lurid Royal Guard#dk"); + initnpctimer; + end; +OnTimer2000: + .@label$ = instance_npcname("#gp_control_1") + "::OnMyMobDead1"; + monster 'map_spa$,50,194,"Cursed Soldier",2948,1, .@label$; // CURSED_SOLDIER + monster 'map_spa$,34,208,"Cursed Soldier",2948,1, .@label$; // CURSED_SOLDIER + monster 'map_spa$,32,194,"Cursed Gatekeeper",2949,1, .@label$; // CURSED_SENTINEL + monster 'map_spa$,52,209,"Cursed Gatekeeper",2949,1, .@label$; // CURSED_SENTINEL + stopnpctimer; + end; +OnMyMobDead1: + if (mobcount('map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead1") < (1 + 'bool_double_spawn)) { + deltimer instance_npcname("#gp_control_1") + "::OnSpawn1"; // stop double spawn if timer is running + addtimer 2000, instance_npcname("#gp_control_1") + "::OnSpawn1"; + } + end; +OnSpawn1: + .@label$ = instance_npcname("#gp_control_1") + "::OnMyMobDead2"; + monster 'map_spa$,37,182,"Cursed Soldier",2948,1, .@label$; // CURSED_SOLDIER + monster 'map_spa$,46,182,"Cursed Gatekeeper",2949,1, .@label$; // CURSED_SENTINEL + end; +OnMyMobDead2: + if (mobcount('map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead2") < 1) { + deltimer instance_npcname("#gp_control_1") + "::OnSpawn1"; // stop double spawn if timer is running + deltimer instance_npcname("#gp_control_1") + "::OnSpawn2"; + addtimer 2000, instance_npcname("#gp_control_1") + "::OnSpawn2"; + } + end; +OnSpawn2: + .@label$ = instance_npcname("#gp_control_1") + "::OnMyMobDead3"; + monster 'map_spa$,30,200,"Cursed Soldier",2948,1, .@label$; // CURSED_SOLDIER + monster 'map_spa$,51,200,"Cursed Gatekeeper",2949,1, .@label$; // CURSED_SENTINEL + monster 'map_spa$,53,199,"Cursed Gatekeeper",2949,1, .@label$; // CURSED_SENTINEL + end; +OnMyMobDead3: + if (mobcount('map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead3") < 1) { + mapannounce 'map_spa$, "The passage on the 2nd floor in the palace of ghost is open .", bc_map,0xFFFF00; + enablenpc instance_npcname("The second floor of Palace"); + enablenpc instance_npcname("Lurid Royal Guard#dk1"); + enablenpc instance_npcname("Princess Tiara#dk"); + } + end; +} + +// 2nd floor +1@spa,132,122,7 script Lurid Royal Guard#dk1 4_M_SAKRAYROYAL,{ + .@tiara$ = instance_npcname("Princess Tiara#dk"); + cutin "npc-tiara.bmp",3; + mes "[Lurid Royal Guard]"; + mes "Your highness, the King has invited a prince from a neighboring country to be your betrothed. Be ready to meet him..."; + npctalk "Lurid Royal Guard: Your highness, the King has invited a prince from a neighboring country to be your betrothed. Be ready to meet him..."; + next; + mes "[Princess Tiara]"; + mes "If...If a marriage is arranged what should I do?"; + npctalk "Princess Tiara: If...If a marriage is arranged what should I do?", .@tiara$; + next; + mes "[Lurid Royal Guard]"; + mes "The only thing I can do is protect you from physical harm."; + npctalk "Lurid Royal Guard: The only thing I can do is protect you from physical harm."; + next; + mes "[Princess Tiara]"; + mes "Then, what can I do?"; + npctalk "Princess Tiara: Then, what can I do?", .@tiara$; + next; + mes "[Lurid Royal Guard]"; + mes "You must decide that for yourself your highness..."; + npctalk "Lurid Royal Guard: You must decide that for yourself your highness..."; + next; + mes "[Princess Tiara]"; + mes "Would it be easier for you if I were married and sent off to another country?"; + npctalk "Princess Tiara: Would it be easier for you if I were married and sent off to another country?", .@tiara$; + next; + mes "[Lurid Royal Guard]"; + mes "I will always stand by you and protect you forever."; + npctalk "Lurid Royal Guard: I will always stand by you and protect you forever."; + cutin "npc-tiara.bmp",255; + next; + mes "[Princess Tiara]"; + mes "Monsters have gotten inside the castle? Please, protect me!"; + npctalk "Princess Tiara: Monsters have gotten inside the castle? Please, protect me!", .@tiara$; + next; + mes "[Lurid Royal Guard]"; + mes "Stay behind me. Let's go!"; + npctalk "Lurid Royal Guard: Stay behind me. Let's go!"; + close2; + donpcevent instance_npcname("#gp_control_2") + "::OnStart"; + end; +} + +1@spa,135,125,3 duplicate(Lurid Royal Guard#dk) Princess Tiara#dk 4_F_MAYSEL + +1@spa,1,1,1 script #gp_control_2 HIDDEN_WARP_NPC,{ + end; +OnStart: + enablenpc instance_npcname("#gp_control_2"); + disablenpc instance_npcname("Lurid Royal Guard#dk1"); + disablenpc instance_npcname("Princess Tiara#dk"); + disablenpc instance_npcname("The second floor of Palace"); + + killmonster 'map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead1"; + killmonster 'map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead2"; + killmonster 'map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead3"; + disablenpc instance_npcname("#gp_control_1"); + initnpctimer; + end; +OnTimer2000: + .@label$ = instance_npcname("#gp_control_2") + "::OnMyMobDead1"; + monster 'map_spa$,135,116,"Broken Promise",2950,1, .@label$; // BROKEN_MIND + monster 'map_spa$,110,120,"Broken Promise",2950,1, .@label$; // BROKEN_MIND + monster 'map_spa$,122,112,"Floating Sorrow",2951,1, .@label$; // FLOATING_WORD + monster 'map_spa$,121,129,"Unfulfilled Love",2952,1, .@label$; // LIKE_LOVE + stopnpctimer; + end; +OnMyMobDead1: + if (mobcount('map_spa$, instance_npcname("#gp_control_2") + "::OnMyMobDead1") < 1) { + sleep 2000; + .@label$ = instance_npcname("#gp_control_2") + "::OnMyMobDead2"; + monster 'map_spa$,120,103,"Broken Promise",2950,1, .@label$; // BROKEN_MIND + monster 'map_spa$,115,137,"Floating Sorrow",2951,1, .@label$; // FLOATING_WORD + monster 'map_spa$,103,130,"Unfulfilled Love",2952,1, .@label$; // LIKE_LOVE + } + end; +OnMyMobDead2: + if (mobcount('map_spa$, instance_npcname("#gp_control_2") + "::OnMyMobDead2") < 1) { + sleep 2000; + .@label$ = instance_npcname("#gp_control_2") + "::OnMyMobDead3"; + monster 'map_spa$,98,119,"Floating Sorrow",2951,1, .@label$; // FLOATING_WORD + monster 'map_spa$,98,120,"Floating Sorrow",2951,1, .@label$; // FLOATING_WORD + monster 'map_spa$,103,109,"Unfulfilled Love",2952,1, .@label$; // LIKE_LOVE + } + end; +OnMyMobDead3: + if (mobcount('map_spa$, instance_npcname("#gp_control_2") + "::OnMyMobDead3") < 1) { + mapannounce 'map_spa$, "The passage on the 3rd floor of the palace is open.", bc_map,0xFFFF00; + enablenpc instance_npcname("3rd floor in the palace"); + enablenpc instance_npcname("King#dk1"); + enablenpc instance_npcname("Lurid Royal Guard#dk2"); + enablenpc instance_npcname("Captain of the Guard#dk"); + enablenpc instance_npcname("Soldier#dk1"); + enablenpc instance_npcname("Soldier#dk2"); + enablenpc instance_npcname("Soldier#dk3"); + disablenpc instance_npcname("#gp_control_2"); + } + end; +} + +// 3rd floor +1@spa,32,54,1 script King#dk1 4_M_RUSKING,{ + mes "[King]"; + mes "It was you who brought the monsters here! You want to get rid of me and have the princess for yourself?"; + npctalk "King: It was you who brought the monsters here! You want to get rid of me and have the princess for yourself?"; + next; + mes "[Lurid Royal Guard]"; + mes "It is a trap your majesty! You must trust me!"; + npctalk "Lurid Royal Guard: It is a trap your majesty! You must trust me!", instance_npcname("Lurid Royal Guard#dk2"); + next; + mes "[King]"; + mes "Shut up! You've betrayed me! I trusted you... you must pay for your disgrace."; + npctalk "King: Shut up! You've betrayed me! I trusted you... you must pay for your disgrace."; + next; + mes "[King]"; + mes "You will suffer for the rest of your life."; + npctalk "King: You will suffer for the rest of your life."; + close2; + disablenpc instance_npcname("3rd floor in the palace"); + disablenpc instance_npcname("King#dk1"); + disablenpc instance_npcname("Captain of the Guard#dk"); + disablenpc instance_npcname("Soldier#dk1"); + disablenpc instance_npcname("Soldier#dk2"); + disablenpc instance_npcname("Soldier#dk3"); + disablenpc instance_npcname("Lurid Royal Guard#dk2"); + donpcevent instance_npcname("Thanatos Magic Trace#dk1") + "::OnStart"; + end; +} + +1@spa,35,56,5 script Thanatos Magic Trace#dk1 4_TRACE,{ + end; +OnStart: + enablenpc instance_npcname("Thanatos Magic Trace#dk1"); + enablenpc instance_npcname("Lurid Royal Guard#dk3"); + initnpctimer; + end; +OnTimer5000: + npctalk "Ominous Voice: Oh, faithful royal guard, you are trapped."; + end; +OnTimer8000: + npctalk "Ominous Voice: The conspiracy in the palace has your princess in grave danger..."; + end; +OnTimer12000: + npctalk "Lurid Royal Guard: Who are you? Show yourself!", instance_npcname("Lurid Royal Guard#dk3"); + end; +OnTimer15000: + npctalk "Ominous Voice: Ah... so you do you hear me?"; + end; +OnTimer20000: + npctalk "Lurid Royal Guard: ...?", instance_npcname("Lurid Royal Guard#dk3"); + end; +OnTimer23000: + npctalk "Ominous Voice: I can give you unlimited power. If you make a pact with me."; + end; +OnTimer28000: + npctalk "Lurid Royal Guard: I..I...", instance_npcname("Lurid Royal Guard#dk3"); + end; +OnTimer33000: + npctalk "Thanatos Magic Trace: Kukuku... What do you want boy?"; + end; +OnTimer34000: + stopnpctimer; + disablenpc instance_npcname("Thanatos Magic Trace#dk1"); + disablenpc instance_npcname("Lurid Royal Guard#dk3"); + donpcevent instance_npcname("#gp_control_3") + "::OnStart"; + end; +} + +1@spa,28,52,7 duplicate(Lurid Royal Guard#dk) Captain of the Guard#dk 4_M_KY_KNT +1@spa,25,53,7 duplicate(Lurid Royal Guard#dk) Soldier#dk1 4_M_CRU_SOLD +1@spa,34,53,1 duplicate(Lurid Royal Guard#dk) Soldier#dk2 4_M_CRU_SOLD +1@spa,30,52,7 duplicate(Lurid Royal Guard#dk) Soldier#dk3 4_M_KY_SOLD +1@spa,30,58,5 duplicate(Lurid Royal Guard#dk) Lurid Royal Guard#dk2 4_M_SAKRAY_TIED +1@spa,31,57,5 duplicate(Lurid Royal Guard#dk) Lurid Royal Guard#dk3 4_M_SAKRAY_TIED + +1@spa,1,1,1 script #gp_control_3 HIDDEN_WARP_NPC,{ + end; +OnStart: + enablenpc instance_npcname("#gp_control_3"); + initnpctimer; + end; +OnTimer2000: + .@label$ = instance_npcname("#gp_control_3") + "::OnMyMobDead1"; + monster 'map_spa$,31,57, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + monster 'map_spa$,59,24, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + monster 'map_spa$,23,40, "Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + monster 'map_spa$,54,45, "Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + monster 'map_spa$,26,20, "Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + stopnpctimer; + end; +OnMyMobDead1: + if (mobcount('map_spa$, instance_npcname("#gp_control_3") + "::OnMyMobDead1") < 1) + addtimer 2000, instance_npcname("#gp_control_3") + "::OnSpawn1"; + end; +OnSpawn1: + .@label$ = instance_npcname("#gp_control_3") + "::OnMyMobDead2"; + monster 'map_spa$,30,52, "Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + monster 'map_spa$,58,58, "Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + monster 'map_spa$,54,24, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + end; +OnMyMobDead2: + if (mobcount('map_spa$, instance_npcname("#gp_control_3") + "::OnMyMobDead2") < (1 + 'bool_double_spawn)) { + deltimer instance_npcname("#gp_control_3") + "::OnAnnounce"; + addtimer 500, instance_npcname("#gp_control_3") + "::OnAnnounce"; + } + end; +OnAnnounce: + mapannounce 'map_spa$, "The passage on the 4th floor of the palace is open.", bc_map,0xFFFF00; + enablenpc instance_npcname("4th floor in the palace"); + deltimer instance_npcname("#gp_control_3") + "::OnSpawn2"; // stop double spawn if timer is running + addtimer 2000, instance_npcname("#gp_control_3") + "::OnSpawn2"; + end; +OnSpawn2: + donpcevent instance_npcname("#gp_control_4") + "::OnStart"; + // 35 mobs + .@label$ = instance_npcname("#gp_control_3") + "::OnMyMobDead3"; + monster 'map_spa$,67,46, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "You are trapped..."; + monster 'map_spa$,62,48, "Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Run away!"; + monster 'map_spa$,57,46, "Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + unittalk $@mobid[0], "Run away quickly!"; + monster 'map_spa$,51,48, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "Faithful royal guard..."; + monster 'map_spa$,56,55, "Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Run away!"; + monster 'map_spa$,62,56, "Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + unittalk $@mobid[0], "You are trapped..."; + monster 'map_spa$,66,58, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "You put your princess in grave danger..."; + monster 'map_spa$,66,64, "Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Faithful royal guard..."; + monster 'map_spa$,62,65, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "Run away quickly!"; + monster 'map_spa$,57,67, "Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "You are trapped..."; + monster 'map_spa$,49,66, "Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + unittalk $@mobid[0], "Run away!"; + monster 'map_spa$,44,66, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "Run away quickly!"; + monster 'map_spa$,45,20, "Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Run away!"; + monster 'map_spa$,38,20, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "You are trapped..."; + monster 'map_spa$,32,20, "Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + unittalk $@mobid[0], "Run away quickly!"; + monster 'map_spa$,51,22, "Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + unittalk $@mobid[0], "Run away quickly!"; + monster 'map_spa$,26,34,"Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + unittalk $@mobid[0], "Run away!"; + monster 'map_spa$,21,37,"Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Faithful royal guard..."; + monster 'map_spa$,18,39,"Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "Run away quickly!"; + monster 'map_spa$,21,45,"Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Run away!"; + monster 'map_spa$,23,49,"Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "You are trapped..."; + monster 'map_spa$,25,54,"Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + unittalk $@mobid[0], "Run away quickly!"; + monster 'map_spa$,29,54,"Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "You put your princess in grave danger..."; + monster 'map_spa$,56,39,"Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "Run away!"; + monster 'map_spa$,61,36,"Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Faithful royal guard..."; + monster 'map_spa$,66,38,"Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + unittalk $@mobid[0], "Run away quickly!"; + monster 'map_spa$,42,54,"Wasted Friendship",2955,1, .@label$; // OLD_FRIENDSHIP + unittalk $@mobid[0], "Run away!"; + monster 'map_spa$,35,54,"Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "You are trapped..."; + monster 'map_spa$,43,60,"Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Faithful royal guard..."; + monster 'map_spa$,30,25,"Tarnished Oath",2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "You put your princess in grave danger..."; + monster 'map_spa$,30,31,"Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + unittalk $@mobid[0], "You are trapped..."; + monster 'map_spa$,65,64, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + monster 'map_spa$,65,67, "Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + monster 'map_spa$,18,43,"Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + monster 'map_spa$,21,43,"Regretful Memory",2953,1, .@label$; // CURSED_MEMORY + end; +OnMyMobDead3: + end; +} + +// 4th floor +1@spa,1,1,1 script #gp_control_4 HIDDEN_WARP_NPC,{ + end; +OnStart: + enablenpc instance_npcname("#gp_control_4"); + .@label$ = instance_npcname("#gp_control_4") + "::OnMyMobDead1"; + monster 'map_spa$,215,194, "Sweet Slaughter",2956,1, .@label$; // SWEET_SLAUGHTER + monster 'map_spa$,194,178, "Sweet Slaughter",2956,1, .@label$; // SWEET_SLAUGHTER + monster 'map_spa$,191,211, "Sweet Slaughter",2956,1, .@label$; // SWEET_SLAUGHTER + monster 'map_spa$,185,203, "Cursed Gatekeeper",2949,1, .@label$; // CURSED_SENTINEL + monster 'map_spa$,209,218, "Cursed Gatekeeper",2949,1, .@label$; // CURSED_SENTINEL + end; +OnMyMobDead1: + if (mobcount('map_spa$, instance_npcname("#gp_control_4") + "::OnMyMobDead1") < (1 + 'bool_double_spawn)) { + deltimer instance_npcname("#gp_control_4") + "::OnSpawn1"; + addtimer 2000, instance_npcname("#gp_control_4") + "::OnSpawn1"; + } + end; +OnSpawn1: + .@label$ = instance_npcname("#gp_control_4") + "::OnMyMobDead2"; + monster 'map_spa$,189,192, "Cursed Gatekeeper",2949,1, .@label$; // CURSED_SENTINEL + monster 'map_spa$,211,209, "Sweet Slaughter",2956,1, .@label$; // SWEET_SLAUGHTER + end; +OnMyMobDead2: + if (mobcount('map_spa$, instance_npcname("#gp_control_4") + "::OnMyMobDead2") < 1) { + enablenpc instance_npcname("Thanatos Magic Trace#dk2"); + enablenpc instance_npcname("Visiting Prince#dk"); + enablenpc instance_npcname("Lurid Royal Guard#dk4"); + enablenpc instance_npcname("King's Corpse#dk"); + enablenpc instance_npcname("Captain's Corpse#dk"); + enablenpc instance_npcname("Soldier's Corpse#dk"); + enablenpc instance_npcname("Soldier's Corpse#dk1"); + enablenpc instance_npcname("Soldier's Corpse#dk2"); + enablenpc instance_npcname("Soldier's Corpse#dk3"); + enablenpc instance_npcname("Soldier's Corpse#dk4"); + } + end; +} + +1@spa,199,214,1 script Lurid Royal Guard#dk4 4_M_SAKRAYROYAL,{ + .@prince$ = instance_npcname("Visiting Prince#dk"); + mes "[Lurid Royal Guard]"; + mes "Where is Princess Tiara?"; + npctalk "Lurid Royal Guard: Where is Princess Tiara?"; + next; + mes "[Visiting Prince]"; + mes "You are too late... but you brought what I was looking for. Thanks for your help."; + npctalk "Visiting Prince: You are too late... but you brought what I was looking for. Thanks for your help.", .@prince$; + next; + mes "[Visiting Prince]"; + mes "Cursed Thanatos Magic Trace! Are you ready to have a new master?"; + npctalk "Visiting Prince: Cursed Thanatos Magic Trace! Are you ready to have a new master?", .@prince$; + next; + cutin "tartanos.bmp",3; + mes "[Thanatos Magic Trace]"; + mes "How dare you!"; + npctalk "Thanatos Magic Trace: How dare you!", instance_npcname("Thanatos Magic Trace#dk2"); + next; + mes "[Visiting Prince]"; + mes "aah, aah !!!"; + npctalk "Visiting Prince: Aah, aah!!!", .@prince$; + donpcevent instance_npcname("#gp_control_5") + "::OnStart"; + close2; + cutin "",255; + end; +} +1@spa,201,214,1 duplicate(Lurid Royal Guard#dk) Thanatos Magic Trace#dk2 CLEAR_NPC +1@spa,197,218,5 duplicate(Lurid Royal Guard#dk) Visiting Prince#dk 4_M_KNIGHT_SILVER +1@spa,194,214,5 duplicate(Lurid Royal Guard#dk) King's Corpse#dk 4_M_TRISTAN +1@spa,211,194,3 duplicate(Lurid Royal Guard#dk) Captain's Corpse#dk 4_M_LIEMAN +1@spa,201,198,1 duplicate(Lurid Royal Guard#dk) Soldier's Corpse#dk 4_M_DIEMAN +1@spa,197,190,1 duplicate(Lurid Royal Guard#dk) Soldier's Corpse#dk1 4_M_DIEMAN +1@spa,191,207,7 duplicate(Lurid Royal Guard#dk) Soldier's Corpse#dk2 4_M_DIEMAN +1@spa,206,209,7 duplicate(Lurid Royal Guard#dk) Soldier's Corpse#dk3 4_M_DIEMAN +1@spa,189,195,1 duplicate(Lurid Royal Guard#dk) Soldier's Corpse#dk4 4_M_DIEMAN + +1@spa,1,1,1 script #gp_control_5 HIDDEN_WARP_NPC,{ + end; +OnStart: + enablenpc instance_npcname("#gp_control_5"); + disablenpc instance_npcname("Thanatos Magic Trace#dk2"); + disablenpc instance_npcname("Visiting Prince#dk"); + disablenpc instance_npcname("Lurid Royal Guard#dk4"); + disablenpc instance_npcname("King's Corpse#dk"); + disablenpc instance_npcname("Captain's Corpse#dk"); + disablenpc instance_npcname("Soldier's Corpse#dk"); + disablenpc instance_npcname("Soldier's Corpse#dk1"); + disablenpc instance_npcname("Soldier's Corpse#dk2"); + disablenpc instance_npcname("Soldier's Corpse#dk3"); + disablenpc instance_npcname("Soldier's Corpse#dk4"); + sleep 1000; + .@label$ = instance_npcname("#gp_control_5") + "::OnMyMobDead"; + monster 'map_spa$,198,218, "Torturous Redeemer",2959,1, .@label$; // TORTUROUS_REDEEMER + monster 'map_spa$,198,182, "Sweet Slaughter",2956,1, .@label$; // SWEET_SLAUGHTER + end; +OnMyMobDead: + if (mobcount('map_spa$, instance_npcname("#gp_control_5") + "::OnMyMobDead") < 1) { + deltimer instance_npcname("#gp_control_4") + "::OnSpawn1"; // stop double spawn if timer is running + mapannounce 'map_spa$, "The passage on the 5th floor of the palace is open.", bc_map,0xFFFF00; + disablenpc instance_npcname("4th floor in the palace"); + enablenpc instance_npcname("5th floor of Palace"); + enablenpc instance_npcname("Princess Tiara#dk1"); + enablenpc instance_npcname("Lurid Royal Guard#dk5"); + + killmonster 'map_spa$, instance_npcname("#gp_control_3") + "::OnMyMobDead2"; + killmonster 'map_spa$, instance_npcname("#gp_control_3") + "::OnMyMobDead3"; + disablenpc instance_npcname("#gp_control_3"); + } + end; +} + +// 5th floor +1@spa,216,43,3 script Princess Tiara#dk1 4_F_MAYSEL,{ + .@guard$ = instance_npcname("Lurid Royal Guard#dk5"); + mes "[Princess Tiara]"; + mes "You kept your promise."; + npctalk "Princess Tiara: You kept your promise."; + next; + mes "[Lurid Royal Guard]"; + mes "princess!"; + npctalk "Lurid Royal Guard: Princess!", .@guard$; + next; + cutin "npc-tiara.bmp",3; + mes "[Princess Tiara]"; + mes "Thank you... now I can rest beside you..."; + npctalk "Princess Tiara: Thank you... now I can rest beside you..."; + next; + mes "[Lurid Royal Guard]"; + mes "No..No!!!!!"; + npctalk "Lurid Royal Guard: No..No!!!!!", .@guard$; + next; + mes "[The voice of Princess Tiara]"; + mes "I want to be with you forever in peace...forever..."; + npctalk "Princess Tiara: I want to be with you forever in peace...forever..."; + next; + cutin "b-tiara.BMP",3; + mes "[Lurid Royal Guard]"; + mes "no.....Ahh ahh ahh!!!!~!"; + npctalk "Lurid Royal Guard: no.....Ahh ahh ahh!!!!~!", .@guard$; + next; + mes "[The voice of Princess Tiara]"; + mes "I love you..."; + npctalk "Princess Tiara: I love you..."; + cutin "",255; + close2; + donpcevent instance_npcname("#gp_control_6") + "::OnStart"; + end; +} + +1@spa,213,42,7 duplicate(Lurid Royal Guard#dk) Lurid Royal Guard#dk5 4_M_SAKRAYROYAL + +1@spa,1,1,1 script #gp_control_6 HIDDEN_WARP_NPC,{ + end; +OnStart: + enablenpc instance_npcname("#gp_control_6"); + disablenpc instance_npcname("Princess Tiara#dk1"); + disablenpc instance_npcname("Lurid Royal Guard#dk5"); + + killmonster 'map_spa$, instance_npcname("#gp_control_4") + "::OnMyMobDead1"; + killmonster 'map_spa$, instance_npcname("#gp_control_4") + "::OnMyMobDead2"; + killmonster 'map_spa$, instance_npcname("#gp_control_5") + "::OnMyMobDead"; + disablenpc instance_npcname("#gp_control_4"); + disablenpc instance_npcname("#gp_control_5"); + disablenpc instance_npcname("5th floor of Palace"); + sleep 2000; + .@label$ = instance_npcname("#gp_control_6") + "::OnMyMobDead1"; + monster 'map_spa$,217,52, "Forgotten Name" ,2957,1, .@label$; // FORGOTTEN_NAME + unittalk $@mobid[0], "Wake up! look at us... We are monsters?"; + monster 'map_spa$,190,21, "Tarnished Oath" ,2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Sakray killed the King and tried to kill us!"; + monster 'map_spa$,198,49, "Tarnished Oath" ,2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "What is this..??"; + monster 'map_spa$,212,28, "Fatal Days" ,2958,1, .@label$; // FATAL_DAYS + unittalk $@mobid[0], "Sakray killed a princess!"; + end; +OnMyMobDead1: + if (mobcount('map_spa$, instance_npcname("#gp_control_6") + "::OnMyMobDead1") < 1) { + sleep 2000; + .@label$ = instance_npcname("#gp_control_6") + "::OnMyMobDead2"; + monster 'map_spa$,217,43, "Forgotten Name" ,2957,1, .@label$; // FORGOTTEN_NAME + unittalk $@mobid[0], "Wake up! look at us... We are monsters?"; + monster 'map_spa$,193,24, "Forgotten Name" ,2957,1, .@label$; // FORGOTTEN_NAME + unittalk $@mobid[0], "Sakray..?? why.....Sakray!"; + monster 'map_spa$,216,59, "Tarnished Oath" ,2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Sakray killed the King and tried to kill us!"; + monster 'map_spa$,197,57, "Fatal Days" ,2958,1, .@label$; // FATAL_DAYS + unittalk $@mobid[0], "Sakray killed a princess!"; + } + end; +OnMyMobDead2: + if (mobcount('map_spa$, instance_npcname("#gp_control_6") + "::OnMyMobDead2") < 1) { + sleep 2000; + .@label$ = instance_npcname("#gp_control_6") + "::OnMyMobDead3"; + monster 'map_spa$,193,39, "Forgotten Name" ,2957,1, .@label$; // FORGOTTEN_NAME + unittalk $@mobid[0], "Wake up! look at us... We are monsters?"; + monster 'map_spa$,212,34, "Forgotten Name" ,2957,1, .@label$; // FORGOTTEN_NAME + unittalk $@mobid[0], "Sakray..?? why.....Sakray!"; + monster 'map_spa$,201,64, "Tarnished Oath" ,2954,1, .@label$; // COLORLESS_VOW + unittalk $@mobid[0], "Sakray killed the King and tried to kill us!"; + monster 'map_spa$,175,44, "Fatal Days" ,2958,1, .@label$; // FATAL_DAYS + unittalk $@mobid[0], "Sakray killed a princess!"; + } + end; +OnMyMobDead3: + if (mobcount('map_spa$, instance_npcname("#gp_control_6") + "::OnMyMobDead3") < 1) { + sleep 2000; + monster 'map_spa$,200,45, "Torturous Redeemer" ,2961,1, instance_npcname("#gp_control_6") + "::OnMyMobDead4"; // E_TORTUROUS_REDEEMER + unittalk $@mobid[0], "Thanatos Magic Trace! I will destroy you if I can't have you... Oh no! How could this be?"; + sleep 5000; + killmonster 'map_spa$, instance_npcname("#gp_control_6") + "::OnMyMobDead4"; + enablenpc instance_npcname("Sakray#dk"); + enablenpc instance_npcname("Thanatos Magic Trace#dk3"); + disablenpc instance_npcname("#gp_control_6"); + } + end; +OnMyMobDead4: + end; +} + +1@spa,196,44,5 script Sakray#dk 4_M_SAKRAY,{ + mes "[Lurid Royal Guard]"; + mes "Are you satisfied..? Thanatos Magic Trace?"; + npctalk "Lurid Royal Guard: Are you satisfied..? Thanatos Magic Trace?"; + next; + mes "[Thanatos Magic Trace]"; + mes "I need more blood..Sakray, offer me his blood."; + npctalk "Thanatos Magic Trace: I need more blood..Sakray, offer me his blood.", instance_npcname("Thanatos Magic Trace#dk3"); + next; + mes "[Sakray]"; + mes "Okay, that is good. A traveller. Did you see?"; + npctalk "Sakray: Okay, that is good. A traveller. Did you see?"; + next; + mes "[" + strcharinfo(0) + "]"; + mes "Sakray, what do you want? Sympathy? Or is it a trap?"; + unittalk getcharid(3), "" + strcharinfo(0) + " : Sakray, what do you want? Sympathy? Or is it a trap?"; + next; + mes "[Sakray]"; + mes "No... I do not need to make any effort to catch a novice."; + npctalk "Sakray: No... I do not need to make any effort to catch a novice."; + next; + mes "[" + strcharinfo(0) + "]"; + mes "If so... then why...?"; + unittalk getcharid(3), "" + strcharinfo(0) + " : If so... then why...?"; + next; + cutin "cry-b.bmp",2; + mes "[Sakray]"; + mes "I wanted to get rid of a piece of humanity inside of me through you."; + npctalk "Sakray: I wanted to get rid of a piece of humanity inside of me through you."; + next; + mes "[Sakray]"; + mes "I am quite satisfied with the result."; + npctalk "Sakray: I am quite satisfied with the result."; + next; + mes "[Thanatos Magic Trace]"; + mes "Sakray, offer the blood to me now!"; + npctalk "Thanatos Magic Trace: Sakray, offer the blood to me now!", instance_npcname("Thanatos Magic Trace#dk3"); + next; + mes "[Sakray]"; + mes "If you were me, what would you do?"; + npctalk "Sakray: If you were me, what would you do?"; + next; + mes "[Sakray]"; + mes "Can you set yourself free from this curse?"; + npctalk "Sakray: Can you set yourself free from this curse?"; + next; + mes "[" + strcharinfo(0) + "]"; + mes "..."; + unittalk getcharid(3), "" + strcharinfo(0) + " : ..."; + next; + mes "[Sakray]"; + mes "Heh heh... I will keep watching you until the day comes when you are old enough."; + npctalk "Sakray: Heh heh... I will keep watching you until the day comes when you are old enough."; + next; + mes "[Sakray]"; + mes "I am willing to hunt you later for Thanatos."; + npctalk "Sakray: I am willing to hunt you later for Thanatos."; + cutin "",255; + next; + mes "[Sakray]"; + mes "Farewell then."; + npctalk "Sakray: Farewell then."; + close2; + donpcevent instance_npcname("#tb") + "::OnStart"; + end; +} + +1@spa,196,46,1 script #tb CLEAR_NPC,{ + end; +OnStart: + disablenpc instance_npcname("Sakray#dk"); + disablenpc instance_npcname("Thanatos Magic Trace#dk3"); + enablenpc instance_npcname("#tb"); + enablenpc instance_npcname("#sv"); + enablenpc instance_npcname("#tv"); + initnpctimer; + end; +OnTimer3000: + npctalk "Voice of Princess Tiara : What can I do for you?"; + end; +OnTimer8000: + npctalk "Voice of Sakray : I will always stand by you. Please rest beside me.", instance_npcname("#sv"); + end; +OnTimer13000: + npctalk "Thanatos Magic Trace: Sakray, do not forget the covenant of blood between us.", instance_npcname("#tv"); + end; +OnTimer17000: + npctalk "Thanatos Magic Trace: Your soul is mine until you find the blood that satisfies me...", instance_npcname("#tv"); + end; +OnTimer22000: + npctalk "Voice of Sakray : Rest in the shadow with me.", instance_npcname("#sv"); + end; +OnTimer25000: + npctalk "Voice of Sakray : In the dark forever...", instance_npcname("#sv"); + end; +OnTimer28500: + disablenpc instance_npcname("#tb"); + disablenpc instance_npcname("#sv"); + disablenpc instance_npcname("#tv"); + mapannounce 'map_spa$, "It is time to leave the Ghost Palace.", bc_map,0xFFFF00; + enablenpc instance_npcname("Way out of Palace"); + enablenpc instance_npcname("King#dk11"); + end; +} + +1@spa,195,41,1 duplicate(Lurid Royal Guard#dk) Thanatos Magic Trace#dk3 CLEAR_NPC +1@spa,198,43,1 duplicate(Lurid Royal Guard#dk) #sv CLEAR_NPC +1@spa,196,41,1 duplicate(Lurid Royal Guard#dk) #tv CLEAR_NPC + +1@spa,204,29,1 script King#dk11 4_M_RUSKING,{ + disable_items; + mes "[King]"; + mes "Hey there, are you alive?"; + mes "I did not expect to meet someone who is still alive."; + next; + mes "[King]"; + mes "Do you possibly have the ^006400Gray Shard^000000?"; + mes "Can you give it to me?"; + mes "The memories of the faithful royal guard"; + mes "and the memories of everyone he loved"; + mes "are contained inside of these shards."; + next; + mes "[King]"; + mes "Will you give the ^006400Gray Shard^000000 to me?"; + mes "The guilt is eating my soul."; + mes "My soul is stuck within the Ghost Palace."; + next; + mes "[King]"; + mes "I am collecting Sakray's abandoned memories from these shards."; + next; + mes "[King]"; + mes "If you give any ^006400Gray Shard^000000s to me, I can make equipment for you."; + next; + mes "[King]"; + mes "The cursed knight..."; + mes "Please help me save the soul of Sakray."; + next; + setarray .@item_name$[0], + "Thanatos Sword", "Thanatos Great Sword", "Thanatos Spear", "Thanatos Long Spear", "Thanatos Staff", + "Thanatos Two-handed Staff", "Thanatos Bow", "Thanatos Dagger", "Thanatos Katar", "Thanatos Knuckle", + "Thanatos Hammer", "Thanatos Axe", "Thanatos Violin", "Thanatos Whip", + "Gray Shield", "Gray Armor", "Gray Robe", "Gray Cloak", "Gray Shoes", "Gray Helmet"; + setarray .@items_list[0],13441,21009,1438,1496,1669,2023,18119,13093,28000,1836,16028,28100,1933,1988,2187,15090,15091,20721,22033,18820; + + for ( .@i = 0; .@i < 20; .@i++ ) + .@menu$ += .@item_name$[.@i] + ":"; + .@menu$ += "Cancel"; + + while(true) { + .@s = select(.@menu$) - 1; + if (.@s == 20) { + mes "[King]"; + mes "Someday, Sakray will"; + mes "get out of this curse for sure."; + mes "I believe"; + mes "^006400Gray Shard^000000s are the only method"; + mes "to save him...."; + close; + } + .@cost = ( .@s > 13 ? 100 : 200 ); + mes "[King]"; + mes "To make a ^FF0000" + .@item_name$[.@s] + "^000000"; + mes "I need " + .@cost + " ^006400Gray Shard^000000."; + next; + if (select( "Cancel", "Hand over " + .@cost + " Gray Shard." ) == 1) { + mes "[King]"; + mes "Someday, Sakray will"; + mes "get out of this curse for sure."; + next; + continue; + } + if (countitem(6672) < .@cost) { + mes "[King]"; + mes "You do not have enough ^006400Gray Shard^000000"; + mes "to make a ^FF0000" + .@item_name$[.@s] + "^000000."; + mes "I need " + .@cost + " ^006400Gray Shard^000000."; + next; + continue; + } + mes "[King]"; + mes "I will make a ^FF0000" + .@item_name$[.@s] + "^000000"; + mes "with " + .@cost + " ^006400Gray Shard^000000."; + next; + mes "You see a light through the folded hands of the king and it gradually takes on a shape."; + next; + mes "[King]"; + mes "All right, it is done."; + mes "Take this ^FF0000" + .@item_name$[.@s] + "^000000"; + mes "to confront Sakray and Thanatos."; + next; + mes "[King]"; + mes "The power requires a sacrifice."; + mes "Please be careful..."; + delitem 6672,.@cost;// Gray Shard + getitem .@items_list[.@s],1; + close; + } +} + +1@spa,210,28,0 script Way out of Palace WARPNPC,2,2,{ + end; +OnTouch_: + mes "It is time to leave the Ghost Palace."; + mes "Everything is now complete"; + mes "and will vanish.."; + close2; + if (isbegin_quest(1263) == 2) + getitem 6672,1;// Gray Shard + else { + setquest 1263;// Cursed Swordman + completequest 1263; + getexp 900000,500000; + getitem 6672,2;// Gray Shard + } + warp "dali02",46,129; + end; +} + +1@spa,41,217,0 warp The second floor of Palace 2,2,1@spa,114,120 +1@spa,117,137,0 warp 3rd floor in the palace 2,2,1@spa,60,43 +1@spa,54,28,0 warp 4th floor in the palace 2,2,1@spa,218,186 +1@spa,178,186,0 warp 5th floor of Palace 2,2,1@spa,186,57 diff --git a/npc/re/scripts_athena.conf b/npc/re/scripts_athena.conf index 0e77f70c7e..3013b7871a 100644 --- a/npc/re/scripts_athena.conf +++ b/npc/re/scripts_athena.conf @@ -55,6 +55,7 @@ npc: npc/re/instances/BakonawaLake.txt npc: npc/re/instances/BangungotHospital.txt npc: npc/re/instances/BuwayaCave.txt npc: npc/re/instances/FacewormsNest.txt +npc: npc/re/instances/GhostPalace.txt npc: npc/re/instances/HazyForest.txt npc: npc/re/instances/HorrorToyFactory.txt npc: npc/re/instances/MalangdoCulvert.txt From 374ecd0c997bfdf7055b89ae7c7e5d1a83d10ef5 Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Tue, 15 Aug 2017 20:13:25 +0200 Subject: [PATCH 110/124] SQL synchronization --- sql-files/mob_db_re.sql | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql index 16965cdd67..faa3a614b0 100644 --- a/sql-files/mob_db_re.sql +++ b/sql-files/mob_db_re.sql @@ -2168,20 +2168,20 @@ REPLACE INTO `mob_db_re` VALUES (2936,'E_GHOSTRING','Ghostring','Ghostring',1,10 #2945,J_MUMMY #2946,J_ANUBIS #2947,J_EGGYRA -#2948,CURSED_SOLDIER -#2949,CURSED_SENTINEL -#2950,BROKEN_MIND -#2951,FLOATING_WORD -#2952,LIKE_LOVE -#2953,CURSED_MEMORY -#2954,COLORLESS_VOW -#2955,OLD_FRIENDSHIP -#2956,SWEET_SLAUGHTER -#2957,FORGOTTEN_NAME -#2958,FATAL_DAYS -#2959,TORTUROUS_REDEEMER +REPLACE INTO `mob_db_re` VALUES (2948,'CURSED_SOLDIER','Cursed Soldier','Cursed Soldier',110,18574,1,1907,1851,9,1258,1791,85,35,81,50,64,56,178,23,10,12,1,1,69,0x3885,150,1960,576,420,0,0,0,0,0,0,0,6672,1000,957,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2949,'CURSED_SENTINEL','Cursed Sentinel','Cursed Sentinel',110,14099,1,1634,1346,2,1347,1906,84,41,120,65,66,41,107,26,10,12,2,7,67,0x3885,175,914,1344,384,0,0,0,0,0,0,0,6672,1000,934,2500,1097,1500,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2950,'BROKEN_MIND','Broken Mind','Broken Mind',110,13520,1,1545,1557,1,1259,1799,67,27,69,37,36,10,64,5,10,12,1,6,67,0x2003885,200,920,720,200,0,0,0,0,0,0,0,6672,1000,6086,2500,683,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2951,'FLOATING_WORD','Floating Word','Floating Word',110,11276,1,1166,1034,1,1080,1509,93,40,111,90,60,70,139,65,10,12,0,6,68,0x2003885,150,972,648,432,0,0,0,0,0,0,0,6672,1000,938,3000,947,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2952,'LIKE_LOVE','Like Love','Like Love',110,14008,1,1505,1667,2,1182,1183,64,51,62,27,25,55,102,20,10,12,1,6,64,0x2003885,150,1056,1056,336,0,0,0,0,0,0,0,6672,1000,929,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2953,'CURSED_MEMORY','Cursed Memory','Cursed Memory',110,18045,1,1802,1623,1,1310,1867,89,28,87,39,58,5,82,10,10,12,1,1,69,0x3885,350,1768,500,192,0,0,0,0,0,0,0,6672,1000,957,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2954,'COLORLESS_VOW','Colorless Vow','Colorless Vow',110,19194,0,1939,1881,1,1478,2121,95,41,84,35,60,20,85,15,10,12,1,1,69,0x3885,350,0,500,0,0,0,0,0,0,0,0,6672,1000,958,3500,1063,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2955,'OLD_FRIENDSHIP','Old Friendship','Old Friendship',110,12614,0,1306,1328,0,1147,1638,78,5,56,12,19,11,30,10,10,12,1,1,49,0x3885,250,2460,912,0,0,0,0,0,0,0,0,6672,1000,932,3500,1098,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2956,'SWEET_SLAUGHTER','Sweet Slaughter','Sweet Slaughter',110,13986,0,1960,1587,0,1216,1709,125,10,121,48,40,31,125,32,10,12,2,1,29,0x3885,350,1538,1000,396,0,0,0,0,0,0,0,6672,1000,929,2000,682,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2957,'FORGOTTEN_NAME','Forgotten Name','Forgotten Name',120,19546,1,1505,1485,2,1093,1520,111,38,121,29,51,43,100,3,10,12,1,1,49,0x3885,155,1169,1152,480,0,0,0,0,0,0,0,6672,1500,682,5000,683,5000,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2958,'FATAL_DAYS','Fatal Days','Fatal Days',120,24240,1,2052,2026,2,1025,1428,72,15,100,71,63,85,115,37,10,12,1,6,67,0x2003885,190,720,384,480,0,0,0,0,0,0,0,6672,1500,1050,2500,1038,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +REPLACE INTO `mob_db_re` VALUES (2959,'TORTUROUS_REDEEMER','Torturous Redeemer','Torturous Redeemer',120,103342,0,10590,8378,0,1253,1753,144,28,133,69,72,55,165,44,10,12,1,7,62,0x3885,200,672,420,360,0,0,0,0,0,0,0,6672,10000,6672,10000,923,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0); #2960,MM_FLAMECROSS -#2961,E_TORTUROUS_REDEEMER +REPLACE INTO `mob_db_re` VALUES (2961,'E_TORTUROUS_REDEEMER','Torturous Redeemer','Torturous Redeemer',120,103342,1,10590,8378,1,1253,1753,144,28,133,69,72,55,165,44,10,12,1,7,62,0x3885,200,672,420,360,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); #2962,E_DEVILING #2963,WOODIE #2964,EXP_1000 From 165197d26f783f49b2ddd8fbae9abd517d6ffa09 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Wed, 16 Aug 2017 09:40:38 +0200 Subject: [PATCH 111/124] Fixed cast time for the npcskill script command Fixes #2342 Thanks to @Atemo --- src/map/script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/script.c b/src/map/script.c index 2d2146c123..ea5309eede 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -21070,9 +21070,9 @@ BUILDIN_FUNC(npcskill) status_calc_npc(nd, SCO_NONE); if (skill_get_inf(skill_id)&INF_GROUND_SKILL) - unit_skilluse_pos(&nd->bl, sd->bl.x, sd->bl.y, skill_id, skill_level); + unit_skilluse_pos2(&nd->bl, sd->bl.x, sd->bl.y, skill_id, skill_level,0,0); else - unit_skilluse_id(&nd->bl, sd->bl.id, skill_id, skill_level); + unit_skilluse_id2(&nd->bl, sd->bl.id, skill_id, skill_level,0,0); return SCRIPT_CMD_SUCCESS; } From 4cb4d60feedc4552e69e8e8fc2b917569d11cb6b Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Wed, 16 Aug 2017 11:33:35 +0200 Subject: [PATCH 112/124] Fixed return value of unitattack for players Fixes #2345 Thanks to @anacondaqq --- doc/script_commands.txt | 9 +++++++-- src/map/script.c | 15 +++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index d89bb0a889..6046c5a0ea 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -7356,12 +7356,17 @@ Examples: *unitattack <GID>,<Target ID>{,<action type>}; *unitattack <GID>,"<Target Name>"{,<action type>}; -This command will make a <GID> attack the specified target. It returns 1 upon -success and 0 for all failures. +This command will make a <GID> attack the specified target. It returns true upon +success and false for all failures. If <GID> is a player and a non-zero <action type> is given, the unit will perform a continuous attack instead of a single attack. +Note: +Using unitattack with <GID> 0 means that it will use the currently attached unit. +For players any attack requests will fail, because talking to an NPC prevents attacking a monster. +Therefore you need to detach the player from the NPC before using this command. + --------------------------------------- *unitkill <GID>; diff --git a/src/map/script.c b/src/map/script.c index ea5309eede..419c7e7e07 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -18316,7 +18316,7 @@ BUILDIN_FUNC(unitattack) int actiontype = 0; if (!script_rid2bl(2,unit_bl)) { - script_pushint(st, 0); + script_pushint(st, false); return SCRIPT_CMD_FAILURE; } @@ -18331,7 +18331,7 @@ BUILDIN_FUNC(unitattack) target_bl = map_id2bl(conv_num(st, data)); if (!target_bl) { - script_pushint(st, 0); + script_pushint(st, false); return SCRIPT_CMD_FAILURE; } @@ -18339,10 +18339,13 @@ BUILDIN_FUNC(unitattack) actiontype = script_getnum(st,4); switch(unit_bl->type) { - case BL_PC: - clif_parse_ActionRequest_sub(((TBL_PC *)unit_bl), actiontype > 0 ? 0x07 : 0x00, target_bl->id, gettick()); - script_pushint(st, 1); + case BL_PC: { + struct map_session_data* sd = (struct map_session_data*)unit_bl; + + clif_parse_ActionRequest_sub(sd, actiontype > 0 ? 0x07 : 0x00, target_bl->id, gettick()); + script_pushint(st, sd->ud.target == target_bl->id); return SCRIPT_CMD_SUCCESS; + } case BL_MOB: ((TBL_MOB *)unit_bl)->target_id = target_bl->id; break; @@ -18351,7 +18354,7 @@ BUILDIN_FUNC(unitattack) break; default: ShowError("buildin_unitattack: Unsupported source unit type %d.\n", unit_bl->type); - script_pushint(st, 0); + script_pushint(st, false); return SCRIPT_CMD_FAILURE; } From d319ff7ca5e8268ba79713fac45019e1e3923020 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Wed, 16 Aug 2017 13:50:13 +0200 Subject: [PATCH 113/124] Fixed character creation for expired VIP accounts Fixes #2333 Thanks to @Everade --- src/char/char.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/char/char.cpp b/src/char/char.cpp index 91a2cdaf86..93ff81a38d 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -1428,12 +1428,16 @@ int char_make_new_char_sql(struct char_session_data* sd, char* name_, int str, i return -2; // invalid input #endif - // check the number of already existing chars in this account if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `account_id` = '%d'", schema_config.char_db, sd->account_id) ) Sql_ShowDebug(sql_handle); +#ifdef VIP_ENABLE + if( Sql_NumRows(sql_handle) >= MAX_CHARS ) + return -2; // character account limit exceeded +#else if( Sql_NumRows(sql_handle) >= sd->char_slots ) return -2; // character account limit exceeded +#endif // check char slot if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' LIMIT 1", schema_config.char_db, sd->account_id, slot) ) From b9627dd879634b5c9d828e4717b15f98096a4b11 Mon Sep 17 00:00:00 2001 From: aleos89 <aleos89@users.noreply.github.com> Date: Wed, 16 Aug 2017 13:52:10 -0400 Subject: [PATCH 114/124] Resolved non-weapon items having a weapon level * Fixes #2343. * Removed all weapon level values from non-weapons in the renewal item database. Thanks to @admkakaroto! --- db/re/item_db.txt | 152 +++++++++++++++++++++++----------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 807efe961c..b118a34151 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -1380,11 +1380,11 @@ 2175,Esprit_Shield,Spirit Shield,4,20,,1300,,50,,1,0xFFFFFFFF,63,2,32,,65,1,3,{},{},{} 2176,Dark_Book,Black Book,4,20,,500,,80,,1,0xFFFFFFFF,63,2,32,,65,1,5,{ bonus bMdef,5; .@r = getrefine(); bonus3 bAutoSpellWhenHit,"NPC_DRAGONFEAR",1,(.@r<=6)?(10):((.@r<=8)?(20):(30)); },{},{} 2177,Shield_Of_Death,Shield Of Death,4,20,,2000,,150,,1,0xFFFFFFFF,63,2,32,,90,1,3,{ bonus2 bAddClass,Class_Boss,2; bonus2 bMagicAddClass,Class_Boss,2; bonus2 bSubClass,Class_Normal,-10; },{},{} -2178,TE_Woe_Buckler,TE Woe Buckler,4,0,,0,,15,,0,0xFFFFFFFF,63,2,32,1,40,1,2,{ bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15; },{},{} -2179,TE_Woe_Shield,TE Woe Shield,4,0,,0,,25,,0,0x000444A2,63,2,32,1,40,1,3,{ bonus bMdef,5; bonus bMaxHP,200; bonus2 bSubRace,RC_Player,20; },{},{} -2180,TE_Woe_Magic_Guard,TE Woe Magic Guard,4,0,,0,,5,,0,0x00818315,63,2,32,1,40,1,1,{ bonus bMdef,25; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,10; },{},{} +2178,TE_Woe_Buckler,TE Woe Buckler,4,0,,0,,15,,0,0xFFFFFFFF,63,2,32,,40,1,2,{ bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15; },{},{} +2179,TE_Woe_Shield,TE Woe Shield,4,0,,0,,25,,0,0x000444A2,63,2,32,,40,1,3,{ bonus bMdef,5; bonus bMaxHP,200; bonus2 bSubRace,RC_Player,20; },{},{} +2180,TE_Woe_Magic_Guard,TE Woe Magic Guard,4,0,,0,,5,,0,0x00818315,63,2,32,,40,1,1,{ bonus bMdef,25; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,10; },{},{} 2181,Hervor,Hervor,4,10,,1500,,100,,0,0xFFFFFFFF,63,2,32,,1,,2,{ bonus bMdef,5; bonus2 bSubRace,RC_All,30; bonus bUnbreakableArmor,1; },{},{} -2182,Hervor_Alvitr,Hervor Alvitr,4,0,,3000,,150,,0,0x000FDF80,56,2,32,1,100,0,2,{ bonus bMdef,10; bonus bVit,20; bonus2 bSubRace,RC_All,30; bonus bUnbreakableShield,1; autobonus2 "{ sc_end SC_STUN; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_STONE; sc_end SC_POISON; sc_end SC_BLIND; sc_end SC_SILENCE; sc_end SC_BLEEDING; sc_end SC_CONFUSION; sc_end SC_FREEZE; bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Sleep,10000; bonus2 bResEff,Eff_Curse,10000; bonus2 bResEff,Eff_Stone,10000; bonus2 bResEff,Eff_Poison,10000; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Silence,10000; bonus2 bResEff,Eff_Bleeding,10000; bonus2 bResEff,Eff_Confusion,10000; bonus2 bResEff,Eff_Freeze,10000; }",10,60000,BF_SHORT; },{},{} +2182,Hervor_Alvitr,Hervor Alvitr,4,0,,3000,,150,,0,0x000FDF80,56,2,32,,100,0,2,{ bonus bMdef,10; bonus bVit,20; bonus2 bSubRace,RC_All,30; bonus bUnbreakableShield,1; autobonus2 "{ sc_end SC_STUN; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_STONE; sc_end SC_POISON; sc_end SC_BLIND; sc_end SC_SILENCE; sc_end SC_BLEEDING; sc_end SC_CONFUSION; sc_end SC_FREEZE; bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Sleep,10000; bonus2 bResEff,Eff_Curse,10000; bonus2 bResEff,Eff_Stone,10000; bonus2 bResEff,Eff_Poison,10000; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Silence,10000; bonus2 bResEff,Eff_Bleeding,10000; bonus2 bResEff,Eff_Confusion,10000; bonus2 bResEff,Eff_Freeze,10000; }",10,60000,BF_SHORT; },{},{} 2183,Impr_Angel's_Safeguard,Advanced Angelic Guard,4,10000,,400,,30,,1,0x00000001,63,2,32,,99,1,1,{ bonus2 bSubRace,RC_Demon,5; bonus2 bSubEle,Ele_All,5; bonus2 bSubEle,Ele_Neutral,-5; },{},{} 2185,Magic_Reflect,Magic Reflect,4,10,,1000,,50,,1,0xFFFFFFFF,63,2,32,,99,1,3,{ bonus bMdef,10; bonus bMagicDamageReturn,3+((getrefine()>=9) ? 3 : 0); },{},{} 2186,Great_Encyclopedia_Revision,Great Encyclopedia Revision,4,10,,200,0:5,50,,1,0x00810100,63,2,32,,99,1,4,{ bonus bInt,3; bonus bDex,2; .@r = getrefine(); bonus bCritical,3+((.@r >= 7) ? 2 : 0); if(.@r >= 9) bonus bMatk,5; },{},{} @@ -1392,7 +1392,7 @@ 2188,Svalinn_J,Svalinn,4,10,,500,,80,,1,0xFFFFFFFF,63,2,32,,65,1,3,{ .@r = getrefine(); bonus bMaxHP,9+.@r/3; bonus2 bAddEle,Ele_Water,4+.@r/3*5; },{},{} 2189,Mad_Bunny,Mad Bunny Shield,4,10,,100,,40,,1,0xFFFFFFFF,63,2,32,,30,1,6,{ bonus2 bSubEle,Ele_All,5; bonus bMdef,6; bonus bDex,1; },{},{} 2190,Ancient_Shield_Of_Aeon,Ancient Shield Of Aeon,4,0,,200,,5,,0,0x000FDF80,63,2,32,,130,1,2,{ bonus2 bSubEle,Ele_Neutral,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus2 bSubEle,Ele_Ghost,10; bonus bMaxHP,500; bonus bMaxSP,50; if(getrefine()>=14) skill "MG_STONECURSE",5; },{},{} -2195,Lian_Shield,Lian Shield,4,0,,1300,,50,,1,0xFFFFFFFF,63,2,32,1,65,1,,{ bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5; },{},{} +2195,Lian_Shield,Lian Shield,4,0,,1300,,50,,1,0xFFFFFFFF,63,2,32,,65,1,,{ bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5; },{},{} 2196,White_Gold_Shield,White Gold Shield,4,0,,1800,,140,,1,0xFFFFFFFF,63,2,32,,,1,,{ autobonus2 "{ bonus bMagicDamageReturn,20; }",100,2000,BF_MAGIC; /* Confirm: Success rate? */ },{},{} 2198,Lapine_Shield,Lapine Shield,4,0,,1000,,25,,1,0xFFFFFFFF,63,2,32,,100,1,,{ bonus bMdef,10; if (getrefine() > 7) { bonus bMatk,20; } },{},{} // GM Shield @@ -1698,9 +1698,9 @@ 2493,Goibne's_Combat_Boots_,Goibne's Greaves,4,30000,,700,,13,,1,0xFFFFFFFE,63,2,64,,54,1,0,{ bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5; },{},{} 2494,Chrystal_Pumps_,Crystal Pumps,4,20,,100,,5,,1,0xFFFFFFFE,63,0,64,,0,1,0,{ bonus bMdef,10; bonus bLuk,5; },{},{} 2495,Egir_Shoes,Egir Shoes,4,200000,,300,,13,,1,0xFFFFFFFF,63,2,64,,110,1,0,{ if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,BaseLevel*5; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,JobLevel*2; },{},{} -2496,TE_Woe_Shoes,TE Woe Shoes,4,0,,0,,5,,0,0xFFFFFFFF,63,2,64,0,40,1,,{ bonus bMdef,5; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{} -2497,TE_Woe_Boots,TE Woe Boots,4,0,,0,,10,,0,0x000444A2,63,2,64,0,40,1,,{ bonus bMaxHP,200; bonus bMaxSP,100; bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} -2498,TE_Woe_Magic_Sandal,TE Woe Magic Sandal,4,0,,0,,5,,0,0x00818315,63,2,64,1,40,1,,{ bonus bMdef,5; bonus bMaxHP,100; bonus bMaxSP,200; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{} +2496,TE_Woe_Shoes,TE Woe Shoes,4,0,,0,,5,,0,0xFFFFFFFF,63,2,64,,40,1,,{ bonus bMdef,5; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{} +2497,TE_Woe_Boots,TE Woe Boots,4,0,,0,,10,,0,0x000444A2,63,2,64,,40,1,,{ bonus bMaxHP,200; bonus bMaxSP,100; bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} +2498,TE_Woe_Magic_Sandal,TE Woe Magic Sandal,4,0,,0,,5,,0,0x00818315,63,2,64,,40,1,,{ bonus bMdef,5; bonus bMaxHP,100; bonus bMaxSP,200; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{} 2499,Temporal_Boots,Temporal Boots,4,400,,600,,20,,0,0xFFFFFFFF,63,2,64,,10,1,,{ .@r = getrefine(); bonus bMaxHP,300; bonus bMaxSP,30; bonus bMaxHP,100*(.@r/3); bonus bMaxSP,10*(.@r/3); },{},{} //=================================================================== // Garments @@ -2137,15 +2137,15 @@ 2941,Gunslinger_Manual,Gunslinger Manual,4,0,,100,,0,,0,0x00000001,63,2,136,,0,0,0,{ bonus bMaxSP,100; skill "GS_GLITTERING",1; skill "GS_ADJUSTMENT",1; skill "GS_MADNESSCANCEL",1; skill "GS_INCREASING",1; },{},{} 2942,Taekwon_Manual,Taekwon Manual,4,0,,100,,0,,0,0x00000001,63,2,136,,0,0,0,{ bonus bMaxSP,100; skill "TK_SEVENWIND",4; skill "TK_JUMPKICK",5; },{},{} 2943,Critical_Ring_,Critical Ring,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,,0,,{ bonus bCritical,5;},{},{} -2944,TE_Ring_Of_Protection,TE Ring Of Protection,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,1,40,0,,{ bonus bMaxHP,100; bonus2 bSubRace,RC_Player,5; },{},{} -2945,TE_Ring_Of_Rage,TE Ring Of Rage,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,1,40,0,,{ bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; },{},{} -2946,TE_Ring_Of_Defiance,TE Ring Of Defiance,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,1,40,0,,{ bonus bMdef,5; bonus2 bSubRace,RC_Player,5; },{},{} +2944,TE_Ring_Of_Protection,TE Ring Of Protection,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,,40,0,,{ bonus bMaxHP,100; bonus2 bSubRace,RC_Player,5; },{},{} +2945,TE_Ring_Of_Rage,TE Ring Of Rage,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,,40,0,,{ bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; },{},{} +2946,TE_Ring_Of_Defiance,TE Ring Of Defiance,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,,40,0,,{ bonus bMdef,5; bonus2 bSubRace,RC_Player,5; },{},{} 2948,Demon_Wing,Demon Wing,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,70,,,{ bonus bFlee,5; },{},{} 2949,Silversmith_Bracelet,Silversmith Bracelet,4,10,,100,,3,,1,0xFFFFFFFF,63,2,136,,60,,,{ bonus bAllStats,1; bonus bMdef,3; skill "SA_SPELLBREAKER",5; },{},{} -2950,Rune_Ring,Rune Ring,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,1,1,0,,{ bonus2 bExpAddClass,Class_Normal,10; },{},{} -2951,Kvasir_Ring_Blue,Kvasir Ring Blue,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,1,1,0,,{ bonus bMaxSP,30; skill "ECL_SNOWFLIP",1; },{},{} -2952,Kvasir_Ring_Red,Kvasir Ring Red,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,1,1,0,,{ bonus bMaxSP,30; skill "ECL_PEONYMAMY",1; },{},{} -2953,Kvasir_Ring_Green,Kvasir Ring Green,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,1,1,0,,{ bonus bMaxHP,100; skill "ECL_SADAGUI",1; },{},{} +2950,Rune_Ring,Rune Ring,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus2 bExpAddClass,Class_Normal,10; },{},{} +2951,Kvasir_Ring_Blue,Kvasir Ring Blue,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bMaxSP,30; skill "ECL_SNOWFLIP",1; },{},{} +2952,Kvasir_Ring_Red,Kvasir Ring Red,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bMaxSP,30; skill "ECL_PEONYMAMY",1; },{},{} +2953,Kvasir_Ring_Green,Kvasir Ring Green,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bMaxHP,100; skill "ECL_SADAGUI",1; },{},{} 2954,Kvasir_Ring_Brown,Kvasir Ring Brown,4,10,,100,,,,0,0xFFFFFFFF,63,2,136,,1,,,{ bonus bMaxHP,100; },{},{} 2956,Safety_Ring_,Advanced Safety Ring,4,75000,,100,,10,,1,0xFFFFFFFE,63,2,136,,50,0,0,{ bonus bMdef,5; bonus bAllStats,1; },{},{} 2957,Good_Ring_Of_Flame_Lord,Advanced Ring Of Flame Lord,4,20,,100,,0,,0,0x7CCFDF80,63,2,136,,85,0,0,{ bonus bStr,3; bonus bVit,2; bonus bBaseAtk,20; bonus2 bSubEle,Ele_Fire,10; bonus3 bAutoSpell,"CH_SOULCOLLECT",1,30; bonus3 bAutoSpell,"MO_EXPLOSIONSPIRITS",1,10; bonus3 bAutoSpell,"PA_PRESSURE",2,30; bonus3 bAutoSpell,"MG_FIREBALL",1,150; bonus3 bAutoSpell,"KN_BOWLINGBASH",5,20; },{},{} @@ -2178,7 +2178,7 @@ 2995,Supplement_Part_Dex,Supplement Part Dex,4,25000,,100,,0,,1,0x00000400,56,2,136,,100,0,0,{ bonus bUseSPrate,-10; bonus bDelayrate,-10; bonus bVariableCastrate,-10; bonus2 bSkillVariableCast,"NC_AXEBOOMERANG",-2000; },{},{} 2996,Reinforced_Parts_Gun_Barrel,Reinforced Parts - Gun Barrel,4,10,,500,,,,1,0xFFFFFFFF,63,2,136,,100,,,{ bonus2 bAddClass,Class_All,4; bonus bHit,10; bonus2 bSkillAtk,"NC_BOOSTKNUCKLE",25; },{},{} 2997,RWC_Gold_Brooch,RWC Gold Brooch,4,10,,200,,0,,1,0xFFFFFFFF,63,2,136,,0,0,,{ bonus bBaseAtk,25; bonus bMatk,20; },{},{} -2998,Shining_Trapezohedron,Shining Trapezohedron,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,1,90,1,,{ bonus2 bSubEle,Ele_Holy,10; },{},{} +2998,Shining_Trapezohedron,Shining Trapezohedron,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,90,1,,{ bonus2 bSubEle,Ele_Holy,10; },{},{} 2999,RWC_Brooch,RWC Brooch,4,10,,200,,0,,0,0xFFFFFFFF,63,2,136,,0,0,,{ bonus bMaxHP,300; bonus bMaxSP,30; },{},{} //=================================================================== // Cards @@ -4006,23 +4006,23 @@ 5894,RCC2013_3RD_CROWN,RCC2013 3RD CROWN,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1108,{ bonus bAllStats,3; skill "AL_TELEPORT",1; },{ sc_start SC_SPEEDUP0,-1,25; },{ sc_end SC_SPEEDUP0; } 5895,RCC2013_ANV_Hat,RCC2013 ANV Hat,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1109,{ bonus bAllStats,1; bonus2 bAddClass,Class_All,2; bonus bMatkRate,2; },{},{} 5906,Oni_Horns_,Oni Horns,4,0,,20,,10,,1,0x00001000,63,2,256,,100,1,1127,{ bonus2 bSkillAtk,"GC_COUNTERSLASH",(10*getskilllv("GC_WEAPONBLOCKING")); .@r = getrefine(); if(.@r > 6){ bonus bAtk,20; bonus bHit,5; } if(.@r > 9){ bonus3 bAutoSpell,"GC_CROSSIMPACT",1,10; } },{},{} -5914,C_Flutter_Butterfly,C Flutter Butterfly,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,1,1,0,1378,{ hateffect HAT_EF_FLUTTER_BUTTERFLY,true; },{},{ hateffect HAT_EF_FLUTTER_BUTTERFLY,false; } -5917,Yellow_Scarf,Yellow Scarf,4,0,,100,,,,0,0xFFFFFFFF,63,2,1,0,90,0,1170,{ bonus bLongAtkDef,3; },{},{} +5914,C_Flutter_Butterfly,C Flutter Butterfly,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,0,1378,{ hateffect HAT_EF_FLUTTER_BUTTERFLY,true; },{},{ hateffect HAT_EF_FLUTTER_BUTTERFLY,false; } +5917,Yellow_Scarf,Yellow Scarf,4,0,,100,,,,0,0xFFFFFFFF,63,2,1,,90,0,1170,{ bonus bLongAtkDef,3; },{},{} 5918,Gambler_Seal,Gambler Seal,4,0,,500,,,,0,0xFFFFFFFF,63,2,512,,,0,1202,{ bonus bCritical,3; bonus bCritAtkRate,3; bonus2 bSubSkill,"RA_ARROWSTORM",10; bonus2 bSubSkill,"SR_GATEOFHELL",10; .@dex = readparam(bDex); .@luk = readparam(bLuk); bonus bCritAtkRate,-(.@dex/10)*2; bonus bCritical,.@luk/10; bonus bBaseAtk,(.@luk/10)*2; bonus bMatk,(.@luk/10)*2; if (.@luk > 120) { bonus bCritical,10; bonus bCritAtkRate,10; bonus2 bSubSkill,"RA_ARROWSTORM",30; bonus2 bSubSkill,"SR_GATEOFHELL",30; } else if (.@luk > 108) { bonus bCritical,5; bonus bCritAtkRate,10; } },{},{} -5919,Camellia_Hair_Pin,Camellia Hair Pin,4,0,,1000,,,,1,0xFFFFFFFF,63,2,256,0,50,1,1203,{ bonus bMdef,20; bonus3 bAutoSpell,"AL_PNEUMA",1,30+getrefine()*5; /* CONFIRM The Rate*/ },{},{} +5919,Camellia_Hair_Pin,Camellia Hair Pin,4,0,,1000,,,,1,0xFFFFFFFF,63,2,256,,50,1,1203,{ bonus bMdef,20; bonus3 bAutoSpell,"AL_PNEUMA",1,30+getrefine()*5; /* CONFIRM The Rate*/ },{},{} 5920,Medical_Boots,Medical Boots,4,0,,300,,10,,0,0xFFFFFFFF,63,2,64,,10,1,,{ .@r = getrefine(); bonus bHealPower,10+((.@r/2) * 2); bonus2 bSkillUseSP,"AB_CHEAL",(.@r * 5); },{},{} -5943,Owlviscount_Silk_Hat,Owl Viscount Silk Hat,4,0,,500,,15,,1,0xFFFFFFFF,63,2,256,0,70,1,1323,{ bonus bInt,1; bonus bAspdRate,10; .@r = getrefine(); bonus bMatk,7*.@r; autobonus "{ .@r = getrefine(); bonus bAspdRate,(.@r >= 9 ? 40 : ((.@r >= 7) ? 10 : ((.@r >= 5) ? 5 : 1))); }",.@r*20,30000,BF_MAGIC,"{ specialeffect2 EF_SPELLBREAKER }"; },{},{} -5966,KarduiEar,KarduiEar,4,0,,300,,,,0,0xFFFFFFFF,63,2,512,0,70,0,1357,{ .@dex = readparam(bDex); bonus bMatk,(.@dex > 10) ? .@dex/10*2 : 0; if (.@dex > 107) { bonus bVariableCastrate,-10; bonus bMatk,60; } if (.@dex > 119) { bonus bVariableCastrate,-5; bonus bMatk,100; } },{},{} -5967,Flying Galapago,Flying Galapago,4,0,,500,,,,0,0xFFFFFFFF,63,2,1,0,110,0,1358,{ bonus bAgi,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*40; },{},{} -5968,DVAngelNurseCap,DVAngelNurseCap,4,0,,500,,10,,1,0xFFFFFFFF,63,2,256,0,50,1,1359,{ if (BaseClass == Job_Acolyte) bonus bHealPower,3; bonus bNoCastCancel,1; .@r = getrefine(); bonus bHealPower,(.@r > 8) ? 12 : ((.@r > 6) ? 9 : ((.@r > 4) ? 6 : 0)); },{},{} -5969,QueenAnzRevenge,QueenAnzRevenge,4,0,,400,,7,,1,0xFFFFFFFF,63,2,256,0,100,1,1360,{ bonus bStr,5; .@r = getrefine(); bonus2 bAddClass,Class_All,7+(.@r > 8 ? 4 : (.@r > 6 ? 3 : (.@r > 4 ? 2 : 0))); bonus bNoSizeFix,1; },{},{} -5971,Moon_Eyepatch,Moon Eyepatch,4,0,,100,,,,1,0xFFFFFFFF,63,2,512,0,10,0,1370,{ bonus2 bSubEle,Ele_Water,5; },{},{} -5972,Chatty_Parrot,Chatty Parrot,4,0,,100,,,,0,0xFFFFFFFF,63,2,1,0,80,0,1116,{ bonus bMatkRate,BaseLevel/50; bonus bVariableCast,-readparam(bInt)/30; },{},{} -5973,Ancient_Elven_Ear_J,Ancient Elven Ear J,4,0,,200,,,,0,0xFFFFFFFF,63,2,512,0,70,0,665,{ bonus bLuk,10; bonus bMdef,10; bonus bFlee2,2; },{},{} -5978,Syringe_Toy,Toy Syringe,4,0,,100,,3,,0,0xFFFFFFFF,63,2,1,1,70,0,842,{ bonus bMdef,3; bonus2 bAddItemHealRate,545,150; bonus2 bAddItemHealRate,546,150; bonus2 bAddItemHealRate,547,150; },{},{} -5979,C_Angel_Fluttering,C Angel Fluttering,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,0,1,0,1380,{ hateffect HAT_EF_ANGEL_FLUTTERING,true; },{},{ hateffect HAT_EF_ANGEL_FLUTTERING,false; } -5980,C_Classical_Fhat,C Classical Fhat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,0,1,0,1381,{},{},{} -5985,Noble_Mask,Noble Mask,4,0,,200,,,,0,0xFFFFFFFF,63,2,256,0,30,0,1409,{ bonus2 bSkillAtk,"PA_SACRIFICE",BaseLevel*2; bonus2 bSkillVariableCast,"PA_PRESSURE",-2000; bonus2 bSkillVariableCast,"CR_DEVOTION",-2000; if (BaseLevel > 149) { bonus bMaxHPrate,3; bonus bAspdRate,3; } else if (BaseLevel > 99) { bonus bMaxHPrate,2; bonus bAspdRate,2; } else { bonus bMaxHPrate,1; bonus bAspdRate,1; } },{},{} +5943,Owlviscount_Silk_Hat,Owl Viscount Silk Hat,4,0,,500,,15,,1,0xFFFFFFFF,63,2,256,,70,1,1323,{ bonus bInt,1; bonus bAspdRate,10; .@r = getrefine(); bonus bMatk,7*.@r; autobonus "{ .@r = getrefine(); bonus bAspdRate,(.@r >= 9 ? 40 : ((.@r >= 7) ? 10 : ((.@r >= 5) ? 5 : 1))); }",.@r*20,30000,BF_MAGIC,"{ specialeffect2 EF_SPELLBREAKER }"; },{},{} +5966,KarduiEar,KarduiEar,4,0,,300,,,,0,0xFFFFFFFF,63,2,512,,70,0,1357,{ .@dex = readparam(bDex); bonus bMatk,(.@dex > 10) ? .@dex/10*2 : 0; if (.@dex > 107) { bonus bVariableCastrate,-10; bonus bMatk,60; } if (.@dex > 119) { bonus bVariableCastrate,-5; bonus bMatk,100; } },{},{} +5967,Flying Galapago,Flying Galapago,4,0,,500,,,,0,0xFFFFFFFF,63,2,1,,110,0,1358,{ bonus bAgi,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*40; },{},{} +5968,DVAngelNurseCap,DVAngelNurseCap,4,0,,500,,10,,1,0xFFFFFFFF,63,2,256,,50,1,1359,{ if (BaseClass == Job_Acolyte) bonus bHealPower,3; bonus bNoCastCancel,1; .@r = getrefine(); bonus bHealPower,(.@r > 8) ? 12 : ((.@r > 6) ? 9 : ((.@r > 4) ? 6 : 0)); },{},{} +5969,QueenAnzRevenge,QueenAnzRevenge,4,0,,400,,7,,1,0xFFFFFFFF,63,2,256,,100,1,1360,{ bonus bStr,5; .@r = getrefine(); bonus2 bAddClass,Class_All,7+(.@r > 8 ? 4 : (.@r > 6 ? 3 : (.@r > 4 ? 2 : 0))); bonus bNoSizeFix,1; },{},{} +5971,Moon_Eyepatch,Moon Eyepatch,4,0,,100,,,,1,0xFFFFFFFF,63,2,512,,10,0,1370,{ bonus2 bSubEle,Ele_Water,5; },{},{} +5972,Chatty_Parrot,Chatty Parrot,4,0,,100,,,,0,0xFFFFFFFF,63,2,1,,80,0,1116,{ bonus bMatkRate,BaseLevel/50; bonus bVariableCast,-readparam(bInt)/30; },{},{} +5973,Ancient_Elven_Ear_J,Ancient Elven Ear J,4,0,,200,,,,0,0xFFFFFFFF,63,2,512,,70,0,665,{ bonus bLuk,10; bonus bMdef,10; bonus bFlee2,2; },{},{} +5978,Syringe_Toy,Toy Syringe,4,0,,100,,3,,0,0xFFFFFFFF,63,2,1,,70,0,842,{ bonus bMdef,3; bonus2 bAddItemHealRate,545,150; bonus2 bAddItemHealRate,546,150; bonus2 bAddItemHealRate,547,150; },{},{} +5979,C_Angel_Fluttering,C Angel Fluttering,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,0,1380,{ hateffect HAT_EF_ANGEL_FLUTTERING,true; },{},{ hateffect HAT_EF_ANGEL_FLUTTERING,false; } +5980,C_Classical_Fhat,C Classical Fhat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,0,1381,{},{},{} +5985,Noble_Mask,Noble Mask,4,0,,200,,,,0,0xFFFFFFFF,63,2,256,,30,0,1409,{ bonus2 bSkillAtk,"PA_SACRIFICE",BaseLevel*2; bonus2 bSkillVariableCast,"PA_PRESSURE",-2000; bonus2 bSkillVariableCast,"CR_DEVOTION",-2000; if (BaseLevel > 149) { bonus bMaxHPrate,3; bonus bAspdRate,3; } else if (BaseLevel > 99) { bonus bMaxHPrate,2; bonus bAspdRate,2; } else { bonus bMaxHPrate,1; bonus bAspdRate,1; } },{},{} //=================================================================== // More Etc Items //=================================================================== @@ -8605,11 +8605,11 @@ 15059,2011Love_Daddy,2011Love Daddy,4,20,,100,0,80,0,1,0xFFFFFFFF,63,2,16,,0,1,0,{},{},{} 15060,Sky_Blue_Smock,Sky Blue Smock,4,20,,300,0,1,0,1,0xFFFFFFFF,63,2,16,,0,1,0,{},{},{} 15061,Egir_Armor,Egir Armor,4,200000,,2600,,55,,1,0xFFFFFFFF,63,2,16,,110,1,0,{ bonus bAllStats,1; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000; },{},{} -15062,TE_Woe_Coat,TE Woe Coat,4,0,,0,,15,,0,0xFFFFFFFF,63,2,16,0,40,1,,{ bonus bMdef,15; bonus bMaxHP,250; bonus bMaxSP,250; bonus2 bSubRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} -15063,TE_Woe_Chain_Mail,TE Woe Chain Mail,4,0,,0,,25,,0,0x000444A2,63,2,16,0,40,1,,{ bonus bMdef,5; bonus bMaxHP,450; bonus bMaxSP,50; bonus2 bSubRace,RC_Player,15; bonus2 bResEff,Eff_Freeze,25; },{},{} -15064,TE_Woe_Mage_Coat,TE Woe Mage Coat,4,0,,0,,5,,0,0x00818315,63,2,16,0,40,1,,{ bonus bMdef,25; bonus bMaxHP,200; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{} +15062,TE_Woe_Coat,TE Woe Coat,4,0,,0,,15,,0,0xFFFFFFFF,63,2,16,,40,1,,{ bonus bMdef,15; bonus bMaxHP,250; bonus bMaxSP,250; bonus2 bSubRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} +15063,TE_Woe_Chain_Mail,TE Woe Chain Mail,4,0,,0,,25,,0,0x000444A2,63,2,16,,40,1,,{ bonus bMdef,5; bonus bMaxHP,450; bonus bMaxSP,50; bonus2 bSubRace,RC_Player,15; bonus2 bResEff,Eff_Freeze,25; },{},{} +15064,TE_Woe_Mage_Coat,TE Woe Mage Coat,4,0,,0,,5,,0,0x00818315,63,2,16,,40,1,,{ bonus bMdef,25; bonus bMaxHP,200; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{} 15066,Engraved_Plate_Armor,Engraved Plate Armor,4,100000,,3000,,120,,1,0x00004082,63,2,16,,150,1,,{ bonus bMdef,25; },{},{} -15067,Rune_Suit,Rune Suit,4,0,,0,,,,0,0xFFFFFFFF,63,2,16,0,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{} +15067,Rune_Suit,Rune Suit,4,0,,0,,,,0,0xFFFFFFFF,63,2,16,,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{} 15068,Im_Angel's_Protection,Advanced Angelic Protection,4,10000,,600,,40,,1,0x00000001,63,2,16,,99,1,0,{ bonus bMdef,30; },{},{} 15069,Suit_Of_Sid,Suit Of Sid,4,20,,1000,,30,,0,0xFFFFFFFF,63,2,16,,0,1,0,{},{},{} 15070,Clothes_of_Happiness,Clothes of Happiness,4,10,,1000,,5,,1,0xFFFFFFFF,63,2,16,,1,1,,{ bonus bMdef,5; bonus bLuk,getrefine(); },{},{} @@ -9666,10 +9666,10 @@ 18728,Egir_Helm,Egir Helm,4,200000,,800,,10,,1,0xFFFFFFFF,63,2,256,,110,1,870,{ bonus bMdef,5; bonus bUnbreakableHelm,1; },{},{} 18729,MVP_Basketball,MVP Basketball,4,20,,150,,6,,1,0xFFFFFFFF,63,2,256,,1,1,871,{ bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10; bonus2 bAddItemHealRate,522,30; .@r = getrefine(); bonus bVariableCastrate,(.@r>=12)?(-5):((.@r>=10)?(-4):(-3)); },{},{} 18730,Cryptura_Academy_Hat,Cryptura Academy Hat,4,0,,200,,2,,1,0xFFFFFFFF,63,2,256,,0,1,872,{ bonus bMaxHP,15; bonus bMaxSP,5; },{},{} -18732,TE_Woe_Cap,TE Woe Cap,4,0,,0,,5,,0,0xFFFFFFFF,63,2,256,0,40,1,14,{ bonus bMdef,5; bonus bBaseAtk,5; bonus bMatk,5; bonus2 bAddRace,RC_Player,10; bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} -18733,TE_Woe_Bone_Helm,TE Woe Bone Helm,4,0,,0,,10,,0,0x000444A2,63,2,256,0,40,1,103,{ bonus bBaseAtk,10; bonus2 bAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25; },{},{} -18734,TE_Woe_Magic_Eyes,TE Woe Magic Eyes,4,0,,0,,5,,0,0x00818315,63,2,256,0,40,1,209,{ bonus bMdef,5; bonus bMatk,10; bonus2 bMagicAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25; },{},{} -18736,Censor_Bar_,Censor Bar,4,0,,100,,,,0,0xFFFFFFFF,63,2,512,0,1,0,229,{},{},{} +18732,TE_Woe_Cap,TE Woe Cap,4,0,,0,,5,,0,0xFFFFFFFF,63,2,256,,40,1,14,{ bonus bMdef,5; bonus bBaseAtk,5; bonus bMatk,5; bonus2 bAddRace,RC_Player,10; bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} +18733,TE_Woe_Bone_Helm,TE Woe Bone Helm,4,0,,0,,10,,0,0x000444A2,63,2,256,,40,1,103,{ bonus bBaseAtk,10; bonus2 bAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25; },{},{} +18734,TE_Woe_Magic_Eyes,TE Woe Magic Eyes,4,0,,0,,5,,0,0x00818315,63,2,256,,40,1,209,{ bonus bMdef,5; bonus bMatk,10; bonus2 bMagicAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25; },{},{} +18736,Censor_Bar_,Censor Bar,4,0,,100,,,,0,0xFFFFFFFF,63,2,512,,1,0,229,{},{},{} 18737,Fortier_Mask,Fortier Masque,4,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,10,0,876,{ bonus bUnbreakableHelm,1; bonus2 bMagicAtkEle,Ele_Fire,4; },{},{} 18739,Carnation_Hairband,Carnation Hairband,4,20,,100,,0,,0,0xFFFFFFFF,63,2,256,,0,1,878,{ bonus bLuk,1; },{},{} 18740,Hair_Of_The_Strong,RMSC2012 Special Costume,4,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,879,{},{},{} @@ -9686,7 +9686,7 @@ 18752,Cursed_Book,Cursed Book,4,20,,300,,3,,1,0xFFFFFFFE,63,2,256,,99,1,890,{ .@r = getrefine(); bonus2 bHPLossRate,.@r,5000; bonus2 bHPDrainRate,40,4+(.@r/2); bonus2 bSPDrainRate,10,1+(.@r/3); },{},{} 18753,Tw_Rice_Ball,Tw Rice Ball,4,20,,100,,6,,0,0xFFFFFFFF,63,2,256,,0,0,892,{ bonus bLuk,1; bonus2 bAddMonsterDropItem,564,100; },{},{} 18754,Blood_Sucker,Blood Sucker,4,20,,300,,0,,0,0xFFFFFFFF,63,2,1,,40,0,893,{ bonus bUnbreakableHelm,1; bonus2 bHPDrainRate,30,5; bonus bHPrecovRate,-100; bonus bSPrecovRate,-100; },{},{} -18755,Feather_Beret_,Feather Beret,4,0,,600,,1,,1,0xFFFFFFFF,63,2,256,0,1,1,224,{ bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10; },{},{} +18755,Feather_Beret_,Feather Beret,4,0,,600,,1,,1,0xFFFFFFFF,63,2,256,,1,1,224,{ bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10; },{},{} 18756,Black_Shiba_Inu_Hat,Black Shiba Inu Hat,4,20,,400,,6,,1,0xFFFFFFFF,63,2,256,,50,1,894,{ bonus bBaseAtk,30; bonus2 bAddRace,RC_Brute,10; },{},{} 18758,Hat_Of_Scrat,Hat Of Scrat,4,20,,200,,3,,1,0xFFFFFFFF,63,2,256,,0,1,896,{},{},{} 18759,Stretched_Nose_M,Wood Goblin's Nose,4,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,50,0,737,{ bonus bUnbreakableHelm,1; bonus2 bAddMonsterDropItem,1032,400; bonus2 bAddMonsterDropItem,1033,100; bonus3 bAddMonsterDropItem,576,RC_Plant,40; },{},{} @@ -9766,7 +9766,7 @@ 18863,Exorcist_Robe,Exorcist Robe,4,10,,1700,,57,,1,0xFFFFFFFF,63,2,16,,60,1,,{ bonus bMdef,5; .@r = getrefine(); if (.@r >= 3) { bonus2 bAddRace,RC_Undead,.@r/3*5; } if (BaseClass==Job_Acolyte) bonus2 bAddRace,RC_Undead,10; },{},{} 18864,Earth_Goddess_Flower,Earth Goddess Flower,4,10,,250,,6,,0,0xFFFFFFFF,63,2,256,,1,1,864,{ bonus2 bAddEle,Ele_Earth,15; skill "WZ_EARTHSPIKE",5; },{},{} 18865,Sword_Master_Crown,Sword Master Crown,4,10,,1000,,30,,1,0xFFFFFFFF,63,2,256,,50,1,981,{ .@i = BaseLevel; bonus bBaseAtk,(.@i>150)?(15):((.@i>100)?(10):((.@i>50)?(5):(0))); if(getskilllv("SM_SWORD")==10) bonus bHit,10; if(getskilllv("SM_TWOHAND")==10) bonus bUseSPrate,-5; if(getskilllv("AM_AXEMASTERY")==10) bonus bVariableCastrate,-5; if(getskilllv("AS_KATAR")==10) bonus bCritAtkRate,20; if(getskilllv("PR_MACEMASTERY")==10) bonus bAspdRate,10; },{},{} -18867,Vajra,Vajra,4,0,,300,,,,0,0xFFFFFFFF,63,2,1,0,48,0,983,{ bonus bDex,1; bonus bLongAtkRate,2; },{},{} +18867,Vajra,Vajra,4,0,,300,,,,0,0xFFFFFFFF,63,2,1,,48,0,983,{ bonus bDex,1; bonus bLongAtkRate,2; },{},{} 18868,Assassin_Skull_Mask,Assassin Skull Mask,4,10,,500,,2,,0,0xFFFFFFFF,63,2,513,,70,,984,{ bonus bCritical,5; },{},{} 18870,Very_Sweet_Candy_Bar,Very Sweet Candy Bar,4,10,,10,,,,0,0xFFFFFFFF,63,2,1,,1,1,446,{ bonus bAllStats,2; bonus bBaseAtk,10; bonus bMatk,10; bonus2 bExpAddClass,Class_All,2; },{},{} 18871,Very_Sweet_Candy,Very Sweet Candy,4,10,,10,,,,0,0xFFFFFFFF,63,2,1,,1,1,446,{ bonus bAllStats,1; bonus bBaseAtk,5; bonus bMatk,5; },{},{} @@ -9835,7 +9835,7 @@ 19020,Survive_Circlet,Survive Circlet,4,0,,500,,10,,0,0xFFFFFFFF,63,2,256,,,1,1220,{ .@r = getrefine(); bonus bInt,(3 + (.@r/2)+ (BaseLevel > 130 ? .@r : 0)); bonus bMatkRate,4; },{},{} 19021,Gigant_Helm,Gigant Helm,4,0,,500,,10,,0,0xFFFFFFFF,63,2,256,,,1,1221,{ bonus bStr,3+((BaseLevel > 130) ? getrefine() : 0); bonus2 bAddClass,Class_All,4; },{},{} 19022,Floating_Stone_Of_Intelligence,Floating Stone Of Intelligence,4,,,,,,,,0xFFFFFFFF,63,2,256,,,,1230,{},{ sc_start SC_FSTONE,-1,0; },{ sc_end SC_FSTONE; } // jRO Item -19024,Protect_Feathers,Protect Feathers,4,0,,500,,,,0,0xFFFFFFFF,63,2,512,0,70,0,1232,{ bonus2 bSubRace,RC_DemiHuman,2; bonus2 bSubRace,RC_Player,2; bonus bAspdRate,-5; .@vit = readparam(bVit); if (.@vit >= 108) { bonus2 bSubRace,RC_DemiHuman,3; bonus2 bSubRace,RC_Player,3; bonus bAspdRate,-5; } if (.@vit >= 120) { bonus bMaxHPRate,3; bonus bMdef,3; } },{},{} +19024,Protect_Feathers,Protect Feathers,4,0,,500,,,,0,0xFFFFFFFF,63,2,512,,70,0,1232,{ bonus2 bSubRace,RC_DemiHuman,2; bonus2 bSubRace,RC_Player,2; bonus bAspdRate,-5; .@vit = readparam(bVit); if (.@vit >= 108) { bonus2 bSubRace,RC_DemiHuman,3; bonus2 bSubRace,RC_Player,3; bonus bAspdRate,-5; } if (.@vit >= 120) { bonus bMaxHPRate,3; bonus bMdef,3; } },{},{} 19026,Aegir_Helm,Aegir Helm,4,10,,800,,10,,1,0xFFFFFFFF,63,2,256,,40,1,870,{ bonus bVit,3; },{},{} 19030,Pretty_Rabbit_Hood,Pretty Rabbit Hood,4,10,,100,,20,,1,0xFFFFFFFF,63,2,769,,1,1,1085,{ bonus bMaxHP,(15*BaseLevel); },{},{} 19031,Fallen_Angel_Blessing,Fallen Angel Blessing,4,0,,200,,1,,0,0xFFFFFFFF,63,2,512,,,1,1250,{ bonus2 bAddRace,RC_Angel,5; bonus2 bSubRace,RC_Angel,5; },{},{} @@ -9847,7 +9847,7 @@ 19051,Warrior_Moon_Cat,Warrior Moon Cat,4,20,,100,,5,,1,0xFFFFFFFF,63,2,256,,1,1,1308,{ /*Enables use of Level 1 Monster's Cry*/ bonus bAllStats,3; bonus2 bHPDrainRate,40,5; bonus2 bSPDrainRate,10,2; },{},{} 19052,Sigruns_Wing,Rental Sigrun's Wing,4,10,,0,,2,,0,0xFFFFFFFF,63,2,512,,1,0,568,{ if (Class == Job_Swordman || Class == Job_Thief || Class == Job_Merchant || Class == Job_Taekwon || Class == Job_Star_Gladiator || Class == Job_Star_Gladiator2) bonus bAspd,1; else if (Class == Job_Mage || Class == Job_Acolyte || Class == Job_Ninja || Class == Job_Soul_Linker) { bonus bMatk,5; bonus bHealPower,2; } else if (Class == Job_Archer || Class == Job_Gunslinger) bonus bLongAtkRate,2; else if (Class == Job_Novice || Class == Job_SuperNovice) { bonus bMaxHP,120; bonus bMaxSP,60; } },{},{} 19053,Fighter_Moon_Cat,Fighter Moon Cat,4,20,,100,,5,,1,0xFFFFFFFF,63,2,256,,1,1,1308,{ /*Enables use of Level 1 Monster's Cry*/ .@r = getrefine(); bonus bAllStats,3; bonus2 bAddEff,Eff_Stun,500+(.@r*100); },{},{} -19082,Bio_Protector,Bio Protector,4,0,,500,,3,,0,0xFFFFFFFF,63,2,512,1,50,1,1366,{ bonus bHit,10; bonus bVariableCastrate,-5; bonus bPerfectHitRate,5; },{},{} +19082,Bio_Protector,Bio Protector,4,0,,500,,3,,0,0xFFFFFFFF,63,2,512,,50,1,1366,{ bonus bHit,10; bonus bVariableCastrate,-5; bonus bPerfectHitRate,5; },{},{} 19083,Mask_of_Hero,Mask of Hero,4,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,70,0,1367,{ bonus bVit,10; bonus bMdef,10; bonus bShortWeaponDamageReturn,1; },{},{} 19084,Parfaille_Vigilante_Hat,Parfaille Vigilante Hat,4,0,,100,,2,,0,0x80000000,63,2,256,,20,1,1368,{ bonus bLuk,1; bonus3 bAutoSpell,"AL_BLESSING",3,100; },{},{} 19085,Sigrun's_Wings_,Sigrun's Wings,4,20,,100,,2,,1,0xFFFFFFFF,63,2,512,,1,0,568,{ if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief||(BaseJob==Job_Taekwon&&Class!=Job_Soul_Linker)) { bonus bAspd,1; bonus bAgi,-2; } else if(BaseClass==Job_Mage||BaseClass==Job_Acolyte||Class==Job_Ninja||Class==Job_Soul_Linker){ bonus bMatk,3; bonus bHealPower,2; } else if(BaseClass==Job_Archer||BaseClass==Job_Gunslinger) bonus bLongAtkRate,1; else if(BaseJob==Job_Novice||BaseJob==Job_SuperNovice) { bonus bMaxHP,60; bonus bMaxSP,30; } },{},{} @@ -9861,9 +9861,9 @@ 19093,Spinning_Eyes_,Geek Glasses,4,20000,,100,,1,,1,0xFFFFFFFF,63,2,512,,0,0,27,{ bonus2 bResEff,Eff_Blind,800; },{},{} 19094,Mr_Smile_,Mr. Smile,4,60,,100,,1,,1,0xFFFFFFFF,63,2,513,,0,0,65,{},{},{} 19095,Happy_Balloon,Happy Balloon,4,0,,10,,0,,0,0xFFFFFFFF,63,2,1,,1,0,1289,{ bonus2 bDropAddRace,RC_All,5; bonus2 bExpAddRace,RC_All,5; },{},{} -19109,Valhalla_Idol,Valhalla Idol,4,0,,300,,2,,0,0xFFFFFFFF,63,2,512,0,70,0,1423,{ bonus bMaxSP,50; bonus3 bAutoSpell,"MG_SAFETYWALL",10,50; },{},{} -19111,Laser_Of_Eagle,Laser of Eagle,4,0,,400,,5,,1,0xFFFFFFFF,63,2,256,0,100,1,1424,{ bonus bDex,2; bonus bLongAtkRate,10; bonus4 bAutoSpell,"PR_LEXAETERNA",1,50,BF_LONG; /*TODO: Chance to transform become Shechil while attacking.*/ },{},{} -19116,Red_Baby_Dragon,Red Baby Dragon,4,0,,700,,,1,1,0xFFFFFFFF,63,2,256,0,90,1,1463,{ .@r=getrefine(); bonus bMaxHPrate,5; bonus bMaxSPrate,5; bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; if (.@r>=6) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } if (.@r>=8) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } },{},{} +19109,Valhalla_Idol,Valhalla Idol,4,0,,300,,2,,0,0xFFFFFFFF,63,2,512,,70,0,1423,{ bonus bMaxSP,50; bonus3 bAutoSpell,"MG_SAFETYWALL",10,50; },{},{} +19111,Laser_Of_Eagle,Laser of Eagle,4,0,,400,,5,,1,0xFFFFFFFF,63,2,256,,100,1,1424,{ bonus bDex,2; bonus bLongAtkRate,10; bonus4 bAutoSpell,"PR_LEXAETERNA",1,50,BF_LONG; /*TODO: Chance to transform become Shechil while attacking.*/ },{},{} +19116,Red_Baby_Dragon,Red Baby Dragon,4,0,,700,,,1,1,0xFFFFFFFF,63,2,256,,90,1,1463,{ .@r=getrefine(); bonus bMaxHPrate,5; bonus bMaxSPrate,5; bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; if (.@r>=6) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } if (.@r>=8) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } },{},{} 19117,Poring_Sunglasses,Poring Sunglasses,4,0,,10,,0,,0,0xFFFFFFFF,63,2,512,,1,0,954,{ bonus2 bDropAddRace,RC_All,5; bonus2 bExpAddRace,RC_All,5; },{},{} 19118,Poring_Sunglasses_,Poring Sunglasses,4,0,,10,,0,,1,0xFFFFFFFF,63,2,512,,1,0,954,{ bonus2 bDropAddRace,RC_All,4; bonus2 bExpAddRace,RC_All,4; },{},{} 19126,Shadow_Booster_,Magical Booster,4,10,,300,,,,1,0xFFFFFFFF,63,2,512,,1,1,873,{ bonus bAspd,1; bonus bDelayrate,-1; },{},{} @@ -10396,7 +10396,7 @@ 20096,C_Blue_Ribbon,Costume Blue Ribbon,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,441,{},{},{} 20097,C_White_Ribbon,Costume White Ribbon,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,442,{},{},{} 20098,C_Vampire_Hairband,Costume Vampire Hairband,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1238,{},{},{} -20099,C_Ljosalfar,Flying Ljosalfar,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1239,{},{ sc_start SC_LJOSALFAR,-1,0; },{ sc_end SC_LJOSALFAR; } +20099,C_Ljosalfar,Flying Ljosalfar,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1239,{},{ sc_start SC_LJOSALFAR,-1,0; },{ sc_end SC_LJOSALFAR; } 20100,C_Volume_Fhat,Costume Volume Fhat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1240,{},{},{} 20101,C_Bragi_Wing_Ears,Costume Bragi Wing Ears,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1241,{},{},{} 20102,C_Horse_King_J,Costume Horse King J,4,0,,0,,,,0,0xFFFFFFFF,63,2,7168,,1,1,1189,{},{},{} @@ -10412,9 +10412,9 @@ 20112,C_Aqua_Ten_Gallon_Hat,Costume Aqua Ten Gallon Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1256,{},{},{} 20113,C_Star_Reading_Hat,Costume Star Reading Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1253,{},{},{} 20114,C_Funeral_Hat,Costume Funeral Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,77,{},{},{} -20115,C_Under_Rim_Glasses,Under Rim Glasses,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,1,1,1,1255,{},{},{} -20116,C_Mermaid_Headphone,Mermaid Headphone,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,1,1,1,1254,{},{},{} -20117,C_Raspberry_Mousse_Hat,Raspberry Mousse Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1257,{},{},{} +20115,C_Under_Rim_Glasses,Under Rim Glasses,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1255,{},{},{} +20116,C_Mermaid_Headphone,Mermaid Headphone,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1254,{},{},{} +20117,C_Raspberry_Mousse_Hat,Raspberry Mousse Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1257,{},{},{} 20118,C_Cake_Hat,Costume Cake Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,109,{},{},{} 20119,C_Beanie,Costume Beanie,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,160,{},{},{} 20120,C_Aerial,Costume Aerial,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,97,{},{},{} @@ -10515,9 +10515,9 @@ 20215,C_Black_Devil_Mask,Costume Black Devil Mask,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,760,{},{},{} 20216,C_Rideword_Hat,Costume Rideword Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,890,{},{},{} 20217,C_Arabian_Veil,Costume Arabian Veil,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1300,{},{},{} -20218,C_Spell_Circuit,Costume Spell Circuit,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1301,{},{},{} +20218,C_Spell_Circuit,Costume Spell Circuit,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1301,{},{},{} 20219,C_Angel_Marcher_Hat,Costume Angel Marcher Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1302,{},{},{} -20220,C_Dark_Night_Veil,Costume Dark Night Veil,4,0,,0,,,,0,0xFFFFFFFF,63,2,3072,1,1,1,1303,{},{},{} +20220,C_Dark_Night_Veil,Costume Dark Night Veil,4,0,,0,,,,0,0xFFFFFFFF,63,2,3072,,1,1,1303,{},{},{} 20221,C_Eyes_Of_Ifrit,C Eyes Of Ifrit,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,886,{},{},{} 20222,C_Blue_Pigtail_Santa_Hat,Costume Blue Pigtail Santa Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,,1,395,{},{},{} 20223,C_Romantic_Leaf,Costume Romantic Leaf,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,57,{},{},{} @@ -10601,8 +10601,8 @@ 20312,C_Barons_Evil_Eye,Costume Baron's Evil Eye,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,989,{},{},{} 20313,C_CD_in_Mouth,Costume CD in Mouth,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,815,{},{},{} 20314,C_New_Wave_Sunglasses,Costume New Wave Sunglasses,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,856,{},{},{} -20315,C_Analyze_Eye,Costume Analyze Eye,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,1,1,1,1351,{},{},{} -20316,C_Seraph_Wing_Helm,Costume Seraph Wing Helm,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1352,{},{},{} +20315,C_Analyze_Eye,Costume Analyze Eye,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,1351,{},{},{} +20316,C_Seraph_Wing_Helm,Costume Seraph Wing Helm,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1352,{},{},{} 20317,C_Nekomimi_Cyber_Headphone,Costume Nekomimi Cyber Headphone,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1353,{},{},{} 20318,C_Charleston_Antenna,Costume Charleston Antenna,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1354,{},{},{} 20319,C_Crimson_Booster,Costume Crimson Booster,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1355,{},{},{} @@ -10610,8 +10610,8 @@ 20321,C_Pterios_Fins,Costume Pterios Fins,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1009,{},{},{} 20322,C_Seal_Hat,Costume Seal Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,540,{},{},{} 20323,C_Sparkling_Sound,Costume Sparkling Sound,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,1074,{},{},{} -20324,C_Pigeon_Hat,Costume Pigeon Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1362,{},{},{} -20325,C_Little_Aquarium,Costume Little Aquarium,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,1,1,1,1363,{},{},{} +20324,C_Pigeon_Hat,Costume Pigeon Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1362,{},{},{} +20325,C_Little_Aquarium,Costume Little Aquarium,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1363,{},{},{} 20326,C_Sailor_Collar,Costume Sailor Collar,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,1364,{},{},{} 20327,C_Marine_Cap,Costume Marine Cap,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1365,{},{},{} 20328,C_Mackerel_Pike,Costume Mackerel Pike,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,1081,{},{},{} @@ -10753,12 +10753,12 @@ 20510,C_SwordWing,Costume Sword Wing,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,19,{},{},{} 20600,Fantastic_Aura,Fantastic Aura,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,0,{ /*TODO: View ID*/ bonus bUnbreakableHelm,1; },{},{} 20700,Egir_Manteau,Egir Manteau,4,200000,,300,,10,,1,0xFFFFFFFF,63,2,4,,110,1,0,{ bonus bUnbreakableGarment,1; .@r = getrefine(); if (.@r > 10) .@r = 10; if (BaseClass == Job_Mage || BaseClass == Job_Archer || BaseClass == Job_Acolyte) { bonus bFlee2,5+(.@r*2); } else if (BaseClass == Job_Swordman || BaseClass == Job_Merchant || BaseClass == Job_Thief) { bonus bShortWeaponDamageReturn,5+(.@r*2); } },{},{} -20702,TE_Woe_Muffler,TE Woe Muffler,4,0,,0,,5,,0,0xFFFFFFFF,63,2,4,1,40,1,,{ bonus bMdef,5; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{} -20703,TE_Woe_Manteau,TE Woe Manteau,4,0,,0,,10,,0,0x000444A2,63,2,4,1,40,1,,{ bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} -20704,TE_Woe_Magic_Manteau,TE Woe Magic Manteau,4,0,,0,,5,,0,0x00818315,63,2,4,1,40,1,,{ bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} +20702,TE_Woe_Muffler,TE Woe Muffler,4,0,,0,,5,,0,0xFFFFFFFF,63,2,4,,40,1,,{ bonus bMdef,5; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{} +20703,TE_Woe_Manteau,TE Woe Manteau,4,0,,0,,10,,0,0x000444A2,63,2,4,,40,1,,{ bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} +20704,TE_Woe_Magic_Manteau,TE Woe Magic Manteau,4,0,,0,,5,,0,0x00818315,63,2,4,,40,1,,{ bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{} 20706,Amistr_Bag,Amistr Bag,4,10,,500,,18,,0,0xFFFFFFFF,63,2,4,,1,,4,{ bonus bAllStats,1; bonus2 bSubEle,Ele_All,5; },{},{} 20707,Kirin_Wing,Kirin Wing,4,20,,0,,18,,0,0xFFFFFFFF,63,2,4,,0,1,6,{ bonus bAllStats,1; bonus2 bSubRace,RC_DemiHuman,5; bonus2 bSubRace,RC_Player,5; },{},{} -20709,Mana_Manteau,Mana Manteau,4,0,,0,,,,0,0xFFFFFFFF,63,2,4,0,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{} +20709,Mana_Manteau,Mana Manteau,4,0,,0,,,,0,0xFFFFFFFF,63,2,4,,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{} 20710,Impr_Angel's_Warmth,Advanced Angelic Cardigan,4,10000,,400,,6,,1,0x00000001,63,2,4,,99,1,0,{ bonus bHPrecovRate,50; },{},{} 20711,Manteau_Of_Diego,Manteau Of Diego,4,20,,600,,15,,1,0xFFFFFFFF,63,2,4,,0,1,0,{ bonus bInt,1; bonus bDex,1; bonus bMdef,3; },{},{} 20717,Gigant_Snake_Skin,Gigant Snake Skin,4,10,,400,,38,,0,0xFFFFFFFF,63,2,4,,1,1,0,{ bonus bMdef,10; },{},{} @@ -10776,7 +10776,7 @@ 20746,C_Rudra_Wings,Costume Rudra Wings,4,10,,0,,,,0,0xFFFFFFFF,63,2,8192,,1,0,8,{},{},{} 20748,Cloak_Of_Casualties,Cloak Of Casualties,4,10,,600,,20,,0,0xFFFFFFFF,63,2,4,,120,1,,{ .@r = getrefine(); bonus bAgi,5; bonus bFlee,10; if(readparam(bStr)>=90) bonus bBaseAtk,10+(.@r*2); if(readparam(bInt)>=90) bonus bMatk,20+(.@r*3); if(readparam(bVit)>=90) bonus2 bSubEle,Ele_Neutral,3+((.@r>=8)?3:0)+((.@r>=10)?4:0); if(readparam(bAgi)>=90){ bonus bAspdRate,3+(.@r/2); bonus bAspd,((.@r>=10)?1:0); } if(readparam(bDex)>=90) bonus bLongAtkRate,3+(.@r/2); if(readparam(bLuk)>=90) bonus bCriticalRate,5+.@r; },{},{} 20749,Cloak_Of_Casualties_,Cloak Of Casualties,4,10,,600,,30,,1,0xFFFFFFFF,63,2,4,,170,1,,{ .@r = getrefine(); bonus bMaxHPrate,.@r/2; bonus bMaxSPrate,.@r/2; bonus bAgi,5; bonus bFlee,10; if(readparam(bStr)>=90) bonus bBaseAtk,10+(.@r*2); if(readparam(bInt)>=90) bonus bMatk,20+(.@r*3); if(readparam(bVit)>=90) bonus2 bSubEle,Ele_Neutral,3+((.@r>=8)?3:0)+((.@r>=10)?4:0); if(readparam(bAgi)>=90){ bonus bAspdRate,3+(.@r/2); bonus bAspd,((.@r>=10)?1:0); } if(readparam(bDex)>=90) bonus bLongAtkRate,3+(.@r/2); if(readparam(bLuk)>=90) bonus bCriticalRate,5+.@r; },{},{} -20753,Lian_Robe,Lian Robe,4,0,,700,,20,1,1,0xFFFFFFFF,63,2,4,0,65,1,,{ bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5; },{},{} +20753,Lian_Robe,Lian Robe,4,0,,700,,20,1,1,0xFFFFFFFF,63,2,4,,65,1,,{ bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5; },{},{} 20756,Aegir_Cloak,Aegir Cloak,4,10,,300,,10,,1,0xFFFFFFFF,63,2,4,,40,1,,{ bonus bUnbreakableGarment,1; bonus bMaxHP,500; bonus bMaxSP,50; },{},{} 20761,C_Happiness_Wings,Costume Happiness Wings,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,9,{},{},{} 20762,C_Great_Devil_Wings,Costume Great Devil Wings,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,10,{},{},{} @@ -10786,12 +10786,12 @@ 20780,Unity_STR_Manteau,Unity STR Manteau,4,32000,,300,,20,,1,0xFFFFFFFF,63,2,4,,1,1,0,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bMaxHPrate,2*(.@r/2); } },{},{} 20781,Unity_AGI_Manteau,Unity AGI Manteau,4,32000,,300,,20,,1,0xFFFFFFFF,63,2,4,,1,1,0,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bFlee,3*(.@r/2); } },{},{} 20782,Unity_INT_Muffler,Unity INT Muffler,4,32000,,300,,20,,1,0xFFFFFFFF,63,2,4,,1,1,0,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bUseSPrate,-(.@r/2); } },{},{} -20783,Hero_Cape,Hero Cape,4,0,,100,,,,1,0xFFFFFFFF,63,2,4,1,10,1,,{ .@r = getrefine(); bonus2 bSubEle,Ele_Neutral,1+(.@r/3); bonus bFlee,1+(.@r/3); if (.@r > 9) { bonus2 bSubEle,Ele_Neutral,20; bonus bFlee,20; } },{},{} +20783,Hero_Cape,Hero Cape,4,0,,100,,,,1,0xFFFFFFFF,63,2,4,,10,1,,{ .@r = getrefine(); bonus2 bSubEle,Ele_Neutral,1+(.@r/3); bonus bFlee,1+(.@r/3); if (.@r > 9) { bonus2 bSubEle,Ele_Neutral,20; bonus bFlee,20; } },{},{} 20787,Unity_Exquisite_Muffler,Unity Exquisite Muffler,4,32000,,300,,20,,1,0xFFFFFFFF,63,2,4,,1,1,0,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bCritical,2*(.@r/2); } },{},{} 20788,Private_Doram_Manteau,Private Doram Manteau,4,20,,300,,20,,1,0x80000000,7,2,4,,100,1,,{ bonus bFlee,5; bonus2 bSubEle,Ele_Neutral,2; bonus bFlee2,getrefine()/3; },{},{} 20789,Luxury_Doram_Manteau,Luxury Doram Manteau,4,20,,400,,25,,1,0x80000000,7,2,4,,140,1,,{ bonus bFlee,7; bonus2 bSubEle,Ele_Neutral,3; .@r = getrefine()/3; bonus bFlee2,.@r; bonus bLuk,.@r; },{},{} 20790,Elegant_Doram_Manteau,Elegant Doram Manteau,4,20,,500,,30,,1,0x80000000,7,2,4,,175,1,,{ bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine()/2; bonus bFlee2,.@r; bonus bInt,.@r; bonus bDex,.@r; bonus bLuk,.@r; },{},{} -20797,Etran_Shirt,Etran Shirt,4,0,,150,,,,1,0xFFFFFFFF,63,2,4,1,1,1,,{ bonus bMdef,10; bonus bMaxHPrate,2; .@r = getrefine(); if (.@r >= 6) bonus bMaxHPrate,4; if (.@r >= 7) bonus bMaxHPrate,6; if (.@r >= 8) bonus bMaxHPrate,8; if (.@r >= 9) bonus bNoKnockback,1; },{},{} +20797,Etran_Shirt,Etran Shirt,4,0,,150,,,,1,0xFFFFFFFF,63,2,4,,1,1,,{ bonus bMdef,10; bonus bMaxHPrate,2; .@r = getrefine(); if (.@r >= 6) bonus bMaxHPrate,4; if (.@r >= 7) bonus bMaxHPrate,6; if (.@r >= 8) bonus bMaxHPrate,8; if (.@r >= 9) bonus bNoKnockback,1; },{},{} 20798,C_Grim_Reaper_Protection,Costume Grim Reaper Protection,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,0,1450,{},{},{} 20815,SeraphimRobe,Seraphim Robe,4,0,,300,,18,,1,0xFFFFFFFF,63,2,4,,1,1,,{ bonus bMaxHPrate,10; bonus2 bMagicAtkEle,Ele_Neutral,5; .@r = getrefine(); if (.@r > 6) { bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Holy,20; bonus bMatkRate,10; } if (.@r > 8) { bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus bVariableCastrate,-5; } if (getskilllv("CR_TRUST") > 0) { bonus2 bSubEle,Ele_Holy,.@r*3; } },{},{} 20819,Oxygen_Bottle,Oxygen Bottle,4,0,,500,,0,,1,0xFFFFFFFF,63,2,4,,40,0,0,{ bonus bFlee,12+getrefine(); bonus bHit,getrefine(); },{},{} @@ -10837,7 +10837,7 @@ 22009,Temporal_INT_Boots_,Temporal Boots Of Intelligence,4,20,,600,,20,,1,0xFFFFFFFF,56,2,64,,99,1,,{ .@r = getrefine(); bonus bMdef,5; bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bMatk,10*(.@r/3); if(readparam(bInt)>=120) bonus bMatk,60; },{},{} 22010,Temporal_AGI_Boots_,Temporal Boots Of Agility,4,20,,600,,25,,1,0xFFFFFFFF,56,2,64,,99,1,,{ .@r = getrefine(); bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bAspdRate,3*(.@r/3); if(readparam(bAgi)>=120) bonus bAspd,1; },{},{} 22011,Temporal_LUK_Boots_,Temporal Boots Of Luck,4,20,,600,,20,,1,0xFFFFFFFF,56,2,64,,99,1,,{ .@r = getrefine(); bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bMdef,5; bonus bCritAtkRate,2*(.@r/3); if(readparam(bLuk)>=120) bonus bCritAtkRate,30; },{},{} -22012,Mana_Boots,Mana Boots,4,0,,0,,,,0,0xFFFFFFFF,63,2,64,0,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{} +22012,Mana_Boots,Mana Boots,4,0,,0,,,,0,0xFFFFFFFF,63,2,64,,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{} 22014,Enhanced_Variant_Shoes,Enhanced Variant Shoes,4,20,,500,,13,,1,0x7CCFDF80,63,2,64,,85,1,0,{ bonus bMaxHPrate,12; bonus bMaxSPrate,12; .@r = getrefine(); bonus bDef,.@r; bonus bMdef,.@r; },{},{} 22015,Impr_Angel's_Arrival,Advanced Angel's Reincarnation,4,10000,,300,,8,,1,0x00000001,63,2,64,,99,1,0,{ bonus bMaxHP,500; bonus bMaxSP,100; },{},{} 22018,Shoes_Of_Wise_Man,Shoes Of Wise Man,4,10,,300,,15,,1,0xFFFFFFFF,63,2,64,,50,1,,{ .@r = getrefine(); if(.@r>5){ bonus bInt,.@r-5; bonus bMaxHPrate,-(.@r-5); } },{},{} @@ -10855,8 +10855,8 @@ 22059,Aegir_Shoes,Aegir Shoes,4,10,,300,,13,,1,0xFFFFFFFF,63,2,64,,40,1,,{ bonus bUnbreakableShoes,1; bonus bMaxHP,500; bonus bMaxSP,50; },{},{} 22064,Thorny_Shoes,Thorny Shoes,4,0,,1000,,25,,1,0xFFFFFFFF,63,2,64,,,1,,{ bonus bShortWeaponDamageReturn,getrefine()/2; },{},{} 22067,Shoe_of_Witch,Shoe of Witch,4,10,,400,,10,,0,0xFFFFFFFE,63,2,64,,1,1,,{ skill "ALL_CATCRY",1; },{},{} -22069,Lian_Shoes,Lian Shoes,4,0,,250,,12,,1,0xFFFFFFFF,63,2,64,1,90,1,,{ bonus bMdef,3; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); bonus bMaxHPrate,.@r; bonus bMaxSPrate,.@r; },{},{} -22072,Hikingboots,Hikingboots,4,0,,500,,10,,1,0xFFFFFFFF,63,2,64,0,100,1,,{ .@r = getrefine(); bonus bMaxHPRate,4+(.@r/3); bonus bMaxSPRate,4+(.@r/3); if (.@r > 9) bonus bSpeedRate,25; },{},{} +22069,Lian_Shoes,Lian Shoes,4,0,,250,,12,,1,0xFFFFFFFF,63,2,64,,90,1,,{ bonus bMdef,3; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); bonus bMaxHPrate,.@r; bonus bMaxSPrate,.@r; },{},{} +22072,Hikingboots,Hikingboots,4,0,,500,,10,,1,0xFFFFFFFF,63,2,64,,100,1,,{ .@r = getrefine(); bonus bMaxHPRate,4+(.@r/3); bonus bMaxSPRate,4+(.@r/3); if (.@r > 9) bonus bSpeedRate,25; },{},{} 22075,Rift_Shoes,Rift Shoes,4,20,,250,,12,,1,0xFFFFFFFF,63,2,64,,100,1,,{ .@r = getrefine(); bonus bMaxHP,(.@r >= 9 ? 1300 : .@r >= 7 ? 700 : 300); bonus bMaxSP,-50; },{},{} 22076,Wooden_Slipper,Wooden Slipper,4,20,,50,,10,,1,0x80000000,7,2,64,,9,1,,{ bonus2 bHPRegenRate,2,10000; },{},{} 22077,Red_Eco-Friendly_Shoes,Red Eco-Friendly Shoes,4,20,,100,,20,,1,0x80000000,7,2,64,,18,1,,{ bonus bCritical,5; bonus2 bHPRegenRate,4,10000; bonus2 bSPRegenRate,1,10000; },{},{} @@ -10864,13 +10864,13 @@ 22079,Unity_AGI_Boots,Unity AGI Boots,4,10,,300,,20,,1,0xFFFFFFFF,63,2,64,,1,1,,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bAgi,.@r/2; } },{},{} 22080,Unity_DEX_Boots,Unity DEX Boots,4,10,,300,,20,,1,0xFFFFFFFF,63,2,64,,1,1,,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bDex,.@r/2; } },{},{} 22081,Unity_INT_Boots,Unity INT Boots,4,10,,300,,20,,1,0xFFFFFFFF,63,2,64,,1,1,,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bInt,.@r/2; } },{},{} -22082,Polyhedron_Shoes,Polyhedron Shoes,4,0,,500,,12,,1,0xFFFFFFFF,63,2,64,0,90,1,,{ .@r = getrefine(); bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Wind,5; if (.@r > 4) { .@b = (.@r > 6) ? 10 : 5; bonus2 bAddEle,Ele_Neutral,.@b; bonus2 bAddEle,Ele_Fire,.@b; bonus2 bAddEle,Ele_Water,.@b; bonus2 bAddEle,Ele_Wind,.@b; } },{},{} +22082,Polyhedron_Shoes,Polyhedron Shoes,4,0,,500,,12,,1,0xFFFFFFFF,63,2,64,,90,1,,{ .@r = getrefine(); bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Wind,5; if (.@r > 4) { .@b = (.@r > 6) ? 10 : 5; bonus2 bAddEle,Ele_Neutral,.@b; bonus2 bAddEle,Ele_Fire,.@b; bonus2 bAddEle,Ele_Water,.@b; bonus2 bAddEle,Ele_Wind,.@b; } },{},{} 22083,Private_Doram_Shoes,Private Doram Shoes,4,20,,500,,25,,1,0x80000000,7,2,64,,100,1,,{ bonus bMaxHP,100; bonus bMaxSP,50; .@r = getrefine()/3; bonus bHPrecovRate,.@r*10; bonus bSPrecovRate,.@r*10; },{},{} 22084,Luxury_Doram_Shoes,Luxury Doram Shoes,4,20,,600,,30,,1,0x80000000,7,2,64,,140,1,,{ bonus bMaxHP,300; bonus bMaxSP,100; .@r = getrefine()/3; bonus bHPrecovRate,20*.@r; bonus bSPrecovRate,20*.@r; },{},{} 22085,Elegant_Doram_Shoes,Elegant Doram Shoes,4,20,,700,,35,,1,0x80000000,7,2,64,,175,1,,{ bonus bMaxHPrate,10; bonus bMaxSPrate,5; .@r = getrefine()/2; bonus bMaxHP,100*.@r; bonus bMaxSP,20*.@r; if(.@r >= 4) bonus2 bSkillUseSP,"SU_LOPE",5; },{},{} 22089,Crimson_Gaiter_,Crimson Gaiter,4,0,,500,,10,,1,0xFFFFFFFF,63,2,64,,50,1,,{ bonus bCritical,2; bonus bCritAtkRate,2; if(getrefine()>=7){ bonus bCritical,3; bonus bCritAtkRate,3; } },{},{} 22101,Angel_Poring_Boots,Angel Poring Boots,4,10,,300,,15,,1,0xFFFFFFFF,63,2,64,,1,1,,{ bonus bAllStats,1; skill "AL_HEAL",1; },{},{} -22103,Excelion_Leg,Excelion Leg,4,0,,500,,13,,0,0xFFFFFFFF,63,2,64,1,100,1,,{ .@r = getrefine(); bonus bMaxHP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; bonus bMaxSP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; },{},{} +22103,Excelion_Leg,Excelion Leg,4,0,,500,,13,,0,0xFFFFFFFF,63,2,64,,100,1,,{ .@r = getrefine(); bonus bMaxHP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; bonus bMaxSP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; },{},{} 22106,Giant_Boots,Giant Boots,4,0,,500,,13,,1,0xFFFFFFFF,63,2,64,,1,1,,{ bonus2 bSubRace,RC_All,1; bonus bMaxHPrate,2; bonus bMaxSPrate,2; .@r = getrefine(); if (.@r > 4) { bonus bDefRate,2; bonus bMaxHPrate,4; bonus bMaxSPrate,4; } if (.@r > 6) { bonus bDefRate,2; bonus bMaxHPrate,4; bonus bMaxSPrate,4; } },{},{} 22122,Para_Team_Boots100,Awakened Eden Group Boots I,4,0,,0,,22,,0,0xFFFFFFFF,63,2,64,,100,1,,{ bonus bAllStats,1; bonus bHPrecovRate,30; bonus bSPrecovRate,14; },{},{} 22123,Para_Team_Boots115,Awakened Eden Group Boots II,4,0,,0,,25,,0,0xFFFFFFFF,63,2,64,,115,1,,{ bonus bAllStats,1; bonus bHPrecovRate,36; bonus bSPrecovRate,18; },{},{} @@ -11464,8 +11464,8 @@ 28318,RCC2013_RING_,RCC2013_RING_,4,200,,200,,,,1,0xFFFFFFFF,63,2,136,,1,0,,{ bonus2 bAddClass,Class_All,1; },{},{} 28310,Sarah's_Left_Earring,Sarah's Left Earring,4,10,,100,,,,0,0xFFFFFFFF,63,2,8,,145,0,,{ skill "AL_HEAL",1; },{},{} 28311,Sarah's_Right_Earring,Sarah's Right Earring,4,10,,100,,,,0,0xFFFFFFFF,63,2,128,,145,0,,{ skill "AL_TELEPORT",1; },{},{} -28321,Falconer_Claw,Falconer Claw,4,0,,100,,5,,1,0x00000800,63,2,136,0,80,0,,{ bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10; },{},{} -28322,Falconer_Glove,Falconer Glove,4,0,,100,,5,,1,0x00000800,63,2,136,0,80,0,,{ bonus bDex,1; bonus bUseSPrate,-5; },{},{} +28321,Falconer_Claw,Falconer Claw,4,0,,100,,5,,1,0x00000800,63,2,136,,80,0,,{ bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10; },{},{} +28322,Falconer_Glove,Falconer Glove,4,0,,100,,5,,1,0x00000800,63,2,136,,80,0,,{ bonus bDex,1; bonus bUseSPrate,-5; },{},{} 28326,Broken_Chips_01,Broken Chips 01,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,100,0,,{ bonus bStr,4; },{},{} 28327,Broken_Chips_02,Broken Chips 02,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,100,0,,{ bonus bInt,4; },{},{} 28332,Jewerly_Ring,Jewerly Ring,4,10,,100,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bLuk,20; autobonus "{ bonus bAspd,2; }",50,2000,BF_WEAPON|BF_MAGIC; },{},{} @@ -11474,18 +11474,18 @@ 28354,City_Map,City Map,4,0,,100,,0,,1,0xFFFFFFFF,63,2,136,,1,0,0,{ /* todo */ },{},{} 28355,Shining_Holy_Water,Shining Holy Water,4,0,,100,,0,,1,0xFFFFFFFF,63,2,136,,1,0,0,{ /* todo */ },{},{} 28356,Prontera_Badge,Prontera Badge,4,0,,100,,0,,0,0xFFFFFFFF,63,2,136,,1,0,0,{ /*warp "prontera",159,192; 15 mins cooldown */ },{},{} -28358,Cursed_Lucky_Clover,Cursed Lucky Clover,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,0,100,0,,{ bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5; },{},{ sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/ } -28372,Imperial_Ring,Imperial Ring,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,0,50,0,,{ bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3; },{},{} +28358,Cursed_Lucky_Clover,Cursed Lucky Clover,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,100,0,,{ bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5; },{},{ sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/ } +28372,Imperial_Ring,Imperial Ring,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,,50,0,,{ bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3; },{},{} 28374,Foxtail_Ring,Foxtail Ring,4,20,,100,,0,,0,0x80000000,7,2,136,,1,0,,{ bonus2 bExpAddRace,RC_All,5; .@lvl = min(BaseLevel/5,10); bonus bAtk,2*.@lvl; bonus bMatk,2*.@lvl; bonus bMaxHP,10*.@lvl; bonus bMaxSP,5*.@lvl; },{},{} -28377,Magical_Ring,Magical Ring,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,0,20,0,,{ bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Water,5; bonus2 bMagicAddEle,Ele_Earth,5; bonus2 bMagicAddEle,Ele_Wind,5; if (BaseLevel > 4) { bonus2 bSkillAtk,"MG_FIREBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_COLDBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_LIGHTNINGBOLT",BaseLevel/5; bonus2 bSkillAtk,"WZ_EARTHSPIKE",BaseLevel/5; } },{},{} +28377,Magical_Ring,Magical Ring,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,20,0,,{ bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Water,5; bonus2 bMagicAddEle,Ele_Earth,5; bonus2 bMagicAddEle,Ele_Wind,5; if (BaseLevel > 4) { bonus2 bSkillAtk,"MG_FIREBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_COLDBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_LIGHTNINGBOLT",BaseLevel/5; bonus2 bSkillAtk,"WZ_EARTHSPIKE",BaseLevel/5; } },{},{} 28380,Fresh_Grass_Necklace,Fresh Grass Necklace,4,20,,100,,0,,1,0x80000000,7,2,136,,100,0,,{ bonus bFlee2,5; bonus2 bSkillCooldown,"SU_SCAROFTAROU",-5000; },{},{} 28381,Cute_Grass_Necklace,Cute Grass Necklace,4,20,,10,,0,,1,0x80000000,7,2,136,,100,0,,{ bonus bHealPower,5; bonus2 bSkillCooldown,"SU_TUNAPARTY",-7000; },{},{} 28382,Charm_Grass_Necklace,Charm Grass Necklace,4,20,,10,,0,,1,0x80000000,7,2,136,,100,0,,{ bonus bMdef,5; bonus2 bVariableCastrate,"SU_CN_METEOR",-1000; },{},{} -28386,Fallen_Monk_Rosary,Fallen Monk Rosary,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,0,20,0,,{ bonus bAspdRate,5; bonus bCritical,5; bonus2 bSkillUseSP,"CH_SOULCOLLECT",-5; if (BaseLevel > 14) bonus2 bSkillAtk,"SR_DRAGONCOMBO",BaseLevel/15; if (BaseLevel > 19) bonus2 bSkillAtk,"SR_KNUCKLEARROW",BaseLevel/20; if (BaseLevel > 29) bonus2 bSkillAtk,"SR_SKYNETBLOW",BaseLevel/30; },{},{} +28386,Fallen_Monk_Rosary,Fallen Monk Rosary,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,20,0,,{ bonus bAspdRate,5; bonus bCritical,5; bonus2 bSkillUseSP,"CH_SOULCOLLECT",-5; if (BaseLevel > 14) bonus2 bSkillAtk,"SR_DRAGONCOMBO",BaseLevel/15; if (BaseLevel > 19) bonus2 bSkillAtk,"SR_KNUCKLEARROW",BaseLevel/20; if (BaseLevel > 29) bonus2 bSkillAtk,"SR_SKYNETBLOW",BaseLevel/30; },{},{} 28391,S_Thief_Earring,Thief Shadow Earring,12,0,,0,,,,0,0xFFFFFFFF,63,2,1048576,,1,1,,{ .@r = getrefine(); autobonus3 "{ bonus bBaseAtk,30+(.@r*10); bonus bFlee,30+(.@r*10); }",200,5000,"TF_THROWSTONE","{ specialeffect2 EF_ENHANCE; }"; },{},{} 28392,S_Archer_Earring,Archer Shadow Earring,12,0,,0,,,,0,0xFFFFFFFF,63,2,1048576,,1,1,,{ .@r = getrefine(); autobonus3 "{ bonus bBaseAtk,30+(.@r*10); bonus bHit,30+(.@r*10); }",200,5000,"AC_DOUBLE","{ specialeffect2 EF_ENHANCE; }"; },{},{} -28410,Sapphire_Wrist,Sapphire Wrist,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,0,50,0,,{ bonus bDex,5; bonus bLuk,5; bonus bInt,5; bonus2 bSkillAtk,"GN_SPORE_EXPLOSION",BaseLevel/5; bonus2 bVariableCastrate,"CR_ACIDDEMONSTRATION",-(BaseLevel/4); .@n = getskilllv("CR_SLIMPITCHER"); bonus bDex,.@n/2; bonus bLuk,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20; },{},{} -28411,Emerald_Earring,Emerald Earring,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,0,50,0,,{ bonus bDex,5; bonus bAgi,5; bonus bInt,5; bonus2 bSkillAtk,"CG_ARROWVULCAN",BaseLevel; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",BaseLevel; bonus2 bSkillAtk,"DC_THROWARROW",BaseLevel; bonus2 bSkillAtk,"WM_METALICSOUND",2*(BaseLevel/5); .@n = getskilllv("WM_METALICSOUND"); bonus2 bVariableCastrate,"WM_METALICSOUND",.@n/2; bonus bDex,.@n/2; bonus bAgi,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20; },{},{} +28410,Sapphire_Wrist,Sapphire Wrist,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,,50,0,,{ bonus bDex,5; bonus bLuk,5; bonus bInt,5; bonus2 bSkillAtk,"GN_SPORE_EXPLOSION",BaseLevel/5; bonus2 bVariableCastrate,"CR_ACIDDEMONSTRATION",-(BaseLevel/4); .@n = getskilllv("CR_SLIMPITCHER"); bonus bDex,.@n/2; bonus bLuk,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20; },{},{} +28411,Emerald_Earring,Emerald Earring,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,,50,0,,{ bonus bDex,5; bonus bAgi,5; bonus bInt,5; bonus2 bSkillAtk,"CG_ARROWVULCAN",BaseLevel; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",BaseLevel; bonus2 bSkillAtk,"DC_THROWARROW",BaseLevel; bonus2 bSkillAtk,"WM_METALICSOUND",2*(BaseLevel/5); .@n = getskilllv("WM_METALICSOUND"); bonus2 bVariableCastrate,"WM_METALICSOUND",.@n/2; bonus bDex,.@n/2; bonus bAgi,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20; },{},{} 28413,Lesser_Mackerel_Talisman,Lesser Mackerel Talisman,4,0,,100,,1,,1,0x80000000,63,2,136,,100,,,{ bonus bVit,1; },{},{} 28414,Intermediate_Mackerel_Talisman,Intermediate Mackerel Talisman,4,0,,100,,1,,1,0x80000000,63,2,136,,140,,,{ bonus bVit,2; },{},{} 28415,Greater_Mackerel_Talisman,Greater Mackerel Talisman,4,0,,100,,1,,1,0x80000000,63,2,136,,175,,,{ bonus bVit,3; },{},{} From 2d31bc3c430fb856589247b253a466661c3e0d0d Mon Sep 17 00:00:00 2001 From: rAthenaAPI <administrator@rathena.org> Date: Wed, 16 Aug 2017 19:52:33 +0200 Subject: [PATCH 115/124] SQL synchronization --- sql-files/item_db_re.sql | 152 +++++++++++++++++++-------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index d7da4a3f0c..7f1e31e0ab 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -1412,11 +1412,11 @@ REPLACE INTO `item_db_re` VALUES (2174,'Lumiere_Shield','Lumiere Shield',4,20,NU REPLACE INTO `item_db_re` VALUES (2175,'Esprit_Shield','Spirit Shield',4,20,NULL,1300,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,3,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (2176,'Dark_Book','Black Book',4,20,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,5,'bonus bMdef,5; .@r = getrefine(); bonus3 bAutoSpellWhenHit,"NPC_DRAGONFEAR",1,(.@r<=6)?(10):((.@r<=8)?(20):(30));',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2177,'Shield_Of_Death','Shield Of Death',4,20,NULL,2000,NULL,150,NULL,1,0xFFFFFFFF,63,2,32,NULL,'90',1,3,'bonus2 bAddClass,Class_Boss,2; bonus2 bMagicAddClass,Class_Boss,2; bonus2 bSubClass,Class_Normal,-10;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2178,'TE_Woe_Buckler','TE Woe Buckler',4,0,NULL,0,NULL,15,NULL,0,0xFFFFFFFF,63,2,32,1,'40',1,2,'bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2179,'TE_Woe_Shield','TE Woe Shield',4,0,NULL,0,NULL,25,NULL,0,0x000444A2,63,2,32,1,'40',1,3,'bonus bMdef,5; bonus bMaxHP,200; bonus2 bSubRace,RC_Player,20;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2180,'TE_Woe_Magic_Guard','TE Woe Magic Guard',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,32,1,'40',1,1,'bonus bMdef,25; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,10;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2178,'TE_Woe_Buckler','TE Woe Buckler',4,0,NULL,0,NULL,15,NULL,0,0xFFFFFFFF,63,2,32,NULL,'40',1,2,'bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2179,'TE_Woe_Shield','TE Woe Shield',4,0,NULL,0,NULL,25,NULL,0,0x000444A2,63,2,32,NULL,'40',1,3,'bonus bMdef,5; bonus bMaxHP,200; bonus2 bSubRace,RC_Player,20;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2180,'TE_Woe_Magic_Guard','TE Woe Magic Guard',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,32,NULL,'40',1,1,'bonus bMdef,25; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2181,'Hervor','Hervor',4,10,NULL,1500,NULL,100,NULL,0,0xFFFFFFFF,63,2,32,NULL,'1',NULL,2,'bonus bMdef,5; bonus2 bSubRace,RC_All,30; bonus bUnbreakableArmor,1;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2182,'Hervor_Alvitr','Hervor Alvitr',4,0,NULL,3000,NULL,150,NULL,0,0x000FDF80,56,2,32,1,'100',0,2,'bonus bMdef,10; bonus bVit,20; bonus2 bSubRace,RC_All,30; bonus bUnbreakableShield,1; autobonus2 "{ sc_end SC_STUN; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_STONE; sc_end SC_POISON; sc_end SC_BLIND; sc_end SC_SILENCE; sc_end SC_BLEEDING; sc_end SC_CONFUSION; sc_end SC_FREEZE; bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Sleep,10000; bonus2 bResEff,Eff_Curse,10000; bonus2 bResEff,Eff_Stone,10000; bonus2 bResEff,Eff_Poison,10000; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Silence,10000; bonus2 bResEff,Eff_Bleeding,10000; bonus2 bResEff,Eff_Confusion,10000; bonus2 bResEff,Eff_Freeze,10000; }",10,60000,BF_SHORT;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2182,'Hervor_Alvitr','Hervor Alvitr',4,0,NULL,3000,NULL,150,NULL,0,0x000FDF80,56,2,32,NULL,'100',0,2,'bonus bMdef,10; bonus bVit,20; bonus2 bSubRace,RC_All,30; bonus bUnbreakableShield,1; autobonus2 "{ sc_end SC_STUN; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_STONE; sc_end SC_POISON; sc_end SC_BLIND; sc_end SC_SILENCE; sc_end SC_BLEEDING; sc_end SC_CONFUSION; sc_end SC_FREEZE; bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Sleep,10000; bonus2 bResEff,Eff_Curse,10000; bonus2 bResEff,Eff_Stone,10000; bonus2 bResEff,Eff_Poison,10000; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Silence,10000; bonus2 bResEff,Eff_Bleeding,10000; bonus2 bResEff,Eff_Confusion,10000; bonus2 bResEff,Eff_Freeze,10000; }",10,60000,BF_SHORT;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2183,'Impr_Angel\'s_Safeguard','Advanced Angelic Guard',4,10000,NULL,400,NULL,30,NULL,1,0x00000001,63,2,32,NULL,'99',1,1,'bonus2 bSubRace,RC_Demon,5; bonus2 bSubEle,Ele_All,5; bonus2 bSubEle,Ele_Neutral,-5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2185,'Magic_Reflect','Magic Reflect',4,10,NULL,1000,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,NULL,'99',1,3,'bonus bMdef,10; bonus bMagicDamageReturn,3+((getrefine()>=9) ? 3 : 0);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2186,'Great_Encyclopedia_Revision','Great Encyclopedia Revision',4,10,NULL,200,'0:5',50,NULL,1,0x00810100,63,2,32,NULL,'99',1,4,'bonus bInt,3; bonus bDex,2; .@r = getrefine(); bonus bCritical,3+((.@r >= 7) ? 2 : 0); if(.@r >= 9) bonus bMatk,5;',NULL,NULL); @@ -1424,7 +1424,7 @@ REPLACE INTO `item_db_re` VALUES (2187,'Shield_of_Gray','Shield of Gray',4,10,NU REPLACE INTO `item_db_re` VALUES (2188,'Svalinn_J','Svalinn',4,10,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,3,'.@r = getrefine(); bonus bMaxHP,9+.@r/3; bonus2 bAddEle,Ele_Water,4+.@r/3*5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2189,'Mad_Bunny','Mad Bunny Shield',4,10,NULL,100,NULL,40,NULL,1,0xFFFFFFFF,63,2,32,NULL,'30',1,6,'bonus2 bSubEle,Ele_All,5; bonus bMdef,6; bonus bDex,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2190,'Ancient_Shield_Of_Aeon','Ancient Shield Of Aeon',4,0,NULL,200,NULL,5,NULL,0,0x000FDF80,63,2,32,NULL,'130',1,2,'bonus2 bSubEle,Ele_Neutral,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus2 bSubEle,Ele_Ghost,10; bonus bMaxHP,500; bonus bMaxSP,50; if(getrefine()>=14) skill "MG_STONECURSE",5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2195,'Lian_Shield','Lian Shield',4,0,NULL,1300,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,1,'65',1,NULL,'bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2195,'Lian_Shield','Lian Shield',4,0,NULL,1300,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,NULL,'bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2196,'White_Gold_Shield','White Gold Shield',4,0,NULL,1800,NULL,140,NULL,1,0xFFFFFFFF,63,2,32,NULL,NULL,1,NULL,'autobonus2 "{ bonus bMagicDamageReturn,20; }",100,2000,BF_MAGIC; /* Confirm: Success rate? */',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2198,'Lapine_Shield','Lapine Shield',4,0,NULL,1000,NULL,25,NULL,1,0xFFFFFFFF,63,2,32,NULL,'100',1,NULL,'bonus bMdef,10; if (getrefine() > 7) { bonus bMatk,20; }',NULL,NULL); # GM Shield @@ -1730,9 +1730,9 @@ REPLACE INTO `item_db_re` VALUES (2492,'Bayani_Bangungot_Boots','Bayani Bangungo REPLACE INTO `item_db_re` VALUES (2493,'Goibne\'s_Combat_Boots_','Goibne\'s Greaves',4,30000,NULL,700,NULL,13,NULL,1,0xFFFFFFFE,63,2,64,NULL,'54',1,0,'bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2494,'Chrystal_Pumps_','Crystal Pumps',4,20,NULL,100,NULL,5,NULL,1,0xFFFFFFFE,63,0,64,NULL,'0',1,0,'bonus bMdef,10; bonus bLuk,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2495,'Egir_Shoes','Egir Shoes',4,200000,NULL,300,NULL,13,NULL,1,0xFFFFFFFF,63,2,64,NULL,'110',1,0,'if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,BaseLevel*5; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,JobLevel*2;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2496,'TE_Woe_Shoes','TE Woe Shoes',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,64,0,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2497,'TE_Woe_Boots','TE Woe Boots',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,64,0,'40',1,NULL,'bonus bMaxHP,200; bonus bMaxSP,100; bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2498,'TE_Woe_Magic_Sandal','TE Woe Magic Sandal',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,64,1,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,100; bonus bMaxSP,200; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2496,'TE_Woe_Shoes','TE Woe Shoes',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,64,NULL,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2497,'TE_Woe_Boots','TE Woe Boots',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,64,NULL,'40',1,NULL,'bonus bMaxHP,200; bonus bMaxSP,100; bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2498,'TE_Woe_Magic_Sandal','TE Woe Magic Sandal',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,64,NULL,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,100; bonus bMaxSP,200; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2499,'Temporal_Boots','Temporal Boots',4,400,NULL,600,NULL,20,NULL,0,0xFFFFFFFF,63,2,64,NULL,'10',1,NULL,'.@r = getrefine(); bonus bMaxHP,300; bonus bMaxSP,30; bonus bMaxHP,100*(.@r/3); bonus bMaxSP,10*(.@r/3);',NULL,NULL); #=================================================================== # Garments @@ -2169,15 +2169,15 @@ REPLACE INTO `item_db_re` VALUES (2940,'Ninja_Manual','Ninja Manual',4,0,NULL,10 REPLACE INTO `item_db_re` VALUES (2941,'Gunslinger_Manual','Gunslinger Manual',4,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "GS_GLITTERING",1; skill "GS_ADJUSTMENT",1; skill "GS_MADNESSCANCEL",1; skill "GS_INCREASING",1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2942,'Taekwon_Manual','Taekwon Manual',4,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "TK_SEVENWIND",4; skill "TK_JUMPKICK",5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2943,'Critical_Ring_','Critical Ring',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,NULL,0,NULL,'bonus bCritical,5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2944,'TE_Ring_Of_Protection','TE Ring Of Protection',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'40',0,NULL,'bonus bMaxHP,100; bonus2 bSubRace,RC_Player,5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2945,'TE_Ring_Of_Rage','TE Ring Of Rage',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'40',0,NULL,'bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2946,'TE_Ring_Of_Defiance','TE Ring Of Defiance',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'40',0,NULL,'bonus bMdef,5; bonus2 bSubRace,RC_Player,5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2944,'TE_Ring_Of_Protection','TE Ring Of Protection',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'40',0,NULL,'bonus bMaxHP,100; bonus2 bSubRace,RC_Player,5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2945,'TE_Ring_Of_Rage','TE Ring Of Rage',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'40',0,NULL,'bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2946,'TE_Ring_Of_Defiance','TE Ring Of Defiance',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'40',0,NULL,'bonus bMdef,5; bonus2 bSubRace,RC_Player,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2948,'Demon_Wing','Demon Wing',4,10,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'70',NULL,NULL,'bonus bFlee,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2949,'Silversmith_Bracelet','Silversmith Bracelet',4,10,NULL,100,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,'60',NULL,NULL,'bonus bAllStats,1; bonus bMdef,3; skill "SA_SPELLBREAKER",5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2950,'Rune_Ring','Rune Ring',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'1',0,NULL,'bonus2 bExpAddClass,Class_Normal,10;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2951,'Kvasir_Ring_Blue','Kvasir Ring Blue',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'1',0,NULL,'bonus bMaxSP,30; skill "ECL_SNOWFLIP",1;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2952,'Kvasir_Ring_Red','Kvasir Ring Red',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'1',0,NULL,'bonus bMaxSP,30; skill "ECL_PEONYMAMY",1;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2953,'Kvasir_Ring_Green','Kvasir Ring Green',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'1',0,NULL,'bonus bMaxHP,100; skill "ECL_SADAGUI",1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2950,'Rune_Ring','Rune Ring',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus2 bExpAddClass,Class_Normal,10;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2951,'Kvasir_Ring_Blue','Kvasir Ring Blue',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bMaxSP,30; skill "ECL_SNOWFLIP",1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2952,'Kvasir_Ring_Red','Kvasir Ring Red',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bMaxSP,30; skill "ECL_PEONYMAMY",1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2953,'Kvasir_Ring_Green','Kvasir Ring Green',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bMaxHP,100; skill "ECL_SADAGUI",1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2954,'Kvasir_Ring_Brown','Kvasir Ring Brown',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',NULL,NULL,'bonus bMaxHP,100;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2956,'Safety_Ring_','Advanced Safety Ring',4,75000,NULL,100,NULL,10,NULL,1,0xFFFFFFFE,63,2,136,NULL,'50',0,0,'bonus bMdef,5; bonus bAllStats,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2957,'Good_Ring_Of_Flame_Lord','Advanced Ring Of Flame Lord',4,20,NULL,100,NULL,0,NULL,0,0x7CCFDF80,63,2,136,NULL,'85',0,0,'bonus bStr,3; bonus bVit,2; bonus bBaseAtk,20; bonus2 bSubEle,Ele_Fire,10; bonus3 bAutoSpell,"CH_SOULCOLLECT",1,30; bonus3 bAutoSpell,"MO_EXPLOSIONSPIRITS",1,10; bonus3 bAutoSpell,"PA_PRESSURE",2,30; bonus3 bAutoSpell,"MG_FIREBALL",1,150; bonus3 bAutoSpell,"KN_BOWLINGBASH",5,20;',NULL,NULL); @@ -2210,7 +2210,7 @@ REPLACE INTO `item_db_re` VALUES (2992,'Pendant_of_Maelstrom','Pendant of Maelst REPLACE INTO `item_db_re` VALUES (2995,'Supplement_Part_Dex','Supplement Part Dex',4,25000,NULL,100,NULL,0,NULL,1,0x00000400,56,2,136,NULL,'100',0,0,'bonus bUseSPrate,-10; bonus bDelayrate,-10; bonus bVariableCastrate,-10; bonus2 bSkillVariableCast,"NC_AXEBOOMERANG",-2000;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2996,'Reinforced_Parts_Gun_Barrel','Reinforced Parts - Gun Barrel',4,10,NULL,500,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'100',NULL,NULL,'bonus2 bAddClass,Class_All,4; bonus bHit,10; bonus2 bSkillAtk,"NC_BOOSTKNUCKLE",25;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2997,'RWC_Gold_Brooch','RWC Gold Brooch',4,10,NULL,200,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'0',0,NULL,'bonus bBaseAtk,25; bonus bMatk,20;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (2998,'Shining_Trapezohedron','Shining Trapezohedron',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,1,'90',1,NULL,'bonus2 bSubEle,Ele_Holy,10;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2998,'Shining_Trapezohedron','Shining Trapezohedron',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'90',1,NULL,'bonus2 bSubEle,Ele_Holy,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2999,'RWC_Brooch','RWC Brooch',4,10,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,136,NULL,'0',0,NULL,'bonus bMaxHP,300; bonus bMaxSP,30;',NULL,NULL); #=================================================================== # Cards @@ -4038,23 +4038,23 @@ REPLACE INTO `item_db_re` VALUES (5893,'RCC2013_2ND_CROWN','RCC2013 2ND CROWN',4 REPLACE INTO `item_db_re` VALUES (5894,'RCC2013_3RD_CROWN','RCC2013 3RD CROWN',4,20,NULL,2500,NULL,7,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',0,1108,'bonus bAllStats,3; skill "AL_TELEPORT",1;','sc_start SC_SPEEDUP0,-1,25;','sc_end SC_SPEEDUP0;'); REPLACE INTO `item_db_re` VALUES (5895,'RCC2013_ANV_Hat','RCC2013 ANV Hat',4,20,NULL,2500,NULL,7,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',0,1109,'bonus bAllStats,1; bonus2 bAddClass,Class_All,2; bonus bMatkRate,2;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (5906,'Oni_Horns_','Oni Horns',4,0,NULL,20,NULL,10,NULL,1,0x00001000,63,2,256,NULL,'100',1,1127,'bonus2 bSkillAtk,"GC_COUNTERSLASH",(10*getskilllv("GC_WEAPONBLOCKING")); .@r = getrefine(); if(.@r > 6){ bonus bAtk,20; bonus bHit,5; } if(.@r > 9){ bonus3 bAutoSpell,"GC_CROSSIMPACT",1,10; }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5914,'C_Flutter_Butterfly','C Flutter Butterfly',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,1,'1',0,1378,'hateffect HAT_EF_FLUTTER_BUTTERFLY,true;',NULL,'hateffect HAT_EF_FLUTTER_BUTTERFLY,false;'); -REPLACE INTO `item_db_re` VALUES (5917,'Yellow_Scarf','Yellow Scarf',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,0,'90',0,1170,'bonus bLongAtkDef,3;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5914,'C_Flutter_Butterfly','C Flutter Butterfly',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',0,1378,'hateffect HAT_EF_FLUTTER_BUTTERFLY,true;',NULL,'hateffect HAT_EF_FLUTTER_BUTTERFLY,false;'); +REPLACE INTO `item_db_re` VALUES (5917,'Yellow_Scarf','Yellow Scarf',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'90',0,1170,'bonus bLongAtkDef,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (5918,'Gambler_Seal','Gambler Seal',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,NULL,0,1202,'bonus bCritical,3; bonus bCritAtkRate,3; bonus2 bSubSkill,"RA_ARROWSTORM",10; bonus2 bSubSkill,"SR_GATEOFHELL",10; .@dex = readparam(bDex); .@luk = readparam(bLuk); bonus bCritAtkRate,-(.@dex/10)*2; bonus bCritical,.@luk/10; bonus bBaseAtk,(.@luk/10)*2; bonus bMatk,(.@luk/10)*2; if (.@luk > 120) { bonus bCritical,10; bonus bCritAtkRate,10; bonus2 bSubSkill,"RA_ARROWSTORM",30; bonus2 bSubSkill,"SR_GATEOFHELL",30; } else if (.@luk > 108) { bonus bCritical,5; bonus bCritAtkRate,10; }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5919,'Camellia_Hair_Pin','Camellia Hair Pin',4,0,NULL,1000,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,256,0,'50',1,1203,'bonus bMdef,20; bonus3 bAutoSpell,"AL_PNEUMA",1,30+getrefine()*5; /* CONFIRM The Rate*/',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5919,'Camellia_Hair_Pin','Camellia Hair Pin',4,0,NULL,1000,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,256,NULL,'50',1,1203,'bonus bMdef,20; bonus3 bAutoSpell,"AL_PNEUMA",1,30+getrefine()*5; /* CONFIRM The Rate*/',NULL,NULL); REPLACE INTO `item_db_re` VALUES (5920,'Medical_Boots','Medical Boots',4,0,NULL,300,NULL,10,NULL,0,0xFFFFFFFF,63,2,64,NULL,'10',1,NULL,'.@r = getrefine(); bonus bHealPower,10+((.@r/2) * 2); bonus2 bSkillUseSP,"AB_CHEAL",(.@r * 5);',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5943,'Owlviscount_Silk_Hat','Owl Viscount Silk Hat',4,0,NULL,500,NULL,15,NULL,1,0xFFFFFFFF,63,2,256,0,'70',1,1323,'bonus bInt,1; bonus bAspdRate,10; .@r = getrefine(); bonus bMatk,7*.@r; autobonus "{ .@r = getrefine(); bonus bAspdRate,(.@r >= 9 ? 40 : ((.@r >= 7) ? 10 : ((.@r >= 5) ? 5 : 1))); }",.@r*20,30000,BF_MAGIC,"{ specialeffect2 EF_SPELLBREAKER }";',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5966,'KarduiEar','KarduiEar',4,0,NULL,300,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,0,'70',0,1357,'.@dex = readparam(bDex); bonus bMatk,(.@dex > 10) ? .@dex/10*2 : 0; if (.@dex > 107) { bonus bVariableCastrate,-10; bonus bMatk,60; } if (.@dex > 119) { bonus bVariableCastrate,-5; bonus bMatk,100; }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5967,'Flying Galapago','Flying Galapago',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,0,'110',0,1358,'bonus bAgi,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*40;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5968,'DVAngelNurseCap','DVAngelNurseCap',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,256,0,'50',1,1359,'if (BaseClass == Job_Acolyte) bonus bHealPower,3; bonus bNoCastCancel,1; .@r = getrefine(); bonus bHealPower,(.@r > 8) ? 12 : ((.@r > 6) ? 9 : ((.@r > 4) ? 6 : 0));',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5969,'QueenAnzRevenge','QueenAnzRevenge',4,0,NULL,400,NULL,7,NULL,1,0xFFFFFFFF,63,2,256,0,'100',1,1360,'bonus bStr,5; .@r = getrefine(); bonus2 bAddClass,Class_All,7+(.@r > 8 ? 4 : (.@r > 6 ? 3 : (.@r > 4 ? 2 : 0))); bonus bNoSizeFix,1;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5971,'Moon_Eyepatch','Moon Eyepatch',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,512,0,'10',0,1370,'bonus2 bSubEle,Ele_Water,5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5972,'Chatty_Parrot','Chatty Parrot',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,0,'80',0,1116,'bonus bMatkRate,BaseLevel/50; bonus bVariableCast,-readparam(bInt)/30;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5973,'Ancient_Elven_Ear_J','Ancient Elven Ear J',4,0,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,0,'70',0,665,'bonus bLuk,10; bonus bMdef,10; bonus bFlee2,2;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5978,'Syringe_Toy','Toy Syringe',4,0,NULL,100,NULL,3,NULL,0,0xFFFFFFFF,63,2,1,1,'70',0,842,'bonus bMdef,3; bonus2 bAddItemHealRate,545,150; bonus2 bAddItemHealRate,546,150; bonus2 bAddItemHealRate,547,150;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5979,'C_Angel_Fluttering','C Angel Fluttering',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,0,'1',0,1380,'hateffect HAT_EF_ANGEL_FLUTTERING,true;',NULL,'hateffect HAT_EF_ANGEL_FLUTTERING,false;'); -REPLACE INTO `item_db_re` VALUES (5980,'C_Classical_Fhat','C Classical Fhat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,0,'1',0,1381,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (5985,'Noble_Mask','Noble Mask',4,0,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,256,0,'30',0,1409,'bonus2 bSkillAtk,"PA_SACRIFICE",BaseLevel*2; bonus2 bSkillVariableCast,"PA_PRESSURE",-2000; bonus2 bSkillVariableCast,"CR_DEVOTION",-2000; if (BaseLevel > 149) { bonus bMaxHPrate,3; bonus bAspdRate,3; } else if (BaseLevel > 99) { bonus bMaxHPrate,2; bonus bAspdRate,2; } else { bonus bMaxHPrate,1; bonus bAspdRate,1; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5943,'Owlviscount_Silk_Hat','Owl Viscount Silk Hat',4,0,NULL,500,NULL,15,NULL,1,0xFFFFFFFF,63,2,256,NULL,'70',1,1323,'bonus bInt,1; bonus bAspdRate,10; .@r = getrefine(); bonus bMatk,7*.@r; autobonus "{ .@r = getrefine(); bonus bAspdRate,(.@r >= 9 ? 40 : ((.@r >= 7) ? 10 : ((.@r >= 5) ? 5 : 1))); }",.@r*20,30000,BF_MAGIC,"{ specialeffect2 EF_SPELLBREAKER }";',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5966,'KarduiEar','KarduiEar',4,0,NULL,300,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,1357,'.@dex = readparam(bDex); bonus bMatk,(.@dex > 10) ? .@dex/10*2 : 0; if (.@dex > 107) { bonus bVariableCastrate,-10; bonus bMatk,60; } if (.@dex > 119) { bonus bVariableCastrate,-5; bonus bMatk,100; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5967,'Flying Galapago','Flying Galapago',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'110',0,1358,'bonus bAgi,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*40;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5968,'DVAngelNurseCap','DVAngelNurseCap',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,256,NULL,'50',1,1359,'if (BaseClass == Job_Acolyte) bonus bHealPower,3; bonus bNoCastCancel,1; .@r = getrefine(); bonus bHealPower,(.@r > 8) ? 12 : ((.@r > 6) ? 9 : ((.@r > 4) ? 6 : 0));',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5969,'QueenAnzRevenge','QueenAnzRevenge',4,0,NULL,400,NULL,7,NULL,1,0xFFFFFFFF,63,2,256,NULL,'100',1,1360,'bonus bStr,5; .@r = getrefine(); bonus2 bAddClass,Class_All,7+(.@r > 8 ? 4 : (.@r > 6 ? 3 : (.@r > 4 ? 2 : 0))); bonus bNoSizeFix,1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5971,'Moon_Eyepatch','Moon Eyepatch',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,512,NULL,'10',0,1370,'bonus2 bSubEle,Ele_Water,5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5972,'Chatty_Parrot','Chatty Parrot',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'80',0,1116,'bonus bMatkRate,BaseLevel/50; bonus bVariableCast,-readparam(bInt)/30;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5973,'Ancient_Elven_Ear_J','Ancient Elven Ear J',4,0,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,665,'bonus bLuk,10; bonus bMdef,10; bonus bFlee2,2;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5978,'Syringe_Toy','Toy Syringe',4,0,NULL,100,NULL,3,NULL,0,0xFFFFFFFF,63,2,1,NULL,'70',0,842,'bonus bMdef,3; bonus2 bAddItemHealRate,545,150; bonus2 bAddItemHealRate,546,150; bonus2 bAddItemHealRate,547,150;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5979,'C_Angel_Fluttering','C Angel Fluttering',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',0,1380,'hateffect HAT_EF_ANGEL_FLUTTERING,true;',NULL,'hateffect HAT_EF_ANGEL_FLUTTERING,false;'); +REPLACE INTO `item_db_re` VALUES (5980,'C_Classical_Fhat','C Classical Fhat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',0,1381,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (5985,'Noble_Mask','Noble Mask',4,0,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,256,NULL,'30',0,1409,'bonus2 bSkillAtk,"PA_SACRIFICE",BaseLevel*2; bonus2 bSkillVariableCast,"PA_PRESSURE",-2000; bonus2 bSkillVariableCast,"CR_DEVOTION",-2000; if (BaseLevel > 149) { bonus bMaxHPrate,3; bonus bAspdRate,3; } else if (BaseLevel > 99) { bonus bMaxHPrate,2; bonus bAspdRate,2; } else { bonus bMaxHPrate,1; bonus bAspdRate,1; }',NULL,NULL); #=================================================================== # More Etc Items #=================================================================== @@ -8637,11 +8637,11 @@ REPLACE INTO `item_db_re` VALUES (15058,'Rider_Suit','Rider Suit',4,20,NULL,1000 REPLACE INTO `item_db_re` VALUES (15059,'2011Love_Daddy','2011Love Daddy',4,20,NULL,100,'0',80,0,1,0xFFFFFFFF,63,2,16,NULL,'0',1,0,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (15060,'Sky_Blue_Smock','Sky Blue Smock',4,20,NULL,300,'0',1,0,1,0xFFFFFFFF,63,2,16,NULL,'0',1,0,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (15061,'Egir_Armor','Egir Armor',4,200000,NULL,2600,NULL,55,NULL,1,0xFFFFFFFF,63,2,16,NULL,'110',1,0,'bonus bAllStats,1; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (15062,'TE_Woe_Coat','TE Woe Coat',4,0,NULL,0,NULL,15,NULL,0,0xFFFFFFFF,63,2,16,0,'40',1,NULL,'bonus bMdef,15; bonus bMaxHP,250; bonus bMaxSP,250; bonus2 bSubRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (15063,'TE_Woe_Chain_Mail','TE Woe Chain Mail',4,0,NULL,0,NULL,25,NULL,0,0x000444A2,63,2,16,0,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,450; bonus bMaxSP,50; bonus2 bSubRace,RC_Player,15; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (15064,'TE_Woe_Mage_Coat','TE Woe Mage Coat',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,16,0,'40',1,NULL,'bonus bMdef,25; bonus bMaxHP,200; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (15062,'TE_Woe_Coat','TE Woe Coat',4,0,NULL,0,NULL,15,NULL,0,0xFFFFFFFF,63,2,16,NULL,'40',1,NULL,'bonus bMdef,15; bonus bMaxHP,250; bonus bMaxSP,250; bonus2 bSubRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (15063,'TE_Woe_Chain_Mail','TE Woe Chain Mail',4,0,NULL,0,NULL,25,NULL,0,0x000444A2,63,2,16,NULL,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,450; bonus bMaxSP,50; bonus2 bSubRace,RC_Player,15; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (15064,'TE_Woe_Mage_Coat','TE Woe Mage Coat',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,16,NULL,'40',1,NULL,'bonus bMdef,25; bonus bMaxHP,200; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (15066,'Engraved_Plate_Armor','Engraved Plate Armor',4,100000,NULL,3000,NULL,120,NULL,1,0x00004082,63,2,16,NULL,'150',1,NULL,'bonus bMdef,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (15067,'Rune_Suit','Rune Suit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,16,0,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (15067,'Rune_Suit','Rune Suit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,16,NULL,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (15068,'Im_Angel\'s_Protection','Advanced Angelic Protection',4,10000,NULL,600,NULL,40,NULL,1,0x00000001,63,2,16,NULL,'99',1,0,'bonus bMdef,30;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (15069,'Suit_Of_Sid','Suit Of Sid',4,20,NULL,1000,NULL,30,NULL,0,0xFFFFFFFF,63,2,16,NULL,'0',1,0,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (15070,'Clothes_of_Happiness','Clothes of Happiness',4,10,NULL,1000,NULL,5,NULL,1,0xFFFFFFFF,63,2,16,NULL,'1',1,NULL,'bonus bMdef,5; bonus bLuk,getrefine();',NULL,NULL); @@ -9698,10 +9698,10 @@ REPLACE INTO `item_db_re` VALUES (18727,'Sedora_Hat','Sedora Hat',4,20,NULL,300, REPLACE INTO `item_db_re` VALUES (18728,'Egir_Helm','Egir Helm',4,200000,NULL,800,NULL,10,NULL,1,0xFFFFFFFF,63,2,256,NULL,'110',1,870,'bonus bMdef,5; bonus bUnbreakableHelm,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18729,'MVP_Basketball','MVP Basketball',4,20,NULL,150,NULL,6,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',1,871,'bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10; bonus2 bAddItemHealRate,522,30; .@r = getrefine(); bonus bVariableCastrate,(.@r>=12)?(-5):((.@r>=10)?(-4):(-3));',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18730,'Cryptura_Academy_Hat','Cryptura Academy Hat',4,0,NULL,200,NULL,2,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,872,'bonus bMaxHP,15; bonus bMaxSP,5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18732,'TE_Woe_Cap','TE Woe Cap',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,256,0,'40',1,14,'bonus bMdef,5; bonus bBaseAtk,5; bonus bMatk,5; bonus2 bAddRace,RC_Player,10; bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18733,'TE_Woe_Bone_Helm','TE Woe Bone Helm',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,256,0,'40',1,103,'bonus bBaseAtk,10; bonus2 bAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18734,'TE_Woe_Magic_Eyes','TE Woe Magic Eyes',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,256,0,'40',1,209,'bonus bMdef,5; bonus bMatk,10; bonus2 bMagicAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18736,'Censor_Bar_','Censor Bar',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,0,'1',0,229,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18732,'TE_Woe_Cap','TE Woe Cap',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,256,NULL,'40',1,14,'bonus bMdef,5; bonus bBaseAtk,5; bonus bMatk,5; bonus2 bAddRace,RC_Player,10; bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18733,'TE_Woe_Bone_Helm','TE Woe Bone Helm',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,256,NULL,'40',1,103,'bonus bBaseAtk,10; bonus2 bAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18734,'TE_Woe_Magic_Eyes','TE Woe Magic Eyes',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,256,NULL,'40',1,209,'bonus bMdef,5; bonus bMatk,10; bonus2 bMagicAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18736,'Censor_Bar_','Censor Bar',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,'1',0,229,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (18737,'Fortier_Mask','Fortier Masque',4,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'10',0,876,'bonus bUnbreakableHelm,1; bonus2 bMagicAtkEle,Ele_Fire,4;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18739,'Carnation_Hairband','Carnation Hairband',4,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,256,NULL,'0',1,878,'bonus bLuk,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18740,'Hair_Of_The_Strong','RMSC2012 Special Costume',4,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,879,NULL,NULL,NULL); @@ -9718,7 +9718,7 @@ REPLACE INTO `item_db_re` VALUES (18750,'Poker_Card_In_Mouth','Poker Card In Mou REPLACE INTO `item_db_re` VALUES (18752,'Cursed_Book','Cursed Book',4,20,NULL,300,NULL,3,NULL,1,0xFFFFFFFE,63,2,256,NULL,'99',1,890,'.@r = getrefine(); bonus2 bHPLossRate,.@r,5000; bonus2 bHPDrainRate,40,4+(.@r/2); bonus2 bSPDrainRate,10,1+(.@r/3);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18753,'Tw_Rice_Ball','Tw Rice Ball',4,20,NULL,100,NULL,6,NULL,0,0xFFFFFFFF,63,2,256,NULL,'0',0,892,'bonus bLuk,1; bonus2 bAddMonsterDropItem,564,100;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18754,'Blood_Sucker','Blood Sucker',4,20,NULL,300,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'40',0,893,'bonus bUnbreakableHelm,1; bonus2 bHPDrainRate,30,5; bonus bHPrecovRate,-100; bonus bSPrecovRate,-100;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18755,'Feather_Beret_','Feather Beret',4,0,NULL,600,NULL,1,NULL,1,0xFFFFFFFF,63,2,256,0,'1',1,224,'bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18755,'Feather_Beret_','Feather Beret',4,0,NULL,600,NULL,1,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',1,224,'bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18756,'Black_Shiba_Inu_Hat','Black Shiba Inu Hat',4,20,NULL,400,NULL,6,NULL,1,0xFFFFFFFF,63,2,256,NULL,'50',1,894,'bonus bBaseAtk,30; bonus2 bAddRace,RC_Brute,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18758,'Hat_Of_Scrat','Hat Of Scrat',4,20,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,896,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (18759,'Stretched_Nose_M','Wood Goblin\'s Nose',4,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',0,737,'bonus bUnbreakableHelm,1; bonus2 bAddMonsterDropItem,1032,400; bonus2 bAddMonsterDropItem,1033,100; bonus3 bAddMonsterDropItem,576,RC_Plant,40;',NULL,NULL); @@ -9798,7 +9798,7 @@ REPLACE INTO `item_db_re` VALUES (18861,'Zaha_Doll_J_Hat','Zaha Doll J Hat',4,10 REPLACE INTO `item_db_re` VALUES (18863,'Exorcist_Robe','Exorcist Robe',4,10,NULL,1700,NULL,57,NULL,1,0xFFFFFFFF,63,2,16,NULL,'60',1,NULL,'bonus bMdef,5; .@r = getrefine(); if (.@r >= 3) { bonus2 bAddRace,RC_Undead,.@r/3*5; } if (BaseClass==Job_Acolyte) bonus2 bAddRace,RC_Undead,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18864,'Earth_Goddess_Flower','Earth Goddess Flower',4,10,NULL,250,NULL,6,NULL,0,0xFFFFFFFF,63,2,256,NULL,'1',1,864,'bonus2 bAddEle,Ele_Earth,15; skill "WZ_EARTHSPIKE",5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18865,'Sword_Master_Crown','Sword Master Crown',4,10,NULL,1000,NULL,30,NULL,1,0xFFFFFFFF,63,2,256,NULL,'50',1,981,'.@i = BaseLevel; bonus bBaseAtk,(.@i>150)?(15):((.@i>100)?(10):((.@i>50)?(5):(0))); if(getskilllv("SM_SWORD")==10) bonus bHit,10; if(getskilllv("SM_TWOHAND")==10) bonus bUseSPrate,-5; if(getskilllv("AM_AXEMASTERY")==10) bonus bVariableCastrate,-5; if(getskilllv("AS_KATAR")==10) bonus bCritAtkRate,20; if(getskilllv("PR_MACEMASTERY")==10) bonus bAspdRate,10;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18867,'Vajra','Vajra',4,0,NULL,300,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,0,'48',0,983,'bonus bDex,1; bonus bLongAtkRate,2;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18867,'Vajra','Vajra',4,0,NULL,300,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'48',0,983,'bonus bDex,1; bonus bLongAtkRate,2;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18868,'Assassin_Skull_Mask','Assassin Skull Mask',4,10,NULL,500,NULL,2,NULL,0,0xFFFFFFFF,63,2,513,NULL,'70',NULL,984,'bonus bCritical,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18870,'Very_Sweet_Candy_Bar','Very Sweet Candy Bar',4,10,NULL,10,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'1',1,446,'bonus bAllStats,2; bonus bBaseAtk,10; bonus bMatk,10; bonus2 bExpAddClass,Class_All,2;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18871,'Very_Sweet_Candy','Very Sweet Candy',4,10,NULL,10,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'1',1,446,'bonus bAllStats,1; bonus bBaseAtk,5; bonus bMatk,5;',NULL,NULL); @@ -9867,7 +9867,7 @@ REPLACE INTO `item_db_re` VALUES (19019,'Elemental_Crown','Elemental Crown',4,0, REPLACE INTO `item_db_re` VALUES (19020,'Survive_Circlet','Survive Circlet',4,0,NULL,500,NULL,10,NULL,0,0xFFFFFFFF,63,2,256,NULL,NULL,1,1220,'.@r = getrefine(); bonus bInt,(3 + (.@r/2)+ (BaseLevel > 130 ? .@r : 0)); bonus bMatkRate,4;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19021,'Gigant_Helm','Gigant Helm',4,0,NULL,500,NULL,10,NULL,0,0xFFFFFFFF,63,2,256,NULL,NULL,1,1221,'bonus bStr,3+((BaseLevel > 130) ? getrefine() : 0); bonus2 bAddClass,Class_All,4;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19022,'Floating_Stone_Of_Intelligence','Floating Stone Of Intelligence',4,NULL,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,NULL,NULL,1230,NULL,'sc_start SC_FSTONE,-1,0;','sc_end SC_FSTONE;'); -REPLACE INTO `item_db_re` VALUES (19024,'Protect_Feathers','Protect Feathers',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,0,'70',0,1232,'bonus2 bSubRace,RC_DemiHuman,2; bonus2 bSubRace,RC_Player,2; bonus bAspdRate,-5; .@vit = readparam(bVit); if (.@vit >= 108) { bonus2 bSubRace,RC_DemiHuman,3; bonus2 bSubRace,RC_Player,3; bonus bAspdRate,-5; } if (.@vit >= 120) { bonus bMaxHPRate,3; bonus bMdef,3; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (19024,'Protect_Feathers','Protect Feathers',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,1232,'bonus2 bSubRace,RC_DemiHuman,2; bonus2 bSubRace,RC_Player,2; bonus bAspdRate,-5; .@vit = readparam(bVit); if (.@vit >= 108) { bonus2 bSubRace,RC_DemiHuman,3; bonus2 bSubRace,RC_Player,3; bonus bAspdRate,-5; } if (.@vit >= 120) { bonus bMaxHPRate,3; bonus bMdef,3; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19026,'Aegir_Helm','Aegir Helm',4,10,NULL,800,NULL,10,NULL,1,0xFFFFFFFF,63,2,256,NULL,'40',1,870,'bonus bVit,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19030,'Pretty_Rabbit_Hood','Pretty Rabbit Hood',4,10,NULL,100,NULL,20,NULL,1,0xFFFFFFFF,63,2,769,NULL,'1',1,1085,'bonus bMaxHP,(15*BaseLevel);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19031,'Fallen_Angel_Blessing','Fallen Angel Blessing',4,0,NULL,200,NULL,1,NULL,0,0xFFFFFFFF,63,2,512,NULL,NULL,1,1250,'bonus2 bAddRace,RC_Angel,5; bonus2 bSubRace,RC_Angel,5;',NULL,NULL); @@ -9879,7 +9879,7 @@ REPLACE INTO `item_db_re` VALUES (19048,'Elemental_Clothe','Elemental Clothes',4 REPLACE INTO `item_db_re` VALUES (19051,'Warrior_Moon_Cat','Warrior Moon Cat',4,20,NULL,100,NULL,5,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',1,1308,'/*Enables use of Level 1 Monster\'s Cry*/ bonus bAllStats,3; bonus2 bHPDrainRate,40,5; bonus2 bSPDrainRate,10,2;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19052,'Sigruns_Wing','Rental Sigrun\'s Wing',4,10,NULL,0,NULL,2,NULL,0,0xFFFFFFFF,63,2,512,NULL,'1',0,568,'if (Class == Job_Swordman || Class == Job_Thief || Class == Job_Merchant || Class == Job_Taekwon || Class == Job_Star_Gladiator || Class == Job_Star_Gladiator2) bonus bAspd,1; else if (Class == Job_Mage || Class == Job_Acolyte || Class == Job_Ninja || Class == Job_Soul_Linker) { bonus bMatk,5; bonus bHealPower,2; } else if (Class == Job_Archer || Class == Job_Gunslinger) bonus bLongAtkRate,2; else if (Class == Job_Novice || Class == Job_SuperNovice) { bonus bMaxHP,120; bonus bMaxSP,60; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19053,'Fighter_Moon_Cat','Fighter Moon Cat',4,20,NULL,100,NULL,5,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',1,1308,'/*Enables use of Level 1 Monster\'s Cry*/ .@r = getrefine(); bonus bAllStats,3; bonus2 bAddEff,Eff_Stun,500+(.@r*100);',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (19082,'Bio_Protector','Bio Protector',4,0,NULL,500,NULL,3,NULL,0,0xFFFFFFFF,63,2,512,1,'50',1,1366,'bonus bHit,10; bonus bVariableCastrate,-5; bonus bPerfectHitRate,5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (19082,'Bio_Protector','Bio Protector',4,0,NULL,500,NULL,3,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',1,1366,'bonus bHit,10; bonus bVariableCastrate,-5; bonus bPerfectHitRate,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19083,'Mask_of_Hero','Mask of Hero',4,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,1367,'bonus bVit,10; bonus bMdef,10; bonus bShortWeaponDamageReturn,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19084,'Parfaille_Vigilante_Hat','Parfaille Vigilante Hat',4,0,NULL,100,NULL,2,NULL,0,0x80000000,63,2,256,NULL,'20',1,1368,'bonus bLuk,1; bonus3 bAutoSpell,"AL_BLESSING",3,100;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19085,'Sigrun\'s_Wings_','Sigrun\'s Wings',4,20,NULL,100,NULL,2,NULL,1,0xFFFFFFFF,63,2,512,NULL,'1',0,568,'if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief||(BaseJob==Job_Taekwon&&Class!=Job_Soul_Linker)) { bonus bAspd,1; bonus bAgi,-2; } else if(BaseClass==Job_Mage||BaseClass==Job_Acolyte||Class==Job_Ninja||Class==Job_Soul_Linker){ bonus bMatk,3; bonus bHealPower,2; } else if(BaseClass==Job_Archer||BaseClass==Job_Gunslinger) bonus bLongAtkRate,1; else if(BaseJob==Job_Novice||BaseJob==Job_SuperNovice) { bonus bMaxHP,60; bonus bMaxSP,30; }',NULL,NULL); @@ -9893,9 +9893,9 @@ REPLACE INTO `item_db_re` VALUES (19092,'Machoman_Glasses_','Machoman\'s Glasses REPLACE INTO `item_db_re` VALUES (19093,'Spinning_Eyes_','Geek Glasses',4,20000,NULL,100,NULL,1,NULL,1,0xFFFFFFFF,63,2,512,NULL,'0',0,27,'bonus2 bResEff,Eff_Blind,800;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19094,'Mr_Smile_','Mr. Smile',4,60,NULL,100,NULL,1,NULL,1,0xFFFFFFFF,63,2,513,NULL,'0',0,65,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19095,'Happy_Balloon','Happy Balloon',4,0,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'1',0,1289,'bonus2 bDropAddRace,RC_All,5; bonus2 bExpAddRace,RC_All,5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (19109,'Valhalla_Idol','Valhalla Idol',4,0,NULL,300,NULL,2,NULL,0,0xFFFFFFFF,63,2,512,0,'70',0,1423,'bonus bMaxSP,50; bonus3 bAutoSpell,"MG_SAFETYWALL",10,50;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (19111,'Laser_Of_Eagle','Laser of Eagle',4,0,NULL,400,NULL,5,NULL,1,0xFFFFFFFF,63,2,256,0,'100',1,1424,'bonus bDex,2; bonus bLongAtkRate,10; bonus4 bAutoSpell,"PR_LEXAETERNA",1,50,BF_LONG; /*TODO: Chance to transform become Shechil while attacking.*/',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (19116,'Red_Baby_Dragon','Red Baby Dragon',4,0,NULL,700,NULL,NULL,1,1,0xFFFFFFFF,63,2,256,0,'90',1,1463,'.@r=getrefine(); bonus bMaxHPrate,5; bonus bMaxSPrate,5; bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; if (.@r>=6) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } if (.@r>=8) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (19109,'Valhalla_Idol','Valhalla Idol',4,0,NULL,300,NULL,2,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,1423,'bonus bMaxSP,50; bonus3 bAutoSpell,"MG_SAFETYWALL",10,50;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (19111,'Laser_Of_Eagle','Laser of Eagle',4,0,NULL,400,NULL,5,NULL,1,0xFFFFFFFF,63,2,256,NULL,'100',1,1424,'bonus bDex,2; bonus bLongAtkRate,10; bonus4 bAutoSpell,"PR_LEXAETERNA",1,50,BF_LONG; /*TODO: Chance to transform become Shechil while attacking.*/',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (19116,'Red_Baby_Dragon','Red Baby Dragon',4,0,NULL,700,NULL,NULL,1,1,0xFFFFFFFF,63,2,256,NULL,'90',1,1463,'.@r=getrefine(); bonus bMaxHPrate,5; bonus bMaxSPrate,5; bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; if (.@r>=6) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } if (.@r>=8) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19117,'Poring_Sunglasses','Poring Sunglasses',4,0,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'1',0,954,'bonus2 bDropAddRace,RC_All,5; bonus2 bExpAddRace,RC_All,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19118,'Poring_Sunglasses_','Poring Sunglasses',4,0,NULL,10,NULL,0,NULL,1,0xFFFFFFFF,63,2,512,NULL,'1',0,954,'bonus2 bDropAddRace,RC_All,4; bonus2 bExpAddRace,RC_All,4;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19126,'Shadow_Booster_','Magical Booster',4,10,NULL,300,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,512,NULL,'1',1,873,'bonus bAspd,1; bonus bDelayrate,-1;',NULL,NULL); @@ -10428,7 +10428,7 @@ REPLACE INTO `item_db_re` VALUES (20095,'C_Red_Ribbon','Costume Red Ribbon',4,0, REPLACE INTO `item_db_re` VALUES (20096,'C_Blue_Ribbon','Costume Blue Ribbon',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,441,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20097,'C_White_Ribbon','Costume White Ribbon',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,442,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20098,'C_Vampire_Hairband','Costume Vampire Hairband',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1238,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20099,'C_Ljosalfar','Flying Ljosalfar',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1239,NULL,'sc_start SC_LJOSALFAR,-1,0;','sc_end SC_LJOSALFAR;'); +REPLACE INTO `item_db_re` VALUES (20099,'C_Ljosalfar','Flying Ljosalfar',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1239,NULL,'sc_start SC_LJOSALFAR,-1,0;','sc_end SC_LJOSALFAR;'); REPLACE INTO `item_db_re` VALUES (20100,'C_Volume_Fhat','Costume Volume Fhat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1240,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20101,'C_Bragi_Wing_Ears','Costume Bragi Wing Ears',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1241,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20102,'C_Horse_King_J','Costume Horse King J',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,7168,NULL,'1',1,1189,NULL,NULL,NULL); @@ -10444,9 +10444,9 @@ REPLACE INTO `item_db_re` VALUES (20111,'C_Coiledup_Snake_Hat2','Costume Coiledu REPLACE INTO `item_db_re` VALUES (20112,'C_Aqua_Ten_Gallon_Hat','Costume Aqua Ten Gallon Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1256,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20113,'C_Star_Reading_Hat','Costume Star Reading Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1253,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20114,'C_Funeral_Hat','Costume Funeral Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,77,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20115,'C_Under_Rim_Glasses','Under Rim Glasses',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,1,'1',1,1255,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20116,'C_Mermaid_Headphone','Mermaid Headphone',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,1,'1',1,1254,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20117,'C_Raspberry_Mousse_Hat','Raspberry Mousse Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1257,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20115,'C_Under_Rim_Glasses','Under Rim Glasses',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1255,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20116,'C_Mermaid_Headphone','Mermaid Headphone',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1254,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20117,'C_Raspberry_Mousse_Hat','Raspberry Mousse Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1257,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20118,'C_Cake_Hat','Costume Cake Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,109,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20119,'C_Beanie','Costume Beanie',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,160,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20120,'C_Aerial','Costume Aerial',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,97,NULL,NULL,NULL); @@ -10547,9 +10547,9 @@ REPLACE INTO `item_db_re` VALUES (20214,'C_Evil_Marcher_Hat_J','Costume Evil Mar REPLACE INTO `item_db_re` VALUES (20215,'C_Black_Devil_Mask','Costume Black Devil Mask',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,760,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20216,'C_Rideword_Hat','Costume Rideword Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,890,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20217,'C_Arabian_Veil','Costume Arabian Veil',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1300,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20218,'C_Spell_Circuit','Costume Spell Circuit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1301,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20218,'C_Spell_Circuit','Costume Spell Circuit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1301,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20219,'C_Angel_Marcher_Hat','Costume Angel Marcher Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1302,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20220,'C_Dark_Night_Veil','Costume Dark Night Veil',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,3072,1,'1',1,1303,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20220,'C_Dark_Night_Veil','Costume Dark Night Veil',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,3072,NULL,'1',1,1303,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20221,'C_Eyes_Of_Ifrit','C Eyes Of Ifrit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,886,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20222,'C_Blue_Pigtail_Santa_Hat','Costume Blue Pigtail Santa Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,NULL,1,395,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20223,'C_Romantic_Leaf','Costume Romantic Leaf',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,57,NULL,NULL,NULL); @@ -10633,8 +10633,8 @@ REPLACE INTO `item_db_re` VALUES (20311,'C_Magical_Booster','Costume Magical Boo REPLACE INTO `item_db_re` VALUES (20312,'C_Barons_Evil_Eye','Costume Baron\'s Evil Eye',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,989,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20313,'C_CD_in_Mouth','Costume CD in Mouth',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,815,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20314,'C_New_Wave_Sunglasses','Costume New Wave Sunglasses',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,856,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20315,'C_Analyze_Eye','Costume Analyze Eye',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,1,'1',1,1351,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20316,'C_Seraph_Wing_Helm','Costume Seraph Wing Helm',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1352,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20315,'C_Analyze_Eye','Costume Analyze Eye',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,1351,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20316,'C_Seraph_Wing_Helm','Costume Seraph Wing Helm',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1352,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20317,'C_Nekomimi_Cyber_Headphone','Costume Nekomimi Cyber Headphone',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1353,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20318,'C_Charleston_Antenna','Costume Charleston Antenna',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1354,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20319,'C_Crimson_Booster','Costume Crimson Booster',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1355,NULL,NULL,NULL); @@ -10642,8 +10642,8 @@ REPLACE INTO `item_db_re` VALUES (20320,'C_Red_Bandana','Costume Red Bandana',4, REPLACE INTO `item_db_re` VALUES (20321,'C_Pterios_Fins','Costume Pterios Fins',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1009,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20322,'C_Seal_Hat','Costume Seal Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,540,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20323,'C_Sparkling_Sound','Costume Sparkling Sound',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,1074,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20324,'C_Pigeon_Hat','Costume Pigeon Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1362,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20325,'C_Little_Aquarium','Costume Little Aquarium',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,1,'1',1,1363,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20324,'C_Pigeon_Hat','Costume Pigeon Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1362,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20325,'C_Little_Aquarium','Costume Little Aquarium',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1363,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20326,'C_Sailor_Collar','Costume Sailor Collar',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,1364,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20327,'C_Marine_Cap','Costume Marine Cap',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1365,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20328,'C_Mackerel_Pike','Costume Mackerel Pike',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,1081,NULL,NULL,NULL); @@ -10785,12 +10785,12 @@ REPLACE INTO `item_db_re` VALUES (20509,'C_Wings_of_Uriel','Costume Wings of Uri REPLACE INTO `item_db_re` VALUES (20510,'C_SwordWing','Costume Sword Wing',4,0,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,19,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20600,'Fantastic_Aura','Fantastic Aura',4,0,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,0,'/*TODO: View ID*/ bonus bUnbreakableHelm,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20700,'Egir_Manteau','Egir Manteau',4,200000,NULL,300,NULL,10,NULL,1,0xFFFFFFFF,63,2,4,NULL,'110',1,0,'bonus bUnbreakableGarment,1; .@r = getrefine(); if (.@r > 10) .@r = 10; if (BaseClass == Job_Mage || BaseClass == Job_Archer || BaseClass == Job_Acolyte) { bonus bFlee2,5+(.@r*2); } else if (BaseClass == Job_Swordman || BaseClass == Job_Merchant || BaseClass == Job_Thief) { bonus bShortWeaponDamageReturn,5+(.@r*2); }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20702,'TE_Woe_Muffler','TE Woe Muffler',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,4,1,'40',1,NULL,'bonus bMdef,5; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20703,'TE_Woe_Manteau','TE Woe Manteau',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,4,1,'40',1,NULL,'bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20704,'TE_Woe_Magic_Manteau','TE Woe Magic Manteau',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,4,1,'40',1,NULL,'bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20702,'TE_Woe_Muffler','TE Woe Muffler',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,4,NULL,'40',1,NULL,'bonus bMdef,5; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20703,'TE_Woe_Manteau','TE Woe Manteau',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,4,NULL,'40',1,NULL,'bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20704,'TE_Woe_Magic_Manteau','TE Woe Magic Manteau',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,4,NULL,'40',1,NULL,'bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20706,'Amistr_Bag','Amistr Bag',4,10,NULL,500,NULL,18,NULL,0,0xFFFFFFFF,63,2,4,NULL,'1',NULL,4,'bonus bAllStats,1; bonus2 bSubEle,Ele_All,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20707,'Kirin_Wing','Kirin Wing',4,20,NULL,0,NULL,18,NULL,0,0xFFFFFFFF,63,2,4,NULL,'0',1,6,'bonus bAllStats,1; bonus2 bSubRace,RC_DemiHuman,5; bonus2 bSubRace,RC_Player,5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20709,'Mana_Manteau','Mana Manteau',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4,0,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20709,'Mana_Manteau','Mana Manteau',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4,NULL,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20710,'Impr_Angel\'s_Warmth','Advanced Angelic Cardigan',4,10000,NULL,400,NULL,6,NULL,1,0x00000001,63,2,4,NULL,'99',1,0,'bonus bHPrecovRate,50;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20711,'Manteau_Of_Diego','Manteau Of Diego',4,20,NULL,600,NULL,15,NULL,1,0xFFFFFFFF,63,2,4,NULL,'0',1,0,'bonus bInt,1; bonus bDex,1; bonus bMdef,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20717,'Gigant_Snake_Skin','Gigant Snake Skin',4,10,NULL,400,NULL,38,NULL,0,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'bonus bMdef,10;',NULL,NULL); @@ -10808,7 +10808,7 @@ REPLACE INTO `item_db_re` VALUES (20744,'Tarlock\'s_Cloak','Tarlock\'s Cloak',4, REPLACE INTO `item_db_re` VALUES (20746,'C_Rudra_Wings','Costume Rudra Wings',4,10,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,8,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20748,'Cloak_Of_Casualties','Cloak Of Casualties',4,10,NULL,600,NULL,20,NULL,0,0xFFFFFFFF,63,2,4,NULL,'120',1,NULL,'.@r = getrefine(); bonus bAgi,5; bonus bFlee,10; if(readparam(bStr)>=90) bonus bBaseAtk,10+(.@r*2); if(readparam(bInt)>=90) bonus bMatk,20+(.@r*3); if(readparam(bVit)>=90) bonus2 bSubEle,Ele_Neutral,3+((.@r>=8)?3:0)+((.@r>=10)?4:0); if(readparam(bAgi)>=90){ bonus bAspdRate,3+(.@r/2); bonus bAspd,((.@r>=10)?1:0); } if(readparam(bDex)>=90) bonus bLongAtkRate,3+(.@r/2); if(readparam(bLuk)>=90) bonus bCriticalRate,5+.@r;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20749,'Cloak_Of_Casualties_','Cloak Of Casualties',4,10,NULL,600,NULL,30,NULL,1,0xFFFFFFFF,63,2,4,NULL,'170',1,NULL,'.@r = getrefine(); bonus bMaxHPrate,.@r/2; bonus bMaxSPrate,.@r/2; bonus bAgi,5; bonus bFlee,10; if(readparam(bStr)>=90) bonus bBaseAtk,10+(.@r*2); if(readparam(bInt)>=90) bonus bMatk,20+(.@r*3); if(readparam(bVit)>=90) bonus2 bSubEle,Ele_Neutral,3+((.@r>=8)?3:0)+((.@r>=10)?4:0); if(readparam(bAgi)>=90){ bonus bAspdRate,3+(.@r/2); bonus bAspd,((.@r>=10)?1:0); } if(readparam(bDex)>=90) bonus bLongAtkRate,3+(.@r/2); if(readparam(bLuk)>=90) bonus bCriticalRate,5+.@r;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20753,'Lian_Robe','Lian Robe',4,0,NULL,700,NULL,20,1,1,0xFFFFFFFF,63,2,4,0,'65',1,NULL,'bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20753,'Lian_Robe','Lian Robe',4,0,NULL,700,NULL,20,1,1,0xFFFFFFFF,63,2,4,NULL,'65',1,NULL,'bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20756,'Aegir_Cloak','Aegir Cloak',4,10,NULL,300,NULL,10,NULL,1,0xFFFFFFFF,63,2,4,NULL,'40',1,NULL,'bonus bUnbreakableGarment,1; bonus bMaxHP,500; bonus bMaxSP,50;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20761,'C_Happiness_Wings','Costume Happiness Wings',4,0,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,9,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20762,'C_Great_Devil_Wings','Costume Great Devil Wings',4,0,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,10,NULL,NULL,NULL); @@ -10818,12 +10818,12 @@ REPLACE INTO `item_db_re` VALUES (20779,'Rift_Manteau','Rift Manteau',4,20,NULL, REPLACE INTO `item_db_re` VALUES (20780,'Unity_STR_Manteau','Unity STR Manteau',4,32000,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bMaxHPrate,2*(.@r/2); }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20781,'Unity_AGI_Manteau','Unity AGI Manteau',4,32000,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bFlee,3*(.@r/2); }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20782,'Unity_INT_Muffler','Unity INT Muffler',4,32000,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bUseSPrate,-(.@r/2); }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20783,'Hero_Cape','Hero Cape',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,4,1,'10',1,NULL,'.@r = getrefine(); bonus2 bSubEle,Ele_Neutral,1+(.@r/3); bonus bFlee,1+(.@r/3); if (.@r > 9) { bonus2 bSubEle,Ele_Neutral,20; bonus bFlee,20; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20783,'Hero_Cape','Hero Cape',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,4,NULL,'10',1,NULL,'.@r = getrefine(); bonus2 bSubEle,Ele_Neutral,1+(.@r/3); bonus bFlee,1+(.@r/3); if (.@r > 9) { bonus2 bSubEle,Ele_Neutral,20; bonus bFlee,20; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20787,'Unity_Exquisite_Muffler','Unity Exquisite Muffler',4,32000,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bCritical,2*(.@r/2); }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20788,'Private_Doram_Manteau','Private Doram Manteau',4,20,NULL,300,NULL,20,NULL,1,0x80000000,7,2,4,NULL,'100',1,NULL,'bonus bFlee,5; bonus2 bSubEle,Ele_Neutral,2; bonus bFlee2,getrefine()/3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20789,'Luxury_Doram_Manteau','Luxury Doram Manteau',4,20,NULL,400,NULL,25,NULL,1,0x80000000,7,2,4,NULL,'140',1,NULL,'bonus bFlee,7; bonus2 bSubEle,Ele_Neutral,3; .@r = getrefine()/3; bonus bFlee2,.@r; bonus bLuk,.@r;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20790,'Elegant_Doram_Manteau','Elegant Doram Manteau',4,20,NULL,500,NULL,30,NULL,1,0x80000000,7,2,4,NULL,'175',1,NULL,'bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine()/2; bonus bFlee2,.@r; bonus bInt,.@r; bonus bDex,.@r; bonus bLuk,.@r;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (20797,'Etran_Shirt','Etran Shirt',4,0,NULL,150,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,4,1,'1',1,NULL,'bonus bMdef,10; bonus bMaxHPrate,2; .@r = getrefine(); if (.@r >= 6) bonus bMaxHPrate,4; if (.@r >= 7) bonus bMaxHPrate,6; if (.@r >= 8) bonus bMaxHPrate,8; if (.@r >= 9) bonus bNoKnockback,1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (20797,'Etran_Shirt','Etran Shirt',4,0,NULL,150,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,NULL,'bonus bMdef,10; bonus bMaxHPrate,2; .@r = getrefine(); if (.@r >= 6) bonus bMaxHPrate,4; if (.@r >= 7) bonus bMaxHPrate,6; if (.@r >= 8) bonus bMaxHPrate,8; if (.@r >= 9) bonus bNoKnockback,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20798,'C_Grim_Reaper_Protection','Costume Grim Reaper Protection',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',0,1450,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (20815,'SeraphimRobe','Seraphim Robe',4,0,NULL,300,NULL,18,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,NULL,'bonus bMaxHPrate,10; bonus2 bMagicAtkEle,Ele_Neutral,5; .@r = getrefine(); if (.@r > 6) { bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Holy,20; bonus bMatkRate,10; } if (.@r > 8) { bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus bVariableCastrate,-5; } if (getskilllv("CR_TRUST") > 0) { bonus2 bSubEle,Ele_Holy,.@r*3; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (20819,'Oxygen_Bottle','Oxygen Bottle',4,0,NULL,500,NULL,0,NULL,1,0xFFFFFFFF,63,2,4,NULL,'40',0,0,'bonus bFlee,12+getrefine(); bonus bHit,getrefine();',NULL,NULL); @@ -10869,7 +10869,7 @@ REPLACE INTO `item_db_re` VALUES (22008,'Temporal_DEX_Boots_','Temporal Boots Of REPLACE INTO `item_db_re` VALUES (22009,'Temporal_INT_Boots_','Temporal Boots Of Intelligence',4,20,NULL,600,NULL,20,NULL,1,0xFFFFFFFF,56,2,64,NULL,'99',1,NULL,'.@r = getrefine(); bonus bMdef,5; bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bMatk,10*(.@r/3); if(readparam(bInt)>=120) bonus bMatk,60;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22010,'Temporal_AGI_Boots_','Temporal Boots Of Agility',4,20,NULL,600,NULL,25,NULL,1,0xFFFFFFFF,56,2,64,NULL,'99',1,NULL,'.@r = getrefine(); bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bAspdRate,3*(.@r/3); if(readparam(bAgi)>=120) bonus bAspd,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22011,'Temporal_LUK_Boots_','Temporal Boots Of Luck',4,20,NULL,600,NULL,20,NULL,1,0xFFFFFFFF,56,2,64,NULL,'99',1,NULL,'.@r = getrefine(); bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bMdef,5; bonus bCritAtkRate,2*(.@r/3); if(readparam(bLuk)>=120) bonus bCritAtkRate,30;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (22012,'Mana_Boots','Mana Boots',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,64,0,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22012,'Mana_Boots','Mana Boots',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22014,'Enhanced_Variant_Shoes','Enhanced Variant Shoes',4,20,NULL,500,NULL,13,NULL,1,0x7CCFDF80,63,2,64,NULL,'85',1,0,'bonus bMaxHPrate,12; bonus bMaxSPrate,12; .@r = getrefine(); bonus bDef,.@r; bonus bMdef,.@r;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22015,'Impr_Angel\'s_Arrival','Advanced Angel\'s Reincarnation',4,10000,NULL,300,NULL,8,NULL,1,0x00000001,63,2,64,NULL,'99',1,0,'bonus bMaxHP,500; bonus bMaxSP,100;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22018,'Shoes_Of_Wise_Man','Shoes Of Wise Man',4,10,NULL,300,NULL,15,NULL,1,0xFFFFFFFF,63,2,64,NULL,'50',1,NULL,'.@r = getrefine(); if(.@r>5){ bonus bInt,.@r-5; bonus bMaxHPrate,-(.@r-5); }',NULL,NULL); @@ -10887,8 +10887,8 @@ REPLACE INTO `item_db_re` VALUES (22047,'Tarlock\'s_Boots','Tarlock\'s Boots',4, REPLACE INTO `item_db_re` VALUES (22059,'Aegir_Shoes','Aegir Shoes',4,10,NULL,300,NULL,13,NULL,1,0xFFFFFFFF,63,2,64,NULL,'40',1,NULL,'bonus bUnbreakableShoes,1; bonus bMaxHP,500; bonus bMaxSP,50;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22064,'Thorny_Shoes','Thorny Shoes',4,0,NULL,1000,NULL,25,NULL,1,0xFFFFFFFF,63,2,64,NULL,NULL,1,NULL,'bonus bShortWeaponDamageReturn,getrefine()/2;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22067,'Shoe_of_Witch','Shoe of Witch',4,10,NULL,400,NULL,10,NULL,0,0xFFFFFFFE,63,2,64,NULL,'1',1,NULL,'skill "ALL_CATCRY",1;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (22069,'Lian_Shoes','Lian Shoes',4,0,NULL,250,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,1,'90',1,NULL,'bonus bMdef,3; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); bonus bMaxHPrate,.@r; bonus bMaxSPrate,.@r;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (22072,'Hikingboots','Hikingboots',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,64,0,'100',1,NULL,'.@r = getrefine(); bonus bMaxHPRate,4+(.@r/3); bonus bMaxSPRate,4+(.@r/3); if (.@r > 9) bonus bSpeedRate,25;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22069,'Lian_Shoes','Lian Shoes',4,0,NULL,250,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,NULL,'90',1,NULL,'bonus bMdef,3; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); bonus bMaxHPrate,.@r; bonus bMaxSPrate,.@r;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22072,'Hikingboots','Hikingboots',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,64,NULL,'100',1,NULL,'.@r = getrefine(); bonus bMaxHPRate,4+(.@r/3); bonus bMaxSPRate,4+(.@r/3); if (.@r > 9) bonus bSpeedRate,25;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22075,'Rift_Shoes','Rift Shoes',4,20,NULL,250,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,NULL,'100',1,NULL,'.@r = getrefine(); bonus bMaxHP,(.@r >= 9 ? 1300 : .@r >= 7 ? 700 : 300); bonus bMaxSP,-50;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22076,'Wooden_Slipper','Wooden Slipper',4,20,NULL,50,NULL,10,NULL,1,0x80000000,7,2,64,NULL,'9',1,NULL,'bonus2 bHPRegenRate,2,10000;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22077,'Red_Eco-Friendly_Shoes','Red Eco-Friendly Shoes',4,20,NULL,100,NULL,20,NULL,1,0x80000000,7,2,64,NULL,'18',1,NULL,'bonus bCritical,5; bonus2 bHPRegenRate,4,10000; bonus2 bSPRegenRate,1,10000;',NULL,NULL); @@ -10896,13 +10896,13 @@ REPLACE INTO `item_db_re` VALUES (22078,'Unity_STR_Boots','Unity STR Boots',4,10 REPLACE INTO `item_db_re` VALUES (22079,'Unity_AGI_Boots','Unity AGI Boots',4,10,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bAgi,.@r/2; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22080,'Unity_DEX_Boots','Unity DEX Boots',4,10,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bDex,.@r/2; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22081,'Unity_INT_Boots','Unity INT Boots',4,10,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bInt,.@r/2; }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (22082,'Polyhedron_Shoes','Polyhedron Shoes',4,0,NULL,500,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,0,'90',1,NULL,'.@r = getrefine(); bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Wind,5; if (.@r > 4) { .@b = (.@r > 6) ? 10 : 5; bonus2 bAddEle,Ele_Neutral,.@b; bonus2 bAddEle,Ele_Fire,.@b; bonus2 bAddEle,Ele_Water,.@b; bonus2 bAddEle,Ele_Wind,.@b; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22082,'Polyhedron_Shoes','Polyhedron Shoes',4,0,NULL,500,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,NULL,'90',1,NULL,'.@r = getrefine(); bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Wind,5; if (.@r > 4) { .@b = (.@r > 6) ? 10 : 5; bonus2 bAddEle,Ele_Neutral,.@b; bonus2 bAddEle,Ele_Fire,.@b; bonus2 bAddEle,Ele_Water,.@b; bonus2 bAddEle,Ele_Wind,.@b; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22083,'Private_Doram_Shoes','Private Doram Shoes',4,20,NULL,500,NULL,25,NULL,1,0x80000000,7,2,64,NULL,'100',1,NULL,'bonus bMaxHP,100; bonus bMaxSP,50; .@r = getrefine()/3; bonus bHPrecovRate,.@r*10; bonus bSPrecovRate,.@r*10;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22084,'Luxury_Doram_Shoes','Luxury Doram Shoes',4,20,NULL,600,NULL,30,NULL,1,0x80000000,7,2,64,NULL,'140',1,NULL,'bonus bMaxHP,300; bonus bMaxSP,100; .@r = getrefine()/3; bonus bHPrecovRate,20*.@r; bonus bSPrecovRate,20*.@r;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22085,'Elegant_Doram_Shoes','Elegant Doram Shoes',4,20,NULL,700,NULL,35,NULL,1,0x80000000,7,2,64,NULL,'175',1,NULL,'bonus bMaxHPrate,10; bonus bMaxSPrate,5; .@r = getrefine()/2; bonus bMaxHP,100*.@r; bonus bMaxSP,20*.@r; if(.@r >= 4) bonus2 bSkillUseSP,"SU_LOPE",5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22089,'Crimson_Gaiter_','Crimson Gaiter',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,64,NULL,'50',1,NULL,'bonus bCritical,2; bonus bCritAtkRate,2; if(getrefine()>=7){ bonus bCritical,3; bonus bCritAtkRate,3; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22101,'Angel_Poring_Boots','Angel Poring Boots',4,10,NULL,300,NULL,15,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'bonus bAllStats,1; skill "AL_HEAL",1;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (22103,'Excelion_Leg','Excelion Leg',4,0,NULL,500,NULL,13,NULL,0,0xFFFFFFFF,63,2,64,1,'100',1,NULL,'.@r = getrefine(); bonus bMaxHP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; bonus bMaxSP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22103,'Excelion_Leg','Excelion Leg',4,0,NULL,500,NULL,13,NULL,0,0xFFFFFFFF,63,2,64,NULL,'100',1,NULL,'.@r = getrefine(); bonus bMaxHP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; bonus bMaxSP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22106,'Giant_Boots','Giant Boots',4,0,NULL,500,NULL,13,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'bonus2 bSubRace,RC_All,1; bonus bMaxHPrate,2; bonus bMaxSPrate,2; .@r = getrefine(); if (.@r > 4) { bonus bDefRate,2; bonus bMaxHPrate,4; bonus bMaxSPrate,4; } if (.@r > 6) { bonus bDefRate,2; bonus bMaxHPrate,4; bonus bMaxSPrate,4; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22122,'Para_Team_Boots100','Awakened Eden Group Boots I',4,0,NULL,0,NULL,22,NULL,0,0xFFFFFFFF,63,2,64,NULL,'100',1,NULL,'bonus bAllStats,1; bonus bHPrecovRate,30; bonus bSPrecovRate,14;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22123,'Para_Team_Boots115','Awakened Eden Group Boots II',4,0,NULL,0,NULL,25,NULL,0,0xFFFFFFFF,63,2,64,NULL,'115',1,NULL,'bonus bAllStats,1; bonus bHPrecovRate,36; bonus bSPrecovRate,18;',NULL,NULL); @@ -11496,8 +11496,8 @@ REPLACE INTO `item_db_re` VALUES (28317,'RCC2013_RING','RCC2013_RING',4,200,NULL REPLACE INTO `item_db_re` VALUES (28318,'RCC2013_RING_','RCC2013_RING_',4,200,NULL,200,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus2 bAddClass,Class_All,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28310,'Sarah\'s_Left_Earring','Sarah\'s Left Earring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,8,NULL,'145',0,NULL,'skill "AL_HEAL",1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28311,'Sarah\'s_Right_Earring','Sarah\'s Right Earring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,128,NULL,'145',0,NULL,'skill "AL_TELEPORT",1;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28321,'Falconer_Claw','Falconer Claw',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,0,'80',0,NULL,'bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28322,'Falconer_Glove','Falconer Glove',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,0,'80',0,NULL,'bonus bDex,1; bonus bUseSPrate,-5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28321,'Falconer_Claw','Falconer Claw',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,NULL,'80',0,NULL,'bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28322,'Falconer_Glove','Falconer Glove',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,NULL,'80',0,NULL,'bonus bDex,1; bonus bUseSPrate,-5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28326,'Broken_Chips_01','Broken Chips 01',4,10,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'100',0,NULL,'bonus bStr,4;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28327,'Broken_Chips_02','Broken Chips 02',4,10,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'100',0,NULL,'bonus bInt,4;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28332,'Jewerly_Ring','Jewerly Ring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bLuk,20; autobonus "{ bonus bAspd,2; }",50,2000,BF_WEAPON|BF_MAGIC;',NULL,NULL); @@ -11506,18 +11506,18 @@ REPLACE INTO `item_db_re` VALUES (28342,'Critical_Anklet','Critical Anklet',4,0, REPLACE INTO `item_db_re` VALUES (28354,'City_Map','City Map',4,0,NULL,100,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,0,'/* todo */',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28355,'Shining_Holy_Water','Shining Holy Water',4,0,NULL,100,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,0,'/* todo */',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28356,'Prontera_Badge','Prontera Badge',4,0,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,0,'/*warp "prontera",159,192; 15 mins cooldown */',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28358,'Cursed_Lucky_Clover','Cursed Lucky Clover',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,0,'100',0,NULL,'bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5;',NULL,'sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/'); -REPLACE INTO `item_db_re` VALUES (28372,'Imperial_Ring','Imperial Ring',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,0,'50',0,NULL,'bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28358,'Cursed_Lucky_Clover','Cursed Lucky Clover',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'100',0,NULL,'bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5;',NULL,'sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/'); +REPLACE INTO `item_db_re` VALUES (28372,'Imperial_Ring','Imperial Ring',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,'50',0,NULL,'bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28374,'Foxtail_Ring','Foxtail Ring',4,20,NULL,100,NULL,0,NULL,0,0x80000000,7,2,136,NULL,'1',0,NULL,'bonus2 bExpAddRace,RC_All,5; .@lvl = min(BaseLevel/5,10); bonus bAtk,2*.@lvl; bonus bMatk,2*.@lvl; bonus bMaxHP,10*.@lvl; bonus bMaxSP,5*.@lvl;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28377,'Magical_Ring','Magical Ring',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,0,'20',0,NULL,'bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Water,5; bonus2 bMagicAddEle,Ele_Earth,5; bonus2 bMagicAddEle,Ele_Wind,5; if (BaseLevel > 4) { bonus2 bSkillAtk,"MG_FIREBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_COLDBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_LIGHTNINGBOLT",BaseLevel/5; bonus2 bSkillAtk,"WZ_EARTHSPIKE",BaseLevel/5; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28377,'Magical_Ring','Magical Ring',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'20',0,NULL,'bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Water,5; bonus2 bMagicAddEle,Ele_Earth,5; bonus2 bMagicAddEle,Ele_Wind,5; if (BaseLevel > 4) { bonus2 bSkillAtk,"MG_FIREBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_COLDBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_LIGHTNINGBOLT",BaseLevel/5; bonus2 bSkillAtk,"WZ_EARTHSPIKE",BaseLevel/5; }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28380,'Fresh_Grass_Necklace','Fresh Grass Necklace',4,20,NULL,100,NULL,0,NULL,1,0x80000000,7,2,136,NULL,'100',0,NULL,'bonus bFlee2,5; bonus2 bSkillCooldown,"SU_SCAROFTAROU",-5000;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28381,'Cute_Grass_Necklace','Cute Grass Necklace',4,20,NULL,10,NULL,0,NULL,1,0x80000000,7,2,136,NULL,'100',0,NULL,'bonus bHealPower,5; bonus2 bSkillCooldown,"SU_TUNAPARTY",-7000;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28382,'Charm_Grass_Necklace','Charm Grass Necklace',4,20,NULL,10,NULL,0,NULL,1,0x80000000,7,2,136,NULL,'100',0,NULL,'bonus bMdef,5; bonus2 bVariableCastrate,"SU_CN_METEOR",-1000;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28386,'Fallen_Monk_Rosary','Fallen Monk Rosary',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,0,'20',0,NULL,'bonus bAspdRate,5; bonus bCritical,5; bonus2 bSkillUseSP,"CH_SOULCOLLECT",-5; if (BaseLevel > 14) bonus2 bSkillAtk,"SR_DRAGONCOMBO",BaseLevel/15; if (BaseLevel > 19) bonus2 bSkillAtk,"SR_KNUCKLEARROW",BaseLevel/20; if (BaseLevel > 29) bonus2 bSkillAtk,"SR_SKYNETBLOW",BaseLevel/30;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28386,'Fallen_Monk_Rosary','Fallen Monk Rosary',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'20',0,NULL,'bonus bAspdRate,5; bonus bCritical,5; bonus2 bSkillUseSP,"CH_SOULCOLLECT",-5; if (BaseLevel > 14) bonus2 bSkillAtk,"SR_DRAGONCOMBO",BaseLevel/15; if (BaseLevel > 19) bonus2 bSkillAtk,"SR_KNUCKLEARROW",BaseLevel/20; if (BaseLevel > 29) bonus2 bSkillAtk,"SR_SKYNETBLOW",BaseLevel/30;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28391,'S_Thief_Earring','Thief Shadow Earring',12,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1048576,NULL,'1',1,NULL,'.@r = getrefine(); autobonus3 "{ bonus bBaseAtk,30+(.@r*10); bonus bFlee,30+(.@r*10); }",200,5000,"TF_THROWSTONE","{ specialeffect2 EF_ENHANCE; }";',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28392,'S_Archer_Earring','Archer Shadow Earring',12,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1048576,NULL,'1',1,NULL,'.@r = getrefine(); autobonus3 "{ bonus bBaseAtk,30+(.@r*10); bonus bHit,30+(.@r*10); }",200,5000,"AC_DOUBLE","{ specialeffect2 EF_ENHANCE; }";',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28410,'Sapphire_Wrist','Sapphire Wrist',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,0,'50',0,NULL,'bonus bDex,5; bonus bLuk,5; bonus bInt,5; bonus2 bSkillAtk,"GN_SPORE_EXPLOSION",BaseLevel/5; bonus2 bVariableCastrate,"CR_ACIDDEMONSTRATION",-(BaseLevel/4); .@n = getskilllv("CR_SLIMPITCHER"); bonus bDex,.@n/2; bonus bLuk,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (28411,'Emerald_Earring','Emerald Earring',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,0,'50',0,NULL,'bonus bDex,5; bonus bAgi,5; bonus bInt,5; bonus2 bSkillAtk,"CG_ARROWVULCAN",BaseLevel; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",BaseLevel; bonus2 bSkillAtk,"DC_THROWARROW",BaseLevel; bonus2 bSkillAtk,"WM_METALICSOUND",2*(BaseLevel/5); .@n = getskilllv("WM_METALICSOUND"); bonus2 bVariableCastrate,"WM_METALICSOUND",.@n/2; bonus bDex,.@n/2; bonus bAgi,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28410,'Sapphire_Wrist','Sapphire Wrist',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,'50',0,NULL,'bonus bDex,5; bonus bLuk,5; bonus bInt,5; bonus2 bSkillAtk,"GN_SPORE_EXPLOSION",BaseLevel/5; bonus2 bVariableCastrate,"CR_ACIDDEMONSTRATION",-(BaseLevel/4); .@n = getskilllv("CR_SLIMPITCHER"); bonus bDex,.@n/2; bonus bLuk,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (28411,'Emerald_Earring','Emerald Earring',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,'50',0,NULL,'bonus bDex,5; bonus bAgi,5; bonus bInt,5; bonus2 bSkillAtk,"CG_ARROWVULCAN",BaseLevel; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",BaseLevel; bonus2 bSkillAtk,"DC_THROWARROW",BaseLevel; bonus2 bSkillAtk,"WM_METALICSOUND",2*(BaseLevel/5); .@n = getskilllv("WM_METALICSOUND"); bonus2 bVariableCastrate,"WM_METALICSOUND",.@n/2; bonus bDex,.@n/2; bonus bAgi,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28413,'Lesser_Mackerel_Talisman','Lesser Mackerel Talisman',4,0,NULL,100,NULL,1,NULL,1,0x80000000,63,2,136,NULL,'100',NULL,NULL,'bonus bVit,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28414,'Intermediate_Mackerel_Talisman','Intermediate Mackerel Talisman',4,0,NULL,100,NULL,1,NULL,1,0x80000000,63,2,136,NULL,'140',NULL,NULL,'bonus bVit,2;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (28415,'Greater_Mackerel_Talisman','Greater Mackerel Talisman',4,0,NULL,100,NULL,1,NULL,1,0x80000000,63,2,136,NULL,'175',NULL,NULL,'bonus bVit,3;',NULL,NULL); From 5fdebec3aff5aad09fde268019b611c4908fb97b Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 18 Aug 2017 11:47:40 +0200 Subject: [PATCH 116/124] Fixed rebinding of mob view data for killed mobs Fixes #2351 Thanks to @TesLA-Git --- src/map/mob.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/map/mob.c b/src/map/mob.c index 3091deaf58..caebea0bc4 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -5254,18 +5254,17 @@ static int mob_reload_sub( struct mob_data *md, va_list args ){ // Relink the mob to the new database entry md->db = mob_db(md->mob_id); - if( md->bl.prev == NULL ){ - return 0; - } - // If the view data was not overwritten manually if( !md->vd_changed ){ // Get the new view data from the mob database md->vd = mob_get_viewdata(md->mob_id); - // Respawn all mobs on client side so that they are displayed correctly(if their view id changed) - clif_clearunit_area(&md->bl, CLR_OUTSIGHT); - clif_spawn(&md->bl); + // If they are spawned right now + if( md->bl.prev != NULL ){ + // Respawn all mobs on client side so that they are displayed correctly(if their view id changed) + clif_clearunit_area(&md->bl, CLR_OUTSIGHT); + clif_spawn(&md->bl); + } } return 0; @@ -5278,18 +5277,17 @@ static int mob_reload_sub( struct mob_data *md, va_list args ){ * @return 0 */ static int mob_reload_sub_npc( struct npc_data *nd, va_list args ){ - if( nd->bl.prev == NULL ){ - return 0; - } - // If the view data points to a mob if( mobdb_checkid(nd->class_) ){ // Get the new view data from the mob database nd->vd = mob_get_viewdata(nd->class_); - // Respawn all NPCs on client side so that they are displayed correctly(if their view id changed) - clif_clearunit_area(&nd->bl, CLR_OUTSIGHT); - clif_spawn(&nd->bl); + // If they are spawned right now + if( nd->bl.prev == NULL ){ + // Respawn all NPCs on client side so that they are displayed correctly(if their view id changed) + clif_clearunit_area(&nd->bl, CLR_OUTSIGHT); + clif_spawn(&nd->bl); + } } return 0; From 6f985080a8b071e5869679e430274a4b166971c2 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Fri, 18 Aug 2017 11:49:20 +0200 Subject: [PATCH 117/124] Follow up to 5fdebec Fixed a typo --- src/map/mob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/mob.c b/src/map/mob.c index caebea0bc4..04b76e707d 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -5283,7 +5283,7 @@ static int mob_reload_sub_npc( struct npc_data *nd, va_list args ){ nd->vd = mob_get_viewdata(nd->class_); // If they are spawned right now - if( nd->bl.prev == NULL ){ + if( nd->bl.prev != NULL ){ // Respawn all NPCs on client side so that they are displayed correctly(if their view id changed) clif_clearunit_area(&nd->bl, CLR_OUTSIGHT); clif_spawn(&nd->bl); From 3183c39cfe78734d724337cefc366a6c011443ea Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Sun, 20 Aug 2017 15:01:05 +0200 Subject: [PATCH 118/124] Fixed 2 compiler warnings Fixes #2346 Thanks to @hurtsky --- src/char/int_storage.cpp | 2 ++ src/common/yamlwrapper.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/char/int_storage.cpp b/src/char/int_storage.cpp index c450882cb4..e3cb96c34a 100644 --- a/src/char/int_storage.cpp +++ b/src/char/int_storage.cpp @@ -1,6 +1,8 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#pragma warning(disable:4800) + #include "int_storage.h" #include "../common/malloc.h" diff --git a/src/common/yamlwrapper.cpp b/src/common/yamlwrapper.cpp index 079cc324de..33ab29f1b4 100644 --- a/src/common/yamlwrapper.cpp +++ b/src/common/yamlwrapper.cpp @@ -50,7 +50,7 @@ yamlwrapper* yaml_load_file(const char* file_name) { } catch (YAML::ParserException &e) { ShowError("YAML Exception Caught: %s\n", e.what()); return NULL; - } catch (YAML::BadFile &e) { + } catch (YAML::BadFile) { return NULL; } From 1fc0ed600f954efa44af8551814873f0026dd11f Mon Sep 17 00:00:00 2001 From: Lemongrass3110 <lemongrass@kstp.at> Date: Mon, 21 Aug 2017 00:10:06 +0200 Subject: [PATCH 119/124] Added support for the all 2017-06 clients --- src/map/clif_obfuscation.h | 4 +++ src/map/clif_shuffle.h | 62 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/src/map/clif_obfuscation.h b/src/map/clif_obfuscation.h index 4aefedf7e0..32355e81d6 100644 --- a/src/map/clif_obfuscation.h +++ b/src/map/clif_obfuscation.h @@ -341,6 +341,10 @@ packet_keys(0x50564ACD,0x79CA4E15,0x405F4894); #elif PACKETVER == 20170614 // 2017-06-14bRagexeRE packet_keys(0x5ED10A48,0x667F4301,0x2E5D761F); + #elif PACKETVER == 20170621 // 2017-06-21aRagexeRE + packet_keys(0x155F34EC,0x2D943FA9,0x3D9170EB); + #elif PACKETVER == 20170628 // 2017-06-28bRagexeRE + packet_keys(0x04691C86,0x43C210E2,0x2FE277E2); #elif PACKETVER > 20110817 #error Unsupported packet version. #endif diff --git a/src/map/clif_shuffle.h b/src/map/clif_shuffle.h index fdae878953..7a43b7d386 100644 --- a/src/map/clif_shuffle.h +++ b/src/map/clif_shuffle.h @@ -3537,6 +3537,68 @@ parseable_packet(0x0944,19,clif_parse_WantToConnection,2,6,10,14,18); //parseable_packet(0x0957,8,NULL,0); // CZ_JOIN_BATTLE_FIELD parseable_packet(0x0963,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); +// 2017-06-21aRagexeRE +#elif PACKETVER == 20170621 + parseable_packet(0x0202,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,6,clif_parse_TakeItem,2); + parseable_packet(0x0365,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x0366,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0802,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x085D,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x087D,6,clif_parse_DropItem,2,4); + parseable_packet(0x0885,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0889,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x08A8,5,clif_parse_HomMenu,2,4); + //parseable_packet(0x0956,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0957,36,clif_parse_StoragePassword,0); + //parseable_packet(0x095B,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x095C,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0961,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); +// 2017-06-28bRagexeRE +#elif PACKETVER == 20170628 + parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4); + parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18); + parseable_packet(0x023B,26,clif_parse_FriendsListAdd,2); + parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12); + parseable_packet(0x035F,6,clif_parse_TickSend,2); + parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2); + parseable_packet(0x0361,5,clif_parse_HomMenu,2,4); + parseable_packet(0x0362,6,clif_parse_DropItem,2,4); + //parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD + parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4); + parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4); + parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10); + parseable_packet(0x0368,6,clif_parse_SolveCharName,2); + parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6); + //parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK + parseable_packet(0x0437,5,clif_parse_WalkToXY,2); + parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8); + parseable_packet(0x07E4,6,clif_parse_TakeItem,2); + parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4); + parseable_packet(0x0802,26,clif_parse_PartyInvite2,2); + parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12); + parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89); + parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0); + parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15); + parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0); + parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10); + parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6); + parseable_packet(0x0863,36,clif_parse_StoragePassword,0); + parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2); #endif #endif /* _CLIF_SHUFFLE_H_ */ From c9ce29c00e4c440e15fcecadf314b85ad65e8c2b Mon Sep 17 00:00:00 2001 From: "Moch. Luthfi Rahmadi" <mazvi@mazvi.com> Date: Wed, 23 Aug 2017 21:21:06 +0700 Subject: [PATCH 120/124] Update Readme.md (#2337) * Added Centos 64bit build option with MariaDB. Thanks to @mazvi! --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 12b637bb30..d09a414db4 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,9 @@ relevant to your Operation System, please refer to the Wiki (links at the end of * Configure and compile: ./configure && make clean && make server + * Configure and compile (for Centos 64 bit with Maria DB): + + ./configure --enable-64bit --with-MYSQL_LIBS=/usr/lib64/libmysqlclient.so && make clean && make server * When you're ready, start the servers: ./athena-start start From 4539d557e2a1af824ba0cb176d16f649d1c074ab Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Fri, 25 Aug 2017 13:26:22 -0400 Subject: [PATCH 121/124] Added script command sc_end_class (#2368) * Added a new script command sc_end_class to remove status changes from any learned skills. * Adjusted the custom Reset NPC to make use of this behavior. Thanks to @sader1992! * Follow up to f93680b * Adjusted documentation. * Follow up to f93680b * Removed the check from script command resetskill. * Added a new script command sc_end_class. * Fixed a compile error * Corrected the define of the script command. * Adjusted some documentation. * Reverted some formatting from the original commit. Thanks to @sader1992 and @Lemongrass3110! --- doc/script_commands.txt | 12 ++++++++---- npc/custom/resetnpc.txt | 9 ++------- src/map/script.c | 24 ++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 6046c5a0ea..78cd0961d7 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -5316,10 +5316,11 @@ Used in reset NPC's (duh!) --------------------------------------- -*sc_start <effect type>,<ticks>,<value 1>{,<rate>,<flag>{,<GID>}}; -*sc_start2 <effect type>,<ticks>,<value 1>,<value 2>{,<rate>,<flag>{,<GID>}}; -*sc_start4 <effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<rate>,<flag>{,<GID>}}; -*sc_end <effect type>{,<GID>}; +*sc_start <effect type>,<ticks>,<value 1>{,<rate>,<flag>{,<GID>}}; +*sc_start2 <effect type>,<ticks>,<value 1>,<value 2>{,<rate>,<flag>{,<GID>}}; +*sc_start4 <effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<rate>,<flag>{,<GID>}}; +*sc_end <effect type>{,<GID>}; +*sc_end_class {<char_id>}; These commands will bestow a status effect on a character. @@ -5357,6 +5358,9 @@ and theirs val1, val2, val3, and val4 usage in source. 'sc_end' will remove a specified status effect. If SC_ALL (-1) is given, it will perform a complete removal of all statuses (although permanent ones will re-apply). +'sc_end_class' works like 'sc_end' but will remove all status effects from any learned +skill on the invoking character. + Examples: // This will poison the invoking character for 10 minutes at 50% chance. sc_start SC_POISON,600000,0,5000; diff --git a/npc/custom/resetnpc.txt b/npc/custom/resetnpc.txt index aa6bc14b2d..e3c902cb0a 100644 --- a/npc/custom/resetnpc.txt +++ b/npc/custom/resetnpc.txt @@ -1,11 +1,5 @@ //===== rAthena Script ======================================= //= Reset NPC -//===== By: ================================================== -//= rAthena Dev Team -//===== Current Version: ===================================== -//= 1.4 -//===== Compatible With: ===================================== -//= rAthena Project //===== Description: ========================================= //= Resets skills, stats, or both. //===== Additional Comments: ================================= @@ -15,6 +9,7 @@ //= 1.3 All statuses removed upon skill reset. [Euphy] //= 1.4 Compressed Script, Added limit use option [Stolao] //= Changed set -> setarray, Improved text with F_InsertPlural +//= 1.5 Added sc_end_class to reset related status changes [sader1992] //============================================================ prontera,150,193,4 script Reset Girl 124,{ // Skills, Stats, Both, Limit @@ -44,7 +39,7 @@ prontera,150,193,4 script Reset Girl 124,{ } set Zeny, Zeny-.@Reset[.@i-1]; if(.@i&1){ - sc_end SC_ALL;// TODO make a sc_end current classes sc only + sc_end_class; ResetSkill; } if(.@i&2) ResetStatus; diff --git a/src/map/script.c b/src/map/script.c index 419c7e7e07..6a588cb6db 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11319,6 +11319,29 @@ BUILDIN_FUNC(sc_end) return SCRIPT_CMD_SUCCESS; } +/** + * Ends all status effects from any learned skill on the attached player. + * sc_end_class {<char_id>}; + */ +BUILDIN_FUNC(sc_end_class) +{ + struct map_session_data *sd; + uint16 skill_id; + int i; + + if (!script_charid2sd(2, sd)) + return SCRIPT_CMD_FAILURE; + + for (i = 0; i < MAX_SKILL_TREE && (skill_id = skill_tree[pc_class2idx(sd->status.class_)][i].skill_id) > 0; i++) { // Remove status specific to your current tree skills. + enum sc_type sc = status_skill2sc(skill_id); + + if (sc > SC_COMMON_MAX && sd->sc.data[sc]) + status_change_end(&sd->bl, sc, INVALID_TIMER); + } + + return SCRIPT_CMD_SUCCESS; +} + /*========================================== * @FIXME atm will return reduced tick, 0 immune, 1 no tick *------------------------------------------*/ @@ -23747,6 +23770,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF2(sc_start,"sc_start2","iiii???"), BUILDIN_DEF2(sc_start,"sc_start4","iiiiii???"), BUILDIN_DEF(sc_end,"i?"), + BUILDIN_DEF(sc_end_class,"?"), BUILDIN_DEF(getstatus, "i??"), BUILDIN_DEF(getscrate,"ii?"), BUILDIN_DEF(debugmes,"s"), From 9db3c386ead6ea58efc44cdb14883b510e8562a3 Mon Sep 17 00:00:00 2001 From: Stolao <Stolao@users.noreply.github.com> Date: Fri, 25 Aug 2017 11:41:15 -0700 Subject: [PATCH 122/124] Fix bAddEffOnSkill (#2370) * Fixes #2357. * Fixed a copy paste error. --- src/map/skill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/skill.c b/src/map/skill.c index 4ea9f1ec16..ce1ed774a3 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1123,7 +1123,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 if( skill_id != sd->addeff_onskill[i].skill_id || !sd->addeff_onskill[i].rate ) continue; type = sd->addeff_onskill[i].sc; - time = sd->addeff[i].duration; + time = sd->addeff_onskill[i].duration; if( sd->addeff_onskill[i].target&ATF_TARGET ) status_change_start(src,bl,type,sd->addeff_onskill[i].rate,7,0,0,0,time,SCSTART_NONE); From 39a5d38b9deeb429bb855c023463ad1b7c7fdda9 Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Mon, 28 Aug 2017 09:40:23 -0400 Subject: [PATCH 123/124] Corrected Fatal Menace behavior (#2371) * Resolves an issue with targets in the Fatal Menace area not getting teleported with the player. Thanks to @Tokeiburu! --- src/map/skill.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/map/skill.c b/src/map/skill.c index ce1ed774a3..464ccfb2cc 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3558,8 +3558,12 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list * rate = rate + (status_get_lv(src) - status_get_lv(bl)); if(rnd()%100 < rate) skill_addtimerskill(src,tick + 800,bl->id,0,0,skill_id,skill_lv,0,flag); - } else if( skill_id == SC_FATALMENACE ) - skill_addtimerskill(src,tick + 800,bl->id,skill_area_temp[4],skill_area_temp[5],skill_id,skill_lv,0,flag); + } else if( skill_id == SC_FATALMENACE ) { + int16 x = skill_area_temp[4], y = skill_area_temp[5]; + + map_search_freecell(NULL, bl->m, &x, &y, 2, 2, 1); + skill_addtimerskill(bl,tick + 800,bl->id,x,y,skill_id,skill_lv,0,flag); + } } if(skill_id == CR_GRANDCROSS || skill_id == NPC_GRANDDARKNESS) @@ -4142,13 +4146,7 @@ static int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) skill_castend_damage_id(src,target,skl->skill_id,skl->skill_lv,tick,skl->flag); break; case SC_FATALMENACE: - if( src == target ) // Casters Part - unit_warp(src, -1, skl->x, skl->y, CLR_TELEPORT); - else { // Target's Part - short x = skl->x, y = skl->y; - map_search_freecell(NULL, target->m, &x, &y, 2, 2, 1); - unit_warp(target,-1,x,y,CLR_TELEPORT); - } + unit_warp(src, -1, skl->x, skl->y, CLR_TELEPORT); break; case LG_MOONSLASHER: case SR_WINDMILL: From 7a1b2e0f0a7fb0c09fd92e1c5e0369486a178b96 Mon Sep 17 00:00:00 2001 From: Aleos <aleos89@users.noreply.github.com> Date: Mon, 28 Aug 2017 10:08:29 -0400 Subject: [PATCH 124/124] Cleaned up Item Shop checks (#2373) * Fixes #2352. * Removed an extra bound check when selling items. * Added a check to return failure when unable to delete an item. * Added checks when counting sellable items in an Item Shop. - Items that can't be sold, favorite items, rental items, and bound items will now be ignored unless the GM has required permissions. Thanks to @chadn4u, @Jeybla, @Lemongrass3110! --- src/map/clif.c | 11 +---------- src/map/npc.c | 19 +++++++++++++------ src/map/pc.c | 24 ++++++++++++++++++++++++ src/map/pc.h | 1 + 4 files changed, 39 insertions(+), 16 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index 83b06d34da..5ec906c2ed 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1962,18 +1962,9 @@ void clif_selllist(struct map_session_data *sd) { if( sd->inventory.u.items_inventory[i].nameid > 0 && sd->inventory_data[i] ) { - if( !itemdb_cansell(&sd->inventory.u.items_inventory[i], pc_get_group_level(sd)) ) + if( !pc_can_sell_item(sd, &sd->inventory.u.items_inventory[i])) continue; - if( battle_config.hide_fav_sell && sd->inventory.u.items_inventory[i].favorite ) - continue; //Cannot sell favs [Jey] - - if( sd->inventory.u.items_inventory[i].expire_time || (sd->inventory.u.items_inventory[i].bound && !pc_can_give_bounded_items(sd)) ) - continue; // Cannot Sell Rental Items or Account Bounded Items - - if( sd->inventory.u.items_inventory[i].bound && !pc_can_give_bounded_items(sd)) - continue; // Don't allow sale of bound items - val=sd->inventory_data[i]->value_sell; if( val < 0 ) continue; diff --git a/src/map/npc.c b/src/map/npc.c index 34fdd583cf..208c35bade 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1412,19 +1412,23 @@ static enum e_CASHSHOP_ACK npc_cashshop_process_payment(struct npc_data *nd, int { struct item_data *id = itemdb_exists(nd->u.shop.itemshop_nameid); + if (!id) { // Item Data is checked at script parsing but in case of item_db reload, check again. + ShowWarning("Failed to find sellitem %hu for itemshop NPC '%s' (%s, %d, %d)!\n", nd->u.shop.itemshop_nameid, nd->exname, map[nd->bl.m].name, nd->bl.x, nd->bl.y); + return ERROR_TYPE_PURCHASE_FAIL; + } if (cost[0] < (price - points)) { char output[CHAT_SIZE_MAX]; memset(output, '\0', sizeof(output)); - sprintf(output, msg_txt(sd, 712), (id) ? id->jname : "NULL", (id) ? id->nameid : 0); // You do not have enough %s (%hu). + sprintf(output, msg_txt(sd, 712), id->jname, id->nameid); // You do not have enough %s (%hu). clif_messagecolor(&sd->bl, color_table[COLOR_RED], output, false, SELF); return ERROR_TYPE_PURCHASE_FAIL; } - if (id) - pc_delitem(sd, pc_search_inventory(sd, nd->u.shop.itemshop_nameid), price - points, 0, 0, LOG_TYPE_NPC); - else - ShowWarning("Failed to delete item %hu from itemshop NPC '%s' (%s, %d, %d)!\n", nd->u.shop.itemshop_nameid, nd->exname, map[nd->bl.m].name, nd->bl.x, nd->bl.y); + if (pc_delitem(sd, pc_search_inventory(sd, nd->u.shop.itemshop_nameid), price - points, 0, 0, LOG_TYPE_NPC)) { + ShowWarning("Failed to delete item %hu from '%s' at itemshop NPC '%s' (%s, %d, %d)!\n", nd->u.shop.itemshop_nameid, sd->status.name, nd->exname, map[nd->bl.m].name, nd->bl.x, nd->bl.y); + return ERROR_TYPE_PURCHASE_FAIL; + } } break; case NPCTYPE_POINTSHOP: @@ -1576,8 +1580,10 @@ void npc_shop_currency_type(struct map_session_data *sd, struct npc_data *nd, in } for (i = 0; i < MAX_INVENTORY; i++) { - if (sd->inventory.u.items_inventory[i].nameid == id->nameid) + if (sd->inventory.u.items_inventory[i].nameid == id->nameid && + pc_can_sell_item(sd, &sd->inventory.u.items_inventory[i])) { total += sd->inventory.u.items_inventory[i].amount; + } } } @@ -4795,3 +4801,4 @@ void do_init_npc(void){ map_addiddb(&fake_nd->bl); // End of initialization } + diff --git a/src/map/pc.c b/src/map/pc.c index 4161ad485f..a4719346c2 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -580,6 +580,30 @@ void pc_inventory_rental_add(struct map_session_data *sd, unsigned int seconds) sd->rental_timer = add_timer(gettick() + umin(tick,3600000), pc_inventory_rental_end, sd->bl.id, 0); } +/** +* Check if the player can sell the current item +* @param sd map_session_data of the player +* @param item struct of the checking item. +* @return bool 'true' is sellable, 'false' otherwise +*/ +bool pc_can_sell_item(struct map_session_data * sd, struct item * item) { + if (sd == NULL || item == NULL) + return false; + + if (!itemdb_cansell(item, pc_get_group_level(sd))) + return false; + + if (battle_config.hide_fav_sell && item->favorite) + return false; //Cannot sell favs (optional config) + + if (item->expire_time) + return false; // Cannot Sell Rental Items + + if (item->bound && !pc_can_give_bounded_items(sd)) + return false; // Don't allow sale of bound items + return true; +} + /** * Determines if player can give / drop / trade / vend items */ diff --git a/src/map/pc.h b/src/map/pc.h index d0ab0e3630..c8be945922 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -989,6 +989,7 @@ int pc_split_atoi(char* str, int* val, char sep, int max); int pc_class2idx(int class_); int pc_get_group_level(struct map_session_data *sd); int pc_get_group_id(struct map_session_data *sd); +bool pc_can_sell_item(struct map_session_data* sd, struct item * item); bool pc_can_give_items(struct map_session_data *sd); bool pc_can_give_bounded_items(struct map_session_data *sd);