• Log in or sign up for an account here: https://www.sythe.org/login

Quick Question About Rsbot

Status
Not open for further replies.

EliasWhufc

Active Member
Joined
Jan 23, 2009
Sythe Gold
0
Messages
116
Quick Question About Rsbot
When people request scripts and they give them the details in the forum.

How do i save that info and put it into the Rsbot?

for instance this :

import java.awt.*;

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 Snaper extends Script implements PaintListener {

public int State = 0;
public int Runs = 0;
public int BankID = 11758;
public int Snape = 231;
public long startTime = System.currentTimeMillis();
public long time = System.currentTimeMillis();
public final RSTile[] Tosnape = {
new RSTile(3010, 3355),
new RSTile(3006, 3351),
new RSTile(3006, 3339),
new RSTile(3006, 3328),
new RSTile(3005, 3318),
new RSTile(2997, 3314),
new RSTile(2993, 3306),
new RSTile(2987, 3302),
new RSTile(2982, 3292),
new RSTile(2973, 3287),
new RSTile(2964, 3281),
new RSTile(2954, 3277),
new RSTile(2945, 3272),
new RSTile(2937, 3264),
new RSTile(2928, 3263),
new RSTile(2918, 3268),
new RSTile(2911, 3278),
new RSTile(2907, 3288),
new RSTile(2906, 3295)
};
public final RSTilePath Snapepath = new RSTilePath(Tosnape, this);
public RSTile[] Tobank = reversePath(Tosnape);
public final RSTilePath Bankpath = new RSTilePath(Tobank, this);
int randomTab[] = new int[] { TAB_ATTACK, TAB_STATS, TAB_QUESTS,
TAB_INVENTORY, TAB_EQUIPMENT, TAB_PRAYER, TAB_MAGIC, TAB_LOGOUT,
TAB_FRIENDS, TAB_IGNORE, TAB_CLAN, TAB_OPTIONS, TAB_CONTROLS, TAB_MUSIC };

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

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

int antiBan( ) {
int GambleInt = random(1, 60);

if (GambleInt == 11) {
int x = random(0, 750);
int y = random(0, 500);
moveMouse(0, 0, x, y);
log("Anti-ban, moving mouse.");
}

if (GambleInt == 37) {
openTab(randomTab[random(0, 14)]);
log("Anti-ban, opening random tab. ");
}


return (random(500, 1000));
}

public void onRepaint( Graphics g ) {
if(isLoggedIn()) {
long millis = System.currentTimeMillis() - startTime;
long hours = millis / (1000 * 60 * 60);
millis -= hours * (1000 * 60 * 60);
long minutes = millis / (1000 * 60);
millis -= minutes * (1000 * 60);
long seconds = millis / 1000;
g.setColor(Color.RED);
g.drawString("Snaper created by Lancelot074", 9, 275);
g.drawString("Took " + Runs*28 + " snape grass.", 9, 291);
g.drawString("Run for: " + hours + " hours " + minutes + " minutes " + seconds + " seconds.", 9, 307);
g.drawString("Made " + Integer.toString(Runs) + " load(s).", 9, 323);
g.drawString("Earned: " + Runs*28*385 + "gp.", 9, 339);
}
}

public void Walkthere() {
setRun( true );
//Bankpath.walkToEnd();
walkPathMM(randomizePath(Tobank, 2, 2), 15);
//while(getMyPlayer().isMoving())
//antiBan();
}

public void Walkback() {
setRun( true );
//Snapepath.walkToEnd();
walkPathMM(randomizePath(Tosnape, 2, 2), 15);
//while(getMyPlayer().isMoving())
//antiBan();
}

public void Dobanking() {
RSObject loll = findObject(BankID);
if (loll != null) {
atObject(loll, "Use-quickly Bank Booth");
wait(random(1500,3000));
if (interfaceExists(INTERFACE_BANK)) {
atInventoryItem(Snape, "all");
wait(random(1500,3000));
if (getInventoryCount() == 0) {
closeBank();
Runs++;
}
}
}
}

public int loop() {
if (getInventoryCount() == 28) {
Walkthere();
Dobanking();
} else {
RSItemTile kk = getGroundItemByID(Snape);
atTile(kk, "Take Snape grass");
antiBan();
}

if (getInventoryCount() == 0) {
Walkback();
}

return random(800, 1000);
}

public String getName() {
return "Snaper";
}

public String getScriptCategory() {
return "Collecting";
}

public String getAuthor() {
return "Lancelot854";
}

public double getVersion() {
return 1.0;
}

}
 
Quick Question About Rsbot
Wah, im confused.
 
Quick Question About Rsbot
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top