hey i was wundering if any one could kinda help me script i know how to do alot of stuff just need sum guidness ive been talking with ddm he said ppl here could mabey help me so what do ya say
?
?
import java.util.*;
import com.speljohan.rsbot.script.*;
import com.speljohan.rsbot.script.wrappers.*;
public class zylskisdraynorminer extends Script{
public int[] AXES = {1265,1267,1269,1271,1273,1275};
public int coal = 453;
public int[] rocks = {11932,11930,11931};
public int mininganima = 824;
public int[] banker = {495, 494};
RSTile[] walk2bank = new RSTile[] {new RSTile(3148,3150), new RSTile(3148,3166),
new RSTile(3142,3183), new RSTile(3183,3199), new RSTile(3127,3209),
new RSTile(3112,3219), new RSTile(3098,3230), new RSTile(3093,3243)};
RSTile[] walk2mines = new RSTile[] {new RSTile(3093,3243), new RSTile(3098,3230),
new RSTile(3112,3219), new RSTile(3127,3209), new RSTile(3138,3199),
new RSTile(3142,3183), new RSTile(3148,3166), new RSTile(3148,3150)};
public RSTile banktile = new RSTile(3176,3385);
public RSTile minetile = new RSTile(3148,3150);
public String getName(){
return "Draynor Miner";
}
public String getAuthor(){
return "Zylski";
}
public String getScriptCategory(){
return "Mining";
}
public double getVersion(){
return 1.5;
}
public boolean onStart(Map<String, String> args) {
return true;
}
public void onFinish(){
return;
}
public boolean needtobank(){
return isInventoryFull();
}
public boolean atbank(){
RSNPC bank = getNearestNPCByID(banker);
if(bank == null) return false;
return distanceTo(banktile) < 10;
}
public boolean dpWalkPath(RSTile[] path) {
for (int i = path.length - 1; i >= 0; i--) {
if (dpWalkTile(path[i])) {
return true;
}
}
return false;
}
public boolean dpWalkTile(RSTile tile) {
if (distanceTo(tile) <= 16) {
walkTileMM(tile);
return true;
} else {
return false;
}
}
private void walkPath(RSTile[] path, boolean reverse) {
try {
if (!reverse) {
if (!getMyPlayer().isMoving()
|| distanceTo(getDestination()) <= random(4, 7)) {
path = randomizePath(path, 2, 2);
dpWalkPath(path);
return;
} else
antiBan();
} else {
if (!getMyPlayer().isMoving()
|| distanceTo(getDestination()) <= random(4, 7)) {
path = randomizePath(reversePath(path), 2, 2);
dpWalkPath(path);
return;
} else
antiBan();
}
} catch (Exception e) {
}
}
private int antiBan() {
int random = random(1, 24);
switch (random) {
case 1:
int x = random(0, 750);
int y = random(0, 500);
if (random(1, 6) == 3)
moveMouse(0, 0, x, y);
return random(1000, 1500);
case 2:
if (getCurrentTab() != TAB_INVENTORY) {
openTab(TAB_INVENTORY);
return random(500, 750);
} else {
return random(500, 750);
}
case 3:
if (random(1, 40) == 30) {
if (getMyPlayer().isMoving()) {
return random(750, 1000);
}
if (getCurrentTab() != TAB_STATS) {
openTab(TAB_STATS);
}
moveMouse(665, 230, 40, 20);
wait(random(3000, 6000));
return random(100, 200);
}
case 4:
if (random(1, 13) == 5) {
int angle = getCameraAngle() + random(-90, 90);
if (angle < 0) {
angle = 0;
}
if (angle > 359) {
angle = 0;
}
setCameraRotation(angle);
return random(500, 750);
}
}
return 500;
}
public boolean bank(){
RSNPC bankz = getNearestNPCByID(banker);
{
if(bankz == null)
return false;
if(bank.isOpen()){
bank.depositAllExcept(AXES);
bank.close();
}else{
atNPC(bankz, "Bank");
}
}
return true;
}
public boolean atmines(){
RSObject iron = getNearestObjectByID(rocks);
if(iron == null) return false;
return distanceTo(minetile) < 7;
}
public boolean mine(){
RSObject coal = findObject(rocks);
if (coal == null) return false;
return atObject(coal, "mine");
}
public int loop(){
if(getMyPlayer().getAnimation() == mininganima)
return random(400, 800);
if (getMyPlayer().isMoving())
return random(800, 1600);
if (!isRunning() && getEnergy() > random(25, 100)) {
setRun(true);
}
if (needtobank()){
if (atbank()){
if (bank()){
return random (500, 800);
}
}else{
walkPath(walk2bank, false);//false means that we are not reversing it
return random (500,800);
}
}else{
if (atmines()){
if (mine()){
return random (300,600);
}
}else{
walkPath(walk2mines, false);
return random (500,800);
}
}
return 800;
}
}
BOOM BOOM wrote:What problems are you getting?
turst me learning javascripting is really hard i am half way to learning it fully and it took me a month cuz its kinda boringluldespencer wrote:BOOM BOOM wrote:What problems are you getting?
I would be glad to help, but sadly, I do not know Programming. If I am required for this website, i'll try to learn.
~ Lul.