View Full Version : [Herblore] [OGL] ClarityWells
Clarity
06-30-2015, 05:47 PM
http://i.imgur.com/bGyBm1Y.png
Version 1.3
http://i.gyazo.com/b00432dd220d298a4abee28fb660d5c2.png
Features
OpenGL
Makes any potion with the portable well, automatically uses nearest well.
Can use other player's wells but not recommended to exclusively do this.
Places new wells when the current one expires.
Terminates when out of supplies.
Uses keybinds as well as clicking.
Uses bank presets.
Customize what bank you want to use with a simple model ID swap.
Champion's Guild Bank and Shantay Bank IDs included in script (more added later, post locations if you want them added, or add them yourself).
Automatically downloads progress paint to your computer.
Automatically checks for and downloads updated script versions.
This is a simple release of a script I whipped up to get some quick herblore levels. Not intended for use with other players' wells! From what I've seen, there's a great chance of getting reported if you stay around an FC hosting location for awhile without responding to anything. Perhaps support will be added for things like the Portables FC, but from my testing out with them, they seem high on alert for bots. If I have some extra time I'll add good, antiban heavy support for other players' wells.
Instructions & Setup
Ensure you have the latest versions of the ogLib (https://villavu.com/forum/showthread.php?t=112599) include and GLX (https://github.com/Brandon-T/GLX/releases/tag/3.7) plugin. Refer to the OpenGL Tutorial (https://villavu.com/forum/showthread.php?t=112486) if you need help with this.
Download the script via this post's attachment.
Start Simba with administrator privileges if paint downloading issues occur.
Make sure you somewhat follow the picture above for interface layout. Do NOT use SRL-6 settings. You can move things around if you wish (inventory can be somewhere else, minimap on the bottom instead, et cetera).
Ensure you have your potion making bank preset as Preset 1, and a portable well in Preset 2's inventory.
Ensure you are at a supported bank location, or have added the model ID for the bank you wish to use.
Have your overall XP tracker visible somewhere onscreen if you wish to have XP tracking.
Start the script next to a bank chest.
SCRIPT DOWNLOAD: 26841
Questions/Issues?
Please ensure your ogLib, GLX, and Simba installations are up to date before posting. If you encounter a bug that is not easy to explain, please provide the debug log and a relevant screenshot so I can work to fix it as quickly as possible. If something went wrong, it is very likely user error, so check to make sure you followed the instructions exactly.
Best of luck in your botting endeavors,
~Clarity
Obscurity
07-01-2015, 12:50 AM
Damn, I wanted to donate so bad, but there's not donate button... :(.
Aw well. It's the thought that counts. :P.
srlMW
07-01-2015, 01:10 AM
Geesh you're really pumping them out! Nice release!
wingerfinger
07-12-2015, 03:55 AM
tempted to use it since im unable to load up ashamans :/
just scared a bit since you pointed out its a high chance of getting reported
but will test in the future !;)
herbal
07-13-2015, 06:12 PM
Ran simba as adminstrator as still encountering this problem. Script doesnt login or do anything but it doesnt stop. Please help, many thanks
[ogLib] Setup initiated.
[S.M.A.R.T] Found your java path @ C:\Program Files (x86)\Java\jre1.8.0_45\bin\java.exe
[ogLib] Setup successful.
ClarityWells v1.0 || 5195 || Checking for script updates...
ClarityWells v1.0 || 5335 || Online Script Version: 1.0
ClarityWells v1.0 || 5351 || Local Script Version: 1.0
ClarityWells v1.0 || 5351 || You have the latest version of the script!
ClarityWells v1.0 || 5351 || Please wait...now installing ClarityWells image assets to your computer...
ClarityWells v1.0 || 5351 || -- INSTALLATION STATUS: Script Paint exists.
ClarityWells v1.0 || 5382 || Starting XP was set as: 0
Clarity
07-13-2015, 06:24 PM
tempted to use it since im unable to load up ashamans :/
just scared a bit since you pointed out its a high chance of getting reported
but will test in the future !;)
What I meant was, you have a higher chance of getting reported if you use this around other players, because they're "on alert" for bots. I used this script with no issues, got 1-99 Herblore in a couple of days. Using an instanced bank chest is ideal.
Ran simba as adminstrator as still encountering this problem. Script doesnt login or do anything but it doesnt stop. Please help, many thanks
[ogLib] Setup initiated.
[S.M.A.R.T] Found your java path @ C:\Program Files (x86)\Java\jre1.8.0_45\bin\java.exe
[ogLib] Setup successful.
ClarityWells v1.0 || 5195 || Checking for script updates...
ClarityWells v1.0 || 5335 || Online Script Version: 1.0
ClarityWells v1.0 || 5351 || Local Script Version: 1.0
ClarityWells v1.0 || 5351 || You have the latest version of the script!
ClarityWells v1.0 || 5351 || Please wait...now installing ClarityWells image assets to your computer...
ClarityWells v1.0 || 5351 || -- INSTALLATION STATUS: Script Paint exists.
ClarityWells v1.0 || 5382 || Starting XP was set as: 0
You need to start the script while logged in, next to a bank chest, with all the presets done properly as in the instructions.
herbal
07-13-2015, 07:32 PM
i did
Clarity
07-13-2015, 07:37 PM
i did
Are you running OpenGL graphics mode? Have you downloaded the plugins from the instructions ("Ensure you have the latest versions of the ogLib include and GLX plugin. Refer to the OpenGL Tutorial if you need help with this.")? Please post a picture of RS :)
herbal
07-13-2015, 07:48 PM
Yeah running in open gl. When i added the og lib folder i deleted the "master" from the file name. wouldnt work without doing so. Thanks for the immediate response btw! and awesome script.
Clarity
07-13-2015, 09:50 PM
Yeah running in open gl. When i added the og lib folder i deleted the "master" from the file name. wouldnt work without doing so. Thanks for the immediate response btw! and awesome script.
I take it's working alright? Post some progress reports if you'd like :) My pleasure! Enjoy the XP gains.
herbal
07-14-2015, 12:56 AM
It actually has yet to work for me.
Clarity
07-14-2015, 12:59 AM
It actually has yet to work for me.
You need to provide more information on what you're doing so I can identify what's wrong with your setup. Could you please post some screenshots of your RS/SMART screen?
Additionally, make sure you are using the correct .DLLs, you have to download special plugins from here (https://github.com/Brandon-T/GLX/releases/tag/3.7) and place them into Simba\Plugins\
herbal
07-14-2015, 04:40 PM
26423
Lucidity
07-14-2015, 05:17 PM
...
for one remove those attachments, your name is in it (rsn)! second, i don't think you're suppose to use that layout with ogl
Grimxxdeath223
07-14-2015, 05:38 PM
26423
OGL needs to be setup properly and from your picture (which has your RSN in it) you aren't setup to use it. Please review the first post on how to set it up.
herbal
07-14-2015, 06:39 PM
wow i completey forgot to remove my rsn. im a dumby. how do i setup ogl
Clarity
07-14-2015, 07:54 PM
wow i completey forgot to remove my rsn. im a dumby. how do i setup ogl
As mentioned in the instructions, please refer to the OpenGL tutorial: https://villavu.com/forum/showthread.php?t=112486
Let me know if you have any further questions :)
Obscurity
07-14-2015, 07:55 PM
wow i completey forgot to remove my rsn. im a dumby. how do i setup ogl
I feel like there's probably a thread around here somewhere you could check out.
herbal
07-15-2015, 05:22 PM
I play the script but nothing happens. charachter just stands there. Are the files in the correct places? am i missing anything? please help, thanks!
26427
26428
Clutch
07-15-2015, 05:56 PM
I play the script but nothing happens. charachter just stands there. Are the files in the correct places? am i missing anything? please help, thanks!
26427
26428
Have you been able to run any other OGL scripts successfully? You likely don't have something installed or setup correctly as mentioned above...not for the script but for OGL itself.
Edit: One thing that did get me when I got a new computer is I didn't replace the opengl32.dll with what was provided, make sure you replace all .dlls that are mentioned in the thread above even if you already have it.
herbal
07-15-2015, 07:44 PM
Thanks clutch, replacing the files you mentioned got it to work. Many sincere thanks
Clutch
07-15-2015, 07:49 PM
Thanks clutch, replacing the files you mentioned got it to work. Many sincere thanks
Sweet!
kiwikiwi
07-17-2015, 11:38 PM
Lumbridge Combat Academy support please?
Clutch
07-18-2015, 01:25 AM
Lumbridge Combat Academy support please?
910041455
Clarity
07-18-2015, 01:27 AM
910041455
Thanks Clutch! kiwikiwi; you can simply replace the bank chest ID in line 10 with that one to use the Lumbridge Combat Academy bank.
BANK_MODEL_ID = 910041455;
Clutch
07-18-2015, 01:37 AM
Thanks Clutch! kiwikiwi; you can simply replace the bank chest ID in line 10 with that one to use the Lumbridge Combat Academy bank.
BANK_MODEL_ID = 910041455;
NP need a break from testing..made zero changes to my script yet it won't run now. FTL
Threshold
07-18-2015, 11:46 PM
Meilyr chest support in prif?
Need that 20% for combo pots :)
Clarity
07-18-2015, 11:49 PM
Meilyr chest support in prif?
Need that 20% for combo pots :)
I don't have an account that can access Elf City. I'd be happy to add the chest ID if someone could retrieve it or lend an account :)
Clutch
07-19-2015, 12:51 AM
I would but I don't have access to priff either lol
Obquility
07-19-2015, 12:58 AM
I don't have an account that can access Elf City. I'd be happy to add the chest ID if someone could retrieve it or lend an account :)
I'm sure that dung script your working on will come in handy soon ;)
Clarity
07-19-2015, 01:13 AM
I'm sure that dung script your working on will come in handy soon ;)
Yes indeed, hopefully! :)
Lucidity
07-19-2015, 01:41 AM
So there's less configuration for the key bind of the well, you should put
actionBar.getActionKey(id)
herbal
07-27-2015, 02:39 AM
Error: Duplicate declaration "tCountDown" at line 536
getting this error code.
Clarity
07-27-2015, 03:02 AM
Error: Duplicate declaration "tCountDown" at line 536
getting this error code.
SRL-6 recently ported the tCountDown type from ogLib without accounting for duplicate declarations. You can solve this error by deleting tCountDown methods from SRL-6 (relevant methods found within time.simba). An official fix will be pushed along with other updates soon.
Clarity
07-28-2015, 02:38 AM
herbal; Update 1.1 uploaded to account for new ogLib. Also added model ID for Lumbridge Combat Academy :)
herbal
07-30-2015, 08:43 AM
still getting the same error
Threshold
07-30-2015, 05:03 PM
SRL-6 recently ported the tCountDown type from ogLib without accounting for duplicate declarations. You can solve this error by deleting tCountDown methods from SRL-6 (relevant methods found within time.simba). An official fix will be pushed along with other updates soon.
I got rid of the tCountDown but now I get this?
http://puu.sh/jiYZz/ae9b2303fd.png
Clutch
07-30-2015, 05:04 PM
I got rid of the tCountDown but now I get this?
http://puu.sh/jiYZz/ae9b2303fd.png
If you read up a little bit it downloaded a new version, close out and open up the latest version of the script.
Threshold
07-30-2015, 05:17 PM
If you read up a little bit it downloaded a new version, close out and open up the latest version of the script.
I'm opening the new version and it still says the same thing.
http://puu.sh/jiZWj/28af3c4737.png
EDIT: I toyed around with some things and got it working. Will update if needed.
Thanks!
Clutch
07-30-2015, 08:06 PM
I'm opening the new version and it still says the same thing.
http://puu.sh/jiZWj/28af3c4737.png
EDIT: I toyed around with some things and got it working. Will update if needed.
Thanks!
Did you change the script version at the top? Cuz it's detecting 1.0 still.
Threshold
07-31-2015, 04:32 AM
Did you change the script version at the top? Cuz it's detecting 1.0 still.
Yes I changed that and then had to do a few other things I can't quite remember atm. It started to mess up but I stopped toying with it for now.
Clarity
07-31-2015, 06:15 AM
Did I mess the versioning up? Sorry! I'll upload a fix to the OP :) You can change this to 1.1 in the meantime and it should run fine.
scriptVersion = '1.0';
//should be
scriptVersion = '1.1';
herbal
08-01-2015, 04:44 PM
still getting the tcountdown error. any help would be greatly appreciated
herbal
08-04-2015, 07:13 PM
how do i delete the duplicate tcountdown
herbal
08-05-2015, 07:02 PM
thanks guys! not
Emarian
08-07-2015, 06:46 PM
Got 99 herb with this! You're the man Clarity :) also got a ton of free overloads
herbal
08-07-2015, 08:50 PM
do i just delete this to get passed the tcountdown error code?
tCountDown
~~~~~~~~~~
.. code-block:: pascal
type
tCountDown = uInt32;
Timer type which is usefull for loops, timing and writing progress reports.
.. note::
- by Obscurity
*)
type
tCountDown = uInt32;
function tCountDown.setTime(funcTime: uInt32): uInt32;
begin
exit(self := getSystemTime() + funcTime);
end;
function tCountDown.timeRemaining(): uInt32;
begin
if not self.isFinished() then
exit(self - getSystemTime());
end;
function tCountDown.isFinished(): boolean;
begin
exit(getSystemTime() >= self);
end;
herbal
08-09-2015, 07:10 PM
Please help!
Grimxxdeath223
08-09-2015, 07:20 PM
Please help!
When was the last time you updated your ogLib or your SRL? Both have updated a few times over the last week or so. Also, I think you can make the tCountDown go away by doing this "remove the tCountDown methods from SRL-6's time.simba" You can do that by just commenting out the lines. Hopefully Clarity; will figure some other workaround out but this should get you by.
herbal
08-10-2015, 08:07 AM
I dont know what eactly i have to "comment" out.
Clarity
09-10-2015, 07:22 AM
I dont know what eactly i have to "comment" out.
Updated to 1.2, all ogLib update-related errors fixed. If you can't update the script because it doesn't compile in Simba, simply redownload the new script (v1.2) I edited into the first post.
tCountDown error fix: https://villavu.com/forum/showthread.php?t=113542&p=1357885#post1357885
herbal
09-11-2015, 03:29 PM
Thank you! been waiting for this update! I've been checking forum every day for it LOL. Awesome script
Clarity
10-27-2015, 10:26 PM
Updated to 1.3 to support latest ogLib changes. Redownload the script in the OP!
V4X1S
12-25-2015, 11:15 PM
when i try to run the script, somtimes after reopening it it will place the well and seem to see my actions (opening bank,...) but doesnt want to run automatic.
setup like the post (opengl) with the plugins. did update them too...
0:09:09 | ClarityWells > setup
Error: "0.26179938779914943653855361527335" is an invalid float at line 853
Execution failed.
oglAngleTolerance:=strToFloat(replaceRegExpr('^$', readINI('Default','oglAngleTolerance','includes/ogLib/lib/core/core.ini'),'0.26179938779914943653855361527335',fa lse));
Obscurity
12-26-2015, 02:26 AM
Try jut removing a few digits from your oglAngleTolerance. It was just a copy and paste, it does that need to be 30+ digits.
Or run using OGL.setDefaultAngleTolerance(0.2617993878) before calling OGL.setup().
Sorry if that's not the correct method, I'm on my phone.
Ollie99
01-01-2016, 05:07 PM
Using this as I seem to be getting errors with the other scripts but now my RS is in Portuguese? lmao
jetship
02-09-2016, 06:08 AM
This script works well for me thanks a lot for the awesome job! will post a proggy later :)
Hitac
02-09-2016, 10:45 AM
Does it take out vials to make potions?
Obscurity
02-09-2016, 05:03 PM
Does it take out vials to make potions?
I haven't personally used the script and am only on my phone, but I'd guess it uses your presets.
Hitac
02-09-2016, 08:22 PM
Sure but you can withdraw vials from the well being unnecessary to buy them.
Clutch
02-09-2016, 08:44 PM
Sure but you can withdraw vials from the well being unnecessary to buy them.
Features
OpenGL
Makes any potion with the portable well, automatically uses nearest well.
Can use other player's wells but not recommended to exclusively do this.
Places new wells when the current one expires.
Terminates when out of supplies.
Uses keybinds as well as clicking.
Uses bank presets.
Customize what bank you want to use with a simple model ID swap.
Champion's Guild Bank and Shantay Bank IDs included in script (more added later, post locations if you want them added, or add them yourself).
Automatically downloads progress paint to your computer.
Automatically checks for and downloads updated script versions.
I'm gonna say no, it does not. Wouldn't be difficult to implement though.
Clarity
02-09-2016, 09:53 PM
Sure but you can withdraw vials from the well being unnecessary to buy them.
Features
OpenGL
Makes any potion with the portable well, automatically uses nearest well.
Can use other player's wells but not recommended to exclusively do this.
Places new wells when the current one expires.
Terminates when out of supplies.
Uses keybinds as well as clicking.
Uses bank presets.
Customize what bank you want to use with a simple model ID swap.
Champion's Guild Bank and Shantay Bank IDs included in script (more added later, post locations if you want them added, or add them yourself).
Automatically downloads progress paint to your computer.
Automatically checks for and downloads updated script versions.
I'm gonna say no, it does not. Wouldn't be difficult to implement though.
I didn't know about that option. Can add that in for sure. Stay tuned :)
jetship
02-11-2016, 04:36 AM
Sure but you can withdraw vials from the well being unnecessary to buy them.
This would be awesome if you could add it!
1+ from me
DonVitoCorleone
04-30-2016, 07:20 PM
Hey Clarity!
This is the first time I'm using Simba, so maybe it's a question with an easy answer but I really don't know what to do :p
When I try to run the script, it gives this error in line 2: "{$i oglib/lib/core/core.simba}".
What should i do?
I did not save simba on c:, I don't know if that makes a difference.
DonVitoCorleone
04-30-2016, 07:35 PM
Hey Clarity!
This is the first time I'm using Simba, so maybe it's a question with an easy answer but I really don't know what to do :p
When I try to run the script, it gives this error in line 2: "{$i oglib/lib/core/core.simba}".
What should i do?
I did not save simba on c:, I don't know if that makes a difference.
I fixed it, it was wrongly named.
But now i get this:
Error: Plugin(GLX32) has not been found
Compiling failed.
I don't know what this means at all.
Do you know how i can fix this?
Clarity
04-30-2016, 07:38 PM
Hey Clarity!
This is the first time I'm using Simba, so maybe it's a question with an easy answer but I really don't know what to do :p
When I try to run the script, it gives this error in line 2: "{$i oglib/lib/core/core.simba}".
What should i do?
I did not save simba on c:, I don't know if that makes a difference.
You need to have downloaded ogLib and the necessary plugins before this script can work.
Part 1 of this tutorial tells you what to do: https://villavu.com/forum/showthread.php?t=112486
Good luck! :)
DonVitoCorleone
04-30-2016, 07:45 PM
I did download it :p
Maybe I did something wrong, I'll download it again.
Thank you for your fast response!
Harrier
04-30-2016, 07:52 PM
You need to have downloaded ogLib and the necessary plugins before this script can work.
Part 1 of this tutorial tells you what to do: https://villavu.com/forum/showthread.php?t=112486
Good luck! :)
Have you attempted to upstream any of your plugins yet?
DonVitoCorleone
04-30-2016, 07:58 PM
When I run ogLib-Setup.simba I get the following error:
Error: Unknown declaration "init" at line 49
Compiling failed.
Do you have a solution?
DonVitoCorleone
04-30-2016, 09:49 PM
can't delete this
DonVitoCorleone
04-30-2016, 10:09 PM
Have you attempted to upstream any of your plugins yet?
It's fixed thanks!
Just out of curiousity: what is upstreaming?
DonVitoCorleone
05-01-2016, 01:43 AM
Now it's misclicking the well, do I need to change something in the settings?
EDIT: after experimenting for quit some time, it does not misclick the well anymore, but now it won't bank.
EDIT2: I restarted the script and the banking suddenly worked. The new problem was that it banked like 2 secs after it started making potions, so it banked after making 2-3 pots. I fixed this by deleting the nextReaction.setTime(.....) and replacing the dots with numbers)
DonVitoCorleone
05-01-2016, 10:21 AM
Wher can I finde the BANK_MODEL_ID's of other banks?
I searched everywhere but I can't find it
DonVitoCorleone
05-02-2016, 01:08 PM
Where can I find the BANK_MODEL_ID's of other chests?
Obscurity
05-02-2016, 07:51 PM
Where can I find the BANK_MODEL_ID's of other chests?
ogl.setDebugMode('models');
DonVitoCorleone
05-03-2016, 01:44 PM
ogl.setDebugMode('models');
Thank you!!!
rowan138
05-08-2016, 02:51 PM
Looks a great script just going to try it out.
Man16
06-16-2016, 02:25 AM
I'm trying to make my own edits to this so it solely relies on other's wells. I could do with some guidance please as it keeps trying to open the bank when there is no well nearby and I can't see why in the code. Here's what I currently have, you can see what I have commented out,
program ClarityWells;
{$i oglib/lib/core/core.simba}
{ClarityWells v1.3}
{SCRIPT SETTINGS}
const
BANK_MODEL_ID = 910041455; //Champion's Guild Bank Chest, 756483783 - Shantay Bank Chest, 910041455 - Lumbridge Combat Academy
BANK_OPTION_TEXT = 'Use Bank chest'; //Right click text for the bank
MINIMUM_REACTION_WAIT = 700; //Minimum delay between actions and reactions
MAXIMUM_REACTION_WAIT = 1800; //Maximum delay between actions and reactions
RIGHT_CLICK_CHANCE = 6; //Chance of right-clicking well or bank
KEYBIND_CHANCE = 3; //Chance of using keybind to place a well
WELL_KEYBIND = '4'; //Actionbar key for well placement
SHOW_PAINT = true; //Show script progress paint?
{END OF SETTINGS}
const
scriptVersion = '1.3';
var
nextRotateCamera, nextReaction: tCountDown;
presetString: string;
didNotMix, rightClick, startingXP, scriptPaintBMP: integer;
didClickWell: boolean;
{PROCEDURE -- ClarityDebug
Purpose: Custom console debugging procedure.
Comments: None.}
procedure ClarityDebug(message: string);
begin
writeln('ClarityWells v' + scriptVersion + ' || ' + toStr(getTimeRunning) + ' || ' + message);
end;
{PROCEDURE -- doNothing}
procedure doNothing;
begin
end;
{PROCEDURE -- withdrawPreset
Purpose: Withdraws a bank preset.
Comments: None.}
procedure withdrawPreset;
begin
ClarityDebug('Withdrawing bank preset ' + toStr(presetString) + '.');
if random(2) then
sendKeys(presetString, 60 + random(60), 60 + random(60))
else
bank.clickPreset(strToIntDef(presetString, 1));
repeat
wait(random(300, 400));
until (not bank.hasBank());
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
end;
{PROCEDURE -- makePotions
Purpose: Clicks on the make button within the well interface.
Comments: None.}
procedure makePotions;
begin
ClarityDebug('Making our potions at the well.');
if dialogue.hasDialogue() then
typeByte(VK_ESCAPE);
if random(2) then
sendKeys(' ', 60 + random(60), 60 + random(60))
else
production.setMake();
nextReaction.setTime(random(MINIMUM_REACTION_WAIT + 1000, MAXIMUM_REACTION_WAIT + 2000));
end;
{PROCEDURE -- placeWell
Purpose: Places a new well if one has expired.
Comments: None.}
procedure placeWell;
begin
ClarityDebug('Placing a new portable well.');
repeat
if (random(KEYBIND_CHANCE) = 0) then
sendKeys(WELL_KEYBIND, 60 + random(60), 60 + random(60))
else
inventory.clickItem(52275, 854794);
wait(random(600, 1200));
until dialogue.hasDialogue();
sendKeys('1', 60 + random(60), 60 + random(60));
repeat
wait(random(600, 1200));
until ogl.getModels(4264156587).indexes;
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
end;
{PROCEDURE -- useBankChest
Purpose: Uses whatever bank has been specified in script settings.
Comments: None.}
procedure useBankChest;
var
modelsBank: glModelArray;
bankTPA: TPointArray;
begin
if combat.hasTarget() then exit;
if dialogue.hasDialogue() then
typeByte(VK_ESCAPE);
inc(didNotMix);
if didNotMix > 10 then
begin
ClarityDebug('Out of supplies! Terminating script.');
terminateScript;
end;
ClarityDebug('Clicking on the bank chest.');
if (modelsBank := ogl.getModels(BANK_MODEL_ID)).indexes then
begin
bankTPA := modelsBank.closestTo(ogl.getClientMidPoint()).toPo intArray();
if (random(rightClick) = 0) then
mouse.rightClickOption(bankTPA[0].adjustPosition(0, -10).randomizePointEllipse(40), [BANK_OPTION_TEXT])
else
mouse.click(bankTPA[0].adjustPosition(0, -10).randomizePointEllipse(40));
end;
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
end;
{PROCEDURE -- useWell
Purpose: Uses the nearest portable well.
Comments: None.}
procedure useWell;
var
modelsWell: glModelArray;
wellTPA: TPointArray;
begin
ClarityDebug('Clicking on the portable well.');
if dialogue.hasDialogue() then
typeByte(VK_ESCAPE);
if (modelsWell := ogl.getModels(4264156587)).indexes then
begin
wellTPA := modelsWell.closestTo(ogl.getClientMidPoint()).toPo intArray();
if (random(rightClick) = 0) then
mouse.rightClickOption(wellTPA[0].adjustPosition(0, -10).randomizePointEllipse(40), ['Mix potions Portable well'])
else
mouse.click(wellTPA[0].adjustPosition(0, -10).randomizePointEllipse(40));
end;
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
end;
{PROCEDURE -- checkXP
Purpose: Checks the current overall XP gained.
Comments: Will be pushed to ogLib soon.}
function checkXP(): integer;
var
xpTextures: glTextureArray;
textureBox: TBox;
currentXP: string;
position: integer;
begin
xpTextures := ogl.getTextures(48705, 4736586);
if length(xpTextures) then
begin
textureBox := xpTextures[0].bounds;
currentXP := ogl.getChars(IntToBox(textureBox.X1 - 150, textureBox.Y1, textureBox.X2, textureBox.Y2)).toString();
position := pos('xp', currentXP);
if (position > 0) then
begin
currentXP := '*' + currentXP;
currentXP := between('*',' +', currentXP);
end;
result := strToIntDef(extractFromStr(currentXP, numbers), 0);
end;
end;
{PROCEDURE -- getTime
Purpose: Translates ms to a readable format.
Comments: Written by Ross.}
function getTime(time: uint32): string;
var
h, m, s: integer;
begin
s := time mod 3600000 mod 60000 div 1000;
m := time mod 3600000 div 60000;
h := time div 3600000;
result:= (toStr(h) + ' h ' + toStr(m) + ' m ' + toStr(s) + ' s');
end;
{PROCEDURE -- progressReport
Purpose: Calculates and paints progress on the screen.
Comments: None.}
procedure progressReport();
var
gainedXP, gainedRespect, gainedXPPerHour, gainedRespectPerHour: extended;
gainedXPString, gainedXPPerHourString: string;
time: string;
begin
time := getTime(getTimeRunning());
gainedXP := checkXP() - startingXP;
gainedXPPerHour := Round(gainedXP * (3600.0 / (GetTimeRunning / 1000.0)));
gainedXPString := format('%n', [gainedXP]);
gainedXPPerHourString := format('%n', [gainedXPPerHour]);
setLength(gainedXPString, length(gainedXPString) - 3);
setLength(gainedXPPerHourString, length(gainedXPPerHourString) - 3);
if SHOW_PAINT then
begin
smart.graphics.drawBitmap(scriptPaintBMP, Point(3, 461));
smart.graphics.drawText(ToStr(time), 'smallChars', Point(127, 517), 1);
smart.graphics.drawText(ToStr(time), 'smallChars', Point(126, 516), clWhite);
smart.graphics.drawText(gainedXPString + ' XP', 'smallChars', Point(114, 538), 1);
smart.graphics.drawText(gainedXPString + ' XP', 'smallChars', Point(113, 537), clWhite);
smart.graphics.drawText(gainedXPPerHourString + ' XP','smallChars', Point(114, 560), 1);
smart.graphics.drawText(gainedXPPerHourString + ' XP','smallChars', Point(113, 559), clWhite);
end;
end;
{PROCEDURE -- waitToBank
Purpose: Waits while potions are being made.
Comments: None.}
procedure waitToBank;
var
cd: tcountdown;
begin
ClarityDebug('Waiting for potion mixing to finish.');
cd.setTime(random(29000, 33000));
repeat
if nextRotateCamera.isFinished() then
begin
//minimap.setDegrees(random(360));
nextRotateCamera.setTime(random(300000));
end;
didNotMix := 0;
until (production.hasProduction() = 'progress') = false;
progressReport;
useBankChest;
end;
{PROCEDURE -- mainLoop
Purpose: Script main loop.
Comments: None.}
procedure mainLoop;
var
reaction: procedure() = @doNothing;
begin
if (not nextReaction.isFinished()) then
exit;
if bank.hasBank() and ogl.getModels(4264156587).indexes then
begin
presetString := '1';
reaction := @withdrawPreset
end
//else if bank.hasBank() and (not ogl.getModels(4264156587).indexes) then
// begin
// presetString := '2';
// reaction := @withdrawPreset
// end
else if (production.hasProduction() = 'progress') = false then
begin
if (production.hasProduction() = 'production') then
begin
reaction := @makePotions;
end
//else if (inventory.getItems(52275, 854794).indexes and (not ogl.getModels(4264156587).indexes)) then
// reaction := @placeWell
else if ogl.getModels(4264156587).indexes and inventory.isFull() then
reaction := @useWell
else if ogl.getModels(BANK_MODEL_ID).indexes then
reaction := @useBankChest;
end
else
reaction := @waitToBank;
reaction();
end;
{PROCEDURE -- autoUpdateMe
Purpose: Autoupdates the script.
Comments: By Shuttleu, modified by Ashaman88 and Clarity}
procedure autoUpdateMe;
var
Neifile: Integer;
OnlineVersion, NewScript, NeiFeilNennen: string;
begin
ClarityDebug('Checking for script updates...');
OnlineVersion := GetPage('http://pastebin.com/raw.php?i=xzkYu1a2');
ClarityDebug('Online Script Version: ' + OnlineVersion);
ClarityDebug('Local Script Version: ' + ScriptVersion) if (trim(OnlineVersion) > ScriptVersion) then
begin
ClarityDebug('Newer script version online!');
ClarityDebug('Autoupdating to newer version.');
NewScript := GetPage('http://pastebin.com/raw.php?i=wxtDh8Vr');
NeiFeilNennen := ScriptPath + 'ClarityWells v' + OnlineVersion + '.simba';
Neifile := Rewritefile(NeiFeilNennen, true);
try
WriteFileString(Neifile, NewScript);
except
begin
ClarityDebug('Fatal error writing to ' + NeiFeilNennen + '!');
Terminatescript;
end;
end;
CloseFile(Neifile);
ClarityDebug('New script downloaded to ' + NeiFeilNennen + '! Terminating old script, please use the new version.');
writeln('New script downloaded to ' + NeiFeilNennen + '! Terminating old script, please use the new version.');
TerminateScript;
end
else
ClarityDebug('You have the latest version of the script!');
end;
{PROCEDURE -- checkForFiles
Purpose: Checks to see if file downloading is required.
Comments: By Kevin, modified by Clarity}
procedure checkForFiles(filePath, message, link: string);
var
progFile: longInt;
fileName: string;
begin
fileName := AppPath + filePath;
try
if not fileExists(fileName) then
begin
ClarityDebug('-- INSTALLATION STATUS: ' + message + ' does not exist - Downloading now.');
progFile := createFile(fileName);
end
else
begin
ClarityDebug('-- INSTALLATION STATUS: ' + message + ' exists.');
exit;
end;
closeFile(progFile);
progFile := rewriteFile(fileName, false);
writeFileString(progFile, getPage(link));
ClarityDebug('-- INSTALLATION STATUS: ' + message + ' has been downloaded.');
finally
if (progFile > 0) then
closeFile(progFile);
end;
end;
{PROCEDURE -- installClarityWellsAssets
Purpose: Determines whether files exist and dictates their installation.
Comments: None.}
procedure installClarityWellsAssets;
begin
ClarityDebug('Please wait...now installing ClarityWells image assets to your computer...');
if not directoryExists(appPath + 'scripts/ClarityWellsImages/') then
begin
try
createDirectory(appPath + 'scripts/ClarityWellsImages/');
ClarityDebug('Created a new folder in Simba/Scripts/');
except
end;
end;
checkForFiles('scripts/ClarityWellsImages/scriptpaint.png', 'Script Paint', 'http://i.imgur.com/8ng7x2n.png');
end;
{PROCEDURE -- freeBMP
Purpose: Frees bitmaps used in the script.
Comments: None.}
procedure freeBMP();
begin
freeBitmap(scriptPaintBMP);
end;
begin
addOnTerminate('freeBMP');
clearDebug();
ogl.setup(800, 600);
ogl.setCacheTime(120);
ogl.setColourTolerance(2);
ogl.setDebugMode('none');
autoUpdateMe;
installClarityWellsAssets();
if SHOW_PAINT then
begin
scriptPaintBMP := loadBitmap(appPath + '/Scripts/ClarityWellsImages/scriptpaint.png');
fastReplaceColor(scriptPaintBMP, 0, 1);
end;
startingXP := checkXP();
ClarityDebug('Starting XP was set as: ' + toStr(checkXP));
rightClick := random(RIGHT_CLICK_CHANCE - 1, RIGHT_CLICK_CHANCE + 1);
if (rightClick < 0) then
rightClick := 0;
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
repeat
mainLoop;
until false;
end;
I'm trying to make my own edits to this so it solely relies on other's wells. I could do with some guidance please as it keeps trying to open the bank when there is no well nearby and I can't see why in the code. Here's what I currently have, you can see what I have commented out,
program ClarityWells;
{$i oglib/lib/core/core.simba}
{ClarityWells v1.3}
{SCRIPT SETTINGS}
const
BANK_MODEL_ID = 910041455; //Champion's Guild Bank Chest, 756483783 - Shantay Bank Chest, 910041455 - Lumbridge Combat Academy
BANK_OPTION_TEXT = 'Use Bank chest'; //Right click text for the bank
MINIMUM_REACTION_WAIT = 700; //Minimum delay between actions and reactions
MAXIMUM_REACTION_WAIT = 1800; //Maximum delay between actions and reactions
RIGHT_CLICK_CHANCE = 6; //Chance of right-clicking well or bank
KEYBIND_CHANCE = 3; //Chance of using keybind to place a well
WELL_KEYBIND = '4'; //Actionbar key for well placement
SHOW_PAINT = true; //Show script progress paint?
{END OF SETTINGS}
const
scriptVersion = '1.3';
var
nextRotateCamera, nextReaction: tCountDown;
presetString: string;
didNotMix, rightClick, startingXP, scriptPaintBMP: integer;
didClickWell: boolean;
{PROCEDURE -- ClarityDebug
Purpose: Custom console debugging procedure.
Comments: None.}
procedure ClarityDebug(message: string);
begin
writeln('ClarityWells v' + scriptVersion + ' || ' + toStr(getTimeRunning) + ' || ' + message);
end;
{PROCEDURE -- doNothing}
procedure doNothing;
begin
end;
{PROCEDURE -- withdrawPreset
Purpose: Withdraws a bank preset.
Comments: None.}
procedure withdrawPreset;
begin
ClarityDebug('Withdrawing bank preset ' + toStr(presetString) + '.');
if random(2) then
sendKeys(presetString, 60 + random(60), 60 + random(60))
else
bank.clickPreset(strToIntDef(presetString, 1));
repeat
wait(random(300, 400));
until (not bank.hasBank());
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
end;
{PROCEDURE -- makePotions
Purpose: Clicks on the make button within the well interface.
Comments: None.}
procedure makePotions;
begin
ClarityDebug('Making our potions at the well.');
if dialogue.hasDialogue() then
typeByte(VK_ESCAPE);
if random(2) then
sendKeys(' ', 60 + random(60), 60 + random(60))
else
production.setMake();
nextReaction.setTime(random(MINIMUM_REACTION_WAIT + 1000, MAXIMUM_REACTION_WAIT + 2000));
end;
{PROCEDURE -- placeWell
Purpose: Places a new well if one has expired.
Comments: None.}
procedure placeWell;
begin
ClarityDebug('Placing a new portable well.');
repeat
if (random(KEYBIND_CHANCE) = 0) then
sendKeys(WELL_KEYBIND, 60 + random(60), 60 + random(60))
else
inventory.clickItem(52275, 854794);
wait(random(600, 1200));
until dialogue.hasDialogue();
sendKeys('1', 60 + random(60), 60 + random(60));
repeat
wait(random(600, 1200));
until ogl.getModels(4264156587).indexes;
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
end;
{PROCEDURE -- useBankChest
Purpose: Uses whatever bank has been specified in script settings.
Comments: None.}
procedure useBankChest;
var
modelsBank: glModelArray;
bankTPA: TPointArray;
begin
if combat.hasTarget() then exit;
if dialogue.hasDialogue() then
typeByte(VK_ESCAPE);
inc(didNotMix);
if didNotMix > 10 then
begin
ClarityDebug('Out of supplies! Terminating script.');
terminateScript;
end;
ClarityDebug('Clicking on the bank chest.');
if (modelsBank := ogl.getModels(BANK_MODEL_ID)).indexes then
begin
bankTPA := modelsBank.closestTo(ogl.getClientMidPoint()).toPo intArray();
if (random(rightClick) = 0) then
mouse.rightClickOption(bankTPA[0].adjustPosition(0, -10).randomizePointEllipse(40), [BANK_OPTION_TEXT])
else
mouse.click(bankTPA[0].adjustPosition(0, -10).randomizePointEllipse(40));
end;
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
end;
{PROCEDURE -- useWell
Purpose: Uses the nearest portable well.
Comments: None.}
procedure useWell;
var
modelsWell: glModelArray;
wellTPA: TPointArray;
begin
ClarityDebug('Clicking on the portable well.');
if dialogue.hasDialogue() then
typeByte(VK_ESCAPE);
if (modelsWell := ogl.getModels(4264156587)).indexes then
begin
wellTPA := modelsWell.closestTo(ogl.getClientMidPoint()).toPo intArray();
if (random(rightClick) = 0) then
mouse.rightClickOption(wellTPA[0].adjustPosition(0, -10).randomizePointEllipse(40), ['Mix potions Portable well'])
else
mouse.click(wellTPA[0].adjustPosition(0, -10).randomizePointEllipse(40));
end;
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
end;
{PROCEDURE -- checkXP
Purpose: Checks the current overall XP gained.
Comments: Will be pushed to ogLib soon.}
function checkXP(): integer;
var
xpTextures: glTextureArray;
textureBox: TBox;
currentXP: string;
position: integer;
begin
xpTextures := ogl.getTextures(48705, 4736586);
if length(xpTextures) then
begin
textureBox := xpTextures[0].bounds;
currentXP := ogl.getChars(IntToBox(textureBox.X1 - 150, textureBox.Y1, textureBox.X2, textureBox.Y2)).toString();
position := pos('xp', currentXP);
if (position > 0) then
begin
currentXP := '*' + currentXP;
currentXP := between('*',' +', currentXP);
end;
result := strToIntDef(extractFromStr(currentXP, numbers), 0);
end;
end;
{PROCEDURE -- getTime
Purpose: Translates ms to a readable format.
Comments: Written by Ross.}
function getTime(time: uint32): string;
var
h, m, s: integer;
begin
s := time mod 3600000 mod 60000 div 1000;
m := time mod 3600000 div 60000;
h := time div 3600000;
result:= (toStr(h) + ' h ' + toStr(m) + ' m ' + toStr(s) + ' s');
end;
{PROCEDURE -- progressReport
Purpose: Calculates and paints progress on the screen.
Comments: None.}
procedure progressReport();
var
gainedXP, gainedRespect, gainedXPPerHour, gainedRespectPerHour: extended;
gainedXPString, gainedXPPerHourString: string;
time: string;
begin
time := getTime(getTimeRunning());
gainedXP := checkXP() - startingXP;
gainedXPPerHour := Round(gainedXP * (3600.0 / (GetTimeRunning / 1000.0)));
gainedXPString := format('%n', [gainedXP]);
gainedXPPerHourString := format('%n', [gainedXPPerHour]);
setLength(gainedXPString, length(gainedXPString) - 3);
setLength(gainedXPPerHourString, length(gainedXPPerHourString) - 3);
if SHOW_PAINT then
begin
smart.graphics.drawBitmap(scriptPaintBMP, Point(3, 461));
smart.graphics.drawText(ToStr(time), 'smallChars', Point(127, 517), 1);
smart.graphics.drawText(ToStr(time), 'smallChars', Point(126, 516), clWhite);
smart.graphics.drawText(gainedXPString + ' XP', 'smallChars', Point(114, 538), 1);
smart.graphics.drawText(gainedXPString + ' XP', 'smallChars', Point(113, 537), clWhite);
smart.graphics.drawText(gainedXPPerHourString + ' XP','smallChars', Point(114, 560), 1);
smart.graphics.drawText(gainedXPPerHourString + ' XP','smallChars', Point(113, 559), clWhite);
end;
end;
{PROCEDURE -- waitToBank
Purpose: Waits while potions are being made.
Comments: None.}
procedure waitToBank;
var
cd: tcountdown;
begin
ClarityDebug('Waiting for potion mixing to finish.');
cd.setTime(random(29000, 33000));
repeat
if nextRotateCamera.isFinished() then
begin
//minimap.setDegrees(random(360));
nextRotateCamera.setTime(random(300000));
end;
didNotMix := 0;
until (production.hasProduction() = 'progress') = false;
progressReport;
useBankChest;
end;
{PROCEDURE -- mainLoop
Purpose: Script main loop.
Comments: None.}
procedure mainLoop;
var
reaction: procedure() = @doNothing;
begin
if (not nextReaction.isFinished()) then
exit;
if bank.hasBank() and ogl.getModels(4264156587).indexes then
begin
presetString := '1';
reaction := @withdrawPreset
end
//else if bank.hasBank() and (not ogl.getModels(4264156587).indexes) then
// begin
// presetString := '2';
// reaction := @withdrawPreset
// end
else if (production.hasProduction() = 'progress') = false then
begin
if (production.hasProduction() = 'production') then
begin
reaction := @makePotions;
end
//else if (inventory.getItems(52275, 854794).indexes and (not ogl.getModels(4264156587).indexes)) then
// reaction := @placeWell
else if ogl.getModels(4264156587).indexes and inventory.isFull() then
reaction := @useWell
else if ogl.getModels(BANK_MODEL_ID).indexes then
reaction := @useBankChest;
end
else
reaction := @waitToBank;
reaction();
end;
{PROCEDURE -- autoUpdateMe
Purpose: Autoupdates the script.
Comments: By Shuttleu, modified by Ashaman88 and Clarity}
procedure autoUpdateMe;
var
Neifile: Integer;
OnlineVersion, NewScript, NeiFeilNennen: string;
begin
ClarityDebug('Checking for script updates...');
OnlineVersion := GetPage('http://pastebin.com/raw.php?i=xzkYu1a2');
ClarityDebug('Online Script Version: ' + OnlineVersion);
ClarityDebug('Local Script Version: ' + ScriptVersion) if (trim(OnlineVersion) > ScriptVersion) then
begin
ClarityDebug('Newer script version online!');
ClarityDebug('Autoupdating to newer version.');
NewScript := GetPage('http://pastebin.com/raw.php?i=wxtDh8Vr');
NeiFeilNennen := ScriptPath + 'ClarityWells v' + OnlineVersion + '.simba';
Neifile := Rewritefile(NeiFeilNennen, true);
try
WriteFileString(Neifile, NewScript);
except
begin
ClarityDebug('Fatal error writing to ' + NeiFeilNennen + '!');
Terminatescript;
end;
end;
CloseFile(Neifile);
ClarityDebug('New script downloaded to ' + NeiFeilNennen + '! Terminating old script, please use the new version.');
writeln('New script downloaded to ' + NeiFeilNennen + '! Terminating old script, please use the new version.');
TerminateScript;
end
else
ClarityDebug('You have the latest version of the script!');
end;
{PROCEDURE -- checkForFiles
Purpose: Checks to see if file downloading is required.
Comments: By Kevin, modified by Clarity}
procedure checkForFiles(filePath, message, link: string);
var
progFile: longInt;
fileName: string;
begin
fileName := AppPath + filePath;
try
if not fileExists(fileName) then
begin
ClarityDebug('-- INSTALLATION STATUS: ' + message + ' does not exist - Downloading now.');
progFile := createFile(fileName);
end
else
begin
ClarityDebug('-- INSTALLATION STATUS: ' + message + ' exists.');
exit;
end;
closeFile(progFile);
progFile := rewriteFile(fileName, false);
writeFileString(progFile, getPage(link));
ClarityDebug('-- INSTALLATION STATUS: ' + message + ' has been downloaded.');
finally
if (progFile > 0) then
closeFile(progFile);
end;
end;
{PROCEDURE -- installClarityWellsAssets
Purpose: Determines whether files exist and dictates their installation.
Comments: None.}
procedure installClarityWellsAssets;
begin
ClarityDebug('Please wait...now installing ClarityWells image assets to your computer...');
if not directoryExists(appPath + 'scripts/ClarityWellsImages/') then
begin
try
createDirectory(appPath + 'scripts/ClarityWellsImages/');
ClarityDebug('Created a new folder in Simba/Scripts/');
except
end;
end;
checkForFiles('scripts/ClarityWellsImages/scriptpaint.png', 'Script Paint', 'http://i.imgur.com/8ng7x2n.png');
end;
{PROCEDURE -- freeBMP
Purpose: Frees bitmaps used in the script.
Comments: None.}
procedure freeBMP();
begin
freeBitmap(scriptPaintBMP);
end;
begin
addOnTerminate('freeBMP');
clearDebug();
ogl.setup(800, 600);
ogl.setCacheTime(120);
ogl.setColourTolerance(2);
ogl.setDebugMode('none');
autoUpdateMe;
installClarityWellsAssets();
if SHOW_PAINT then
begin
scriptPaintBMP := loadBitmap(appPath + '/Scripts/ClarityWellsImages/scriptpaint.png');
fastReplaceColor(scriptPaintBMP, 0, 1);
end;
startingXP := checkXP();
ClarityDebug('Starting XP was set as: ' + toStr(checkXP));
rightClick := random(RIGHT_CLICK_CHANCE - 1, RIGHT_CLICK_CHANCE + 1);
if (rightClick < 0) then
rightClick := 0;
nextReaction.setTime(random(MINIMUM_REACTION_WAIT, MAXIMUM_REACTION_WAIT));
repeat
mainLoop;
until false;
end;
I have a script called AIO Portable-O-Matic that will do exactly what you want to do.
It's in my signature, or you can find it in the multi skill section
Man16
06-16-2016, 03:32 AM
I have a script called AIO Portable-O-Matic that will do exactly what you want to do.
It's in my signature, or you can find it in the multi skill section
Thank you, god bless.
redgiant61
06-20-2016, 04:58 PM
Due to lag, sometimes it opens up a bank and clicks the preset but it doesnt actually withdraw a preset. Just keeps the same inventory. The script then clicks on the well and cant make any pots and is thus stuck. Would it be possible to add a failsafe where the script looks for a user defined raw material like clean avantoe in inventory before proceeding to click the well? or being able to re bank if its unable to make anything at the well for say 10 secs.
panpetter111
03-11-2017, 03:37 PM
Script has gained alot of levels for me :)
notcoyeks
02-23-2018, 02:45 AM
Thanks for this, working really well so far :):thumbsup:
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.