Live Help
Membership
You are a guest!

Register Today!

Log In
Reset Password
Game Network
Community Forum

MMO GAME LIST
World of Warcraft
Age of Conan
Anarchy Online
Archlord
Cabal Online
City of Heroes
City of Villains
Dark Age of Camelot
Darkfall Online
Diablo 2
Dungeons and Dragons
Dofus
Eve Online
Everquest 2
Final Fantasy XI
Guild Wars
Hero Online
Knight Online
Lineage 2
Lord of the Rings Online
Maple Story
Ragnarok Online
Runescape 2
Second Life
SilkRoad Online
Star Wars Galaxies
Tibia
Warhammer Online

FPS GAME LIST
Call of Duty
Combat Arms
Counter Strike
Halo

Welcome Guest ( Log In | Register )

> Please Read!

This forum is for Runescape bots, macros, scripts and programs submissions.

Please note that the bots and programs in this forum might not work because they have not been tested yet. To
download tested and working bots, scripts, macros and programs please visit the working sections. Working Runescape bots, hacks, macros & Programs OR Working Runescape scripts & autos


> coalminer script rsbot
post May 3 2009, 02:31 PM
Post #1

henke96



Newbie
*

Group: Members
Posts: 3
Joined: 10-April 09
Member No.: 881,052






This is my first script=)

It mines coal in barbarian village and banks in varrock vest bank.

save as coalminer.java in scripts folder

code:

import java.util.*;
import com.speljohan.rsbot.script.*;
import com.speljohan.rsbot.script.wrappers.*;

public class coalminer extends Script{

public int[] coalRocks = { 11932, 11930, 11931};
public int miningAnimation = 624;
public int[] pickaxes = { 1265, 1267, 1269,
1273, 1271, 1275 };
public int BankBoothID = 11402;


RSTile[] banktorocks = new RSTile[] {new RSTile(3185, 3436), new RSTile(3182, 3429), new RSTile(3173, 3428), new RSTile(3165, 3424), new RSTile(3156, 3418), new RSTile(3145, 3416), new RSTile(3136, 3416), new RSTile(3125, 3414), new RSTile(3118, 3419), new RSTile(3109, 3420), new RSTile(3100, 3420), new RSTile(3093, 3420), new RSTile(3085, 3420)};

RSTile[] rockstobank = new RSTile[] {new RSTile(3085, 3421), new RSTile(3090, 3420), new RSTile(3096, 3420), new RSTile(3101, 3420), new RSTile(3109, 3420), new RSTile(3115, 3420), new RSTile(3122, 3418), new RSTile(3128, 3415), new RSTile(3132, 3416), new RSTile(3137, 3417), new RSTile(3141, 3416), new RSTile(3147, 3416), new RSTile(3153, 3417), new RSTile(3160, 3420), new RSTile(3163, 3422), new RSTile(3166, 3427), new RSTile(3171, 3428), new RSTile(3179, 3428), new RSTile(3185, 3434), new RSTile(3184, 3436)};


public String getName(){
return "Barbarian coalminer";
}

public String getAuthor(){
return "Henke";
}

public String getScriptCategory(){
return "Mining";
}

public double getVersion(){
return 1.0;
}

public String getScriptDescription() {
String html = "Start at the coals in barbarian village and" +
" have a pickaxe in your inventory" +
" verison 1.0" +
" Author Henke"
;
return(html);
}

public boolean onStart(Map<String, String> args) {

return true;
}



public void onFinish(){

return;
}

public boolean needToBank(){
return isInventoryFull();
}

public boolean atrocks() {
RSObject rocks = getNearestObjectByID(coalRocks);
if(rocks == null) return false;

return tileOnScreen(rocks.getLocation());
}


public boolean atBank() {
RSObject bank = getNearestObjectByID(BankBoothID);
if(bank == null) return false;

return tileOnScreen(bank.getLocation());
}

public boolean handleBank(){
RSObject bankBooth = getNearestObjectByID(BankBoothID);

if(bank == null)
return false;

if(bank.isOpen()){
bank.depositAllExcept(pickaxes);
bank.close();
}else{
atObject(bankBooth, "uickly");
}

return true;
}


public boolean walkToBank(){
RSTile[] randomizedPath = randomizePath(rockstobank, 2, 2);
RSTilePath path = new RSTilePath(randomizedPath, this);
try {
return path.walkToEnd();
} catch (InterruptedException e) {

e.printStackTrace();
}
return false;
}

public boolean walkTorocks(){
RSTile[] randomizedPath = randomizePath(banktorocks, 2, 2);
RSTilePath path = new RSTilePath(randomizedPath, this);
try {
return path.walkToEnd();
} catch (InterruptedException e) {

e.printStackTrace();
}
return false;
}

public boolean minerocks(){
RSObject rock = getNearestObjectByID(coalRocks);
if(rock == null)
return false;

return atObject(rock, "mine");
}




public int loop() {
if(getMyPlayer().isMoving()) return random(800, 1600);


if(needToBank()){

if(atBank()){
if(handleBank())
return random(800, 1000);
}else{
if(walkToBank())
return random(800, 1000);
}

}else{

if(atrocks()){
if(minerocks ())
return random(800, 1000);
}else{
if(walkTorocks())
return random(800, 1000);
}






if (getEnergy() > random(50, 100))
setRun(true);
return random(1000, 1600);
}






if(getMyPlayer().getAnimation() == miningAnimation){
return random(600, 1000);
}






return 300;
}
}
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 13)
post May 3 2009, 02:31 PM
Post #

Elite Membership


