public void useSkillEx(SkillBarSkillSlot skillSlot, int targetId, int delay) throws IOException {
        LOG.debug("Using skill in slot {} on target {}", skillSlot, targetId);
        //FIXME: why isn't the delay used????
        if (this.isDead(-2)) {
            LOG.debug("The player is dead");
            return;
        }

        long startDeadlockCheck = System.currentTimeMillis();
        this.useSkill(skillSlot, targetId);

        int skillRecharge = 0;
        long elapsedTime = 0;
        do {
            if (this.isDead()) {
                LOG.debug("The player is dead");
                break;
            }

            int playerSkill = this.getSkill(-2);
            elapsedTime = System.currentTimeMillis() - startDeadlockCheck;
            if (playerSkill == 0 && elapsedTime > 1000) {
                break;
            }
            
            try {
                Thread.sleep(250);
            } catch (InterruptedException ex) {
                // ignore
            }

            skillRecharge = this.getSkillRecharge(skillSlot);
        } while (skillRecharge == 0 || elapsedTime < 8000);
        try {
            Thread.sleep(250);
        } catch (InterruptedException ex) {
            // ignore
        }
        LOG.debug("Used skill on target");
    }