SRL Archive - RS3 Outdated / Broken Scripts

The Pot maker


kanah

2011-11-08 19:22:28

This script mines clay and crafts any clay f2p item in GunnersGrund.
Works as of 2/9/12

WELCOME TO PROJECT STOP WORLD HUNGER
* THE MILLER *
* THE POT MAKER *
* THE LUMBRIDGE CHEF *
This is the second script in solving the hunger problem; pots are somewhat hard to buy at the G.E. therefore this script can enable you to craft the pots needed by The Miller

THE POT MAKER:


INSTRUCTIONS:
* Start in Varrock West Bank or at the clay mine or at the well or in the crafting hut with pickaxe
* Set up your player information and SRL stats
* Enter how many loads u want to do (in declare player section)
or enter the level goal, and set the boolean to check
for level instead of loads
* Decide for each player whether or not to bank
* Decide what item to craft and maybe even a modifier (for fastest xp use the best modifier)
* You can adjust the type of anti as well (in Const section)
* SPS is optional, you can instead us ObjDTM walking remove or comment out line #5 which contains "{$DEFINE USEOBJDTM}" to use SPS
* To use ObjDTM walking you need to have version 7 or later get here

Items that can be crafted:
'pot'
'pie dish'
'bowl'
'cracked cooking urn'
'fragile cooking urn'
'cooking urn'
'cracked fishing urn'
'fragile fishing urn'
'fishing urn'
'cracked mining urn'
'fragile mining urn'
'mining urn'
'cracked smelting urn'
'fragile smelting urn'
'smelting urn'
'cracked woodcutting urn'
'fragile woodcutting urn'
'woodcutting urn'
'impious urn'
'accursed urn'

Item Modifiers
'random' - this makes a random item
'best' - this makes the item with the most xp per clay
'' - normal mode, makes the item you specified
'no craft' - the mines the clay, softens it and banks it
(added this when soft clay reached over 400 gp on GE)

Future plans:
  • Add another walking backup method
  • Add P2P pottery (if I can get an account to use)
  • Improve mining functions (the rocks have changed allot since I wrote this)


Revision Log:
Rev18 - modified walk to bank to skip the crafting hut if no craft is set

Rev17 - Fixed error in AtMine (UpText changed because of rs update)

Rev16 - Added backup for well finding (Had trouble finding well when north of well)
- IsItemSelected() added: it checks for the white outline
- Updated Colors used for mining

Rev15 - Banking update
- Level Checking restored

Rev14 - SRL-5 update
- Retrieving level problems in SRL bypassed
- ChooseOption problems in SRL ignored
(Script probably will not work without ChooseOption support)

Rev13 - Update ObjDTM path to well, still needs work use sps walking
- Added new modifier 'no craft'
- No tool belt support; just equip the bronze pickaxe

Rev12 - Check4Pickaxe stopped working, no longer checking XYZ color space
- improved oven and well DTMS

Rev11 - Changed some item dtms
- Object DTM walking now
- changed how bridge is crossed and detected
- new AtCraft function
- re enabled screen rotation functions

Rev10 - Updated SPS paths (an updated in SPS added an offset to the pixel locations)
- Checks for useable pickaxe, gets one out of bank if you dont have one
- More efficient level tracking (no longer has to change tab and examine the level)

Rev9 - Fixed breaking (Never actually tested it enough to see this failure)
forgot to set up the time array Clock

