Mine sisusse
Otsi siit
  • Rohkem valikuid...
Otsi tulemusi mis sisaldab...
Otsi tulemusi...
Jälgi teemat sisse logides  

~~ RSBot scriptid ~~

Soovitatud postitused

Oleks vaja abi scrpiti tööle panemisega

import java.awt.*;
import java.awt.event.KeyEvent;

import com.speljohan.rsbot.bot.Bot;
import com.speljohan.rsbot.event.listeners.PaintListener;
import com.speljohan.rsbot.script.Script;
import com.speljohan.rsbot.script.wrappers.*;

public class DPNewtEyes extends Script implements PaintListener {
   public double getVersion() {
       return(1.0);
   }

   public String getName() {
       return("Dontpanic's Newt Eye Buyer");
   }

   public String getAuthor() {
       return("Dontpanic - [email]contact@tsrk.net[/email]");
   }

   public String getScriptCategory() {
       return("Dontpanic Scripts");
   }

   public String getScriptDescription( ) {
       String html = "";

       html += "\n";
       html += "\n";
       html += "" + getName() + " v" + getVersion() + "
\n";
       html += "Author: " + getAuthor() + "

\n";
       html += "Start anywhere with money in your inventory.";
       //html += "[align=center]\n";
       //html += "Arguments:\n";
       //html += "[/align]\n";
       html += "\n";
       html += "\n";

       return(html);
   }

   public boolean onStart(String[] args) {
       Bot.getEventManager( ).addListener(PaintListener.class, this);

       return(true);
   }

   public void onFinish() {
       Bot.getEventManager().removeListener(PaintListener.class, this);
   }

   int waitAfterMoving = -1;

   int failCount = 0;

   public int loop() {

       if(!isLoggedIn()) {
           return random(100,200);
       }
       if(checkCamera()) {
           return random(500, 800);
       }
       if(getMyPlayer().isMoving()) {
           return random(150, 200);
       }
       if(waitAfterMoving != -1) {
           int toReturn = waitAfterMoving;
           waitAfterMoving = -1;
           return toReturn;
       }
       if(checkAttack()) {
           return random(800, 1000);
       }
       if(getMyPlayer().getAnimation() != -1) {
           return random(150, 200);
       }
       int result = work();
       if(result != -1) {
           failCount = 0;
           return result;
       }
       if(walkBack()) {
           failCount = 0;
           return random(500, 800);
       }
       failCount ++;
       if(failCount >= 10) {
           failCount = 0;
           homeTele();
           return random(2000, 3000);
       }
       return random(1000, 2000);    
   }

   boolean cameraMoving = false;

   public boolean checkCamera() {
       if(cameraMoving) {
           if(Bot.getClient().getCameraCurveY() >= 380) {
               Bot.getInputManager().releaseKey((char) KeyEvent.VK_UP);
               cameraMoving = false;
           }
           return true;
       } else if (Bot.getClient().getCameraCurveY()             Bot.getInputManager().pressKey((char) KeyEvent.VK_UP);
           cameraMoving = true;
           return true;
       }
       return false;
   }

   public boolean checkAttack() {
       if(getMyPlayer().isInCombat()) {
           return runFromCombat();
       } else {
           return false;
       }
   }

   public boolean runFromCombat() {
       if(atShop()) {
           shopToBank();
           return true;
       }
       if(atBank()) {
           bankToShop();
           return true;
       }
       return false;
   }

   int loads =  0;

   public void onRepaint(Graphics g) {
       g.setColor(Color.YELLOW);
       g.drawString("Dontpanic's Newt Eye Buyer", 260, 20); 
       g.drawString("Loads: " + loads, 260, 38);
   }

   public int work() {
       if(getInventoryCount() != 28) {
           return buy();
       } else {
           triedBuy = false;
           return bank();
       }
   }

   public void runOn() {
       setRun(true);
   }

   public int buy() {
       if(atShop()) {
           if(shopOpen()) {
               if(triedBuy) {
                   openStock();
               }
               buyFromShop();
               triedBuy = true;
               return random(800, 1000);
           } else {
               runOn();
               if(openDoor()) {
                   return random(500, 800);
               }
               if(openShop()) {
                   waitAfterMoving = random(200, 300);
                   return random(500, 800);
               } else {
                   dpWalkTile(shopTile);
                   waitAfterMoving = random(300, 400);
                   return random(500, 800);
               }
           }
       } else {
           if(bankToShop()) {
               return random(500, 800);
           } else {
               return -1;
           }
       }            
   }

