rendered paste bodyimport java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.*;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Stroke;
import java.awt.event.KeyEvent;
import java.awt.geom.Line2D;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.RandomAccessFile;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.net.MalformedURLException;
import java.net.URLConnection;
import java.io.BufferedWriter;
import java.io.FileWriter;
import javax.imageio.ImageIO;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import org.rsbot.bot.Bot;
import org.rsbot.bot.input.Mouse;
import org.rsbot.event.events.ServerMessageEvent;
import org.rsbot.event.listeners.PaintListener;
import org.rsbot.event.listeners.ServerMessageListener;
import org.rsbot.script.Calculations;
import org.rsbot.script.Constants;
import org.rsbot.script.GrandExchange;
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.RSInterfaceChild;
import org.rsbot.script.wrappers.RSInterfaceComponent;
import org.rsbot.script.wrappers.RSItem;
import org.rsbot.script.wrappers.RSNPC;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSPlayer;
import org.rsbot.script.wrappers.RSTile;
@ScriptManifest(
authors = {"veyo"},
category = "Smithing",
name = "AIO Smelter",
version = 1.3,
description = "<html>\n"
+ "<body style='font-family: Batang; color:white; padding: 0px; text-align: center; background-color: gray;'>"
+ "<h2>"
+ "<b><font color=ffffff size=4></tr>AIO Smelter</font></b><br>"
+ "</h2>\n"
+ "Author: veyo"
+ "<br><br>\n"
+ "<b>Always sell the bars above medium or high or the prices will crash</b>"
+ "<br><br>"
+ "</font><table><tr><td class=style2 bgcolor=#CCCCCC></td>"
+ "<tr><td class=style2 bgcolor=#CCCCCC>"
+ "Location To Smelt In:"
+ "</td><td align=left class=style1 bgcolor=#CCCCCC>"
+ "<select name=location><option>Falador<option selected>Al Kharid"
+ "<option>Edgeville<option>Neitiznot</select>"
+ "</tr></td><tr><td class=style2 bgcolor=#CCCCCC>"
+ "Bars To Be Smelted:"
+ "</td><td align=left class=style1 bgcolor=#CCCCCC>"
+ "<select name=stype><option>Bronze Bar<option>Blurite Bar<option>Iron Bar"
+ "<option>Silver Bar<option selected>Steel Bar<option>Gold Bar"
+ "<option>Mithril Bar<option>Adamantite Bar<option>Runite Bar</select>"
+ "</td></tr><tr><td class=style2 bgcolor=#CCCCCC>"
+ "<br>Does your character has Goldsmith Gaunts equipped? <input type='checkbox' name='gold' value='2'>")
public class AIOSmelter extends Script implements PaintListener,
ServerMessageListener {
final ScriptManifest properties = getClass ().getAnnotation (ScriptManifest.class);
RSTile[] FSmithPath = { new RSTile(2951, 3379), new RSTile(2961, 3380),
new RSTile(2971, 3378), new RSTile(2973, 3373),
new RSTile(2974, 3369) };
RSTile[] FSmithing = cleanPath (fixPath(FSmithPath) );
RSTile[] FBankPath = { new RSTile(2965, 3377), new RSTile(2956, 3381),
new RSTile(2951, 3380), new RSTile(2950, 3376),
new RSTile(2945, 3371), new RSTile(2947, 3368) };
RSTile[] FBanking = cleanPath (fixPath(FBankPath) );
RSTile[] FDoor = { new RSTile(0000, 0000) };
RSTile[] ASmithPath = { new RSTile(3276, 3173), new RSTile(3275, 3185) };
RSTile[] ASmithing = cleanPath (fixPath(ASmithPath) );
RSTile[] ABankPath = { new RSTile(3276, 3173), new RSTile(3269, 3169) };
RSTile[] ABanking = cleanPath (fixPath(ABankPath) );
RSTile[] ESmithPath = { new RSTile(3098, 3496), new RSTile(3108, 3500) };
RSTile[] ESmithing = cleanPath (fixPath(ESmithPath) );
RSTile[] EBankPath = { new RSTile(3108, 3500), new RSTile(3098, 3496) };
RSTile[] EBanking = cleanPath (fixPath(EBankPath) );
RSTile[] NSmithPath = { new RSTile(2338, 3807), new RSTile(2343, 3810) };
RSTile[] NSmithing = cleanPath (fixPath(NSmithPath) );
RSTile[] NBankPath = { new RSTile(2343, 3810), new RSTile(2338, 3807) };
RSTile[] NBanking = cleanPath (fixPath(NBankPath) );
RSTile[] PSmithPath = { new RSTile(3686, 3479) };
RSTile[] PSmithing = cleanPath (fixPath(PSmithPath) );
RSTile[] PBankPath = { new RSTile(3689, 3473) };
RSTile[] PBanking = cleanPath (fixPath(PBankPath) );
RSTile[] PDoor = { new RSTile(0000, 0000) };
RSTile[] OpenDoor;
RSTile[] Banking;
RSTile[] Smithing;
public int BankBooth;
public int Furnace;
public int antiBanSpeed = 0;
public int smithingXP;
public int Rested;
public int Child;
public int amount;
public int trips = 0;
public int Theme = 0;
public int restSet = 0;
public int BarCount;
public int Ore1;
public int Ore2;
public int Ore1Amount;
public int Ore2Amount;
public int BarAmount;
public int BarID;
public int startXP;
public int startLVL;
public long startTime = System.currentTimeMillis();
public int startLvl = skills.getCurrentSkillLevel(Constants.STAT_SMITHING);
public int startExp = skills.getCurrentSkillExp(Constants.STAT_SMITHING);
public String BarName;
public String OreName1;
public String OreName2;
public String status = ("Game Loading...");
public boolean startScript = false;
public boolean setAltitude = false;
public long scriptStartTime;
public double getVersion(){
return properties.version ();
}
@Override
protected int getMouseSpeed () {
return random (8, 10);
}
public void moveMouses () {
final int x = random (0, 750);
final int y = random (0, 500);
moveMouse (x, y, 10, 10);
wait (random (500, 600) );
}
public void moveMousesSlightly () {
final int x = random (0, 300);
final int y = random (0, 200);
moveMouse (x, y, 10, 10);
wait (random (700, 800) );
moveMouse (x, y, 5, 5);
wait (random (700, 800) );
moveMouse (x, y, 2, 2);
}
public void moveCamera () {
int angle = getCameraAngle () + random (-90, 90);
if (angle < 0) angle = 0;
if (angle > 359) angle = 0;
setCameraRotation (angle);
}
public void moveCameraSlightly () {
int angle = getCameraAngle () + random (-45, 45);
if (angle < 0) angle = 0;
if (angle > 359) angle = 0;
setCameraRotation (angle);
}
public void hoverOverPlayer () {
RSPlayer p = getNearestPlayerByLevel (1,130);
if ( (p != null) && tileOnScreen (p.getLocation () ) ) {
moveMouse (p.getScreenLocation (),40,40);
wait (random (850,1250) );
}
}
public void run () {
if (getEnergy() > 40 + random (1, 70)
|| getEnergy() >= 71) {
setRun (true);
wait (random (100, 200) );
}
}
public void antiBan () {
antiBanSpeed = random (0 + smithingXP, 100 + smithingXP);
switch (random (0, 300) ) {
case 1:
status = ("Performing Random Mouse...");
moveMouseRandomly (300);
break;
case 2:
status = "Performing Move Camera...";
moveCamera ();
break;
case 3:
status = ("Performing Mouse Move...");
moveMouses ();
break;
case 4:
status = "Performing Slight Camera...";
moveCameraSlightly ();
break;
case 5:
status = "Performing Hover Player...";
hoverOverPlayer ();
break;
case 6:
status = "Performing Camera Move...";
moveCamera ();
break;
case 7:
status = "Performing Slight Camera...";
moveCameraSlightly ();
break;
case 8:
status = "Performing Hover Player...";
hoverOverPlayer ();
break;
case 9:
status = ("Performing Mose Random...");
moveMouseRandomly (300);
break;
case 10:
status = ("Performing Move Mouse...");
moveMouses ();
break;
case 11:
status = "Performing Slight Mouse...";
moveMousesSlightly ();
break;
case 12:
status = "Performing Hover Player...";
hoverOverPlayer ();
break;
case 13:
status = ("Performing Slight Mouse...");
moveMousesSlightly ();
break;
case 14:
status = ("Performing Slight Mouse...");
moveMousesSlightly ();
break;
case 15:
status = "Performing Hover Player...";
hoverOverPlayer ();
break;
}
}
private boolean isSmelting () {
int j = 0;
for (int i = 0; i < 10
&& getInventoryCount (Ore1) >= 0; i++) {
if (getMyPlayer ().getAnimation () == 3243) {
moveMousesSlightly ();
j = j + 1;
}
wait (random (100, 150) );
}
if (j > 0) {
return true;
}else{
return false;
}
}
public int loop () {
run ();
if (!setAltitude) {
setCameraAltitude (true);
wait (random (300, 500) );
setAltitude = true;
return (50);
}
if (BarCount > amount - 1){
status = ("Reached " + amount + ", " + BarName + " Bars");
}
if (startXP == 0) {
startXP = skills.getCurrentSkillExp
(Skills.getStatIndex ("smithing") );
startLVL = skills.getCurrentSkillLevel
(Skills.getStatIndex ("smithing") );
}
if (oreIDCheck () ) {
if (atBank () ) {
handleBank ();
handleWithdraw ();
return (5);
}else{
if (walkToBank () );
return (5);
}
}else{
if (atFurnace () ) {
handleBars ();
}else{
if (walkToFurnace () );
return (5);
}
}
return (5);
}
@Override
public void onFinish () {
logProgressReport ();
return;
}
public void serverMessageRecieved (final ServerMessageEvent e) {
final String message = e.getMessage ();
if (message.contains("The magic of the Varrock armour enables you "
+ "to smelt 2 bars at the same time") ) {
status = ("Smelted a " + BarName + " Bar...");
BarCount++;
}
if (message.contains("You retrieve a bar") ) {
status = ("Smelted a " + BarName + " Bar...");
BarCount++;
}
if (message.contains("You have run out of") ) {
status = ("Out Of Ore...");
trips++;
}
}
public boolean oreIDCheck () {//ORE CHECK
status =("Checking Inventory");
return (!inventoryContains (Ore1)
|| (!inventoryContains (Ore2) ) );
}
public boolean atBank () {
status = ("Finding Bank");
return (distanceTo(getNearestObjectByID (BankBooth)) < 4);
}
public boolean handleBank () {
int ct = 0;
try {
if (!bank.isOpen () ) {
wait (random (500, 800) );
if (bank.open () )
status = ("Bank Is Open...");
wait (random (300, 500) );
while (!bank.isOpen () ) {
wait(180);
ct++;
if (ct > 30)
return false;
}
}
}catch (final Exception e) {
}
return true;
}
public void handleWithdraw () {
if (bank.isOpen () ) {
status = ("Empting Inventory");
if (bank.depositAll () );
wait (random (700, 800) );
if (bank.getCount (Ore1) > 0) {
wait (random (600, 800) );
if (getInventoryCount (Ore1) == 0) {
wait (random (600, 800) );
status = ("Getting " + OreName1
+ "...");
if (bank.atItem (Ore1, "Withdraw-"
+ Ore1Amount) ) {
wait (random (400, 500) );
}else{
bank.atItem (Ore1,
"Withdraw-X");
wait (random (900, 1500) );
sendText (String.
valueOf (Ore1Amount), true);
wait (random (400, 500) );
}
}
}else{
bank.close ();
wait (random (10000, 12000) );
status = ("Logging out in 10 sec");
logout ();
stopScript ();
}
wait (random (200, 300) );
if (Ore2Amount != 0) {
wait (random (600, 800) );
if (bank.getCount (Ore2) > 0) {
wait (random (600, 800) );
if (getInventoryCount (Ore2) == 0) {
status = ("Getting "
+ OreName2 + "...");
wait (random (600, 800) );
if (bank.atItem (Ore2,
"Withdraw-All") ) {
wait (random (600, 800) );
bank.close ();
waitToMove (800);
}
}
} else {//OUT OF ORE LOG OUT
bank.close ();
status = ("Logging out in 10 sec");
wait (random (10000, 12000) );
logout ();
stopScript ();
}
} else {
wait (random (600, 800) );
status = ("Path Set To Furnace...");
bank.close ();
waitToMove (800);
}
}
}
public boolean walkToBank () {
if (distanceTo(getDestination()) <= random(3, 6) ) {
antiBan ();
status = ("Going To Bank...");
try {
if (!walkPathMM (Banking) ) {
walkTo (nextTile (Banking, 12, false) );
}
} catch (final Exception e) {
}
}
return true;
}
public boolean atFurnace () {
status = ("Finding Furnace");
return (distanceTo(getNearestObjectByID(Furnace)) < 4);
}
public void handleBars () {
if (!isSmelting () ) {
final RSObject furnace = getNearestObjectByID(Furnace);
if (!RSInterface.getInterface (311).isValid () ) {
atObject (furnace, "Smelt");
}
if (RSInterface.getInterface (311).isValid () ) {
if (getInventoryCount (Ore1) <= 10
&& getInventoryCount (Ore1) > 0) {
status = ("Setting Amount To 10...");
wait (random (500, 800) );
atInterface (311, Child,
"Smelt 10 " + BarName);
} else {
atInterface (311, Child,
"Smelt X " + BarName);
wait (random (2000, 3000) );
String randomAmount = Integer.
toString (random (BarAmount, 99) );
status = ("Setting Random Amount...");
sendText (randomAmount, true);
}
}
}
}
public boolean walkToFurnace () {
if (distanceTo(getDestination() ) <= random(3, 6) ) {
if (getInventoryCount (Ore1) > 0
&& getInventoryCount (Ore2) > 1) {
status = ("Going To Furnace...");
antiBan ();
try {
if (!walkPathMM (Smithing) ) {
walkTo (nextTile (Smithing, 12, false) );
}
} catch (final Exception e) {
}
}
} else {
if (getInventoryCount (Ore1) < 1
&& getInventoryCount (Ore2) < 2) {
walkToBank ();
}
}
return true;
}
public void logProgressReport() {
final long runTime = System.currentTimeMillis () - scriptStartTime;
final int seconds = (int) ( (runTime / 1000) % 60);
final int minutes = (int) ( (runTime / 1000) / 60) % 60;
final int hours = (int) ( ( (runTime / 1000) / 60) / 60) % 60;
final StringBuilder t1 = new StringBuilder ();
if (hours < 10) {
t1.append('0');
}
t1.append(hours);
t1.append(":");
if (minutes < 10) {
t1.append('0');
}
t1.append(minutes);
t1.append(":");
if (seconds < 10) {
t1.append('0');
}
t1.append(seconds);
log("Runtime: " + hours + ":" + minutes + ":" + seconds);
log("Bars Made: " + BarCount);
}
private final RenderingHints antialiasing = new RenderingHints(
RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
private Image getImage(String url) {
try {
return ImageIO.read(new URL(url));
} catch(IOException e) {
return null;
}
}
private String getFormattedTime(final long timeMillis) {
long jmillis = timeMillis;
final long seconds2 = jmillis / 1000;
final long hours = jmillis / (1000 * 60 * 60);
jmillis -= hours * 1000 * 60 * 60;
final long minutes = jmillis / (1000 * 60);
jmillis -= minutes * 1000 * 60;
final long seconds = jmillis / 1000;
String hoursString = "";
String minutesString = "";
String secondsString = seconds + "";
String type = "seconds";
if (minutes > 0) {
minutesString = minutes + ":";
type = "minutes";
} else if (hours > 0 && seconds2 > 0) {
minutesString = "0:";
}
if (hours > 0) {
hoursString = hours + ":";
type = "hours";
}
if (minutes < 10 && !type.equals("seconds")) {
minutesString = "0" + minutesString;
}
if (hours < 10 && type.equals("hours")) {
hoursString = "0" + hoursString;
}
if (seconds < 10 && !type.equals("seconds")) {
secondsString = "0" + secondsString;
}
if (timeMillis == 1000) {
type = "second";
} else if (timeMillis == 60000) {
type = "minute";
} else if (timeMillis == 3600000) {
type = "hour";
}
return hoursString + minutesString + secondsString + " " + type;
}
private final Color color1 = new Color(153, 153, 153, 144);
private final Color color2 = new Color(51, 51, 51, 223);
private final Color color3 = new Color(0, 0, 0, 196);
private final Color color4 = new Color(0, 0, 0);
private final BasicStroke stroke1 = new BasicStroke(4);
private final Font font1 = new Font("Batang", 1, 16);
private final Font font2 = new Font("Batang", 1, 14);
private final Font font3 = new Font("Arial", 1, 9);
private final Font font4 = new Font("Batang", 1, 16);
private final Image img1 = getImage("http://www.global-rs.com/img/gold_ore.gif");
private final Image img2 = getImage("http://www.global-rs.com/img/gold_bar.gif");
public void onRepaint (final Graphics g) {
if (!startScript) {
g.setColor (new Color(255, 255, 255, 255) );
g.setFont (new Font("arial", Font.BOLD, 12) );
g.drawString ("Please Wait Loading Script...", 330, 19);
} else {
final Mouse m = Bot.getClient ().getMouse ();
if (isLoggedIn () ) {
long timeRunning = 0;
timeRunning = System.currentTimeMillis() - startTime;
final long runTime =
System.currentTimeMillis () - scriptStartTime;
final int seconds =
(int) ( (runTime / 1000) % 60);
final int minutes =
(int) ( (runTime / 1000) / 60) % 60;
final int hours =
(int) ( ((runTime / 1000) / 60) / 60) % 60;
final StringBuilder t1 =
new StringBuilder();
if (hours < 10) {
t1.append('0');
}
t1.append(hours);
t1.append(" : ");
if (minutes < 10) {
t1.append('0');
}
t1.append(minutes);
t1.append(" : ");
if (seconds < 10) {
t1.append('0');
}
t1.append(seconds);
int barPerHour = 0;
final int currentXP = skills.getCurrentSkillExp
(Skills.getStatIndex ("smithing") );
final int currentLVL = skills.getCurrentSkillLevel
(Skills.getStatIndex ("smithing") );
final int xpTilNext = skills.getXPToNextLevel
(STAT_SMITHING);
final int percentTilNext = skills.getPercentToNextLevel
(STAT_SMITHING);
final int XPgained = currentXP - startXP;
final int LVLgained = currentLVL - startLVL;
final int fillBar = (int) (1.40 *
(double) percentTilNext);
if ( (runTime / 1000) > 0) {
barPerHour = (int) ( (3600000.0 /
(double) runTime) * BarCount);
}
final Graphics2D g2d1 = (Graphics2D) g;
if (m.x >= 481 && m.x < 481 + 31 && m.y >= 298 && m.y < 298 + 37) {
g.setColor(color1);
g.fillRect(263, 222, 249, 112);
g.setColor(color2);
g.drawRect(261, 220, 254, 115);
g.drawImage(img1, 265, 224, null);
g.drawImage(img2, 478, 219, null);
g.setFont(font1);
g.setColor(color3);
g.drawString("veyo's AIO Smelter", 306, 243);
g.setFont(font2);
g.drawString("Smith LVL: " + currentLVL, 300, 263);
g.drawString("Exp/Hour: "+ (int) ((skills.getCurrentSkillExp(Constants.STAT_SMITHING) - startExp) * 3600000D / ((double) System.currentTimeMillis() - (double) startTime)), 300, 278);
g.drawString("XP Gained: " + XPgained, 300, 293);
g.drawString(BarName + " Bars: " + BarCount, 300, 308);
g.drawString("Status: " + status, 300, 323);
g.setFont(font3);
g.setColor(color3);
g.drawString ("v " + properties.version (), 270, 328);
}else {
g.drawImage(img2, 481, 304, null);
g.setColor(Color.white);
g.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 14));
g.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
g.setColor(Color.white);
g.drawString(" " + BarCount,485,298);
Point mwth = getMouseLocation();
g.setColor(new Color(153, 153, 153, 144));
g.drawRoundRect(mwth.x - 6, mwth.y, 15, 3, 5, 5);
g.drawRoundRect(mwth.x, mwth.y - 6, 3, 15, 5, 5);
g.fillRoundRect(mwth.x - 6, mwth.y, 15, 3, 5, 5);
g.fillRoundRect(mwth.x, mwth.y - 6, 3, 15, 5, 5);
}
}
}
}
@Override
public boolean onStart (final Map <String, String> args) {
try {
new URL("http://www.ipcounter.de/count_js.php?u=67699237")
.openStream();
} catch (final IOException e) {
e.printStackTrace();
}
URLConnection url = null;
BufferedReader in = null;
BufferedWriter out = null;
//Ask the user if they'd like to check for an update...
if(JOptionPane.showConfirmDialog(null, "Would you like to check for updates?\nPlease Note this requires an internet connection and the script will write files to your harddrive!") == 0){ //If they would, continue
try{
//Open the version text file
url = new URL("http://pastie.org/1092101.txt").openConnection();
//Create an input stream for it
in = new BufferedReader(new InputStreamReader(url.getInputStream()));
//Check if the current version is outdated
if(Double.parseDouble(in.readLine()) > getVersion()) {
//If it is, check if the user would like to update.
if(JOptionPane.showConfirmDialog(null, "Update found. Do you want to update?") == 0){
//If so, allow the user to choose the file to be updated.
JOptionPane.showMessageDialog(null, "Please choose 'AIOSmelter.java' in your scripts folder and hit 'Open'");
JFileChooser fc = new JFileChooser();
//Make sure "Open" was clicked.
if(fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION){
//If so, set up the URL for the .java file and set up the IO.
url = new URL("http://pastie.org/1092099.txt").openConnection();
in = new BufferedReader(new InputStreamReader(url.getInputStream()));
out = new BufferedWriter(new FileWriter(fc.getSelectedFile().getPath()));
String inp;
/* Until we reach the end of the file, write the next line in the file
* and add a new line. Then flush the buffer to ensure we lose
* no data in the process.
*/
while((inp = in.readLine()) != null){
out.write(inp);
out.newLine();
out.flush();
}
//Notify the user that the script has been updated, and a recompile and reload is needed.
log("Script successfully downloaded. Please recompile and reload your scripts!");
return false;
} else log("Update canceled");
} else log("Update canceled");
} else
JOptionPane.showMessageDialog(null, "You have the latest version of AIO Smelter"); //User has the latest version. Tell them!
if(in != null)
in.close();
if(out != null)
out.close();
} catch (IOException e){
log("Problem getting version :/");
return false; //Return false if there was a problem
}
}
if (args.get ("location").equals ("Falador") ) {
Smithing = FSmithing;
Banking = FBanking;
BankBooth = 11758;
Furnace = 11666;
} else
if (args.get ("location").equals ("Al Kharid") ) {
Smithing = ASmithing;
Banking = ABanking;
BankBooth = 35647;
Furnace = 11666;
} else
if (args.get ("location").equals ("Edgeville") ) {
Smithing = ESmithing;
Banking = EBanking;
BankBooth = 26972;
Furnace = 26814;
} else
if (args.get ("location").equals ("Neitiznot") ) {
Smithing = NSmithing;
Banking = NBanking;
BankBooth = 21301;
Furnace = 21303;
}
if (args.get ("stype").equals ("Bronze Bar") ) {
BarName = "Bronze";
OreName1 = "Copper";
OreName2 = "Tin";
BarID = 2349;
Ore1 = 436;
Ore2 = 438;
Ore1Amount = 14;
Ore2Amount = 14;
Child = 3;
BarAmount = 28;
} else
if (args.get ("stype").equals ("Blurite Bar") ) {
BarName = "Blurite";
OreName1 = "blurite";
OreName2 = "blurite";
BarID = 9467;
Ore1 = 668;
Ore2 = 668;
Ore1Amount = 28;
Ore2Amount = 0;
Child = 4;
BarAmount = 28;
} else
if (args.get ("stype").equals ("Iron Bar") ) {
BarName = "Iron";
OreName1 = "Iron";
OreName2 = "Iron";
BarID = 2351;
Ore1 = 440;
Ore2 = 440;
Ore1Amount = 28;
Ore2Amount = 0;
Child = 5;
BarAmount = 28;
} else
if (args.get ("stype").equals ("Silver Bar") ) {
BarName = "Silver";
OreName1 = "Silver";
OreName2 = "Silver";
BarID = 2355;
Ore1 = 442;
Ore2 = 442;
Ore1Amount = 28;
Ore2Amount = 0;
Child = 6;
BarAmount = 28;
} else
if (args.get ("stype").equals ("Steel Bar") ) {
BarName = "Steel";
OreName1 = "Iron";
OreName2 = "Coal";
BarID = 2353;
Ore1 = 440;
Ore2 = 453;
Ore1Amount = 9;
Ore2Amount = 18;
Child = 7;
BarAmount = 9;
} else
if (args.get ("stype").equals ("Gold Bar") ) {
BarName = "Gold";
OreName1 = "Gold";
OreName2 = "Gold";
BarID = 2357;
Ore1 = 444;
Ore2 = 444;
Ore1Amount = 28;
Ore2Amount = 0;
Child = 8;
BarAmount = 28;
} else
if (args.get ("stype").equals ("Mithril Bar") ) {
BarName = "Mithril";
OreName1 = "Mithril";
OreName2 = "Coal";
BarID = 2359;
Ore1 = 447;
Ore2 = 453;
Ore1Amount = 5;
Ore2Amount = 20;
Child = 9;
BarAmount = 5;
} else
if (args.get ("stype").equals ("Adamantite Bar") ) {
BarName = "Adamantite";
OreName1 = "Adamantite";
OreName2 = "Coal";
BarID = 2361;
Ore1 = 449;
Ore2 = 453;
Ore1Amount = 4;
Ore2Amount = 24;
Child = 10;
BarAmount = 4;
} else
if (args.get ("stype").equals ("Runite Bar") ) {
BarName = "Runite";
OreName1 = "Runite";
OreName2 = "Coal";
BarID = 2363;
Ore1 = 451;
Ore2 = 453;
Ore1Amount = 3;
Ore2Amount = 24;
Child = 11;
BarAmount = 3;
}
startScript = true;
return true;
}
}