Index: db/packet_db.txt =================================================================== --- db/packet_db.txt (revision 17306) +++ db/packet_db.txt (working copy) @@ -1758,6 +1758,7 @@ 0x08D7,28,battlegroundreg,2:4 //Added to prevent disconnections 0x08CF,10 //Amulet spirits 0x0977,14 //Monster HP Bar +0x0916,26,guildinvite2,2 //2012-04-18aRagexeRE [Special Thanks to Judas!] packet_ver:31 @@ -1777,7 +1778,6 @@ 0x0368,6,solvecharname,2 0x08E5,41,bookingregreq,2:4 //Added to prevent disconnections 0x08d2,10 -0x0916,26,guildinvite2,2 //2012-06-18 packet_ver: 32 =================================================================== --- src/map/guild.c (revision 17306) +++ src/map/guild.c (working copy) @@ -613,7 +613,7 @@ return 0; //Invite permission. if(!battle_config.invite_request_check) { - if (tsd->party_invite > 0 || tsd->trade_partner || tsd->adopt_invite) { //checking if there no other invitation pending + if (tsd->party_invite > 0 || tsd->trade_partner || tsd->adopt_invite) { //checking if there no other invitation pending clif_guild_inviteack(sd,0); return 0; } @@ -632,7 +632,7 @@ return 0; } - //search an empty spot in guild + //search an empty spot in guild ARR_FIND( 0, g->max_member, i, g->member[i].account_id == 0 ); if(i==g->max_member){ clif_guild_inviteack(sd,3); Index: src/map/pc.c =================================================================== --- src/map/pc.c (revision 17306) +++ src/map/pc.c (working copy) @@ -6579,19 +6579,19 @@ sd->state.using_fake_npc = 0; } if (sd->st) { - sd->st->state = (flag==1)?CLOSE:END; + sd->st->state = ((flag==1 && sd->st->mes_active)?CLOSE:END); sd->st->mes_active = 0; } sd->state.menu_or_input = 0; sd->npc_menu = 0; +#ifdef SECURE_NPCTIMEOUT sd->npc_idle_timer = INVALID_TIMER; +#endif clif_scriptclose(sd,sd->npc_id); - if(flag==2 && sd->st) { - if( sd->st && sd->st->state != RUN ) {// free attached scripts that are waiting - script_free_state(sd->st); - sd->st = NULL; - sd->npc_id = 0; - } + if(sd->st && sd->st->state == END ) {// free attached scripts that are waiting + script_free_state(sd->st); + sd->st = NULL; + sd->npc_id = 0; } } } Index: src/map/clif.c =================================================================== --- src/map/clif.c (revision 17306) +++ src/map/clif.c (working copy) @@ -12138,7 +12138,7 @@ } /// Guild invite request (/guildinvite) -/// 0916 .24B +/// 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((char *)RFIFOP(fd, 2)); Index: src/common/mmo.h =================================================================== --- src/common/mmo.h (revision 17306) +++ src/common/mmo.h (working copy) @@ -48,6 +48,7 @@ #ifndef PACKETVER #define PACKETVER 20120410 + //#define PACKETVER 20130320 //#define PACKETVER 20111116 #endif