aliendude44 Posted January 17, 2016 Share Posted January 17, 2016 Nice, gl, this will be helpful to some people. Quote Link to comment Share on other sites More sharing options...
Joseph Posted January 17, 2016 Share Posted January 17, 2016 return list.isEmpty() ? null : list.get(random(list.size())); I meant I couldn't find the random method. But then I remember about method provider Quote Link to comment Share on other sites More sharing options...
Nora Posted April 19, 2016 Share Posted April 19, 2016 (edited) Why? Edited April 19, 2016 by Nora Quote Link to comment Share on other sites More sharing options...
FrostBug Posted April 19, 2016 Author Share Posted April 19, 2016 Why? Why what? Can't really tell, but if those are error underlines, be sure to import the methods from MethodProvider import static org.osbot.rs07.script.MethodProvider.random; 1 Quote Link to comment Share on other sites More sharing options...
The Hero of Time Posted April 19, 2016 Share Posted April 19, 2016 Why what? Can't really tell, but if those are error underlines, be sure to import the methods from MethodProvider import static org.osbot.rs07.script.MethodProvider.random; or parent.random(x); Quote Link to comment Share on other sites More sharing options...
FrostBug Posted April 19, 2016 Author Share Posted April 19, 2016 (edited) or parent.random(x); Referencing static methods thru an object instance ? Surely you jest Edited April 19, 2016 by FrostBug 3 Quote Link to comment Share on other sites More sharing options...
progamerz Posted July 2, 2016 Share Posted July 2, 2016 Referencing static methods thru an object instance ? Surely you jest How can i make it hop to a specified World? Thanks, Progamerz Quote Link to comment Share on other sites More sharing options...
FrostBug Posted July 2, 2016 Author Share Posted July 2, 2016 How can i make it hop to a specified World? Thanks, Progamerz You'll have to modify it for that. Quote Link to comment Share on other sites More sharing options...
Rickynaut Posted July 8, 2016 Share Posted July 8, 2016 Thank you very much! Very useful snippet. Used in my first script ^^ 1 Quote Link to comment Share on other sites More sharing options...
awssupport Posted September 27, 2017 Share Posted September 27, 2017 I'm having a lot of problems figuring out exactly what I need to import for this to function. Could someone paste their imports so that I can figure out where I am going wrong? I went through each error and tried to find the corresponding imports through searching the suggested imports, searching the api, and googling but I believe I'm missing a couple still. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted September 27, 2018 Author Share Posted September 27, 2018 Updated for 28/09/2018 game update Quote Link to comment Share on other sites More sharing options...
DylanSRT Posted October 1, 2018 Share Posted October 1, 2018 On 9/27/2018 at 6:00 PM, FrostBug said: Updated for 28/09/2018 game update Nice bug! I assume this was made to work with mirror mode too? I had been using a very simplistic hopper which couldn't even scroll but could hop to same 12 worlds over and over based on what was visible. Will definitely give this a go. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted October 1, 2018 Author Share Posted October 1, 2018 35 minutes ago, cooldoruk60 said: Nice bug! I assume this was made to work with mirror mode too? I had been using a very simplistic hopper which couldn't even scroll but could hop to same 12 worlds over and over based on what was visible. Will definitely give this a go. It interacts with the scroll widgets, so it's fine in mirror Was made back when world-switcher was first added to the game, before it was added into the OSBot API. These days I'd probably just recommend using the standard API Quote Link to comment Share on other sites More sharing options...
DylanSRT Posted October 1, 2018 Share Posted October 1, 2018 1 hour ago, FrostBug said: It interacts with the scroll widgets, so it's fine in mirror Was made back when world-switcher was first added to the game, before it was added into the OSBot API. These days I'd probably just recommend using the standard API I've had issues with scrolling in mirror mode in the past and worldHopper definitely never worked due to that. Maybe they fixed though not sure. Quote Link to comment Share on other sites More sharing options...
Camaro Posted December 16, 2018 Share Posted December 16, 2018 (edited) This doesnt seem to want to switch to an F2P world... cant seem to figure out why Edit: sorry, realized that my world list was not organized correctly. Ordering it by world number fixed this Edited December 16, 2018 by camaro 09 Quote Link to comment Share on other sites More sharing options...