dot_b0T Posted December 2, 2017 Share Posted December 2, 2017 Hello guys, currently working on a script that is taking place inside of the mm II tunnels. The problem I'm having is that I simply can't make the damn char walk back n forth between 2 tiles that are next to each other. I've tested the script on other places(just swapped x,y coordinates) and it works just fine. I've tried making my own paths and aswell tried using both Positions as well as Areas. and I've also tried walk(..), webWalk(..), walkPath(..). It's just inside these tunnels that I cant make it work. How can I solve this? Quote Link to comment Share on other sites More sharing options...
Chris Posted December 2, 2017 Share Posted December 2, 2017 because walkevent default is 2 make a new walkevent and make it 0 so it walks Quote Link to comment Share on other sites More sharing options...
dot_b0T Posted December 2, 2017 Author Share Posted December 2, 2017 2 minutes ago, Chris said: because walkevent default is 2 make a new walkevent and make it 0 so it walks Ahh ok, have managed to get away with only using the most basic webwalking in the past. Tried this and it worked wonders. Thanks a lot man for quick reply! Quote Link to comment Share on other sites More sharing options...
Apaec Posted December 2, 2017 Share Posted December 2, 2017 You don't really need a webwalking event for this, it's two tiles fgs!! Quote Link to comment Share on other sites More sharing options...
TheWind Posted December 3, 2017 Share Posted December 3, 2017 Just use a WalkingEvent Quote Link to comment Share on other sites More sharing options...
dot_b0T Posted December 3, 2017 Author Share Posted December 3, 2017 (edited) never said I did? Just pointed out that I never had to use walkingEvent in the past and gotten away with using very simple webwalking in my previous scripts! not sure if I'm doing it the optimal way though but at least it works now! WalkingEvent tile1 = new WalkingEvent(TILE_ONE); tile1.setOperateCamera(false); tile1.setEnergyThreshold(20); tile1.setMinDistanceThreshold(0); getBot().getEventExecutor().execute(tile1); Edited December 3, 2017 by dot_b0T 1 Quote Link to comment Share on other sites More sharing options...
The Undefeated Posted December 3, 2017 Share Posted December 3, 2017 22 minutes ago, dot_b0T said: never said I did? Just pointed out that I never had to use walkingEvent in the past and gotten away with using very simple webwalking in my previous scripts! not sure if I'm doing it the optimal way though but at least it works now! WalkingEvent tile1 = new WalkingEvent(TILE_ONE); tile1.setOperateCamera(false); tile1.setEnergyThreshold(20); tile1.setMinDistanceThreshold(0); getBot().getEventExecutor().execute(tile1); There is some unnecessary code in there. Why setting OperateCamera to false? Why set an energy threshold? This should work fine: WalkingEvent event = new WalkingEvent(TILE_ONE); event.setMinDistanceThreshold(0); getBot().execute(event); Quote Link to comment Share on other sites More sharing options...
Chris Posted December 3, 2017 Share Posted December 3, 2017 25 minutes ago, dot_b0T said: never said I did? Just pointed out that I never had to use walkingEvent in the past and gotten away with using very simple webwalking in my previous scripts! not sure if I'm doing it the optimal way though but at least it works now! WalkingEvent tile1 = new WalkingEvent(TILE_ONE); tile1.setOperateCamera(false); tile1.setEnergyThreshold(20); tile1.setMinDistanceThreshold(0); getBot().getEventExecutor().execute(tile1); 3 we have a execute() method execute(Event event); execute(tile1); 2 minutes ago, The Undefeated said: There is some unnecessary code in there. Why setting OperateCamera to false? Why set an energy threshold? This should work fine: WalkingEvent event = new WalkingEvent(TILE_ONE); event.setMinDistanceThreshold(0); getBot().execute(event); maybe he doesnt want it to move the camera? what if he wants it to start running @ 20 run? Quote Link to comment Share on other sites More sharing options...
dot_b0T Posted December 3, 2017 Author Share Posted December 3, 2017 (edited) hmm for some reason it wont walk at all anymore after a few changes. it prints the 1,2,3 in log so idk whats up now. huh NVM: got it working as it's supposed now. just a typo Quote Edited December 3, 2017 by dot_b0T Quote Link to comment Share on other sites More sharing options...
The Undefeated Posted December 3, 2017 Share Posted December 3, 2017 (edited) 50 minutes ago, Chris said: we have a execute() method execute(Event event); execute(tile1); maybe he doesnt want it to move the camera? what if he wants it to start running @ 20 run? He said ithas to walk 2 tiles, why bother adding code like that for 2 tiles? Edited December 3, 2017 by The Undefeated Quote Link to comment Share on other sites More sharing options...
dot_b0T Posted December 3, 2017 Author Share Posted December 3, 2017 1 hour ago, The Undefeated said: He said ithas to walk 2 tiles, why bother adding code like that for 2 tiles? it is moving diagonally around a corner, which means it travels past another square so it has time to start running in-game, and since this action is repeated a lot i wanted to manage the run energy somewhat so that's why I have that added in there! Also i prefer to have full control over the camera. for this script it wouldn't make a lot of sense to have the camera move much. so I just handled the few camera actions I needed manually. Quote Link to comment Share on other sites More sharing options...
IDontEB Posted December 3, 2017 Share Posted December 3, 2017 Why not just use MainScreenTileDestinations and just click the tile since it's only two squares away? Quote Link to comment Share on other sites More sharing options...
Alek Posted December 3, 2017 Share Posted December 3, 2017 52 minutes ago, IDontEB said: Why not just use MainScreenTileDestinations and just click the tile since it's only two squares away? WalkingEvent will do that, however that solution also works. Quote Link to comment Share on other sites More sharing options...
dot_b0T Posted December 3, 2017 Author Share Posted December 3, 2017 5 hours ago, Alek said: WalkingEvent will do that, however that solution also works. yep worked fine using walkingEvent 6 hours ago, IDontEB said: Why not just use MainScreenTileDestinations and just click the tile since it's only two squares away? I found out about that method while I was looking around, from what I understand it works best when there are no items and npcs covering the tile? since your just sending a mouse click with that. not sure though Quote Link to comment Share on other sites More sharing options...