Jump to content

Deathwalk regearing


Criboo

Recommended Posts

Hello all

I've made a script which occasionally dies!  This isn't an issue, but what is an issue is that I can't figure out an effective way to regear, other than to specify in the deathwalk state to enter bank and withdraw the specified items that the character I used to test the deathwalking uses.  

This is an issue as I want to use different gear at different levels (ie, not use the same gear on all my accounts), but if the gear my test account used isn't in the bank it gets stuck.

So, I need to know how to get the script to check my gear when I turn the bot on, and then remember that gear should it die and need to regear.

Could anyone give me a few pointers as to how to go about this?

Thanks

Chris

Link to comment
Share on other sites

Jamie

Thanks for your help.  I had started figuring it out by the time you got back to me.  My issue more is how to cache it, not the understanding that I need to.  

The way I have done it is not strictly caching, I think, but seems to work.  I am grabbing the name of each piece of gear in my onStart, and storing that as a string in my public class Main extends Script { section.  On death I'll open the bank, deposit all and withdraw each item, which should be defined when the script starts.

Any obvious flaw with that method of doing it?

 

 

Link to comment
Share on other sites

On 5/26/2018 at 9:38 PM, Cloxygen said:

you can do it with an array of strings and just store the names of each object or you can use a linked list and store the items as rs2objects. I would probably just store the names. You also need a case if you run out of items in the bank, like end the script or buy more items from the ge.

Thanks for getting back to me.  I have found a workable method which has not yet failed me, so I'm pleased with it as is.  I'll try and condense/tidy it next time I need to implement it.  I have added a stop script feature, but not tested it as I have plentiful supplies in the bank :)

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...