i have this @pk mod, the problem is when Pally and a char, are both in pk off state, pally wont be able to devo the char,
basically
pally->devo->party member (both pk off) = success pally->devo->party member (both pk on) = success
pally->devo->party member (not in same pk state) = fail
currently happening,
pally->devo->party member (both pk on) = success
pally->devo->party member (both pk off) = fail
pally->devo->party member (not in same pkstate) = fail
conf\atcommand_athena.conf
pk:0,80// pk
map\atcommand.c, find
---------------------/*==========================================
* atcommand_info[] structure definition
*------------------------------------------*/AtCommandInfo atcommand_info[]={
it becomes
----------// @pkint atcommand_pk(constint fd,struct map_session_data *sd,constchar*command,constchar*message ){unsignedint tick = gettick();
nullpo_retr(-1, sd);if(!map[sd->bl.m].flag.town){//Only can be used at town
clif_displaymessage(sd->fd,"You can only use this command inside towns.");return-1;}if(DIFF_TICK(sd->pk_mode_tick,tick)>0){//check the delay before use this command again
clif_displaymessage(sd->fd,"You must wait 60 seconds to use this command again.");return-1;}else{if(!sd->state.pk_mode){
sd->state.pk_mode =1;
clif_displaymessage(sd->fd,"You are can no longer be attacked by players.");
sd->pk_mode_tick = tick +60000;//set the delay here}else{
sd->state.pk_mode =0;
clif_displaymessage(sd->fd,"You can now attack players");
sd->pk_mode_tick = tick +60000;//set the delay here}return0;}/*==========================================
* atcommand_info[] structure definition
*------------------------------------------*/AtCommandInfo atcommand_info[]={============================================================================================================================================================================================================================================================
map\atcommand.c, find
---------------------{"delitem",60,60, atcommand_delitem },{"charcommands",1,1, atcommand_commands },{"font",1,1, atcommand_font },
it becomes
----------{"delitem",60,60, atcommand_delitem },{"charcommands",1,1, atcommand_commands },{"font",1,1, atcommand_font },{"pkmode",0,80, atcommand_pkmode },============================================================================================================================================================================================================================================================
map\battle.c, find (line 3407 svn15191)---------------------------------------if( sd->state.monster_ignore && flag&BCT_ENEMY )return0;// Global inminuty only to Attacksif( 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
it becomes
----------if( sd->state.monster_ignore && flag&BCT_ENEMY )return0;// Global inminuty only to Attacksif( map[m].flag.pvp && sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB )return0;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
still in map\battle.c, near above, find (line 3471 svn15191)------------------------------------------------------------elsereturn0;// You can't target anything out of your duel}}if( map_flag_gvg(m)&&!sd->status.guild_id && t_bl->type == BL_MOB &&((TBL_MOB*)t_bl)->guardian_data )
it becomes
----------elsereturn0;// You can't target anything out of your duel}elseif( map[m].flag.pvp && sd->state.pk_mode && t_bl->type != BL_MOB )//pkmodereturn0;//pkmode}if( map_flag_gvg(m)&&!sd->status.guild_id && t_bl->type == BL_MOB &&((TBL_MOB*)t_bl)->guardian_data )
the last,in map\pc.h, find (line 141 svn15191)-----------------------------------------------unsignedint warping :1;//states whether you're in the middle of a warp processing} state;struct{
it becomes
----------unsignedint warping :1;//states whether you're in the middle of a warp processingunsignedint pk_mode :1;//[malufett] //pkmode} state;struct{============================================================================================================================================================================================================================================================
map\pc.h, find (line 210 svn15191)----------------------------------unsignedint ks_floodprotect_tick;// [Kill Steal Protection]struct{
become
------unsignedint ks_floodprotect_tick;// [Kill Steal Protection]unsignedint pk_mode_tick;//@pkmodestruct{
map\pc.h, find (line 579 svn15191)----------------------------------
sd->canlog_tick = gettick();//Required to prevent homunculus copuing a base speed of 0.
become
------
sd->canlog_tick = gettick();
sd->pk_mode_tick = gettick();//@pk//Required to prevent homunculus copuing a base speed of 0.
Question
chowking
Hello,
i have this @pk mod, the problem is when Pally and a char, are both in pk off state, pally wont be able to devo the char,
basically
pally->devo->party member (both pk off) = success
pally->devo->party member (both pk on) = success
pally->devo->party member (not in same pk state) = fail
currently happening,
pally->devo->party member (both pk on) = success
pally->devo->party member (both pk off) = fail
pally->devo->party member (not in same pkstate) = fail
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.