MagicMushroomKillaMMK
2009-09-07 08:18:24
How Long have You Played Runescape?
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I know java a little bit
Are you a member of any other communities?
RSBOT.ORG
MOPARSCAPE.org
Tell us about yourself…
Please show us one (or multiple) of your scripts.
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I know java a little bit
Are you a member of any other communities?
RSBOT.ORG
MOPARSCAPE.org
Tell us about yourself…
From: justin102030
Uh, I smoke weed an play RuneScape or just watch my bot play for me. I quit rsbot a few months ago and I am going to get more into making SCAR scripts in a few weeks.
Please show us one (or multiple) of your scripts.
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.Map;
import javax.imageio.ImageIO;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Properties;
import com.speljohan.rsbot.plugin.NonPluginClass;
import com.speljohan.rsbot.script.wrappers.RSInterface;
import com.speljohan.rsbot.bot.Bot;
import com.speljohan.rsbot.event.events.ServerMessageEvent;
import com.speljohan.rsbot.event.listeners.PaintListener;
import com.speljohan.rsbot.event.listeners.ServerMessageListener;
import com.speljohan.rsbot.script.Calculations;
import com.speljohan.rsbot.script.Constants;
import com.speljohan.rsbot.script.Script;
import com.speljohan.rsbot.script.wrappers.RSNPC;
import com.speljohan.rsbot.script.wrappers.RSObject;
import com.speljohan.rsbot.script.wrappers.RSTile;
import com.speljohan.rsbot.script.wrappers.RSTilePath;
public class IronPro extends Script implements PaintListener {
int[] StuffWeShouldKeep = new int[] { 1265,
1267,
1269,
1273,
1271,
1275,
13661,
14107,
440,
995};
int startxp = skills.getCurrentSkillExp(Constants.STAT_MINING);
private long startTime = 0;
public boolean responder = true;
public int GambleInt, GambleInt1;
public static final int[] GemID = new int[] { 1617, 1619, 1621, 1623 };
int[] Gems = new int[] { 1623, 1621, 1619, 1617 };
public static final int[] ROCKZ = new int[] { 9719, 9718, 9717 };
final RSObject rock = findObject(ROCKZ);
int Iron = 440;
int Reply = 0;
public String oldChat = "";
public String[] oldQ = { "" };
public String[] chat = new String[100];
public String[] chat2 = new String[100];
long starttime = System.currentTimeMillis();
long milli = System.currentTimeMillis() - starttime;
long hour = milli / (1000 * 60 * 60);
long min = milli / (1000 * 60);
long sec = milli / 1000;
DecimalFormat format = new DecimalFormat("00");
String ssec = format.format(sec);
String smin = format.format(min);
String TotalHours = format.format(hour);
String runtime = TotalHours + ":" + smin + ":" + ssec;
public boolean DropGems = false;
public boolean KeepGems = true;
RSTile[] myTiles = new RSTile[] {
new RSTile(3144, 3146),
new RSTile(3147, 3147),
new RSTile(3144, 3146),
new RSTile(3144, 3146),
new RSTile(3145, 3147),
new RSTile(3145, 3154),
new RSTile(3148, 3145),
new RSTile(3147, 3145),
new RSTile(3148, 3146),
new RSTile(3145, 3144),
new RSTile(3145, 3148)};// for our path.
RSTilePath myPath = new RSTilePath(myTiles, this); // We declare a new
// RSTilePath and tell
// it to use the tiles
// stores in 'myTiles'
public String getName() {
return "IronBotBeta";
}
public String getAuthor() {
return "Rs1910";
}
public double getVersion() {
return 1.0;
}
public String getScriptDescription() {
String html = "";
html += "<html>";
html += "<head>";
html += "<style type=\"text/css\"> hr {color: white} p {margin-left: 20px}</style>";
html += "<center><table border=\"0\"><tr><td colspan=\"5\"><center><font size=6><b>== IronPro Options! ==</b></font></center></td></tr><tr><td colspan=4><hr></td></tr><tbody><tr><td width=\"135\">";
html += "</input><br><center>DropGems?: <input type=checkbox name=DropGems value=true></input><br><center>";
html += "This script is still in it's beta stages and a ton of new features will be added in the future!";
html += "<tr><td colspan=2><b><font size=\"3\">IronPro By Rs1910!</font></b></td><align=right></center></body></html>";
return html;
}
public boolean onStart(final Map<String, String> args) {
log("IronPro 1.2 Beta release . . !");
DropGems = args.get("DropGems") != null ? true : false;
return true;
}
@Override
public void onFinish() {
log("Script stopped.");
log("Ran For " + runtime + " ! ");
log("Gained XP: " + (skills.getCurrentSkillExp(Constants.STAT_MINING) - startxp));
Bot.getEventManager().removeListener(PaintListener.class, this);
return;
}
public int loop() {
if (DropGems == true) {
dropAllExcept(StuffWeShouldKeep);
}
if (KeepGems == true) {
KeepGems = true; //Didn't know what else to do, this prevents errors anyways
}
if (Reply >= 3) {
log("Replied 3 times..Hopping worlds!"); //Adding world hopping when I figure out how to get this working..
return -1;
}
if (isInventoryFull()) {
wait(random(10, 290));
invcoords();
wait(random(10, 290));
atMenu("Drop");
return 1;
}
if (getMyPlayer().getAnimation() == 628) {
wait(random(1500, 3500)); //update 2.0 added this.
return ChooseWhat2Do();
// } catch (Exception e) {
//return false;
}
final RSObject rock = findObject(ROCKZ);
if (getMyPlayer().getAnimation() == -1) {
atObject(rock, "Mine");
wait(random(1500, 2500));
return 1;
}
return loop();
}
public void talk() {
if (isLoggedIn()) {
final String[] replyArray = { "Ok? Im not a bot", "Im not autoing", "Me? No.." };
final String reply = replyArray[random(0, replyArray.length)];
replyToPlayer(reply);
return;
}
if (replyToPlayer(chat[0])) {
log("Replied.");
Reply++;
}
}
public boolean replyToPlayer(String text) {
GambleInt1 = random(1, 1);
text = text.toLowerCase();
if (!text.contains("Reported") || text.contains("Bot") || text.contains("Bot")
|| text.contains("Autoer") || text.contains("macroer") || text.contains("reporting")) {
final String[] messages = { "Bot", "bot", "autoer", "Autoer" };
wait(random(200, 500));
if (GambleInt1 == 1) {
final String[] replyArray = { "Ok? Im not a bot", "Im not autoing", "Me? No.." };
final String reply = replyArray[random(0, replyArray.length)];
sendText(reply, true);
log("Replied");
}
}
return true; }
public String[] getChatMessages(final boolean stripName) {
final String[] temp = new String[100];
final RSInterface welcomeInterface = RSInterface.getInterface(137);
for (int i = 155; i >= 56; i--) {
if (welcomeInterface.getChild(137).getText().contains("<col=0000ff>")) {
}
}
return temp;
}
int ChooseWhat2Do() {
final int GambleInt = random(1, 5);
switch (GambleInt) {
case 1:
log("Case 1 called!");
wait(random(100, 200));
//sendText("", true);
wait(random(10, 200));
break;
case 2:
log("Case 2 called!");
if (isLoggedIn()) {
final int x = random(0, 750);
final int y = random(0, 500);
moveMouse(0, 0, x, y);
}
return random(1000, 1500);
case 3:
log("Case 3 called!");
if (getCurrentTab() != Constants.TAB_INVENTORY) {
//Switch to Stats tab
openTab(Constants.TAB_STATS);
wait(random(1000, 3000));
} else {
return random(500, 750);
}
case 4: //If the tab is in stats it switches, otherwise it does nothing.
if (getCurrentTab() != Constants.TAB_STATS) {
log("Case 4 called!");
wait(random(200, 600));
final int x = random(0, 750);
final int y = random(0, 500);
moveMouse(0, 0, x, y);
//Switch to Stats tab
openTab(Constants.TAB_INVENTORY);
return random(500, 750);
} else {
log("Returned 500, 750");
return random(500, 750);
}
case 5:
log("Case 5 called!");
if (isLoggedIn()) {
turnCamera();
}
return random(500, 750);
}
return random(500, 1000);
}
int WaitTime() {
final int GambleInt = random(1, 10);
switch (GambleInt) {
case 1:
//log("WaitTime: 250 1250");
wait(random(250, 1250));
break;
case 2:
//log("WaitTime: 1000 2000");
wait(random(1000, 2000));
break;
case 3:
//log("WaitTime: 875 1125");
wait(random(875, 1125));
break;
case 4:
//log("WaitTime: 100 3000");
wait(random(100, 3000));
break;
case 5:
//log("WaitTime: 2000 3550");
wait(random(2000, 3550));
break;
case 6:
//log("WaitTime: 1000 1000");
wait(random(1000, 1000));
break;
case 7:
//log("WaitTime: 800 5000");
wait(random(800, 5000));
break;
case 8:
// log("WaitTime: 50 1200");
wait(random(50, 1200));
break;
case 9:
//log("WaitTime: 900 1100");
wait(random(900, 1100));
break;
case 10:
//log("WaitTime: 666 666");
wait(random(666, 666));
break;
}
return random(0, 1000);
}
public void turnCamera() {
if (isLoggedIn()) {
final char[] LR = new char[] { KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT };
final char[] UD = new char[] { KeyEvent.VK_DOWN, KeyEvent.VK_UP };
final char[] LRUD = new char[] { KeyEvent.VK_LEFT,
KeyEvent.VK_RIGHT, KeyEvent.VK_UP, KeyEvent.VK_UP };
final int random2 = random(0, 2);
final int random1 = random(0, 2);
final int random4 = random(0, 4);
if (random(0, 3) == 0) {
Bot.getInputManager().pressKey(LR[random1]);
try {
Thread.sleep(random(900, 1500));
} catch (final Exception e) {
}
Bot.getInputManager().pressKey(UD[random2]);
try {
Thread.sleep(random(900, 1500));
} catch (final Exception e) {
}
Bot.getInputManager().releaseKey(UD[random2]);
try {
Thread.sleep(random(1000, 1400));
} catch (final Exception e) {
}
Bot.getInputManager().releaseKey(LR[random1]);
} else {
Bot.getInputManager().pressKey(LRUD[random4]);
if (random4 > 1) {
try {
Thread.sleep(random(1000, 1400));
} catch (final Exception e) {
}
} else {
try {
Thread.sleep(random(1200, 1500));
} catch (final Exception e) {
}
}
Bot.getInputManager().releaseKey(LRUD[random4]);
}
}
}
public void onRepaint(Graphics g) {
if (startxp <= 0) {
startxp = skills.getCurrentSkillExp(Constants.STAT_MINING);
}
if (isLoggedIn()) {
milli = System.currentTimeMillis() - starttime;
hour = milli / (1000 * 60 * 60);
milli -= hour * 1000 * 60 * 60;
min = milli / (1000 * 60);
milli -= min * 1000 * 60;
sec = milli / 1000;
runtime = TotalHours + ":" + smin + ":" + ssec;
ssec = format.format(sec);
smin = format.format(min);
TotalHours = format.format(hour);
g.setColor(Color.blue);
g.drawString("Runtime: " + runtime, 5, 200);
g.drawString("Gained XP: "
+ (skills
.getCurrentSkillExp(Constants.STAT_MINING) - startxp),
30, 235);
}
}
public void serverMessageRecieved(final ServerMessageEvent e) {
final String message = e.getMessage();
if (message.contains("this")) {
log("hasnouserightnow");
}
}
private int invcoords() {
final int GambleInt = random(1, 18);
switch (GambleInt) {
case 1:
// log("615 221");
moveMouse(615, 221);
break;
case 2:
// log("618 225");
moveMouse(618, 225);
break;
case 3:
// log("623 229");
moveMouse(623, 229);
break;
case 4:
// log("619 223");
moveMouse(619, 223);
break;
case 5:
// log("613 232");
moveMouse(613, 232);
break;
case 6:
// log("622 233");
moveMouse(622, 233);
break;
case 7:
// log("616 235");
moveMouse(616, 235);
break;
case 8:
// log("621 234");
moveMouse(621, 234);
break;
case 9:
// log("624 228");
moveMouse(624, 228);
break;
case 10:
// log("613 232");
moveMouse(613, 232);
break;
case 11:
// log("622 233");
moveMouse(622, 233);
break;
case 12:
// log("616 235");
moveMouse(616, 235);
break;
case 13:
// log("621 234");
moveMouse(621, 234);
break;
case 14:
// log("625 230");
moveMouse(625, 230);
break;
case 15:
// log("624 228");
moveMouse(624, 228);
break;
case 16:
// log("618 226");
moveMouse(618, 226);
break;
case 17:
// log("620 229");
moveMouse(620, 229);
break;
case 18:
// log("622 231");
moveMouse(622, 231);
break;
}
openTab(Constants.TAB_INVENTORY);
//log("This will be fixed.");
return 1;
}
}This script made me proud of finishing. I got 76 mining & no ban.