I wanted to create a killable command by not using it as atcommand since my custom npc script will repeatedly use @killable and I got no way to detect if it's 'on' or 'off'.
I was thinking to make a custom_script command with this format ==> killable <"character name/id">,<on|off>;
So even if I repeatedly use the script like killable "Lord Ganja",0; It won't turn on..
this is from atcommand.c , but i don't have any idea how can I do it on script.c.. Any help please? Thanks in advance!
/*========================================== * @killable by MouseJstr * enable other people killing you *------------------------------------------*/ACMD(killable) { sd->state.killable = !sd->state.killable; if(sd->state.killable) clif->message(fd, msg_fd(fd,242)); else { clif->message(fd, msg_fd(fd,288)); map->foreachinrange(atcommand->stopattack,&sd->bl, AREA_SIZE, BL_CHAR, sd->bl.id); } return true;}
Can anybody help me do this?
I wanted to create a killable command by not using it as atcommand since my custom npc script will repeatedly use @killable and I got no way to detect if it's 'on' or 'off'.
I was thinking to make a custom_script command with this format ==> killable <"character name/id">,<on|off>;
So even if I repeatedly use the script like killable "Lord Ganja",0; It won't turn on..
this is from atcommand.c , but i don't have any idea how can I do it on script.c.. Any help please? Thanks in advance!
Share this post
Link to post
Share on other sites