SRL Archive - RS3 Outdated / Broken Scripts

[S]uper [S]avvy [S]mither [Simba/SCAR][SRL]


Press Play

2010-07-17 07:32:55




[SRL] [Simba/SCAR] [SMART]
uper avvy mither
by -daazndagger-

Status: Outdated
as of EoC
Version: 1.06



This script is becoming extremely expensive in terms of RSGP to run. I am now accepting RSGP donations to be able to keep the script running to it's full potential. Otherwise, my testing time is limited. PM me if you're interested. Thanks all for your support <3

I made this script in two days, so don't expect much from it :P BUT, what you can expect is that it will do its job to the best potential. It is the best (but only working) smither on the SRL forums.

Make sure you post your progress reports and give feedback so that I can fix bugs. Use it wisely; have fun!

News:
[30/01/12] Version 1.06 - new map location detection.
[05/01/12] Version 1.04 uploaded. See change log below for details
[25/11/11] Version 1.03 uploaded. Colour fix only. Next version will implement autocolour!
[20/11/11] Version 1.02 fix. If you downloaded this version prior this date, please re-download! Or see: http://villavu.com/forum/showpost.php?p=866708&postcount=21
[19/11/11] Version 1.02 released! Major rework with items; working way better than before
[06/11/11] Version 1.01 released! I am back from my usual breaks from botting and I have managed to fix the script! Keep in mind I need you to test it for me so that I can continue to keep it working :)
[17/07/10] Version 1.00 released!

Requirements:
  • You will need the latest version of Simba.
  • You will also need SRL (comes with Simba anyway).
  • For details on setting up Simba and SRL follow Coh3n's Guide.

Features:
  • Smiths at Varrock West Bank
  • Simba and SCAR compatibility
  • uses SMART (Scar Minimizing Autoing Resource Thing)
  • anti-randoms (SRL's functions)
  • anti-ban (Acts like a human)
  • smiths any bar into anything (ALL bars and items are compatible)
  • takes rests based on the time running
  • relatively quick and fast
  • supports multi-player
Note: Only steel platebodies and iron nails have been tested. But theoretically, all items should be able to be smithed.

Setup/Instructions:
  1. Setup the varibles as required. (see code below)

  2. {------------------------------------------------------------------------------]
    [ VARIBLE SETUP: ]
    [ See the thread for details. ]
    [------------------------------------------------------------------------------}
    procedure LoadGlobals;
    begin
    WhenBreak := 10; // Minutes until break
    SmithingItem := 'Platebody'; // What to make
    WithdrawBars := 25; // How many bars to withdraw
    end;

    {------------------------------------------------------------------------------]
    [ DECLARE PLAYERS: ]
    [ Change accordingly. ]
    [------------------------------------------------------------------------------}
    procedure DeclarePlayers;
    begin
    HowManyPlayers := 1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := 0;

    with Players[0] do
    begin
    Name :=''; // Username
    Pass :=''; // Password
    Nick :=''; // 3-4 lower case letters of your character's name
    Member := false;
    Active := true;
    end;
    end;
  3. Make sure you have a hammer in your toolbelt! The script does not check for it, it assumes!
  4. Make sure you have bars in the first bank slot of the first tab.
  5. Press PLAY!

Items:
These are all the smith-able items in Runescape:

Items[0] := ['Dagger', 'Hatchet', 'Mace', 'Medium helm', 'Crossbow bolts',
'Sword', 'Nails', 'Studs', 'Arrow tips', 'Scimitar',
'Crossbowlimbs', 'Longsword', 'Throwing knife', 'Full helm',
'Square shield', 'Bullseye lantern', 'Warhammer',
'Battleaxe'];

Items[1] := ['Chainbody', 'Kite shield', '2-handed sword', 'Plateskirt',
'Platelegs', 'Platebody'];

To-do list:
  • Version checker?
  • Stats?
  • Different bar choice option
  • Make faster, more 'bugless'
  • Improve walking techniques

Tips:
  • Don't minimize/restore SMART all the time because it can cause errors.
  • Check the 'News' section of this post and subscribe to the thread to keep up to date.

Version History:

[------------------------------------------------------------------------------]
[ Features/Log: | ]
[-------------------. ]
[ ## Version 1.00 (17/7/10): ]
[ - Initial release ]
[ - Smiths any bars into anything ]
[ - Takes rests based on the time running ]
[ - Supports multi-player ]
[ ## Version 1.01 (9/10/11): ]
[ - Hammer DTM Update ]
[ ## Version 1.02 (17/12/11): ]
[ - Toolbelt update; assumes you have a hammer in there! ]
[ - Removed DTMs, replaced with Auto-TPA Items ]
[ ## Version 1.03 (25/12/11): ]
[ - Colour update ]
[ ## Version 1.04 (5/01/12): ]
[ - Checks online for latest colours/tolerance ]
[ - Fixed location finding bug ]
[ - Improved walking procedures ]
[ ## Version 1.05 (16/01/12): ]
[ - Walking was re-worked ]
[ - Minor fixes ]
[ ## Version 1.06 (29/01/12): ]
[ - Changed location check functions ]
[ - Bug fixes elsewhere ]
[------------------------------------------------------------------------------]

Top Progress Reports:
[PHP]
[/PHP]

Previous Views:

SuperSavvySmither V1.00.scar (20.1 KB, 43 views)
SuperSavvySmither V1.01.simba (21.1 KB, 80 views)
SuperSavvySmither V1.02.Simba (23.0 KB, 27 views)
SuperSavvySmither V1.03.simba (26.1 KB, 69 views)
SuperSavvySmither V1.04.simba (25.1 KB, 30 views)
SuperSavvySmither V1.04FIX.simba (25.1 KB, 73 views)
SuperSavvySmither V1.05.simba (26.5 KB, 130 views)
SuperSavvySmither V1.06.simba (28 KB, 8 views)


bugger0001

2010-07-27 06:57:59

So where does it do the smithing? Varrock West Bank?

EDIT: Yay, first poster in this thread. If it's VWB, then you can expect a few proggies from me ;)

Press Play

2010-08-01 06:26:26

From: bugger0001
So where does it do the smithing? Varrock West Bank?

EDIT: Yay, first poster in this thread. If it's VWB, then you can expect a few proggies from me ;)


Sorry for the late post; I've been away for a while. Yes it does smith at Varrock West Bank :) Hopfully it still works after all this time :P hehe

Emaziz

2010-08-03 12:19:12

Sweet! You should add members items as well (darts, throwing knives), that's an easy fix. :) Also, occasionally it fails to find anvil and bank. With that fixed, it'd be great :)

Cigue

2010-08-03 17:03:39

Once someone posts a proggy I'll add this to the list of working scripts :D Good job !

Also, a little bird has told me another smithing script was coming up soon, it could be cool to see the differences between the two ;)

Press Play

2010-08-03 23:47:54

From: Emaziz
Sweet! You should add members items as well (darts, throwing knives), that's an easy fix. :) Also, occasionally it fails to find anvil and bank. With that fixed, it'd be great :)


It currently supports:
  Items[0] := ['Dagger', 'Hatchet', 'Mace', 'Medium helm', 'Crossbow bolts',   //5
'Sword', 'Nails', 'Studs', 'Arrow tips', 'Scimitar', //10
'Crossbowlimbs', 'Longsword', 'Throwing knife', 'Full helm', //14
'Square shield', 'Bullseye lantern', 'Warhammer', //17
'Battleaxe']; //18

Items[1] := ['Chainbody', 'Kite shield', '2-handed sword', 'Plateskirt',
'Platelegs', 'Platebody']; //6
Yeah, the object finding is not really perfect. That's why I put this script as BETA :)


From: Cigue
Once someone posts a proggy I'll add this to the list of working scripts :D Good job !

Also, a little bird has told me another smithing script was coming up soon, it could be cool to see the differences between the two ;)


Cool! Smithing isn't really that popular, so not many people use it haha :)

null

2010-10-02 00:42:42

this script needs a field where it asks what type of bar your using. You know this can easily be done, considering what your doing.

The script doesn't run correctly for me.

Home

2011-11-06 04:13:05

Moved to working.


~Home

mrpickle

2011-11-06 16:31:10

|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.01 |
|————————————————————-|
| Time Running : 14 min 49 sec |
| Bars Smithed : 275 |
| Loads : 11 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: No bars in the bank |
| |
| |
|————————————————————-|

here's a quicky. Stopped once before this report cuz script moved character just outside bank (bottom left corner) where 2 guards were wondering by, and could not find bank.

EDIT: Still had more bars in bank (lik 1 k more). Failed to detect it.

Press Play

2011-11-07 00:18:56

Thanks for this :) There's always been a problem slightly with the banking and running back and forth. When I get more bars, I'll look further into the problems and change some procedures a bit. But the main fact I was looking for was that it was still working for others; thanks!

wtfje

2011-11-15 09:38:54

I'll be using it soon. Thanks for this script already! Looking forward to use it;)

I Am He

2011-12-11 20:46:11

I open it in SIMBA, fill in the info, press Play..and it does nothing, doesn't even login.

Press Play

2011-12-13 14:38:33

From: I Am He
I open it in SIMBA, fill in the info, press Play..and it does nothing, doesn't even login.


Since this script uses SMART, you may have to wait a while for it to load. Have you used any other scripts before?

naox

2011-12-14 12:07:15

Can someone help me set this up?

Press Play

2011-12-15 04:57:05

From: naox
Can someone help me set this up?


First, take a look at this guide: http://villavu.com/forum/showthread.php?t=47714
Then download and open the script. I will help you further once you do these steps :) It's really simpler than it seems :) Good luck!

I Am He

2011-12-15 11:06:06

From: -daazndagger-
Since this script uses SMART, you may have to wait a while for it to load. Have you used any other scripts before?


Yes, I have used other scripts.


I also want to know, does this now support the hammer in the tool belt?


Welcome to Runescape.
Can't find Anvil Symbol.
You're at the anvil.
Can't find Anvil Symbol.
You're at the Bank.
Found possible Bank booths
You have no hammer; use some common sense.
|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.01 |
|————————————————————-|
| Time Running : 1 min 7 sec |
| Bars Smithed : 0 |
| Loads : 0 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: You have no hammer |
| |
| |
|————————————————————-|
|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.01 |
|————————————————————-|
| Time Running : 1 min 7 sec |
| Bars Smithed : 0 |
| Loads : 0 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: You have no hammer |
| |
| |
|————————————————————-|
Successfully executed.
The following DTMs were not freed: [2, 3]


I was in the bank, at the time.

———–

It gets to the point where it has the hammer and bars in the inventory, then it right click the anvil, then click away, and then does nothing.



Can't find Anvil Symbol.
Can't find Anvil Symbol.
You're at the anvil.
Can't find Anvil Symbol.
You're at the Bank.
Found possible Bank booths
Could not find bar.

Press Play

2011-12-15 15:28:05

Thanks for your input; I'll be fixing this soon!

Press Play

2011-12-19 04:07:56

Double post for…

Version 1.02 Released!
- Working very well!
- Changed item detection method
- Next version we can expect EXTREME improvements from this one!

Swish

2011-12-19 18:13:12

[Hint] (207:3): Variable 'SMITHINGSCREENTEXT' never used at line 206
[Hint] (632:3): Variable 'X' never used at line 631
[Hint] (632:3): Variable 'Y' never used at line 631
[Hint] (633:3): Variable 'MSPOINT' never used at line 632
[Error] (708:3): Unknown identifier 'LoadDTMs' at line 707
Compiling failed.
[Hint] (207:3): Variable 'SMITHINGSCREENTEXT' never used at line 206
[Hint] (632:3): Variable 'X' never used at line 631
[Hint] (632:3): Variable 'Y' never used at line 631
[Hint] (633:3): Variable 'MSPOINT' never used at line 632
[Error] (708:3): Unknown identifier 'LoadDTMs' at line 707
Compiling failed.

Tyrosus

2011-12-19 23:02:47

Same here, no dice. Compiling failed due to error mentioned above. Something about LoadDTMs.

Press Play

2011-12-20 05:18:53

Oh, shit - sorry. Forgot to remove a line in the published version! :$
Delete/Remove line 707:
  LoadDTMs;
Or re-download. I've updated it. Sorry again guys!

Omar

2011-12-20 08:04:04

Amazing Script ill post a proggy soon but you really need to make a smelter :p Anyways thanks for the release!

Press Play

2011-12-20 08:38:23

From: badreddine
Amazing Script ill post a proggy soon but you really need to make a smelter :p Anyways thanks for the release!

An AMAZING smelter that you can use that is very versatile is Narcle's Smelter: http://villavu.com/forum/showthread.php?t=34507
I use this one, and I highly recommend it! :)

iCURiP

2011-12-22 13:37:30

Setting up script…
SRL Compiled in 16 msec
SMART Initialized.
Loaded: Server 10, Members: True, Signed: True, Super Detail: False.
Welcome to Runescape.
You're at the Bank.
Found possible Bank booths
Bank: Times missed is 1
Found possible Bank booths
Item := TPAItem(58, 29, 22, 2237220);
Amount of bars left: 1446
Found 2 possible anvils?
Anvil: Times missed is 1
Found 2 possible anvils?
Anvil: Times missed is 2
Found 2 possible anvils?
Anvil: Times missed is 3
Found 1 possible anvils?
Anvil: Times missed is 4
Found 1 possible anvils?
Anvil: Times missed is 5
Found 1 possible anvils?
Anvil: Times missed is 6
Found 1 possible anvils?
Anvil: Times missed is 7
Found 1 possible anvils?
Anvil: Times missed is 8
Found 1 possible anvils?
Anvil: Times missed is 9
Found 2 possible anvils?
Anvil: Times missed is 10
Loging out…
|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.02 |
|————————————————————-|
| Time Running : 1 min 47 sec |
| Bars Smithed : 0 |
| Loads : 0 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: Could not smith bars |
| |
| |
|————————————————————-|
|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.02 |
|————————————————————-|
| Time Running : 1 min 47 sec |
| Bars Smithed : 0 |
| Loads : 0 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: Could not smith bars |
| |
| |
|————————————————————-|
Successfully executed.


Does the script needs an update or is it me :)?

Press Play

2011-12-22 17:42:21

It may need an update, but I need to ask a question before I attempt to fix it. Usually when it can't find the anvil, the character is not really near it. Where was your character when you were logged out (screenshot if you can)? If it was inside the anvil building then it may just be a case of updating the colour.

sverlov5

2011-12-24 03:45:19

please help !!! it doesnt find the anvil !! whats wrong???

Tyrosus

2011-12-24 05:29:20

Same here, not finding anvil. Withdraws bars just fine and then hangs around the bank unable to find the anvil.

Press Play

2011-12-24 07:40:24

I will quickly test this now. If it's a short fix, I'll upload it. If not, I'll have a deeper look after Christmas :) Sorry guys!

Tyrosus

2011-12-24 18:24:03

All appreciated for the fast responses and even faster fixes, daazndagger :) you dev's in this community rule. Btw, I noticed your plea for some RSGP donations on the front. Might be able to help you once I can smith down everything I've got using your script. I'm expecting some good profits.

Press Play

2011-12-24 18:32:46

From: Tyrosus
All appreciated for the fast responses and even faster fixes, daazndagger :) you dev's in this community rule. Btw, I noticed your plea for some RSGP donations on the front. Might be able to help you once I can smith down everything I've got using your script. I'm expecting some good profits.

Thankyou for your appreciation! Compliments like this go a long way in our community :smile: It was a small fix, but I had problems uploading it.

Version 1.03 Uploaded!
MERRY CHRISTMAS EVERYONE FROM AUSTRALIA :D

Firefighter_Emt18

2011-12-29 22:05:17

what is it that you need to keep this script up to date and how can i help?

Press Play

2011-12-29 22:16:09

From: Firefighter_Emt18
what is it that you need to keep this script up to date and how can i help?

The script should be working as of now, but to be able to keep it running better, I need some RSGP donations. I will still keep it running; it just won't be as stable as it can be! :)

If you want to donate, PM me :)

Zeroexe7

2012-01-03 03:59:45

Error: Out Of Range at line 70
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]
doesnt even login

Press Play

2012-01-03 05:05:03

From: Zeroexe7
Error: Out Of Range at line 70
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]
doesnt even login

How many players are you using? Are you sure you're setting it up right?

Tyrosus

2012-01-03 05:59:24

Logs in and withdraws bars just fine, then continues to think that the bank is the anvil. Is this using SPS? Because I hear that since SPS is very buggy lately, scripts should avoid using it for the time being until SPS 2.0.

EDIT: The first time I started it at the bank, and it thought it was starting at the anvil and walked to the northwest corner of the bank and withdrew the bars. Then, it went to the southeast corner of the bank and thought it was at the anvil, and thought a nearby player was the anvil.

This time, I started it at the anvil. Now it just thinks it's at the bank, and the mouse keeps searching around for bank booths but doesn't do anything further than that.

Zeroexe7

2012-01-03 06:45:03

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 1;

with Players[1] do
begin
Name :=''; // Username
Pass :=''; // Password
Nick :=''; // 3-4 lower case letters of your character's name
Pin :=''; // Your bank PIN
Member := true;
Active := true;
end;
end;


right settings?

Press Play

2012-01-03 13:20:19

Nup, arrays start at '0'; it should be:
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Nick :=''; // 3-4 lower case letters of your character's name
Pin :=''; // Your bank PIN
Member := true;
Active := true;
end;
end;
That should work now :)

Tyrosus

2012-01-03 17:35:47

Still can't get this working right :-/ same problem I was having in 1.02 with it confusing the bank for the anvil, and the anvil is confused for the bank. Have you been able to test it out daazndagger? I think it might just need a simple color update or walker.

Zeroexe7

2012-01-03 23:13:10

ok so i started it up and it bank on the left banker then goes to the right banking and trys to smith in the bank it doesnt find the anvil

Press Play

2012-01-04 01:45:28

From: Tyrosus
Still can't get this working right :-/ same problem I was having in 1.02 with it confusing the bank for the anvil, and the anvil is confused for the bank. Have you been able to test it out daazndagger? I think it might just need a simple color update or walker.

Hmm, thanks for feed back. When you say this, do you mean it thinks it's at the anvil when it's really at the bank? I still haven't got round to testing - not enough money :S I'll have a look at the script soon though; possibly an update for tonight.


From: Zeroexe7
ok so i started it up and it bank on the left banker then goes to the right banking and trys to smith in the bank it doesnt find the anvil

If you post me a debug, I can help you better :) I think you're experiencing the same problem as above. Will take a look very soon!

Thanks for your patience guys :)

Tyrosus

2012-01-04 03:03:16

Yes, it's really at the bank, but the script says "You're at the anvil." And then it begins looking at every gray color on the screen as a possible anvil. Eventually, it gives up and logs out.

Then, if I start it at the anvil, it thinks it's at the bank. It's reversed the locations, lol.

Press Play

2012-01-04 03:09:08

From: Tyrosus
Yes, it's really at the bank, but the script says "You're at the anvil." And then it begins looking at every gray color on the screen as a possible anvil. Eventually, it gives up and logs out.

Then, if I start it at the anvil, it thinks it's at the bank. It's reversed the locations, lol.

Hahah, quite a pickle we're in aren't we :p At the moment it judges it's location from the distance from the bank and anvil symbols. I'll have to change that…

Press Play

2012-01-04 04:36:08

Double post to bump for fix…

Alright, I think I've found something that'll fix this! They've changed the bank symbol so it's so far away lol. Try changing line 444 and line 452 respectively:

Line 444, from:
if FindSymbol(x, y, 'bank') then
to
if FindSymbol(x, y, 'dungeon') then
Line 452, from:
Result:= 'bank';
to
Result:= 'dungeon';

Tyrosus

2012-01-04 05:38:14

Testing now… will edit this post to let you know how it goes :)

EDIT: Still not working. It recognizes that it's at the bank at first, withdraws the bars as normal. Then it walks to the northern part of the bank, and searches for the anvil. It also still thinks the anvil building is the bank, and searches for bankers when starting at the anvil.

Here's the log:

Can't find Anvil Symbol.
You're at the Bank.
Found possible Bank booths
Item := TPAItem(56, 27, 22, 2562586);
Amount of bars left: 7242
Found 8 possible anvils?
Anvil: Times missed is 1
Found 6 possible anvils?
Anvil: Times missed is 2
Found 6 possible anvils?
Anvil: Times missed is 3
Found 10 possible anvils?
Anvil: Times missed is 4
Found 8 possible anvils?
Waiting for 'Choose' Option.
Found 10 possible anvils?

I decided to move it manually to the anvil and start the script again to see what would happen. It gave me this error as soon as it clicked on the anvil to begin smithing:

Waiting for 'Choose' Option.
Found 10 possible anvils?
Error: Out Of Range at line 599
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]

Line 599 is highlighted: SMART_DrawDotsEx(true, Anvil.ATPA, 255);

Press Play

2012-01-04 06:18:19

From: Tyrosus
Testing now… will edit this post to let you know how it goes :)

EDIT: Still not working. It recognizes that it's at the bank at first, withdraws the bars as normal. Then it walks to the northern part of the bank, and searches for the anvil. It also still thinks the anvil building is the bank, and searches for bankers when starting at the anvil.

