Jump to content

scriptersteve

Members
  • Posts

    258
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by scriptersteve

  1. Price check on the following: only impressive stat magic:- magic 75: Magic 85: Magic 95:
  2. When using local scripts that reference the osbot .jar file as a library how often would i need to update this?
  3. did you force stop it? that'll cause it to miss armor/ also breaks will cause it to miss armour I had it miss armour once in 3.5kish tokens (all i ran as i already had d def on acc prior to making script), if you're able to give me exact situation it misses it I could fix it? Or more details? Don't have time to test myself atm (very busy with university exams)
  4. id bot agility first , heard that has high ban rates also with your botting farm, same or different ip. You dont want to get flagged really
  5. https://gyazo.com/fa44682db80152e7ecb9face3cf8b6eb There's no bad malicous code in there..
  6. Must be started in room: then just choose armour type, token number, and food type from gui. Script stops on gui being closed/token limit being reached/ not having correct armour e.t.c
  7. yeah smart, thanks for all your replies
  8. download link here: https://www.dropbox.com/s/nr4qc6yxtfq9k51/WarriorGuild.jar?dl=0 :newest version of script Will post example proggy below in minute for you to see: https://gyazo.com/fa44682db80152e7ecb9face3cf8b6eb Latest version: https://www.dropbox.com/s/d52x6f3qean792f/WarriorGuild.jar?dl=0
  9. ok, thanks will it not always be over-written to 50 though: as the only place it seemed to work instanciating it was inside the onloop function? never mind was being a retard was one curly brace out when i tried instanciating it above
  10. ah ok - thanks, was wondering the best way to go about doing it
  11. or like this: if(myPlayer().getHealthPercent() < (75*(Math.random())) || myPlayer().getHealthPercent() < 20){ getInventory().interact("Eat", this.config.getFoodName()); new ConditionalSleep(2000,1000){ @ Override public boolean condition() throws InterruptedException { return myPlayer().getAnimation() == 829; } }.sleep(); sleep(random(400, 650)); }
  12. if(myPlayer().getHealthPercent() < 65 && (Math.random() < 0.1)){ getInventory().interact("Eat", this.config.getFoodName()); new ConditionalSleep(2000,1000){ @ Override public boolean condition() throws InterruptedException { return myPlayer().getAnimation() == 829; } }.sleep(); sleep(random(400, 650)); } if(myPlayer().getHealthPercent() < 50 && (Math.random() < 0.2)){ getInventory().interact("Eat", this.config.getFoodName()); new ConditionalSleep(2000,1000){ @ Override public boolean condition() throws InterruptedException { return myPlayer().getAnimation() == 829; } }.sleep(); sleep(random(400, 650)); } if(myPlayer().getHealthPercent() < 40 && (Math.random() < 0.25)){ getInventory().interact("Eat", this.config.getFoodName()); new ConditionalSleep(2000,1000){ @ Override public boolean condition() throws InterruptedException { return myPlayer().getAnimation() == 829; } }.sleep(); sleep(random(400, 650)); } if(myPlayer().getHealthPercent() < 25){ getInventory().interact("Eat", this.config.getFoodName()); new ConditionalSleep(2000,1000){ @ Override public boolean condition() throws InterruptedException { return myPlayer().getAnimation() == 829; } }.sleep(); sleep(random(400, 650)); } something like this?
  13. Currently using this as my eating method: but conscious that always eating when health < 50% is very botlike. What is a better way to go about this? Are there any snippet examples that could would be useful? if(myPlayer().getHealthPercent() < 50){ getInventory().interact("Eat", this.config.getFoodName()); new ConditionalSleep(2000,1000){ @ Override public boolean condition() throws InterruptedException { return myPlayer().getAnimation() == 829; } }.sleep(); sleep(random(400, 650)); }
  14. thanks, i'll look into it more and yeah i have absolutely no idea lol. It was more of let's aim for it :')
  15. Hi, I am very stuck on how to implement a GUI, any help would be greatly appreciated. All the GUI needs to be is very simple: Take in armour type, food type and token value. Then pass this into the original java file above. I however, have no idea what i'm doing. Below is my attempt, i'd be really grateful if someone would be able to have a look and fix it or atleast point me in the right direction. Many thanks import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.JTextField; public class GuiSetup { private final JFrame jFrame; /* private JLabel armourType; private JLabel foodLabel; private JLabel tokenAmount; private JTextField foodName; private JTextField tokenName; private JTextField TokenAmount; */ public GuiSetup() { jFrame = new JFrame("WarriorGuild Tokens"); JPanel mainPanel = new JPanel(); JLabel armourType; JLabel foodLabel; JLabel tokenAmounta; JTextField food; JTextField armourName; JTextField tokenAmount; } /* public static String getFoodName() { return foodName; } public static String getArmourName() { return armourName; } public static String getTokenAmount() { return tokenAmount; } */ }
  16. Hi again, would someone be able to explain GUI to me. All the GUI needs to be is very simple: Take in armour type, food type and token value. Then pass this into the original java file above. I however, have no idea what i'm doing. Below is my attempt, i'd be really grateful if someone would be able to have a look and fix it or atleast point me in the right direction. import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.JTextField; public class GuiSetup { private final JFrame jFrame; /* private JLabel armourType; private JLabel foodLabel; private JLabel tokenAmount; private JTextField foodName; private JTextField tokenName; private JTextField TokenAmount; */ public GuiSetup() { jFrame = new JFrame("WarriorGuild Tokens"); JPanel mainPanel = new JPanel(); JLabel armourType; JLabel foodLabel; JLabel tokenAmounta; JTextField food; JTextField armourName; JTextField tokenAmount; } /* public static String getFoodName() { return foodName; } public static String getArmourName() { return armourName; } public static String getTokenAmount() { return tokenAmount; } */ }
  17. if anyone was interested, I have fixed this script so that it works now: below is proggy and code: import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import javax.swing.*; import java.awt.*; import java.util.concurrent.TimeUnit; @ScriptManifest(name = "Animator by RickyD", author = "RickyD", version = 1.0, info = "Animates your armour to farm warrior guild tokens", logo = "") public class Warriorguild extends Script { String[] foodName = {"Monkfish"}; NPC anim; GroundItem lootables; private String armorType = "Mithril"; String [] lootNames = {armorType + " platebody", "Warrior guild token", armorType + " platelegs", armorType + " full helm"}; @Override public void onStart() { startTime = System.currentTimeMillis(); if(hasArmour()!=true){ log("false"); } } @Override public void onExit() { log("Script has exited successfully"); } private long startTime; /* public boolean hasArmour(){ if(getInventory().contains(armorType + " platebody") && getInventory().contains(armorType + " platelegs") && getInventory().contains(armorType + " full helm")){ log("hasarmour is true"); return true; } return false; } */ public boolean hasArmour(){ return getInventory().contains(armorType + " platebody") && getInventory().contains(armorType + " platelegs") && getInventory().contains(armorType + " full helm"); } @Override public int onLoop() throws InterruptedException{ // anim = getNpcs().closest(2454); anim = getNpcs().closest("Animated " + armorType + " armour"); lootables = getGroundItems().closest(lootNames); if(getInventory().contains(foodName) && getInventory().getAmount("Warrior guild token") < 1000){ if(anim != null && anim.isInteracting(myPlayer())){ if(myPlayer().getHealthPercent() < 50){ getInventory().interact("Eat", foodName); //DTiming.waitCondition(() -> myPlayer().getAnimation() == 829, 2000); new ConditionalSleep(2000){ @ Override public boolean condition() throws InterruptedException { return myPlayer().getAnimation() == 829; } }.sleep(); sleep(random(400, 650)); }else{ if(myPlayer().getInteracting() == null){ anim.interact("Attack"); sleep(random(800, 1100)); } } }else{ if(lootables != null){ if (lootables.interact("Take")) { sleep(random(1200, 1500)); } }else{ if(hasArmour()){ if (getObjects().closest("Magical Animator").interact("Animate")) { sleep(random(1200, 2000)); } } } } }else{ stop(false); JOptionPane.showMessageDialog(null, "NO FOOD or 1k Tokens", "Alert", JOptionPane.WARNING_MESSAGE); } return random(400, 700); //The amount of time in milliseconds before the loop starts over } @Override public void onPaint(Graphics2D g) { long millis = System.currentTimeMillis() - startTime; String timeStr = String.format("%02d min, %02d sec", TimeUnit.MILLISECONDS.toMinutes(millis), TimeUnit.MILLISECONDS.toSeconds(millis) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)) ); g.setFont(new Font("Trebuchet MS", Font.PLAIN, 14)); g.setColor(Color.WHITE); g.drawString("Time running: " + timeStr, 10, 250); } }
  18. Yeah thanks, i've fixed it now so should be working.
  19. Okay, sorry everyone - turns out i was rebuilding the project and not the artefact which meant the jar wasn't being updated :'(. Now correctly attacks the warrior just doesn't look the mith so going to have a look at that later
  20. Yeah, just trying to fix that animated armour's script because it doesn't work at the moment. Have tried the changing but again it just hovers over the animate armour and doesn't click. It's not the end of the world for me as I have d-defenders on all my accs and alts but it's a script i thought would be useful to get running again ;(. if (getObjects().closest("Magical Animator").interact("Animate")) { sleep(random(1200, 2000)); My only thought now is, is there a different way to write this so it left clicks on something?
  21. ah think i understand, when i did the followoing nothing was input into the logger import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import javax.swing.*; import java.awt.*; import java.util.concurrent.TimeUnit; @ScriptManifest(name = "Animator by RickyD", author = "RickyD", version = 1.0, info = "Animates your armour to farm warrior guild tokens", logo = "") public class Warriorguild extends Script { String[] foodName = {"Monkfish"}; NPC anim; GroundItem lootables; private String armorType = "Mithril"; private String a1 = " platebody"; private String a2 = " full helm"; private String a3 = " platelegs"; String [] lootNames = {armorType.concat("a1"), "Warrior guild token", armorType.concat("a2"), armorType.concat("a3")}; @Override public void onStart() { startTime = System.currentTimeMillis(); if(hasArmour()!=true){ log("false"); } } @Override public void onExit() { log("Script has exited successfully"); } private long startTime; public boolean hasArmour(){ if(getInventory().contains(armorType + " platebody") && getInventory().contains(armorType + " platelegs") && getInventory().contains(armorType + " full helm")){ log("hasarmour is true"); return true; } return false; } //public boolean hasArmour(){ // return getInventory().contains(armorType + " platebody") && getInventory().contains(armorType + " platelegs") && getInventory().contains(armorType + " full helm"); // } @Override public int onLoop() throws InterruptedException{ // anim = getNpcs().closest(2454); if(hasArmour()!=true){ log("false"); } anim = getNpcs().closest("Animated " + armorType + " armour"); lootables = getGroundItems().closest(lootNames); if(getInventory().contains(foodName) && getInventory().getAmount("Warrior guild token") < 1000){ if(anim != null && anim.isInteracting(myPlayer())){ if(myPlayer().getHealthPercent() < 50){ getInventory().interact("Eat", foodName); //DTiming.waitCondition(() -> myPlayer().getAnimation() == 829, 2000); new ConditionalSleep(2000){ @ Override public boolean condition() throws InterruptedException { return myPlayer().getAnimation() == 829; } }.sleep(); sleep(random(400, 650)); }else{ if(myPlayer().getInteracting() == null){ anim.interact("Attack"); sleep(random(800, 1100)); } } }else{ if(lootables != null){ if (lootables.interact("Take")) { sleep(random(1200, 1500)); } }else{ if(hasArmour()){ if (getObjects().closest("Magical Animator").interact("Animate")) { sleep(random(1200, 2000)); } } } } }else{ stop(false); JOptionPane.showMessageDialog(null, "NO FOOD or 1k Tokens", "Alert", JOptionPane.WARNING_MESSAGE); } return random(400, 700); //The amount of time in milliseconds before the loop starts over } @Override public void onPaint(Graphics2D g) { long millis = System.currentTimeMillis() - startTime; String timeStr = String.format("%02d min, %02d sec", TimeUnit.MILLISECONDS.toMinutes(millis), TimeUnit.MILLISECONDS.toSeconds(millis) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)) ); g.setFont(new Font("Trebuchet MS", Font.PLAIN, 14)); g.setColor(Color.WHITE); g.drawString("Time running: " + timeStr, 10, 250); } } So, i think then the hasarmour function is incorrect, unable to quite see why though
  22. not quite sure howi can check whether that 'hasarmour statement is true?'
  23. It's definately not an NPC, so think it is an object. hasArmour function must be true? as it loots mithril platebodies if they are on the floor which requires this function to be true (i think, how else could i check this?). The object is called Magical Animator (case sensitive) IKR second one caps too. Left click option is called Animate in front off. Bit stuck
  24. There was a warriorguild tokens script that didn't work and the code was lying around so i am trying to fix it: The first method works, however the second method doesn't. Mouse just hovers animate and was wondering why: help would be greatly appreciated. Can copy paste full code if that wouldhelp but pretty sure it'sthis else statement that is broken. Thanks if(lootables != null){ if (lootables.interact("Take")) { sleep(random(1200, 1500)); } }else{ if(hasArmour()){ if (getObjects().closest("Magical Animator").interact("Animate")) { sleep(random(1200, 2000)); } } }
  25. 35m via absorbs because i'm new and want to get some feedback: happy to use middleman until service is completed
×
×
  • Create New...