SRL Archive - Archive

ibotnexus - SRL Member Application


ibotnexus

2010-11-25 23:56:38

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
zbubblez


What is your general programming knowledge?
I can code java for powerbot


Are you a member of any other communities?
powerbot
rscheata


Tell us about yourself…
From: ibotnexus
I started cheating in runescape in late 2007 then learned to code some in 2008 and now im an active user on powerbot and rscheata



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

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.Rectangle;

import org.rsbot.script.ScriptManifest;
import org.rsbot.script.Script;
import org.rsbot.event.listeners.PaintListener;
import org.rsbot.script.util.Timer;
import org.rsbot.script.wrappers.RSTile;
import org.rsbot.script.wrappers.RSObject;

@ScriptManifest(authors = { "Swell" }, keywords = { "agil", "agility" }, name = "Gnome Agility", version = 0.3, description = "Does the 'Gnome Agility' course.")
public class GnomeAgil extends Script implements PaintListener, MouseListener, MouseMotionListener {


private enum State {LogBalance, ObstacleNet1, TreeBranch1, BalancingRope, TreeBranch2, ObstacleNet2, ObstaclePipe, WalkStart, Unknown};

private Timer runTime = new Timer(0);
private int distX, distY, paintX = 20, paintY = 20;
private boolean enableDrag;
private Rectangle paintOutline = new Rectangle(20, 20, 150, 50);
private int startExp;

private final RSTile startTile = new RSTile(2474, 3437);

private final int logBalanceId = 2295;
private final int logBalanceAnim = 9908;
private final RSTile logBalanceEnd = new RSTile(2474, 3429);

private final int obstacleNet1Id = 2285;
private final int obstacleNet1Anim = 828;
private final RSTile obstacleNet1End = new RSTile(2473, 3423);

private final int treeBranch1Id = 35970;
private final int treeBranch1Anim = 828;
private final RSTile treeBranch1End = new RSTile(2473, 3420);

private final int balancingRopeId = 2312;
private final int balancingRopeAnim = 9908;
private final RSTile balancingRopeEnd = new RSTile(2483, 3420);

private final int treeBranch2Id = 2314;
private final int treeBranch2Anim = 828;
private final RSTile treeBranch2End = new RSTile(2487, 3420);

private final int obstacleNet2Id = 2286;
private final int obstacleNet2Anim = 828;
private final RSTile obstacleNet2End = new RSTile(2483, 3428);//upto 2488

private final int[] obstaclePipeId = {43543, 43544};
private final int obstaclePipeAnim = 10580;
private final RSTile[] obstaclePipeEnd = {new RSTile(2487, 3437), new RSTile(2483, 3437)};

public boolean onStart() {
if(!game.isLoggedIn()){
log.severe("Please login before starting this script.");
return false;
}
if(!calc.tileOnScreen(startTile)){
log.severe("Please start script at the start of the Gnome Agility course.");
return false;
}
startExp = skills.getCurrentExp(skills.AGILITY);
log("GnomeAgil started.");
return true;
}

public int loop() {
switch(getState()) {
case LogBalance:
RSObject logBalance = objects.getNearest(logBalanceId);
if(logBalance != null){
logBalance.doAction("Walk-across");
for(int i=0; !getMyPlayer().getLocation().equals(logBalanceEnd); i++){
sleep(100, 200);
if(getMyPlayer().getAnimation() == logBalanceAnim)
i=0;
if(i>10)
return random(50, 100);
}
}
break;

case ObstacleNet1:
RSObject obstacleNet1 = objects.getNearest(obstacleNet1Id);
if(obstacleNet1 != null){
obstacleNet1.doAction("Climb-over");
for(int i=0; !getMyPlayer().getLocation().equals(obstacleNet1End); i++){
sleep(100, 200);
if(getMyPlayer().getAnimation() == obstacleNet1Anim || getMyPlayer().isMoving())
i=0;
if(i>10)
return random(50, 100);
}
}
break;

case TreeBranch1:
RSObject treeBranch1 = objects.getNearest(treeBranch1Id);
if(treeBranch1 != null){
treeBranch1.doAction("Climb");
for(int i=0; !getMyPlayer().getLocation().equals(treeBranch1End); i++){
sleep(100, 200);
if(getMyPlayer().getAnimation() == treeBranch1Anim || getMyPlayer().isMoving())
i=0;
if(i>10)
return random(50, 100);
}
}
break;

case BalancingRope:
RSObject balancingRope = objects.getNearest(balancingRopeId);
if(balancingRope != null){
balancingRope.doAction("Walk-on");
for(int i=0; !getMyPlayer().getLocation().equals(balancingRopeEnd); i++){
sleep(100, 200);
if(getMyPlayer().getAnimation() == balancingRopeAnim || getMyPlayer().isMoving())
i=0;
if(i>10)
return random(50, 100);
}
}
break;

case TreeBranch2:
RSObject treeBranch2 = objects.getNearest(treeBranch2Id);
if(treeBranch2 != null){
treeBranch2.doAction("Climb-down");
for(int i=0; !getMyPlayer().getLocation().equals(treeBranch2End); i++){
sleep(100, 200);
if(getMyPlayer().getAnimation() == treeBranch2Anim || getMyPlayer().isMoving())
i=0;
if(i>10)
return random(50, 100);
}
}
break;

case ObstacleNet2:
RSObject obstacleNet2 = objects.getNearest(obstacleNet2Id);
if(obstacleNet2 != null){
obstacleNet2.doAction("Climb-over");
for(int i=0; !hoppedObstacleNet2(); i++){
sleep(100, 200);
if(getMyPlayer().getAnimation() == obstacleNet2Anim || getMyPlayer().isMoving())
i=0;
if(i>10)
return random(50, 100);
}
}
break;

case ObstaclePipe:
RSObject obstaclePipe = objects.getNearest(obstaclePipeId);
if(obstaclePipe != null){
obstaclePipe.doAction("Squeeze-through");
for(int i=0; !throughPipes(); i++){
sleep(100, 200);
if(getMyPlayer().getAnimation() == obstaclePipeAnim || getMyPlayer().isMoving())
i=0;
if(i>10)
return random(50, 100);
}
}
break;

case WalkStart:
if(walking.getDestination() == null || calc.distanceTo(walking.getDestination()) < random(3, 5)){
if(calc.distanceTo(startTile) > 4){
walking.walkTo(startTile);
sleep(400, 600);
}
}

break;

case Unknown:
log.severe("Don't know which state we're at ending script.");
stopScript(true);
sleep(500, 1000);
break;

}
return random(100, 200);
}

private State getState() {
if(game.getPlane() == 0 && calc.tileOnScreen(startTile)){
return State.LogBalance;
}else if(game.getPlane() == 0 && calc.distanceTo(logBalanceEnd) <= 3){
return State.ObstacleNet1;
}else if(game.getPlane() == 1){
return State.TreeBranch1;
}else if(game.getPlane() == 2 && calc.distanceTo(treeBranch1End) <= 4){
return State.BalancingRope;
}else if(game.getPlane() == 2){
return State.TreeBranch2;
}else if(calc.distanceTo(treeBranch2End) <= 5){
return State.ObstacleNet2;
}else if(calc.distanceTo(new RSTile(2485, 3428)) <= 3){
return State.ObstaclePipe;
}else{
return State.WalkStart;
}
}

private boolean hoppedObstacleNet2(){
RSTile t = getMyPlayer().getLocation();
return t.getY() == 3428 && t.getX() >= 2483 && t.getX() <= 2488;
}

private boolean throughPipes(){
RSTile t = getMyPlayer().getLocation();
return t.getY() == 3437 && t.getX() >= 2483 && t.getX() <= 2487;
}

public void onRepaint(Graphics g) {
g.setColor(new Color(255, 255, 255, 150));
g.fillRect(paintX, paintY, 150, 50);
g.setColor(Color.BLACK);
g.drawString("GnomeAgil", paintX+5, paintY+15);
g.drawString("RunTime: "+runTime.toElapsedString(), paintX+5, paintY+30);
g.drawString("Exp gained: "+ (skills.getCurrentExp(skills.AGILITY) - startExp), paintX+5, paintY+45);
}

public void onFinish() {
log("Thanks for using GnomeAgil.");
}

public void mousePressed(MouseEvent e) {
if(paintOutline.contains(e.getPoint())){
enableDrag = true;
distX = e.getX() - (int) paintOutline.getX();
distY = e.getY() - (int) paintOutline.getY();
}
}

public void mouseMoved(MouseEvent e) {

}

public void mouseClicked(MouseEvent e) {

}

public void mouseReleased(MouseEvent e) {
if(paintOutline.contains(e.getPoint())){
enableDrag = false;
}
}

public void mouseEntered(MouseEvent e) {

}

public void mouseExited(MouseEvent e) {

}

public void mouseDragged(MouseEvent e) {
if(enableDrag){
paintX = e.getX() - distX;
paintY = e.getY() - distY;
paintOutline = new Rectangle(paintX, paintY, 150, 50);
}
}
}

noidea

2010-11-26 00:08:04

You'll need a pascal script to apply for members.

Cstrike

2010-11-26 00:23:17

From: noidea
You'll need a pascal script to apply for members.


In addition to what noidea said, you would also need to post in the community and become active.

I'm sure with your knowledge of java you will fit into our community well. If you're familiar with BCEL and/or Reflection, you'll find the reflection forums accommodating, but make sure you check out color. IIRC, ibot uses color? So it may be a second home for you.


Also, it says
authors = { "Swell" }
Is that your name? If so, why did you not pick that name?

Sir R. M8gic1an

2010-11-28 07:34:15

I'd like the author issue cleared up…

~RM

TomTuff

2010-11-28 07:44:25

if you're gonna plagiarize, don't make the telltale line visible on the first screen of code ;)

If you didn't plagiarize, though, i'm sorry.

traveler

2010-11-28 21:05:10

this guy has not logged in since he posted his application.

Shady?

2010-11-28 23:42:01

http://www.powerbot.org/vb/member.php?u=3506 That's swell's profile on powerbot, idk if that helps.

Markus

2010-12-01 12:31:00

Closed.