Jump to content

Heiz

Scripter II
  • Posts

    361
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    100%

Everything posted by Heiz

  1. How would you make that same cannon code then?
  2. Did not know this feature, thanks!
  3. Hi guys, I have a script that works perfectly locally, however, when trying to run your same version of SDN, the script doesn't even open the GUI, returning weird things in the log that don't make sense to me. Could anyone say what it could be? Error in script onStart(): Heiz Script java.lang.NullPointerException at org.osbot.utility.Logger.log(fp:154) at org.osbot.utility.Logger.log(fp:136) at org.osbot.utility.Logger.log(fp:271) at org.osbot.utility.Logger.info(fp:20) at org.osbot.rs07.script.MethodProvider.log(ei:858) at HeyzScript.onStart(o:863) at org.osbot.rs07.event.ScriptExecutor.iIIIIiiiiIIi(rm:32) at org.osbot.rs07.event.ScriptExecutor.start(rm:228) at org.osbot.hb.iIIIIiiiiIIi(bx:241) at org.osbot.e.iIIIIiiiiIIi(yp:183) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
  4. I need to create a new thread to keep watching the player's hitpoints. I looked for some tutorials here on the forum, but none worked, could someone help me please?. I tried this: Event customEvent = new Event() { @Override public int execute() throws InterruptedException { return 0; } }; customEvent.setAsync(); execute(customEvent); But it returns a lot of errors: "Method does not override method from its superclass" "Cannot resolve method 'setAsync' in 'Event'"
  5. Heiz

    Heiz Shopper

    Thanks! At the moment I have little time available to tinker with this script, but I will consider your suggestion.
  6. Maybe you can store current xp in a global variable, and then check if your variable is different from current xp public class MyAwesomeBot extends Script { private int currentExp; @Override public void onStart() { currentExp = getExperienceTracker().getGainedXP(Skill.STRENGTH); } @Override public int onLoop() { if(currentExp != getExperienceTracker().getGainedXP(Skill.STRENGTH)){ log("Exp changed!"); currentExp = getExperienceTracker().getGainedXP(Skill.STRENGTH); } return 500; } }
  7. Heiz

    Heiz Shopper

    Heiz Shopper 1.2 is on! More two stores are now available: Edgeville Cape Store and Port Sarim Fishing Shop!
  8. Features: Support custom combat tasks Support better armor detection Support multiple equipment presets Support f2p foods and strength potion Support loot your own grave after death Support smart healing when fighting Obor Support Hill Giants and Chickens with custom looting Coins, Kill count and Combat Xp per hour information Example CLI: Parameters: Preset name (text) java -jar "OSBot.jar" -login login:pass -world 301 -bot username:pass:bankpin -script 1170:Preset name Example GUI: GUI Explanation: Settings Farm Giant keys in Hill Giants: Mark this option if you want to farm items on Hill Giants instead of killing Obor (When this option is not checked, and the Giant keys run out, the bot switches to it automatically). Giant keys per run: Defines how many keys the bot will take to Obor's lair (in case of multiple kills without restock). Random delays between actions: If this option is checked, the script will perform small random delays of 1-5 seconds after killing a Hill Giant and will perform longer delays of 30-120 seconds every 10-15 minutes. Climb lair rocks to heal: Obor's max hit is 26, so when the player has 27 or less health, if this option is marked, the bot will climb the rocks to recover all his HP. Hill Giants Kill chickens before the Hill Giants: Mark this option if you want to kill chickens before you are level enough to go to Hill Giants. [New] Min. keys needed to start a run: Defines how many Giant keys in inventory or bank (in this case it will be checked in the restock), the player must have to stop farming Hill Giants and start killing Obor. Chickens Leave when: Select the skill and level needed to stop killing chickens and go kill Hill Giants. [New] Consumable Food used in Obor: Defines the food that will be used in the fight against Obor. Food used in Hill Giant: Defines the food that will be used when farming the Hill Giants. Minimum food to enter in lair: Defines the minimum amount of food the player must have in the backpack to enter Obor's lair. Use strength potions against Obor: Mark this option if you want to bring strength potions to Obor's lair. Change non-Obor loot settings: Click this button to open the menu containing the loot settings for Hill Giants and Chickens. [New] Loot Settings Load Template: Some predefined loot options. [New] Loot list: List of items that will be looted. [New] Remove selected item: Select multiple loot items using ctrl or shift and then press this button to remove them. [New] Add item to Loot list: Add the item writed in the "Item name" field to the Loot list. [New] Bury inventory bones: Bury all bones that appear in the player's inventory. Eat food to loot Hill Giants: When finding a desirable loot on the ground, the bot will consume a food to free up inventory space (When finding Giant keys, the bot will always free up space, regardless of this option). Equipments Use current worn equipment as preset: If this option is checked, when starting the bot, it will set the player's current equipment as a preset, that is, when it dies it will equip the same items that were before after looting the grave. At each restock, the bot checks if the player is using the equipment defined in the preset. So if any item disappears, the bot will shut down for safety. Check for best usable equipment: If this option is checked, after each new level gained, the script will check if there is better usable equipment in the inventory to be equipped. In addition, when the script goes to the bank, it will check if there is any equipment better than the one currently used, where there are requirements for its use. Example: If the player is wearing mithril armor, and he has adamantium armor on the bank, after reaching level 30 defense, the script will automatically equip the adamantium armor when performing a bank resuply. [New] Set equipment preset: You can use a previously configured equipment preset. Save current equipment preset: Give a name to the preset that represents the player's equipment at the time he started the script, and save it in "OSBot\Data\HeizObor\Equipments". Tasks Load Template: Some predefined combat task options. [New] Remove selected task: Select multiple tasks using ctrl or shift and then press this button to remove them. Add combat task: Add the training selected in the "Train" and "Until level" fields in the Combat tasks list. Save Preset name: give a name to the preset that represents the current settings. Save current settings preset: Save the preset settings in "OSBot\Data\HeizObor\Settings". Load Preset name: You can use a previously configured settings preset. Load selected settings preset: All bot settings will be changed to the same setting as the selected preset. Delete selected settings preset: Delete the selected preset. [New]
  9. In my git status I get a big error message complaining about several external libraries, but all imports are being done correctly, and locally the script runs normal. Does anyone have any idea what I can do to fix this? [javac] Compiling 6 source files to bin/compile2/heiz/HeyzShopper [javac] warning: [options] bootstrap class path not set in conjunction with -source 8 [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:37: error: cannot find symbol [javac] Map itemsSellPrice = new HashMap(); [javac] ^ [javac] symbol: class HashMap [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:38: error: cannot find symbol [javac] Map itemsBoughtPrice = new HashMap(); [javac] ^ [javac] symbol: class HashMap [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:103: error: cannot find symbol [javac] Item[] items = getInventory().getItems(); [javac] ^ [javac] symbol: class Item [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:105: error: cannot find symbol [javac] for(Item item : items){ [javac] ^ [javac] symbol: class Item [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:551: error: cannot find symbol [javac] List packs = inventory.filter(item -> item.getName().contains("pack") ); [javac] ^ [javac] symbol: class Item [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:823: error: cannot find symbol [javac] if(!Arrays.asList(oneCost).contains(selectedItem)) [javac] ^ [javac] symbol: variable Arrays [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:884: error: cannot find symbol [javac] URL url = new URL("https://secure.runescape.com/m=itemdb_oldschool/api/catalogue/detail.json?item=" + id); [javac] ^ [javac] symbol: class URL [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:884: error: cannot find symbol [javac] URL url = new URL("https://secure.runescape.com/m=itemdb_oldschool/api/catalogue/detail.json?item=" + id); [javac] ^ [javac] symbol: class URL [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:885: error: cannot find symbol [javac] HttpURLConnection httpURLConnection=(HttpURLConnection)url.openConnection(); [javac] ^ [javac] symbol: class HttpURLConnection [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:885: error: cannot find symbol [javac] HttpURLConnection httpURLConnection=(HttpURLConnection)url.openConnection(); [javac] ^ [javac] symbol: class HttpURLConnection [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:893: error: cannot find symbol [javac] InputStreamReader inputStreamReader=new InputStreamReader(httpURLConnection.getInputStream()); [javac] ^ [javac] symbol: class InputStreamReader [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:893: error: cannot find symbol [javac] InputStreamReader inputStreamReader=new InputStreamReader(httpURLConnection.getInputStream()); [javac] ^ [javac] symbol: class InputStreamReader [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:894: error: cannot find symbol [javac] BufferedReader bufferedReader=new BufferedReader(inputStreamReader); [javac] ^ [javac] symbol: class BufferedReader [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:894: error: cannot find symbol [javac] BufferedReader bufferedReader=new BufferedReader(inputStreamReader); [javac] ^ [javac] symbol: class BufferedReader [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:935: error: cannot find symbol [javac] Map dictionary = new HashMap<>(); [javac] ^ [javac] symbol: class HashMap [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:947: error: cannot find symbol [javac] Map dictionary = new HashMap<>(); [javac] ^ [javac] symbol: class HashMap [javac] location: class HeyzShopper [javac] master/heiz/HeyzShopper/src/HeyzShopper.java:983: error: cannot find symbol [javac] Map dictionary = new HashMap<>(); [javac] ^ [javac] symbol: class HashMap [javac] location: class HeyzShopper [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 17 errors [javac] 1 warning ERROR: BUILD FAILED
  10. Does anyone know how to find the object of the "Grave" itself? I tried several ways and no progress grave = getObjects().closest(o -> o.hasAction("Loot")); grave = getObjects().closest(o -> o.getName().contains("Grave")); grave = getObjects().closest(o -> o.getName().contains("ave")); grave = getObjects().closest(o -> o.hasAction("Check")); grave = getObjects().closest(o -> o.getId() == 28434); grave = getObjects().closest(o -> o.getId() == 28435); grave = getObjects().closest(o -> o.getId() == 28436); grave = getObjects().closest(o -> o.getId() == 28437); grave = getObjects().closest(o -> o.getId() == 28438); grave = getObjects().closest(o -> o.getId() == 28439); grave = getObjects().closest(o -> o.getId() == 28440); grave = getObjects().closest(o -> o.getId() == 28441); grave = getObjects().closest(o -> o.getId() == 28442); grave = getObjects().closest(o -> o.getId() == 28443); grave = getObjects().closest(o -> o.getId() == 28444); grave = getObjects().closest(o -> o.getId() == 28445); grave = getObjects().closest(o -> o.getId() == 28446); grave = getObjects().closest(o -> o.getId() == 28447); grave = getObjects().closest(o -> o.getId() == 28448); grave = getObjects().closest(o -> o.getId() == 28449); grave = getObjects().closest(o -> o.getId() == 28450); grave = getObjects().closest(o -> o.getId() == 28451);
  11. I uploaded several code changes over the days but my Last compile doesn't come out from 2021-06-06 16:52:39. I'm not remembering if I need to do something to force recompile
  12. Heiz

    Heiz Shopper

    Did you check the option to switch worlds?
  13. Hi guys, I'm not able to find that screen where the status of the scripts in git is shown, showing if the changes have already been applied or not. If anyone can send me please
  14. The bot died to the cows without even eating a food, and then got stuck for +10 minutes in the last dialogue option with death
  15. My script that got super strengh potions from the bank is no longer working. I went to check the reason, and when I log contains("Super strength(4)") it it returns false, but when using the potion id, it returns true. log(getBank().contains(2440)); //TRUE log(getBank().contains("Super strength(4)")); //FALSE It's a bug in the api?
  16. Heiz

    Super Soul Wars

    Unfortunately I went to the store but I didn't get any points.
  17. Heiz

    Super Soul Wars

    I don't understand this minigame, so I can't tell you what it's doing wrong. But when I look at the screen, it really is playing normally.
  18. Heiz

    Super Soul Wars

    Hello, I ran the BOT for 4 hours (2 times of 2 hours) and I didn't win anything, would you know what I'm doing wrong?
  19. Heiz

    Super Soul Wars

    Hey man, can i get a trial please?
×
×
  • Create New...