Neon Bot
Welcome to NBot! NBot says to Login or Register!
CookingTime Rawrbotad

Join the forum, it's quick and easy

Neon Bot
Welcome to NBot! NBot says to Login or Register!
CookingTime Rawrbotad
Neon Bot
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Neon Bot
NBot build 11.2a launched! Click Here!
Bad Ideas make for great stories
We need more site Activity! Don't let us lose hope in everyone!

You are not connected. Please login or register

CookingTime

4 posters

Go down  Message [Page 1 of 1]

1CookingTime Empty CookingTime Tue Dec 07, 2010 1:24 am

TimeDead

TimeDead
Admin

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:
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

https://nbot.iftopic.com

2CookingTime Empty Re: CookingTime Tue Dec 07, 2010 1:56 am

Kille4life7



Thanks so much for the script bro!

3CookingTime Empty Re: CookingTime Tue Dec 07, 2010 2:18 am

Lowrider

Lowrider

works great man thanks

4CookingTime Empty Re: CookingTime Tue Dec 07, 2010 9:45 pm

Lowrider

Lowrider

Here is a modified version to include tuna

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[]{"Tuna", "Lobster", "Swordfish", "Shark"});
      printMessage("@or2@System: @cya@Script released by TimeDead");
      printMessage("@or2@System: @cya@Tuna added by Lowrider");
      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 = 366;
        COOKED = 367;
        BURNT = 368;
      }
      else if(food == 1) {
        RAW = 372;
        COOKED = 373;
        BURNT = 374;
      }
      else if(food == 2) {
        RAW = 369;
        COOKED = 370;
        BURNT = 371;
      }
      else if(food == 3) {
        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(1500);
            }
            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(800, 1200));
            withdrawAll(RAW);
            wait(random(800, 1200));
            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 onChatMessage(int modstatus, String name, String message) {
    String s = name.toLowerCase();
    if (modstatus != 4 && modstatus != 7) {
        printMessage("@red@Warning: @whi@Mod detected");
        String m = message.toLowerCase();
        if (m.contains("YOUR NAME HERE")) {
          printMessage("@ran@Mod is talking to you! Respond we are stopping.");
          stop();
        }
  if(s.startsWith("Mod") || s.contains("mod") || s.contains("bot") || s.contains("Bot") || s.contains("Pyru") || s.contains("Lister")){
    speak("Hey");   
    stop();
         
                              printMessage("Mod detected, script and ocr stopped");
  }
  }
    }
  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;
}

5CookingTime Empty Re: CookingTime Wed Dec 08, 2010 2:59 am

Kille4life7



Works so great man! Thanks very much

6CookingTime Empty Re: CookingTime Wed Dec 08, 2010 3:48 am

Joel_T



can someone post the .class file? ffs please my JDK is a piece of shit on this new comp apparently lol

7CookingTime Empty Re: CookingTime Wed Dec 08, 2010 1:55 pm

Lowrider

Lowrider

Joel_T wrote:can someone post the .class file? ffs please my JDK is a piece of shit on this new comp apparently lol
Here ya go
http://www.mediafire.com/?pbugv53dsujb9ql

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum