Cooking script for lost city.. I know we all been waiting for one. So here we go...
I took advantage of the getOption method. So it is Menu operated. Cooks Lobs, Swordies, or sharks.
This script will drop ANYTHING thats not a cooked or RAW fish or a sleeping bag. So cook BARE only take your sleeping bag and your fish.
Banks cooked fish.
Bot has new built in anti-ban so I did not implement my own.
You may do so if you wish.
Script:
-TimeDead
I took advantage of the getOption method. So it is Menu operated. Cooks Lobs, Swordies, or sharks.
This script will drop ANYTHING thats not a cooked or RAW fish or a sleeping bag. So cook BARE only take your sleeping bag and your fish.
Banks cooked fish.
Bot has new built in anti-ban so I did not implement my own.
You may do so if you wish.
Script:
- Code:
import bot.*;
public class CookingTime extends Methods {
public CookingTime(Client mc){super(mc);
}
public void main(String args[]) {
int food = getOption("Which food would you like to cook?", new String[]{"Lobster", "Swordfish", "Shark"});
printMessage("@or2@System: @cya@Script released by TimeDead");
printMessage("@red@System: @cya@Remember to cook BARE with only sleeping bag and Fish!");
if(food == -1) {
printMessage("@or2@Cooker: @yel@You must choose a food");
stop();
}
int RAW = -1;
int COOKED = -1;
int BURNT = -1;
if(food == 0) {
RAW = 372;
COOKED = 373;
BURNT = 374;
}
else if(food == 1) {
RAW = 369;
COOKED = 370;
BURNT = 371;
}
else if(food == 2) {
RAW = 545;
COOKED = 546;
BURNT = 547;
}
long time = 0L;
while(running()) {
while(itemCount(RAW) == 0 && running()) {
while(!questionMenu() && running()) {
time = System.currentTimeMillis();
int banker[] = getNPCIndex(224);
if(banker[0] != -1)
talkToNPC(banker[0]);
while(System.currentTimeMillis() - time < 5000 && !questionMenu() && running())
wait(1000);
}
wait(500);
answerQuestion(0);
wait(1000);
time = System.currentTimeMillis();
while(!inBank() && running() && System.currentTimeMillis() - time < 5000)
wait(100);
if(itemCount(COOKED) > 0)
depositAll(COOKED);
wait(random(500, 1000));
withdrawAll(RAW);
wait(random(500, 1000));
closeBank();
}
while(itemCount(RAW) > 0 && running()) {
for(int i = 0; i < inventoryCount(); i++) {
if(inventoryItem(i) != 1263 && inventoryItem(i) != RAW && inventoryItem(i) != COOKED) {
dropItem(getItemSlot(inventoryItem(i)));
wait(random(2000, 2500));
}
}
if(sleeping())
wait(100);
else {
useItemOnObject(getItemSlot(RAW), 172, 3534);
wait(random(3000, 4000));
}
}
}
}
public boolean onServerMessage(String s) {
s = s.toLowerCase();
if(s.contains("you cook the")) {
return true;
}
else if(s.contains("is now nicely cooked"))
return true;
else if(s.contains("you accidently burn the")) {
return true;
}
return false;
}
public void onStop() {
printMessage("@or2@Cooker: @yel@stopped");
}
public char CHECKS = 0;
public char COOK_FISH = 1;
public char DROP_BURNT = 2;
public char DO_BANKING = 3;
}
-TimeDead