Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  int prevKills = 0;
  int currentKills = 0;
  int killsToLoot = 0; //You need to set this at script startup

    public boolean checkWarriorDead() {
        if (getMyPlayer().getInteracting().getAnimation() == warriorDead && getMyPlayer().isInCombat()) {        
            currentKills++;
    if( (currentKills - prevKills) >= killsToLoot )
    {
      //do something
      prevKills = currentKills;
    }
            wait(random(200,300));
      return true;
        }
        else {
            return false;
        }
    }