Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by Jake ( 16 years ago )
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.util.Map;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import org.rsbot.bot.Bot;
import org.rsbot.bot.input.Mouse;
import org.rsbot.event.listeners.PaintListener;
import org.rsbot.script.Constants;
import org.rsbot.script.Script;
import org.rsbot.script.ScriptManifest;
import org.rsbot.script.Skills;
import org.rsbot.script.wrappers.RSInterface;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSTile;
@ScriptManifest(authors = { "RSRSRS" }, category = "Woodcutting", name = "Lumberyard Yew Cutter", version = 1.0, description = ""
+ "</head><body>"
+ "<center>"
+ "<b><font size=\"7\" color=\"green\">"
+ "Lumberyard Yew Cutter"
+ "</font></b>"
+ "<font size=\"5\">"
+ "<br></br>"
+ "<br></br>"
+ "1.0"
+ "<br></br>"
+ "<b><i><font size=\"3\" color=\"black\">Cut Yews by Lumberyard Like No Other.</font></i></b>"
+ "<br></br>"
+ "<br></br>"
+ "Start the script wielding or carrying the hatchet you will use, at the yews or the eastbank. Or in VarrockCenter"
+ "<br></br>" + "</body></html>"
)
public class LumberyardYewCutter extends Script implements PaintListener {
public String Current = "";
//ints
public int cantFindBanker;
public int[] teleAnimations = {1723, 4852, 1724, 1722, 2798, 1725, 4851, 2799, 4645, 2800, 3195, 4643, 4847, 4848, 4850 };
public int cantFindTree;
public int profitPerLog = 449;
public int totalProfit;
public int lastExp;
public int chopped;
public int simpleXp;
public int attlvl = skills.getCurrentSkillLevel(STAT_ATTACK);
public int simpleProfit;
public int startLvl;
public int currentLvl;
public int exp;
public int xpGained;
public int gainedLvl = 0;
public int startExp;
public int bankerID [] = {5912, 5913};
public int hatchetID [] = {6739,1359, 1357, 1361, 1351, 1349, 1355, 1353};
public int yewLogsID = 1515;
public int[] chopAnimations = {867, 869, 871, 873, 875, 877, 879, 2846};
public int speed = 16;
public int[] treeStumpID = {7402};
public int[] yewID = {1309};
Mouse m = Bot.getClient().getMouse();
private double getVersion() {
return getClass().getAnnotation(ScriptManifest.class).ver sion();
}
public long startTime = System.currentTimeMillis();
//RSObjects
public RSObject treeStump;
public RSObject yewTree;
public RSObject yew;
public RSObject findNearestObject(int range, int[] ids)
{
int Dist = 20;
RSObject closest = null;
int minX = getMyPlayer().getLocation().getX() - range;
int minY = getMyPlayer().getLocation().getY() - range;
int maxX = getMyPlayer().getLocation().getX() + range;
int maxY = getMyPlayer().getLocation().getY() + range;
for (int x = minX; x < maxX; x++)
{
for (int y = minY; y < maxY; y++)
{
RSObject o = getObjectAt(x, y);
if (o != null)
{
try
{
for (int id : ids)
{
if (id != o.getID())
{
continue;
}
int distance = distanceTo(o);
if (distance < Dist)
{
Dist = distance;
closest = o;
}
}
}
catch (Exception e)
{
}
}
}
}
return closest;
}
//RSTiles
public RSTile currentTree = null;
public RSTile bankerTile = new RSTile(3254, 3420);
public RSTile Yew1Tile = new RSTile(3271, 3471);
public RSTile Yew2Tile = new RSTile(3267, 3494);
public RSTile Yew3Tile = new RSTile(3305, 3470);
public RSTile currentTile = null;
public final RSTile VarrockTile = new RSTile(random(3247,3259), random(3414,3427));
public final RSTile[] yew1tobank = new RSTile[] {new RSTile(3270, 3473),new RSTile(3274, 3464),new RSTile(3279, 3455),new RSTile(3283, 3445),new RSTile(3285, 3434),new RSTile(3280, 3428),new RSTile(3272, 3428),new RSTile(3265, 3428),new RSTile(3259, 3428),new RSTile(3254, 3426),new RSTile(3254, 3420) };
public final RSTile[] yew2toyew1 = new RSTile[] {new RSTile(3266, 3496),new RSTile(3267, 3488),new RSTile(3269, 3486),new RSTile(3268, 3481),new RSTile(3266, 3477),new RSTile(3270, 3473) };
public final RSTile[] yew3toyew1 = new RSTile[] {new RSTile(3303, 3470),new RSTile(3293, 3470),new RSTile(3286, 3469),new RSTile(3278, 3468),new RSTile(3270, 3473) };
public final RSTile[] yew3toyew2 = new RSTile[] {new RSTile(3303, 3470),new RSTile(3293, 3477),new RSTile(3284, 3481),new RSTile(3278, 3482),new RSTile(3269, 3486),new RSTile(3267, 3492) };
public final RSTile[] bankToYew1 = reversePath(yew1tobank);
public final RSTile[] yew1toyew2 = reversePath(yew2toyew1);
public final RSTile[] yew1toyew3 = reversePath(yew3toyew1);
public final RSTile[] yew2toyew3 = reversePath(yew3toyew2);
public final RSTile[] VarrockToVarrockBank = new RSTile[] {new RSTile(3213, 3425),new RSTile(3218, 3428),new RSTile(3223, 3429),new RSTile(3228, 3429),new RSTile(3233, 3430),new RSTile(3238, 3430),new RSTile(3242, 3429),new RSTile(3247, 3429),new RSTile(3251, 3428),new RSTile(3253, 3426),new RSTile(3253, 3424),new RSTile(3254, 3420)};
public final RSTile[] nearbyTiles = new RSTile[]{VarrockTile,Yew1Tile,Yew2Tile,Yew3Tile,};
public RSTile getNearestTile()
{
int Dist = 10;
RSTile closest = null;
for(RSTile element : nearbyTiles)
{
int distance = distanceTo(element);
try
{
if (distance < Dist)
{
Dist = distance;
closest = element;
}
}
catch (Exception e)
{
}
}
return closest;
}
//booleans
public boolean switching = false;
boolean wield = false;
public boolean rectangle(int x1, int x2, int y1, int y2)
{
int posX = getMyPlayer().getLocation().getX();
int posY = getMyPlayer().getLocation().getY();
if(posX>=x1 && posX<=x2 && posY>=y1 && posY<=y2 )
{
return true;
}
else
{
return false;
}
}
public boolean inVarrockBank()
{
if(rectangle(3250,3256,3419,3424))
{
return true;
}
else
{
return false;
}
}
public boolean nearBank()
{
if(rectangle(3247,3260,3415,3428))
{
return true;
}
else
{
return false;
}
}
public boolean nearYew1()
{
if(rectangle(3268,3272,3469,3473))
{
return true;
}
else
{
return false;
}
}
public boolean nearYew2()
{
if(rectangle(3265,3270,3492,3496))
{
return true;
}
else
{
return false;
}
}
public boolean nearYew3()
{
if(rectangle(3303,3306,3467,3472))
{
return true;
}
else
{
return false;
}
}
public boolean deposit(){
if(bankerID == null) {
if(getMyPlayer().isMoving()){
wait(random(300,500));
}else if(getMyPlayer().isIdle()){
cantFindBanker++;
wait(random(500,1500));
}if(cantFindBanker > 5){
if(bankerTile != null){
walkTileMM(randomizeTile(bankerTile, 1, 1));
}else if(bankerTile == null){
walkToBank();
}
}if(cantFindBanker > 20){
log("Problem finding banker, stopping script.");
stopScript();
}
}if(bank.open()){
bank.depositAllExcept(hatchetID);
bank.close();
}else{
if(bankerID != null){
bank.open();
}
}if(bankerID == null){
walkToBank();
}
return inventoryEmptyExcept(hatchetID);
}
public boolean isChopping()
{
for(int Animation : chopAnimations)
{
if(getMyPlayer().getAnimation() == Animation)
{
return true;
}
}
return false;
}
public boolean isWelcomeButton()
{
if(RSInterface.getInterface(378).getChild(45).getT ext().contains("Click Here To Play"))
{
return true;
}
return false;
}
public boolean inVarrock()
{
if(rectangle(3262,3208,3415,3429))
{
return true;
}
else
{
return false;
}
}
public boolean nearKnownLocation()
{
if(inVarrock() || inVarrockBank() || nearYew1() || nearYew2() || nearYew3())
{
return true;
}
return false;
}
public boolean tele()
{
for(int Animation : teleAnimations)
{
if(getMyPlayer().getAnimation() == Animation)
{
return true;
}
}
return false;
}
//voids
public void getMouseSpeed(final int speed) {
this.speed = speed;
getMouseSpeed();
}
public void antiLogout()
{
int randomNumber = random(1,10);
if(randomNumber>11)
{
wait(random(1000,2000));
return;
}
else
{
switch(randomNumber)
{
case 1:
if(getCurrentTab() != TAB_STATS)
{
openTab(TAB_STATS);
}
wait(random(300,800));
moveMouse(random(705,743),random(314,325));
wait(random(1000,1500));
return;
case 2:
if(getCurrentTab() != TAB_STATS)
{
openTab(TAB_STATS);
}
wait(random(400,650));
moveMouse(random(708,749),random(316,326));
wait(random(850,1800));
return;
case 3:
if(getCurrentTab() != TAB_STATS)
{
openTab(TAB_STATS);
}
wait(random(450,700));
moveMouse(random(651,729),random(395,409));
wait(random(950,1650));
return;
case 4:
if(getCurrentTab() != TAB_STATS)
{
openTab(TAB_STATS);
}
return;
case 5:
if(getCurrentTab() != TAB_CLAN)
{
openTab(TAB_CLAN);
}
return;
case 6:
if(getCurrentTab() != TAB_EQUIPMENT)
{
openTab(TAB_EQUIPMENT);
}
return;
case 7:
if(getCurrentTab() != TAB_FRIENDS)
{
openTab(TAB_FRIENDS);
}
return;
case 8:
if(getCurrentTab() != TAB_INVENTORY)
{
openTab(TAB_INVENTORY);
}
return;
case 9:
if(!isRunning())
{
setRun(true);
return;
}
return;
} }
}
public void walkToYew1(){
{
try
{
while(!nearYew1())
{
walkPathMM(randomizePath(bankToYew1, 2, 2), 10);
wait(random(1000,1500));
currentTile = null;
currentTile = getDestination();
while(currentTile != null && distanceTo(currentTile) > 3)
{
wait(random(100,200));
}
if(distanceTo(Yew1Tile)<9)
{
while(!nearYew1())
{
walkTileMM(Yew1Tile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(100,200));
}
}
return;
}
}
return;
}
catch(Exception e)
{
log("Cannot walk to Varrock.");
}
return;
}
}
public void walkYew3ToYew1()
{
try
{
while(!nearYew1())
{
walkPathMM(randomizePath(yew3toyew1, 2, 2), 10);
wait(random(1000,1500));
currentTile = null;
currentTile = getDestination();
while(currentTile != null && distanceTo(currentTile) > 3)
{
wait(random(100,200));
}
if(distanceTo(Yew1Tile)<9)
{
while(!nearYew1())
{
walkTileMM(Yew1Tile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(100,200));
}
}
return;
}
}
return;
}
catch(Exception e)
{
log("Cannot walk to Varrock.");
}
return;
}
public void walkToBank()
{
try
{
while(!inVarrockBank())
{
walkPathMM(randomizePath(yew1tobank, 2, 2), 10);
wait(random(1000,1500));
currentTile = null;
currentTile = getDestination();
while(currentTile != null && distanceTo(currentTile) > 3)
{
wait(random(100,200));
}
if(distanceTo(VarrockTile)<9)
{
while(!inVarrockBank())
{
walkTileMM(VarrockTile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(100,200));
}
}
return;
}
}
return;
}
catch(Exception e)
{
log("Cannot walk to Varrock.");
}
return;
}
public void walkVarrockToBank()
{
try
{
while(!inVarrockBank())
{
walkPathMM(randomizePath(VarrockToVarrockBank, 2, 2), 10);
wait(random(1000,1500));
currentTile = null;
currentTile = getDestination();
while(currentTile != null && distanceTo(currentTile) > 3)
{
wait(random(100,200));
}
if(distanceTo(VarrockTile)<9)
{
while(!inVarrockBank())
{
walkTileMM(VarrockTile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(100,200));
}
}
return;
}
}
return;
}
catch(Exception e)
{
log("Cannot walk to Varrock.");
}
return;
}
public void teleVarrock()
{
openTab(TAB_MAGIC);
wait(random(500, 600));
if (getCurrentTab() == TAB_MAGIC)
{
clickMouse(670,237,true);
}
wait(random(4000, 5000));
if(!tele())
{
walkTo2(VarrockTile);
}
while(tele())
{
wait(random(4000,5000));
}
if(!inVarrock() && !tele())
{
wait(random(1000,2000));
}
}
public void walkTo2(RSTile t)
{
int destX = t.getX();
int destY = t.getY();
RSTile pos = getMyPlayer().getLocation();
int posX = pos.getX();
int posY = pos.getY();
int difX = posX - destX;
int difY = posY - destY;
while(distanceTo(t)> 1 && !nearKnownLocation())
{
if(distanceTo(t)< random(9,10))
{
while(distanceTo(t)>2)
{
walkTileMM(t);
wait(random(2000,2500));
}
return;
}
else if(difX >= 0 && difY >= 0)
{
RSTile nextTile = new RSTile (posX-random(5,9),posY-random(5,9));
walkTileMM(nextTile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(1000,1500));
}
pos = getMyPlayer().getLocation();
posX = pos.getX();
posY = pos.getY();
difX = posX - destX;
difY = posY - destY;
}
else if(difX < 0 && difY < 0)
{
RSTile nextTile = new RSTile (posX+random(5,9),posY+random(5,9));
walkTileMM(nextTile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(1000,1500));
}
pos = getMyPlayer().getLocation();
posX = pos.getX();
posY = pos.getY();
difX = posX - destX;
difY = posY - destY;
}
else if(difX >= 0 && difY < 0)
{
RSTile nextTile = new RSTile (posX-random(5,9),posY+random(5,9));
walkTileMM(nextTile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(1000,1500));
}
pos = getMyPlayer().getLocation();
posX = pos.getX();
posY = pos.getY();
difX = posX - destX;
difY = posY - destY;
}
else if(difX < 0 && difY >= 0)
{
RSTile nextTile = new RSTile (posX+random(5,9),posY-random(5,9));
walkTileMM(nextTile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(1000,1500));
}
pos = getMyPlayer().getLocation();
posX = pos.getX();
posY = pos.getY();
difX = posX - destX;
difY = posY - destY;
}
}
return;
}
public void walkYew2ToYew1()
{
try
{
while(!nearYew1())
{
walkPathMM(randomizePath(yew2toyew1, 2, 2), 10);
wait(random(1000,1500));
currentTile = null;
currentTile = getDestination();
while(currentTile != null && distanceTo(currentTile) > 3)
{
wait(random(100,200));
}
if(distanceTo(Yew1Tile)<9)
{
while(!nearYew1())
{
walkTileMM(Yew1Tile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(100,200));
}
}
return;
}
}
return;
}
catch(Exception e)
{
log("Cannot walk to Varrock.");
}
return;
}
public void walkYew1ToYew2()
{
try
{
while(!nearYew2())
{
walkPathMM(randomizePath(yew1toyew2, 2, 2), 10);
wait(random(1000,1500));
currentTile = null;
currentTile = getDestination();
while(currentTile != null && distanceTo(currentTile) > 3)
{
wait(random(100,200));
}
if(distanceTo(Yew2Tile)<9)
{
while(!nearYew2())
{
walkTileMM(Yew2Tile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(100,200));
}
}
return;
}
}
return;
}
catch(Exception e)
{
log("Cannot walk to Varrock.");
}
return;
}
public void walkYew2ToYew3()
{
try
{
while(!nearYew3())
{
walkPathMM(randomizePath(yew2toyew3, 2, 2), 10);
wait(random(1000,1500));
currentTile = null;
currentTile = getDestination();
while(currentTile != null && distanceTo(currentTile) > 3)
{
wait(random(100,200));
}
if(distanceTo(Yew3Tile)<9)
{
while(!nearYew3())
{
walkTileMM(Yew3Tile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(100,200));
}
}
return;
}
}
return;
}
catch(Exception e)
{
log("Cannot walk to Varrock.");
}
return;
}
public void walkYew1ToBank()
{
try
{
while(!inVarrockBank())
{
walkPathMM(randomizePath(yew1tobank, 2, 2), 10);
wait(random(1000,1500));
currentTile = null;
currentTile = getDestination();
while(currentTile != null && distanceTo(currentTile) > 3)
{
wait(random(100,200));
}
if(distanceTo(VarrockTile)<9)
{
while(!inVarrockBank())
{
walkTileMM(VarrockTile);
wait(random(1000,1500));
while(getMyPlayer().isMoving())
{
wait(random(100,200));
}
}
return;
}
}
return;
}
catch(Exception e)
{
log("Cannot walk to Varrock.");
}
return;
}
public void onFinish(){
log("Thanks for Using LumberYard Yew Cutter");
log("Brought to You by RSRSRS");
return;
}
@Override
public int loop()
{
if(getNearestTile() != null ) {wait(random(500, 600)); } else {teleVarrock();}
if(inVarrock())
{
Current = "In Varrock";
wait(random(2000,2500));
if ( getEnergy() >= random(30, 75) && !isRunning( ) )
{
setRun(true);
wait(random(300,500));
}
walkVarrockToBank();
Current = "Going To Varrock";
}
if(inVarrockBank())
{
wait(random(1000,1500));
Current = "In Varrock Bank";
if(getInventoryCount() > 5)
{
deposit();
return 1;
}
if(inVarrockBank())
{
setCameraAltitude(true);
walkToYew1();
return 1;
}
if(nearYew1() || nearYew2() || nearYew3())
{
Current = "Near Yews";
wait(random(1000,1200));
return 1;
} else
{
log("We Are Lost");
wait(random(1000,1200));
if(getNearestTile() != null)
{
while(distanceTo(getNearestTile())>1)
{
walkTileMM(getNearestTile());
}
return 1;
}
else
{
teleVarrock();
return 1;
}
}
}
if(nearYew1())
{
switching = false;
Current = "Near Yew 1";
if ( getEnergy() >= random(30, 65) && !isRunning( ) )
{
setRun(true);
wait(random(300,500));
}
while(getMyPlayer().isMoving())
{
wait(random(500,600));
}
if(tele())
{
wait(random(500,600));
return 1;
}
if(getInventoryCount()== 28)
{
Current = "Going To Bank";
walkYew1ToBank();
deposit();
return 1;
}
{
if(getMyPlayer().getAnimation() == -1 && getInventoryCount() < 28)
{
yew = null;
yew = findNearestObject(6, yewID);
currentTree = null;
currentTree = new RSTile(3152,3231);
if(getObjectAt(currentTree) != null && yew != null)
{
atTile(currentTree, "Chop down");
Current = "Cutting";
wait(random(1000,1500));
}
else
{
if(yew != null && getObjectAt(yew.getLocation()) != null)
{
atObject(yew, "Chop down");
Current = "Cutting";
wait(random(1000,1500));
}
else
{
if(getInventoryCount() == 28)
{
walkYew1ToBank();
deposit();
return 1;
}
else
{
walkYew1ToYew2();
return 1;
}
}
}
}
if(isChopping())
{
antiLogout();
wait(random(1000,1500));
}
if(!isChopping())
{
int randomNumber = random(10,180);
setCameraRotation(randomNumber);
return 1;
}
}
return 1;
}
if(nearYew2())
{
Current = "Near Yew 2";
if ( getEnergy() >= random(32, 60) && !isRunning( ) )
{
setRun(true);
wait(random(300,500));
}
while(getMyPlayer().isMoving())
{
wait(random(500,600));
}
if(tele())
{
wait(random(500,600));
return 1;
}
if(getInventoryCount() == 28)
{
Current = "Going To Bank";
walkYew2ToYew1();
return 1;
}
{
if(getMyPlayer().getAnimation() == -1 && getInventoryCount() < 28)
{
yew = null;
yew = findNearestObject(6, yewID);
currentTree = null;
currentTree = new RSTile(3166,3220);
if(getObjectAt(currentTree) != null && yew != null)
{
atTile(currentTree, "Chop down");
Current = "Cutting";
wait(random(1000,1500));
}
else
{
if(yew != null && getObjectAt(yew.getLocation()) != null)
{
atObject(yew, "Chop down");
Current = "Cutting";
wait(random(1000,1500));
}
else
{
if(switching)
{
walkYew2ToYew1();
return 1;
}
else
{
walkYew2ToYew3();
return 1;
}
}
}
}
if(isChopping())
{
antiLogout();
wait(random(1000,1500));
}
if(!isChopping())
{
int randomNumber = random(10,180);
setCameraRotation(randomNumber);
return 1;
}
}
return 1;
}
if(nearYew3())
{
switching = true;
Current = "Near Yew 3";
if ( getEnergy() >= random(38, 60) && !isRunning( ) )
{
setRun(true);
wait(random(300,500));
}
while(getMyPlayer().isMoving())
{
wait(random(500,600));
}
if(tele())
{
wait(random(500,600));
return 1;
}
if(getInventoryCount() == 28)
{
Current = "Going To Bank";
walkYew3ToYew1();
return 1;
}
}
{
if(getMyPlayer().getAnimation() == -1 && getInventoryCount() < 28)
{
yew = null;
yew = findNearestObject(6, yewID);
currentTree = null;
currentTree = new RSTile(3185,3227);
if(getObjectAt(currentTree) != null && yew != null)
{
atTile(currentTree, "Chop down");
Current = "Cutting";
wait(random(1000,1500));
}
else
{
if(yew != null && getObjectAt(yew.getLocation()) != null)
{
atObject(yew, "Chop down");
Current = "Cutting";
wait(random(1000,1500));
}
else
{
walkYew3ToYew1();
return 1;
}
}
}
if(isChopping())
{
antiLogout();
wait(random(1000,1500));
}
if(!isChopping())
{
int randomNumber = random(10,180);
setCameraRotation(randomNumber);
return 1;
}
}
return 1;
}
public void onRepaint(Graphics g) {
if (isLoggedIn()) {
if ( startExp == 0) {
startExp = skills.getCurrentSkillExp(Constants.STAT_WOODCUTTI NG);
}startLvl = skills.getCurrentSkillLevel(Constants.STAT_WOODCUT TING);
currentLvl = skills.getCurrentSkillLevel(Constants.STAT_WOODCUT TING);
xpGained = skills.getCurrentSkillExp(Constants.STAT_WOODCUTTI NG) - startExp;
long millis = System.currentTimeMillis() - startTime;
long hours = millis / (1000 * 60 * 60);
millis -= hours * (1000 * 60 * 60);
long minutes = millis / (1000 * 60);
millis -= minutes * (1000 * 60);
long seconds = millis / 1000;
totalProfit = profitPerLog * chopped;
chopped = xpGained/175;
simpleXp = xpGained/1000;
simpleProfit = totalProfit/1000;
Color transporange = new Color(255, 165, 0, 50);
Color transpwhite = new Color(255, 255, 255, 50);
final long runSeconds = (System.currentTimeMillis() - startTime) / 1000;
g.setColor(Color.black);
g.drawRect(320, 0, 200, 130);
if(m.x >= 320 && m.x < 320 + 200 && m.y >= 0 && m.y < 0 + 125) {
g.setColor(transpwhite);
} else {
g.setColor(transpwhite); }
if (millis!=0) {
g.fillRect(320, 0, 200, 130);
g.setColor(Color.black);
g.setFont(new Font("Arial", Font.BOLD, 10));
g.drawString("Lumberyard Yew Cutter", 335, 10);
g.drawString("Botted for: " + hours + ":" + minutes + ":" + seconds + "." , 335, 25);
g.drawString("Chopped: " + chopped + " yew logs", 335, 40);
g.drawString("Averaging: " + chopped * 3600 / runSeconds + " yews/h" , 335, 55);
g.drawString("Gained: " + xpGained + " exp", 335, 70);
g.drawString("Gained: " + totalProfit + " gp", 335, 85);
g.drawString("Profit: " + totalProfit * 3600 / runSeconds + " gp/h" , 335, 100);
g.drawString("Lvl(s) Gained: " + gainedLvl, 335, 115);
g.drawString("Xp To Next Lvl: "+skills.getXPToNextLevel(STAT_WOODCUTTING), 335, 130);
}
}
}
}
Revise this Paste
Parent: 20624