Jump to content

Adding custom random event solver?


darkxor

Recommended Posts

For example, I want to add Pickaxe Head random solver for mining. How can I do this?

 

I wrote PickaxeHead class extends RandomSolver.

BUT: what RandomEvent to specify within its constructor?

I already have RandomEvent.OTHER used for other random solver. Adding 2 solvers with same RandomEvent.OTHER type seems be broken. Any ideas?

 

Thanks,

darkxor.

Link to comment
Share on other sites

You could do something like:

 

if(pickaxeHead.isVisible()){

 

//walk to it and pick it up

 

}

 

Something along those lines where it runs a check everytime you go through to see if the head is visible, and if it is, then you go and pick it up.  This would be a kind of quick-fix until the Devs are able to update the client

 

  • Like 1
Link to comment
Share on other sites

If you lose pick head you always stuck with a stick. You could walk look to see if your wear the stick or have stick in inventory. Since there like 7 different heads bronze iron steel....etc.

Pre loop make sure you have inv space.

Regular Loop, pick up and attach the head.

Post loop pick up any item you dropped. Re-equipe if it was wielding it before.

Link to comment
Share on other sites

No need to write it as a random solver, just every time you initiate your onLoop check if you're wearing a pickaxe handle / check the loaded area for the designated pickaxe head.

 

I guess you could write it as a random solver but it just seems like extra effort. If you really need something asyncronous just drop a check in your onPaint, lol.

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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