rendered paste bodystring ClickText;
string NPCNAME;
log("Starting script...");
for (int i = 1; i < 6; i++) {
if (cmd.equals(commands[i])) {
monster = i;
}
}
}
public void script()
throws InterruptedException
{
if (monster == 0){
NPCNAME="Guard";
NPC=GuardColor;
ClickText=("k G");
DeadPath=DeadToGuards;
}
if (monster == 1){
NPCNAME="Goblins";
NPC=GoblinColor;
ClickText=("k G");
DeadPath=DeadToGoblins;
}
if (monster == 2){
NPCNAME="Goblins";
NPC=GoblinColor;
ClickText=("k G");
DeadPath=DeadToGoblins;
}
if (monster == 3){
NPCNAME="Barbarians";
NPC=BarbarianColor;
ClickText=("k B");
DeadPath=DeadToBarbarians;
}
if (monster == 4){
NPCNAME="Al-Kharid Guards";
NPC=AlKharidColor;
ClickText=("k A");
DeadPath=DeadToAlKharid;
}
if (monster == 5){
NPCNAME="Seagulls";
NPC=AlKharidColor;
ClickText=("k S");
DeadPath=DeadToAlKharid;
}
setFightMode();
while(Alive() == true) {
attackMob();
if(rangeTile.distanceTo(getLocation()) > 5){
deadWalk();
WieldAndDrop();
setFightMode();
}
}
deadWalk();
setFightMode();
WieldAndDrop();
}
}
public void attackMob()throws InterruptedException {
if(!theHPBars.failSafeInCombat()) {
if(NPC != null) {
sleep(50);
NPC.doTopTextAndMenuOnMoving(ClickText, ClickText);
AttCount++;
KillCount++;
}
} else {
log("we are fighting now....");
int randomammount=random(100,120);
if (AttCount>randomammount){
setFightMode();
AttCount=0;
log("rechecked everything :D");
}
sleep(random(3000,4500));
}
}
public boolean Alive()throws InterruptedException {
if(getLocation().distanceTo(deathTile) > 25) {
return true;
} else {
log("OMGOZORZ WE ARE DEAD!! deadwalk pl0x??");
DeadCount++;
return false;
}
}