Here's the log:

Can't find Anvil Symbol.
You're at the Bank.
Found possible Bank booths
Item := TPAItem(56, 27, 22, 2562586);
Amount of bars left: 7242
Found 8 possible anvils?
Anvil: Times missed is 1
Found 6 possible anvils?
Anvil: Times missed is 2
Found 6 possible anvils?
Anvil: Times missed is 3
Found 10 possible anvils?
Anvil: Times missed is 4
Found 8 possible anvils?
Waiting for 'Choose' Option.
Found 10 possible anvils?

I decided to move it manually to the anvil and start the script again to see what would happen. It gave me this error as soon as it clicked on the anvil to begin smithing:

Waiting for 'Choose' Option.
Found 10 possible anvils?
Error: Out Of Range at line 599
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]

Line 599 is highlighted: SMART_DrawDotsEx(true, Anvil.ATPA, 255);

I'll have to take a closer look into it then. But I first have to find the money to buy some bars to test it with! Thanks a lot mate :)

Press Play

2012-01-04 20:24:40

Double post for…

Version 1.05 Release!
[------------------------------------------------------------------------------]
[ ## Version 1.04 (5/01/12): ]
[ - Checks online for latest colours/tolerance ]
[ - Fixed location finding bug ]
[ - Improved walking procedures ]
[------------------------------------------------------------------------------]
See first post to download!

QuickDung

2012-01-04 23:11:42

mine keeps on logging out as soon as i get inside of the anvil building… :(

Tuning1st

2012-01-04 23:12:23

Help whit this error at compiling pls.
[Hint] (145:3): Variable 'COLOURSTRING' never used at line 144
[Hint] (248:3): Variable 'SMITHINGSCREENTEXT' never used at line 247
[Hint] (664:3): Variable 'MSPOINT' never used at line 663
[Error] (745:3): Unknown identifier 'LoadDTMs' at line 744
Compiling failed.

Tyrosus

2012-01-05 03:08:14

Confirmed, failing to compile for reason listed above. lol, I really need to hurry up and learn how to script so I can make the quick fixes myself and test for you :)

Press Play

2012-01-05 04:11:41

From: Tyrosus
Confirmed, failing to compile for reason listed above. lol, I really need to hurry up and learn how to script so I can make the quick fixes myself and test for you :)

You are very kind!


Sorry about this guys :( I'm sure it compiled when I uploaded it. I'll quickly check and upload a new version very soon (few minutes).

EDIT: FIX: remove line 744: It should read:
LoadDTMs;
or download new version fix! V1.04FIX

Tuning1st

2012-01-05 10:31:04

This logout after starts :(
Setting up script…
SRL Compiled in 6 msec
SMART Initialized.
Loaded: Server 10, Members: True, Signed: True, Super Detail: False.
Anvil Mods: Hue=0 Sat=0.0791884478029
BankBooth Mods: Hue=0.47803617571059 Sat=1.56300703082747
Welcome to Runescape.
_________
You're at the bank.
Found possible Bank booths
Amount of bars left: 4993
Can't find Dungeon Symbol.
You're at the bank.
Loging out…

1.04 FIX Version

EDIT: Solve: U need start whit inventory empty and bank east

But now i got this problem
Found 7 possible anvils?
Error: Out Of Range at line 552
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]
SMART_DrawDotsEx(true, Anvil.ATPA, 255);

Press Play

2012-01-05 17:54:21

Yeah, I forgot to put that in my setup instructions sorry :S You have to start in the bank booth closest to the anvil! If you're getting that error above.. try deleting that line. It won't do any harm to the scrip; it's just for debugging purposes only :)

Zeroexe7

2012-01-10 15:27:04

Bank: Times missed is 2
Found possible Bank booths
Bank: Times missed is 3
Found possible Bank booths
Bank: Times missed is 4
Found possible Bank booths
Bank: Times missed is 5
Found possible Bank booths
Amount of bars left: 6600
You're at the anvil.
Found 9 possible anvils?
Anvil: Times missed is 1
Found 7 possible anvils?
Found 7 possible anvils?
Item is in second array
MouseBoxed
Smithing Platebody
Bars left to smith: 25
Bars left to smith: 25
Bars left to smith: 20
Bars left to smith: 15
Bars left to smith: 15
Bars left to smith: 10
Bars left to smith: 10
Bars left to smith: 10
Bars left to smith: 5
Bars left to smith: 5
Bars left to smith: 0
You're at the anvil.
Loging out…

Press Play

2012-01-10 19:30:30

Were you watching it while this happened? What did it do; just finish smithing then logout? Seems strange :S Have your tried running it again? Do you get the same bug?

Zeroexe7

2012-01-11 01:32:33

Yes i watched it smite 5 mith plates and then logout tryed it again and it did the same thing

Press Play

2012-01-11 01:42:11

From: Zeroexe7
Yes i watched it smite 5 mith plates and then logout tryed it again and it did the same thing

Hmm… Can you post the proggy that came after the debug you posted?

EDIT: Try changing line 494 to:
  if FindColorTolerance(x, y, 747, MMX1, MMY1, MMX2, MMY2, 5) then

kazhual

2012-01-14 05:23:35

I have the same problem:

|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.04 |
|————————————————————-|
| Time Running : 1 min 6 sec |
| Bars Smithed : 25 |
| Loads : 1 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: You are lost(2) |
| |
| |
|————————————————————-|
Successfully executed.

Press Play

2012-01-14 05:43:21

From: kazhual
I have the same problem:

|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.04 |
|————————————————————-|
| Time Running : 1 min 6 sec |
| Bars Smithed : 25 |
| Loads : 1 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: You are lost(2) |
| |
| |
|————————————————————-|
Successfully executed.

Did you try what I suggested in the post above?

Demondog

2012-01-14 08:21:26

I am having issues here….

ClearRSCanvas(SMART_Canvas.canvas);

The error says…

[Error] (405:5): Unknown identifier 'ClearRSCanvas' at line 404
Compiling failed.

Tuning1st

2012-01-14 09:28:06

From: -daazndagger-
Hmm… Can you post the proggy that came after the debug you posted?

EDIT: Try changing line 494 to:
  if FindColorTolerance(x, y, 747, MMX1, MMY1, MMX2, MMY2, 5) then


I try changing that line and this logout before start smithing

Press Play

2012-01-14 17:22:42

From: Demondog
I am having issues here….

ClearRSCanvas(SMART_Canvas.canvas);

The error says…

[Error] (405:5): Unknown identifier 'ClearRSCanvas' at line 404
Compiling failed.
That's been taken out of SRL's functions and has been changed to SMART_ClearCanvas;. You can go ahead and change it if you want, but I'd wait.. I'm going to be uploading a new version soon!

From: Tuning1st
I try changing that line and this logout before start smithing
So it doesn't even start smithing? Or does it do the same thing as before?

Press Play

2012-01-15 17:24:08

Version 1.05 Released!

I present to you V1.05! Everything should be fine and dandy in this version! PLEASE post if it is not!!

Used up all my bars in 11 minutes:
|-------------------------------------------------------------|
| -daazndagger-'s |
| [S]uper [S]avvy [S]mither |
| Version 1.05 |
|-------------------------------------------------------------|
| Time Running : 11 min 43 sec |
| Bars Smithed : 400 |
| Loads : 16 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: No bars in the bank |
| |
| |
|-------------------------------------------------------------|

Germs

2012-01-16 09:00:55

Seems to get stuck after leveling up, stops me from smithing for the level up notice, then it just scans the bars until i stop it, other than that great script, thank you very much.

Press Play

2012-01-16 17:00:08

From: Germs
Seems to get stuck after leveling up, stops me from smithing for the level up notice, then it just scans the bars until i stop it, other than that great script, thank you very much.

That seems strange… does it keep outputing:
Bars left to smith: x
Bars left to smith: x
Bars left to smith: x
etc..?
Ohhhhh… I think I know what's wrong! It just came to me :p Try adding in between line 651 and 652:
Result := True;
Exit;
So, it should look something like this:
648: if LevelUp then
649: begin
650: Inc(Total_LevelUps);
650: ClickToContinue;
Add: Result := True;
Add: Exit;
651: end;

Tyrosus

2012-01-16 22:20:53

I start it at the southern-most bank booth. It withdraws the bars fine, then clicks on the minimap at the little ruined building to the east of the anvil, walks there, says "You're at the bank. Logging out…" and logs out.

Press Play

2012-01-17 01:34:27

From: Tyrosus
I start it at the southern-most bank booth. It withdraws the bars fine, then clicks on the minimap at the little ruined building to the east of the anvil, walks there, says "You're at the bank. Logging out…" and logs out.

You're sure your player is at the southern most bank booth? Note that this is on the west side of Varrock Bank.

Ancient

2012-01-17 13:15:31

I got this when i start the script, i start it first banker west

Anvil Mods: Hue=0.16346153846153  Sat=0.12071005917159
BankBooth Mods: Hue=0.47803617571059 Sat=1.56300703082747
Welcome to Runescape.
You're at the bank.
Found possible Bank booths
Amount of bars left: 9975
You're at the anvil.
No anvils found.
Anvil: Times missed is 1
No anvils found.
Anvil: Times missed is 2
No anvils found.
Anvil: Times missed is 3
No anvils found.
Anvil: Times missed is 4
No anvils found.
Anvil: Times missed is 5
No anvils found.
Anvil: Times missed is 6
No anvils found.
Anvil: Times missed is 7
No anvils found.
Anvil: Times missed is 8
No anvils found.
Anvil: Times missed is 9
No anvils found.
Anvil: Times missed is 10
Loging out...
|-------------------------------------------------------------|
| -daazndagger-'s |
| [S]uper [S]avvy [S]mither |
| Version 1.05 |
|-------------------------------------------------------------|
| Time Running : 47 sec |
| Bars Smithed : 0 |
| Loads : 0 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: Could not smith bars |
| |
| |
|-------------------------------------------------------------|
|-------------------------------------------------------------|
| -daazndagger-'s |
| [S]uper [S]avvy [S]mither |
| Version 1.05 |
|-------------------------------------------------------------|
| Time Running : 47 sec |
| Bars Smithed : 0 |
| Loads : 0 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: Could not smith bars |
| |
| |
|-------------------------------------------------------------|
Successfully executed.
The following DTMs were not freed: [2, 3]




EDIT: Okej fixed that but now it spams
Item is in first array
MouseBoxed
Loging out…

Deophobic

2012-01-17 14:52:29

Odd, It only right clicks but does not left click it right clicks the bank booth and wont move the mouse down to click on use quickly.

Press Play

2012-01-17 16:28:47

From: Ancient
EDIT: Okej fixed that but now it spams
Item is in first array
MouseBoxed
Loging out…
What item are you trying to smith? The co-ordinates may have changed :/

From: Deophobic
Odd, It only right clicks but does not left click it right clicks the bank booth and wont move the mouse down to click on use quickly.
Are you sure you have the latest version of SRL?

kazhual

2012-01-18 12:45:10

I had the same problem,

I updated SRL and could bank.

But now it seems not to be able to find the anvil.

kazhual

2012-01-19 11:59:50

From: kazhual
I had the same problem,

I updated SRL and could bank.

But now it seems not to be able to find the anvil.


Script works !

Screen setting where wrong.

dylank6

2012-01-20 02:47:40

Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
You're at the bank.
Found possible Bank booths
Amount of bars left: 1232
Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
Can't find Dungeon Symbol.
You're at the bank.
Loging out…
|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.05 |
|————————————————————-|
| Time Running : 1 min 3 sec |
| Bars Smithed : 0 |
| Loads : 0 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: You are lost(1) |
| |
| |
|————————————————————-|
|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.05 |
|————————————————————-|
| Time Running : 1 min 3 sec |
| Bars Smithed : 0 |
| Loads : 0 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: You are lost(1) |
| |
| |
|————————————————————-|


i have the same problem as Tyrosus. starts fine withdraws then clicks near the anvil arrives says im at bank then logs out stating im lost…

Press Play

2012-01-20 02:56:47

Try logging in to a less populated world and tell me if this still occurs please :) otherwise, it may be an SRL bug.

dylank6

2012-01-20 03:15:22

From: -daazndagger-
Try logging in to a less populated world and tell me if this still occurs please :) otherwise, it may be an SRL bug.


still happens. it now does one or 2 loads then banks at the wrong stall, walks then logs out saying im lost again

Press Play

2012-01-20 03:21:28

From: dylank6
still happens. it now does one or 2 loads then banks at the wrong stall, walks then logs out saying im lost again
After it banks at the wrong booth, does it still try and walk to the anvil? I'm guess it does and then it can't find the anvil? Ahh, how frustrating.

dylank6

2012-01-20 03:51:56

From: -daazndagger-
After it banks at the wrong booth, does it still try and walk to the anvil? I'm guess it does and then it can't find the anvil? Ahh, how frustrating.


it clicks near it yes then logs out.

Press Play

2012-01-20 05:19:22

From: dylank6
it clicks near it yes then logs out.

Hmm, thanks for this :) I'll look into it for the next update. Try using the current version for now and post if the problem is persistent. Thanks!

dylank6

2012-01-20 10:29:38

From: -daazndagger-
Hmm, thanks for this :) I'll look into it for the next update. Try using the current version for now and post if the problem is persistent. Thanks!


problem is still happening. i have found that if i banks at the wrong stall it will move to just outside the room with the anvil then logging out saying "you're Lost", and if it does bank at the right stall it will move to right beside the anvil and log out saying "could not smith bars". all that said every once in a while there will be a completely successful load, then these errors will occur

* I think the problem might be in the detection of the anvil, also maybe improving the walking to be able to adjust for the use of a wrong bank stall would help*

Bnagy

2012-01-20 11:52:01

From: dylank6
problem is still happening. i have found that if i banks at the wrong stall it will move to just outside the room with the anvil then logging out saying "you're Lost", and if it does bank at the right stall it will move to right beside the anvil and log out saying "could not smith bars". all that said every once in a while there will be a completely successful load, then these errors will occur

* I think the problem might be in the detection of the anvil, also maybe improving the walking to be able to adjust for the use of a wrong bank stall would help*


I am having the same exact problem. I got it to work for 7-8 loads then it said I was lost or that it could not smith bars.

Tankerbuzz

2012-01-20 20:52:25

My script takes out an inventory of iron bars then walks towards the anvil but then logs out? Because it could not find dungeon symbol?? Any ideas?

Press Play

2012-01-20 21:04:09

From: Tankerbuzz
My script takes out an inventory of iron bars then walks towards the anvil but then logs out? Because it could not find dungeon symbol?? Any ideas?
…
From: -daazndagger-
Try logging in to a less populated world and tell me if this still occurs please :) otherwise, it may be an SRL bug.

Tankerbuzz

2012-01-20 23:36:18

I have tried logging in to a less populated world with no luck but it may be because i deleted line 139 because of this error…

" is an invalid integer at line 139

Ideas??
Thanks for quick reply

Press Play

2012-01-20 23:41:25

Hmm, I think it is because the server that I host my files on is down. Try re-downloading the script and the delete lines 149 and 151.
  if not LoadIntegerOnline(Anvil.Colour, 'http://pastehtml.com/view/bjl2gebfi.txt') then //This one
Anvil.Colour:= 4473927; //4671307; //4013376; //3947839;
if not LoadIntegerOnline(Anvil.Tol, 'http://pastehtml.com/view/bjl2mrvbi.txt') then //And this one
Anvil.Tol:= 2;

Tankerbuzz

2012-01-20 23:56:31

Still comes up with this error " is an invalid integer at line 139
?? Ill delete it i try again..

Tankerbuzz

2012-01-21 00:00:01

Still getting Cannot find dungeonn symbol error then logs out

Press Play

2012-01-21 00:11:45

From: Tankerbuzz
Still getting Cannot find dungeonn symbol error then logs out
Since I don't have an account with sufficient funds, it's hard for me to test :/ So I guess you'll have to wait a while until I get around to fixing it :( I'll check with SRL for now to see if the Dungeon symbol is still working. Thanks for the feedback :)

Tankerbuzz

2012-01-21 00:58:30

Sufficient funds?? Are you a member?

Press Play

2012-01-21 01:37:27

From: Tankerbuzz
Sufficient funds?? Are you a member?

Yes I am, what is you point? :confused: I'm talking about RSGP

Tankerbuzz

2012-01-21 02:24:47

Um im f2p. Whats RSGP?? lol

dylank6

2012-01-21 03:21:52

From: Tankerbuzz
Um im f2p. Whats RSGP?? lol


RuneScape GoldPieces

Tankerbuzz

2012-01-22 04:28:38

Any luck with the Dugeon symbol finder yet?? Really keen to get this working as i have 1286 iron bars and 1089 steel bars lol

Press Play

2012-01-22 06:57:26

Soon, soon :) Still testing

rol prodigy

2012-01-24 19:59:32

how much xp/h is this? at the max?

Tankerbuzz

2012-01-24 23:04:30

Depends what your making dude. And i think its broken at the mo. Any luck with the dungeon finder error yet?? :D

Press Play

2012-01-25 00:10:30

Still no luck as of now :( I think I'll change the location finding altogether.. but it's going to be hard :/

Helper

2012-01-26 19:01:43

Dude update it how much fucking money you want ? if you update today i give you cash, just say how many.

Press Play

2012-01-26 19:14:49

From: Helper
Dude update it how much fucking money you want ? if you update today i give you cash, just say how many.
You are rude. The script that you're using is free and currently broken. I do these things in my own time and you should respect that. We don't buy/sell scripts on this site either. If you want to pay for one, go somewhere else. I'm sure there are a lot of people smarter than me who can make you a better script.

Helper

2012-01-26 19:17:47

From: -daazndagger-
You are rude. The script that you're using is free and currently broken. I do these things in my own time and you should respect that. We don't buy/sell scripts on this site either. If you want to pay for one, go somewhere else. I'm sure there are a lot of people smarter than me who can make you a better script.


sorry if i being rude i was trying to see if i guve money can u update it soon ?

Tankerbuzz

2012-01-27 17:15:14

I am also willing to donate some monies :D

Firefighter_Emt18

2012-01-29 00:09:45

I am willing to help you out with RSGP if needed just pm me and we can talk if you need some help with RSGP.

Press Play

2012-01-29 15:49:42

[30/01/12]

Version 1.06 Released!

I have added in a completely different map location detection for making sure you are where you're supposed to be. Also more fail safes just in case. I have also left in the old method for scripters who want to edit it. I have done this because I am going to have a break for a year from SRL and will not be here to update it.

I only give SRL Members+ the permission to start a new thread with fixes. However, this thread will still be here - but is getting locked soon. Don't worry, I will return late this year :)

If you're a leecher, I'll give you some advise. Go learn how to script. And hopefully it will do to you what it did to me :)

Helper

2012-01-29 17:06:29

Nice, i find an error when it walks to the anvil the script stops


function ToAnvil: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
MouseBox(641, 123, 652, 132, 1);
FFlag(0);
Wait(RandomRange(600, 800));

if not CheckLoc='anvil' then
begin
if FindSymbol(x, y, 'anvil') then
begin
Mouse(x, y, 3, 3, mouse_left);
FFlag(0);
Wait(RandomRange(600, 800));
end else
Exit;
end else
Result:= True;

end;

the line eror is 532: if not CheckLoc='anvil' then

Press Play

2012-01-29 17:11:25

What is does the specific error say? Can you copy the debug for me?

Helper

2012-01-29 17:13:44

Error: Type Mismatch at line 532
The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2, 3]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

Press Play

2012-01-29 17:51:49

Try changing that line to:
if CheckLoc<>'anvil' then
See if that works :/ Is everyone else getting this too?

Helper

2012-01-29 17:57:50

From: -daazndagger-
Try changing that line to:
if CheckLoc<>'anvil' then
See if that works :/ Is everyone else getting this too?


Thank you now its working !!!!

m3gaman3g3nd

2012-01-30 11:45:23

