Jump to content
  • 0

R> @PK mode updated for latest rA


Question

Posted

Help me to update this patch for latest rA. Thank you


pk_mod_rA_r16215.PATCH

 

And please add this code to use @pk state on/off only on towns/non-PVP maps

if( map[sd->bl.m].flag.pvp || map[sd->bl.m].flag.gvg || map[sd->bl.m].flag.gvg_castle || map[sd->bl.m].flag.gvg_dungeon ) {
clif_displaymessage(fd, "You can only change your PK state on non-PVP maps.");
return -1;
} 

 

Thank you very much

9 answers to this question

Recommended Posts

  • 0
Posted
2 hours ago, Petey Pablo said:

Help me to update this patch for latest rA. Thank you


pk_mod_rA_r16215.PATCH 2.82 kB · 0 downloads

 

And please add this code to use @pk state on/off only on towns/non-PVP maps


if( map[sd->bl.m].flag.pvp || map[sd->bl.m].flag.gvg || map[sd->bl.m].flag.gvg_castle || map[sd->bl.m].flag.gvg_dungeon ) {
clif_displaymessage(fd, "You can only change your PK state on non-PVP maps.");
return -1;
} 

 

Thank you very much

oh this is the idea of mine wayback 2016. i think i have that patch file in herc. but you still need to change the map[sd->bl.m to mapflag(sd->bl.m

  • 0
Posted
On 4/17/2020 at 6:54 PM, vMariku said:

Can i see what's error?

This is the error

9>D:\Ragnarok\rathena\src\map\atcommand.cpp(240,4): error C2039: 'pvp': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(240,4): error C2039: 'gvg': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(240,4): error C2039: 'gvg_castle': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(240,122): error C2039: 'gvg_dungeon': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
  
9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8183,13): error C2039: 'pvp': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'
9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>'

  
9>D:\Ragnarok\rathena\src\map\battle.cpp(8186,9): error C2065: 'sd': undeclared identifier
9>D:\Ragnarok\rathena\src\map\battle.cpp(8192,3): error C2046: illegal case
9>D:\Ragnarok\rathena\src\map\battle.cpp(8215,3): error C2047: illegal default
9>D:\Ragnarok\rathena\src\map\battle.cpp(8213,4): error C2043: illegal break
9>D:\Ragnarok\rathena\src\map\battle.cpp(8219,4): error C2043: illegal break
9>D:\Ragnarok\rathena\src\map\battle.cpp(8222,2): error C2059: syntax error: 'if'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8223,2): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8223,2): error C2447: '{': missing function header (old-style formal list?)
9>D:\Ragnarok\rathena\src\map\battle.cpp(8229,2): error C2059: syntax error: 'if'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8232,2): error C2059: syntax error: 'if'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8233,2): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8233,2): error C2447: '{': missing function header (old-style formal list?)
9>D:\Ragnarok\rathena\src\map\battle.cpp(8240,2): error C2059: syntax error: 'if'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8241,2): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8241,2): error C2447: '{': missing function header (old-style formal list?)
9>D:\Ragnarok\rathena\src\map\battle.cpp(8281,2): error C2059: syntax error: 'else'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8282,2): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8282,2): error C2447: '{': missing function header (old-style formal list?)
9>D:\Ragnarok\rathena\src\map\battle.cpp(8298,2): error C2059: syntax error: 'if'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8301,2): error C2059: syntax error: 'else'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8304,2): error C2059: syntax error: 'return'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8304,24): error C2059: syntax error: '-'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8305,1): error C2059: syntax error: '}'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8305,1): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8312,1): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\battle.cpp(8312,1): error C2447: '{': missing function header (old-style formal list?)

 

On 4/17/2020 at 7:36 PM, Brynner said:

