Jump to content

LoudPacks

Members
  • Posts

    926
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by LoudPacks

  1. Alright so basically I have each of the mining areas in the motherlode mined defined. I want to be able to walk to one of these areas and handle the rockfall obstacles that are in the way. Right now if a rockfall is present, a path is not able to be generated. If the rockfall is already mined, the path works fine. Im trying to figure out a way to "ignore" obstacles and generate a path so that I can handle the rockfalls myself (when it gets stuck infront of it using the path). Is there a different approach to doing this?
  2. I figured u wanted to specify to which decimal the number is rounded to.
  3. public static float round(float d, int decimalPlace) { return BigDecimal.valueOf(d).setScale(decimalPlace, BigDecimal.ROUND_HALF_UP).floatValue(); }
  4. Can you link me to the hosting company u used for the SMS servers? Or did you just use emails?
  5. I have a script that does fire rune and nature runes on karamja. It has slave components that runs u essence and they will accept noted essence in exchange so you dont need to keep a lot on the slave accounts. It also has a master mode that will accept trades and craft, or you can do it manually. Let me know if your interested. It's not on the SDN but we could figure something out.
  6. lol what a pus. They should deport people like him. How is he even a graduate student when he has -5 logic. I lol'd: People are actually focusing so much on 1st amendment righs because everyone is racist and hates black people. In stead we should focus on banning free speech because it can do a lot of damage. TLDR: He's a pussyboy who gets hurt by words and knows nothing.
  7. Does the webwalking include ape atoll dungeon?
  8. If your manually creating the event u can do: WalkingEvent malaria = new WalkingEvent(); malaria.setEnergyThreshold(101); Might not work but basically it will only run when your run energy is 101 or higher (impossible)
  9. if (Settings.specName == "Dragon Scimitar") { //if u have settings where u select spec weapon if (getCombat().getSpecialPercentage() >= 55) { //change for different weapons or use some sort of map if (getEquipment().isWieldingWeapon(Settings.specName)) { if (!getCombat().isSpecialActivated()) { int startSpec = getCombat().getSpecialPercentage(); getCombat().toggleSpecialAttack(true); new ConditionalSleep(3000, 3500){ @Override public boolean condition(){ return getCombat().getSpecialPercentage() < startSpec; } }.sleep(); } } else { slot = getInventory().getSlot(Settings.specName); getInventory().getItem(Settings.specName).interact("Wield"); sleep(800); if (!getCombat().isSpecialActivated()) { int startSpec = getCombat().getSpecialPercentage(); getCombat().toggleSpecialAttack(true); new ConditionalSleep(3000, 3500){ @Override public boolean condition(){ return getCombat().getSpecialPercentage() < startSpec; } }.sleep(); } } } else if (getEquipment().isWieldingWeapon(Settings.specName)) { getInventory().getItemInSlot(slot).interact("Wield"); sleep(800); }
  10. What component is this line that separates lol
  11. Nah dude its obviously 100% the scripts fault
  12. I could have done that but I just needed a quick path through the cave. How would do that? On a timer? Comparing positions? I figured clicking the button is pretty simple. I didn't know that. I was in ape atol dungeon.
  13. I needed to walk in an unmapped dungeon today lol. Im a pleb so I don't have my own and lemons doesn't have zeah, and OSBot doesn't have much besides regular maps.
  14. Lets u quickly grab position data for making paths. (Useful for dungeons, zeah, unmapped locations, etc.) EDIT: Added auto position grabbing every 7 tiles. (No more clicking the button) import java.awt.GridLayout; import java.awt.Toolkit; import java.awt.datatransfer.StringSelection; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.border.EmptyBorder; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.script.Script; public class PathTool { private Script script; private String newline = "\n"; private String text; private Thread t; private Position currentPosition; public PathTool(Script script) { this.script = script; } public void open() { JFrame frame = new JFrame("Path Maker - " + script.getClient().getUsername()); JButton button = new JButton("Listen"); JButton button2 = new JButton("Copy Data"); JTextArea output = new JTextArea(10, 1); JScrollPane scrollPane = new JScrollPane(output); output.setEditable(false); frame.setLocationRelativeTo(null); frame.setSize(300, 350); frame.setResizable(false); button.addActionListener(event -> { text = String.format("new Position(%d, %d, %d), ", script.myPlayer().getX(), script.myPlayer().getY(), script.myPlayer().getZ()) + newline; output.append(text + newline); currentPosition = script.myPlayer().getPosition(); Thread t1 = new Thread(new Runnable() { public void run() { while (true) { if (script.myPlayer().getPosition().distance(currentPosition) >= 7) { text = String.format("new Position(%d, %d, %d), ", script.myPlayer().getX(), script.myPlayer().getY(), script.myPlayer().getZ()) + newline; output.append(text + newline); currentPosition = script.myPlayer().getPosition(); } try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } } } }); t1.start(); }); button2.addActionListener(event -> { String data = output.getText().replace("\n", ""); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(data), null); JOptionPane.showMessageDialog(frame, "Data copied to clipboard!"); }); JPanel textPanel = new JPanel(); JPanel buttonPanel = new JPanel(); JPanel masterPanel = new JPanel(); textPanel.setLayout(new GridLayout(1, 1, 5, 5)); textPanel.setBorder(BorderFactory.createTitledBorder("Data")); textPanel.add(scrollPane); buttonPanel.setLayout(new GridLayout(1, 2, 5, 5)); buttonPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); buttonPanel.add(button); buttonPanel.add(button2); masterPanel.setLayout(new BoxLayout(masterPanel, BoxLayout.Y_AXIS)); masterPanel.add(textPanel); masterPanel.add(buttonPanel); frame.getContentPane().add(masterPanel); frame.setVisible(true); frame.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { t.interrupt(); frame.dispose(); } }); } }
  15. Word thanks, Ill give that a try, hopefully before the next push.
  16. Okay so I have a script on the SDN called TokenDefenders that farms warrior guild tokens and kills cyclops for defenders. The local version works perfect however when the SDN version is ran it will enter the cyclops room and just stand there rather than attack the cyclops like it does on the local version. I think it may have something to do with the obfuscation but I'm not sure. I have tried reuploading a couple of times and it still has the same issue. If a dev could help me out. If we can't figure it out, I would imagine it's possible for you to upload the local .jar without obfuscation?
  17. Hey guys! I have a few PaySafeCard vouchers I need to get rid of. They're in EUR and are in denominations of 10 EUR. Let me know if interested. I need cash not PSC so I'm selling 10 EUR PSC's for 8.5 USD or 8.5 EUR. I accept paypal and BTC. Maybe RSGP if no one else is interested. You would go first or we would use middleman. SOLD
  18. String[] lootItems = {"Blue partyhat", "White partyhat"}; for(GroundItem item : getGroundItems().getAll()){ if(item != null && Arrays.asList(lootItems).contains(item.getName())){ log("Looted " + item.getAmount() + " " + item.getName() + "."); item.interact("Take"); new ConditionalSleep(3000, 4000){ @Override public boolean condition(){ return !item.exists(); } }.sleep(); } } Maybe I misinterpreted what you meant. Anyhow, you could also check their osbuddy price and loot if the val > const.
  19. I got you. I sent you a PM.
  20. PayPal me your ticket money, I got you.
  21. That's a lot of BS tho and doesn't really do much but get info and click some buttons. Also has no item selection or collection.
  22. private static Image getImage(String url) { try { return ImageIO.read(new URL(url)); } catch (IOException e) { } return null; }
  23. Hey, I needed to use the GE in one of my scripts so I came up with this. It's pretty basic but allows you to buy and sell different items at different prices and amounts, as well as collect Items. Currently it's only set up to use the first box but you could easily modify to suit your needs. GrandExchange.java: Lemon Version: Example Usage: public class Script extends org.osbot.rs07.script.Script{ private final String itemName = "Blue partyhat"; private final int itemPrice = 2147137627; private final int itemAmount = 500; @Override public int onLoop() throws InterruptedException { GrandExchange GE = new GrandExchange(this); //new GrandExchange instance with our script if (!getGrandExchange().isOpen()) { //Checks if ge is open GE.openGE(); //open ge randomly using booth or npc } else { GE.collectItems(false); //collect items (boolean true -> to bank, false -> inventory) GE.createBuyOffer(itemName, itemPrice, itemAmount); //creates a buy offer with specified params GE.createSellOffer(itemName, itemPrice, 0); //Sells all of the specified items in inventory at specified price ( 0 = all, int = specified amount) } return 150; } }
×
×
  • Create New...