Rev8 - Using SRL values now for inventory (MIX1…)
- No more compass rotation in crafting function
- Level goal or loads
- loads done bug fixed (Wouldn't log out if drop = true)
- another error in SRL stats fixed
- modifiers allow best xp, normal, or random item creation
- Now checks Character Level to see if it is possible to make an item
if an invalid item is specified then crafting goes random
- SRL compass functions are failing; so they are left out of this revision
Rev7_1 - Fixed SRL Stat bug
- Fixed soft bowl dtm (Sometimes the left and top were cut off)

Rev7 - The rest of the f2p Urns added

Rev6 - Added Additional items for crafting (Most of the urns are ready to go)
- Corrected XP for the additional items
- Fixed loop counter bug (forgot to add increment when items got dropped)

Rev5 - Added dropping as an option
- added frame work for multiple crafting item support
- pin support

Rev4 - Progress Reports added
- SRL Stats added

Rev3 - Add Multiplayer
- Add Antiban
- Add Antirandoms
- Load counter
- More Debug info
- Removed Infinite loops from soften clay

Rev2 - Single player stable

Tickyy

2011-11-10 19:38:16

Your skills are great, but nobody will use this probably, try to make something that gets more attention!

Great work tho.

Sir R. M8gic1an

2011-11-10 20:16:18

Or enable it to craft other things as well, some people might appreciate the crafting levels.

-RM

Kyle Undefined

2011-11-10 22:31:58

Maybe it's for crafters with low levels :P Either way, this is a great script!

nokkasiili

2011-11-15 12:29:41

Other items and option to drop would make this very beast crafting script

kanah

2011-11-19 20:21:25

Finally done adding all f2p clay crafting abilities. Plus the option to drop instead of bank.

nokkasiili

2011-11-20 03:11:22

From: kanah
Finally done adding all f2p clay crafting abilities. Plus the option to drop instead of bank.


thank you i will use it tomorrow :spot:

edit: i got 40crafting for 5 account worked very well ( 10 accounts to go )
some automode for selecting best item to craft would make big improve in usabilty thought

Swagger

2011-11-25 20:05:39

Wow, very impressive script, thanks a lot! Running without a problem , and overall seems to flow very smoothly. Using it to get my low crafting up. Love its' self-sufficiency!
Thanks a lot for this.
Rep +
E: Actually there is one slight problem, but it doesn't totally stop the script.
Screen Shot:
Basically what happened was that it kept trying to soften the clay on the Stronghold of Security entrance instead of on the well. After about a minute it fixed itself.
Hope the screen shot isn't too small….
E2: It also has a problem with dropping pots. It miscalculates how many there are in the inventory, but the biggest problem is that it sometimes right clicks it activating "use pot" and then messes up dropping all the other pots. This seems to cause it to continuously click between two pots, and most of the time leave pots in the inventory not dropped.
Screen shot:
Still a great script though ;).

kanah

2011-11-26 14:52:37

The newest update includes an option that crafts the optimal item for your characters current level; a character at level 34 crafting with a mithril pick averages about 9000 crafting xp/hr .

I created a cool excel spread sheet that automatically determined what object is the best to make at a particular level; if you’ve never seen an excel "program" check it out.

Swagger

2011-11-26 19:04:31

Will check out the new script and tell you how it goes, thanks.
Proggy:
=========== THE Pot Maker =============
Time Running 2:42:45
Current action: Dropping Everything
Level Goal: 41 / 99
Mining xp: 2585
Crafting xp: 29460
=======================================
It seemed to have stopped because of a RuneScape update.

Fire Monkey

2011-11-28 17:20:43

Cheers for the PM kanah - I thought it was broke because of the compile error but it's working fine.

It's a great script, can't thank you enough for making this.. will get me 55-61 in no time :)

e2: When making the clay soft it walks up past the fountain and takes quite a while to detect it. Also, when walking to craft the clay, most of the time it clicks a point in the map where the pottery wheel isn't visible. The script then logs.

Fire Monkey

2011-12-05 16:57:09

Thanks for the fix Kanah - working perfectly now, very fast :D

Over 100KB in size now and packed full of impressive little features, awesome! :)

Again, thanks for the crafting levels, much appreciated.

The Banker

2011-12-10 13:47:12

sounds great, but doesen't work for me :(


Warning: In file C:\Users\Arbeitspc\Desktop\Simba\Includes\SRL/SRL/core/text.scar: at row: 579, col: 7, pos 22634: ChooseOption is NOT accelerated
[Hint] (862:3): Variable 'TP' never used at line 861
[Hint] (1027:3): Variable 'X' never used at line 1026
[Hint] (1027:3): Variable 'Y' never used at line 1026
[Hint] (1023:10): Variable 'Result' never used at line 1022
[Hint] (1070:3): Variable 'X' never used at line 1069
[Hint] (1070:3): Variable 'Y' never used at line 1069
[Hint] (1165:3): Variable 'RANDOMNUM' never used at line 1164
[Hint] (1225:3): Variable 'X' never used at line 1224
[Hint] (1225:3): Variable 'Y' never used at line 1224
[Hint] (1226:3): Variable 'NEXT2WELLDTM' never used at line 1225
[Hint] (1251:3): Variable 'RANDOMNUM' never used at line 1250
[Hint] (1327:3): Variable 'X' never used at line 1326
[Hint] (1327:3): Variable 'Y' never used at line 1326
[Hint] (1328:3): Variable 'HOUSEDTM' never used at line 1327
[Hint] (1328:3): Variable 'HOUSECOLOR' never used at line 1327
[Hint] (1328:3): Variable 'ROADCOLOR' never used at line 1327
[Hint] (1371:3): Variable 'SOFTCLAYDTM' never used at line 1370
[Hint] (1800:3): Variable 'X' never used at line 1799
[Hint] (1800:3): Variable 'Y' never used at line 1799
[Hint] (1801:3): Variable 'NEXT2MINEDTM' never used at line 1800
[Hint] (1802:3): Variable 'NEXT2BRIDGEDTM' never used at line 1801
[Hint] (1846:3): Variable 'X' never used at line 1845
[Hint] (1846:3): Variable 'Y' never used at line 1845
[Hint] (1847:3): Variable 'INBANKDTM' never used at line 1846
[Hint] (1847:3): Variable 'ROADCOLOR' never used at line 1846
[Hint] (1847:3): Variable 'BANKCOLOR' never used at line 1846
[Hint] (1848:3): Variable 'NEXT2BRIDGEDTM' never used at line 1847
[Hint] (1850:3): Variable 'WATERLOCATIONS' never used at line 1849
[Hint] (1913:3): Variable 'NEXT2MINEDTM' never used at line 1912
[Hint] (1916:3): Variable 'LOOPCOUNT' never used at line 1915
[Hint] (2013:3): Variable 'I' never used at line 2012
[Hint] (2018:3): Variable 'WATERLOCATIONS' never used at line 2017
[Error] (2344:9): Unknown identifier 'FindColorsToleranceOptimised' at line 2343
Compiling failed.

