var LevelUtils = require("../../../src/levels").LevelUtils;
var initiate_combat = require("../../../src/rtcombat").initiate_combat;

exports.listeners = {
  playerEnter: function(l10n) {
    var callback = function(success) {};
    return function(room, rooms, player, players, npc, npcs) {
      if (!player.isInCombat() && !npc.isInCombat())
        initiate_combat(l10n, this, player, room, npcs, players, callback);
      else
        var attackInterval = setInterval(attack, 5000)

      function attack() {
        if (npc && player && !player.isInCombat() && !npc.isInCombat()){
          clearInterval(attackInterval);
          initiate_combat(l10n, this, player, room, npcs, players, callback);
        } else cancelInterval(attackInterval);
      }

    }
  }
};

var LevelUtils = require("../../../src/levels").LevelUtils;
var initiate_combat = require("../../../src/rtcombat").initiate_combat;

exports.listeners = {
    playerEnter: function(l10n) {
        var callback = function(success) {};
        return function(room, rooms, player, players, npc, npcs) {
            if (!player.isInCombat() && !npc.isInCombat())
                initiate_combat(l10n, this, player, room, npcs, players, callback);
        }
    }
};

Remove buggy 'fix'