Ratchet 15 Share Posted December 18, 2016 My world hopper was working fine before (when I was using getWorlds().getRandomWorld(), but now I always get a null pointer exception and it won't hop worlds because the world is returning null. // Dwarf Cannon (World Hop) GameObject dwarfCannon = getGameObjects().closest("Dwarf multicannon"); if(dwarfCannon != null && !getLocalPlayer().isInCombat() && dwarfCannon.distance() <= 15 && getMap().canReach(dwarfCannon)){ Widget logoutTab = getWidgets().getWidget(182); Widget worldSwitcher = getWidgets().getWidget(69); state = 10; if(logoutTab == null || !logoutTab.isVisible()){ getTabs().openWithMouse(Tab.LOGOUT); sleep(1000,2000); } if(worldSwitcher == null || !worldSwitcher.isVisible()){ getWorldHopper().openWorldHopper(); sleep(1000,2000); } World e = getWorlds().getRandomWorld(w -> w !=null && !w.isDeadmanMode() && !w.isF2P() && !w.isHighRisk() && !w.isLastManStanding() && !w.isPVP() && w.isMembers() && !w.equals(getClient().getCurrentWorld()) && w.getID() != 353 && w.getID() != 366 && w.getID() != 373 && w.getID() != 349 && w.getID() != 361); log("GETWORLD"); log(e.toString()); if(!getLocalPlayer().isInCombat()){ getWorldHopper().hopWorld(e); sleep(Calculations.random(1000, 2000)); dwarfCannon = null; } } Link to comment Share on other sites More sharing options...
Pandemic 2675 Share Posted December 18, 2016 Checking it out That same filter isn't throwing any errors for me, it may be an issue loading the worlds. I'll write a check and release that later, for now just restart the client and try again. Link to comment Share on other sites More sharing options...
Ratchet 15 Author Share Posted December 18, 2016 Checking it out That same filter isn't throwing any errors for me, it may be an issue loading the worlds. I'll write a check and release that later, for now just restart the client and try again. Tried restarting the client and reloading the jar in eclipse and exporting again, but to no avail, it still returns null. Link to comment Share on other sites More sharing options...
Pandemic 2675 Share Posted December 18, 2016 I can confirm it is indeed broken, one of the private Scripts I wrote for someone does not seem to work for them while it works fine for me, we both restarded the Client and still same result. It must be an issue with the newly added automatically loading Worlds. This filter: w = getWorlds().all(f -> f.isMembers() && !f.isDeadmanMode() && !f.isPVP() && f.getMinimumLevel() == 0); does work fine for me and give me all the matching worlds while for the other guy my debugs state: [iNFO]13:42:02: @@UsingDreambot version: 1.301 //Just a print for me to know which version the Script is running on [iNFO]13:42:02: ~ HOP //State print [iNFO]13:42:02: ~ CURRENT WORLD: 302 //Current world [iNFO]13:42:02: ~ WORLD LIST SIZE: 0 //Size of the list from worlds to choose from (w) Causing this part of code: getWorldHopper().hopWorld(w.get(Calculations.random(w.size()))); to throw a NumberIsTooLargeException since you the lower bound which in this case is 0 must be strictly less than the upper bound(0 aswell since w has a size of 0 as you can see from the previous mentions) tl;dr: the automatic world loading thing probably causes the filter not to pick up worlds correctly So it works for you but not the other guy? Tried restarting the client and reloading the jar in eclipse and exporting again, but to no avail, it still returns null. Can you try printing getWorlds().all().size()? Link to comment Share on other sites More sharing options...
Pandemic 2675 Share Posted December 18, 2016 Can you check the console or run the client in cmd/terminal and see what exception it's throwing? (should happen on start) Link to comment Share on other sites More sharing options...
lilshrew420 0 Share Posted December 18, 2016 Best of luck wish I could help. Link to comment Share on other sites More sharing options...
TheHinges 10 Share Posted December 19, 2016 any updates on this? Link to comment Share on other sites More sharing options...
Pandemic 2675 Share Posted December 19, 2016 I'll be pushing a release soon that will make sure the worlds loaded properly (along with some logs so we can figure out the problem ) Link to comment Share on other sites More sharing options...
Ratchet 15 Author Share Posted December 19, 2016 I'll be pushing a release soon that will make sure the worlds loaded properly (along with some logs so we can figure out the problem ) Alright, Pandemic! Thanks for getting on it. What we do without you. Link to comment Share on other sites More sharing options...
Pandemic 2675 Share Posted December 19, 2016 any updates on this? Alright, Pandemic! Thanks for getting on it. What we do without you. Alright guys just released a hot fix, if you could restart your launchers to download the latest version, run the client and let me know what the first line of the debug console shows (should either say successfully loaded x worlds, or throw an error) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.