Fire Monkey

2011-12-10 14:32:34

From: The Banker
sounds great, but doesen't work for me :(


Warning: In file C:\Users\Arbeitspc\Desktop\Simba\Includes\SRL/SRL/core/text.scar: at row: 579, col: 7, pos 22634: ChooseOption is NOT accelerated
[Hint] (862:3): Variable 'TP' never used at line 861
[Hint] (1027:3): Variable 'X' never used at line 1026
[Hint] (1027:3): Variable 'Y' never used at line 1026
[Hint] (1023:10): Variable 'Result' never used at line 1022
[Hint] (1070:3): Variable 'X' never used at line 1069
[Hint] (1070:3): Variable 'Y' never used at line 1069
[Hint] (1165:3): Variable 'RANDOMNUM' never used at line 1164
[Hint] (1225:3): Variable 'X' never used at line 1224
[Hint] (1225:3): Variable 'Y' never used at line 1224
[Hint] (1226:3): Variable 'NEXT2WELLDTM' never used at line 1225
[Hint] (1251:3): Variable 'RANDOMNUM' never used at line 1250
[Hint] (1327:3): Variable 'X' never used at line 1326
[Hint] (1327:3): Variable 'Y' never used at line 1326
[Hint] (1328:3): Variable 'HOUSEDTM' never used at line 1327
[Hint] (1328:3): Variable 'HOUSECOLOR' never used at line 1327
[Hint] (1328:3): Variable 'ROADCOLOR' never used at line 1327
[Hint] (1371:3): Variable 'SOFTCLAYDTM' never used at line 1370
[Hint] (1800:3): Variable 'X' never used at line 1799
[Hint] (1800:3): Variable 'Y' never used at line 1799
[Hint] (1801:3): Variable 'NEXT2MINEDTM' never used at line 1800
[Hint] (1802:3): Variable 'NEXT2BRIDGEDTM' never used at line 1801
[Hint] (1846:3): Variable 'X' never used at line 1845
[Hint] (1846:3): Variable 'Y' never used at line 1845
[Hint] (1847:3): Variable 'INBANKDTM' never used at line 1846
[Hint] (1847:3): Variable 'ROADCOLOR' never used at line 1846
[Hint] (1847:3): Variable 'BANKCOLOR' never used at line 1846
[Hint] (1848:3): Variable 'NEXT2BRIDGEDTM' never used at line 1847
[Hint] (1850:3): Variable 'WATERLOCATIONS' never used at line 1849
[Hint] (1913:3): Variable 'NEXT2MINEDTM' never used at line 1912
[Hint] (1916:3): Variable 'LOOPCOUNT' never used at line 1915
[Hint] (2013:3): Variable 'I' never used at line 2012
[Hint] (2018:3): Variable 'WATERLOCATIONS' never used at line 2017
[Error] (2344:9): Unknown identifier 'FindColorsToleranceOptimised' at line 2343
Compiling failed.


That's just old code that Kanah has kept incase he needs to make any changes in future - it will be easier to modify his script.

It should still compile successfully - I tried it just now and it does.

I think FFlag is still broken in SRL so walking might be slightly off. It's a great script though, when I was using, it ran for the full 6 hours without any hiccups.

WT-Fakawi

2011-12-10 14:50:25

3k lines of nice code! Cuppyfied!

euphemism

2011-12-10 18:50:02

From: The Banker
sounds great, but doesen't work for me :(

[Error] (2344:9): Unknown identifier 'FindColorsToleranceOptimised' at line 2343
Compiling failed.


You are using Simba 998. Wizzup? removed the Find*Optimised functions. Kanah will have to replace all instances of that function with FindColorsTolerance. You can do it yourself, they accept similar parameters.