   public int bank() {
       if(atBank()) {
           if(RSInterface.getInterface(INTERFACE_BANK).isValid()) {
               bank.depositAllExcept(coinID);
               loads ++;
               return random(500, 800);
           } else {
               if(distanceTo(bankTile) > 1) {
                   if(dpWalkTile(bankTile)) {
                       waitAfterMoving = random(200, 300);
                       return random(500, 800);
                   } else {
                       return -1;
                   }
               } else {
                   RSObject object = findObject(bankBoothID);
                   if(atObject(object, "uickly")) {
                       return random(500, 800);
                   } else {
                       if(dpWalkTile(bankTile)) {
                           return random(500, 800);
                       } else {
                           return -1;
                       }
                   }
               }
           }    
       } else {
           if(openDoor()) {
               return random(500, 800);
           }
           if(shopToBank()) {
               return random(500, 800);
           } else {
               return -1;
           }
       }
   }

   public boolean dpWalkPath(RSTile[] path) {
       for(int i = path.length - 1; i >= 0; i--) {
           if(dpWalkTile(path[i])) {
               return true;
           }
       }        
       return false;
   }

   public boolean dpWalkTile(RSTile tile) {
       if(distanceTo(tile)             walkTileMM(tile);
           return true;
       } else {
           return false;
       }
   }

   public void homeTele() {
       openTab(Script.TAB_MAGIC);
       castSpell(1);
   }

   public boolean walkBack() {
       return dpWalkPath(walkBackPath);
   }

   public boolean shopToBank() {
       return dpWalkPath(shopToBankPath);
   }

   public boolean bankToShop() {
       return dpWalkPath(bankToShopPath);
   }

   public boolean shopOpen() {
       return RSInterface.getInterface(620).isValid();
   }

   public boolean openShop() {
       return atNPC(getNearestNPCByID(583), "Trade");
   }

   public boolean openDoor() {
       RSObject object = findObject(1533);
       if (object !=null) {
           if (distanceTo(object)             atDoor(object, "East", "Open");
           return true;
           }
       }
       return false;
   }

   boolean triedBuy = false;

   public void openStock() {
       int x = 61 + random(0, 3);
       int y = 72 + random(0, 3);
       moveMouse(x, y);
       clickMouse(x, y, true);
       wait(random(800, 1000));
   }

   public void buyFromShop() {
       int x = 384 + random(0, 3);
       int y = 105 + random(0, 3);
       moveMouse(x, y);
       clickMouse(x, y, false);
       wait(random(150, 200));
       if(atMenu("Buy X")) {
           wait(random(700, 800));
           sendText("99", true);
       }
   }

   public boolean atShop() {
       return distanceTo(shopTile)     }

   public boolean atBank() {
       return distanceTo(bankTile)     }

   public RSTile bankTile = new RSTile(3092, 3245);

   public RSTile shopTile = new RSTile(3014, 3259);

   public int coinID = 995;

   public static int bankBoothID = 2213;

   public RSTile[] bankToShopPath = {new RSTile(3092,3245),new RSTile(3087,3249),new RSTile(3083,3254),new RSTile(3082,3260),new RSTile(3078,3266),new RSTile(3075,3272),new RSTile(3070,3276),new RSTile(3064,3276),new RSTile(3058,3276),new RSTile(3052,3276),new RSTile(3046,3276),new RSTile(3040,3276),new RSTile(3034,3276),new RSTile(3030,3271),new RSTile(3025,3267),new RSTile(3021,3262),
       new RSTile(3017,3259),};

   public RSTile[] shopToBankPath = {new RSTile(3017,3259),new RSTile(3021,3265),new RSTile(3027,3267),new RSTile(3032,3272),new RSTile(3037,3276),new RSTile(3043,3276),new RSTile(3049,3276),new RSTile(3055,3276),new RSTile(3061,3276),new RSTile(3067,3276),new RSTile(3072,3271),new RSTile(3077,3267),new RSTile(3080,3261),new RSTile(3081,3255),new RSTile(3086,3250),new RSTile(3092,3247),
       new RSTile(3092,3245),};

