Jump to content

lisabe96

Members
  • Posts

    821
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by lisabe96

  1.  

    Make a check for runes --> if no runes are left --> logout or something

     

    private boolean isSupplied(){
                    	 if(inventory.getAmount(Runes here) >runes amount needed for 1 cast) {
                             return true;
                    	
                     }else{
                             return false;
                     }
                 }
    

    and then make a check for it -->

    if (isSupplied()==false){
    	            	status="Logging out";
    	            	log("----------------------------------------------------------------");
                   	 	log("No resources left, we're stopping the script!");
                   	 	log("----------------------------------------------------------------");
                   	 	getLogoutTab().logOut();
                   	 	stop();
    	                
    	            }
    

    Yeah I did, it's already fixed. I just noticed the bug after I already released the new version.

    So it will be fixed in the new version, which should have been today if webwalker wasn't broken.

     

    Using an enum so I can easily control more spells in the future when I need it;

    package rqtasker.utilities;
    
    import org.osbot.rs07.script.Script;
    
    import rqtasker.tasks.impl.combat.CombatUtility;
    
    /**
     * 
     * @author randqm
     * 
     * The available spells.
     *
     */
    
    public enum MagicSpell implements CombatUtility {
    	
    	WIND_STRIKE(new ItemRequirement("Mind rune", 1), new ItemRequirement("Air rune", 1)),
    	WATER_STRIKE(new ItemRequirement("Water rune", 1)
    		, new ItemRequirement("Air rune", 1), new ItemRequirement("Mind rune", 1)),
    	EARTH_STRIKE(new ItemRequirement("Earth rune", 2)
    		, new ItemRequirement("Air rune", 1), new ItemRequirement("Mind rune", 1)),
    	FIRE_STRIKE(new ItemRequirement("Fire rune", 3)
    		, new ItemRequirement("Air rune", 2), new ItemRequirement("Mind rune", 1)),
    	WIND_BOLT(new ItemRequirement("Air rune", 2), new ItemRequirement("Chaos rune", 1)),
    	WATER_BOLT(new ItemRequirement("Water rune", 2)
    		, new ItemRequirement("Air rune", 2), new ItemRequirement("Chaos rune", 1)),
    	EARTH_BOLT(new ItemRequirement("Earth rune", 3)
    		, new ItemRequirement("Air rune", 2), new ItemRequirement("Chaos rune", 1)),
    	FIRE_BOLT(new ItemRequirement("Fire rune", 4)
    		, new ItemRequirement("Air rune", 3), new ItemRequirement("Chaos rune", 1)),
    	WIND_BLAST(new ItemRequirement("Air rune", 3), new ItemRequirement("Death rune", 1)),
    	WATER_BLAST(new ItemRequirement("Water rune", 3)
    		, new ItemRequirement("Air rune", 3), new ItemRequirement("Death rune", 1)),
    	EARTH_BLAST(new ItemRequirement("Earth rune", 4)
    		, new ItemRequirement("Air rune", 3), new ItemRequirement("Death rune", 1)),
    	FIRE_BLAST(new ItemRequirement("Fire rune", 5)
    		, new ItemRequirement("Air rune", 4), new ItemRequirement("Death rune", 1)),
    	WIND_WAVE(new ItemRequirement("Blood rune", 1), new ItemRequirement("Air rune", 5)),
    	WATER_WAVE(new ItemRequirement("Blood rune", 1)
    		, new ItemRequirement("Water rune", 7), new ItemRequirement("Air rune", 5)),
    	EARTH_WAVE(new ItemRequirement("Blood rune", 1)
    		, new ItemRequirement("Earth rune", 7), new ItemRequirement("Air rune", 5)),
    	FIRE_WAVE(new ItemRequirement("Fire rune", 7)
    		, new ItemRequirement("Blood rune", 1), new ItemRequirement("Air rune", 5)),
    		
    	SUPERHEAT(new ItemRequirement("Fire rune", 4), new ItemRequirement("Nature rune", 1));
    	
    	
    	/* The requirements for the spell. */
    	private final ItemRequirement[] reqs;
    	
    	
    	/**
    	 * Creates a new magic combat spell.
    	 * 
    	 * @param reqs The requirements for the spell.
    	 */
    	private MagicSpell(ItemRequirement... reqs) {
    		this.reqs = reqs;
    	}
    	
    	/**
    	 * @return the reqs
    	 */
    	public ItemRequirement[] getReqs() {
    		return reqs;
    	}
    	
    	/**
    	 * Retrieves whether we have the required utilities for the spell.
    	 * 
    	 * @param script The script.
    	 * 
    	 * @return The result.
    	 */
    	public boolean hasReqs(Script script) {
    		for (ItemRequirement req : reqs) {
    			if (req.getName().equals("Air rune")) {
    				if (script.getEquipment().contains("Staff of air")
    						|| script.getEquipment().contains("Air battlestaff")
    						|| script.getEquipment().contains("Mystic air staff")) {
    					continue;
    				}
    			}
    			if (req.getName().equals("Fire rune")) {
    				if (script.getEquipment().contains("Staff of fire")
    						|| script.getEquipment().contains("Fire battlestaff")
    						|| script.getEquipment().contains("Mystic fire staff")) {
    					continue;
    				}
    			}
    			if (req.getName().equals("Earth rune")) {
    				if (script.getEquipment().contains("Staff of earth")
    						|| script.getEquipment().contains("Earth battlestaff")
    						|| script.getEquipment().contains("Mystic earth staff")) {
    					continue;
    				}
    			}
    			if (req.getName().equals("Water rune")) {
    				if (script.getEquipment().contains("Staff of water")
    						|| script.getEquipment().contains("Water battlestaff")
    						|| script.getEquipment().contains("Mystic water staff")) {
    					continue;
    				}
    			}
    			int amt = (int)script.getInventory().getAmount(req.getName());
    			
    			if (amt < req.getAmount()) {
    				return false;
    			}
    		}
    		return true;
    	}
    	
    	/**
    	 * Retrieves the possible staffs for a rune.
    	 * 
    	 * @param rune The rune.
    	 * 
    	 * @return The staffs.
    	 */
    	public static String[] getStaffsForRune(String rune) {
    		String[] staffs = new String[3];
    		
    		switch (rune) {
    		case "Air rune":
    			staffs[0] = "Staff of air";
    			staffs[1] = "Air battlestaff";
    			staffs[2] = "Mystic air staff";
    			break;
    			
    		case "Fire rune":
    			staffs[0] = "Staff of fire";
    			staffs[1] = "Fire battlestaff";
    			staffs[2] = "Mystic fire staff";
    			break;
    			
    		case "Water rune":
    			staffs[0] = "Staff of water";
    			staffs[1] = "Water battlestaff";
    			staffs[2] = "Mystic water staff";
    			break;
    			
    		case "Earth rune":
    			staffs[0] = "Staff of earth";
    			staffs[1] = "Earth battlestaff";
    			staffs[2] = "Mystic earth staff";
    			break;
    			
    		default:
    			return null;
    		}
    		return staffs;
    	}
    	
    	@Override
    	public String toString() {
    		return StringUtil.formatString(name());
    	}
    
    }
     
    • Like 1
  2. I had the same in mines, now when testing fishing I had this as well.

    Basically the web walker doesn't work when it's on "less common" tiles.

    I think it happens when some directions are clipped?

     

    Version: 2.4.33

    Didn't have this issue in 2.4.29

     

    XL6kKqM.png

  3. 2YDrKSy.png

     

     

     

    ~ Superheats your bars in no time! ~

    ~ Supports all bar types ~

    Logs out when out of runes or ores ~

    Uses random delays between actions to avoid a stable xp-rate (less ban chance) ~

    Well... not much more this should do I guess? Bank - superheat ~

     

    Click here to download 1.1

     

    Place the download JAR inside your scripts folder to use. Then refresh your scripts in the client.

    C:\Users/YOUR_USER_NAME/osbot/scripts/

     

     

    VLNR3h6.png

    UjWiVGW.png

     

     

    Note: I have only tested bronze bars myself, if you find any bugs let me know so I can fix them.

     

     

     

     

    • Like 1
  4. It will most likely be based on the widgets in the spell tab. The spells will have different widget values when they are highlighted (can cast) and when they are not. Therefore using this method you need to change to the spell tab to check it. The only other alternative is to check your supplies in the inventory & equipment.

    Alright thanks, guess I'll have to write it myself after all then VSuShjF.gif

  5.  

    Check if your inventory contains the runes...

    private boolean canTeleportToVarrock(){
      return getInventory().contains("Fire rune") && 
             getInventory().contains("Law rune") &&
             getInventory().getAmount("Air rune") >= 3; 
    }
    

     

     

     

    Try this;

    private boolean isSupplied(){
                    	 if(inventory.getAmount(YOUR RUNES HERE) > Required amount of runes for the spell -1) {
                             return true;
                    	 
                     }else{
                             return false;
                     }
                 }
    

    then you could do something like -->

    if (isSupplied()==true);
        //do shit here
    

     

    Yeah well.. that was the obvious solution, I was hoping at first that the spells enum from the API would contain the information on what runes each spell requires

    and would take such approach.

     

    Since it didn't find the spells enum containing the required runes data I searched the API for another solution and found getMagic().canCast().

    That one works but keeps opening my magic tab.

    So since the code must be available somewhere in the API I'd like to figure out where so I can use it rather than having to write it all myself.

  6. I'm trying to check if the bot has the required runes to cast a spell.

    Right now I'm using 

    getMagic().canCast(Spell spell)
    

    However this clicks the magic tab every time it checks.

    I figured there's code that checks for the requirements behind "cancast" somewhere but I can't find it in the API docs.

    Any help?

     

    tldr; How do I check if I have the required runes for a spell without using getMagic().canCast() as that open the magic tab every time.

  7. UPDATES:

     

    Combat:

    * Will not take arrows when it's to far to walk

      (example at lumbridge goblins: if the bot killed a goblin from behind the fence, no human will run around 10 tiles just for those few arrows.

       This bot won't do that anymore either.)

    * Enabled burying bones

    * Experience trackers & other tracking info added

    * Magic now works, will run away when you're out of runes

     

     

    Other:

    * Splashing added with random interactions and delays

    -> Randomly clicks to stay active (also randomly performs a few random actions here)

    -> Attacks a new target of the same type as you started with when out of combat

     

    * A few new zombie walker locations added

     

     

    Overall:

    * Specific task info tracking is now displayed in the GUI in the tracking tab.

     

    Click here to download version 1.1 Alpha

     

    Note: I started on mining which will be visible as a task, but it does NOT work yet, still under development.

     

    g9P0Nni.png

  8. Didn't run into a single error doing powerfishing trout at Barbarian Village.

    Barb village is high ban rate though, lumbridge is probably a better bet and should be working (tested but not for a long period of time)

     

     

     

    Development:

    Gonna be working on tweaking and fixing some stuff today,

    adding new content (tasks) this weekend probably.

  9. Revision 104:

     

    The method that captures the mouse data in class q:

    public void run() {
          for(; this.o; Packet.o(50L)) {
             Object var1 = this.e;
             synchronized(this.e) {
                if(this.u * -1759827915 < 500) {
                   this.b[this.u * -1759827915] = ef.t * -21446213;
                   this.p[this.u * -1759827915] = ef.w * -23755799;
                   this.u -= 268637667;
                }
             }
          }
    
       }
    

     

     

    Packet.o(50L) actually calls Thread.sleep(50). So if you have other sources that claim it's 600ms atleast show it. 

     

    And the client will send the data (in this case q.b and q.p) to the server if a button is pressed or if the int[] is full (size 500).

    If the mouse data wasn't send to server no client would try to replicate human-like mouse movement.

    Just saying but that piece of code doesn't send anything to the server sir.

     

    Also the api itself clicks multiple times or fails on it's own already, and it moves camera as well if you really want some pseudo's.

    Nobody knows how their antiban works, but im pretty confident that some pseudo's aren't going to save you.

     

     

    looks sweet cant wait to try it

    how do I add this script to the ones I can use?

    Just place it under the script folder;

    c:\users\youruser\osbot\scripts

  10. "I do NOT spend time on pseudo-anti-bans like clicking tabs, hovering skills as this data is not send to the OSRS server, so they don't even know that you're doing all that stuff."

     

    You are incorrect. Jagex tracks your mouse position every 50ms and mouse clicks.

     

    Clicking tabs and hovering skills will obviously change your mouse position and clicks so you can't say that jagex can't even see that.

    First of all, its 600ms

    And second, if there's no action involved with the mouse click there's no data passed so they have no clue what you're doing exactly.

    You're mouse position itself is never passed at all, ever.

    I know the whole protocol after spending years in this RSPS scene, trust me on that one

  11. Do you have any code that makes the bot's behavior look more human-like? From my point of view, what refrains me from using a script is because I don't know how reliable it can be. It's no wonder why people say only use paid scripts... It's because the free ones normally have less time invested in time, therefore easier to detect. Also, if you have a quick video of the bot, it would be definitely more informative.

     

    Keep me updated.

    You can check whether u want to use anti-ban or not.

    With anti ban enabled it will use random anti-ban methods.

    However this is still in development as well, but it already has some:

     

    example: When a fishing spot moves it will randomly decide whether to move directly to the next spot or wait some time to make it more himan like.

     

    example2: When banking it will sometimes stay for longer in your bank than needed (like you're checking some things in your bank)

     

    example3: In combat it will randomly delay before attacking a next target, when using ranged it will not always pick up the arrows when there's only 1.

     

    My approach is that I just observe myself while playing and turn the "weird actions"  that make you human-like into code.

     

    I do NOT spend time on pseudo-anti-bans like clicking tabs, hovering skills as this data is not send to the OSRS server, so they don't even know that you're doing all that stuff.

×
×
  • Create New...