ruflux Posted October 2, 2012 Share Posted October 2, 2012 can someone help me what i would like to do is @pk or their pk status can only be changed inside towns /*========================================== * @pk by : java modified :malufet *------------------------------------------*/ ACMD_FUNC(pk) { nullpo_retr(-1, sd);if (!sd->state.pk_mode) { sd->state.pk_mode = 1; clif_displaymessage(sd->fd, "You are now no longer in PK mode."); } else { sd->state.pk_mode = 0; clif_displaymessage(sd->fd, "Returned to PK mode Mwahahahahha!!!."); } return 0; } Quote Link to comment Share on other sites More sharing options...
Brynner Posted October 2, 2012 Share Posted October 2, 2012 can someone help me what i would like to do is @pk or their pk status can only be changed inside towns /*========================================== * @pk by : java modified :malufet *------------------------------------------*/ ACMD_FUNC(pk) { nullpo_retr(-1, sd);if (!sd->state.pk_mode) { sd->state.pk_mode = 1; clif_displaymessage(sd->fd, "You are now no longer in PK mode."); } else { sd->state.pk_mode = 0; clif_displaymessage(sd->fd, "Returned to PK mode Mwahahahahha!!!."); } return 0; } just add this 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; } 1 Quote Link to comment Share on other sites More sharing options...
ruflux Posted October 2, 2012 Author Share Posted October 2, 2012 thanks!! it works!! Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted December 1, 2012 Share Posted December 1, 2012 (edited) It only says I doesn't work on chat but still activates pk on/off command. NVM, it works. sorry about this. Edited December 2, 2012 by Fresh prince Quote Link to comment Share on other sites More sharing options...
can someone help me
what i would like to do is @pk or their pk status can only be changed inside towns
/*==========================================
* @pk by : java modified :malufet
*------------------------------------------*/
ACMD_FUNC(pk)
{
nullpo_retr(-1, sd);if (!sd->state.pk_mode) {
sd->state.pk_mode = 1;
clif_displaymessage(sd->fd, "You are now no longer in PK mode.");
}
else {
sd->state.pk_mode = 0;
clif_displaymessage(sd->fd, "Returned to PK mode Mwahahahahha!!!.");
}
return 0;
}
Link to comment
Share on other sites