Jump to content

Mushphang

Members
  • Posts

    24
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

1152 profile views

Mushphang's Achievements

Bronze Poster

Bronze Poster (2/10)

2

Reputation

  1. That did it! Thank you so much for your help, you have no idea how much confusion you cleared up.
  2. so something like this? public void onStart() { log("test1"); Tester g = new Tester(this); } edit: oh didn't see your edit, but that did it! much appreciated! I declared the public Tester Test = new Tester(this); at a global level versus on start, not sure if that's an issue there at all.
  3. Hi everyone, sorry for the noob question. But I'm simply trying to get other classes to work from the main class. I can't figure out what I'm doing wrong.. Once the code runs it thows an error when trying to send a log in the Tester class. Main: public Tester g = new Tester(); public String stateT; @Override public void onStart() { log("test1"); } private enum State { TEST, WAIT }; private State getState() { if (1 == 1) return State.TEST; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case TEST: log("test2"); g.logTest(); case WAIT: break; } return random(200, 300); } @Override public void onExit() { log(""); } @Override public void onPaint(Graphics2D g) { } } Tester Class: public class Tester { private MethodProvider ggg; public Tester(MethodProvider ggg) { this.ggg = ggg; } public Tester() { } public void logTest() { ggg.log("test222222222222"); NPC rGuide = ggg.npcs.closest("RuneScape Guide"); ggg.log(rGuide); } } Thanks in advance for any help!
  4. Hi I can't seem to get walking.walk to move exactly one tile like I want it to. I can't find any other posts on this, so sorry for the nooby question(??). It seems to work just fine when moving 4+ tiles Thanks in advance for the help! Position oneTile = new Position((myPlayer().getX() + 1), myPlayer().getY(), myPlayer().getZ()); walking.walk(oneTile);
  5. Hi all, I've already contacted Maldesto and haven't gotten a response yet. So I'm posting here in hopes of getting some help. I will be messaging Dex, & Solution after. So last month I bought a months worth of VIP, looking at the wrong guide (on the forums) it told me to just cancel the membership through the site to avoid re-charging (whilst still receiving VIP benefits). Unknowingly, I canceled my membership on the site through the client area right after buying VIP, resulting in me losing my benefits. To fix this, one of your mods changed my status on the forums. I just got recharged on paypal (which is fine, was going to buy another months worth) but I lost my VIP status on the forums. I hope by the time this issue is resolved I will be re-credited the days lost (recharged 1/12/17). Proof of payment: (will send upon request to staff) Thanks, Mushphang
  6. Well everyone.. I've spent hours tonight on this. Problem is solved. I literally was right click testing the gui in eclipse on the design preview. It didn't come across my mind (still being new to java) that apparently the action listeners don't do anything on the preview.. After officially testing on osbot it works just find :^). Me:
  7. Tried this and no luck again, made a fresh class file on another script. This is the code and still doesn't disable the other checkbox import javax.swing.JCheckBox; import javax.swing.JFrame; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; public class SettingsGUI { public static void Window(main m) { JFrame jFrame = new JFrame("Curtidor"); jFrame.setSize(261, 419); jFrame.setResizable(false); jFrame.getContentPane().setLayout(null); JCheckBox chckbxNewCheckBox = new JCheckBox("New check box"); chckbxNewCheckBox.setBounds(40, 75, 97, 23); jFrame.getContentPane().add(chckbxNewCheckBox); JCheckBox chckbxNewCheckBox_1 = new JCheckBox("New check box"); chckbxNewCheckBox_1.setBounds(40, 146, 97, 23); jFrame.getContentPane().add(chckbxNewCheckBox_1); jFrame.setVisible(true); chckbxNewCheckBox.addItemListener(new ItemListener() { @[member=Override] public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { chckbxNewCheckBox_1.setEnabled(true); } else { chckbxNewCheckBox_1.setEnabled(false); } } }); } }
  8. Haha all good, and still no luck. Could it be possible it has something to do with the main start button action listener? Does it matter what order the listeners are in? O lord, checking now. I can't seem to find anything.. What do you specifically mean?
  9. Doesn't work for some reason Tried multiple things in the 2 + hours I spent on this.
  10. Thanks for your quick response. I'm still new to this whole GUI thing so I'm easily confused here. This is my whole GUI class. http://pastebin.com/ji1gyg6N and what it looks like: http://puu.sh/t1mZK/f11021eade.png It's probably setup odd (first gui) but has worked well for me up until this point.
  11. Sadly have spent about 2 hours trying to get a check box in my gui to disable other options. Basically what I need it to do is, If checkbox is enabled, enable the spinner. Here's the code I have: chckbxAutoGE.addItemListener(new ItemListener() { @[member=Override] public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED){ spinnerHides.setEnabled(true); } if(e.getStateChange() == ItemEvent.DESELECTED){ spinnerHides.setEnabled(false); } } }); any help is highly appreciated.
  12. If you still haven't found your solution add a log message in there to help you debug the issue. try throwing a log("Amount of gold bars to buy: " + barsToBuy); in between the the bars to buy and and grand exchange. Also maybe ttry this code instead of getGrandExchange() grandExchange.buyItem(2357, "Gold bar", 100, (int) barsToBuy); might have to code in opening the GE first (not 100% sure) but run it with that and see what it gives ya.
  13. Will test it out! Thanks So far so good, can't believe I was stumped on it for so long when it was that easy of a fix. Got so fixated on !myPlayer.isMoving() I guess.
×
×
  • Create New...