To get the most out of MmorpGuides.com, please view the following information.












Already a Member?

With an Elite Membership you can. . .

  • Reach the highest levels in no time
  • Have one of the most powerful characters in your game
  • Become a valuable member of your clan or guild
  • Become part of a caring and helpful community of gamers

Elite Members enjoy. . .

  • 1,660+ Cheats - tons of working, high quality cheats
  • 1,550+ Guides - We have one of the most comprehensive collections of guides on the net
  • 539+ Bots and macros - Level up quickly, even while you sleep!
  • A chance to win free prizes such as an amazing Playstation 3! And free gold and powerleveling!

No risk, only huge benefits!

  • Your investment can pay for itself in days!
  • Earn gold that you can trade for real money
  • Sell your high level items and characters for a profit!
  • Get tons of expensive guides and cheats in one spot for one small price

Money Back Guarantee!

Not 100% satisfied? We have a 24 hour, money-back guarantee! Contact us for a prompt and courteous refund!

Upgrade to an Elite Membership now!

Not A Member?

Join today and get access to all these great features!

  • Access to newly submitted cheats and guides
  • Download newly submitted bots and macros
  • Chat about your favorite game
  • Submit working content for a FREE Elite Membership!
  • And lots more!
Register Today!
Go to the top of the page
 
Quote Post
post May 3 2009, 06:30 PM
Post #2

pwnyougood



In Training
**

Group: Members
Posts: 18
Joined: 25-April 09
Member No.: 893,073






i tried it out, works clean, good job, few minor problems but besides that ok.
Go to the top of the page
 
+Quote Post
post May 4 2009, 06:27 PM
Post #3

henke96



Newbie
*

Group: Members
Posts: 3
Joined: 10-April 09
Member No.: 881,052






i will try to fix errors=P

This post has been edited by henke96: May 4 2009, 06:28 PM
Go to the top of the page
 
+Quote Post
post May 20 2009, 12:39 AM
Post #4

firexranger8



Newbie
*

Group: Members
Posts: 1
Joined: 20-May 09
Member No.: 910,592






how do you open the file?? unsure.gif and how do you download it? ouch.gif
Go to the top of the page
 
+Quote Post
post May 20 2009, 06:52 PM
Post #5

milne man



Advanced
****

Group: Members
Posts: 56
Joined: 7-October 08
Member No.: 749,528






id say cruelminer is the bast miner
Go to the top of the page
 
+Quote Post
post May 31 2009, 06:56 PM
Post #6

wowas



Newbie
*

Group: Members
Posts: 2
Joined: 31-May 09
Member No.: 919,180






QUOTE(milne man @ May 20 2009, 06:52 PM) *
id say cruelminer is the bast miner

where can i find admin?
Go to the top of the page
 
+Quote Post
post Jun 4 2009, 11:53 PM
Post #7

cheaterpants



Newbie
*

Group: Members
Posts: 3
Joined: 4-June 09
Member No.: 921,972






im new to scar...i have it and im looking into getting this script working...but what line do i paste all of this to? the second line where it says beginning?
Go to the top of the page
 
+Quote Post
post Jun 6 2009, 11:22 PM
Post #8

rocco95



Newbie
*

Group: Members
Posts: 1
Joined: 6-June 09
Member No.: 924,005






im new to this kind of stuff so i get u have to save the code but where do i save and what program do i use to save it please help unsure.gif
Go to the top of the page
 
+Quote Post
post Jun 9 2009, 12:37 PM
Post #9

henke96



Newbie
*

Group: Members
Posts: 3
Joined: 10-April 09
Member No.: 881,052






This script isnt for scar its for rsbot.
To use it copy the code and paste it in a text document, then save it in the script folder as coalminer.java

Dont forget to compile after adding the script

This post has been edited by Adub: Jun 9 2009, 05:14 PM
Go to the top of the page
 
+Quote Post
post Jul 11 2009, 12:38 PM
Post #10

Prowlers34



Master
*******

Group: Members
Posts: 207
Joined: 4-January 09
From: Ireland
Member No.: 809,198






i dont follow this
Go to the top of the page
 
+Quote Post
post Oct 6 2009, 08:21 AM
Post #11

mrhacker1



Newbie
*

Group: Members
Posts: 1
Joined: 6-October 09
Member No.: 1,016,137






QUOTE(Prowlers34 @ Jul 11 2009, 12:38 PM) *
i dont follow this

thx it works alot im owning pfft.gif
Go to the top of the page
 
+Quote Post
post Oct 8 2009, 11:14 AM
Post #12

Coolpick



Master
*******

Group: Members
Posts: 386
Joined: 5-September 08
From: Canada
Member No.: 729,029






QUOTE(mrhacker1 @ Oct 6 2009, 08:21 AM) *
thx it works alot im owning pfft.gif

you know how he has one post? His account is noob and same ip as th other... mysterious


--------------------
Jamick Studios ® Coach
Go to the top of the page
 
+Quote Post
post Oct 8 2009, 03:08 PM
Post #13

Prowlers34



Master
*******

Group: Members
Posts: 207
Joined: 4-January 09
From: Ireland
Member No.: 809,198






i absolutely love how you this happens. lol
Go to the top of the page
 
+Quote Post
post Nov 21 2009, 01:26 AM
Post #14

lukeyjay



Newbie
*

Group: Members
Posts: 1
Joined: 21-November 09
Member No.: 1,048,694






how do i get this to work on my runesacpae i just registered and what not
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 


> Board Footer
Time is now: 19th March 2010 - 09:19 AM