Jump to content

boyyo11

Members
  • Posts

    27
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by boyyo11

  1. Well seeming that the above poster didnt seem to help ya much ill do my best to walk you through it without code cause I havent coded for Osbot in while so here is how itd work. First you should make a new class, I designed this one for you if you dont like it trash it do whatever thats your choice.

    import java.util.ArrayList;
    
    class Trap {
    	private static ArrayList<Trap> traps = new ArrayList<Trap>();
    	private int x;
    	private int y;
    	private int id;
    	private Entity trap;
    	
    	public Trap(int x, int y, int id, Entity trap){
    		this.x = x;
    		this.y = y;
    		this.id = id;
    		this.trap = trap;
                    traps.add(trap);
    	}
    	
    	public boolean trapFell(){
    		return trap.getId() != id;
    	}
    }
    

    This may work it may not. You may have to change it. But aslong as when the trap falls, its id changes than it will return that it fell. If the ID doesnt change when it falls, replace the id information in the trap class to information about the model, than check againist the model and see. For added failsafe, make sure the trap you are checking is corresponding to the trap with the x, y your working with. The trap class is not complete, you would have to add a setter nd getter for the cord aswell. Good luck man

  2. Hey guys, I have been around for awhile now. Just making private bots. While resently they did a ban wave to all my accounts i had botting fletching. Which I was considerably worried about now. My new lvl 3 mule I had made to get 99 fletch and make 20m+ got banned with about 87 fletching at about 5 days in. My main than with 99 fletch nd like 25m in fletching xp. I hade made like 30m from fletching. Both accounts than got banned again, which I dont know how my main got banned at all, I sit in cc, talk a bit, trade people, and occusionally try nd do diff skills but at this time I was only doing fletching for some time. Im just considering selling my main due to its nearly almost 70% maxed on rs3, and a very good starter acc for someone who wants to start 07. I have like 25m on 07, so itd be great. So I figured nd either sell or risk it for the bisket, bot to max combat than go back to money farming? What do you guys think and does anyone know why I cant post in the market place for accounts?

  3. Hey guys been running a private flawless fletcher I made for weeks now on my main. Got 99 fletch with it, got 25m xp in fletch on the acc, and started running a mule with fletch to 99 to make me some more gold too. Well got hit twice on that account, first time 2 day ban, than yesterday it got finished off. Now today I login to my main on the 2.3.3 client and bam I get dc'ed and try to relog, and bam account disabled for two days. So watch out guys fagex is after blood

    • Like 1
  4. Strip it to the very basics and see if that works, then work on adding if visible and attackable and stuff. Like, this is all my fighter has:

    	int fighting() {
    		if(!myPlayer().isUnderAttack()) {
    			NPC npc = getNpcs().closest("Guard");
    			if(npc.exists()) //add loop for finding attackable ones
    				npc.interact("Attack");
    			else 
    				this.stop();
    		}
    		return 1000;
    	}
    

    Start with just attacking, then work on finding out if they're attackable and stuff.

     

    Use enums, don't having everything running in your onLoop(). My fighter has eating, teleporting, and attacking and is 75 lines long, finished

    thanks man, as for the loop should I just use getAll, cause as it sits that only returns one npc.

     

     

    	public NPC getTarget(final String npc) {
    		return getNpcs().closest(new Filter<NPC>() {
    			public boolean match(NPC n) {
    				if (!n.getName().equalsIgnoreCase(npc)) {
    					return false;
    				}
    				if (n.getInteracting() != null) {
    					return false;
    				}
    				return true;
    			}
    		});
    	}
    

    You can use a Filter<> to to find the best npc, in this case it's the npc which isn't interacting with anything, and is called whatever you put in the getTarget method, so:

     

    NPC guard = getTarget("Guard");

    if (guard != null) {

    // attack

    }

     

    And it will attack every NPC with the name 'guard', also, try to use names instead of IDs when it comes to npcs and objects, since the IDs can change from time to time.

     

    You can greatly expand on the filter by adding more stuff like getMap().canReach for extra failsafes etc.

     

    As for the camera movement, the while() is unnecessary because you are already checking if its visible. 

     

    kool, prolly use this cause the filter works well used it for rsb0+ along time ago, and as for the camera movement why wouldnt I use while() while im moving camera or does camera move until it hits the location. Cause I know if its not visible itll move but I dont want it to do something else before we move the camera.

     

     

    @Edit- There seems to be alot of lag still when interacting with the guard, which seems to be the biggest problem now:/

  5. So before I got to serious into the script I was at vwest and tried to make a simple fighter that would kill guards, after that id make my script for me to get max cb, but I cant seem to make it work out. The one I made will attempt to try and click one after a min of following it with the mouse, than it will interact with it, than it will fight it, than wont do anything, it seems to not loop at all even tho I know it clearly does. Here is my script as it is, id like to add camera movement as well if that isnt in the interact with method already, Im not sure but seems to be but this script has so many bugs idk what is right or wrong. Thanks a bunch!

    package com.embah.AIOFighter;
    
    import java.awt.Graphics2D;
    
    import org.osbot.rs07.api.model.NPC;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    import org.osbot.rs07.utility.Area;
    
    @ScriptManifest(author = "Boyyo11", info = "AIO Fighter for 99 combat in the stat of your choice!", name = "AIO FIGHTER", version = 0, logo = "oo embah forever oo")
    public class AIOFighter extends Script{
    	private Area fightingLocation = new Area(3169, 3423, 3184, 3432);
    	private Area bankLocation;
    	private boolean isBanking;
    	private Walker walker;
    	private int[] startPoint = new int[2];
    	private int[] endPoint = {3185, 3436};
    	
    	private NPC guard;
    	
    	private String status = "Loading";
    	
    	@Override
    	public void onStart() throws InterruptedException {
    		
    	}
    
    	@Override
    	public int onLoop() throws InterruptedException {
    		status = "In Loop: ";
    		guard = npcs.closest(3011);
    		if(guard != null){
    			status = "In Loop: guard != null";
    			if(!guard.isVisible()){
    				status = "In Loop: guard is not visible";
    //				while(camera.toEntity(guard) != true){
    //					status = "In Loop: moving camera to guard than waiting";
    //					sleep(random(300, 400));
    //				}
    			} else if(!guard.isUnderAttack() && fightingLocation.contains(guard) && myPlayer().isAttackable()){
    				status = "In Loop: Attacking if guard is in location and both opponents arent under attack";
    				guard.interact("Attack");
    				sleep(random(100, 200));
    			} else {
    				status = "In Loop: Sleeping because nothing else worked, prolly no guards";
    				sleep(random(500, 600));
    			}
    		}
    		return random(50, 100);
    	}
    
    	@Override
    	public void onExit() {
    		log("Cya later!");
    	}
    
    	@Override
    	public void onPaint(Graphics2D g) {
    		g.drawString(status, 5, 10);
    	}
    }
    
    
  6. So before I got to serious into the script I was at vwest and tried to make a simple fighter that would kill guards, after that id make my script for me to get max cb, but I cant seem to make it work out. The one I made will attempt to try and click one after a min of following it with the mouse, than it will interact with it, than it will fight it, than wont do anything, it seems to not loop at all even tho I know it clearly does. Here is my script as it is, id like to add camera movement as well if that isnt in the interact with method already, Im not sure but seems to be but this script has so many bugs idk what is right or wrong. Thanks a bunch!

    package com.embah.AIOFighter;
    
    import java.awt.Graphics2D;
    
    import org.osbot.rs07.api.model.NPC;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    import org.osbot.rs07.utility.Area;
    
    @ScriptManifest(author = "Boyyo11", info = "AIO Fighter for 99 combat in the stat of your choice!", name = "AIO FIGHTER", version = 0, logo = "oo embah forever oo")
    public class AIOFighter extends Script{
    	private Area fightingLocation = new Area(3169, 3423, 3184, 3432);
    	private Area bankLocation;
    	private boolean isBanking;
    	private Walker walker;
    	private int[] startPoint = new int[2];
    	private int[] endPoint = {3185, 3436};
    	
    	private NPC guard;
    	
    	private String status = "Loading";
    	
    	@Override
    	public void onStart() throws InterruptedException {
    		
    	}
    
    	@Override
    	public int onLoop() throws InterruptedException {
    		status = "In Loop: ";
    		guard = npcs.closest(3011);
    		if(guard != null){
    			status = "In Loop: guard != null";
    			if(!guard.isVisible()){
    				status = "In Loop: guard is not visible";
    //				while(camera.toEntity(guard) != true){
    //					status = "In Loop: moving camera to guard than waiting";
    //					sleep(random(300, 400));
    //				}
    			} else if(!guard.isUnderAttack() && fightingLocation.contains(guard) && myPlayer().isAttackable()){
    				status = "In Loop: Attacking if guard is in location and both opponents arent under attack";
    				guard.interact("Attack");
    				sleep(random(100, 200));
    			} else {
    				status = "In Loop: Sleeping because nothing else worked, prolly no guards";
    				sleep(random(500, 600));
    			}
    		}
    		return random(50, 100);
    	}
    
    	@Override
    	public void onExit() {
    		log("Cya later!");
    	}
    
    	@Override
    	public void onPaint(Graphics2D g) {
    		g.drawString(status, 5, 10);
    	}
    }
    
    
  7.  

    Cool man works out good, thanks again.

     

    Thanks everyone, I ended up doing what dog said, and just did

    for(int i=0;i<27;i++){
    	mouse.move(inventory.getMouseDestination(i));
    	mouse.click(false);
    	sleep(random(125, 150));
    }
    

    Than made a method to clean rest leftover in inventory. Thanks everyone again, nd ill be releasing my fletcher here within the next two days, im going to make a new GUI for it and add a couple settings so people can run it non stop, its damn near flawless, got me 99 fletching within a week or so

    • Like 2
  8. Hey guys, i just got 99 fletch with a bot i made, so now i wanna get my herb up quite a bit so im starting with a herb bot, ive started with just cleaning for now, ill eventually move onto making potions nd what not, but back when I coded for rsbot i made a mouse key herblore cleaner, this one i kinda planned on doing the same.

     

    So ive tried doing

    for(int i=0;i<27;i++){  //Run throw inventory and click each grimy herb
    	inventory.getItemInSlot(i).hover();
    	sleep(random(25, 50));
    	mouse.click(false);
    	sleep(random(25, 50));
    }
    

    But with no avail that seems to only just spam click the herb like 4 or 5 times than go onto the next one, so than I moved onto plan 2.

    I went and found the interface and child id of the inventory (149, 0) but instead of each slot being a child aswell it seems to be listed as its on detail appon the list when using the interface value debug. So i tried to figure out how I would get the interface for each item slot so I could get the x and y cord and than click in the middle of each slot to simulate mouse keys, and it'd be alot more xp per hr.

     

    So how should I go about getting the slot x,y,width, and height? I dont want to have to have an array of integers and what not kinda seems resource wasteful i suppose to say nd kinda hard coded. Any help would be much appricated, thank you so much - boyyo11

  9. If you need to get familiar with API: http://osbot.org/api

     

    For interfaces, you can do interfaces.get(30).interact("Close"); as an example,

     

    For walking, localWalker.walk(pos);

     

    If you are using Eclipse, just type "this." and wait, it will open a popup of suggestions etc and you can see what variables there are, e.g. camera.toEntity, mouse.move

     

    PM me if you need more help biggrin.png

    Awesome thanks man, will do if I have any more questions thanks for the example

     

    Your primary class extending Script has MethodProvider access. Eg. you can call getSkills(), getBank() and so on. Or you can access their instances (skills, bank etc.)

     

    skills.hoverSkill(Skill.HITPOINTS);

     

    localWalker.walk(point)

    Awesome thanks for the tip man

     

     

    Thanks guys - boyyo

  10. Hey there, ive coded for RSbot back in the day and have created many complex scripts. But im completly new to this api, and im quite confused on the MethodProvider stuff. Im just trying to get some basic stuff such as walking, magic, interface interaction, skill hovering and what not. If anyone could point me in the direction for some of that stuff. For magic I would like to just know how to cast one spell if you could tell me, walking i wouldnt like to use points because that can be very time consuming, and it would be much easier to do like Walk.toLocation(Point p) if that is possible. And interfaces, I know there is the widget id and child id, if you could simply tell me how to deal with an interface with the two ids i said above. And I know how to open the skill tab, but idk how to hover over a skill, I remember on rsbot they had a Skill class which i could just be like hoverOver(Skill s) and that would do the trick. Thanks for any help

  11. Maybe I'll just create scripts for private servers until botting is more secure on RuneScape if it ever is.

     

    Well if you do that jagex will win. I have safely botted almost 14 99's in runescape in my time. As long as you dont over do it you will be completly safe. Yes of course ive been banned but make sure you just watch your bot from time to time. Private servers are kinda usless to code a bot for due to you have to make an injector than create the api to code to, than write a script for it. I learned java from coding bots, that was back when  rsbot was the shit. So go on youtube look up new boston, learn a little about variables nd such. You dont need to learn the advance stuff just yet because most of your code will be in your main script class as you are just starting off. After that if you need any help im in the process of learning this api to code bots for it so if you need any basic questions feel free to ask me.

  12. I had problems with this but seem to have it working. First make sure you have the newest version of osbot. Next make sure your using the IDE Eclipse, what im about to tell you, im not sure it if it will work the same in net beans.

     

    1. Right click the class file of the script you wish to compile and use.

    2. Click Export

    3. Make the location of the jar point to your \Users\USER\osbot\scripts\ folder

    4. Hit save

     

    Now it should be there, if osbot is open hit the refresh button and wa-laa ur script should be there.

  13. Did you export it like I showed, into the correct folder? Ensure its a Jar file, not a runnable jar file too. 

     

    It needs to go in users/osbot/scripts, and ensure that there are no osbot1 local scripts in that folder as they cannot co-exist.

     

    apaec

     

    I did all of the such, ill paste my code into here, nd and I did make sure its not an executable as I heard that would cause problems.

    I will also delete the contents of my script folder real quick, and retry the export and post the situtation that occurs with a picture.

     

    package com.embah.PowerMiner;
    
    import java.awt.Graphics2D;
    
    import org.osbot.rs07.api.model.Entity;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    
    @ScriptManifest(author = "Boyyo11", info = "Simple powerminer", name = "PowerMiner", version = 0, logo = "boobs")
    public class PowerMiner extends Script{
        private static final int rock_id = 14864;
        private static final int ore_id = 438;
        
        @Override
        public void onStart() {
            log("Starting Embah Powermine, please enjoy.");
        }
    
        @Override
        public int onLoop() throws InterruptedException {
            if(!myPlayer().isAnimating()){
                if(inventory.isFull()){
                    inventory.dropAll(ore_id);
                }
                Entity rocks = objects.closest(rock_id);
                if(rocks != null){
                    rocks.interact("Mine");
                    sleep(random(25, 30));
                }
            }
            return random(200, 300);
        }
    
        @Override
        public void onExit() {
            log("Thanks for using Embah Powermine, have a great day.");
        }
    
        @Override
        public void onPaint(Graphics2D g) {
                
        }
    }

     

    Umm very weird, seems now after I redeleted, and recompiled and exported that it seemed to work once I downloaded the newest client and ran it, maybe I was just having a problem while it was up, it didnt want to refresh. Thank you so much, im sure ill be back for more little api help, hopefully sooner in the script release part of the forums.

    • Like 1
  14. Hey man, im working on making a simple miner, with this should I use NPC's or objects, nd if I do the objects.get method what should it be put into like

     

    if(!myPlayer().isAnimating()){
                if(inventory.isFull()){
                    inventory.dropAll(ore_id);
                }
                Entity rocks = objects.closest(rock_id);
                if(rocks != null){
                    rocks.interact("Mine");
                    sleep(random(25, 30));
                }
            }
    

     

    I dont think that would be correc tho, because when I compile and export it has an error loading the class file it says, I came from rsbot so I know the background of coding, I just need help with this api

    • Like 1
  15. I still am running in to the same problem however. Every time the bot runs the antiban, it finishes the entire antiban before fishing again. How do I interrupt the antiban process AS SOON AS the character stops animating?

     

    The easiest way to would be is create a seperate class that extends Thread. Make it run and check if the while the player is animating you can sleep otherwise it will not run, so make the condition for the the stuff in the thread to sleep if your not animating.

  16. Hey man I used to code for RSBot along time ago, but resently started playing runescape again due to osrs being open for f2p. I was wondering what my problem is, I resently made a very simple power miner

     

    package com.embah.PowerMiner;
    
    import java.awt.Graphics2D;
    
    import org.osbot.rs07.api.model.Entity;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    
    @ScriptManifest(author = "Boyyo11", info = "Simple powerminer", name = "PowerMiner", version = 0, logo = "boobs")
    public class PowerMiner extends Script{
        private static final int rock_id = 14864;
        private static final int ore_id = 438;
        
        @Override
        public void onStart() {
            log("Starting Embah p****bot, please enjoy.");
        }
    
        @Override
        public int onLoop() throws InterruptedException {
            if(myPlayer().isAnimating()){
                if(inventory.isFull()){
                    inventory.dropAll(ore_id);
                }
                Entity rocks = objects.closest(rock_id);
                if(rocks != null){
                    rocks.interact("Mine Rock");
                    sleep(random(25, 30));
                }
            }
            return random(200, 300);
        }
    
        @Override
        public void onExit() {
            log("Thanks for using Embah Powermine, have a great day.");
        }
    
        @Override
        public void onPaint(Graphics2D g) {
                
        }
    }

     

    I have exported the file as jar file and put into the scripts folder, but yet when I run OSBot, I get an error saying it had a problem loading PowerMiner.class, ive even tried just putting the classes files into the folder nd no luck. And help would be surely appreciated. Thanks - boyyo

×
×
  • Create New...