oh this is the idea of mine wayback 2016. i think i have that patch file in herc. but you still need to change the map[sd->bl.m to mapflag(sd->bl.m

Can you share your working copy for latest rA version? Thank you

  • 0
Posted

On your atcommand.cpp

1. 

After 

ACMD_DEF(jailfor)

Add 

ACMD_DEF2("pk",pk)

2. 

Before 

ACMD_FUNC(whogm)

Add

ACMD_FUNC(pk)
{
	
	nullpo_retr(-1, sd);

	if (map_getmapflag(sd->bl.m, MF_PVP) || map_getmapflag(sd->bl.m, MF_GVG) || map_getmapflag(sd->bl.m, MF_GVG_CASTLE) || map_getmapflag(sd->bl.m, MF_GVG_DUNGEON)) {

		clif_displaymessage(fd, "You can only change your PK state on non-PVP maps.");
		return -1;
	}

	if (!sd->state.pk_mode) {
		sd->state.pk_mode = 1;
		clif_displaymessage(fd, "You are now no longer in PK mode.");
	}
	else {
		sd->state.pk_mode = 0;
		clif_displaymessage(fd, "Returned to normal state.");
	}

	return 0;
}

 

On your pc.hpp

After 

unsigned int warping : 1

Add 

unsigned int pk_mode : 1;

 

On your battle.cpp

After

else if (sd->duel_group && !((!battle_config.duel_allow_pvp && mapdata->flag[MF_PVP]) || (!battle_config.duel_allow_gvg && mapdata_flag_gvg(mapdata))))
{
	if (t_bl->type == BL_PC && (sd->duel_group == ((TBL_PC*)t_bl)->duel_group))
		return (BCT_ENEMY & flag) ? 1 : -1; // Duel targets can ONLY be your enemy, nothing else.
	else
		return 0; // You can't target anything out of your duel
}

Add

else if (map_getmapflag(s_bl->m, MF_PVP) && sd->state.pk_mode && t_bl->type != BL_MOB)
	return 0;

After

if( ((sd->state.block_action & PCBLOCK_IMMUNE) || (sc->data[SC_KINGS_GRACE] && s_bl->type != BL_PC)) && flag&BCT_ENEMY )
	return 0; // Global immunity only to Attacks

Add

if (sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB && map_getmapflag(s_bl->m, MF_PVP))
	return 0;

Recompile and re-test

I cannot create patch today as I am doing something with my Git. So yea do it manually for now ?

  • Upvote 1
  • 0
Posted
14 minutes ago, Patskie said:

On your atcommand.cpp

1. 

After 


ACMD_DEF(jailfor)

Add 


ACMD_DEF2("pk",pk)

2. 

Before 


ACMD_FUNC(whogm)

Add


ACMD_FUNC(pk)
{
	
	nullpo_retr(-1, sd);

	if (map_getmapflag(sd->bl.m, MF_PVP) || map_getmapflag(sd->bl.m, MF_GVG) || map_getmapflag(sd->bl.m, MF_GVG_CASTLE) || map_getmapflag(sd->bl.m, MF_GVG_DUNGEON)) {

		clif_displaymessage(fd, "You can only change your PK state on non-PVP maps.");
		return -1;
	}

	if (!sd->state.pk_mode) {
		sd->state.pk_mode = 1;
		clif_displaymessage(fd, "You are now no longer in PK mode.");
	}
	else {
		sd->state.pk_mode = 0;
		clif_displaymessage(fd, "Returned to normal state.");
	}

	return 0;
}

 

On your pc.hpp

After 


unsigned int warping : 1

Add 


unsigned int pk_mode : 1;

 

On your battle.cpp

After


else if (sd->duel_group && !((!battle_config.duel_allow_pvp && mapdata->flag[MF_PVP]) || (!battle_config.duel_allow_gvg && mapdata_flag_gvg(mapdata))))
{
	if (t_bl->type == BL_PC && (sd->duel_group == ((TBL_PC*)t_bl)->duel_group))
		return (BCT_ENEMY & flag) ? 1 : -1; // Duel targets can ONLY be your enemy, nothing else.
	else
		return 0; // You can't target anything out of your duel
}

Add


else if (map_getmapflag(s_bl->m, MF_PVP) && sd->state.pk_mode && t_bl->type != BL_MOB)
	return 0;

After


if( ((sd->state.block_action & PCBLOCK_IMMUNE) || (sc->data[SC_KINGS_GRACE] && s_bl->type != BL_PC)) && flag&BCT_ENEMY )
	return 0; // Global immunity only to Attacks

Add


if (sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB && map_getmapflag(s_bl->m, MF_PVP))
	return 0;

Recompile and re-test

I cannot create patch today as I am doing something with my Git. So yea do it manually for now ?


I got this error
 

9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10293,3): error C2059: syntax error: '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10293,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10293,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10293,18): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10294,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10294,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10294,17): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10295,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10295,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10295,17): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10296,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10296,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10296,18): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10297,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10297,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10297,20): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10298,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10298,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10298,25): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10299,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10299,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10299,19): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10300,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10300,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10300,17): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10301,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10301,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10301,40): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10302,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10302,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10302,17): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10303,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10303,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10303,18): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10304,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10304,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10304,17): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10305,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10305,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10305,27): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10306,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10306,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10306,27): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10307,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10307,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10307,27): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10308,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10308,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10308,17): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10309,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10309,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10309,17): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10310,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10310,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10310,18): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10311,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10311,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10311,30): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10312,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10312,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10312,32): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10313,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10313,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10313,22): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10314,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10314,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10314,25): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10315,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10315,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10315,26): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10316,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10316,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10316,22): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10317,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10317,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10317,51): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10318,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10318,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10318,32): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10319,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10319,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10319,17): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10320,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10320,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10320,19): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10321,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10321,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10321,18): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10322,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10322,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10322,19): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10323,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10323,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10323,18): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10324,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10324,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10324,18): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10325,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10325,3): error C2143: syntax error: missing ';' before '}'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10325,33): error C2059: syntax error: ','
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10326,3): error C2143: syntax error: missing ';' before '{'
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10326,3): fatal error C1003: error count exceeds 100; stopping compilation

 

  • 0
Posted
On 4/17/2020 at 10:07 PM, Patskie said:

Post the code

Here

ACMD_FUNC(pk)
{
	
	nullpo_retr(-1, sd);

	if (map_getmapflag(sd->bl.m, MF_PVP) || map_getmapflag(sd->bl.m, MF_GVG) || map_getmapflag(sd->bl.m, MF_GVG_CASTLE) || map_getmapflag(sd->bl.m, MF_GVG_DUNGEON)) {

		clif_displaymessage(fd, "You can only change your PK state on non-PVP maps.");
		return -1;
	}

	if (!sd->state.pk_mode) {
		sd->state.pk_mode = 1;
		clif_displaymessage(fd, "You are now no longer in PK mode.");
	}
	else {
		sd->state.pk_mode = 0;
		clif_displaymessage(fd, "Returned to normal state.");
	}

	return 0;
}

 

On 4/17/2020 at 10:07 PM, Patskie said:

Post the code

Before this

/*==========================================
 * @rura, @warp, @mapmove
 *------------------------------------------*/

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...