SRL Archive - Archive

S1N - SRL Member Application


Sin

2011-12-11 22:00:46

How Long have You Played Runescape?
7 Year(s)


Are you affilated in anyway with Jagex LTD?
NO

Were you Referred to SRL?



What is your general programming knowledge?
I'm fairly decent with JAVA and HTML.


Are you a member of any other communities?
Yes, RSBOTS.Net, RiD, RSBuddy


Tell us about yourself…
From: S1N
I enjoy scripting, botting and playing games in general. I also like playing sports and reading.



Please show us one (or multiple) of your scripts.
import java.awt.Graphics;
import java.awt.Image;

import com.rsbuddy.event.t;
import com.rsbuddy.event.events.MessageEvent;
import com.rsbuddy.event.listeners.MessageListener;
import com.rsbuddy.event.listeners.PaintListener;
import com.rsbuddy.script.ActiveScript;
import com.rsbuddy.script.Manifest;
import com.rsbuddy.script.methods.Environment;
import java.awt.*;
import javax.imageio.ImageIO;
import java.io.IOException;
import java.net.URL;

import org.rsbuddy.net.GeItem;
import org.rsbuddy.tabs.Inventory;
import org.rsbuddy.widgets.Bank;

import com.rsbuddy.script.methods.Camera;
import com.rsbuddy.script.methods.Mouse;
import com.rsbuddy.script.methods.Objects;
import com.rsbuddy.script.methods.Skills;
import com.rsbuddy.script.methods.Widgets;
import com.rsbuddy.script.util.Timer;
import com.rsbuddy.script.wrappers.GameObject;
import com.rsbuddy.script.wrappers.Item;
import com.rsbuddy.script.wrappers.Tile;
import com.rsbuddy.script.wrappers.TilePath;

@Manifest(name = "BlueGoldBracelets", description = "Crafts Gold Bracelets for 100k+/h", authors = "ixS1N/Aftermath")
public class BlueGoldBracelets extends ActiveScript implements MessageListener,
PaintListener {
// Items
private static final int Bar = 2357;
private static final int Mold = 11065;
private static final int Bracelet = 11069;
private static final int Furnace = 26814;
// Tiles
private Tile[] toSmithingArea = new Tile[] { new Tile(3109, 3500) };
private Tile[] toBankArea = new Tile[] { new Tile(3097, 3496) };
TilePath sArea = new TilePath(toSmithingArea);
TilePath bArea = new TilePath(toBankArea);
// Widgets
private static final int PARENT = 446;
private static final int CHILD = 33;
// prices
private static int barPrice;
private static int braceletPrice;
private static int braceletsMade = 0;
private static long startTime;
// xp
private int startXP = 0;
private int earnedXP = 0;
private int startLevel = 0;
private int braceCount = 0;
private int profit = 0;
private long runTime = 0;
private Timer t;
private int XPTNL = 0;
private int crafting = 0;
// paint
private final Color color1 = new Color(255, 255, 255);
private final Font font1 = new Font("Verdana", 0, 12);
private final Image img1 = getImage("http://i.imgur.com/2qKvb.png");
private final Image img2 = getImage("http://images2.wikia.nocookie.net/__cb20091112011147/runescape/images/1/15/Crafting-cape-%28t%29-inv.png");
private final Image img3 = getImage("http://images3.wikia.nocookie.net/__cb20110913034017/runescape/images/4/48/Crafting-icon.png");
private final Image img4 = getImage("http://images1.wikia.nocookie.net/__cb20100703124914/runescape/images/3/34/Gold_bracelet.png");

public boolean onStart() {

Environment.setUserInput(Environment.INPUT_KEYBOARD);
Mouse.setSpeed(2);
log("Welcome to BlueGoldBracelets!");
log("This bot gets 30k/h Crafting exp + 110k/H GP at Edgeville");
log("Post on the feedback thread if you want support for more furnaces/banks.");
barPrice = GeItem.lookup(Bar).getGuidePrice();
braceletPrice = GeItem.lookup(Bracelet).getGuidePrice();
startTime = System.currentTimeMillis();
startXP = Skills.getCurrentExp(Skills.CRAFTING);
startLevel = Skills.getCurrentLevel(Skills.CRAFTING);
t = new Timer(500);

return true;
}

private Image getImage(String url) {
try {
return ImageIO.read(new URL(url));
} catch (IOException e) {
e.printStackTrace();
}
return null;
}

@Override
public int loop() {
if (Inventory.containsAll(Mold, Bar))
sArea.traverse();
//******************************************
//GameObject and the Item ~ Gold bar/Furnace
//******************************************
Item gBar = Inventory.getItem(Bar);
GameObject furnace = Objects.getNearest(Furnace);

if (gBar != null && furnace != null) {

if (furnace.isOnScreen())
Inventory.useItem(gBar, furnace);
Timer timer = new Timer(3500);
Timer timer2 = new Timer(55000);
while (timer.isRunning() && Inventory.contains(Bar))
sleep(100);
if (Widgets.getComponent(PARENT, CHILD).isValid())
if (Widgets.getComponent(PARENT, CHILD).interact("Make all")) ;
while (timer2.isRunning() && Inventory.contains(Bar)) ;
sleep(500);
} else {
if (Inventory.containsAll(Mold, Bracelet))
bArea.traverse();
Bank.open();
if (Bank.isOpen() && Inventory.containsAll(Mold, Bracelet))
if (Bank.depositAllExcept(Mold))
Bank.withdraw(Bar, 27);
else {
if (Bank.getItem(Bar) == null)
return -1;
}

}
return 0;
}

@Override
public void messageReceived(MessageEvent e) {
if (e.getId() == 0)
braceletsMade++;
}

@Override
public void onRepaint(Graphics g) {
earnedXP = (Skills.getCurrentExp(Skills.CRAFTING) - startXP);
braceCount = earnedXP / 25;
profit = ((braceletPrice - barPrice) * braceCount);
runTime = (System.currentTimeMillis() - startTime);
XPTNL = Skills.getExpToNextLevel(Skills.CRAFTING);
crafting = Skills.getCurrentExp(Skills.CRAFTING);

g.drawImage(img1, 519, 203, null);
g.setFont(font1);
g.setColor(color1);
g.drawString("By: Aftermath", 50, 50);
g.drawImage(img2, 635, 430, null);
g.drawImage(img3, 556, 214, null);
g.drawImage(img3, 699, 214, null);
g.drawImage(img4, 727, 137, null);
g.drawString("" + ((braceletPrice - barPrice) * braceCount) , 637, 290);
g.drawString("" + braceCount, 645, 329);
g.drawString(Timer.format(System.currentTimeMillis() - startTime), 631, 268);
g.drawString("" + earnedXP, 615, 366);
g.drawString("" + (earnedXP / (t.getElapsed() / 3600)) + "K", 569, 383);
g.drawString("" + (profit / (t.getElapsed() / 3600)) + "K", 587, 311);
g.drawString("1.3K", 603, 347);
g.drawString("" + XPTNL, 664, 403);
g.drawString("" + (13034431 - crafting), 588, 421);
g.drawString("Time till level:" + ((XPTNL / t.getElapsed()) / 3600), 80, 50);
}

public void onFinish() {
Environment.saveScreenshot(true);
}

}





















This script is for RSBuddy.

Hobbit

2011-12-11 22:03:37

We are not RSBuddy. Needs to be a Simba (or scar is acceptable) script that utilizes SRL.

Check out the tutorial section and try again in a little bit when you've made an SRL script :)


Cheers
Hobbit