Smelt

Discussion in 'RuneScape 3 Cheating' started by Rogbrood, Jan 9, 2009.

Thread Status:
Not open for further replies.
Smelt
  1. Unread #1 - Jan 9, 2009 at 9:34 AM
  2. Rogbrood
    Joined:
    Jan 9, 2009
    Posts:
    47
    Referrals:
    0
    Sythe Gold:
    0

    Rogbrood Member

    Smelt

    Hey boyz,

    I have some Tin and Copper to smelt. What's a good auto for it. The links are dead at smelters in the scripts topic.

    Thanks!:D
     
  3. Unread #2 - Jan 9, 2009 at 9:38 AM
  4. gridfun
    Joined:
    Jan 3, 2006
    Posts:
    43
    Referrals:
    0
    Sythe Gold:
    0

    gridfun Member

    Smelt

    PHP:
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Point;
    import java.awt.event.KeyEvent;
    import java.util.Map;

    import com.speljohan.rsbot.bot.Bot;
    import com.speljohan.rsbot.event.events.ServerMessageEvent;
    import com.speljohan.rsbot.event.listeners.PaintListener;
    import com.speljohan.rsbot.event.listeners.ServerMessageListener;
    import com.speljohan.rsbot.script.Script;
    import com.speljohan.rsbot.script.wrappers.RSInterface;
    import com.speljohan.rsbot.script.wrappers.RSObject;
    import com.speljohan.rsbot.script.wrappers.RSTile;

    public class 
    AllSmelter extends Script implements ServerMessageListener,
            
    PaintListener {

        private 
    char type;
        private 
    RSTile[] falador = new RSTile[] { new RSTile(29463370),
                new 
    RSTile(29533380), new RSTile(29673378),
                new 
    RSTile(29743370) }, alKharid = new RSTile[] {
                new 
    RSTile(32713169), new RSTile(32773176),
                new 
    RSTile(32763186) }, path;
        private 
    int amounttries 0smelted 0oreOneoreTwobusy 0,
                
    bankID 35647;
        private 
    RSTile furnaceClick;
        private final 
    int wait1 350wait2 500ringID 2568barID 2353,
                
    cannonMould 4;
        private final 
    long startTime System.currentTimeMillis();
        private 
    boolean smelting falsering false;
        private 
    String bardoing;

        public 
    String getName() {
            return 
    "All Smelter";
        }

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

        public 
    double getVersion() {
            return 
    1.5;
        }

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

        public 
    String getScriptDescription() {
            return 
    "<html>\n"
                    
    "<head></head>\n"
                    
    "<body>\n"
                    
    "<center>"
                    
    "<h2>"
                    
    getName()
                    + 
    "</h2>"
                    
    "</center>\n"
                    
    "<b>Author:</b> "
                    
    getAuthor()
                    + 
    "<br />"
                    
    "<b>Version:</b> "
                    
    getVersion()
                    + 
    "<br><form>"
                    
    "Bar Type: <select name='bar'>"
                    
    "<option>Bronze<option>Iron<option>Silver<option>Steel<option>Gold<option>Mithril<option>Adamant<option>Rune<option>CannonBall"
                    
    "</select>"
                    
    "<br>How many ores you have:<input type='text' name='amount' size='8'>"
                    
    "<br>Al Kharid: <input type='radio' name='city' value='0' checked='checked'>&nbsp&nbsp&nbsp Falador: <input type='radio' name='city' value='1'>"
                    
    "<br>Ring of Forging: <input type='checkbox' name='ring' value='1'>"
                    
    "</form></body>\n" "</html>";
        }

        public 
    boolean onStart(Map<StringStringargs) {
            
    doing "Starting";
            
    bar args.get("bar");
            
    type bar.toLowerCase().charAt(0);
            if (
    type == 's') {
                if (
    bar.toLowerCase().charAt(1) == 'i')
                    
    type 'e';
            }
            try {
                
    log(args.get("amount"));
                
    amount Integer.parseInt(args.get("amount"));
            } catch (
    Exception e) {
                
    log("Invalid Amount");
                return 
    false;
            }
            if (
    args.get("ring") != null)
                
    ring true;
            if (
    Integer.parseInt(args.get("city")) == 0) {
                
    path alKharid;
                
    furnaceClick = new RSTile(32733186);
                
    log("In Al Kharid");
            } else {
                
    bankID 11758;
                
    path falador;
                
    furnaceClick = new RSTile(29763369);
                
    log("In Falador");
            }
            
    Bot.getEventManager().addListener(PaintListener.class, this);
            
    doing "Started";
            return 
    true;
        }

        public 
    void onFinish() {
            
    Bot.getEventManager().removeListener(PaintListener.class, this);
        }

        public 
    int loop() {
            
    setCameraAltitude(true);
            
    setCompass('w');
            if (
    amount <= 0) {
                
    log("Out of Ore");
                
    stopAllScripts();
            }
            if (
    isMoving())
                return 
    random(0150);
            if (
    smelting && getMyPlayer().getAnimation() == -1) {
                if (
    distanceTo(furnaceClick) > 2)
                    
    walkTileMM(path[path.length 1]);
                
    busy++;
                if (
    busy 3)
                    
    smelting false;
                return 
    random(wait1wait2);
            } else
                
    busy 0;
            if (!
    canMakeBar()) {
                
    busy 5;
                
    smelting false;
                if (
    distanceTo(path[0]) > 4) {
                    
    doing "Walking to Bank";
                    
    walk(true);
                    return 
    random(wait1wait2);
                }
                if (!
    RSInterface.getInterface(INTERFACE_BANK).isValid()) {
                    
    doing "Finding Bank";
                    
    RSObject booth findObject(bankID);
                    if (
    booth == null)
                        return 
    random(wait1wait2);
                    
    atObject(booth"Use-Quickly");
                    return 
    random(wait1wait2);
                }
                if (
    RSInterface.getInterface(INTERFACE_BANK).isValid()) {
                    
    doing "Depositing";
                    
    bank.depositAllExcept(453cannonMould);
                    
    doing "Withdrawing";
                    
    withdrawOre();
                    
    pause();
                    if (!
    canMakeBar()) {
                        
    tries++;
                        return 
    random(wait1wait2);
                    }
                    
    tries 0;
                    
    doing "Closing Bank";
                    
    bank.close();
                }
                return 
    random(wait1wait2);
            } else {
                if (
    smelting) {
                    
    busy 0;
                    return 
    random(wait1wait2);
                }
                if (
    distanceTo(path[path.length 1]) > 4) {
                    
    doing "Walking to Furnace";
                    
    walk(false);
                    return 
    random(wait1wait2);
                }
                if (!
    RSInterface.getInterface(INTERFACE_SMELTINGSCREEN).isValid()) {
                    if (
    getMyPlayer().getAnimation() != -1) {
                        
    busy 0;
                        
    smelting true;
                        return 
    random(wait1wait2);
                    }
                    
    doing "Finding Furnace";
                    if (
    type == 'c') {
                        
    useItemCustom(barIDfurnaceClick);
                        
    wait(random(wait1wait2));
                        
    smeltOre();
                    } else
                        
    atTile(furnaceClick"Smelt");
                    return 
    random(wait1wait2);
                }
                if (
    RSInterface.getInterface(INTERFACE_SMELTINGSCREEN).isValid())
                    
    smeltOre();
                return 
    random(wait1wait2);
            }
        }

        private 
    void smeltOre() {
            
    doing "Smelting";
            
    int minX 28maxX 78;
            
    int minY 390maxY 457;
            switch (
    type) {
            case 
    'i':// Iron
                
    minX 130;
                
    maxX 178;
                break;
            case 
    'e':
                
    minX 182;
                
    maxX 229;
                break;
            case 
    's':// Steel
                
    minX 234;
                
    maxX 279;
                break;
            case 
    'g':
                
    minX 286;
                
    maxX 333;
                break;
            case 
    'm':// Mithril
                
    minX 338;
                
    maxX 387;
                break;
            case 
    'a':// Adamant
                
    minX 390;
                
    maxX 441;
                break;
            case 
    'r':// Rune
                
    minX 442;
                
    maxX 496;
                break;
            case 
    'c':
                
    minX 88;
                
    maxX 429;
                
    clickMouse(new Point(random(minXmaxX), random(minYmaxY)), false);
                
    wait(random(100200));
                
    atMenu("All");
                
    smelting true;
                return;
            }
            
    clickMouse(new Point(random(minXmaxX), random(minYmaxY)), false);
            
    int ore1 getInventoryArray()[1];
            
    int temp getInventoryCount(ore1);
            if (
    getInventoryCount(ore1) > 10)
                
    temp random(getInventoryCount(ore1), getInventoryCount(ore1) + 5);
            if (
    temp == 1)
                
    atMenu("1");
            else if (
    temp <= 10)
                
    atMenu("10");
            else {
                
    atMenu("Smelt x");
                
    pause();
                
    pause();
                if (!
    sendTextCustom("" temp)) {
                    
    smeltOre();
                }
            }
            
    smelting true;
        }

        private 
    void withdrawOre() {
            
    int x random(3873), random(92123);
            
    int x2 random(82117), y2 random(92123);
            switch (
    type) {
            case 
    'b':
                if (
    getInventoryCount(oreOne) < 1) {
                    
    clickMouse(xyfalse);
                    if (
    getMenuIndex("14") < || amount 14) {
                        
    atMenu("X");
                        
    pause();
                        
    pause();
                        if (!
    sendTextCustom(amount 14 "" amount "14"))
                            
    withdrawOre();
                    } else
                        
    atMenu("14");
                    
    pause();
                    if (
    getInventoryCount(oreOne) < 1) {
                        
    pause();
                        
    withdrawOre();
                    }
                }
                if (
    amount <= 14)
                    
    clickMouse(xyfalse);
                else
                    
    clickMouse(x2y2false);
                
    atMenu("All");
                break;
            case 
    'e':
            case 
    'g':
            case 
    'i':
                if (
    ring && !isCarryingItem(ringID) && type == 'i') {
                    
    clickMouse(x2y2false);
                    
    atMenu("1");
                    
    bank.close();
                    
    atInventoryItem(ringID"Wear");
                    break;
                }
                
    clickMouse(xyfalse);
                
    atMenu("All");
                break;
            case 
    's':
                if (
    getInventoryCount(oreOne) < 1) {
                    
    clickMouse(xyfalse);
                    if (
    getMenuIndex("9") < || amount 9) {
                        
    atMenu("X");
                        
    pause();
                        
    pause();
                        if (!
    sendTextCustom(amount "" amount "9"))
                            
    withdrawOre();
                    } else
                        
    atMenu("9");
                    
    pause();
                    if (
    getInventoryCount(oreOne) < 1) {
                        
    pause();
                        
    withdrawOre();
                    }
                }
                if (
    amount <= 9)
                    
    clickMouse(xyfalse);
                else
                    
    clickMouse(x2y2false);
                
    atMenu("All");
                break;
            case 
    'm':
                if (
    getInventoryCount(oreOne) < 1) {
                    
    clickMouse(xyfalse);
                    if (
    getMenuIndex("5") < || amount 5) {
                        
    atMenu("X");
                        
    pause();
                        
    pause();
                        if (!
    sendTextCustom(amount "" amount "5"))
                            
    withdrawOre();
                    } else
                        
    atMenu("5");
                    
    pause();
                    if (
    getInventoryCount(oreOne) < 1) {
                        
    pause();
                        
    withdrawOre();
                    }
                }
                if (
    amount <= 5)
                    
    clickMouse(xyfalse);
                else
                    
    clickMouse(x2y2false);
                
    atMenu("All");
                break;
            case 
    'a':
                if (
    getInventoryCount(oreOne) < 1) {
                    
    clickMouse(xyfalse);
                    if (
    getMenuIndex("4") < || amount 4) {
                        
    atMenu("X");
                        
    pause();
                        
    pause();
                        if (!
    sendTextCustom(amount "" amount "4"))
                            
    withdrawOre();
                    } else
                        
    atMenu("4");
                    
    pause();
                    if (
    getInventoryCount(oreOne) < 1) {
                        
    pause();
                        
    withdrawOre();
                    }
                }
                if (
    amount <= 4)
                    
    clickMouse(xyfalse);
                else
                    
    clickMouse(x2y2false);
                
    atMenu("All");
                break;
            case 
    'r':
                if (
    getInventoryCount(oreOne) < 1) {
                    
    clickMouse(xyfalse);
                    if (
    getMenuIndex("3") < || amount 3) {
                        
    atMenu("X");
                        
    pause();
                        
    pause();
                        if (!
    sendTextCustom(amount "" amount "3"))
                            
    withdrawOre();
                    } else
                        
    atMenu("3");
                    
    pause();
                    if (
    getInventoryCount(oreOne) < 1) {
                        
    pause();
                        
    withdrawOre();
                    }
                }
                if (
    amount <= 3)
                    
    clickMouse(xyfalse);
                else
                    
    clickMouse(x2y2false);
                
    atMenu("All");
                break;
            case 
    'c':
                if (
    getInventoryCount(4) < 1) {
                    
    clickMouse(x2y2true);
                    
    pause();
                    
    withdrawOre();
                } else {
                    
    clickMouse(xyfalse);
                    
    atMenu("All");
                }
                break;
            }
            
    pause();
        }

        private 
    boolean canMakeBar() {
            
    oreTwo 453;
            
    int coal getInventoryCount(oreTwo);
            switch (
    type) {
            case 
    'b':
                
    oreOne 436;
                
    oreTwo 438;
                
    int copper getInventoryCount(oreOne),
                
    tin getInventoryCount(oreTwo);
                if (
    copper == || tin == 0)
                    return 
    false;
                break;
            case 
    'i':
                
    oreOne 440;
                
    int iron getInventoryCount(oreOne);
                if (
    iron <= 0)
                    return 
    false;
                break;
            case 
    'e':
                
    oreOne 442;
                
    int silver getInventoryCount(oreOne);
                if (
    silver <= 0)
                    return 
    false;
                break;
            case 
    's':
                
    oreOne 440;
                
    int steel getInventoryCount(oreOne);
                if (
    coal steel || steel == 0)
                    return 
    false;
                break;
            case 
    'g':
                
    oreOne 444;
                
    int gold getInventoryCount(oreOne);
                if (
    gold <= 0)
                    return 
    false;
                break;
            case 
    'm':
                
    oreOne 447;
                
    int mith getInventoryCount(oreOne);
                if (
    coal mith || mith == 0)
                    return 
    false;
                break;
            case 
    'a':
                
    oreOne 449;
                
    int addy getInventoryCount(oreOne);
                if (
    coal addy || addy == 0)
                    return 
    false;
                break;
            case 
    'r':
                
    oreOne 451;
                
    int rune getInventoryCount(oreOne);
                if (
    coal rune || rune == 0)
                    return 
    false;
                break;
            case 
    'c':
                if (!
    inventoryContains(barID) || !inventoryContains(cannonMould))
                    return 
    false;
                break;
            }
            return 
    true;
        }

        private 
    void walk(boolean toBank) {
            if (
    getEnergy() > random(60100))
                
    setRun(true);
            
    RSTile start locate();
            
    int loc 0;
            for (
    int i 0path.lengthi++) {
                if (
    start.equals(path[i])) {
                    
    loc i;
                    break;
                }
            }
            if (
    toBank) {
                if (
    loc == 0) {
                    
    walkTileMM(randomTile(path[0]));
                    return;
                }
                
    walkTileMM(randomTile(path[loc 1]));
            } else {
                if (
    loc == path.length 1) {
                    
    walkTileMM(randomTile(path[path.length 1]));
                    return;
                }
                
    walkTileMM(randomTile(path[loc 1]));
            }
        }

        private 
    RSTile locate() {
            
    RSTile min path[0];
            for (
    int i 1path.lengthi++) {
                if (
    distanceTo(path[i]) < distanceTo(min))
                    
    min path[i];
            }
            return 
    min;
        }

        private 
    RSTile randomTile(RSTile location) {
            return 
    randomTile(location2);
        }

        private 
    RSTile randomTile(RSTile locationint diff) {
            
    int x location.getX(), location.getY();
            return new 
    RSTile(random(diffdiff),
                    
    random(diffdiff));
        }

        private 
    void pause() {
            
    wait(random(500800));
        }

        private 
    void useItemCustom(int itemRSTile tile) {
            if (
    getCurrentTab() != TAB_INVENTORY) {
                
    openTab(TAB_INVENTORY);
            }
            
    atInventoryItem(item"Use");
            
    atTile(tile"furnace");
        }

        private 
    boolean sendTextCustom(String text) {
            
    sendText(textfalse);
            
    String sent RSInterface.getChildInterface(13751).getText();
            if (
    sent.length() > 2
                    
    && Character.toString(sent.charAt(sent.length() - 2)).equals(
                            
    ">")) {
                
    sendKey((charKeyEvent.VK_ENTER);
                return 
    true;
            }
            for (
    int i 0text.length() + 1i++) {
                
    sendKey((charKeyEvent.VK_BACK_SPACE);
            }
            return 
    false;
        }

        private 
    boolean isMoving() {
            if (!
    getMyPlayer().isMoving())
                return 
    false;
            
    RSTile here locate();
            
    int index 0;
            for (
    int i 0path.lengthi++) {
                if (
    here.equals(path[i]))
                    
    index i;
            }
            if ((
    index != && index != path.length 1)
                    && 
    distanceTo(getDestination()) < 5)
                return 
    false;

            return 
    true;
        }

        public 
    void serverMessageRecieved(ServerMessageEvent e) {
            
    String word e.getMessage().toLowerCase();
            if (
    word.contains("advanced")) {
                
    smelting false;
            } else if (
    word.contains("retrieve")) {
                
    smelted++;
                
    amount--;
            } else if (
    word.contains("fail")) {
                
    amount--;
            } else if (
    word.contains("cannon")) {
                
    amount--;
                
    smelted += 4;
            } else if (
    word.contains("space")) {
                
    int full getInventoryCount(getInventoryArray()[getInventoryArray().length 1]);
                switch (
    type) {
                case 
    'b':
                    if (
    full <= 14)
                        return;
                case 
    's':
                    if (
    full <= 19)
                        return;
                case 
    'm':
                    if (
    full <= 23)
                        return;
                case 
    'a':
                    if (
    full <= 24)
                        return;
                case 
    'r':
                    if (
    full <= 25)
                        return;
                }
                
    bank.depositAll();
            }
        }

        public 
    void onRepaint(Graphics g) {
            if (
    isLoggedIn()) {
                
    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;
                
    int topX 515 173topY 337 80topX 5topY 5;
                
    g.setColor(new Color(01000100));
                
    g.fill3DRect(topXtopY515 topX337 topYtrue);
                
    g.setColor(Color.green);
                
    g.drawString("Runtime: " hours "h " minutes "min "
                        
    seconds "sec."x+= 15);
                
    g.drawString("Ore Left: " Integer.toString(amount), x+= 15);
                
    g.drawString("Bars: " Integer.toString(smelted) + " " bar
                        
    " Bars."x+= 15);
                
    g.drawString("Status: " doingx+= 15);
            }
        }
    }
     
  5. Unread #3 - Jan 9, 2009 at 9:38 AM
  6. Rogbrood
    Joined:
    Jan 9, 2009
    Posts:
    47
    Referrals:
    0
    Sythe Gold:
    0

    Rogbrood Member

    Smelt

    You are the man thanks!

    That's the all smelter right? Does it find the oven in al-kharid? It changed there?
     
  7. Unread #4 - Jan 9, 2009 at 10:19 AM
  8. gridfun
    Joined:
    Jan 3, 2006
    Posts:
    43
    Referrals:
    0
    Sythe Gold:
    0

    gridfun Member

    Smelt

    Yea, if you use AllAntiBan by WarrXperiment, it should do it ;)
    Works for me everytime:)
     
  9. Unread #5 - Jan 9, 2009 at 10:29 AM
  10. Rogbrood
    Joined:
    Jan 9, 2009
    Posts:
    47
    Referrals:
    0
    Sythe Gold:
    0

    Rogbrood Member

    Smelt

    Place that script in Anti-ban? Done. And now compile done.=| now it works?
     
  11. Unread #6 - Jan 9, 2009 at 10:35 AM
  12. h4xpl0x
    Joined:
    Oct 15, 2008
    Posts:
    237
    Referrals:
    0
    Sythe Gold:
    0

    h4xpl0x Active Member

    Smelt

    In Anti-ban folder? If you did, that's not going work.
     
  13. Unread #7 - Jan 9, 2009 at 10:48 AM
  14. Rogbrood
    Joined:
    Jan 9, 2009
    Posts:
    47
    Referrals:
    0
    Sythe Gold:
    0

    Rogbrood Member

    Smelt

    AllAntiBan by WarrXperiment there.
     
  15. Unread #8 - Jan 9, 2009 at 5:28 PM
  16. gridfun
    Joined:
    Jan 3, 2006
    Posts:
    43
    Referrals:
    0
    Sythe Gold:
    0

    gridfun Member

    Smelt

    Ofcourse he needs to put it into AntiBan folder...
     
  17. Unread #9 - Jan 9, 2009 at 5:28 PM
  18. Rogbrood
    Joined:
    Jan 9, 2009
    Posts:
    47
    Referrals:
    0
    Sythe Gold:
    0

    Rogbrood Member

    Smelt

    Smelting did work in falador thanks!
     
  19. Unread #10 - Jan 9, 2009 at 5:38 PM
  20. gridfun
    Joined:
    Jan 3, 2006
    Posts:
    43
    Referrals:
    0
    Sythe Gold:
    0

    gridfun Member

    Smelt

    Np, allways helping if needed:)
     
< Need Magic Log Cutter+banker | monk mash >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site