nissan nut
Forum Addict
- Joined
- Jun 9, 2008
- Sythe Gold
- 29
- Messages
- 458
Heres the script im working on
I cant compile :S
Code:
//Make sure that you have enough runes for the 'alchNumber' you set.
//Make sure that you have only miscellaneous spells selected
//and the item you want to alch (preferably noted) should be in the 3rd inventory slot.
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.LinkedList;
import java.util.List;
import org.runedream.api.Script;
import org.runedream.api.ScriptManifest;
import org.runedream.api.methods.Calculations;
import org.runedream.api.methods.Game;
import org.runedream.api.methods.ImageUtil;
import org.runedream.api.methods.Mouse;
import org.runedream.api.util.Log;
import org.runedream.api.util.Random;
@ScriptManifest(
authors = { "Nissan Nut" },
name = "Alcher",
version = 1.0,
description = "Simple Alcher Script",
keywords = { "magic", "jbot", "alcher", "Nissan Nut"},
language = { true, true, true, true })
public class Alcher extends Script implements MouseListener {
private int alchNumber = 100; //number of alchs
private int moveMouse = 1;
private int alchX = Random.random(647, 653);
private int alchY = Random.random(220, 236);
private int bookX = Random.random(734, 759);
private int bookY = Random.random(172, 201);
private int invenX = Random.random(644, 670);
private int invenY = Random.random(172, 201);
private Point alch = new Point(alchX, alchY);
private Point book = new Point(bookX, bookY);
private Point inven = new Point(invenX, invenY);
private static final Color bookColor = new Color(139, 108, 44);
private static final Rectangle VIEWPORT = new Rectangle(520, 168, 765, 465);
@Override
public int loop() {
Mouse.setSpeed(Random.random(4, 7));
Script.sleep(1000, 2500);
Mouse.click(inven);
while (alchNumber > 0) {
if (VIEWPORT.contains(107, 76, 4)) && (VIEWPORT.contains(69, 249, 28)){ //if it can see the alch button
Mouse.click(alch);
Script.sleep(500, 2000);
Mouse.click(alch);
alchNumber--;
return Random.random(100, 500);
} else if (VIEWPORT.contains(bookColor)) && (VIEWPORT.contains(17, 121, 20)){ //if it can see magic book and nats in inventory
Mouse.click(book);
return Random.random(1000, 3000);
}
Script.sleep(700, 1200);
if (moveMouse==0){
moveMouse = Random.random(4, 32); //moves mouse every 4-32 alchs
alch = new Point(alchX, alchY);
}else{
moveMouse--;
}
}
}
}
I cant compile :S

















