Try this one.
NOTES:
- You'll possibly NEED to shift+click people in order to hit them, there's no other way that I know for doing this. Maybe a massive duel inside the square?
- Obviously, usage of the @killable status in your script means your users won't be able to use it for themselves in any normal situation.
- The parameters are listed there in UPPERCASE LETTERS. You should change them throughout all the script in order to make the script to work and to be parsed correctly.
- Script is untested, however it doesn't yield any parse errors provided you follow last note.
NPC_MAP,X,Y script killable -1,X_EVENT,Y_EVENT,{OnTouch: if (!@killable) { @killable = 1; // Variable for keeping track of the status atcommand "@killable"; // Don't remember if it needed a parameter, I think it doesn't addtimer 1000, strnpcinfo(3)+"OnKillable"; // Will check after a second } end;OnKillable: getmapxy(.@map$, .@x, .@y, 0); if ((.@map$ != NPC_MAP || // Outside of the map .@x < X - X_EVENT || .@x < X + X_EVENT || // Out of the area of effect in X side .@y < Y - Y_EVENT || .@y < Y + Y_EVENT)) { // Out of the area of effect in Y side @killable = 0; atcommand "@killable"; // Don't remember if it needed a parameter, I think it doesn't } else addtimercount 1000, strnpcinfo(3)+"OnKillable"; // Will check again after a second until player goes out of the square end;}
Wish you a happy new year!