Jump to content

VicTheSlik

Members
  • Content Count

    12
  • Joined

  • Last visited

Posts posted by VicTheSlik


  1. 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.


  2. @@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

    RFsJSyo.png

     

    Player 2 on PK OFF

    vKzbNwU.png


  3. 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.


  4.  

     

    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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.