Neon Bot
Welcome to NBot! NBot says to Login or Register!
Scripting Template Rawrbotad

Join the forum, it's quick and easy

Neon Bot
Welcome to NBot! NBot says to Login or Register!
Scripting Template 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

Scripting Template

2 posters

Go down  Message [Page 1 of 1]

1Scripting Template Empty Scripting Template Wed Dec 01, 2010 5:07 pm

TimeDead

TimeDead
Admin

Here is a simple script template for everyone to use.

Code:
import bot.Client;
import bot.Methods;

public class Template extends Methods {

   public Template(Client mc) {
      super(mc);
      
   }

   // Integers and Strings go here
   
    public void main(String args[]) {
       //args integer goes here if any
       printMessage("This is a Template...");
        printMessage("@gre@Please use this for scripting use.");
       
        while(running()) { 
            if(fatigue() == 100L && !sleeping()) {
              
            }
        }
    }
     //When the script stops
      public void onStop() {
         handleCommand("status");
         printMessage("@or2@Script Stopped");
      }
      
      //Now add the Anti-Mod into your script
       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! Abandoning script! Respond if you can!");
                 stop();
                
                
               }
         if(s.startsWith("Mod") || s.contains("mod") || s.contains("bot") || s.contains("Bot") || s.contains("Pyru") || s.contains("Lister")){ //if loop
            speak("Hey");   
            stop();
                  
                                     printMessage("Mod detected, script and ocr stopped");
         }
         }
           }
   
} //Make sure you end the class when you finish your script!



Last edited by TimeDead on Thu Dec 02, 2010 3:54 pm; edited 1 time in total

https://nbot.iftopic.com

2Scripting Template Empty Re: Scripting Template Wed Dec 01, 2010 10:37 pm

Kille4life7



Thanks, Bro Razz

Back to top  Message [Page 1 of 1]

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