Jump to content

Why do my scripts get stuck in a state after I add paint?


omni4life

Recommended Posts

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 by omni4life
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

 

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!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...