VicTheSlik 0 Posted October 28, 2015 Can I request for @pk on/off plugin. Something like this http://herc.ws/board/topic/463-pk-patch-v11/ Quote Share this post Link to post Share on other sites
0 Aeromesi 180 Posted October 28, 2015 @@Dastgir? Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted October 28, 2015 useless crap src/map/atcommand.c | 30 ++++++++++++++++++++++++++++++ src/map/battle.c | 4 ++++ src/map/pc.h | 1 + 3 files changed, 35 insertions(+)diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex ff88f2c..16e63c2 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -197,6 +197,35 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { return info->help; } +ACMD(pkmode) {++// unsigned int tick = iTimer->gettick();++ nullpo_retr(-1, sd);+ + if( map_flag_vs(sd->bl.m) ) {+ clif->message(sd->fd, "You can only change your PK state on non-PVP maps.");+ return false;+ }++// if(DIFF_TICK(sd->pk_mode_tick,tick) > 0){ //check the delay before use this command again+// clif->message(sd->fd, "You cannot turn OFF your PK state twice within just 15 minutes.");+// return false;+// }+//else{+ if (!sd->state.pk_mode) {+ sd->state.pk_mode = 1;+ clif->message(sd->fd, "Your PK state is now OFF");+// sd->pk_mode_tick = tick + 0; //set the delay here+ } else {+ sd->state.pk_mode = 0;+ clif->message(sd->fd, "Your PK state is now ON");+// sd->pk_mode_tick = tick + 1500000; //set the delay here+ }+//}+ return true;+}+ /*========================================== * @send (used for testing packet sends from the client) *------------------------------------------*/@@ -9596,6 +9625,7 @@ void atcommand_basecommands(void) { ACMD_DEF(makehomun), ACMD_DEF(homfriendly), ACMD_DEF(homhungry),+ ACMD_DEF(pkmode), ACMD_DEF(homtalk), ACMD_DEF(hominfo), ACMD_DEF(homstats),diff --git a/src/map/battle.c b/src/map/battle.cindex 1cbc3ba..84eb42f 100644--- a/src/map/battle.c+++ b/src/map/battle.c@@ -6511,6 +6511,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( sd->state.monster_ignore && flag&BCT_ENEMY ) return 0; // Global immunity only to Attacks+ if( map->list[m].flag.pvp && sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB )+ return 0; if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma ) state |= BCT_ENEMY; // Characters with bad karma may fight amongst them if( sd->state.killable ) {@@ -6581,6 +6583,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f return 0; } }+ else if( map_flag_gvg(m) && sd->state.pk_mode && t_bl->type != BL_MOB )+ return 0; if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM ) return 0; //If you don't belong to a guild, can't target emperium. if( t_bl->type != BL_PC )diff --git a/src/map/pc.h b/src/map/pc.hindex 2c8b24a..9d739a9 100644--- a/src/map/pc.h+++ b/src/map/pc.h@@ -205,6 +205,7 @@ struct map_session_data { unsigned int standalone : 1;/* [Ind/Hercules <3] */ unsigned int loggingout : 1; unsigned int warp_clean : 1;+ unsigned int pk_mode : 1; } state; struct { unsigned char no_weapon_damage, no_magic_damage, no_misc_damage; what does that patch do ? I think its bug and in post#6, somebody already say just use @killable isn't it ? Quote Share this post Link to post Share on other sites
0 Tranquility 12 Posted October 28, 2015 useless crap src/map/atcommand.c | 30 ++++++++++++++++++++++++++++++ src/map/battle.c | 4 ++++ src/map/pc.h | 1 + 3 files changed, 35 insertions(+)diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex ff88f2c..16e63c2 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -197,6 +197,35 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { return info->help; } +ACMD(pkmode) {++// unsigned int tick = iTimer->gettick();++ nullpo_retr(-1, sd);+ + if( map_flag_vs(sd->bl.m) ) {+ clif->message(sd->fd, "You can only change your PK state on non-PVP maps.");+ return false;+ }++// if(DIFF_TICK(sd->pk_mode_tick,tick) > 0){ //check the delay before use this command again+// clif->message(sd->fd, "You cannot turn OFF your PK state twice within just 15 minutes.");+// return false;+// }+//else{+ if (!sd->state.pk_mode) {+ sd->state.pk_mode = 1;+ clif->message(sd->fd, "Your PK state is now OFF");+// sd->pk_mode_tick = tick + 0; //set the delay here+ } else {+ sd->state.pk_mode = 0;+ clif->message(sd->fd, "Your PK state is now ON");+// sd->pk_mode_tick = tick + 1500000; //set the delay here+ }+//}+ return true;+}+ /*========================================== * @send (used for testing packet sends from the client) *------------------------------------------*/@@ -9596,6 +9625,7 @@ void atcommand_basecommands(void) { ACMD_DEF(makehomun), ACMD_DEF(homfriendly), ACMD_DEF(homhungry),+ ACMD_DEF(pkmode), ACMD_DEF(homtalk), ACMD_DEF(hominfo), ACMD_DEF(homstats),diff --git a/src/map/battle.c b/src/map/battle.cindex 1cbc3ba..84eb42f 100644--- a/src/map/battle.c+++ b/src/map/battle.c@@ -6511,6 +6511,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( sd->state.monster_ignore && flag&BCT_ENEMY ) return 0; // Global immunity only to Attacks+ if( map->list[m].flag.pvp && sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB )+ return 0; if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma ) state |= BCT_ENEMY; // Characters with bad karma may fight amongst them if( sd->state.killable ) {@@ -6581,6 +6583,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f return 0; } }+ else if( map_flag_gvg(m) && sd->state.pk_mode && t_bl->type != BL_MOB )+ return 0; if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM ) return 0; //If you don't belong to a guild, can't target emperium. if( t_bl->type != BL_PC )diff --git a/src/map/pc.h b/src/map/pc.hindex 2c8b24a..9d739a9 100644--- a/src/map/pc.h+++ b/src/map/pc.h@@ -205,6 +205,7 @@ struct map_session_data { unsigned int standalone : 1;/* [Ind/Hercules <3] */ unsigned int loggingout : 1; unsigned int warp_clean : 1;+ unsigned int pk_mode : 1; } state; struct { unsigned char no_weapon_damage, no_magic_damage, no_misc_damage; what does that patch do ? I think its bug and in post#6, somebody already say just use @killable isn't it ? The condition should be that both parties are killable, with just using @killable, doesn't mean the other party/person has to be killable to kill the other person. With the requested @pk here, you should be able to set PK conditions that count for every player I think. Probably a bit like @duel? We might need more specifics ;p Quote Share this post Link to post Share on other sites
0 VicTheSlik 0 Posted October 28, 2015 useless crap src/map/atcommand.c | 30 ++++++++++++++++++++++++++++++ src/map/battle.c | 4 ++++ src/map/pc.h | 1 + 3 files changed, 35 insertions(+)diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex ff88f2c..16e63c2 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -197,6 +197,35 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { return info->help; } +ACMD(pkmode) {++// unsigned int tick = iTimer->gettick();++ nullpo_retr(-1, sd);+ + if( map_flag_vs(sd->bl.m) ) {+ clif->message(sd->fd, "You can only change your PK state on non-PVP maps.");+ return false;+ }++// if(DIFF_TICK(sd->pk_mode_tick,tick) > 0){ //check the delay before use this command again+// clif->message(sd->fd, "You cannot turn OFF your PK state twice within just 15 minutes.");+// return false;+// }+//else{+ if (!sd->state.pk_mode) {+ sd->state.pk_mode = 1;+ clif->message(sd->fd, "Your PK state is now OFF");+// sd->pk_mode_tick = tick + 0; //set the delay here+ } else {+ sd->state.pk_mode = 0;+ clif->message(sd->fd, "Your PK state is now ON");+// sd->pk_mode_tick = tick + 1500000; //set the delay here+ }+//}+ return true;+}+ /*========================================== * @send (used for testing packet sends from the client) *------------------------------------------*/@@ -9596,6 +9625,7 @@ void atcommand_basecommands(void) { ACMD_DEF(makehomun), ACMD_DEF(homfriendly), ACMD_DEF(homhungry),+ ACMD_DEF(pkmode), ACMD_DEF(homtalk), ACMD_DEF(hominfo), ACMD_DEF(homstats),diff --git a/src/map/battle.c b/src/map/battle.cindex 1cbc3ba..84eb42f 100644--- a/src/map/battle.c+++ b/src/map/battle.c@@ -6511,6 +6511,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( sd->state.monster_ignore && flag&BCT_ENEMY ) return 0; // Global immunity only to Attacks+ if( map->list[m].flag.pvp && sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB )+ return 0; if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma ) state |= BCT_ENEMY; // Characters with bad karma may fight amongst them if( sd->state.killable ) {@@ -6581,6 +6583,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f return 0; } }+ else if( map_flag_gvg(m) && sd->state.pk_mode && t_bl->type != BL_MOB )+ return 0; if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM ) return 0; //If you don't belong to a guild, can't target emperium. if( t_bl->type != BL_PC )diff --git a/src/map/pc.h b/src/map/pc.hindex 2c8b24a..9d739a9 100644--- a/src/map/pc.h+++ b/src/map/pc.h@@ -205,6 +205,7 @@ struct map_session_data { unsigned int standalone : 1;/* [Ind/Hercules <3] */ unsigned int loggingout : 1; unsigned int warp_clean : 1;+ unsigned int pk_mode : 1; } state; struct { unsigned char no_weapon_damage, no_magic_damage, no_misc_damage; what does that patch do ? I think its bug and in post#6, somebody already say just use @killable isn't it ? I've used this patch when im using rAthena long time ago. I think its from eA if im correct and yes its bugged. I never tried the patch on herc. Never tried using @killable. useless crap src/map/atcommand.c | 30 ++++++++++++++++++++++++++++++ src/map/battle.c | 4 ++++ src/map/pc.h | 1 + 3 files changed, 35 insertions(+)diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex ff88f2c..16e63c2 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -197,6 +197,35 @@ static inline const char* atcommand_help_string(AtCommandInfo *info) { return info->help; } +ACMD(pkmode) {++// unsigned int tick = iTimer->gettick();++ nullpo_retr(-1, sd);+ + if( map_flag_vs(sd->bl.m) ) {+ clif->message(sd->fd, "You can only change your PK state on non-PVP maps.");+ return false;+ }++// if(DIFF_TICK(sd->pk_mode_tick,tick) > 0){ //check the delay before use this command again+// clif->message(sd->fd, "You cannot turn OFF your PK state twice within just 15 minutes.");+// return false;+// }+//else{+ if (!sd->state.pk_mode) {+ sd->state.pk_mode = 1;+ clif->message(sd->fd, "Your PK state is now OFF");+// sd->pk_mode_tick = tick + 0; //set the delay here+ } else {+ sd->state.pk_mode = 0;+ clif->message(sd->fd, "Your PK state is now ON");+// sd->pk_mode_tick = tick + 1500000; //set the delay here+ }+//}+ return true;+}+ /*========================================== * @send (used for testing packet sends from the client) *------------------------------------------*/@@ -9596,6 +9625,7 @@ void atcommand_basecommands(void) { ACMD_DEF(makehomun), ACMD_DEF(homfriendly), ACMD_DEF(homhungry),+ ACMD_DEF(pkmode), ACMD_DEF(homtalk), ACMD_DEF(hominfo), ACMD_DEF(homstats),diff --git a/src/map/battle.c b/src/map/battle.cindex 1cbc3ba..84eb42f 100644--- a/src/map/battle.c+++ b/src/map/battle.c@@ -6511,6 +6511,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( sd->state.monster_ignore && flag&BCT_ENEMY ) return 0; // Global immunity only to Attacks+ if( map->list[m].flag.pvp && sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB )+ return 0; if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma ) state |= BCT_ENEMY; // Characters with bad karma may fight amongst them if( sd->state.killable ) {@@ -6581,6 +6583,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f return 0; } }+ else if( map_flag_gvg(m) && sd->state.pk_mode && t_bl->type != BL_MOB )+ return 0; if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM ) return 0; //If you don't belong to a guild, can't target emperium. if( t_bl->type != BL_PC )diff --git a/src/map/pc.h b/src/map/pc.hindex 2c8b24a..9d739a9 100644--- a/src/map/pc.h+++ b/src/map/pc.h@@ -205,6 +205,7 @@ struct map_session_data { unsigned int standalone : 1;/* [Ind/Hercules <3] */ unsigned int loggingout : 1; unsigned int warp_clean : 1;+ unsigned int pk_mode : 1; } state; struct { unsigned char no_weapon_damage, no_magic_damage, no_misc_damage; what does that patch do ? I think its bug and in post#6, somebody already say just use @killable isn't it ? The condition should be that both parties are killable, with just using @killable, doesn't mean the other party/person has to be killable to kill the other person. With the requested @pk here, you should be able to set PK conditions that count for every player I think. Probably a bit like @duel? We might need more specifics ;p Yes, My server is set to PK Mode. Not like duel but, heres a situation. If player 1 is set to pk off and player 2 is set to pk on they cant hit each other just like @monsterignore but with players. Only the players who is set to pk on is hittable. Quote Share this post Link to post Share on other sites
0 VicTheSlik 0 Posted October 29, 2015 Can I bring this up? Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted October 30, 2015 don't you think this is too convenient ? for example if 2 players already engaging each others having @pk on, then the 3rd player can find the correct timing to @pk on when both of them hp low after killing them both, @pk off back that's so cheating I prefer the way @duel system works only those who are currently @duel can @invite others to join them this way there are no backstabbers Quote Share this post Link to post Share on other sites
0 Tranquility 12 Posted October 30, 2015 You'll have to add a delay on when the PK can be turned off. I remember WoW had a similar mechanism where you are 'friendly' towards everyone and flagged for PK once you attacked. Afterwards you'd have to wait 5 minutes until the PK flag was allowed to be turned off again. Based on that logic, it could be a viable command for the intended purpose. Quote Share this post Link to post Share on other sites
0 VicTheSlik 0 Posted November 1, 2015 Another thing about the @pk on/off is that you can only use that command in towns not on fields, dungeons and gvg maps. And @pk on/off is only effective on pvp maps not guild maps like woe. (I guess this will prevent the cheat). My server is in PK mode. So @duel is used in towns or other non pvp maps only. Quote Share this post Link to post Share on other sites
0 Easycore 31 Posted November 2, 2015 I would also like this plugin Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted November 5, 2015 @@VicTheSlik @@Easycore fine ... http://upaste.me/b16121870ca99a9c0 btw I found that when pk mode, there is no indicator showing that player having pk on I rather fix this kind of source mode though http://herc.ws/board/topic/4589-pk-area/?p=29668 1 Legend reacted to this Quote Share this post Link to post Share on other sites
0 VicTheSlik 0 Posted November 6, 2015 (edited) @@VicTheSlik @@Easycore fine ... http://upaste.me/b16121870ca99a9c0 btw I found that when pk mode, there is no indicator showing that player having pk on I rather fix this kind of source mode though http://herc.ws/board/topic/4589-pk-area/?p=29668 Thank you so much! I will try this Edit: Found bug The Invulnerable to other players is not working when pk is off heres some screenshots. Player 1 on PK ON Player 2 on PK OFF Edited November 6, 2015 by VicTheSlik Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted November 6, 2015 isn't that what the script do ? so you can't pk when pk mode off .. or maybe I misunderstood what this pk mode is .... maybe YOU should explain to me what this modification does because I download the original, its bug, so I don't even understand what that topic talking about 1 Easycore reacted to this Quote Share this post Link to post Share on other sites
0 VicTheSlik 0 Posted November 6, 2015 Yes you can't PK if you are in PK off. Like you're just an audience watching them how they fight. And you cannot Attack Players and be hit by Players who is on PK On. You can still be able kill monsters and can be attack by monsters when PK is Off. Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted November 6, 2015 My server is in PK mode.so you turned on pk mode inside confbattlemisc.txt ?well isn't this official .... I played Singapore pk server before, the players there pk outside town if you don't want players to pk in that map, use nopvp mapflag prontera mapflag pvp offhonestly .... haiz ... nvm Quote Share this post Link to post Share on other sites
0 Easycore 31 Posted November 11, 2015 @@VicTheSlik @@Easycore fine ... http://upaste.me/b16121870ca99a9c0 btw I found that when pk mode, there is no indicator showing that player having pk on I rather fix this kind of source mode though http://herc.ws/board/topic/4589-pk-area/?p=29668 Thanks for this! However ... there is a way to add Biolab Aura when @pk is turned ON? For differentiate between PK and not PK players Quote Share this post Link to post Share on other sites
0 Petey Pablo 0 Posted October 1, 2016 @@VicTheSlik @@Easycore fine ... http://upaste.me/b16121870ca99a9c0 btw I found that when pk mode, there is no indicator showing that player having pk on I rather fix this kind of source mode though http://herc.ws/board/topic/4589-pk-area/?p=29668 Error please fix pkmode.c: In function ‘plugin_init’: pkmode.c:64:2: warning: implicit declaration of function ‘addHookPost’ [-Wimplicit-function-declaration] addHookPost( "battle->check_target", battle_check_target_post, ); ^ pkmode.c:64:2: warning: nested extern declaration of ‘addHookPost’ [-Wnested-externs] pkmode.c:64:65: error: expected expression before ‘)’ token addHookPost( "battle->check_target", battle_check_target_post, ); ^ make[1]: *** [../../plugins/pkmode.so] Error 1 Quote Share this post Link to post Share on other sites
0 Khazou 12 Posted November 30, 2016 Use the one from there: https://github.com/dastgir/HPM-Plugins/blob/master/src/plugins/pk.c Quote Share this post Link to post Share on other sites
Can I request for @pk on/off plugin. Something like this http://herc.ws/board/topic/463-pk-patch-v11/
Share this post
Link to post
Share on other sites