PDA

View Full Version : [ProjectRS06] Catherby Cooker



Janus
02-11-2013, 06:56 AM
VERSION 4.2 IS OUT, BE SURE TO DOWNLOAD IT!


YOU MUST HAVE THE P06 SRL INCLUDES INSTALLED FOR THIS SCRIPT TO WORK, INSTRUCTIONS ON HOW TO DO THIS CAN BE FOUND HERE!

http://villavu.com/forum/showthread.php?t=95916

Thanks to Danny and the team for that!


Here's the first release of my new Catherby cooker and banker! It simply withdraws the fish you want to cook, walk to the range, cook the fish, deposits the cooked (and burnt) fish and repeats! There aren't any static co-ords so I am sure the script will be able to function for a long amount of time (perfect for the 10k+ lobs I have to cook!) I have included a lot of fail-safes too to ensure it only progresses onto the next procedure when ready to.


INSTRUCTIONS FOR USE:

Ensure you have downloaded and installed the P06 SRL Includes via the link given above.
Start at Catherby Bank with a full or empty inventory (Doesn't matter which one)
Ensure your brightness is set to the maximum setting.
Ensure the fish you want to cook are in the first slot in your bank.
Ensure the color of the fish you are wanting to cook has been inserted into the field at the beginning of the script using the color picker.
The script is set up for lobsters currently but if it's not working for you simply re-pick the color of the lobster and insert it into the script.
The rest will be done for you! (Angle and compass are set via the script)



UPDATES:

Added numerous checks to see if player is logged out and attempts to re-log and continue script.
Replaced bitmaps for right clicks with p06_choosemultioption as recommended by DannyRS!
Tweaked and improved various failsafes and status updates.
12/feb - Fine tuned various procedures, added progress update and moved writeln to status updates instead!
13/feb - Tweaked a few failsafes
Few Modifications




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Script Running, thanks for using it!
Time Running : 5 Hours, 9 Minutes and 53 Seconds
Completed Runs : 151
Fish Cooked : 4228
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DannyRS
02-11-2013, 10:37 AM
Nice release, I just had a look, are you using bitmaps for the right clicked options?

You could try this, it should work for all right click stuff, and I think the text is 100% accurate on the menu, as it's all one color


P06_ChooseOptionMulti(['Withdraw All','All']); //is there a - between the words?


You might want to add exit's to your loops if you disconnect, and maybe add the loginplayer Include,


If (Not P06_LoggedIn) Then
Exit;


Then have something in the outer loop like this


If (Not P06_LoggedIn) Then
P06_LogInPlayer;


Example of how to include and set up login at the end of the Include thread OP, also if you make it like that, script must be able to be started anywhere along the loop, so it will work after logging back in,

One more thing, make compass functions will not work/cause problems/maybe endless loops, if the mouse cursor is not over the game window, Because keyboard keys are not sent unless you have focus of the window, ActivateClient may fix that for the jar client, but not for the web browser application :p, Idk, can you test and tell me if it works for the client, if not then leave a Reply on the Include thread and I'll make compass functions check the cursor is in the window before trying to rotate

Janus
02-11-2013, 04:17 PM
Nice release, I just had a look, are you using bitmaps for the right clicked options?

You could try this, it should work for all right click stuff, and I think the text is 100% accurate on the menu, as it's all one color


P06_ChooseOptionMulti(['Withdraw All','All']); //is there a - between the words?


You might want to add exit's to your loops if you disconnect, and maybe add the loginplayer Include,


If (Not P06_LoggedIn) Then
Exit;


Then have something in the outer loop like this


If (Not P06_LoggedIn) Then
P06_LogInPlayer;


Example of how to include and set up login at the end of the Include thread OP, also if you make it like that, script must be able to be started anywhere along the loop, so it will work after logging back in,

One more thing, make compass functions will not work/cause problems/maybe endless loops, if the mouse cursor is not over the game window, Because keyboard keys are not sent unless you have focus of the window, ActivateClient may fix that for the jar client, but not for the web browser application :p, Idk, can you test and tell me if it works for the client, if not then leave a Reply on the Include thread and I'll make compass functions check the cursor is in the window before trying to rotate

Indeed I was using bitmaps for the right clicks, I never knew that other function was there so thanks for letting me know. I replaced all the bitmaps with this function and it seems to be working perfectly!

I added various login checks to almost every loop and it seems to be working smoothly by logging back in and continuing the script: Albeit a little inefficiently as sometimes it will complete an action that has already been done BUT it still manages to continue with the script which was my main aim. For example after logging out/back in it may run to the range to get ready to cook fish despite there already being a full inventory of cooked fish, it will simply get to the range, realise there is nothing raw to cook and run back to the bank and start again. There are probably a few cases like this but they aren't that important for me to iron out at the minute since they only waste a few seconds. Apologies for the scruffy additions to the script as they don't look very pretty and i'm not even sure I am using things right, I imagine a lot of it could be done a lot better in simpler ways however this is all learning for me and I enjoy it!

As for the activate client function it seems to be working fine for me using the jar file. I also made it attempt to click the inventory tab before it sorts the angle and compass out to ensure it has clicked on the client for people using the webclient, is that okay?

Thanks for your help and advice though I really appreciate it.

persecuted
02-12-2013, 06:42 PM
Error] C:\Simba\Scripts\JanusCatherbyCookerV3.simba(81:11 ): Duplicate identifier 'P06_DECLAREPLAYER' at line 80
Compiling failed.

