Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).keyup(function(e){
- if(e.which==69){
- for(var i in g.npc){
- if ((Math.abs(hero.rx - g.npc[i].x) <= 1 && Math.abs(hero.ry - g.npc[i].y) <= 1) && (g.npc[i].type == 2 || g.npc[i].type == 3)){
- message('atakowany przeciwnik: "'+g.npc[i].nick+'"');
- _g("fight&a=attack&ff=1&id=-"+i);
- break;
- }
- }
- }//test
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement