February 9, 20178 yr 3 questions i believe are fairly simple. First question: (Main reason for posting) How do i randomize my getWalking().webWalk? Every time my bot runs back from the bank to my "Area" that i have defined, he always stands on the same block upon reaching his destination. So how would i randomize this so that he always walks somewhere withing my defined area, but not to the same point every time? Second question being: when i level up, how do i get the bot to click continue instead of ignoring it and continuing it's grind? Third: Why is my onMessage not working? Tried several things and can't seem to get it to register at all. public void onMessage(String message) { if(message.contains("You get some willow logs.")) { itemsGained++; } } Edited February 9, 20178 yr by HexMurder
February 9, 20178 yr 1. afaik webwalk is randomized 2. if (getDialogues().isPendingContinuation()) getDialogues().clickContinue(); 3. onMessage parameter is a Message object, you need to get the string first. fyi it also has other useful info: getTime(), getType(), getTypeId(), getUsername() public void onMessage(Message m) throws InterruptedException { String message = m.getMessage(); }
February 9, 20178 yr 1 hour ago, Stimpack said: 1. afaik webwalk is randomized 2. if (getDialogues().isPendingContinuation()) getDialogues().clickContinue(); 3. onMessage parameter is a Message object, you need to get the string first. fyi it also has other useful info: getTime(), getType(), getTypeId(), getUsername() public void onMessage(Message m) throws InterruptedException { String message = m.getMessage(); } Also make sure to do a check to see if m != null as it does become null sometimes. Edited February 9, 20178 yr by Prozen
February 9, 20178 yr 1 hour ago, Prozen said: Also make sure to do a check to see if m != null as it does become null sometimes. good to know. curious, in which kinds of situations would this happen?