   public RSTile[] walkBackPath = {new RSTile(3222, 3219), new RSTile(3232, 3224), new RSTile(3227, 3234), new RSTile(3222, 3244), new RSTile(3211, 3246), new RSTile(3200, 3247), new RSTile(3189, 3246), new RSTile(3178, 3243), new RSTile(3168, 3238), new RSTile(3157, 3236), new RSTile(3146, 3232), new RSTile(3136, 3227), new RSTile(3125, 3227), new RSTile(3114, 3228), new RSTile(3108, 3238), new RSTile(3103, 3248), 
       new RSTile(3092, 3245)};

}
Last edited by dejong12 (Today 05

Jaga seda postitust


Postituse link
Share on other sites

PM-ist on nii, et copid selle teksti siis lähed wordi ja paned paste. Siis lähed sinna kus on sul scriptid. Avad sealt sellise scripti mida sul vaja ei lähe. Teed selle scripti vanast kirjast tühjaks ja lähed wordi võtad sealt select all, copy ja siis seal tühjas failis paste.

Nii nüüd sul on olemas script, kuid see ei hakka ennem tööle kui sa pead scripti nime vahetama. Seda saab nii teha, et võtad nt selle koodi:

public class DPNewtEyes extends Script implements PaintListener

copid sealt selle: DPNewtEyes ning renamed scripti iseenda. Siis paned compile all ja peaks funkima.

Küsige julgesti kui midagi jäi arusaamatuks!

Jaga seda postitust


Postituse link
Share on other sites
Author of the topic Postitas
Oleks vaja abi scrpiti tööle panemisega

 

Proovi

 

import java.awt.*;
import java.awt.event.KeyEvent;

import com.speljohan.rsbot.bot.Bot;
import com.speljohan.rsbot.event.listeners.PaintListener;
import com.speljohan.rsbot.script.Script;
import com.speljohan.rsbot.script.wrappers.*;

public class DPNewtEyes extends Script implements PaintListener {
   public double getVersion() {
       return(1.0);
   }

   public String getName() {
       return("Dontpanic's Newt Eye Buyer");
   }

   public String getAuthor() {
       return("Dontpanic - [email]contact@tsrk.net[/email]");
   }

   public String getScriptCategory() {
       return("Dontpanic Scripts");
   }

   public String getScriptDescription( ) {
       String html = "";

       html += "\n";
       html += "\n";
       html += "" + getName() + " v" + getVersion() + "
\n";
       html += "Author: " + getAuthor() + "

\n";
       html += "Start anywhere with money in your inventory.";
       //html += "[align=center]\n";
       //html += "Arguments:\n";
       //html += "[/align]\n";
       html += "\n";
       html += "\n";

       return(html);
   }

   public boolean onStart(String[] args) {
       Bot.getEventManager( ).addListener(PaintListener.class, this);

       return(true);
   }

   public void onFinish() {
       Bot.getEventManager().removeListener(PaintListener.class, this);
   }

   int waitAfterMoving = -1;

   int failCount = 0;

   public int loop() {

       if(!isLoggedIn()) {
           return random(100,200);
       }
       if(checkCamera()) {
           return random(500, 800);
       }
       if(getMyPlayer().isMoving()) {
           return random(150, 200);
       }
       if(waitAfterMoving != -1) {
           int toReturn = waitAfterMoving;
           waitAfterMoving = -1;
           return toReturn;
       }
       if(checkAttack()) {
           return random(800, 1000);
       }
       if(getMyPlayer().getAnimation() != -1) {
           return random(150, 200);
       }
       int result = work();
       if(result != -1) {
           failCount = 0;
           return result;
       }
       if(walkBack()) {
           failCount = 0;
           return random(500, 800);
       }
       failCount ++;
       if(failCount >= 10) {
           failCount = 0;
           homeTele();
           return random(2000, 3000);
       }
       return random(1000, 2000);    
   }

   boolean cameraMoving = false;

   public boolean checkCamera() {
       if(cameraMoving) {
           if(Bot.getClient().getCameraCurveY() >= 380) {
               Bot.getInputManager().releaseKey((char) KeyEvent.VK_UP);
               cameraMoving = false;
           }
           return true;
       } else if (Bot.getClient().getCameraCurveY()             Bot.getInputManager().pressKey((char) KeyEvent.VK_UP);
           cameraMoving = true;
           return true;
       }
       return false;
   }

   public boolean checkAttack() {
       if(getMyPlayer().isInCombat()) {
           return runFromCombat();
       } else {
           return false;
       }
   }

   public boolean runFromCombat() {
       if(atShop()) {
           shopToBank();
           return true;
       }
       if(atBank()) {
           bankToShop();
           return true;
       }
       return false;
   }

   int loads =  0;

   public void onRepaint(Graphics g) {
       g.setColor(Color.YELLOW);
       g.drawString("Dontpanic's Newt Eye Buyer", 260, 20); 
       g.drawString("Loads: " + loads, 260, 38);
   }

   public int work() {
       if(getInventoryCount() != 28) {
           return buy();
       } else {
           triedBuy = false;
           return bank();
       }
   }

   public void runOn() {
       setRun(true);
   }

   public int buy() {
       if(atShop()) {
           if(shopOpen()) {
               if(triedBuy) {
                   openStock();
               }
               buyFromShop();
               triedBuy = true;
               return random(800, 1000);
           } else {
               runOn();
               if(openDoor()) {
                   return random(500, 800);
               }
               if(openShop()) {
                   waitAfterMoving = random(200, 300);
                   return random(500, 800);
               } else {
                   dpWalkTile(shopTile);
                   waitAfterMoving = random(300, 400);
                   return random(500, 800);
               }
           }
       } else {
           if(bankToShop()) {
               return random(500, 800);
           } else {
               return -1;
           }
       }            
   }

   public int bank() {
       if(atBank()) {
           if(RSInterface.getInterface(INTERFACE_BANK).isValid()) {
               bank.depositAllExcept(coinID);
               loads ++;
               return random(500, 800);
           } else {
               if(distanceTo(bankTile) > 1) {
                   if(dpWalkTile(bankTile)) {
                       waitAfterMoving = random(200, 300);
                       return random(500, 800);
                   } else {
                       return -1;
                   }
               } else {
                   RSObject object = findObject(bankBoothID);
                   if(atObject(object, "uickly")) {
                       return random(500, 800);
                   } else {
                       if(dpWalkTile(bankTile)) {
                           return random(500, 800);
                       } else {
                           return -1;
                       }
                   }
               }
           }    
       } else {
           if(openDoor()) {
               return random(500, 800);
           }
           if(shopToBank()) {
               return random(500, 800);
           } else {
               return -1;
           }
       }
   }

   public boolean dpWalkPath(RSTile[] path) {
       for(int i = path.length - 1; i >= 0; i--) {
           if(dpWalkTile(path[i])) {
               return true;
           }
       }        
       return false;
   }

   public boolean dpWalkTile(RSTile tile) {
       if(distanceTo(tile)             walkTileMM(tile);
           return true;
       } else {
           return false;
       }
   }

   public void homeTele() {
       openTab(Script.TAB_MAGIC);
       castSpell(1);
   }

   public boolean walkBack() {
       return dpWalkPath(walkBackPath);
   }

   public boolean shopToBank() {
       return dpWalkPath(shopToBankPath);
   }

   public boolean bankToShop() {
       return dpWalkPath(bankToShopPath);
   }

   public boolean shopOpen() {
       return RSInterface.getInterface(620).isValid();
   }

   public boolean openShop() {
       return atNPC(getNearestNPCByID(583), "Trade");
   }

   public boolean openDoor() {
       RSObject object = findObject(1533);
       if (object !=null) {
           if (distanceTo(object)             atDoor(object, "East", "Open");
           return true;
           }
       }
       return false;
   }

   boolean triedBuy = false;

   public void openStock() {
       int x = 61 + random(0, 3);
       int y = 72 + random(0, 3);
       moveMouse(x, y);
       clickMouse(x, y, true);
       wait(random(800, 1000));
   }

   public void buyFromShop() {
       int x = 384 + random(0, 3);
       int y = 105 + random(0, 3);
       moveMouse(x, y);
       clickMouse(x, y, false);
       wait(random(150, 200));
       if(atMenu("Buy X")) {
           wait(random(700, 800));
           sendText("99", true);
       }
   }

   public boolean atShop() {
       return distanceTo(shopTile)     }

   public boolean atBank() {
       return distanceTo(bankTile)     }

   public RSTile bankTile = new RSTile(3092, 3245);

   public RSTile shopTile = new RSTile(3014, 3259);

   public int coinID = 995;

   public static int bankBoothID = 2213;

   public RSTile[] bankToShopPath = {new RSTile(3092,3245),new RSTile(3087,3249),new RSTile(3083,3254),new RSTile(3082,3260),new RSTile(3078,3266),new RSTile(3075,3272),new RSTile(3070,3276),new RSTile(3064,3276),new RSTile(3058,3276),new RSTile(3052,3276),new RSTile(3046,3276),new RSTile(3040,3276),new RSTile(3034,3276),new RSTile(3030,3271),new RSTile(3025,3267),new RSTile(3021,3262),
       new RSTile(3017,3259),};

   public RSTile[] shopToBankPath = {new RSTile(3017,3259),new RSTile(3021,3265),new RSTile(3027,3267),new RSTile(3032,3272),new RSTile(3037,3276),new RSTile(3043,3276),new RSTile(3049,3276),new RSTile(3055,3276),new RSTile(3061,3276),new RSTile(3067,3276),new RSTile(3072,3271),new RSTile(3077,3267),new RSTile(3080,3261),new RSTile(3081,3255),new RSTile(3086,3250),new RSTile(3092,3247),
       new RSTile(3092,3245),};

   public RSTile[] walkBackPath = {new RSTile(3222, 3219), new RSTile(3232, 3224), new RSTile(3227, 3234), new RSTile(3222, 3244), new RSTile(3211, 3246), new RSTile(3200, 3247), new RSTile(3189, 3246), new RSTile(3178, 3243), new RSTile(3168, 3238), new RSTile(3157, 3236), new RSTile(3146, 3232), new RSTile(3136, 3227), new RSTile(3125, 3227), new RSTile(3114, 3228), new RSTile(3108, 3238), new RSTile(3103, 3248), 
       new RSTile(3092, 3245)};

}

 

et ma nagu suht algaja aga mis seal estfisheris sees on? karamja fisher..?

 

Sript minu tehtud aga koodid copitud.

 

Kõike fishe (catherby, barbian village jne)

Jaga seda postitust


Postituse link
Share on other sites
VIP
Sript minu tehtud aga koodid copitud

 

See , et sa nime muudad ei tähenda kohe , et script sinutehtud on :dead:


[sIGPIC][/sIGPIC]

images?q=tbn:ANd9GcQRvgSY6NuXU3nRFiFklJXo-w2wNpgBxvu3Z8SsNK-nrcDxVkUM8MrTHL5H

images?q=tbn:ANd9GcQsJlL3Pym6X2PRhms2lTQzJ8Jlnuepm49yoRYohAHG-20YF9bD7Uo95c-B

chicago-bulls-fan.gif

"Offense sells tickets, defense wins games, rebounding wins championships."

Jaga seda postitust


Postituse link
Share on other sites
VIP

Palun andke keegi see schooli värk.

Panin ööseks macroma, tegi ~400 iron ore tuli see, seisis.

Kooli läksin panin fishima tegi ~100 kala (trout/salmon), tuli see, seisis.

Jaga seda postitust


Postituse link
Share on other sites

Kommentaari lisamiseks loo konto või logi sisse

Kommenteerimiseks peate olema liige

Loo konto

Liituge meie kommuuni uue kontoga. See on lihtne!

Loo uus konto

Logi sisse

On juba konto? Logi sisse siit.

Logi sisse nüüd
Jälgi teemat sisse logides  

×
×
  • Loo uus...

Oluline informatsioon

Selle veebisaidi paremaks muutmiseks oleme teie seadmesse paigutanud küpsised . Võite kohandada oma küpsiste seadeid , vastasel juhul eeldame, et te olete küpsiste kasutamisega nõus kui jätkate veebisaidil sirvimist.. Palun lugege läbi Kasutustingimused ja Privaatsuspoliitika.