The Banker

2011-12-10 20:03:46

Sadly i don't know anything about scripting, still trying to learn, but… will take a lot of time ^^


(meaning can't get it working, don't know what to do :) )

kanah

2011-12-17 03:12:36

Originally Posted by The Banker
when i try to compile it, it compiles succesful but by pressing run the following is written it the debug box:


SRL Compiled in 32 msec
SMART Initialized.
Loaded: Server 5, Members: False, Signed: True, Super Detail: False.
Error: Out Of Range at line 140
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]


Hmmm… Which line was highlighted orange? If it was the pot maker's line 140
" Players.Name := ''; "

Then that means you may have changed the variable HowManyPlayers (which is defined on line 124) to 1. You need to either change HowManyPlayers back to the default value of 2 (this is because lines 140 through 148 show you how to set up other players) or erase lines 140-148 and make HowManyPlayers := 1.

So my suggestion to set up step…
1. Redownload the potmaker.simba
2. Edit line #140,141,144 with your character information
3. Enter your SRL stats information in line #200,201
4. Press run… It should work, I just tried it

If you do this your character should make the best item possible and drop it until he reaches level 60. I'm also going to post this information to the thread just in case anyone else is having this issue.

Omar

2011-12-17 08:08:49

Hey does This script Still work? please respond :D

euphemism

2011-12-17 09:26:08

From: badreddine
Hey does This script Still work? please respond :D


Yes. This script is being actively updated.

kanah

2011-12-17 09:27:04

Yes this script works.

sigh… you beat me by a minute

e: Come to think of it maybe I should post some progress reports at the top of the thread.

funnyman9292

2011-12-18 12:40:14

=========== THE Pot Maker =============
Time Running 0:38:7
Current action: Lost
Trips completed: 3 / 30
Mining xp: 405
Crafting xp: 972
=======================================
The bot gets lost alot..sometimes behind the fence near the well! other times SE of clay mine near dead trees… I cant get past 1-2 loads usually without it getting lost

kanah

2011-12-18 20:54:25

Hmmm… I've heard a couple complaints about the walking lately. I will take another look at the walking system. In the meantime you could try using SPS walking instead, comment or erase line #5 which tell it to use objdtm walking {$DEFINE USEOBJDTM}

oligofren

2011-12-23 01:30:35

i commented out {$DEFINE USEOBJDTM} and it is working fine, have done few loads already

I am making smelting urns and banking them for use in smithing

problems i run in:
1. if rune pickaxe is already equipped it would confuse the bot, and we have bronze pickaxe in toolbelt that we can use for mining
2. if the bot gets gems it would keep gems banking only urns, solution might be to use deposit all button, (i consider that we use pickaxe in toolbelt or have a pickaxe equipped)

it seems jagex added greater variation in colors, because the script failed to find well, then pot wheel, then oven, after editing colors the script run very well

Time Running 1:13:54
Current action: Walk to Mine
Level Goal: 48 / 60
Mining xp: 1400
Crafting xp: 8680

kanah

2011-12-23 08:19:05

Updated some of the item finding. In particular the xyz color space for finding the pickaxe stopped working so now only using HSL and RBG checks

Toolbelt support will be added in Rev13 as well as another backup walking method. Good to see R11 is still usable

kanah

2012-01-02 17:03:13

With soft clay now reaching record highs (over 400 gold); I've released another option for the potmaker: 'no craft' - which does no crafting. It mines the clay, softens it, and deposits it. I did a real quick edit (I only had to change a couple lines of code) so there's not a walking path directly from the well to the bank, she'll make a trip to the pottery wheel before she goes to the bank.





Progess Report: (Stopped because I lost internet connection)
=========== THE Pot Maker =============
Time Running 0:44:3
Current action: Walk to well
Trips completed: 8 / 30
Mining xp: 770
Crafting xp: 0
=======================================

superpro1998

2012-01-09 12:13:04

everytime i start it, this error appears:

The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

kanah

2012-01-12 00:53:09

From: superpro1998
everytime i start it, this error appears:

The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]


Interesting, is that the only information that appears in the debug window? I need a little more info to figure out what is wrong.

Whatmatters

2012-01-13 00:48:53

Since you added an option to omit crafting, shouldn't there also be measures to omit the steps that take it to the hut to craft? As it is, it still walks there while no crafting is on.

Your banking and musician option choosing don't work anymore because of the added dashes and probably font changes now as well :(.

SRL-5 is probably necessary at this point.

Firefighter_Emt18

2012-01-14 01:16:39

tries to click on the musician and will hover over it then repeatedly try and click him, is there something i am doing wrong

kanah

2012-01-14 07:54:46

