Jump to content

lrdblk

Lifetime Sponsor
  • Posts

    94
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by lrdblk

  1. Here is the code comboBox.setModel(new DefaultComboBoxModel<>(script.getTrees())); getting the warning right over the comboBox.setModel part
  2. I have a few questions about Java. When should I declare a method as "static"? I tried looking it up but I don't quite understand What does it mean when Intellij tells me I am making an "unchecked call"? At what point does it make more sense to create a separate class rather than use enum's If you need to see my script to make sense of any of the above questions, let me know and I'll post it Thanks for your help!
  3. Install java using this https://ninite.com/java8/ After the installation, reboot your computer and try running OSbuddy again
  4. post a picture of the error
  5. got it working, the issue was completly unrelated. fucked up my GUI constructor which was causing issues. for the record, both your solutions worked for me though. thanks for your help
  6. LMAO i may actually do that. Let's assume I want to learn something . Gonna have to use combobox eventually
  7. So I made a Combobox and added stuff to it like so... cmbBank = new JComboBox<>(); cmbBank.setModel(new DefaultComboBoxModel<>(new String[] { "YES", "NO" })); I want to convert the choice to a boolean. Start button code.. private void button1ActionPerformed(ActionEvent e) { script.setShouldBank(getSelection(cmbBank.getSelectedItem())); script.setShouldStart(true); //start script this.setVisible(false); } private boolean getSelection(Object o){ if(o.toString().equalsIgnoreCase("yes")){ return true; } return false; } Error that I'm getting ERROR][01/18 03:29:45 PM]: Uncaught exception! java.lang.NullPointerException at GuiMain.cmbBankActionPerformed(GuiMain.java:36) at GuiMain.lambda$initComponents$0(GuiMain.java:65) at javax.swing.JComboBox.fireActionEvent(Unknown Source) at javax.swing.JComboBox.setSelectedItem(Unknown Source) at javax.swing.JComboBox.setSelectedIndex(Unknown Source) at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) What am I doing wrong? Or is there a better way to do this
  8. lrdblk

    PC Main Acc

    Jesus Christ that's heavy lol First time i ever saw evidence actually posted haha
  9. That's not the only thing of his that's huge...
  10. any idea why I get this error in the bot debugger when I reload the script selector ? ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/AugmentContainerGhostingTask.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/AugmentIconGhostingTask.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/AugmentMainTask.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/AugmentTask.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/AugmentUpdateTask.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/ContainerGhostingAugmenter$AugmentClassAdapter.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/ContainerGhostingType.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/IconGhostingAugmenter$AugmentClassAdapter.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/IconGhostingType.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/InfoClassVisitor.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/LafMainClassAugmenter$AugmentClassAdapter.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/UiDelegateAugmenter$AugmentClassAdapter.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/UiDelegateType.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/UiDelegateUpdateAugmenter$AugmentClassAdapter.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/UiDelegateWriterEmptyCtr.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : org/pushingpixels/lafwidget/ant/UiDelegateWriterOneParamCtr.class [ERROR][01/17 02:47:09 PM]: Failed to load local script : com/thoughtworks/xstream/converters/reflection/CGLIBEnhancedConverter$ReverseEngineeredCallbackFilter.class
  11. Yes IP address. Do you know for sure you are IP banned though? Odds are your account is just banned Call you ISP to get a new IP address. Or unplug your modem and plug it back in after 5 min (sometimes works sometimes doesn't)
  12. So that's actually 2 things... MAC address or IP address, to which are you referring ?
  13. Thanks for your input, super useful! I'm actually in the process of doing a lot of what you said I understand your point on States but decided to use them as an intermediary step before learning how to separate in different classes Can anyone tell me why this is throwing any error? private void depositBank(){ log("banking!"); if(!getBank().isOpen()){ getBank().open(); sleep(3000, 500, () -> getBank().isOpen()); }else{ getBank().depositAll(); } } Error:(134, 27) java: unreported exception java.lang.InterruptedException; must be caught or declared to be thrown on getBank().open
  14. Interesting, thanks for the right up!
  15. Thanks for the pointers. What's the difference between boolean and Boolean? If Java doesn't care, why should I? Oh shit that is handy, thanks for the help! Deviation is basically saying +/- 200 ms right?
  16. Thanks I appreciate your input! Good call on commenting the shit out of the code. I'll probably forget everything I did by morning lol Can you give me an example of what your talking about regarding the CSleep?
  17. Hey everyone! Just getting back into java, mostly looking for feedback on this wood cutting script I wrote. Any productive criticism is welcome. import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; @ScriptManifest(author = "LRDBLK", info = "Chops wood", name = "Wood Chopper", version = 1, logo = "") public class main extends Script { @[member=Override] public void onStart() { log("Script is starting!"); } @[member=Override] public int onLoop() throws InterruptedException { Area lumbridgeTrees = new Area(3176, 3238, 3200, 3207); if(inventory.isFull()){ inventory.dropAll(); } if (!lumbridgeTrees.contains(myPlayer())){ log("walking to area now"); getWalking().webWalk(lumbridgeTrees.getRandomPosition()); }else{ RS2Object tree = getObjects().closest(lumbridgeTrees, "Tree"); chopTree(tree); } return random(200, 300); } @[member=Override] public void onExit() { log("RawR"); } @[member=Override] public void onPaint(Graphics2D g) { } private Boolean ableToWork(){ return !myPlayer().isAnimating() && !myPlayer().isMoving(); } private void chopTree(RS2Object tree){ if(tree != null && ableToWork()){ log("Picked new tree!"); tree.interact("Chop down"); } new ConditionalSleep(3000){ public boolean condition(){ return myPlayer().isAnimating(); } }.sleep(); } } A few questions I had: If i make a GUI, should it be in a separate class? Am I using ConditionalSleep correctly? Would using States make this script better? If I have a complex script, should I put all my functions in a separate module?
  18. lrdblk

    PC Main Acc

    That's gotta be worth some money. Botted?
  19. PM me if you need any help. Working in the IT industry, I've basically used all the modems and routers on the market now
  20. Two options Turn the modem to bridge mode and let your router handle all DHCP and traffic QOS Turn the DHCP off on the router and let the modem do all the networking Or there's a physical issue with your old router
  21. Thanks! completely missed the whole top bar lol
  22. Is there any way to save setting for next run?
×
×
  • Create New...