i see you care about the wellfare of your smither… okay well your smelter gets lost when finding anvils quite often… if you were unaware… also the checkloc='anvil' is fixed if you simply wrap it (checkloc='anvil) then…

Press Play

2012-01-30 14:50:47

Uploaded the fix for V1.06.

m3gaman3g3nd

2012-01-30 15:01:47

its beautiful <00>

Ziggily

2012-01-30 16:08:29

Successfully executed.
The following DTMs were not freed: [2, 3]

This is the error that I get after one run. The bot looks great otherwise :D

Froggah

2012-01-30 17:04:45

I get the same thing as Ziggily

m3gaman3g3nd

2012-01-30 17:16:35

thats normal… but hmmm i have come to say that Kite shield does not work…

i tried chainbody instead and its 100% but the kitesheild it opens anvil scrolss to item then logs out every time… could be fonts or dtm im not sure but btw im doing mithy atm so yup just spitting it out…

planvlad

2012-01-31 22:34:23

I think it keeps looking for the quick bank option on the booth, because it right clicks and does nothing.

BotterOhey

2012-01-31 22:51:56

I get the: The following DTMs were not freed: [2, 3], after it goes to the wrong bank booth.

anthonyforyou

2012-02-01 16:04:36

broken on the burthurope update, since now their is only 2 bank options

qingqinghd

2012-02-02 15:29:16

use this fix ones
program SuperSavvySmither;
{$i SRL/SRL/Misc/Smart.simba}
{$i SRL/SRL.simba}
{$i SRL/SRL/Misc/Paintsmart.simba}

{==============================================================================]
[ Daazndagger's [S]uper [S]avvy [S]mither ]
[==============================================================================]
[ [Simba/SCAR 3.23] ]
[ [SRL] ]
[ [SMART] ]
[------------------------------------------------------------------------------]
[ Description: | ]
[-------------------. ]
[ - I made this script in two days, so don't expect much from it :P ]
[ BUT, what you can expect is that it will do its job to the best ]
[ potential. It is the best (but only working) smither at villavu.com ]
[------------------------------------------------------------------------------]
[ Features: | ]
[-------------------. ]
[ ## Version 1.00 (17/7/10): ]
[ - Initial release ]
[ - Smiths any bars into anything ]
[ - Takes rests based on the time running ]
[ - Supports multi-player ]
[ ## Version 1.01 (9/10/11): ]
[ - Hammer DTM Update ]
[ ## Version 1.02 (17/12/11): ]
[ - Toolbelt update; assumes you have a hammer in there! ]
[ - Removed DTMs, replaced with Auto-TPA Items ]
[ ## Version 1.03 (25/12/11): ]
[ - Colour update ]
[ ## Version 1.04 (05/01/12): ]
[ - Checks online for latest colours/tolerance ]
[ - Fixed location finding bug ]
[ - Improved walking procedures ]
[ ## Version 1.05 (16/01/12): ]
[ - Walking was re-worked ]
[ - Minor fixes ]
[ ## Version 1.06 (29/01/12): ]
[ - Changed location check functions ]
[ - Bug fixes elsewhere ]
[------------------------------------------------------------------------------]
[ Instructions: | ]
[-------------------. ]
[ 1. Fill in the lines below until it says STOP! ]
[ 2. Make sure you have a hammer TOOLBELT! ]
[ 3. Make sure you have bars VISIBLE in your bank. ]
[ 4. Press PLAY! ]
[------------------------------------------------------------------------------}

var
WhenBreak, WithdrawBars: Integer;
SmithingItem: String;
x, y: Integer;

{------------------------------------------------------------------------------]
[ VARIBLE SETUP: ]
[ See the thread for details. ]
[------------------------------------------------------------------------------}
procedure LoadGlobals;
begin
WhenBreak := 300000; // Minutes until break
SmithingItem := 'Platebody'; // What to make
WithdrawBars := 25; // How many bars to withdraw
end;

{------------------------------------------------------------------------------]
[ DECLARE PLAYERS: ]
[ Change accordingly. ]
[------------------------------------------------------------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Pin :=''; // Your bank PIN
Member := true;
Active := true;
end;
end;

{------------------------------------------------------------------------------}
{ STOP STOP STOP STOP STOP-STOP STOP STOP }
{ STOP STOP STOP STOP STOP | }
{ ===== STOP STOP STOP STOP STOP STOP STOP ===== }
{ STOP STOP STOP STOP STOP }
{ STOP STOP STOP STOP-STOP STOP }
{------------------------------------------------------------------------------}

const
ScriptVersion = '1.06';
ScriptName = '[S]uper [S]avvy [S]mither';

{ *** For HSL Colours}
C_HUE = 0;
C_SAT = 1;
C_LUM = 2;

type
TObjectProperties = record
Colour, Tol: Integer;
HSL: Array[0..2] of Extended;
HSMod: Array[0..1] of Extended;
TPA: TPointArray;
ATPA: array of TPointArray;
end;

type
TTPAItem = Record
Outline, Width, Height, Colour: Integer;
Box: TBox;
Slot: TPoint;
end;

var
DTM_MMBank, DTM_MMBank2: Integer; //DTM_Bar, DTM_Hammer: Integer;
BankBar, InvBar: TTPAItem;
TotalTimeInactive, RoundTime, lTimer: Integer;
Anvil, BankBooth: TObjectProperties;
Total_LevelUps, Total_Bars, Total_Loads: Integer;

procedure LoadDTMs;
begin
DTM_MMBank := DTMFromString('mbQAAAHicY2VgYFBhQWBZIJYD4tVA8eVAvAGI1wPxIiB+ycDE8PLLNzD++YcRjJmB4uiYEQsGAwCVng6l');
DTM_MMBank2 := DTMFromString('mbQAAAHicY2VgYNjDxMAwE4g5mBkYDgPpI0D8GCj+E4i/A/EjIOZiZGB4ycDE0NXeAsbtpT4MGTGuDP9BcmiYEQsGAwDgtw5H');
end;

// Only works for integers > 0
function LoadIntegerOnline(var int: Integer; site: String): Boolean;
var
IntAsString: String;
begin
int:= -1;
IntAsString:= GetPage(site);
if Length(IntAsString) > 10 then
Exit;
int:= StrToInt(IntAsString);
if int <> -1 then
Result:= True;
end;

procedure LoadColourTol;
begin

if not LoadIntegerOnline(Anvil.Colour, 'http://pastehtml.com/view/bjl2gebfi.txt') then
Anvil.Colour:= 5066064; //4473927; //4671307; //4013376; //3947839;
if not LoadIntegerOnline(Anvil.Tol, 'http://pastehtml.com/view/bjl2mrvbi.txt') then
Anvil.Tol:= 5;

ColorToHSL(Anvil.Colour, Anvil.HSL[C_HUE], Anvil.HSL[C_SAT], Anvil.HSL[C_LUM]);
Anvil.HSMod[C_HUE]:= (Anvil.HSL[C_HUE] / Anvil.HSL[C_LUM]); // 2.78
Anvil.HSMod[C_SAT]:= (Anvil.HSL[C_SAT] / Anvil.HSL[C_LUM]); // 0.28
Writeln('Anvil Mods: Hue=' +FloatToStr(Anvil.HSMod[C_HUE])+ ' Sat=' +FloatToStr(Anvil.HSMod[C_SAT]));

if not LoadIntegerOnline(BankBooth.Colour, 'http://pastehtml.com/view/bjl2tds4u.txt') then
BankBooth.Colour:= 2575450; //2707293; //2245198;
if not LoadIntegerOnline(BankBooth.Tol, 'http://pastehtml.com/view/bjl2wevlq.txt') then
BankBooth.Tol:= 3;

ColorToHSL(BankBooth.Colour, BankBooth.HSL[C_HUE], BankBooth.HSL[C_SAT], BankBooth.HSL[C_LUM]);
BankBooth.HSMod[C_HUE]:= (BankBooth.HSL[C_HUE] / BankBooth.HSL[C_LUM]);
BankBooth.HSMod[C_SAT]:= (BankBooth.HSL[C_SAT] / BankBooth.HSL[C_LUM]);
Writeln('BankBooth Mods: Hue=' +FloatToStr(BankBooth.HSMod[C_HUE])+ ' Sat=' +FloatToStr(BankBooth.HSMod[C_SAT]));
end;

function FindColorBox(var x, y: Integer; color: Integer; b: TBox): Boolean;
begin
Result:= FindColor(x, y, color, b.X1, b.Y1, b.X2, b.Y2);
end;

// Credits to Narcle; I reworked his idea :)
function SetBarTPA(bOutline, bWidth, bHeight, bColour: Integer; bBox: TBox; bPoint: TPoint): TTPAItem;
begin
with Result do
begin
Outline := bOutline;
Width := bWidth;
Height := bHeight;
Colour := bColour;
Box := bBox;
Slot := MSTPointToBankPoint(bPoint);
end;
end;

// Credits to Narcle; I reworked his idea :)
function UpdateBarTPA(var Item: TTPAItem; InvS: TBox): Boolean;
var
BarTPA: TPointArray; // TPA stored in this
T: TPoint; // For the middle point of Item
B: TBox; // Item bounds
begin
B := InvS;
FindColorsTolerance(BarTPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(BarTPA) < 1 then
Exit;
B := GetTPABounds(BarTPA);
T := MiddleTPA(BarTPA);
Item := SetBarTPA(Length(BarTPA), iAbs(B.x2-B.x1), iAbs(B.y2-B.y1), GetColor(T.x, T.y), B, T);
Result := true;
end;

// Credits to Narcle; I reworked his idea :)
function FindBar(var Item: TTPAItem; InvS: TBox; UpdateTrue: Boolean): Boolean;
var
TPA: TPointArray;
B: TBox;
T: TPoint;
begin
if UpdateTrue then
UpdateBarTPA(Item, InvS);

B := InvS;
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
B := GetTPABounds(TPA);
T := MiddleTPA(TPA);

SMART_DrawDotsEx(true, TPA, 255);

if (Length(TPA) = Item.Outline) and (iAbs(B.x2-B.x1) = Item.Width) and (iAbs(B.y2-B.y1) = Item.Height) then
if Item.Colour > -1 then
Result := GetColor(T.x, T.y) = Item.Colour
else
Result := True;
end;

function CountBar(Item: TTPAItem): Integer;
var
i, count: Integer;
begin
count:= 0;
for i:=1 to 28 do
if FindBar(Item, InvBox(i), False) then
begin
Inc(count);
Status('Counting Bars, you have: ' +IntToStr(count));
end;

Result:= count;
end;

function SmithingScreen: Boolean;
var
a, b: Integer;
begin
Result:= FindColor(a, b, 2071039, 250-3, 44-3, 250+3, 44+3)
end;

procedure FixSmith(Down: Boolean);
var
TPA: TPointarray;
ColScroll: Integer;
X, Y, S: Integer;
begin
if not SmithingScreen then Exit;

if Down then
begin
TPA := [Point(500, 306), Point(499, 315)];
ColScroll := 592137;
end else
begin
TPA := [Point(500, 75), Point(499, 66)];
ColScroll := 1250841;
end;

if GetColor(TPA[0].x, TPA[0].y) <> ColScroll then
begin
X := TPA[1].x - 4 + Random(8);
Y := TPA[1].y - 4 + Random(8);
HoldMouse(X, Y, mouse_left);
S := GetSystemTime;
while GetColor(TPA[0].x, TPA[0].y) <> 657930 do
if GetSystemTime - S > 3500 then
Break
else
Wait(10);
ReleaseMouse(X, Y, mouse_left);
end else
Writeln('Already in correct area');
end;

function SmithItem(Item, Amount: string): Boolean;
var
Items: array [0..1] of TStringarray;
Scroll: Boolean;
begin
if not SmithingScreen then Exit;

Items[0] := ['Dagger', 'Hatchet', 'Mace', 'Medium helm', 'Crossbow bolts', //5
'Sword', 'Nails', 'Studs', 'Arrow tips', 'Scimitar', //10
'Crossbowlimbs', 'Longsword', 'Throwing knife', 'Full helm', //14
'Square shield', 'Bullseye lantern', 'Warhammer', //17
'Battleaxe']; //18

Items[1] := ['Chainbody', 'Kite shield', '2-handed sword', 'Plateskirt',
'Platelegs', 'Platebody']; //6

if StrInArr(Item, Items[0]) then
begin
Writeln('Item is in first array');
end else
begin
if StrInArr(Item, Items[1]) then
begin
Writeln('Item is in second array');
Scroll := True
end;
end;

if Scroll then // or FixSmith(Scroll);
FixSmith(True);

case Capitalize(Item) of
Items[0][0] : MouseBox(25, 70, 78, 90, mouse_right);
Items[0][1] : MouseBox(148, 71, 193, 89, mouse_right);
Items[0][2] : MouseBox(264, 73, 306, 90, mouse_right);
Items[0][3] : MouseBox(388, 71, 439, 91 , mouse_right);
Items[0][4] : MouseBox(23, 118, 74, 144, mouse_right);
Items[0][5] : MouseBox(145, 124, 186, 142, mouse_right);
Items[0][6] : MouseBox(393, 124, 431, 141, mouse_right);
Items[0][7] : MouseBox(27, 174, 67, 192, mouse_right);
Items[0][8] : MouseBox(144, 177, 192, 195, mouse_right);
Items[0][9] : MouseBox(267, 181, 313, 196, mouse_right);
Items[0][10] : MouseBox(394, 176, 432, 193, mouse_right);
Items[0][11], Items[1][0] : MouseBox(34, 232, 80, 246, mouse_right);
Items[0][12], Items[1][1] : MouseBox(147, 231, 188, 146, mouse_right);
Items[0][13] : MouseBox(266, 232, 315, 245, mouse_right);
Items[0][14], Items[1][2] : MouseBox(391, 229, 446, 245, mouse_right);
Items[0][15], Items[1][3] : MouseBox(26, 281, 71, 297, mouse_right);
Items[0][16], Items[1][5] : MouseBox(249, 270, 326, 292, mouse_right); //266, 279, 313, 297
Items[0][17] : MouseBox(396, 282, 446, 299, mouse_right);
// Items[1][5] : MouseBox(249, 270, 326, 292, 2);
Items[1][4] : MouseBox(140, 275, 192, 293, mouse_right);
end;
Writeln('MouseBoxed');

if StrInArr(Amount, ['1', '5', 'All']) then
begin
Result := ChooseOption('ake '+Capitalize(Amount));
end else
begin
if ChooseOption('ake X') then
begin
Wait(2000 + Random(2000));
TypeSend(Amount);
Result := True;
end;
end;
end;

procedure DoAntiBan;
begin;
if not(LoggedIn) then Exit;
case Random(150) of
10: begin
HoverSkill('smithing', false);
GameTab(Tab_Inv);
end;
15: begin
HoverSkill('smithing', false);
GameTab(Tab_Inv);
end;
20: RandomMovement;
25: RandomMovement;
30: RandomAngle(1);
40: PickupMouse;
50: RandomAngle(1);
60: RandomRClick;
70: ExamineInv;
end;
end;

function FindMyBank(var x, y: Integer): Boolean;
var
CTS, i, h: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(BankBooth.HSMod[C_HUE], BankBooth.HSMod[C_SAT]);

FindColorsSpiralTolerance(MSCX, MSCY, BankBooth.TPA, BankBooth.Colour, MSX1, MSY1, MSX2, MSY2, BankBooth.Tol);
ColorToleranceSpeed(CTS);

BankBooth.ATPA := TPAToATPAEx(BankBooth.TPA, 40, 40);
SortATPAFrom(BankBooth.ATPA, Point(MSCX, MSCY));

if ( Length(BankBooth.ATPA)=0 ) then
begin
Writeln('No Bank booths found.');
Result:= false;
end else
Writeln('Found possible Bank booths');

h:= High(BankBooth.ATPA);
For i := 0 to h do
begin
SMART_DrawDotsEx(true, BankBooth.ATPA[i], 255);
MiddleTPAEx(BankBooth.ATPA[i], x, y);
MMouse(x, y, 5, 2);
SMART_ClearCanvas;
if ( WaitUpTextMulti(['Bank', 'ooth', 'nk boo'], 200) ) then
begin
Result:= True;
GetMousePos(x, y);
Break;
end else
Result:= false
end;
end;

function OpenMyBank: Boolean;
var
x, y, i, t: Integer;
begin
MakeCompass(90);
if not LoggedIn then
Exit;

if BankScreen or Pinscreen then
begin
Result:= true;
Exit;
end;

if FindMyBank(x, y) then
begin
Mouse(x, y, 0, 0, mouse_right);
MarkTime(t)
repeat
Wait(RandomRange(200,400))
if ChooseOptionMulti(['ank', 'ank bo']) then
begin
FFlag(1);
Wait(RandomRange(200,400));
Result:= true;
Exit;
end;
if TimeFromMark(t) > 3000 then
Exit;
until(false)
end;
end;

function CheckLoc_OLD: String;
var
D_Dungeon, D_Anvil: Integer;
begin
if not LoggedIn then
Exit;

SymbolAccuracy := 0.7;
repeat
if FindSymbol(x, y, 'anvil') then
begin
D_Anvil:= Distance(x, y, MMCX, MMCY);
Break;
end else
Writeln('Can''t find Anvil Symbol.');

SymbolAccuracy := SymbolAccuracy - 0.1;
until(SymbolAccuracy < 0.2)

SymbolAccuracy := 0.7;
repeat
if FindSymbol(x, y, 'dungeon') then
begin
D_Dungeon:= Distance(x, y, MMCX, MMCY);
Break;
end else
Writeln('Can''t find Dungeon Symbol.');

SymbolAccuracy := SymbolAccuracy - 0.1;
until(SymbolAccuracy < 0.2)

if D_Anvil<D_Dungeon then
begin
Result:= 'anvil';
Writeln('You''re at the anvil.');
end else
begin
Result:= 'bank';
Writeln('You''re at the bank.');
end;
end;

function CheckLoc: String;
var
roadCol, t: Integer;
divTPA: TPointArray;
locBox: TBox;
begin
MarkTime(t);
MakeCompass('N');
roadCol := 9080459; // AutoColor(srl_VarrockRoadColor);
if roadCol = -1 then
Writeln('AutoColor Failed.');
FindColorsTolerance(divTPA, roadCol, MMCX, MMY1, MMX2, MMY2, 10); //FindColors(divTPA, roadCol, MMCX, MMY1, MMX2, MMY2);
if Length(divTPA) < 1 then
Writeln('No road colour found.');
SMART_DrawDotsEx(True, divTPA, clBlue);
locBox := GetTPABounds(divTPA);
locBox := IntToBox(locBox.x1, locBox.y1, locBox.x2, locBox.y2 - ((locBox.y2 - locBox.y1) / 2));
SMART_DrawBoxEx(False, locBox, clGreen);
//Wait(5000);

if MMCY > locBox.y2 then
Result := 'anvil'
else
Result := 'bank';

Writeln('You are at: ' +Result);
Writeln('Function took ' +IntToStr(TimeFromMark(t))+ ' ms');
end;

function ToAnvil: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
MouseBox(641, 123, 652, 132, 1);
FFlag(0);
Wait(RandomRange(600, 800));

if (CheckLoc <> 'anvil') then
begin
if FindSymbol(x, y, 'anvil') then
begin
Mouse(x, y, 3, 3, mouse_left);
FFlag(0);
Wait(RandomRange(600, 800));
end else
Exit;
end else
Result:= True;

end;

function ToBank: Boolean;
var
t: Integer;
angle: Extended;
foundDTM: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
foundDTM := false;
MarkTime(t)
repeat
if FindDTMRotated(DTM_MMBank, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/8, Pi/8, Pi/32, angle)
or FindDTMRotated(DTM_MMBank2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/8, Pi/8, Pi/32, angle) then
begin
Writeln('DTM found at angle: ' +FloatToStr(angle));
Mouse(x + RandomRange(3, 6), y - RandomRange(2, 5), 3, 3, true);
foundDTM := true;
Break;
end else
Writeln('Could not find MM DTM!');
until(TimeFromMark(t)>3000)

if not foundDTM then
Mouse(605, 50 - RandomRange(2, 5), 5, 5, mouse_left);

FFlag(2);
Wait(RandomRange(500,750));

Result:= (CheckLoc='bank');
end;

function FindAnvil(var x, y: Integer): Boolean;
var
CTS, i, h: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Anvil.HSMod[C_HUE], Anvil.HSMod[C_SAT]);

FindColorsSpiralTolerance(MSCX, MSCY, Anvil.TPA, Anvil.Colour, MSX1, MSY1, MSX2, MSY2, Anvil.Tol);
ColorToleranceSpeed(CTS);

Anvil.ATPA := TPAToATPAEx(Anvil.TPA, 40, 30);
SortATPAFrom(Anvil.ATPA, Point(MSCX, MSCY));

if ( Length(Anvil.ATPA)=0 ) then
begin
Writeln('No anvils found.');
Result:= false;
end else
Writeln('Found ' +IntToStr(Length(Anvil.ATPA))+ ' possible anvils?');

h:= High(Anvil.ATPA);
For i := 0 to h do
begin
MiddleTPAEx(Anvil.ATPA[i], x, y);
MMouse(x, y, 2, 2);
SMART_DrawDotsEx(true, Anvil.ATPA[i], 255);
if ( WaitUpTextMulti(['Anvi', 'nvil'], 200) ) then
begin
Result:= True;
GetMousePos(x, y);
Break;
end else
Result:= false
end;
end;

function SmithBars: Boolean;
var
x, y, i, ii, iii, e, t: Integer;
begin
if not LoggedIn then
Exit;

FFlag(0);
Wait(RandomRange(300,500));

repeat
if FindAnvil(x, y) then
begin
if SmithingScreen then Break;
SMART_DrawDotsEx(true, Anvil.ATPA[i], 255);
iii:= 0;
Wait(RandomRange(200,400));
Mouse(x, y, 0, 0, false);
for ii:=0 to 250 do
begin
//Writeln('Waiting for ''Choose'' Option.');
if ChooseOption('mith') then
begin
FFlag(0);
SMART_ClearCanvas;
Wait(RandomRange(200,400));
MarkTime(t)
repeat
if SmithingScreen then
Break;
if TimeFromMark(t) > 10000 then
begin
Writeln('Click was somehow missed!');
Result:= false
Exit;
end;
until(false)
Break;
end;
end;
end else
begin
inc(iii);
Writeln('Anvil: Times missed is ' +IntToStr(iii));
Wait(500 + Random(1000));
if iii>9 then
begin
Result:= false
Exit;
end;
end;
until(SmithingScreen)
FFlag(0);

FindBar(InvBar, InvBox(1), true)

MarkTime(lTimer);
repeat
if SmithItem(SmithingItem, 'All') then
begin
Writeln('Smithing ' + Capitalize(SmithingItem));
Result:= true;
Break;
end;
if TimeFromMark(lTimer) > 5000 then
Exit;
until(false)

Total_Bars:= Total_Bars + WithdrawBars;
inc(Total_Loads);

MarkTime(e);
repeat
wait(500+random(100));
FindNormalRandoms;
DoAntiBan;
if LevelUp then
begin
Inc(Total_LevelUps);
ClickToContinue;
Result := True;
Exit;
end;
if TimeFromMark(e)>(1000*60*3) then
begin
Players[CurrentPlayer].Loc:= 'Bar counting error';
Result:= false;
Break;
end;
Writeln('Bars left to smith: '+IntToStr(CountBar(InvBar)));
until (CountBar(InvBar)<=0)
RunEnergy(35);
end;

function DepositSmithed: Boolean;
var
i, ii: Integer;
begin
if not LoggedIn then
Exit;

repeat
if OpenMyBank then
begin
ii:= 0;
for i:=0 to 1000 do
begin
if BankScreen or PinScreen then
begin
Wait(100+random(50));

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

DepositAll;
Result:= true;
Exit;
end;
end;
end else
begin
inc(ii);
Writeln('Bank: Times missed is ' +IntToStr(ii));
if ii>9 then
begin
Result:= false;
Exit;
end;
end;
until(BankScreen or Pinscreen)
end;

function WithdrawAllBars: Boolean;
var
x, y, i, ii: Integer;
MSPoint, BankPoint: Tpoint;
begin
if not LoggedIn then
Exit;

if InvCount>0 then
DepositSmithed;

repeat
if OpenMyBank then
begin
ii:=0;
for i:=0 to 1000 do
if BankScreen or PinScreen then
Break;
end else
begin
inc(ii);
Writeln('Bank: Times missed is ' +IntToStr(ii));
if ii>9 then
begin
Result:= false;
Players[CurrentPlayer].Loc:= 'Could not withdraw';
Exit;
end;
end;
until(BankScreen or PinScreen)

Wait(100+random(50));

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

if not BankScreen then Writeln('WARNING: Could not find Bankscreen; continuing anyway');

FixBank;
BankTab(1);
while not FindColorBox(x, y, srl_outline_black, BankIndexToMSBox(1)) do
begin
Wait(200+Random(150));
end;
if FindBar(BankBar, BankIndexToMSBox(1), true) then // Currently ALWAYS updates TPA//if FindDTM(DTM_Bar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Amount of bars left: '+IntToStr(GetAmountBox(BankIndexToMSBox(1))));
if GetAmountBox(BankIndexToMSBox(1)) <= (WithdrawBars) then
begin
Writeln('Out of bars!');
Players[CurrentPlayer].Loc:= 'No bars in the bank';
Result:= false;
Exit;
end;

BankPoint:= BankBar.Slot;
if Withdraw(BankPoint.x , BankPoint.y, WithdrawBars) then
Result:= true;

end else
begin
Writeln('Bars not found in bank');
Players[CurrentPlayer].Loc:= 'No bars in the bank';
end;

SMART_ClearCanvas;
//CloseBank;
end;

procedure SetupScript;
var
tLoad: Integer;
begin
MarkTime(tLoad);

ClearDebug;
ClearReport;

Writeln('Setting up script...');

Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;

DeclarePlayers;
LoadDTMs;
LoadColourTol;
LoadGlobals;

SMART_SetupDebug;
SMART_ClearCanvas;

WhenBreak:= ((1000*60)*Whenbreak);
Writeln('Script loaded in ' +IntToStr(Round(TimeFromMark(tLoad) / 1000))+ ' seconds.');
AddOnTerminate('ProgressReport');
end;

procedure SetupPlayer;
begin
LoginPlayer;
wait(100+random(50));

MarkTime(RoundTime);

SetRun(true);
MakeCompass('N');
{$IFDEF SRL5}
SetAngle(SRL_ANGLE_HIGH);
{$ELSE}
SetAngle(true);
{$ENDIF}

if CheckLoc='anvil' then
ToBank;

{if not FindHammer then
begin
Players[CurrentPlayer].Loc:= 'You have no hammer';
Exit;
end; }

if not WithdrawAllBars then
Writeln('Could not withdraw bars');
end;

procedure ProgressReport;
var
i: Integer;
begin
Players[CurrentPlayer].Worked:= PlayerWorked(CurrentPlayer);

Writeln('|-------------------------------------------------------------|');
Writeln(PadR('| -daazndagger-''s', 62) + '|');
Writeln(PadR('| ' +ScriptName, 62) + '|');
Writeln(PadR('| Version ' + ScriptVersion, 62) + '|');
Writeln('|-------------------------------------------------------------|');
Writeln(PadR('| Time Running : ' +MsToTime(GetTimeRunning, Time_Abbrev), 62) + '|');
Writeln(PadR('| Bars Smithed : ' +IntToStr(Total_Bars), 62) + '|');
Writeln(PadR('| Loads : ' +IntToStr(Total_Loads), 62) + '|');
Writeln(PadR('| Level Up''s : ' +IntToStr(Total_LevelUps), 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln(PadR('| False Reasons : ', 62) + '|');
for i:=0 to HowManyPlayers-1 do
Writeln(PadR('| Player ' +IntToStr(i)+': ' +Players[i].Loc, 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln('|-------------------------------------------------------------|');

end;

procedure TakeBreak;
var
Breaktime, Timeleft, i, e: Integer;
begin
end;

procedure LogoutProcess;
begin
Writeln('Loging out...');

if BankScreen then CloseBank;

ProgressReport;

if not( lowercase(Players[CurrentPlayer].Loc) = '') then
Players[CurrentPlayer].Active:= false;

if not AllPlayersInactive then
begin
TakeBreak;
end else
Exit;

NextPlayer(Players[CurrentPlayer].Active);
end;

begin
SetupScript;

SetupPlayer;

repeat
if not( lowercase(Players[CurrentPlayer].Loc) = '') then
Break;

ToAnvil;

SmithBars;

ToBank;

DepositSmithed;

WithdrawAllBars;

ProgressReport;
until false;

if LoggedIn then
end.

a small pro
| -daazndagger-'s |
| uper avvy mither |
| Version 1.06 |
|————————————————————-|
| Time Running : 56 min 56 sec |
| Bars Smithed : 1500 |
| Loads : 60 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: |
| |
| |
|————————————————————-|

Itankbots

2012-02-03 11:53:54

Use code tags please….

Tankerbuzz

2012-02-05 01:07:41

Is this been broken in the recent update?

qingqinghd

2012-02-05 13:19:06

this will work lol

Scythez0r

2012-02-06 17:15:25

It works after qingqinghd's fix. Thanks mate.

Inzi123

2012-02-07 10:55:24

begin
WhenBreak := 300000; // Minutes until break
SmithingItem := 'Throwing Knife'; // What to make
WithdrawBars := 28; // How many bars to withdraw
end;

So i am trying to smith Throwing Knives but it isnt working i tried everything can some1 help me? What am i doing wrong

qingqinghd

2012-02-07 17:10:43

it just only make platebody

g-stringer

2012-02-09 08:50:17

Doesnt click on bank ! Fix pleease

superbuster4

2012-02-11 11:33:48

does this do godsword blades?

rasek

2012-02-21 08:01:19

I freaking love you qingqinghd, that script works!

tutkubakay

2012-02-23 18:52:15

From: qingqinghd
use this fix ones
program SuperSavvySmither;
{$i SRL/SRL/Misc/Smart.simba}
{$i SRL/SRL.simba}
{$i SRL/SRL/Misc/Paintsmart.simba}

{==============================================================================]
[ Daazndagger's [S]uper [S]avvy [S]mither ]
[==============================================================================]
[ [Simba/SCAR 3.23] ]
[ [SRL] ]
[ [SMART] ]
[------------------------------------------------------------------------------]
[ Description: | ]
[-------------------. ]
[ - I made this script in two days, so don't expect much from it :P ]
[ BUT, what you can expect is that it will do its job to the best ]
[ potential. It is the best (but only working) smither at villavu.com ]
[------------------------------------------------------------------------------]
[ Features: | ]
[-------------------. ]
[ ## Version 1.00 (17/7/10): ]
[ - Initial release ]
[ - Smiths any bars into anything ]
[ - Takes rests based on the time running ]
[ - Supports multi-player ]
[ ## Version 1.01 (9/10/11): ]
[ - Hammer DTM Update ]
[ ## Version 1.02 (17/12/11): ]
[ - Toolbelt update; assumes you have a hammer in there! ]
[ - Removed DTMs, replaced with Auto-TPA Items ]
[ ## Version 1.03 (25/12/11): ]
[ - Colour update ]
[ ## Version 1.04 (05/01/12): ]
[ - Checks online for latest colours/tolerance ]
[ - Fixed location finding bug ]
[ - Improved walking procedures ]
[ ## Version 1.05 (16/01/12): ]
[ - Walking was re-worked ]
[ - Minor fixes ]
[ ## Version 1.06 (29/01/12): ]
[ - Changed location check functions ]
[ - Bug fixes elsewhere ]
[------------------------------------------------------------------------------]
[ Instructions: | ]
[-------------------. ]
[ 1. Fill in the lines below until it says STOP! ]
[ 2. Make sure you have a hammer TOOLBELT! ]
[ 3. Make sure you have bars VISIBLE in your bank. ]
[ 4. Press PLAY! ]
[------------------------------------------------------------------------------}

var
WhenBreak, WithdrawBars: Integer;
SmithingItem: String;
x, y: Integer;

{------------------------------------------------------------------------------]
[ VARIBLE SETUP: ]
[ See the thread for details. ]
[------------------------------------------------------------------------------}
procedure LoadGlobals;
begin
WhenBreak := 300000; // Minutes until break
SmithingItem := 'Platebody'; // What to make
WithdrawBars := 25; // How many bars to withdraw
end;

{------------------------------------------------------------------------------]
[ DECLARE PLAYERS: ]
[ Change accordingly. ]
[------------------------------------------------------------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Pin :=''; // Your bank PIN
Member := true;
Active := true;
end;
end;

{------------------------------------------------------------------------------}
{ STOP STOP STOP STOP STOP-STOP STOP STOP }
{ STOP STOP STOP STOP STOP | }
{ ===== STOP STOP STOP STOP STOP STOP STOP ===== }
{ STOP STOP STOP STOP STOP }
{ STOP STOP STOP STOP-STOP STOP }
{------------------------------------------------------------------------------}

const
ScriptVersion = '1.06';
ScriptName = '[S]uper [S]avvy [S]mither';

{ *** For HSL Colours}
C_HUE = 0;
C_SAT = 1;
C_LUM = 2;

type
TObjectProperties = record
Colour, Tol: Integer;
HSL: Array[0..2] of Extended;
HSMod: Array[0..1] of Extended;
TPA: TPointArray;
ATPA: array of TPointArray;
end;

type
TTPAItem = Record
Outline, Width, Height, Colour: Integer;
Box: TBox;
Slot: TPoint;
end;

var
DTM_MMBank, DTM_MMBank2: Integer; //DTM_Bar, DTM_Hammer: Integer;
BankBar, InvBar: TTPAItem;
TotalTimeInactive, RoundTime, lTimer: Integer;
Anvil, BankBooth: TObjectProperties;
Total_LevelUps, Total_Bars, Total_Loads: Integer;

procedure LoadDTMs;
begin
DTM_MMBank := DTMFromString('mbQAAAHicY2VgYFBhQWBZIJYD4tVA8eVAvAGI1wPxIiB+ycDE8PLLNzD++YcRjJmB4uiYEQsGAwCVng6l');
DTM_MMBank2 := DTMFromString('mbQAAAHicY2VgYNjDxMAwE4g5mBkYDgPpI0D8GCj+E4i/A/EjIOZiZGB4ycDE0NXeAsbtpT4MGTGuDP9BcmiYEQsGAwDgtw5H');
end;

// Only works for integers > 0
function LoadIntegerOnline(var int: Integer; site: String): Boolean;
var
IntAsString: String;
begin
int:= -1;
IntAsString:= GetPage(site);
if Length(IntAsString) > 10 then
Exit;
int:= StrToInt(IntAsString);
if int <> -1 then
Result:= True;
end;

procedure LoadColourTol;
begin

if not LoadIntegerOnline(Anvil.Colour, 'http://pastehtml.com/view/bjl2gebfi.txt') then
Anvil.Colour:= 5066064; //4473927; //4671307; //4013376; //3947839;
if not LoadIntegerOnline(Anvil.Tol, 'http://pastehtml.com/view/bjl2mrvbi.txt') then
Anvil.Tol:= 5;

ColorToHSL(Anvil.Colour, Anvil.HSL[C_HUE], Anvil.HSL[C_SAT], Anvil.HSL[C_LUM]);
Anvil.HSMod[C_HUE]:= (Anvil.HSL[C_HUE] / Anvil.HSL[C_LUM]); // 2.78
Anvil.HSMod[C_SAT]:= (Anvil.HSL[C_SAT] / Anvil.HSL[C_LUM]); // 0.28
Writeln('Anvil Mods: Hue=' +FloatToStr(Anvil.HSMod[C_HUE])+ ' Sat=' +FloatToStr(Anvil.HSMod[C_SAT]));

if not LoadIntegerOnline(BankBooth.Colour, 'http://pastehtml.com/view/bjl2tds4u.txt') then
BankBooth.Colour:= 2575450; //2707293; //2245198;
if not LoadIntegerOnline(BankBooth.Tol, 'http://pastehtml.com/view/bjl2wevlq.txt') then
BankBooth.Tol:= 3;

ColorToHSL(BankBooth.Colour, BankBooth.HSL[C_HUE], BankBooth.HSL[C_SAT], BankBooth.HSL[C_LUM]);
BankBooth.HSMod[C_HUE]:= (BankBooth.HSL[C_HUE] / BankBooth.HSL[C_LUM]);
BankBooth.HSMod[C_SAT]:= (BankBooth.HSL[C_SAT] / BankBooth.HSL[C_LUM]);
Writeln('BankBooth Mods: Hue=' +FloatToStr(BankBooth.HSMod[C_HUE])+ ' Sat=' +FloatToStr(BankBooth.HSMod[C_SAT]));
end;

function FindColorBox(var x, y: Integer; color: Integer; b: TBox): Boolean;
begin
Result:= FindColor(x, y, color, b.X1, b.Y1, b.X2, b.Y2);
end;

// Credits to Narcle; I reworked his idea :)
function SetBarTPA(bOutline, bWidth, bHeight, bColour: Integer; bBox: TBox; bPoint: TPoint): TTPAItem;
begin
with Result do
begin
Outline := bOutline;
Width := bWidth;
Height := bHeight;
Colour := bColour;
Box := bBox;
Slot := MSTPointToBankPoint(bPoint);
end;
end;

// Credits to Narcle; I reworked his idea :)
function UpdateBarTPA(var Item: TTPAItem; InvS: TBox): Boolean;
var
BarTPA: TPointArray; // TPA stored in this
T: TPoint; // For the middle point of Item
B: TBox; // Item bounds
begin
B := InvS;
FindColorsTolerance(BarTPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(BarTPA) < 1 then
Exit;
B := GetTPABounds(BarTPA);
T := MiddleTPA(BarTPA);
Item := SetBarTPA(Length(BarTPA), iAbs(B.x2-B.x1), iAbs(B.y2-B.y1), GetColor(T.x, T.y), B, T);
Result := true;
end;

// Credits to Narcle; I reworked his idea :)
function FindBar(var Item: TTPAItem; InvS: TBox; UpdateTrue: Boolean): Boolean;
var
TPA: TPointArray;
B: TBox;
T: TPoint;
begin
if UpdateTrue then
UpdateBarTPA(Item, InvS);

B := InvS;
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
B := GetTPABounds(TPA);
T := MiddleTPA(TPA);

SMART_DrawDotsEx(true, TPA, 255);

if (Length(TPA) = Item.Outline) and (iAbs(B.x2-B.x1) = Item.Width) and (iAbs(B.y2-B.y1) = Item.Height) then
if Item.Colour > -1 then
Result := GetColor(T.x, T.y) = Item.Colour
else
Result := True;
end;

function CountBar(Item: TTPAItem): Integer;
var
i, count: Integer;
begin
count:= 0;
for i:=1 to 28 do
if FindBar(Item, InvBox(i), False) then
begin
Inc(count);
Status('Counting Bars, you have: ' +IntToStr(count));
end;

Result:= count;
end;

function SmithingScreen: Boolean;
var
a, b: Integer;
begin
Result:= FindColor(a, b, 2071039, 250-3, 44-3, 250+3, 44+3)
end;

procedure FixSmith(Down: Boolean);
var
TPA: TPointarray;
ColScroll: Integer;
X, Y, S: Integer;
begin
if not SmithingScreen then Exit;

if Down then
begin
TPA := [Point(500, 306), Point(499, 315)];
ColScroll := 592137;
end else
begin
TPA := [Point(500, 75), Point(499, 66)];
ColScroll := 1250841;
end;

if GetColor(TPA[0].x, TPA[0].y) <> ColScroll then
begin
X := TPA[1].x - 4 + Random(8);
Y := TPA[1].y - 4 + Random(8);
HoldMouse(X, Y, mouse_left);
S := GetSystemTime;
while GetColor(TPA[0].x, TPA[0].y) <> 657930 do
if GetSystemTime - S > 3500 then
Break
else
Wait(10);
ReleaseMouse(X, Y, mouse_left);
end else
Writeln('Already in correct area');
end;

function SmithItem(Item, Amount: string): Boolean;
var
Items: array [0..1] of TStringarray;
Scroll: Boolean;
begin
if not SmithingScreen then Exit;

Items[0] := ['Dagger', 'Hatchet', 'Mace', 'Medium helm', 'Crossbow bolts', //5
'Sword', 'Nails', 'Studs', 'Arrow tips', 'Scimitar', //10
'Crossbowlimbs', 'Longsword', 'Throwing knife', 'Full helm', //14
'Square shield', 'Bullseye lantern', 'Warhammer', //17
'Battleaxe']; //18

Items[1] := ['Chainbody', 'Kite shield', '2-handed sword', 'Plateskirt',
'Platelegs', 'Platebody']; //6

if StrInArr(Item, Items[0]) then
begin
Writeln('Item is in first array');
end else
begin
if StrInArr(Item, Items[1]) then
begin
Writeln('Item is in second array');
Scroll := True
end;
end;

if Scroll then // or FixSmith(Scroll);
FixSmith(True);

case Capitalize(Item) of
Items[0][0] : MouseBox(25, 70, 78, 90, mouse_right);
Items[0][1] : MouseBox(148, 71, 193, 89, mouse_right);
Items[0][2] : MouseBox(264, 73, 306, 90, mouse_right);
Items[0][3] : MouseBox(388, 71, 439, 91 , mouse_right);
Items[0][4] : MouseBox(23, 118, 74, 144, mouse_right);
Items[0][5] : MouseBox(145, 124, 186, 142, mouse_right);
Items[0][6] : MouseBox(393, 124, 431, 141, mouse_right);
Items[0][7] : MouseBox(27, 174, 67, 192, mouse_right);
Items[0][8] : MouseBox(144, 177, 192, 195, mouse_right);
Items[0][9] : MouseBox(267, 181, 313, 196, mouse_right);
Items[0][10] : MouseBox(394, 176, 432, 193, mouse_right);
Items[0][11], Items[1][0] : MouseBox(34, 232, 80, 246, mouse_right);
Items[0][12], Items[1][1] : MouseBox(147, 231, 188, 146, mouse_right);
Items[0][13] : MouseBox(266, 232, 315, 245, mouse_right);
Items[0][14], Items[1][2] : MouseBox(391, 229, 446, 245, mouse_right);
Items[0][15], Items[1][3] : MouseBox(26, 281, 71, 297, mouse_right);
Items[0][16], Items[1][5] : MouseBox(249, 270, 326, 292, mouse_right); //266, 279, 313, 297
Items[0][17] : MouseBox(396, 282, 446, 299, mouse_right);
// Items[1][5] : MouseBox(249, 270, 326, 292, 2);
Items[1][4] : MouseBox(140, 275, 192, 293, mouse_right);
end;
Writeln('MouseBoxed');

if StrInArr(Amount, ['1', '5', 'All']) then
begin
Result := ChooseOption('ake '+Capitalize(Amount));
end else
begin
if ChooseOption('ake X') then
begin
Wait(2000 + Random(2000));
TypeSend(Amount);
Result := True;
end;
end;
end;

procedure DoAntiBan;
begin;
if not(LoggedIn) then Exit;
case Random(150) of
10: begin
HoverSkill('smithing', false);
GameTab(Tab_Inv);
end;
15: begin
HoverSkill('smithing', false);
GameTab(Tab_Inv);
end;
20: RandomMovement;
25: RandomMovement;
30: RandomAngle(1);
40: PickupMouse;
50: RandomAngle(1);
60: RandomRClick;
70: ExamineInv;
end;
end;

function FindMyBank(var x, y: Integer): Boolean;
var
CTS, i, h: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(BankBooth.HSMod[C_HUE], BankBooth.HSMod[C_SAT]);

FindColorsSpiralTolerance(MSCX, MSCY, BankBooth.TPA, BankBooth.Colour, MSX1, MSY1, MSX2, MSY2, BankBooth.Tol);
ColorToleranceSpeed(CTS);

BankBooth.ATPA := TPAToATPAEx(BankBooth.TPA, 40, 40);
SortATPAFrom(BankBooth.ATPA, Point(MSCX, MSCY));

if ( Length(BankBooth.ATPA)=0 ) then
begin
Writeln('No Bank booths found.');
Result:= false;
end else
Writeln('Found possible Bank booths');

h:= High(BankBooth.ATPA);
For i := 0 to h do
begin
SMART_DrawDotsEx(true, BankBooth.ATPA[i], 255);
MiddleTPAEx(BankBooth.ATPA[i], x, y);
MMouse(x, y, 5, 2);
SMART_ClearCanvas;
if ( WaitUpTextMulti(['Bank', 'ooth', 'nk boo'], 200) ) then
begin
Result:= True;
GetMousePos(x, y);
Break;
end else
Result:= false
end;
end;

function OpenMyBank: Boolean;
var
x, y, i, t: Integer;
begin
MakeCompass(90);
if not LoggedIn then
Exit;

if BankScreen or Pinscreen then
begin
Result:= true;
Exit;
end;

if FindMyBank(x, y) then
begin
Mouse(x, y, 0, 0, mouse_right);
MarkTime(t)
repeat
Wait(RandomRange(200,400))
if ChooseOptionMulti(['ank', 'ank bo']) then
begin
FFlag(1);
Wait(RandomRange(200,400));
Result:= true;
Exit;
end;
if TimeFromMark(t) > 3000 then
Exit;
until(false)
end;
end;

function CheckLoc_OLD: String;
var
D_Dungeon, D_Anvil: Integer;
begin
if not LoggedIn then
Exit;

SymbolAccuracy := 0.7;
repeat
if FindSymbol(x, y, 'anvil') then
begin
D_Anvil:= Distance(x, y, MMCX, MMCY);
Break;
end else
Writeln('Can''t find Anvil Symbol.');

SymbolAccuracy := SymbolAccuracy - 0.1;
until(SymbolAccuracy < 0.2)

SymbolAccuracy := 0.7;
repeat
if FindSymbol(x, y, 'dungeon') then
begin
D_Dungeon:= Distance(x, y, MMCX, MMCY);
Break;
end else
Writeln('Can''t find Dungeon Symbol.');

SymbolAccuracy := SymbolAccuracy - 0.1;
until(SymbolAccuracy < 0.2)

if D_Anvil<D_Dungeon then
begin
Result:= 'anvil';
Writeln('You''re at the anvil.');
end else
begin
Result:= 'bank';
Writeln('You''re at the bank.');
end;
end;

function CheckLoc: String;
var
roadCol, t: Integer;
divTPA: TPointArray;
locBox: TBox;
begin
MarkTime(t);
MakeCompass('N');
roadCol := 9080459; // AutoColor(srl_VarrockRoadColor);
if roadCol = -1 then
Writeln('AutoColor Failed.');
FindColorsTolerance(divTPA, roadCol, MMCX, MMY1, MMX2, MMY2, 10); //FindColors(divTPA, roadCol, MMCX, MMY1, MMX2, MMY2);
if Length(divTPA) < 1 then
Writeln('No road colour found.');
SMART_DrawDotsEx(True, divTPA, clBlue);
locBox := GetTPABounds(divTPA);
locBox := IntToBox(locBox.x1, locBox.y1, locBox.x2, locBox.y2 - ((locBox.y2 - locBox.y1) / 2));
SMART_DrawBoxEx(False, locBox, clGreen);
//Wait(5000);

if MMCY > locBox.y2 then
Result := 'anvil'
else
Result := 'bank';

Writeln('You are at: ' +Result);
Writeln('Function took ' +IntToStr(TimeFromMark(t))+ ' ms');
end;

function ToAnvil: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
MouseBox(641, 123, 652, 132, 1);
FFlag(0);
Wait(RandomRange(600, 800));

if (CheckLoc <> 'anvil') then
begin
if FindSymbol(x, y, 'anvil') then
begin
Mouse(x, y, 3, 3, mouse_left);
FFlag(0);
Wait(RandomRange(600, 800));
end else
Exit;
end else
Result:= True;

end;

function ToBank: Boolean;
var
t: Integer;
angle: Extended;
foundDTM: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
foundDTM := false;
MarkTime(t)
repeat
if FindDTMRotated(DTM_MMBank, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/8, Pi/8, Pi/32, angle)
or FindDTMRotated(DTM_MMBank2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/8, Pi/8, Pi/32, angle) then
begin
Writeln('DTM found at angle: ' +FloatToStr(angle));
Mouse(x + RandomRange(3, 6), y - RandomRange(2, 5), 3, 3, true);
foundDTM := true;
Break;
end else
Writeln('Could not find MM DTM!');
until(TimeFromMark(t)>3000)

if not foundDTM then
Mouse(605, 50 - RandomRange(2, 5), 5, 5, mouse_left);

FFlag(2);
Wait(RandomRange(500,750));

Result:= (CheckLoc='bank');
end;

function FindAnvil(var x, y: Integer): Boolean;
var
CTS, i, h: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Anvil.HSMod[C_HUE], Anvil.HSMod[C_SAT]);

FindColorsSpiralTolerance(MSCX, MSCY, Anvil.TPA, Anvil.Colour, MSX1, MSY1, MSX2, MSY2, Anvil.Tol);
ColorToleranceSpeed(CTS);

Anvil.ATPA := TPAToATPAEx(Anvil.TPA, 40, 30);
SortATPAFrom(Anvil.ATPA, Point(MSCX, MSCY));

if ( Length(Anvil.ATPA)=0 ) then
begin
Writeln('No anvils found.');
Result:= false;
end else
Writeln('Found ' +IntToStr(Length(Anvil.ATPA))+ ' possible anvils?');

h:= High(Anvil.ATPA);
For i := 0 to h do
begin
MiddleTPAEx(Anvil.ATPA[i], x, y);
MMouse(x, y, 2, 2);
SMART_DrawDotsEx(true, Anvil.ATPA[i], 255);
if ( WaitUpTextMulti(['Anvi', 'nvil'], 200) ) then
begin
Result:= True;
GetMousePos(x, y);
Break;
end else
Result:= false
end;
end;

function SmithBars: Boolean;
var
x, y, i, ii, iii, e, t: Integer;
begin
if not LoggedIn then
Exit;

FFlag(0);
Wait(RandomRange(300,500));

repeat
if FindAnvil(x, y) then
begin
if SmithingScreen then Break;
SMART_DrawDotsEx(true, Anvil.ATPA[i], 255);
iii:= 0;
Wait(RandomRange(200,400));
Mouse(x, y, 0, 0, false);
for ii:=0 to 250 do
begin
//Writeln('Waiting for ''Choose'' Option.');
if ChooseOption('mith') then
begin
FFlag(0);
SMART_ClearCanvas;
Wait(RandomRange(200,400));
MarkTime(t)
repeat
if SmithingScreen then
Break;
if TimeFromMark(t) > 10000 then
begin
Writeln('Click was somehow missed!');
Result:= false
Exit;
end;
until(false)
Break;
end;
end;
end else
begin
inc(iii);
Writeln('Anvil: Times missed is ' +IntToStr(iii));
Wait(500 + Random(1000));
if iii>9 then
begin
Result:= false
Exit;
end;
end;
until(SmithingScreen)
FFlag(0);

FindBar(InvBar, InvBox(1), true)

MarkTime(lTimer);
repeat
if SmithItem(SmithingItem, 'All') then
begin
Writeln('Smithing ' + Capitalize(SmithingItem));
Result:= true;
Break;
end;
if TimeFromMark(lTimer) > 5000 then
Exit;
until(false)

Total_Bars:= Total_Bars + WithdrawBars;
inc(Total_Loads);

MarkTime(e);
repeat
wait(500+random(100));
FindNormalRandoms;
DoAntiBan;
if LevelUp then
begin
Inc(Total_LevelUps);
ClickToContinue;
Result := True;
Exit;
end;
if TimeFromMark(e)>(1000*60*3) then
begin
Players[CurrentPlayer].Loc:= 'Bar counting error';
Result:= false;
Break;
end;
Writeln('Bars left to smith: '+IntToStr(CountBar(InvBar)));
until (CountBar(InvBar)<=0)
RunEnergy(35);
end;

function DepositSmithed: Boolean;
var
i, ii: Integer;
begin
if not LoggedIn then
Exit;

repeat
if OpenMyBank then
begin
ii:= 0;
for i:=0 to 1000 do
begin
if BankScreen or PinScreen then
begin
Wait(100+random(50));

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

DepositAll;
Result:= true;
Exit;
end;
end;
end else
begin
inc(ii);
Writeln('Bank: Times missed is ' +IntToStr(ii));
if ii>9 then
begin
Result:= false;
Exit;
end;
end;
until(BankScreen or Pinscreen)
end;

function WithdrawAllBars: Boolean;
var
x, y, i, ii: Integer;
MSPoint, BankPoint: Tpoint;
begin
if not LoggedIn then
Exit;

if InvCount>0 then
DepositSmithed;

repeat
if OpenMyBank then
begin
ii:=0;
for i:=0 to 1000 do
if BankScreen or PinScreen then
Break;
end else
begin
inc(ii);
Writeln('Bank: Times missed is ' +IntToStr(ii));
if ii>9 then
begin
Result:= false;
Players[CurrentPlayer].Loc:= 'Could not withdraw';
Exit;
end;
end;
until(BankScreen or PinScreen)

Wait(100+random(50));

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

if not BankScreen then Writeln('WARNING: Could not find Bankscreen; continuing anyway');

FixBank;
BankTab(1);
while not FindColorBox(x, y, srl_outline_black, BankIndexToMSBox(1)) do
begin
Wait(200+Random(150));
end;
if FindBar(BankBar, BankIndexToMSBox(1), true) then // Currently ALWAYS updates TPA//if FindDTM(DTM_Bar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Amount of bars left: '+IntToStr(GetAmountBox(BankIndexToMSBox(1))));
if GetAmountBox(BankIndexToMSBox(1)) <= (WithdrawBars) then
begin
Writeln('Out of bars!');
Players[CurrentPlayer].Loc:= 'No bars in the bank';
Result:= false;
Exit;
end;

BankPoint:= BankBar.Slot;
if Withdraw(BankPoint.x , BankPoint.y, WithdrawBars) then
Result:= true;

end else
begin
Writeln('Bars not found in bank');
Players[CurrentPlayer].Loc:= 'No bars in the bank';
end;

SMART_ClearCanvas;
//CloseBank;
end;

procedure SetupScript;
var
tLoad: Integer;
begin
MarkTime(tLoad);

ClearDebug;
ClearReport;

Writeln('Setting up script...');

Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;

DeclarePlayers;
LoadDTMs;
LoadColourTol;
LoadGlobals;

SMART_SetupDebug;
SMART_ClearCanvas;

WhenBreak:= ((1000*60)*Whenbreak);
Writeln('Script loaded in ' +IntToStr(Round(TimeFromMark(tLoad) / 1000))+ ' seconds.');
AddOnTerminate('ProgressReport');
end;

procedure SetupPlayer;
begin
LoginPlayer;
wait(100+random(50));

MarkTime(RoundTime);

SetRun(true);
MakeCompass('N');
{$IFDEF SRL5}
SetAngle(SRL_ANGLE_HIGH);
{$ELSE}
SetAngle(true);
{$ENDIF}

if CheckLoc='anvil' then
ToBank;

{if not FindHammer then
begin
Players[CurrentPlayer].Loc:= 'You have no hammer';
Exit;
end; }

if not WithdrawAllBars then
Writeln('Could not withdraw bars');
end;

procedure ProgressReport;
var
i: Integer;
begin
Players[CurrentPlayer].Worked:= PlayerWorked(CurrentPlayer);

Writeln('|-------------------------------------------------------------|');
Writeln(PadR('| -daazndagger-''s', 62) + '|');
Writeln(PadR('| ' +ScriptName, 62) + '|');
Writeln(PadR('| Version ' + ScriptVersion, 62) + '|');
Writeln('|-------------------------------------------------------------|');
Writeln(PadR('| Time Running : ' +MsToTime(GetTimeRunning, Time_Abbrev), 62) + '|');
Writeln(PadR('| Bars Smithed : ' +IntToStr(Total_Bars), 62) + '|');
Writeln(PadR('| Loads : ' +IntToStr(Total_Loads), 62) + '|');
Writeln(PadR('| Level Up''s : ' +IntToStr(Total_LevelUps), 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln(PadR('| False Reasons : ', 62) + '|');
for i:=0 to HowManyPlayers-1 do
Writeln(PadR('| Player ' +IntToStr(i)+': ' +Players[i].Loc, 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln('|-------------------------------------------------------------|');

end;

procedure TakeBreak;
var
Breaktime, Timeleft, i, e: Integer;
begin
end;

procedure LogoutProcess;
begin
Writeln('Loging out...');

if BankScreen then CloseBank;

ProgressReport;

if not( lowercase(Players[CurrentPlayer].Loc) = '') then
Players[CurrentPlayer].Active:= false;

if not AllPlayersInactive then
begin
TakeBreak;
end else
Exit;

NextPlayer(Players[CurrentPlayer].Active);
end;

begin
SetupScript;

SetupPlayer;

repeat
if not( lowercase(Players[CurrentPlayer].Loc) = '') then
Break;

ToAnvil;

SmithBars;

ToBank;

DepositSmithed;

WithdrawAllBars;

ProgressReport;
until false;

if LoggedIn then
end.

a small pro



that works thank you!!

Godric

2012-02-24 23:05:24

It works perfectly!
Luvin it.

qingqinghd

2012-02-28 14:50:30

ty thanks love my work

PlatinumSif

2012-03-17 08:30:06

It keeps missing the bank lol.

hajahmz

2012-03-17 08:30:48

Does this still work?

XiLE1

2012-04-03 03:05:55

Wow, it keeps missing the bank.

snowver

2012-04-03 16:10:01

Found possible Bank booths
Bank: Times missed is 1
Found possible Bank booths
Bank: Times missed is 2
Found possible Bank booths
Bank: Times missed is 3

all it does
itll hover over bank.. then do that

slushpuppy

2012-04-06 12:38:58

For those having bank problems


line 438(i think)

if ChooseOptionMulti(['Bank','uick', 'ickly']) then

^^ add 'Bank' to the option

bufu

2012-04-08 16:15:39

can someone plz fix or make a smithing script for varrock west ty and pm me if you deside to make one

bloopa1

2012-04-09 01:29:38

Error: Exception: "" is an invalid integer at line 143 not sure what to do with that

gunamura12

2012-04-11 03:50:24

From: slushpuppy
For those having bank problems


line 438(i think)

if ChooseOptionMulti(['Bank','uick', 'ickly']) then

^^ add 'Bank' to the option


fixed it perfectly thnak you

chefy

2012-04-16 19:23:48

Yup, as long as you add in that bank and just make plate bodies while having the bars in the FIRST slot this script is working flawlessly.

oldgregg

2012-04-18 06:58:48

Script unreliable even with fixes. Making addy pbodies I have to restart script every 5 mins. Fix if possible plx.

Andres

2012-04-19 22:07:36

I was able to get the script to work. Even when it is running well it looks very bot like.

ultima71111

2012-04-20 07:56:05

U can get it working but it will go out of position every bank trip it moves further away from the anvil so after about 5 mins it breaks so this script needs a update whisper me if anyone can help me out here im willing to talk details in pm

Poweraids

2012-04-27 04:57:23

just tried this, it started with bank interface open did 1 invi then fails to open bank, just sits there right clicking booth then clicks somewhere else

angelwithoutwings

2012-04-29 01:49:04

Error: Exception: "" is an invalid integer at line 143
The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2, 3]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

i got this erroe after i copied the script in the top of this page:

[Hint] C:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
[Error] (255:2): String error at line 254
[Error] (255:2): Syntax error at line 254
Compiling failed.

VeEight

2012-05-07 03:55:02

is this working?

i keep getting errors

planvlad

2012-05-10 22:24:24

From: angelwithoutwings
Error: Exception: "" is an invalid integer at line 143
The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2, 3]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

i got this erroe after i copied the script in the top of this page:

[Hint] C:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
[Error] (255:2): String error at line 254
[Error] (255:2): Syntax error at line 254
Compiling failed.


I get the same thing.

Flight

2012-05-12 21:19:48

Out of request, here's a version that should compile right up for you. Let me know if it works.


program SuperSavvySmither;
{$i SRL/SRL/Misc/Smart.simba}
{$i SRL/SRL.simba}
{$i SRL/SRL/Misc/Paintsmart.simba}

{==============================================================================]
[ Daazndagger's [S]uper [S]avvy [S]mither ]
[==============================================================================]
[ [Simba/SCAR 3.23] ]
[ [SRL] ]
[ [SMART] ]
[------------------------------------------------------------------------------]
[ Description: | ]
[-------------------. ]
[ - I made this script in two days, so don't expect much from it :P ]
[ BUT, what you can expect is that it will do its job to the best ]
[ potential. It is the best (but only working) smither at villavu.com ]
[------------------------------------------------------------------------------]
[ Features: | ]
[-------------------. ]
[ ## Version 1.00 (17/7/10): ]
[ - Initial release ]
[ - Smiths any bars into anything ]
[ - Takes rests based on the time running ]
[ - Supports multi-player ]
[ ## Version 1.01 (9/10/11): ]
[ - Hammer DTM Update ]
[ ## Version 1.02 (17/12/11): ]
[ - Toolbelt update; assumes you have a hammer in there! ]
[ - Removed DTMs, replaced with Auto-TPA Items ]
[ ## Version 1.03 (25/12/11): ]
[ - Colour update ]
[ ## Version 1.04 (05/01/12): ]
[ - Checks online for latest colours/tolerance ]
[ - Fixed location finding bug ]
[ - Improved walking procedures ]
[ ## Version 1.05 (16/01/12): ]
[ - Walking was re-worked ]
[ - Minor fixes ]
[ ## Version 1.06 (29/01/12): ]
[ - Changed location check functions ]
[ - Bug fixes elsewhere ]
[------------------------------------------------------------------------------]
[ Instructions: | ]
[-------------------. ]
[ 1. Fill in the lines below until it says STOP! ]
[ 2. Make sure you have a hammer TOOLBELT! ]
[ 3. Make sure you have bars VISIBLE in your bank. ]
[ 4. Press PLAY! ]
[------------------------------------------------------------------------------}

var
WhenBreak, WithdrawBars: Integer;
SmithingItem: String;
x, y: Integer;

{------------------------------------------------------------------------------]
[ VARIBLE SETUP: ]
[ See the thread for details. ]
[------------------------------------------------------------------------------}
procedure LoadGlobals;
begin
WhenBreak := 300000; // Minutes until break
SmithingItem := 'Platebody'; // What to make
WithdrawBars := 25; // How many bars to withdraw
end;

{------------------------------------------------------------------------------]
[ DECLARE PLAYERS: ]
[ Change accordingly. ]
[------------------------------------------------------------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Pin :=''; // Your bank PIN
Member := true;
Active := true;
end;
end;

{------------------------------------------------------------------------------}
{ STOP STOP STOP STOP STOP-STOP STOP STOP }
{ STOP STOP STOP STOP STOP | }
{ ===== STOP STOP STOP STOP STOP STOP STOP ===== }
{ STOP STOP STOP STOP STOP }
{ STOP STOP STOP STOP-STOP STOP }
{------------------------------------------------------------------------------}

const
ScriptVersion = '1.06';
ScriptName = '[S]uper [S]avvy [S]mither';

{ *** For HSL Colours}
C_HUE = 0;
C_SAT = 1;
C_LUM = 2;

type
TObjectProperties = record
Colour, Tol: Integer;
HSL: Array[0..2] of Extended;
HSMod: Array[0..1] of Extended;
TPA: TPointArray;
ATPA: array of TPointArray;
end;

type
TTPAItem = Record
Outline, Width, Height, Colour: Integer;
Box: TBox;
Slot: TPoint;
end;

var
DTM_MMBank, DTM_MMBank2: Integer; //DTM_Bar, DTM_Hammer: Integer;
BankBar, InvBar: TTPAItem;
RoundTime, lTimer: Integer;
Anvil, BankBooth: TObjectProperties;
Total_LevelUps, Total_Bars, Total_Loads: Integer;

procedure LoadDTMs;
begin
DTM_MMBank := DTMFromString('mbQAAAHicY2VgYFBhQWBZIJYD4tVA8eVAvAGI1wPxIiB+ycDE8PLLNzD++YcRjJmB4uiYEQsGAwCVng6l');
DTM_MMBank2 := DTMFromString('mbQAAAHicY2VgYNjDxMAwE4g5mBkYDgPpI0D8GCj+E4i/A/EjIOZiZGB4ycDE0NXeAsbtpT4MGTGuDP9BcmiYEQsGAwDgtw5H');
end;

// Only works for integers > 0
function LoadIntegerOnline(var int: Integer; site: String): Boolean;
var
IntAsString: String;
begin
int:= -1;
IntAsString:= GetPage(site);
if Length(IntAsString) > 10 then
Exit;
int:= StrToInt(IntAsString);
if int <> -1 then
Result:= True;
end;

procedure LoadColourTol;
begin

if not LoadIntegerOnline(Anvil.Colour, 'http://pastehtml.com/view/bjl2gebfi.txt') then
Anvil.Colour:= 5066064; //4473927; //4671307; //4013376; //3947839;
if not LoadIntegerOnline(Anvil.Tol, 'http://pastehtml.com/view/bjl2mrvbi.txt') then
Anvil.Tol:= 5;

ColorToHSL(Anvil.Colour, Anvil.HSL[C_HUE], Anvil.HSL[C_SAT], Anvil.HSL[C_LUM]);
Anvil.HSMod[C_HUE]:= (Anvil.HSL[C_HUE] / Anvil.HSL[C_LUM]); // 2.78
Anvil.HSMod[C_SAT]:= (Anvil.HSL[C_SAT] / Anvil.HSL[C_LUM]); // 0.28
Writeln('Anvil Mods: Hue=' +FloatToStr(Anvil.HSMod[C_HUE])+ ' Sat=' +FloatToStr(Anvil.HSMod[C_SAT]));

if not LoadIntegerOnline(BankBooth.Colour, 'http://pastehtml.com/view/bjl2tds4u.txt') then
BankBooth.Colour:= 2575450; //2707293; //2245198;
if not LoadIntegerOnline(BankBooth.Tol, 'http://pastehtml.com/view/bjl2wevlq.txt') then
BankBooth.Tol:= 3;

ColorToHSL(BankBooth.Colour, BankBooth.HSL[C_HUE], BankBooth.HSL[C_SAT], BankBooth.HSL[C_LUM]);
BankBooth.HSMod[C_HUE]:= (BankBooth.HSL[C_HUE] / BankBooth.HSL[C_LUM]);
BankBooth.HSMod[C_SAT]:= (BankBooth.HSL[C_SAT] / BankBooth.HSL[C_LUM]);
Writeln('BankBooth Mods: Hue=' +FloatToStr(BankBooth.HSMod[C_HUE])+ ' Sat=' +FloatToStr(BankBooth.HSMod[C_SAT]));
end;

function FindColorBox(var x, y: Integer; color: Integer; b: TBox): Boolean;
begin
Result:= FindColor(x, y, color, b.X1, b.Y1, b.X2, b.Y2);
end;

// Credits to Narcle; I reworked his idea :)
function SetBarTPA(bOutline, bWidth, bHeight, bColour: Integer; bBox: TBox; bPoint: TPoint): TTPAItem;
begin
with Result do
begin
Outline := bOutline;
Width := bWidth;
Height := bHeight;
Colour := bColour;
Box := bBox;
Slot := MSTPointToBankPoint(bPoint);
end;
end;

// Credits to Narcle; I reworked his idea :)
function UpdateBarTPA(var Item: TTPAItem; InvS: TBox): Boolean;
var
BarTPA: TPointArray; // TPA stored in this
T: TPoint; // For the middle point of Item
B: TBox; // Item bounds
begin
B := InvS;
FindColorsTolerance(BarTPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(BarTPA) < 1 then
Exit;
B := GetTPABounds(BarTPA);
T := MiddleTPA(BarTPA);
Item := SetBarTPA(Length(BarTPA), iAbs(B.x2-B.x1), iAbs(B.y2-B.y1), GetColor(T.x, T.y), B, T);
Result := true;
end;

// Credits to Narcle; I reworked his idea :)
function FindBar(var Item: TTPAItem; InvS: TBox; UpdateTrue: Boolean): Boolean;
var
TPA: TPointArray;
B: TBox;
T: TPoint;
begin
if UpdateTrue then
UpdateBarTPA(Item, InvS);

B := InvS;
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
B := GetTPABounds(TPA);
T := MiddleTPA(TPA);

SMART_DrawDotsEx(true, TPA, 255);

if (Length(TPA) = Item.Outline) and (iAbs(B.x2-B.x1) = Item.Width) and (iAbs(B.y2-B.y1) = Item.Height) then
if Item.Colour > -1 then
Result := GetColor(T.x, T.y) = Item.Colour
else
Result := True;
end;

function CountBar(Item: TTPAItem): Integer;
var
i, count: Integer;
begin
count:= 0;
for i:=1 to 28 do
if FindBar(Item, InvBox(i), False) then
begin
Inc(count);
Status('Counting Bars, you have: ' +IntToStr(count));
end;

Result:= count;
end;

function SmithingScreen: Boolean;
var
a, b: Integer;
begin
Result:= FindColor(a, b, 2071039, 250-3, 44-3, 250+3, 44+3)
end;

procedure FixSmith(Down: Boolean);
var
TPA: TPointarray;
ColScroll: Integer;
X, Y, S: Integer;
begin
if not SmithingScreen then Exit;

if Down then
begin
TPA := [Point(500, 306), Point(499, 315)];
ColScroll := 592137;
end else
begin
TPA := [Point(500, 75), Point(499, 66)];
ColScroll := 1250841;
end;

if GetColor(TPA[0].x, TPA[0].y) <> ColScroll then
begin
X := TPA[1].x - 4 + Random(8);
Y := TPA[1].y - 4 + Random(8);
HoldMouse(X, Y, mouse_left);
S := GetSystemTime;
while GetColor(TPA[0].x, TPA[0].y) <> 657930 do
if GetSystemTime - S > 3500 then
Break
else
Wait(10);
ReleaseMouse(X, Y, mouse_left);
end else
Writeln('Already in correct area');
end;

function SmithItem(Item, Amount: string): Boolean;
var
Items: array [0..1] of TStringarray;
Scroll: Boolean;
begin
if not SmithingScreen then Exit;

Items[0] := ['Dagger', 'Hatchet', 'Mace', 'Medium helm', 'Crossbow bolts', //5
'Sword', 'Nails', 'Studs', 'Arrow tips', 'Scimitar', //10
'Crossbowlimbs', 'Longsword', 'Throwing knife', 'Full helm', //14
'Square shield', 'Bullseye lantern', 'Warhammer', //17
'Battleaxe']; //18

Items[1] := ['Chainbody', 'Kite shield', '2-handed sword', 'Plateskirt',
'Platelegs', 'Platebody']; //6

if StrInArr(Item, Items[0]) then
begin
Writeln('Item is in first array');
end else
begin
if StrInArr(Item, Items[1]) then
begin
Writeln('Item is in second array');
Scroll := True
end;
end;

if Scroll then // or FixSmith(Scroll);
FixSmith(True);

case Capitalize(Item) of
Items[0][0] : MouseBox(25, 70, 78, 90, mouse_right);
Items[0][1] : MouseBox(148, 71, 193, 89, mouse_right);
Items[0][2] : MouseBox(264, 73, 306, 90, mouse_right);
Items[0][3] : MouseBox(388, 71, 439, 91 , mouse_right);
Items[0][4] : MouseBox(23, 118, 74, 144, mouse_right);
Items[0][5] : MouseBox(145, 124, 186, 142, mouse_right);
Items[0][6] : MouseBox(393, 124, 431, 141, mouse_right);
Items[0][7] : MouseBox(27, 174, 67, 192, mouse_right);
Items[0][8] : MouseBox(144, 177, 192, 195, mouse_right);
Items[0][9] : MouseBox(267, 181, 313, 196, mouse_right);
Items[0][10] : MouseBox(394, 176, 432, 193, mouse_right);
Items[0][11], Items[1][0] : MouseBox(34, 232, 80, 246, mouse_right);
Items[0][12], Items[1][1] : MouseBox(147, 231, 188, 146, mouse_right);
Items[0][13] : MouseBox(266, 232, 315, 245, mouse_right);
Items[0][14], Items[1][2] : MouseBox(391, 229, 446, 245, mouse_right);
Items[0][15], Items[1][3] : MouseBox(26, 281, 71, 297, mouse_right);
Items[0][16], Items[1][5] : MouseBox(249, 270, 326, 292, mouse_right); //266, 279, 313, 297
Items[0][17] : MouseBox(396, 282, 446, 299, mouse_right);
// Items[1][5] : MouseBox(249, 270, 326, 292, 2);
Items[1][4] : MouseBox(140, 275, 192, 293, mouse_right);
end;
Writeln('MouseBoxed');

if StrInArr(Amount, ['1', '5', 'All']) then
begin
Result := ChooseOption('ake '+Capitalize(Amount));
end else
begin
if ChooseOption('ake X') then
begin
Wait(2000 + Random(2000));
TypeSend(Amount);
Result := True;
end;
end;
end;

procedure DoAntiBan;
begin;
if not(LoggedIn) then Exit;
case Random(150) of
10: begin
HoverSkill('smithing', false);
GameTab(Tab_Inv);
end;
15: begin
HoverSkill('smithing', false);
GameTab(Tab_Inv);
end;
20: RandomMovement;
25: RandomMovement;
30: RandomAngle(1);
40: PickupMouse;
50: RandomAngle(1);
60: RandomRClick;
70: ExamineInv;
end;
end;

function FindMyBank(var x, y: Integer): Boolean;
var
CTS, i, h: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(BankBooth.HSMod[C_HUE], BankBooth.HSMod[C_SAT]);

FindColorsSpiralTolerance(MSCX, MSCY, BankBooth.TPA, BankBooth.Colour, MSX1, MSY1, MSX2, MSY2, BankBooth.Tol);
ColorToleranceSpeed(CTS);

BankBooth.ATPA := TPAToATPAEx(BankBooth.TPA, 40, 40);
SortATPAFrom(BankBooth.ATPA, Point(MSCX, MSCY));

if ( Length(BankBooth.ATPA)=0 ) then
begin
Writeln('No Bank booths found.');
Result:= false;
end else
Writeln('Found possible Bank booths');

h:= High(BankBooth.ATPA);
For i := 0 to h do
begin
SMART_DrawDotsEx(true, BankBooth.ATPA[i], 255);
MiddleTPAEx(BankBooth.ATPA[i], x, y);
MMouse(x, y, 5, 2);
SMART_ClearCanvas;
if ( WaitUpTextMulti(['Bank', 'ooth', 'nk boo'], 200) ) then
begin
Result:= True;
GetMousePos(x, y);
Break;
end else
Result:= false
end;
end;

function OpenMyBank: Boolean;
var
x, y, t: Integer;
begin
MakeCompass(90);
if not LoggedIn then
Exit;

if BankScreen or Pinscreen then
begin
Result:= true;
Exit;
end;

if FindMyBank(x, y) then
begin
Mouse(x, y, 0, 0, mouse_right);
MarkTime(t)
repeat
if WaitOptionMulti(['Bank','uick', 'ickly'], 800) then
begin
FFlag(1);
Wait(RandomRange(200,400));
Result:= true;
Exit;
end;
if TimeFromMark(t) > 3000 then
Exit;
until(false)
end;
end;

function CheckLoc_OLD: String;
var
D_Dungeon, D_Anvil: Integer;
begin
if not LoggedIn then
Exit;

SymbolAccuracy := 0.7;
repeat
if FindSymbol(x, y, 'anvil') then
begin
D_Anvil:= Distance(x, y, MMCX, MMCY);
Break;
end else
Writeln('Can''t find Anvil Symbol.');

SymbolAccuracy := SymbolAccuracy - 0.1;
until(SymbolAccuracy < 0.2)

SymbolAccuracy := 0.7;
repeat
if FindSymbol(x, y, 'dungeon') then
begin
D_Dungeon:= Distance(x, y, MMCX, MMCY);
Break;
end else
Writeln('Can''t find Dungeon Symbol.');

SymbolAccuracy := SymbolAccuracy - 0.1;
until(SymbolAccuracy < 0.2)

if D_Anvil<D_Dungeon then
begin
Result:= 'anvil';
Writeln('You''re at the anvil.');
end else
begin
Result:= 'bank';
Writeln('You''re at the bank.');
end;
end;

function CheckLoc: String;
var
roadCol, t: Integer;
divTPA: TPointArray;
locBox: TBox;
begin
MarkTime(t);
MakeCompass('N');
roadCol := 9080459; // AutoColor(srl_VarrockRoadColor);
if roadCol = -1 then
Writeln('AutoColor Failed.');
FindColorsTolerance(divTPA, roadCol, MMCX, MMY1, MMX2, MMY2, 10); //FindColors(divTPA, roadCol, MMCX, MMY1, MMX2, MMY2);
if Length(divTPA) < 1 then
Writeln('No road colour found.');
SMART_DrawDotsEx(True, divTPA, clBlue);
locBox := GetTPABounds(divTPA);
locBox := IntToBox(locBox.x1, locBox.y1, locBox.x2, locBox.y2 - ((locBox.y2 - locBox.y1) / 2));
SMART_DrawBoxEx(False, locBox, clGreen);
//Wait(5000);

if MMCY > locBox.y2 then
Result := 'anvil'
else
Result := 'bank';

Writeln('You are at: ' +Result);
Writeln('Function took ' +IntToStr(TimeFromMark(t))+ ' ms');
end;

function ToAnvil: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
MouseBox(641, 123, 652, 132, 1);
FFlag(0);
Wait(RandomRange(600, 800));

if (CheckLoc <> 'anvil') then
begin
if FindSymbol(x, y, 'anvil') then
begin
Mouse(x, y, 3, 3, mouse_left);
FFlag(0);
Wait(RandomRange(600, 800));
end else
Exit;
end else
Result:= True;

end;

function ToBank: Boolean;
var
t: Integer;
angle: Extended;
foundDTM: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
foundDTM := false;
MarkTime(t)
repeat
if FindDTMRotated(DTM_MMBank, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/8, Pi/8, Pi/32, angle)
or FindDTMRotated(DTM_MMBank2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/8, Pi/8, Pi/32, angle) then
begin
Writeln('DTM found at angle: ' +FloatToStr(angle));
Mouse(x + RandomRange(3, 6), y - RandomRange(2, 5), 3, 3, true);
foundDTM := true;
Break;
end else
Writeln('Could not find MM DTM!');
until(TimeFromMark(t)>3000)

if not foundDTM then
Mouse(605, 50 - RandomRange(2, 5), 5, 5, mouse_left);

FFlag(2);
Wait(RandomRange(500,750));

Result:= (CheckLoc='bank');
end;

function FindAnvil(var x, y: Integer): Boolean;
var
CTS, i, h: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Anvil.HSMod[C_HUE], Anvil.HSMod[C_SAT]);

FindColorsSpiralTolerance(MSCX, MSCY, Anvil.TPA, Anvil.Colour, MSX1, MSY1, MSX2, MSY2, Anvil.Tol);
ColorToleranceSpeed(CTS);

Anvil.ATPA := TPAToATPAEx(Anvil.TPA, 40, 30);
SortATPAFrom(Anvil.ATPA, Point(MSCX, MSCY));

if ( Length(Anvil.ATPA)=0 ) then
begin
Writeln('No anvils found.');
Result:= false;
end else
Writeln('Found ' +IntToStr(Length(Anvil.ATPA))+ ' possible anvils?');

h:= High(Anvil.ATPA);
For i := 0 to h do
begin
MiddleTPAEx(Anvil.ATPA[i], x, y);
MMouse(x, y, 2, 2);
SMART_DrawDotsEx(true, Anvil.ATPA[i], 255);
if ( WaitUpTextMulti(['Anvi', 'nvil'], 200) ) then
begin
Result:= True;
GetMousePos(x, y);
Break;
end else
Result:= false
end;
end;

function SmithBars: Boolean;
var
x, y, i, ii, iii, e, t: Integer;
begin
if not LoggedIn then
Exit;

FFlag(0);
Wait(RandomRange(300,500));

repeat
if FindAnvil(x, y) then
begin
if SmithingScreen then Break;
SMART_DrawDotsEx(true, Anvil.ATPA[i], 255);
iii:= 0;
Wait(RandomRange(200,400));
Mouse(x, y, 0, 0, false);
for ii:=0 to 250 do
begin
//Writeln('Waiting for ''Choose'' Option.');
if ChooseOption('mith') then
begin
FFlag(0);
SMART_ClearCanvas;
Wait(RandomRange(200,400));
MarkTime(t)
repeat
if SmithingScreen then
Break;
if TimeFromMark(t) > 10000 then
begin
Writeln('Click was somehow missed!');
Result:= false
Exit;
end;
until(false)
Break;
end;
end;
end else
begin
inc(iii);
Writeln('Anvil: Times missed is ' +IntToStr(iii));
Wait(500 + Random(1000));
if iii>9 then
begin
Result:= false
Exit;
end;
end;
until(SmithingScreen)
FFlag(0);

FindBar(InvBar, InvBox(1), true)

MarkTime(lTimer);
repeat
if SmithItem(SmithingItem, 'All') then
begin
Writeln('Smithing ' + Capitalize(SmithingItem));
Result:= true;
Break;
end;
if TimeFromMark(lTimer) > 5000 then
Exit;
until(false)

Total_Bars:= Total_Bars + WithdrawBars;
inc(Total_Loads);

MarkTime(e);
repeat
wait(500+random(100));
FindNormalRandoms;
DoAntiBan;
if LevelUp then
begin
Inc(Total_LevelUps);
ClickToContinue;
Result := True;
Exit;
end;
if TimeFromMark(e)>(1000*60*3) then
begin
Players[CurrentPlayer].Loc:= 'Bar counting error';
Result:= false;
Break;
end;
Writeln('Bars left to smith: '+IntToStr(CountBar(InvBar)));
until (CountBar(InvBar)<=0)
RunEnergy(35);
end;

function DepositSmithed: Boolean;
var
i, ii: Integer;
begin
if not LoggedIn then
Exit;

repeat
if OpenMyBank then
begin
ii:= 0;
for i:=0 to 1000 do
begin
if BankScreen or PinScreen then
begin
Wait(100+random(50));

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

DepositAll;
Result:= true;
Exit;
end;
end;
end else
begin
inc(ii);
Writeln('Bank: Times missed is ' +IntToStr(ii));
if ii>9 then
begin
Result:= false;
Exit;
end;
end;
until(BankScreen or Pinscreen)
end;

function WithdrawAllBars: Boolean;
var
x, y, i, ii: Integer;
BankPoint: Tpoint;
begin
if not LoggedIn then
Exit;

if InvCount>0 then
DepositSmithed;

repeat
if OpenMyBank then
begin
ii:=0;
for i:=0 to 1000 do
if BankScreen or PinScreen then
Break;
end else
begin
inc(ii);
Writeln('Bank: Times missed is ' +IntToStr(ii));
if ii>9 then
begin
Result:= false;
Players[CurrentPlayer].Loc:= 'Could not withdraw';
Exit;
end;
end;
until(BankScreen or PinScreen)

Wait(100+random(50));

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

if not BankScreen then Writeln('WARNING: Could not find Bankscreen; continuing anyway');

FixBank;
BankTab(1);
while not FindColorBox(x, y, srl_outline_black, BankIndexToMSBox(1)) do
begin
Wait(200+Random(150));
end;
if FindBar(BankBar, BankIndexToMSBox(1), true) then // Currently ALWAYS updates TPA//if FindDTM(DTM_Bar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Amount of bars left: '+IntToStr(GetAmountBox(BankIndexToMSBox(1))));
if GetAmountBox(BankIndexToMSBox(1)) <= (WithdrawBars) then
begin
Writeln('Out of bars!');
Players[CurrentPlayer].Loc:= 'No bars in the bank';
Result:= false;
Exit;
end;

BankPoint:= BankBar.Slot;
if Withdraw(BankPoint.x , BankPoint.y, WithdrawBars) then
Result:= true;

end else
begin
Writeln('Bars not found in bank');
Players[CurrentPlayer].Loc:= 'No bars in the bank';
end;

SMART_ClearCanvas;
//CloseBank;
end;

procedure SetupScript;
var
tLoad: Integer;
begin
MarkTime(tLoad);

ClearDebug;
ClearReport;

Writeln('Setting up script...');

Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;

DeclarePlayers;
LoadDTMs;
LoadColourTol;
LoadGlobals;

SMART_SetupDebug;
SMART_ClearCanvas;

WhenBreak:= ((1000*60)*Whenbreak);
Writeln('Script loaded in ' +IntToStr(Round(TimeFromMark(tLoad) / 1000))+ ' seconds.');
AddOnTerminate('ProgressReport');
end;

procedure SetupPlayer;
begin
LoginPlayer;
wait(100+random(50));

MarkTime(RoundTime);

SetRun(true);
MakeCompass('N');
{$IFDEF SRL5}
SetAngle(SRL_ANGLE_HIGH);
{$ELSE}
SetAngle(true);
{$ENDIF}

if CheckLoc='anvil' then
ToBank;

{if not FindHammer then
begin
Players[CurrentPlayer].Loc:= 'You have no hammer';
Exit;
end; }

if not WithdrawAllBars then
Writeln('Could not withdraw bars');
end;

procedure ProgressReport;
var
i: Integer;
begin
Players[CurrentPlayer].Worked:= PlayerWorked(CurrentPlayer);

Writeln('|-------------------------------------------------------------|');
Writeln(PadR('| -daazndagger-''s', 62) + '|');
Writeln(PadR('| ' +ScriptName, 62) + '|');
Writeln(PadR('| Version ' + ScriptVersion, 62) + '|');
Writeln('|-------------------------------------------------------------|');
Writeln(PadR('| Time Running : ' +MsToTime(GetTimeRunning, Time_Abbrev), 62) + '|');
Writeln(PadR('| Bars Smithed : ' +IntToStr(Total_Bars), 62) + '|');
Writeln(PadR('| Loads : ' +IntToStr(Total_Loads), 62) + '|');
Writeln(PadR('| Level Up''s : ' +IntToStr(Total_LevelUps), 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln(PadR('| False Reasons : ', 62) + '|');
for i:=0 to HowManyPlayers-1 do
Writeln(PadR('| Player ' +IntToStr(i)+': ' +Players[i].Loc, 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln('|-------------------------------------------------------------|');

end;

procedure LogoutProcess;
begin
Writeln('Loging out...');

if BankScreen then CloseBank;

ProgressReport;

if not( lowercase(Players[CurrentPlayer].Loc) = '') then
Players[CurrentPlayer].Active:= false;

if AllPlayersInactive then
Exit;

NextPlayer(Players[CurrentPlayer].Active);
end;

begin
SetupScript;

SetupPlayer;

repeat
if not( lowercase(Players[CurrentPlayer].Loc) = '') then
Break;

ToAnvil;

SmithBars;

ToBank;

DepositSmithed;

WithdrawAllBars;

ProgressReport;
until false;

if LoggedIn then
end.

Dark_Yaz

2012-05-13 06:30:30

Setting up script…
SRL Compiled in 0 msec
SMART Initialized.
Loaded: Server 10, Members: True, Signed: True, Super Detail: False.
Error: Exception: "" is an invalid integer at line 143
The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2, 3]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]


It compiles but then that comes up :s

ZenoKurosagi

2012-05-14 02:15:47

From: Dark_Yaz
Setting up script…
SRL Compiled in 0 msec
SMART Initialized.
Loaded: Server 10, Members: True, Signed: True, Super Detail: False.
Error: Exception: "" is an invalid integer at line 143
The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2, 3]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]


It compiles but then that comes up :s


I'm getting the same thing :/

Inheaven

2012-05-14 08:43:19

From: Flight
Out of request, here's a version that should compile right up for you. Let me know if it works.


program SuperSavvySmither;
{$i SRL/SRL/Misc/Smart.simba}
{$i SRL/SRL.simba}
{$i SRL/SRL/Misc/Paintsmart.simba}

{==============================================================================]
[ Daazndagger's [S]uper [S]avvy [S]mither ]
[==============================================================================]
[ [Simba/SCAR 3.23] ]
[ [SRL] ]
[ [SMART] ]
[------------------------------------------------------------------------------]
[ Description: | ]
[-------------------. ]
[ - I made this script in two days, so don't expect much from it :P ]
[ BUT, what you can expect is that it will do its job to the best ]
[ potential. It is the best (but only working) smither at villavu.com ]
[------------------------------------------------------------------------------]
[ Features: | ]
[-------------------. ]
[ ## Version 1.00 (17/7/10): ]
[ - Initial release ]
[ - Smiths any bars into anything ]
[ - Takes rests based on the time running ]
[ - Supports multi-player ]
[ ## Version 1.01 (9/10/11): ]
[ - Hammer DTM Update ]
[ ## Version 1.02 (17/12/11): ]
[ - Toolbelt update; assumes you have a hammer in there! ]
[ - Removed DTMs, replaced with Auto-TPA Items ]
[ ## Version 1.03 (25/12/11): ]
[ - Colour update ]
[ ## Version 1.04 (05/01/12): ]
[ - Checks online for latest colours/tolerance ]
[ - Fixed location finding bug ]
[ - Improved walking procedures ]
[ ## Version 1.05 (16/01/12): ]
[ - Walking was re-worked ]
[ - Minor fixes ]
[ ## Version 1.06 (29/01/12): ]
[ - Changed location check functions ]
[ - Bug fixes elsewhere ]
[------------------------------------------------------------------------------]
[ Instructions: | ]
[-------------------. ]
[ 1. Fill in the lines below until it says STOP! ]
[ 2. Make sure you have a hammer TOOLBELT! ]
[ 3. Make sure you have bars VISIBLE in your bank. ]
[ 4. Press PLAY! ]
[------------------------------------------------------------------------------}

var
WhenBreak, WithdrawBars: Integer;
SmithingItem: String;
x, y: Integer;

{------------------------------------------------------------------------------]
[ VARIBLE SETUP: ]
[ See the thread for details. ]
[------------------------------------------------------------------------------}
procedure LoadGlobals;
begin
WhenBreak := 300000; // Minutes until break
SmithingItem := 'Platebody'; // What to make
WithdrawBars := 25; // How many bars to withdraw
end;

{------------------------------------------------------------------------------]
[ DECLARE PLAYERS: ]
[ Change accordingly. ]
[------------------------------------------------------------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Pin :=''; // Your bank PIN
Member := true;
Active := true;
end;
end;

{------------------------------------------------------------------------------}
{ STOP STOP STOP STOP STOP-STOP STOP STOP }
{ STOP STOP STOP STOP STOP | }
{ ===== STOP STOP STOP STOP STOP STOP STOP ===== }
{ STOP STOP STOP STOP STOP }
{ STOP STOP STOP STOP-STOP STOP }
{------------------------------------------------------------------------------}

const
ScriptVersion = '1.06';
ScriptName = '[S]uper [S]avvy [S]mither';

{ *** For HSL Colours}
C_HUE = 0;
C_SAT = 1;
C_LUM = 2;

type
TObjectProperties = record
Colour, Tol: Integer;
HSL: Array[0..2] of Extended;
HSMod: Array[0..1] of Extended;
TPA: TPointArray;
ATPA: array of TPointArray;
end;

type
TTPAItem = Record
Outline, Width, Height, Colour: Integer;
Box: TBox;
Slot: TPoint;
end;

var
DTM_MMBank, DTM_MMBank2: Integer; //DTM_Bar, DTM_Hammer: Integer;
BankBar, InvBar: TTPAItem;
RoundTime, lTimer: Integer;
Anvil, BankBooth: TObjectProperties;
Total_LevelUps, Total_Bars, Total_Loads: Integer;

procedure LoadDTMs;
begin
DTM_MMBank := DTMFromString('mbQAAAHicY2VgYFBhQWBZIJYD4tVA8eVAvAGI1wPxIiB+ycDE8PLLNzD++YcRjJmB4uiYEQsGAwCVng6l');
DTM_MMBank2 := DTMFromString('mbQAAAHicY2VgYNjDxMAwE4g5mBkYDgPpI0D8GCj+E4i/A/EjIOZiZGB4ycDE0NXeAsbtpT4MGTGuDP9BcmiYEQsGAwDgtw5H');
end;

// Only works for integers > 0
function LoadIntegerOnline(var int: Integer; site: String): Boolean;
var
IntAsString: String;
begin
int:= -1;
IntAsString:= GetPage(site);
if Length(IntAsString) > 10 then
Exit;
int:= StrToInt(IntAsString);
if int <> -1 then
Result:= True;
end;

procedure LoadColourTol;
begin

if not LoadIntegerOnline(Anvil.Colour, 'http://pastehtml.com/view/bjl2gebfi.txt') then
Anvil.Colour:= 5066064; //4473927; //4671307; //4013376; //3947839;
if not LoadIntegerOnline(Anvil.Tol, 'http://pastehtml.com/view/bjl2mrvbi.txt') then
Anvil.Tol:= 5;

ColorToHSL(Anvil.Colour, Anvil.HSL[C_HUE], Anvil.HSL[C_SAT], Anvil.HSL[C_LUM]);
Anvil.HSMod[C_HUE]:= (Anvil.HSL[C_HUE] / Anvil.HSL[C_LUM]); // 2.78
Anvil.HSMod[C_SAT]:= (Anvil.HSL[C_SAT] / Anvil.HSL[C_LUM]); // 0.28
Writeln('Anvil Mods: Hue=' +FloatToStr(Anvil.HSMod[C_HUE])+ ' Sat=' +FloatToStr(Anvil.HSMod[C_SAT]));

if not LoadIntegerOnline(BankBooth.Colour, 'http://pastehtml.com/view/bjl2tds4u.txt') then
BankBooth.Colour:= 2575450; //2707293; //2245198;
if not LoadIntegerOnline(BankBooth.Tol, 'http://pastehtml.com/view/bjl2wevlq.txt') then
BankBooth.Tol:= 3;

ColorToHSL(BankBooth.Colour, BankBooth.HSL[C_HUE], BankBooth.HSL[C_SAT], BankBooth.HSL[C_LUM]);
BankBooth.HSMod[C_HUE]:= (BankBooth.HSL[C_HUE] / BankBooth.HSL[C_LUM]);
BankBooth.HSMod[C_SAT]:= (BankBooth.HSL[C_SAT] / BankBooth.HSL[C_LUM]);
Writeln('BankBooth Mods: Hue=' +FloatToStr(BankBooth.HSMod[C_HUE])+ ' Sat=' +FloatToStr(BankBooth.HSMod[C_SAT]));
end;

function FindColorBox(var x, y: Integer; color: Integer; b: TBox): Boolean;
begin
Result:= FindColor(x, y, color, b.X1, b.Y1, b.X2, b.Y2);
end;

// Credits to Narcle; I reworked his idea :)
function SetBarTPA(bOutline, bWidth, bHeight, bColour: Integer; bBox: TBox; bPoint: TPoint): TTPAItem;
begin
with Result do
begin
Outline := bOutline;
Width := bWidth;
Height := bHeight;
Colour := bColour;
Box := bBox;
Slot := MSTPointToBankPoint(bPoint);
end;
end;

// Credits to Narcle; I reworked his idea :)
function UpdateBarTPA(var Item: TTPAItem; InvS: TBox): Boolean;
var
BarTPA: TPointArray; // TPA stored in this
T: TPoint; // For the middle point of Item
B: TBox; // Item bounds
begin
B := InvS;
FindColorsTolerance(BarTPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(BarTPA) < 1 then
Exit;
B := GetTPABounds(BarTPA);
T := MiddleTPA(BarTPA);
Item := SetBarTPA(Length(BarTPA), iAbs(B.x2-B.x1), iAbs(B.y2-B.y1), GetColor(T.x, T.y), B, T);
Result := true;
end;

// Credits to Narcle; I reworked his idea :)
function FindBar(var Item: TTPAItem; InvS: TBox; UpdateTrue: Boolean): Boolean;
var
TPA: TPointArray;
B: TBox;
T: TPoint;
begin
if UpdateTrue then
UpdateBarTPA(Item, InvS);

B := InvS;
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
B := GetTPABounds(TPA);
T := MiddleTPA(TPA);

SMART_DrawDotsEx(true, TPA, 255);

if (Length(TPA) = Item.Outline) and (iAbs(B.x2-B.x1) = Item.Width) and (iAbs(B.y2-B.y1) = Item.Height) then
if Item.Colour > -1 then
Result := GetColor(T.x, T.y) = Item.Colour
else
Result := True;
end;

function CountBar(Item: TTPAItem): Integer;
var
i, count: Integer;
begin
count:= 0;
for i:=1 to 28 do
if FindBar(Item, InvBox(i), False) then
begin
Inc(count);
Status('Counting Bars, you have: ' +IntToStr(count));
end;

Result:= count;
end;

function SmithingScreen: Boolean;
var
a, b: Integer;
begin
Result:= FindColor(a, b, 2071039, 250-3, 44-3, 250+3, 44+3)
end;

procedure FixSmith(Down: Boolean);
var
TPA: TPointarray;
ColScroll: Integer;
X, Y, S: Integer;
begin
if not SmithingScreen then Exit;

if Down then
begin
TPA := [Point(500, 306), Point(499, 315)];
ColScroll := 592137;
end else
begin
TPA := [Point(500, 75), Point(499, 66)];
ColScroll := 1250841;
end;

if GetColor(TPA[0].x, TPA[0].y) <> ColScroll then
begin
X := TPA[1].x - 4 + Random(8);
Y := TPA[1].y - 4 + Random(8);
HoldMouse(X, Y, mouse_left);
S := GetSystemTime;
while GetColor(TPA[0].x, TPA[0].y) <> 657930 do
if GetSystemTime - S > 3500 then
Break
else
Wait(10);
ReleaseMouse(X, Y, mouse_left);
end else
Writeln('Already in correct area');
end;

function SmithItem(Item, Amount: string): Boolean;
var
Items: array [0..1] of TStringarray;
Scroll: Boolean;
begin
if not SmithingScreen then Exit;

Items[0] := ['Dagger', 'Hatchet', 'Mace', 'Medium helm', 'Crossbow bolts', //5
'Sword', 'Nails', 'Studs', 'Arrow tips', 'Scimitar', //10
'Crossbowlimbs', 'Longsword', 'Throwing knife', 'Full helm', //14
'Square shield', 'Bullseye lantern', 'Warhammer', //17
'Battleaxe']; //18

Items[1] := ['Chainbody', 'Kite shield', '2-handed sword', 'Plateskirt',
'Platelegs', 'Platebody']; //6

if StrInArr(Item, Items[0]) then
begin
Writeln('Item is in first array');
end else
begin
if StrInArr(Item, Items[1]) then
begin
Writeln('Item is in second array');
Scroll := True
end;
end;

if Scroll then // or FixSmith(Scroll);
FixSmith(True);

case Capitalize(Item) of
Items[0][0] : MouseBox(25, 70, 78, 90, mouse_right);
Items[0][1] : MouseBox(148, 71, 193, 89, mouse_right);
Items[0][2] : MouseBox(264, 73, 306, 90, mouse_right);
Items[0][3] : MouseBox(388, 71, 439, 91 , mouse_right);
Items[0][4] : MouseBox(23, 118, 74, 144, mouse_right);
Items[0][5] : MouseBox(145, 124, 186, 142, mouse_right);
Items[0][6] : MouseBox(393, 124, 431, 141, mouse_right);
Items[0][7] : MouseBox(27, 174, 67, 192, mouse_right);
Items[0][8] : MouseBox(144, 177, 192, 195, mouse_right);
Items[0][9] : MouseBox(267, 181, 313, 196, mouse_right);
Items[0][10] : MouseBox(394, 176, 432, 193, mouse_right);
Items[0][11], Items[1][0] : MouseBox(34, 232, 80, 246, mouse_right);
Items[0][12], Items[1][1] : MouseBox(147, 231, 188, 146, mouse_right);
Items[0][13] : MouseBox(266, 232, 315, 245, mouse_right);
Items[0][14], Items[1][2] : MouseBox(391, 229, 446, 245, mouse_right);
Items[0][15], Items[1][3] : MouseBox(26, 281, 71, 297, mouse_right);
Items[0][16], Items[1][5] : MouseBox(249, 270, 326, 292, mouse_right); //266, 279, 313, 297
Items[0][17] : MouseBox(396, 282, 446, 299, mouse_right);
// Items[1][5] : MouseBox(249, 270, 326, 292, 2);
Items[1][4] : MouseBox(140, 275, 192, 293, mouse_right);
end;
Writeln('MouseBoxed');

if StrInArr(Amount, ['1', '5', 'All']) then
begin
Result := ChooseOption('ake '+Capitalize(Amount));
end else
begin
if ChooseOption('ake X') then
begin
Wait(2000 + Random(2000));
TypeSend(Amount);
Result := True;
end;
end;
end;

procedure DoAntiBan;
begin;
if not(LoggedIn) then Exit;
case Random(150) of
10: begin
HoverSkill('smithing', false);
GameTab(Tab_Inv);
end;
15: begin
HoverSkill('smithing', false);
GameTab(Tab_Inv);
end;
20: RandomMovement;
25: RandomMovement;
30: RandomAngle(1);
40: PickupMouse;
50: RandomAngle(1);
60: RandomRClick;
70: ExamineInv;
end;
end;

function FindMyBank(var x, y: Integer): Boolean;
var
CTS, i, h: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(BankBooth.HSMod[C_HUE], BankBooth.HSMod[C_SAT]);

FindColorsSpiralTolerance(MSCX, MSCY, BankBooth.TPA, BankBooth.Colour, MSX1, MSY1, MSX2, MSY2, BankBooth.Tol);
ColorToleranceSpeed(CTS);

BankBooth.ATPA := TPAToATPAEx(BankBooth.TPA, 40, 40);
SortATPAFrom(BankBooth.ATPA, Point(MSCX, MSCY));

if ( Length(BankBooth.ATPA)=0 ) then
begin
Writeln('No Bank booths found.');
Result:= false;
end else
Writeln('Found possible Bank booths');

h:= High(BankBooth.ATPA);
For i := 0 to h do
begin
SMART_DrawDotsEx(true, BankBooth.ATPA[i], 255);
MiddleTPAEx(BankBooth.ATPA[i], x, y);
MMouse(x, y, 5, 2);
SMART_ClearCanvas;
if ( WaitUpTextMulti(['Bank', 'ooth', 'nk boo'], 200) ) then
begin
Result:= True;
GetMousePos(x, y);
Break;
end else
Result:= false
end;
end;

function OpenMyBank: Boolean;
var
x, y, t: Integer;
begin
MakeCompass(90);
if not LoggedIn then
Exit;

if BankScreen or Pinscreen then
begin
Result:= true;
Exit;
end;

if FindMyBank(x, y) then
begin
Mouse(x, y, 0, 0, mouse_right);
MarkTime(t)
repeat
if WaitOptionMulti(['Bank','uick', 'ickly'], 800) then
begin
FFlag(1);
Wait(RandomRange(200,400));
Result:= true;
Exit;
end;
if TimeFromMark(t) > 3000 then
Exit;
until(false)
end;
end;

function CheckLoc_OLD: String;
var
D_Dungeon, D_Anvil: Integer;
begin
if not LoggedIn then
Exit;

SymbolAccuracy := 0.7;
repeat
if FindSymbol(x, y, 'anvil') then
begin
D_Anvil:= Distance(x, y, MMCX, MMCY);
Break;
end else
Writeln('Can''t find Anvil Symbol.');

SymbolAccuracy := SymbolAccuracy - 0.1;
until(SymbolAccuracy < 0.2)

SymbolAccuracy := 0.7;
repeat
if FindSymbol(x, y, 'dungeon') then
begin
D_Dungeon:= Distance(x, y, MMCX, MMCY);
Break;
end else
Writeln('Can''t find Dungeon Symbol.');

SymbolAccuracy := SymbolAccuracy - 0.1;
until(SymbolAccuracy < 0.2)

if D_Anvil<D_Dungeon then
begin
Result:= 'anvil';
Writeln('You''re at the anvil.');
end else
begin
Result:= 'bank';
Writeln('You''re at the bank.');
end;
end;

function CheckLoc: String;
var
roadCol, t: Integer;
divTPA: TPointArray;
locBox: TBox;
begin
MarkTime(t);
MakeCompass('N');
roadCol := 9080459; // AutoColor(srl_VarrockRoadColor);
if roadCol = -1 then
Writeln('AutoColor Failed.');
FindColorsTolerance(divTPA, roadCol, MMCX, MMY1, MMX2, MMY2, 10); //FindColors(divTPA, roadCol, MMCX, MMY1, MMX2, MMY2);
if Length(divTPA) < 1 then
Writeln('No road colour found.');
SMART_DrawDotsEx(True, divTPA, clBlue);
locBox := GetTPABounds(divTPA);
locBox := IntToBox(locBox.x1, locBox.y1, locBox.x2, locBox.y2 - ((locBox.y2 - locBox.y1) / 2));
SMART_DrawBoxEx(False, locBox, clGreen);
//Wait(5000);

if MMCY > locBox.y2 then
Result := 'anvil'
else
Result := 'bank';

Writeln('You are at: ' +Result);
Writeln('Function took ' +IntToStr(TimeFromMark(t))+ ' ms');
end;

function ToAnvil: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
MouseBox(641, 123, 652, 132, 1);
FFlag(0);
Wait(RandomRange(600, 800));

if (CheckLoc <> 'anvil') then
begin
if FindSymbol(x, y, 'anvil') then
begin
Mouse(x, y, 3, 3, mouse_left);
FFlag(0);
Wait(RandomRange(600, 800));
end else
Exit;
end else
Result:= True;

end;

function ToBank: Boolean;
var
t: Integer;
angle: Extended;
foundDTM: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
foundDTM := false;
MarkTime(t)
repeat
if FindDTMRotated(DTM_MMBank, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/8, Pi/8, Pi/32, angle)
or FindDTMRotated(DTM_MMBank2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/8, Pi/8, Pi/32, angle) then
begin
Writeln('DTM found at angle: ' +FloatToStr(angle));
Mouse(x + RandomRange(3, 6), y - RandomRange(2, 5), 3, 3, true);
foundDTM := true;
Break;
end else
Writeln('Could not find MM DTM!');
until(TimeFromMark(t)>3000)

if not foundDTM then
Mouse(605, 50 - RandomRange(2, 5), 5, 5, mouse_left);

FFlag(2);
Wait(RandomRange(500,750));

Result:= (CheckLoc='bank');
end;

function FindAnvil(var x, y: Integer): Boolean;
var
CTS, i, h: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Anvil.HSMod[C_HUE], Anvil.HSMod[C_SAT]);

FindColorsSpiralTolerance(MSCX, MSCY, Anvil.TPA, Anvil.Colour, MSX1, MSY1, MSX2, MSY2, Anvil.Tol);
ColorToleranceSpeed(CTS);

Anvil.ATPA := TPAToATPAEx(Anvil.TPA, 40, 30);
SortATPAFrom(Anvil.ATPA, Point(MSCX, MSCY));

if ( Length(Anvil.ATPA)=0 ) then
begin
Writeln('No anvils found.');
Result:= false;
end else
Writeln('Found ' +IntToStr(Length(Anvil.ATPA))+ ' possible anvils?');

h:= High(Anvil.ATPA);
For i := 0 to h do
begin
MiddleTPAEx(Anvil.ATPA[i], x, y);
MMouse(x, y, 2, 2);
SMART_DrawDotsEx(true, Anvil.ATPA[i], 255);
if ( WaitUpTextMulti(['Anvi', 'nvil'], 200) ) then
begin
Result:= True;
GetMousePos(x, y);
Break;
end else
Result:= false
end;
end;

function SmithBars: Boolean;
var
x, y, i, ii, iii, e, t: Integer;
begin
if not LoggedIn then
Exit;

FFlag(0);
Wait(RandomRange(300,500));

repeat
if FindAnvil(x, y) then
begin
if SmithingScreen then Break;
SMART_DrawDotsEx(true, Anvil.ATPA[i], 255);
iii:= 0;
Wait(RandomRange(200,400));
Mouse(x, y, 0, 0, false);
for ii:=0 to 250 do
begin
//Writeln('Waiting for ''Choose'' Option.');
if ChooseOption('mith') then
begin
FFlag(0);
SMART_ClearCanvas;
Wait(RandomRange(200,400));
MarkTime(t)
repeat
if SmithingScreen then
Break;
if TimeFromMark(t) > 10000 then
begin
Writeln('Click was somehow missed!');
Result:= false
Exit;
end;
until(false)
Break;
end;
end;
end else
begin
inc(iii);
Writeln('Anvil: Times missed is ' +IntToStr(iii));
Wait(500 + Random(1000));
if iii>9 then
begin
Result:= false
Exit;
end;
end;
until(SmithingScreen)
FFlag(0);

FindBar(InvBar, InvBox(1), true)

MarkTime(lTimer);
repeat
if SmithItem(SmithingItem, 'All') then
begin
Writeln('Smithing ' + Capitalize(SmithingItem));
Result:= true;
Break;
end;
if TimeFromMark(lTimer) > 5000 then
Exit;
until(false)

Total_Bars:= Total_Bars + WithdrawBars;
inc(Total_Loads);

MarkTime(e);
repeat
wait(500+random(100));
FindNormalRandoms;
DoAntiBan;
if LevelUp then
begin
Inc(Total_LevelUps);
ClickToContinue;
Result := True;
Exit;
end;
if TimeFromMark(e)>(1000*60*3) then
begin
Players[CurrentPlayer].Loc:= 'Bar counting error';
Result:= false;
Break;
end;
Writeln('Bars left to smith: '+IntToStr(CountBar(InvBar)));
until (CountBar(InvBar)<=0)
RunEnergy(35);
end;

function DepositSmithed: Boolean;
var
i, ii: Integer;
begin
if not LoggedIn then
Exit;

repeat
if OpenMyBank then
begin
ii:= 0;
for i:=0 to 1000 do
begin
if BankScreen or PinScreen then
begin
Wait(100+random(50));

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

DepositAll;
Result:= true;
Exit;
end;
end;
end else
begin
inc(ii);
Writeln('Bank: Times missed is ' +IntToStr(ii));
if ii>9 then
begin
Result:= false;
Exit;
end;
end;
until(BankScreen or Pinscreen)
end;

function WithdrawAllBars: Boolean;
var
x, y, i, ii: Integer;
BankPoint: Tpoint;
begin
if not LoggedIn then
Exit;

if InvCount>0 then
DepositSmithed;

repeat
if OpenMyBank then
begin
ii:=0;
for i:=0 to 1000 do
if BankScreen or PinScreen then
Break;
end else
begin
inc(ii);
Writeln('Bank: Times missed is ' +IntToStr(ii));
if ii>9 then
begin
Result:= false;
Players[CurrentPlayer].Loc:= 'Could not withdraw';
Exit;
end;
end;
until(BankScreen or PinScreen)

Wait(100+random(50));

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

if not BankScreen then Writeln('WARNING: Could not find Bankscreen; continuing anyway');

FixBank;
BankTab(1);
while not FindColorBox(x, y, srl_outline_black, BankIndexToMSBox(1)) do
begin
Wait(200+Random(150));
end;
if FindBar(BankBar, BankIndexToMSBox(1), true) then // Currently ALWAYS updates TPA//if FindDTM(DTM_Bar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Amount of bars left: '+IntToStr(GetAmountBox(BankIndexToMSBox(1))));
if GetAmountBox(BankIndexToMSBox(1)) <= (WithdrawBars) then
begin
Writeln('Out of bars!');
Players[CurrentPlayer].Loc:= 'No bars in the bank';
Result:= false;
Exit;
end;

BankPoint:= BankBar.Slot;
if Withdraw(BankPoint.x , BankPoint.y, WithdrawBars) then
Result:= true;

end else
begin
Writeln('Bars not found in bank');
Players[CurrentPlayer].Loc:= 'No bars in the bank';
end;

SMART_ClearCanvas;
//CloseBank;
end;

procedure SetupScript;
var
tLoad: Integer;
begin
MarkTime(tLoad);

ClearDebug;
ClearReport;

Writeln('Setting up script...');

Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;

DeclarePlayers;
LoadDTMs;
LoadColourTol;
LoadGlobals;

SMART_SetupDebug;
SMART_ClearCanvas;

WhenBreak:= ((1000*60)*Whenbreak);
Writeln('Script loaded in ' +IntToStr(Round(TimeFromMark(tLoad) / 1000))+ ' seconds.');
AddOnTerminate('ProgressReport');
end;

procedure SetupPlayer;
begin
LoginPlayer;
wait(100+random(50));

MarkTime(RoundTime);

SetRun(true);
MakeCompass('N');
{$IFDEF SRL5}
SetAngle(SRL_ANGLE_HIGH);
{$ELSE}
SetAngle(true);
{$ENDIF}

if CheckLoc='anvil' then
ToBank;

{if not FindHammer then
begin
Players[CurrentPlayer].Loc:= 'You have no hammer';
Exit;
end; }

if not WithdrawAllBars then
Writeln('Could not withdraw bars');
end;

procedure ProgressReport;
var
i: Integer;
begin
Players[CurrentPlayer].Worked:= PlayerWorked(CurrentPlayer);

Writeln('|-------------------------------------------------------------|');
Writeln(PadR('| -daazndagger-''s', 62) + '|');
Writeln(PadR('| ' +ScriptName, 62) + '|');
Writeln(PadR('| Version ' + ScriptVersion, 62) + '|');
Writeln('|-------------------------------------------------------------|');
Writeln(PadR('| Time Running : ' +MsToTime(GetTimeRunning, Time_Abbrev), 62) + '|');
Writeln(PadR('| Bars Smithed : ' +IntToStr(Total_Bars), 62) + '|');
Writeln(PadR('| Loads : ' +IntToStr(Total_Loads), 62) + '|');
Writeln(PadR('| Level Up''s : ' +IntToStr(Total_LevelUps), 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln(PadR('| False Reasons : ', 62) + '|');
for i:=0 to HowManyPlayers-1 do
Writeln(PadR('| Player ' +IntToStr(i)+': ' +Players[i].Loc, 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln(PadR('| ', 62) + '|');
Writeln('|-------------------------------------------------------------|');

end;

procedure LogoutProcess;
begin
Writeln('Loging out...');

if BankScreen then CloseBank;

ProgressReport;

if not( lowercase(Players[CurrentPlayer].Loc) = '') then
Players[CurrentPlayer].Active:= false;

if AllPlayersInactive then
Exit;

NextPlayer(Players[CurrentPlayer].Active);
end;

begin
SetupScript;

SetupPlayer;

repeat
if not( lowercase(Players[CurrentPlayer].Loc) = '') then
Break;

ToAnvil;

SmithBars;

ToBank;

DepositSmithed;

WithdrawAllBars;

ProgressReport;
until false;

if LoggedIn then
end.


Thanks! It works great for me! :spot:

Inheaven

2012-05-14 08:49:31

He is getting stuck when he disposed a load of platebodys (made 21 plates)

It says: "The following DTMs are not freed: [2, 3]"

bougie

2012-05-14 10:34:24

The new posted version works for me. But it always runs to the room east of the room wih the anvils in it. And then has to run around the wall when it goes to smith. Very bot like. How can i adjust where it clicks on the compass? its just to the left a few degrees.

Hadley

2012-05-16 20:29:26

same here bougie, i wish someone could make this script stable again.

Run S Kape

2012-05-20 06:56:23

From: bougie
The new posted version works for me. But it always runs to the room east of the room wih the anvils in it. And then has to run around the wall when it goes to smith. Very bot like. How can i adjust where it clicks on the compass? its just to the left a few degrees.

same problem can some one fix

ABC!

2012-05-21 03:38:26

Yeah this bot is really unstable.

Shuttleu

2012-05-21 15:03:34

|-------------------------------------------------------------|
| -daazndagger-'s |
| [S]uper [S]avvy [S]mither |
| Version 1.06 |
|-------------------------------------------------------------|
| Time Running : 56 min 35 sec |
| Bars Smithed : 1700 |
| Loads : 68 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: |
| |
| |
|-------------------------------------------------------------|

stopped by the Leo random

(and yes i have fixed it up)

~shut

Kyle Undefined

2012-05-21 15:29:59

Oh nice! I'm sure daazn wouldn't mind you posting the fix (If you want to) since he's inactive at the moment.

ABC!

2012-05-22 09:22:54

Yeah shut please release it, I really need a smithing bot and I'm currently learning to scipt so don't really know how to fix it,

Thanks.

xYumz

2012-05-22 13:59:25

Agreed, that'd be awesome if you could release your fix shuttleu.

Inheaven

2012-05-22 15:37:44

Miss clicking bank, can't wait if somebody would update :)

DRose

2012-05-22 19:37:15

It worked for me for like half an hour and after I just keep getting this error while it tries to find the bars in bank after smithing :p

The following dtms were not freed [2, 3]

Rincewind

2012-05-22 19:57:35

It keeps missing the bank and then the anvil. It says it found possible bank boothes and anvils but it keeps missing and then it said
Item is in first array
MouseBoxed

public_static_void_main

2012-05-22 20:34:17

Just informing along with the others that it keeps miss clicking bank :D

Hadley

2012-05-23 23:24:30

shuttleu, any news on if your going to be releasing the fixed version of this script?

Shuttleu

2012-05-24 05:47:01

here it is

it does still miss-click, but no where near as much

~shut

ABC!

2012-05-24 10:55:04

<Coh3n> Shuttleu, fuck I love you right now

^^Agreed

EDIT: It wont make adamant bolts, get this spammed in the debug box:
MouseBoxed
Item is in first array
MouseBoxed
Item is in first array
MouseBoxed
Item is in first array
MouseBoxed
Item is in first array
MouseBoxed

Hadley

2012-05-24 15:53:57

Thanks ShuttleU, but i'm not sure why i'm still getting an error on line 574
[Error] (575:3): Identifier expected at line 574
Compiling failed.

If re-add the write in procedure from the original script it seems to fix the compiling error but then the script cant find the bank/miss-clicks 99.9% of the time.

function ToBank: Boolean;
var
t: Integer;
angle: Extended;
foundDTM: Boolean;
begin
if not LoggedIn then
Exit;

MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
foundDTM := false;
MarkTime(t)
repeat
if FindDTMRotated(DTM_MMBank, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/8, Pi/8, Pi/32, angle) then
begin
Writeln('DTM found at angle: ' +FloatToStr(angle));
Mouse(x+2, y + 2, 3, 3, true);
foundDTM := true;
Break;
end else
until(TimeFromMark(t)>1000) //Line 574

if not foundDTM then
Mouse(613, 46, 5, 5, mouse_left);

FFlag(2);
Wait(RandomRange(500,750));

Result:= (CheckLoc='bank');
end;

Run S Kape

2012-05-25 01:14:50

From: ABC!
<Coh3n> Shuttleu, fuck I love you right now

^^Agreed

EDIT: It wont make adamant bolts, get this spammed in the debug box:
MouseBoxed
Item is in first array
MouseBoxed
Item is in first array
MouseBoxed
Item is in first array
MouseBoxed
Item is in first array
MouseBoxed


yes i get the same

DRose

2012-05-25 08:32:54

From: Run S Kape
yes i get the same


Maybe the colors need updating :O

Is your graphics set up correctly?

ABC!

2012-05-25 09:40:11

I dont think its the colours, because it works on mouse boxes!

Shuttleu

2012-05-27 06:16:54

try this one

i will have a look at the mith bolts if this one works

~shut

ABC!

2012-05-27 06:38:48

From: Shuttleu
try this one

i will have a look at the mith bolts if this one works

~shut

Thanks dude, I really want 99 Smithing aha!

K_Byrd

2012-05-29 10:08:42

my proggy :) Thanks for fixing the bot so i could use it.

|————————————————————-|
| -daazndagger-'s |
| uper avvy mither |
| Version 1.06 |
|————————————————————-|
| Time Running : 3 hr 16 min 59 sec |
| Bars Smithed : 6750 |
| Loads : 270 |
| Level Up's : 0 |
| |
| False Reasons : |
| Player 0: |
| |
| |
|————————————————————-|

LIM

2012-05-30 17:48:48

i tried running the script now several times, but the bot just doesnt work.
it just keeps missing the anvil. sometimes it finds it, but thats like once within 5 minutes :/
though the script idea is great, i've been working on 99 smith for a while now, but stopped at 94 cause i got bored. so this script would be so great to get my 99.

Robot

2012-06-07 12:02:50

Giving shuttle the beasts fix a go, will post prog looks great so far! Just doing bolts cos I'm poor like that on this account :)

gtr34

2012-06-09 06:48:09

im trying to make addy arrow tips how ever they are now named in rs as arrow heads, any way i have selected arrow tips and so on and ran the bot and it just could not find the bank it could not click on the bank and bank it just stood there and was clicking pointlessly at the bank booth.

Welcome to Runescape.
Current player:
You are at: anvil <—-( at this stage i was in the bank )
Function took 31 ms
DTM found at angle: 0
You are at: bank
Function took 47 ms
Found possible Bank booths
Bank: Times missed is 1
Found possible Bank booths
Bank: Times missed is 2
Found possible Bank booths
Bank: Times missed is 3
Found possible Bank booths
Bank: Times missed is 4
Found possible Bank booths
Bank: Times missed is 5
Found possible Bank booths
Bank: Times missed is 6
Found possible Bank booths
Bank: Times missed is 7
Found possible Bank booths
Bank: Times missed is 8
Found possible Bank booths
Bank: Times missed is 9
Found possible Bank booths
Bank: Times missed is 10
Could not withdraw bars
Loging out…

rly guys i have tried so many scripts and only 1 i can find that works is Narcle cannonball smither, the rest are just outstandingly bad they fuck out on each and single step or just don't work at all, since this bot nuke Rsbuddy got shut down R.I.P, on other bot sites there sooo much shit u need to do in order to get it to work is just wow, but here on srl there are scripts that are easy to get but 90% of them i try don't work of work but after few min… Sorry for rage but needed to get it out

snowver

2012-06-10 11:35:00

From: gtr34
im trying to make addy arrow tips how ever they are now named in rs as arrow heads, any way i have selected arrow tips and so on and ran the bot and it just could not find the bank it could not click on the bank and bank it just stood there and was clicking pointlessly at the bank booth.

Welcome to Runescape.
Current player:
You are at: anvil <—-( at this stage i was in the bank )
Function took 31 ms
DTM found at angle: 0
You are at: bank
Function took 47 ms
Found possible Bank booths
Bank: Times missed is 1
Found possible Bank booths
Bank: Times missed is 2
Found possible Bank booths
Bank: Times missed is 3
Found possible Bank booths
Bank: Times missed is 4
Found possible Bank booths
Bank: Times missed is 5
Found possible Bank booths
Bank: Times missed is 6
Found possible Bank booths
Bank: Times missed is 7
Found possible Bank booths
Bank: Times missed is 8
Found possible Bank booths
Bank: Times missed is 9
Found possible Bank booths
Bank: Times missed is 10
Could not withdraw bars
Loging out…

rly guys i have tried so many scripts and only 1 i can find that works is Narcle cannonball smither, the rest are just outstandingly bad they fuck out on each and single step or just don't work at all, since this bot nuke Rsbuddy got shut down R.I.P, on other bot sites there sooo much shit u need to do in order to get it to work is just wow, but here on srl there are scripts that are easy to get but 90% of them i try don't work of work but after few min… Sorry for rage but needed to get it out


same problem but for me it doesn't smith so i think this script needs to be completely reworked

Masterstroke

2012-06-12 11:47:30

My account always runs north, looks for a bank there, and then goes a bit south and starts looking for an anvil, but it's still in the bank.
Anyone has a solution?

gtr34

2012-06-14 09:12:03

From: Masterstroke
My account always runs north, looks for a bank there, and then goes a bit south and starts looking for an anvil, but it's still in the bank.
Anyone has a solution?


these 2 smithing scripts are f'ed non of them are working and the scripters they have died and so all the other scripters who could fix it….

Kyle Undefined

2012-06-14 10:28:26

Calm down, you don't NEED this script. This scripter is in school, and taking a break until he graduates.

gtr34

2012-06-14 14:39:14

oh i do need the script i need some smithing script and NON of the smithing scripts that are anvil related are working !

Kyle Undefined

2012-06-14 16:52:24

From: gtr34
oh i do need the script i need some smithing script and NON of the smithing scripts that are anvil related are working !


You're not going to die if you can't find a working one, just relax. Learn to fix it :)

gtr34

2012-06-15 03:17:06

From: Kyle Undefined
You're not going to die if you can't find a working one, just relax. Learn to fix it :)
man u honestly pissing me off now instead of being a smart ass why can't you fix it ??? u posting this and that so many people are shouting that script not working and u just saying the whole bloody thing over and over?!?!? if u can script and u saying it its that easy then fix it… :fiery: :fiery: :fiery: :frusty: :frusty: :angry: :angry: :angry:

Zerkeronrs7

2012-06-15 07:12:32

From: gtr34
man u honestly pissing me off now instead of being a smart ass why can't you fix it ??? u posting this and that so many people are shouting that script not working and u just saying the whole bloody thing over and over?!?!? if u can script and u saying it its that easy then fix it… :fiery: :fiery: :fiery: :frusty: :frusty: :angry: :angry: :angry:


Why would he fix it for you? Especially now that you've said that..

These scripts don't even have to be released, people choose to be kind enough to publicly post them. If you want the script to work, then why don't learn to fix it? If your to lazy to do that then just politely wait for someone else to do it. All that angry posting just makes you look stupid.

Kyle Undefined

2012-06-15 08:57:01

From: gtr34
man u honestly pissing me off now instead of being a smart ass why can't you fix it ??? u posting this and that so many people are shouting that script not working and u just saying the whole bloody thing over and over?!?!? if u can script and u saying it its that easy then fix it… :fiery: :fiery: :fiery: :frusty: :frusty: :angry: :angry: :angry:


I wasn't being a smartass, if it's not working, and you're too impatient, then learn to fix it.

Sorry, I'm not your personal script maker/fixer. It would probably take you an hour or two to learn it for yourself :)

Oh, and the way you're acting, don't expect anyone to actually help until the OP returns.

From: Zerkeronrs7
Why would he fix it for you? Especially now that you've said that..

These scripts don't even have to be released, people choose to be kind enough to publicly post them. If you want the script to work, then why don't learn to fix it? If your to lazy to do that then just politely wait for someone else to do it. All that angry posting just makes you look stupid.


This.

uokuokuokuok

2012-06-18 16:51:06

This never once found the bank or an anvil

Andres

2012-06-21 14:29:02

From: gtr34
man u honestly pissing me off now instead of being a smart ass why can't you fix it ??? u posting this and that so many people are shouting that script not working and u just saying the whole bloody thing over and over?!?!? if u can script and u saying it its that easy then fix it… :fiery: :fiery: :fiery: :frusty: :frusty: :angry: :angry: :angry:


You obviously don't realize that Kyle is one of the largest contributors to this site and has helped numerous people with his own scripts and by teaching them to script.

Use some common sense before you start flaming people on a forum that you're new to.

EDIT: I actually didn't come here to post that, it just really annoyed me. I wanted to say that I managed to get this to run relatively stable for myself. I have to babysit it, but it works.