From: Firefighter_Emt18
tries to click on the musician and will hover over it then repeatedly try and click him, is there something i am doing wrong


I will take a look at this problem once I get settled in my new operating system. I just made the switch to Linux Ubuntu. So far everything seems so foreign, windows was just so straight forward. Simba is finally working through WINE, expect an update/fix to this problem within a few days.

Nfskingvviper

2012-01-14 08:32:35

Mine seems to have a problem dropping… I'm making urns with a pickaxe in my inventory and I think the issue is that 1 clay is left unmoulded. (Due to lacking another clay because of the pickaxe)

kanah

2012-01-14 08:51:41

From: Nfskingvviper
Mine seems to have a problem dropping… I'm making urns with a pickaxe in my inventory and I think the issue is that 1 clay is left unmoulded. (Due to lacking another clay because of the pickaxe)


Is it dropping the urns? When crafting urns it will not drop (or bank) the extra 1 clay left in your inventory. So keeping 1 in your inventory is not a problem :)

Stanmaer

2012-01-15 15:09:59

Is this not SRL-5 yet?

kanah

2012-01-18 05:55:43

Revision 13 is not SRL-5 compatible, and the error with trying to find the musician is an error in the ChooseOption function.

So version 14 will include a faster fail-safe for ChooseOption failing and SRL-5 compatiblity. It's important to note that the script will not function without a working ChooseOption function.

SRL's level checking function is also not working today so mining/crafting level can't be checked; so don't choose the level goal option.

Stanmaer

2012-01-18 16:50:19

Isn't recognizing my already equipped pickaxe, also doesn't craft the correct urn, it seems to craft whatever urn it feels like making. Sometimes it drops the urns after making them, like I want it to, and sometimes it decides to bank them instead.

kanah

2012-01-19 23:42:06

From: Stanmaer
Isn't recognizing my already equipped pickaxe, also doesn't craft the correct urn, it seems to craft whatever urn it feels like making. Sometimes it drops the urns after making them, like I want it to, and sometimes it decides to bank them instead.



