Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Jyrium/Pulse. Hello!


    jyrium

    Recommended Posts

    Hey everyone, my name is Cody, (Jyrium/Pulse). 

    Currently I have little to no experience programming and out of the other 3 bots I have tried, this one seems the most secure, and advanced API's.  So i have decided to use this forum as a basic guideline and introduction into programming.

    If you have any guides or currently updated snippets you suggest to study, post them here and i'll give them a look.

     

     

    Also I am going to post a achievement log in this post and update them when completed.
    This is just a personal thing to give myself motivation to learn more, obviously you don't have to come back to check on them xD.

     

     

    1.) Walking Script   [X] COMPLETE

     
    Make a basic script, that walks to a location

    2a.) Combat Script [X] COMPLETE

    Create a more advanced combat script that supports 1-3 NPC's and looting their items.
    

    2b.) Paint for Combat Script

     
    Create a basic paint that tracks profits, experience, experience to next level, and time to level.

    2c.) GUI for Combat Script

    Create a gui that allows you to select what to train, and loot.
    

    3a.) Buying Script

    Create a script that buys from a set of 3+ NPC's that can buy any item, supports banking, and world hopping.

    3b.) Buying Script addition.

    Edit last code to support an Auto - GE seller after X amount of items have accumulated. 
    With an added GUI that tracks profits, time ran, GPH, and so forth.

    4a.) Power Level Mining Script

    Startable right after Tutorial, will include safest places to level 1-99,
    (f2p zones only (Will only include the safest leveling spots, not the best spots))
    GUI will give options to what Ores you want to bank (Minimum of adamant and higher).

    4b.) Power Level Mining Script Addition

    Will be the basic script with P2P locations and ores included.
    (Will include the safest leveling spots, as well as the best spots.) 
    With banking and Auto - GE selling support for all ores. 
    Will also include world hopping.
    GUI will allow to bank and sell any ores, no restrictions.
    

    5.) Complex Combat Script 

    This combat bot will include 5-10+ NPC's with support for all dropped items, 
    will include banking, burying, Auto GE-sell on X amount collected, 
    Auto buying food when low with set amount of GP. Or only using GP made during run. 
    Will include a GUI with EXP/h, current EXP, Time to level, and so forth.
    

    MORE TBA

    Link to comment
    Share on other sites

    First/Second script = Success.

    Not complicated so this is a public release.

    Not putting into snippet section because it contains small bugs.

     

    Such as, but not limited to:
    Clicking door when it's already open (Haven't figured how to fix that yet.)

    Sometimes it can't make up it's mind who to attack (will fix self in 0.5-1 seconds)

    Tries to move before attacking NPC.

     

    And could use improvements in:
    Better pathing in area.

    Looking for closest NPC before moving (Once again don't know how to fix that one)

    Etc.

     

     

    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.methods.filter.Filter;
    import org.dreambot.api.methods.map.Area;
    import org.dreambot.api.methods.map.Tile;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.wrappers.interactive.NPC;
    import org.dreambot.api.utilities.impl.Condition;
    import org.dreambot.api.wrappers.interactive.GameObject;
     
     
    @ScriptManifest(author = "PulsE", name = "AL-Fighter", version = 0.89, description = "Training", category = Category.COMBAT)
    public class main extends AbstractScript {
     
    private final Area TRAIN = new Area(3287, 3177, 3301, 3168);
    private final Tile WALK = new Tile(3282, 3176);
     
    public void onStart() {
     
    }
     
     
    @Override
    public int onLoop() {
    if (getLocalPlayer().distance(WALK.getTile()) > 5 && !getLocalPlayer().isInCombat()) {
    getWalking().walk(TRAIN.getRandomTile());
    sleepUntil(
    () -> !getLocalPlayer().isMoving() || getLocalPlayer().distance(getClient().getDestination()) < 7,
    Calculations.random(3000, 5000));
    }
     
    GameObject door = getGameObjects().closest("Large Door");
    if (door != null && door.distance(getPlayers().localPlayer().getTile()) <= 1) {
    door.interact("Open");
     
    }
     
    if (!getWalking().isRunEnabled() && getWalking().getRunEnergy() > 70) {
    getWalking().toggleRun();
    }
     
    if (!getLocalPlayer().isInCombat()) {
    NPC AlKharidwarrior = getNpcs().closest("Al-Kharid warrior");
    AlKharidwarrior = getNpcs().closest(new Filter<NPC>() {
    public boolean match(NPC npc) {
    return npc != null && npc.getName().equals("Al-Kharid warrior") && npc.getActions().length > 0
    && !npc.isInCombat();
    }
    });
     
    if (AlKharidwarrior == null)
    return Calculations.random(600, 3000);
    if (AlKharidwarrior.interact("Attack")) {
    sleepUntil(new Condition() { 
    public boolean verify() {
    return getPlayers().localPlayer().isInCombat();
     
    }
    }, 1000);
    }
    }
    return Calculations.random(1000, 2000);
    }
     
    @Override
    public void onExit() {
     
    }
    }
     
    

     

    Any tips for improvement is encouraged.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.