Jump to content

mauiboy

Members
  • Posts

    55
  • Joined

  • Last visited

Community Answers

  1. mauiboy's post in R> @pk state on/off in town only was marked as the answer   
    Finally found one and works fine on latest version. (Credits to the Owner/s)
     
    First : I got the main source codes edited by malufett here, but it allows you to use @pk anywhere.
     
    https://rathena.org/board/topic/62914-pk-command/
     
    Second : So I keep on searching and I found this function suggested by Brynner to restrict anyone to use @pk state on/off only on towns/non-PVP maps. 
     
    https://rathena.org/board/topic/71819-pk-command-inside-town-only/
     


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

     
    Third : I made a little editing on adding this function from Brynner.
     
    at atcommand.c
     


    int atcommand_pkmode( const int fd, struct map_session_data *sd, const char *command, const char *message ) {

    nullpo_retr(-1, sd);

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

    else 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 normal state.");
    }

    return 0;
    }

    Im currently using this code and it works fine on my test server. Thanks to all!
  2. mauiboy's post in All default weapon animations are missing. was marked as the answer   
    Problem solved. I used a pre-renewal Iteminfo.lub from a fresh pre-renewal data folder that's why weapon animation are gone.
     
    Thanks for the help!
×
×
  • Create New...