Jump to content
  • 0

@pk command inside town only


ruflux

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  09/09/12
  • Last Seen:  

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

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

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;
}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  09/09/12
  • Last Seen:  

thanks!!

it works!!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

It only says I doesn't work on chat but still activates pk on/off command.

NVM, it works. sorry about this.

Edited by Fresh prince
Link to comment
Share on other sites

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.

×
×
  • Create New...