ItsPeaches 0 Posted June 9, 2017 New to scripting, cant seem to figure out the code to grab a random online player from my friends list, and send a random message from a list of predetermined messages. Any suggestions or pointers? thanks
Genius 50 Posted June 9, 2017 There is a friends class that you can use to check if someone is online, but not message. You could always use widgets - this should work for the first friend slot, but you would have to adapt it to message other people too. getTabs().openWithMouse(Tab.FRIENDS); sleepUntil(() -> getWidgets().getWidgetChild(429, 8, 2) != null, 3000); WidgetChild onlineFriend = getWidgets().getWidgetChild(429, 8, 2); if (onlineFriend != null && onlineFriend.getText().equals("Online")) { getWidgets().getWidgetChild(429, 8, 0).interact("Message"); sleep(250,1000); //type message and press enter }
ItsPeaches 0 Author Posted June 10, 2017 Awesome, thats what i was looking for, Thank you. And yes I'm trying to use it to make an antiban, not because i think it'll be effective necessarily, but because I want to try and see if I can implement a variety of different unique actions which could possibly be used in one, for practice purposes.
Genius 50 Posted June 10, 2017 Awesome, thats what i was looking for, Thank you. And yes I'm trying to use it to make an antiban, not because i think it'll be effective necessarily, but because I want to try and see if I can implement a variety of different unique actions which could possibly be used in one, for practice purposes. No problem! Go to Tools > Game Debugger > Widgets and mess around with 429 -> 8 -> ... and you will find what you need. =)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.