Level recognition is not working (I'm using the SRL get skill level function), so it checks to see if your level is high enough to craft something has determined that the item you specified can't be made and has therefore set your item to 'random' (see line #3087 - 3088). Delete those line and you should be fine.

kanah

2012-01-31 18:55:46

If you can't get this to work or you want a more straight forward clay miner and banker try kbClayMiner. kbClayMiner works in the same area: mining the clay and banking it in Varrock.

Tripstripper

2012-02-03 17:46:16

haha im new to simba and when i run i get this error.

msvcr71 cannot be found?

kanah

2012-02-03 23:11:20

From: Tripstripper
haha im new to simba and when i run i get this error.

msvcr71 cannot be found?


A solution to this problem is listed in this tread: common SRL problems

lays

2012-02-08 16:03:17

could you add decorated urns crafting to the script it would rock currently having fun with narcles smelter and gold bars but might be switching over soon ?

grtz

kanah

2012-02-09 18:35:35

From: lays
could you add decorated urns crafting to the script it would rock currently having fun with narcles smelter and gold bars but might be switching over soon ?

grtz


Decorated urns are a members only crafting object; I don't have a mem account so I will not be working on adding that feature yet. If anyone would like to help me add that feature feel free to modify my code and add those member's objects.

What would be necessary for adding decorated urns?
  1. Add the necessary dtms to GetItemDTM(…)
  2. Check the decision matrix used for the crafting menus in CraftPots to verify that it works with the additional member's objects.
  3. Add the necessary entries to GetCraftXp, SelectBestItem2Craft, IsItemCraftable, and SelectRandomItem2Craft. These entries would include basically that the item exists and it's required level or xp rate.

Overall it should take another 3 to 4 hours to add all of the member's crafting items as long as you are good at making DTMs.

One final note, I've not been that active lately so expect an update of this code within a week as well as the release of my final script in this series the LumbridgeChef coming to the members only script section this Spring.

kanah

2012-02-09 21:35:32


=========== THE Pot Maker =============
Time Running 0:26:38
Current action: Walk to Mine
Trips completed: 5 / 30
Mining xp: 405
Crafting xp: 0
=======================================

Results from my latest test of Rev15; did 4 loads of banking soft clay. The mining needs to be improved but overall it still works nicely. Expect an update to the mining in Rev16 as well as a dedicated path from the well to the bank no more of this running to the crafting hut first.

Greomareh

2012-02-10 21:50:35

When you step below the 1st of the two bottom rocks, the script thinks it is lost and not at the mine.

Then it failed to find the well. I don't know what to suggest, because I'm a noob, but the script gets lost a little too easily.

kanah

2012-02-12 17:11:37

From: Greomareh
When you step below the 1st of the two bottom rocks, the script thinks it is lost and not at the mine.

Then it failed to find the well. I don't know what to suggest, because I'm a noob, but the script gets lost a little too easily.


Okay, I addressed the Well finding problem by adding a backup method. Some of my functions are getting a little dated most were written in September 2011 before the bot nuke and subsequent updates. My location detection functions are custom built the mine detection is done in the function AtMine:

function AtMine (UseBackup: Boolean):Boolean;
//Locates mining rocks and dead trees to see if at clay mine
var
RockColor,TreeColor,i,Len,match,dist: integer;
RockTPA,TreeTPA: TPointArray;
RockATPA,TreeATPA: T2DPointArray;
RockTP,TreeTP: TPoint;
begin
Result := false;
RockColor := 5341329;
TreeColor := 2238252;
match := 0;

//Find all the Rock colors and Tree colors
if (FindColorsTolerance(RockTPA,RockColor,MSX1,MSY1,MSX2,MSY2,5)) and
(FindColorsTolerance(TreeTPA,TreeColor,MSX1,MSY1,MSX2,MSY2,5))then
begin
//Found some colors, group them
RockATPA := SplitTPAEx(RockTPA,13,13);
SortATPASize(RockATPA,true);
TreeATPA := SplitTPAEx(TreeTPA,40,40);
SortATPASize(TreeATPA,true);

//Cutt off ones that are too small
Len := length(RockATPA);
writeln('Groups of Rocks: '+tostr(Len));

writeln('Number of tree points: '+tostr(length(TreeATPA[0])));
if (Len >= 4)and(length(TreeATPA[0])>700)and(Len <=6) then
begin
//go from largest tree
TreeTP := MiddleTPA(TreeATPA[0]);
//MMouse(TreeTP.x,TreeTP.y,0,0);
//Now Look at the rock to tree distance relation
for i := 0 to (Len-1) do
begin
RockTP := MiddleTPA(RockATPA[i]);
dist := Distance(TreeTP.x,TreeTP.y,RockTP.x,RockTP.y);
writeln(tostr(i)+' dist = '+tostr(dist));
if (dist >100) and(dist<320) then
Inc(match);
end;

if (match >= 4) then
Result := true;
end;
end;

if not(Result) and(UseBackup) then
begin
RockColor := 7844821;
if (FindObj(RockTP.x,RockTP.y,'ine Rock',RockColor,10)) then
Result := true;
end;
if (Result) then
begin
writeln('Found mine');
end else
writeln('Failed to find mine');
end;

This counts the rocks and measures the distance between the dead trees and the rocks. Since it uses the main screen it could fail due to NPC's and other characters clothing colors so be sure to dress appropriately. It works for me; I will post a progress report for Rev16 in a few hours when it either stops or I force quit it.

Test run: making bowls, level goal 60, and banking the bowls.

=========== THE Pot Maker =============
Time Running 1:27:21
Current action: Lost
Level Goal: 51 / 60
Mining xp: 1350
Crafting xp: 8910
=======================================

Got lost next to mine field; I'll need to figure out what caused it to fail

Remember you can always see how many people are using this script successfully at the SRL stats page

Greomareh

2012-02-12 21:56:01

I'll test it out, thanks.

Perhaps the script does not need to figure out where it is, as the walking functions are perfect? When I was using it earlier it was always where it had to be, but it just didn't know it.

Edit: After 3 runs from the bank, it managed to find the mine and get a full inventory each time. But it couldn't seem to find that darned well. The color of the village must make detection difficult…

kanah

2012-02-12 22:24:39

From: Greomareh
I'll test it out, thanks.

Perhaps the script does not need to figure out where it is, as the walking functions are perfect? When I was using it earlier it was always where it had to be, but it just didn't know it.


These location checks are there as backups for everything; I don't trust SPS to work every time (although it's getting pretty reliable). Also a random might have occurred that is not detected by find normal randoms; this would help avoid a ban. Of course it is annoying when the location checking fails but I'd rather the character log out then get banned. I don't know why the backup detection is failing. It only looks for the rocks. More testing is needed. I'm finally working full time (a nice shiny office job) so I probably won't get to work on this till next weekend.

kanah

2012-02-13 20:18:08

Found error in mine detection: the backup method relied on old uptext 'ine Roc' which is incorrect since rs now displays 'mine Clay rocks' instead. Rev 17 fixes this problem

raiderbwoi

2012-02-14 22:56:59

how can I enter my stats or set it up? It works but its trying to make a pie dish instead of pot and thats lvl 8 but im only lvl 1 :/

kanah

2012-02-15 21:07:47

From: raiderbwoi
how can I enter my stats or set it up? It works but its trying to make a pie dish instead of pot and thats lvl 8 but im only lvl 1 :/


Show me your set up options. I suggest you use the best option, and turn on dropping for the best xp rate. IDK why it would be making pie dishes on you.

helpmeman

2012-02-18 19:52:08

How do I make it check equipped items for pickaxe? It only seems to work when the pic is in inventory….

Also, how do I get it to fire urns?

kanah

2012-02-18 23:12:12

From: helpmeman
How do I make it check equipped items for pickaxe? It only seems to work when the pic is in inventory….

Also, how do I get it to fire urns?


There's no such thing as "fire" urns; you'll need to look up what urns are made using fire runes on the runescape website.

Also the inventory colors and layout has changed quite allot since I wrote the functions for checking it. You may consider bypassing that check all together. Look for this:

    if not Check4Pickaxe then
begin
writeln('No pickaxe found, trying to get one from bank');
if not(Try2GetPick) then
begin
Logout;
Players[CurrentPlayer].Active := false;
Inc(CurrentPlayer);
end;
end;

That is the check for pickaxe statement. Erase it or comment it out to avoid the check.

euphemism

2012-02-19 01:00:26

From: kanah
There's no such thing as "fire" urns.


I believe he is meaning "fire" as in "to bake".

helpmeman

2012-02-19 23:22:01

From: euphemism
I believe he is meaning "fire" as in "to bake".


Lol ya, I want it to cook the urns in the pottery oven.

kanah

2012-02-20 02:25:28

It should fire the urns automatically; although if it uses the northern pottery wheel sometimes it fails to find the oven. I'll need to look in to why it fails sometimes.

Cortal

2012-03-19 13:20:41

Man I love this script :D I think its the best, most versitile crafting script out there to get your crafting up ^^

I used it for a bit, and loved it. The only problem is I keep getting the ys error, and after I mine the clay, I go to the well, and the bot gets lost standing next to the well and turns off x.x

EDIT: Ok so it just cant seem to detect the well, via SRL or ObjectDTM

kanah

2012-03-19 19:46:26

From: Cortal
Man I love this script :D I think its the best, most versitile crafting script out there to get your crafting up ^^

I used it for a bit, and loved it. The only problem is I keep getting the ys error, and after I mine the clay, I go to the well, and the bot gets lost standing next to the well and turns off x.x

EDIT: Ok so it just cant seem to detect the well, via SRL or ObjectDTM


I write my own custom location detection: well location checking is done in the function AtWell() see code below. I see how there might be some problems considering all the updates that have occurred since its inception. The colors may need to be updated. You can manually update the WellColors array if you feel adventurous enough to code yourself else you can expect an update within a week. Thanks for your feedback

function AtWell (UseBackup:Boolean): Boolean;
//This function determines if we're at the well
// backup uses findobj to find the well and move to it
var
WellColors: TIntegerArray;
WellTPA,LoopTPA,RockTPA: TPointArray;
WellATPA,RockATPA: T2DPointArray;
dist,i,Len, RockColor,WellDTM: Integer;
Comp1TP,Comp2TP: TPoint;
Found: Boolean;
begin
WellColors := [12966884,1316117,6715781,6062474,5799045];
RockColor := 4022382;
Len := length(WellColors);
Result := false;

//Find all the well colors
Found := false;
for i := 0 to (Len-1) do
begin
if (FindColorsTolerance(LoopTPA,WellColors[i],MSX1,MSY1,MSX2,MSY2,5)) then
begin
//WellTPA := CombineTPA(WellTPA,LoopTPA);
AppendTPA(WellTPA,LoopTPA);
Found := true;
end;
end;

if (Found) then
begin
//Get rid of duplicate points
ClearDoubleTPA(WellTPA);

//Group the points
WellATPA := SplitTPAEx(WellTPA,20,20);
SortATPASize(WellATPA,true);

//debug some things
writeln('I have '+tostr(length(WellATPA))+' groups');

//Largest one
//MMouse(MiddleTPA(WellATPA[0]).x,MiddleTPA(WellATPA[0]).y,0,0);
writeln('The largest one has a size of '+tostr(length(WellATPA[0])));
//At least 180 points is good i thinks

//Now lets look for the rock
if (FindColorsTolerance(RockTPA,RockColor,MSX1,MSY1,MSX2,MSY2,5)) then
begin
writeln('Found rock colors');
RockATPA := SplitTPAEx(RockTPA,40,40);
SortATPASize(RockATPA,true);
writeln('Num of rock groups: '+tostr(length(RockATPA)));
//writeln('The Number of Rock points are '+tostr(length(RockATPA[0])));

Len := length(RockATPA);
//Now check all the groups for some distance between them and size tolerance
//Assume largest well color collection is well
comp1TP := MiddleTPA(WellATPA[0]);

if (length(WellATPA[0])>130) then
begin
for i := 0 to (Len-1) do
begin
comp2TP := MiddleTPA(RockATPA[i]);
dist := distance(comp1TP.x,comp1TP.y,comp2TP.x,comp2TP.y);
writeln('The Number of Rock points are '+tostr(length(RockATPA[i])));
writeln('dist = '+tostr(dist));

if (dist>70)and(dist<180)and(length(RockATPA[i])>80) then
begin
writeln('Found Rock and well pair');
//MMouse(comp2TP.x,comp2TP.y,0,0);
Result := true;
break;
end;
end;
end;
end;
end;

if not(Result) and(UseBackup) then
begin
//WellDTM := DTMFromString('mWAAAAHicY2FgYHgGxFeB+AkQvwfiViDuAOLJQNwMxK72pgxtVekMdfmhDE3lKQziQDFkzIiGQQAAeLEK1Q==');
//WellDTM := DTMFromString('mQwAAAHicY2ZgYFBiZGDQBmJFIO4C8suA+DwQi4uLMdy/dpChINmeQQTIh2FGJAwEAPK6Bk8=');
WellDTM := DTMFromString('mWAAAAHicY2FgYLgDxPeBeB8QXwPiRCAOBuKdQLwCiG3N9RnuXzvIkJdox5AVZ8PwHygmgoQZ0TAIAACXCgvS');

if (FindDTMs(WellDTM,WellTPA,MSX1,MSY1,MSX2,MSY2)) then
begin
RAaSTPA(WellTPA,40);
Len := length(WellTPA);

for i:= 0 to (Len-1) do
begin
MMouse(WellTPA[i].x,WellTPA[i].y,MRAND,MRAND);
wait(100);
if (WaitUptext('/ 1 more',450)) then
begin
Mouse(WellTPA[i].x,WellTPA[i].y,MRAND,MRAND,false);
if (ChooseOption('xamine Well')) then
begin
Result := true;
Mouse(WellTPA[i].x,WellTPA[i].y,MRAND,MRAND,false);
ChooseOption('alk here');
wait(100);
FFlag(5);
break;
end;
end;
end;
end;
FreeDTM(WellDTM);
end;

if (Result) then
begin
writeln('Found well');
end else
writeln('Failed to find Well');

end;

Cortal

2012-03-20 14:03:20

Thanks ^^ I understand the coding and stuff, and I prob can do a fix of my own, I just wasnt sure if it was something as simple as you said, or a change in the simba files ^^ Now that I know I can fix that, Ill prob update the locations to get to the well and the well colors. I noticed if I make it stand next to the well it finds it, but the scripts makes it click a distance away so its next to a building instead. That most likely is the only issue.
I may have to read into objdtm to learn how to edit that last point to end up next to the well xP

EDIT: Wow im glad this happened :D Huh I might start scripting now ^^ I figured out the objectdtm thing, and its rather simple to create paths :D So I have the walking part down already :D and clicking with colors shouldnt be too hard ^^

EDIT2: Or not… xD I couldnt get the script to make my guy run from whatever rock he was to the odtm path I made x.x Like he was at the bottom clay rock, at the bottom of the mine isntead of in the middle, and the odtm couldnt be found from there x.x

EDIT3: Ok so its just the ObjectDTM stuff that needs to be updated. The way from the rocks to the well is broken, the way from the oven to the bank is broken, and I found that it has issues moving to certain rocks. While mining sometimes it randomly stops and gets the objectdtm errors.

peeweewoen

2012-05-13 22:27:28

This is incredible. one of the best scripts i've used on simba… mad props to you sir!!

EDIT: I've noticed that it sometimes gets stuck when goin to the well.
It seems to get stuck in the room directly north of the well.

bustingbuster

2012-05-26 07:52:25

can this script pie dish(unfired) into pie dish(fired)?

DivineOli

2012-06-02 05:32:35

Good job very useful for crafting levels :D

Blackdeath

2012-06-07 22:32:30

Took me a few minutes to get it working the way I wanted it to. It does bug out sometimes going to the well, but for the most part it works at getting me some quick levels while being at the low levels. Very short Proggy.

|====================================|
=========== THE Pot Maker =============
Time Running 0:19:13
Current action: Walk to mine
Level Goal: 29 / 50
Mining xp: 420
Crafting xp: 2772
=======================================

Naturiown

2012-08-28 08:39:08

[Error] D:\ZX\zx\Simba\Includes\srl/srl/misc/smart.simba(46:19): Invalid number of parameters at line 45
Compiling failed.

what happened??? i didn't change anything :/