Jump to content

Explv

Scripter II
  • Posts

    2314
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    100%

Everything posted by Explv

  1. List<Position> posList = new ArrayList<>(); Position[] positions = posList.toArray(new Position[posList.size()]); Or List<Position> posList = new ArrayList<>(); Position[] positions = posList.stream().toArray(Position[]::new);
  2. I meant where in your code are you calling your getState() method
  3. Where are you calling this method? Just to make sure you aren't doing something incorrect?If you aren't then you should file a bug report
  4. rx8 is more fun to drive imo, but pretty small inside. BMW looks nicer If i had to choose i'd pick the bmw
  5. Issue has been fixed, was related to ) included in the script name
  6. -1 is the default option, when it is set to -1 the -mem parameter isn't set by the application. I will change -1 to say something like "default" to make this less confusing
  7. If you have configs from the first version unfortunately it is likely you will have to remake them because I changed the way the serialisation works when I changed to use a table view.
  8. Yes Either run it from the terminal: java -jar /path/to/dir/explv_osbot_manager*.jar Or setup the .jar file to open with Java on double click, by finding instructions online for your distribution, for example: http://askubuntu.com/questions/192914/how-run-a-jar-file-with-a-double-click
  9. Fixed, sorry about the inconvenience UPDATED 2016-10-24: - Fixed saving and loading
  10. Ah shit sorry, I must have broken it with the latest update. I will fix it tonight, and update the thread when it's fixed. Thanks
  11. I recommend you follow some Java tutorials before trying to write scripts: https://www.tutorialspoint.com/java/java_object_classes.htm
  12. This is a possible alternative, although it isn't 5xp per 1 damage, and it depends on attack type and method: http://2007.runescape.wikia.com/wiki/Combat_Options
  13. You could try: NPC npc = npcs.closest("Cow"); // Can be a Player instead int[] splatDamage = npc.accessor.getSplatDamage(); int[] splatTimes = npc.accessor.getSplatTime();
  14. I'm not sure if there are hitsplats in the API anymore, but to work out the damage to your player you could just do: private int previousHealth; @ Override public final void onStart() { previousHealth = getHealth(); } @ Override public final int onLoop() throws InterruptedException { final int currentHealth = getHealth(); if (currentHealth < previousHealth) { final int damage = previousHealth - currentHealth; // Calculate the damage previousHealth = currentHealth; } return random(100, 150); } private int getHealth() { return getSkills().getDynamic(Skill.HITPOINTS); } Or if you just want to know the % of hp remaining, for example to know when to eat, you can do: public final int getHealthPercent() { return (getSkills().getDynamic(Skill.HITPOINTS) * 100) / getSkills().getStatic(Skill.HITPOINTS); }
  15. So you think you are immortal eh? We'll see about that :ninja:
  16. I already requested this a while ago, we have the same problem in the scripting help section when we try to use annotations e.g. @ Override Without a space becomes @[member='Override'] Very annoying :P Link to thread I made which got no response from admins : http://osbot.org/forum/topic/103874-the-override-annotation-is-replaced-by-user-overridecwalks-name/
  17. Personally for the sleep I would do something like: new ConditionalSleep(10_000) { @ Override public boolean condition() throws InterruptedException { return !deadArea.contains(myPosition()); } }.sleep();
  18. Done UPDATED 2016-10-23: - Local scripts can be selected from a drop down - Changed ListView to TableView for easier reading - Added delete key shortcut to delete items - Added double click to edit items - Removed F2P total skill worlds from random world selection
  19. Ah, yeah forgot about those worlds, will fix it thanks
  20. done UPDATED 2016-10-22: - Local scripts found in the OSBot/Scripts folder are now loaded automatically on start. - Added low resource and low cpu boot parameters - Added double click to run a script configuration - Added world parameter, with option to randomise world selection for a given type (F2P, Members etc.) - Fixed local scripts with whitespace in their names
  21. Create it in onStart and store it globally.I assume you have all your chopping code in the constructor, move it into a separate method and call that on the created object: chopTreesObj.chop();
  22. Was it? http://osbot.org/forum/topic/100554-explvs-osbot-manager/ 123
×
×
  • Create New...