Script will thieve designated NPC.
Auto-Run away.
Auto-Eat.
Auto-Run away.
Auto-Eat.
- Code:
import bot.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class iThieveTrue extends Methods {
public iThieveTrue(Client mc) {
super(mc);
}
boolean food = true;
int toEat,combatAttempt;
int[] cooked = {350,355,357,359,362,364,367,370,373,546,551,553,555};
public void main(String args[]) {
String name = JOptionPane.showInputDialog(null, "Enter Npc ID to thieve.");
int toThieve = Integer.parseInt(name);
printMessage(toThieve);
if(toThieve < 0) {
printMessage(toThieve+" is not a number. Stopping");
stop();
}
while(running()) {
int[] letGet = getNPCIndex(toThieve);
if(inventoryCount() < 29) {
printMessage("@red@Warning!!! Starting Script without food!");
food = false;
}
while(getStatCurrent(3) <= getStatBase(3) / 3 && food) {
if(inventoryCount() > 29) {
for(int i = 0; i < cooked.length; i++) {
useItem(getItemSlot(cooked[i]));
wait(random(100,500));
}
}
}
while(getStatCurrent(3) >= getStatBase(3) / 3) {
if(inCombat(ourPlayer())) {
printMessage("In Combat, running away!");
walkTo(myPos()[0]+2,myPos()[1]+2);
combatAttempt++;
wait(random(300,600));
}
while(!imAt(getNPCIndex(toThieve)[1], getNPCIndex(toThieve)[2])) {
walkTo(getNPCIndex(toThieve)[1],getNPCIndex(toThieve)[2]);
wait(random(400,600));
}
while(imAt(getNPCIndex(toThieve)[1], getNPCIndex(toThieve)[2])) {
thieveNPC(getNPCIndex(toThieve)[0]);
wait(random(1400,1600));
}
wait(random(1500,2500));
}
}
}
public void onStop() {
printMessage("Thiever Stopped");
printMessage("In Combat "+combatAttempt+" times");
}
}