All pastes #913760 Raw Edit

Mine

public text v1 · immutable
·published 2008-02-22 09:37 UTC
rendered paste body
/*==========================================
 * @killer by MouseJstr
 * enable killing players even when not in pvp
 *------------------------------------------*/
int atcommand_killer(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
	nullpo_retr(-1, sd);
	sd->state.killer = !sd->state.killer;

	if(sd->state.killer)
		clif_displaymessage(fd, msg_txt(241));
	else {
		clif_displaymessage(fd, msg_txt(287));
		pc_stop_attack(sd);
	}
	return 0;
}

/*==========================================
 * @killable by MouseJstr
 * enable other people killing you
 *------------------------------------------*/
int atcommand_killable(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
	nullpo_retr(-1, sd);
	sd->state.killable = !sd->state.killable;

	if(sd->state.killable)
		clif_displaymessage(fd, msg_txt(242));
	else {
		clif_displaymessage(fd, msg_txt(288));
		map_foreachinrange(atcommand_stopattack,&sd->bl, AREA_SIZE, BL_CHAR, sd->bl.id);
	}
	return 0;
}


/*=========================================
 * @pk hack by KageSenshi
 * enable player-kill mode
 *-----------------------------------------*/

int atcommand_pk(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
    if (sd->state.killer != sd->state.killable){
        sd->state.killer = 0;
        sd->state.killable = 0;
    }
    atcommand_killer(fd,sd,command,message);
    atcommand_killable(fd,sd,command,message);
	
	return 0;
}