Janus
02-12-2013, 07:06 PM
Error] C:\Simba\Scripts\JanusCatherbyCookerV3.simba(81:11 ): Duplicate identifier 'P06_DECLAREPLAYER' at line 80
Compiling failed.

Hmm I don't get this error, do you have the latest pr06 includes installed and have you entered your username and password into the script?

I think you just need to re-download and install the pr06 includes.

voltag00
02-13-2013, 02:31 AM
Sorry for the lack of information, but this script didn't work for me. Ran once for like 1 min. And the script miss licked outside of the cooking place and couldn't recover. And yes I have all the includes, etc. and I started it right like you said

Janus
02-13-2013, 03:03 AM
Sorry for the lack of information, but this script didn't work for me. Ran once for like 1 min. And the script miss licked outside of the cooking place and couldn't recover. And yes I have all the includes, etc. and I started it right like you said

I've never had this problem and i've run the script for 17 hours collectively.
Do you know if it miss-clicked when trying to walk to the range with the mini-map or if it miss-clicked when clicking on the range to cook the lobs? I'd love to get this sorted for you. Does the compass set itself to north and is the screen angle changed automatically when you start the script?

voltag00
02-13-2013, 03:12 AM
I've never had this problem and i've run the script for 17 hours collectively.
Do you know if it miss-clicked when trying to walk to the range with the mini-map or if it miss-clicked when clicking on the range to cook the lobs? I'd love to get this sorted for you. Does the compass set itself to north and is the screen angle changed automatically when you start the script?

Thanks. I'm not sure. I'm currently mining right now, but when I cook again I'll let you know.

Janus
02-13-2013, 03:18 AM
Thanks. I'm not sure. I'm currently mining right now, but when I cook again I'll let you know.

Okay thanks, just so you know I set the script up to update the status bar on the bottom of the simba window with whatever the script is attempting to do at that current time so it would be nice to know what is says in there before the script stops working for you. I've tweaked the script again and will be uploading the latest version in a minute so make sure you use that if you try out the script again.

voltag00
02-13-2013, 03:38 AM
Okay thanks, just so you know I set the script up to update the status bar on the bottom of the simba window with whatever the script is attempting to do at that current time so it would be nice to know what is says in there before the script stops working for you. I've tweaked the script again and will be uploading the latest version in a minute so make sure you use that if you try out the script again.

Okay thanks

jman1208
02-13-2013, 04:38 PM
This script is awesome, thanks for the contribution.. Now i can finally cook 12k lobsters and hopefully finish a shark fishing script!

voltag00
02-14-2013, 01:26 AM
This script is good but it's not reliable. I downloaded the new version of the script and even downloaded the new includes. It runs well until either a door closer comes and starts closing the cooking range door, thus messing up the script. Also, if there is a small lag, it will mess up the script and make it run outside of the range. It will start clicking at the wrong times and ultimately stop the script

Janus
02-14-2013, 01:29 AM
This script is good but it's not reliable. I downloaded the new version of the script and even downloaded the new includes. It runs well until either a door closer comes and starts closing the cooking range door, thus messing up the script. Also, if there is a small lag, it will mess up the script and make it run outside of the range. It will start clicking at the wrong times and ultimately stop the script

Yeah I know door closers will ruin it! I might add a feature that will attempt to open the door in future. However it shouldn't mess up the script because it will simply keep walking back to the bank until it can get back to the range again. Even in times of massive lag i've never had the script click outside of the range though (and again, even if it does click outside the range it should always run back to the bank when it realises nothings being cooked :S), i've had it running almost perfectly for 10 hours a day for the past 3 days and have never run into any problems. Maybe it's destined to run only for me perfectly :P

voltag00
02-14-2013, 01:43 AM
Yeah I know door closers will ruin it! I might add a feature that will attempt to open the door in future. However it shouldn't mess up the script because it will simply keep walking back to the bank until it can get back to the range again. Even in times of massive lag i've never had the script click outside of the range though (and again, even if it does click outside the range it should always run back to the bank when it realises nothings being cooked :S), i've had it running almost perfectly for 10 hours a day for the past 3 days and have never run into any problems. Maybe it's destined to run only for me perfectly :P

Haha. Well, next time I run it, I will try to remember and record it to show you what happens

Janus
02-14-2013, 02:03 AM
This script is awesome, thanks for the contribution.. Now i can finally cook 12k lobsters and hopefully finish a shark fishing script!

I've only just noticed this post! How's the script been working with you so far? Any problems or has it been running smoothly? I've cooked well over 14k lobsters with it so far I can't even imagine doing them by hand! I would LOVE a shark fishing script if you make one in future.

Janus
02-14-2013, 07:33 PM
Updated 14 Feb. Be sure to get the newest update to ensure working script!

akiponki
02-15-2013, 06:49 PM
Exception in Script: Unable to find file 'P06Include/P06Include.Simba' used from 'C:\Simba\Scripts\JanusCatherbyCookerV4.2.simba'
Help me i have done exactly what they say me to do in here but it won't work plz help.I have put all the files where they are supposed to be, reply as soon as possible!
http://villavu.com/forum/showthread.php?t=95916

Dormik
02-15-2013, 07:56 PM
Exception in Script: Unable to find file 'P06Include/P06Include.Simba' used from 'C:\Simba\Scripts\JanusCatherbyCookerV4.2.simba'
Help me i have done exactly what they say me to do in here but it won't work plz help.I have put all the files where they are supposed to be, reply as soon as possible!
http://villavu.com/forum/showthread.php?t=95916

http://gyazo.com/12145f69c280baf5a0dcef5a6d0604fa.png?1360958187
Do you have it like this?

bdog1249
02-16-2013, 06:31 AM
mine just keep walking from the bank to the range can someone help im kinda new.

Janus
02-16-2013, 07:02 AM
mine just keep walking from the bank to the range can someone help im kinda new.

Are you trying to cook lobs?

akiponki
02-16-2013, 07:21 AM
Okay so now i got the include working i think but it walks to the range presses the lobster and presses the range and the cook thing pops up, then the bad thing happends, it does not cllick on the cook lobster thing and tried to click the lobster and the range all the time but does not cook.I mean it does not click after it had clicked on the range with lobster.

bdog1249
02-16-2013, 03:32 PM
Are you trying to cook lobs?

yes i am

Janus
02-16-2013, 03:33 PM
Okay so now i got the include working i think but it walks to the range presses the lobster and presses the range and the cook thing pops up, then the bad thing happends, it does not cllick on the cook lobster thing and tried to click the lobster and the range all the time but does not cook.I mean it does not click after it had clicked on the range with lobster.

It's still working for me fine. Do you have your client brightness settings set to very bright? Something tells me it could be the p06_include UpChars. Do you have all the font image files in c:\Simba\Fonts\P06UpChars\ ?

bdog1249
02-16-2013, 04:06 PM
i think it is my include because no bot works for me that uses that. Also when i try and run you bot now it gives me this. http://gyazo.com/004e7e34822c600701981b1d42aa7afd

Janus
02-16-2013, 04:34 PM
i think it is my include because no bot works for me that uses that. Also when i try and run you bot now it gives me this. http://gyazo.com/004e7e34822c600701981b1d42aa7afd


i think it is my include because no bot works for me that uses that. Also when i try and run you bot now it gives me this. http://gyazo.com/004e7e34822c600701981b1d42aa7afd

Hmm it seems like it might be your includes. If I were you i'd delete simba and re-download it. Reinstall the include and ensure you put the files in the correct place:

C:\Simba\Includes\P06Include\ < P06Include.simba in this folder.
C:\Simba\Fonts\ < P06UpChars folder into this folder.

See the include thread and follow this video for further instructions: http://www.youtube.com/watch?feature=player_embedded&v=E3dfYdENGAU

bdog1249
02-16-2013, 05:18 PM
Hmm it seems like it might be your includes. If I were you i'd delete simba and re-download it. Reinstall the include and ensure you put the files in the correct place:

C:\Simba\Includes\P06Include\ < P06Include.simba in this folder.
C:\Simba\Fonts\ < P06UpChars folder into this folder.

See the include thread and follow this video for further instructions: http://www.youtube.com/watch?feature=player_embedded&v=E3dfYdENGAU
ok thanks for helping me man i appreciate it, ill try that.

bdog1249
02-16-2013, 05:35 PM
Okay so now i got the include working i think but it walks to the range presses the lobster and presses the range and the cook thing pops up, then the bad thing happends, it does not cllick on the cook lobster thing and tried to click the lobster and the range all the time but does not cook.I mean it does not click after it had clicked on the range with lobster.

ok now the same thing that happened to this guy is happening to me.

Janus
02-16-2013, 05:41 PM
ok now the same thing that happened to this guy is happening to me.

Can you tell me whether it moves the mouse cursor down to the chat box after clicking to cook on the range? I mean, to the lobster that appears so you can click cook all?

bdog1249
02-16-2013, 05:47 PM
Can you tell me whether it moves the mouse cursor down to the chat box after clicking to cook on the range? I mean, to the lobster that appears so you can click cook all?

Nevermind its not working he does go down and try to click on the cook lobster thing in the chat but never does it was working for like 3 runs then just randomly stopped.

Janus
02-16-2013, 05:58 PM
Nevermind its not working he does go down and try to click on the cook lobster thing in the chat but never does it was working for like 3 runs then just randomly stopped.

You're definitely having some issue with finding the uptext, unfortunately I have never had this issue and cannot even replicate it. I hope you don't mind just helping me out so we can get this issue sorted for you? It will take a few minutes of your time to just test an addition for me?

I have just added an update to the script which uses an alternative method to ensure it cooks the lobsters.

You see line 314 of the script? It should be this
if (P06_IsUpTextMultiCustom(['Cook','Co', 'ook'])) then

If you can replace it with this and tell me if it works for you that would be great!
if (findcolorspiraltolerance(x,y,RawFoodColor,214,385 ,290,445,15)) then

bdog1249
02-16-2013, 06:21 PM
You're definitely having some issue with finding the uptext, unfortunately I have never had this issue and cannot even replicate it. I hope you don't mind just helping me out so we can get this issue sorted for you? It will take a few minutes of your time to just test an addition for me?

I have just added an update to the script which uses an alternative method to ensure it cooks the lobsters.

You see line 314 of the script? It should be this
if (P06_IsUpTextMultiCustom(['Cook','Co', 'ook'])) then

If you can replace it with this and tell me if it works for you that would be great!
if (findcolorspiraltolerance(x,y,RawFoodColor,214,385 ,290,445,15)) then

Ok I did it and its running fine thanks man.

akiponki
02-16-2013, 06:22 PM
THAANK YOU IT's working perfectly it was just it made double map in the upchars
It was like this po6upchars/p06upchars/ and then the chars
Not like this: P06upchars/and then the chrs THANK YOU best script ever!

Janus
02-16-2013, 06:25 PM
THAANK YOU IT's working perfectly it was just it made double map in the upchars
It was like this po6upchars/p06upchars/ and then the chars
Not like this: P06upchars/and then the chrs THANK YOU best script ever!

Aha perfect! Happy it's working for everyone :) I was getting worried it was only working perfectly for myself haha!

astrod
02-17-2013, 06:04 PM
Bot looks solid, everything about it works for me, but You say it banks? well it doesnt for me.. rather pointless

Janus
02-17-2013, 10:57 PM
Bot looks solid, everything about it works for me, but You say it banks? well it doesnt for me.. rather pointless

It should bank fine, what happens when it gets to the bank? A little more information would be nice. At the bottom of the window is a status bar which updates with what the script is trying to do, let me know what it says there when it gets to the banking stage so I can determine which stage isn't working for you.

voltag00
02-20-2013, 12:48 AM
Testing out this script. So far so good. The only thing that needs improvement is the speed. It moves slow. It's not that bad, but I would like it a lot more if it was faster. Anyways it's only been running for 15 min. I will tell you how it's running after at least a couple hours