omni4life Posted August 22, 2015 Share Posted August 22, 2015 (edited) Hey guys, I've made a few scripts now for personal use and what not and eventually I'd quite like to be decent enough to share it around on the SDN, but I've noticed I have the same issue in virtually all of the scripts. They all work perfectly fine right up until the moment I add my paint to the script at which point it usually executes 4/5's properly and get's jammed in a state. In this instance, my character cuts the logs fine, walks to the bank and gets stuck standing there in the WALK2BANK state constantly outputting "Walking to Bank" in the log. I just can't see my error and I'd absolutely love a second set of eyes. Code removed, thank you to all for assistance. Any and all feedback is appreciated, both on my in general code and my issue. I'm headed off to bed now so I'll check responses tomorrow. I hugely appreciate everyone's help in advance. Edited August 24, 2015 by omni4life Quote Link to comment Share on other sites More sharing options...
Joseph Posted August 22, 2015 Share Posted August 22, 2015 It's you area class make sure you set it up correctly. If you want get the area. Grab all its tiles. Then display the area on the screen. That's how I would do it. Or do a simple log check if you area within the area. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted August 22, 2015 Share Posted August 22, 2015 Perhaps the walking distance threshhold is messing with you. There's a default distance threshhold in the localwalker (idr what it is exactly) at which it wont try walking to the destination if you're within that accepted distance (6 tiles for example) To see if this is the problem, try manually lowering the distance threshhold. Eg. WalkingEvent wEvt = new WalkingEvent(bankPos); wEvt.setMinDistanceThreshhold(0); execute(wExt); In any case, it's not related to your paint 1 Quote Link to comment Share on other sites More sharing options...
Joseph Posted August 22, 2015 Share Posted August 22, 2015 Your script looks fine in general. The only thing is if you don't want to do so many skill calculations. You can use the experience tracker. It pretty much does all that except give you the start lvl nor the start exp. 1 Quote Link to comment Share on other sites More sharing options...
omni4life Posted August 23, 2015 Author Share Posted August 23, 2015 In any case, it's not related to your paint You're right, silly error. the localWalker walked me to the tile exactly beside the right side of the bank chest which I hadn't included in my bankArea so when the the banking state was checking for my player to be in bank area, it was never executed! Thank's for everyones help! Your script looks fine in general. The only thing is if you don't want to do so many skill calculations. You can use the experience tracker. It pretty much does all that except give you the start lvl nor the start exp. I'll toy around with that one when I get home this evening ! There are so many functions hidden away in the API I'm really struggling to know what to use and when. Thanks for the feedback! 1 Quote Link to comment Share on other sites More sharing options...