Big Buddha 6 Posted July 8, 2016 So I'm making a script for the wildy. I tele'd to Corporal Beast, went outside of the cave and then... I want to walk all the way up north. But for some reason my player doesn't move at all. Doesn't getWalking().walk() go to any tile you want with web walking? I've also tried alternatives like: getWalking().walk(getWalking().getAStarPathFinder().calculate(Tile, Tile).closest()) ^ This one worked out for a few seconds but then it got stuck clicking the same tile over and over. I think it's because the next tile he wanted to go to might've been in an area that didn't load yet. Like when you're walking and you see a black area ahead and then it loads for a few secs. I'm totally lost atm. I'm stuck dividing the wilderness into multiple area's and putting them into my statements. halp?
Mohammed 21 Posted July 8, 2016 I don't think its added to the web. So or you try to add it to the web or use local pathing.
TechTaco 23 Posted July 8, 2016 Make an area at the spot you want to go to, or general location, and use this. You can also implement some stuff you want it to do while it's walking like a chance to move camera, etc: do { getWalking().walk(area.getRandomTile()); sleep(Calculations.random(3000, 4000); } while(!area.contains(getLocalPlayer()); I was a little confused on your question, but I think that's what your looking for.
Pandemic 2842 Posted July 8, 2016 The web walker will only walk if it can find a path using our web. I don't think much of the wilderness is mapped, so you'll have to make your own path
Dreamlicker 750 Posted July 8, 2016 imo the best way to solve this is just to do this if (getLocalPlayer().getY() < placeYoureGoing) { Tile walkTile = getLocalPlayer().getTile().translate(RAND_-5_TO_5, RAND_0_TO_15); walk(walkTile); } you'll just travel in a random cone shape above you til you get there and can path to it b/c its loaded in the region
Big Buddha 6 Author Posted July 9, 2016 imo the best way to solve this is just to do this if (getLocalPlayer().getY() < placeYoureGoing) { Tile walkTile = getLocalPlayer().getTile().translate(RAND_-5_TO_5, RAND_0_TO_15); walk(walkTile); } you'll just travel in a random cone shape above you til you get there and can path to it b/c its loaded in the region but if it goes cone shape, couldn't it go to like my destination but then 100 tiles west of it? Ending up in not being able to go to that final destination...I'll try it when I'm sober though, thanks for the code The web walker will only walk if it can find a path using our web. I don't think much of the wilderness is mapped, so you'll have to make your own path Do you think this is a good method or do I use something else? if(WILDERNESS1.contains(getLocalPlayer()) && !DRAG_GATE.contains(getLocalPlayer())){ if(!(getPlayers().closest(player -> player != null && !player.equals(getLocalPlayer()) && player.distance() < 12) == null)){ getWorldHopper().quickHop(getRandom(worlds)); sleep(300,500); } getWalking().getAStarPathFinder().calculate(BEAST_TILE, WILDY1).walk(); sleepUntil(new Condition(){ public boolean verify(){ return !getLocalPlayer().isMoving(); } },Calculations.random(2000,3000)); } ^I repeat this code for WILDERNESS1(+1) = Area(... , WILD1(+25)) etc. until I reach my destination. Probably not, I feel like this is some really sloppy java on my part but I just implemented it at 5AM when I was like "fuck it I just want this thing to work, ban rate or not) Make an area at the spot you want to go to, or general location, and use this. You can also implement some stuff you want it to do while it's walking like a chance to move camera, etc: do { getWalking().walk(area.getRandomTile()); sleep(Calculations.random(3000, 4000); } while(!area.contains(getLocalPlayer()); I was a little confused on your question, but I think that's what your looking for. I think you should read my topic again. while is very old school imo and I don't think you fully understand my intentions. I'll come back to you when I'm sober. Thanks for sticking up with me though, if you ever need some extreme noob help with your tutorial islander intro script... I might give you some input of the same value
Dreamlicker 750 Posted July 9, 2016 but if it goes cone shape, couldn't it go to like my destination but then 100 tiles west of it? Ending up in not being able to go to that final destination...I'll try it when I'm sober though, thanks for the code Do you think this is a good method or do I use something else? if(WILDERNESS1.contains(getLocalPlayer()) && !DRAG_GATE.contains(getLocalPlayer())){ if(!(getPlayers().closest(player -> player != null && !player.equals(getLocalPlayer()) && player.distance() < 12) == null)){ getWorldHopper().quickHop(getRandom(worlds)); sleep(300,500); } getWalking().getAStarPathFinder().calculate(BEAST_TILE, WILDY1).walk(); sleepUntil(new Condition(){ public boolean verify(){ return !getLocalPlayer().isMoving(); } },Calculations.random(2000,3000)); } ^I repeat this code for WILDERNESS1(+1) = Area(... , WILD1(+25)) etc. until I reach my destination. Probably not, I feel like this is some really sloppy java on my part but I just implemented it at 5AM when I was like "fuck it I just want this thing to work, ban rate or not) I think you should read my topic again. while is very old school imo and I don't think you fully understand my intentions. I'll come back to you when I'm sober. Thanks for sticking up with me though, if you ever need some extreme noob help with your tutorial islander intro script... I might give you some input of the same value Then alter the values to alter the path of travel Feast your eyes on my beautiful paint skills. The green is the cone of travel. Yellow is the tiles you can travel by making the x value in the translate minimum of 0, only making you travel up and east. https://gyazo.com/e3742a203d3013dcc8ebea8407828990
Hopewelljnj 46 Posted July 9, 2016 If necessary you can get the direction as a "slope" of north/east or w/e and then walk with local paths in that general direction.
Big Buddha 6 Author Posted July 9, 2016 Then alter the values to alter the path of travel Feast your eyes on my beautiful paint skills. The green is the cone of travel. Yellow is the tiles you can travel by making the x value in the translate minimum of 0, only making you travel up and east. https://gyazo.com/e3742a203d3013dcc8ebea8407828990 Now that I'm sober this makes alot of sense. I can see clear now! Thanks man, I'll play around with this a bit.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.