SRL Archive - First Scripts

Al-Kharid Auto Smelter


NTARelix

2009-01-11 14:34:27

Al-Kharid Auto Smelter
By NTARelix

Smelting is my favorite way of making money easily while increasing one or more skills. If you use the method of money making where you buy ore for bars at the Grand Exchange, smelt them to bars, and resell them at the G.E., than you can make some extra money. I liked this method a lot but the only problem was just sitting there at the computer for hours, going back and forth between the furnace and bank smelting constantly.

What this script does is withdraw the type of ores you need to smelt the desired bar type, go to the furnace, smelt them all to the bars that you wanted, runs back to the bank, and deposits the bars into the bank.

Now the process is much more simple. You go to the G.E., buy some ore, go back to al-kharid bank, start the script, play 360 for some time while periodically checking the script for errors so you can report any problems you are having to the creator so he can fix them, and eventually go back to G.E. with your bars, sell them for about 15% more than what you bought the ores for, and use that money to buy even more ores.

Please look over the script first and tell me about any problems there may be. Constructive criticism is encouraged. This is my first script and I would like to improve it and my scripting skills but I may need others to help with that.

Please don't just leech. Post any comments you have so I may improve it. If there is something I could do better, please try and explain how I could modify my code to do so to make things easier.

Currently, I have used as much SRL as I think I could so it should be pretty safe. I've been using it for a few hours now with VMWare Player and I haven't had many problems but I'm sure there are some things that could be fixed or improved. If you get banned and you know for sure it was because of this script and not another one you were using. Please tell me the account name you were using when you got banned and also the script version.

How To Use This Script:
1) Put character(s) in Al-Kharid Bank
2) Empty inventory
3) Put main ore (iron, mithril, adamantite, etc) in first slot and secondary ore (coal, if using) in slot 2 of bank in the first tab
4) Start the script
5) Enter your information
6) Play some Xbox 360 for a while
7) Check progress and report any problems to this thread
8) Never waste time smelting again


Current Version: 1.1

Known Banned Users of This Script:
None

Known Problems:
- While going to furnace, minimap clicking is not always very accurate.
- Clicking the furnace location on the minimap clicks the ad above runescape client (may be cause of next problem)
- SCAR or SRL simulates CTRL button which doesn't allow typing, not much typing is done for this script though…
- When going to furnace, it sometimes clicks out of minimap circle

Updates For Next Release:
[ ] Detect if you are out of ores
[ ] More accurate Map Walking

1.0 - 1.1 Updates:
-'Player Army' Support
-'Player Army' Form Support instead of exiting code
-Add Failsafe for 'procedure ToFurnace;'
-Adding FindNormalRandoms; to as many places as I deem necessary + some more
-Modified Wthdraw(); procedure from Bank.scar to work with the CTRL issue
-FindColorTolerance() used for walking to furnace

skilld u

2009-01-11 14:51:06

you left your account info in the script, i pmed you the new info.


you should use a case statement here:
if(Players[0].Strings[0] = 'Bronze')then
begin
Amt1 := 14;
Amt2 := 14;
end;
if(Players[0].Strings[0] = 'Iron')then
Amt1 := 28;
if(Players[0].Strings[0] = 'Steel')then
begin
Amt1 := 9;
Amt2 := 18;
end;

Do it like this instead:

case Players[0].strings[0] of
'bronze': begin
end;
'iron': ...
end;

You should try and use ddtms for the walking to the furnace.

repeat
begin
FindFurnace(FurnX,FurnY);
Mouse(Furnx,Furny,1,1,True);
Flag;
end;
until (SmeltingScreen);
what happens if it never finds the furnace? you should add a failsafe in there. like if it doesn't find the furnace in 5 trys then exit.

also your standards are rather messy. Overall it is a very good first script, keep up the good work. Have you been using this alot?

NTARelix

2009-01-11 15:10:16

From: skilld u
you should use a case statement here:
ScarScript:By Drunkenoldma [LEFT]if(Players[0].Strings[0] = 'Bronze')then begin Amt1 := 14; Amt2 := 14; end; if(Players[0].Strings[0] = 'Iron')then Amt1 := 28; if(Players[0].Strings[0] = 'Steel')then begin Amt1 := 9; Amt2 := 18; end; Do it like this instead: case Players[0].strings[0] of 'bronze': begin end; 'iron': … end; [/LEFT]


Fixing it now.
From: skilld u

You should try and use ddtms for the walking to the furnace.

Not sure what ddtms are but I will check as soon as I'm done adding the 'case' stuff to the script.
From: skilld u

ScarScript:By Drunkenoldma [LEFT]repeat begin FindFurnace(FurnX,FurnY); Mouse(Furnx,Furny,1,1,True); Flag; end; until (SmeltingScreen); [/LEFT]

what happens if it never finds the furnace? you should add a failsafe in there. like if it doesn't find the furnace in 5 trys then exit.

I was also thinking I probably need more failsafes. I haven't seen many problems occur but that seems like something that could happen on rare occasions. I'll try to add something for that.

From: skilld u

also your standards are rather messy. Overall it is a very good first script, keep up the good work. Have you been using this alot?

This is my first SCAR script. I know a few unofficial programming languages(Game Maker Language and AutoIt) and also some basics of C++ so that helps with knowing what kind of things I need to do while programming and testing everything. The tabbing with SCAR is what I'm not used to. I don't like the way it tabs under the next open space from the line above. I would like it better if it did it in like 4 space intervals like most IDE's I've used.
EDIT: Just found the option for the tabs problem I've been having. I will change all the lines so it will look a little better.

rip636

2009-01-16 12:28:01

i just got done manual smithing and omg i want a higher lvl but its so boring tysm :eek:

AridTag

2009-01-18 02:44:01

When attempting to smith Mithril it won't withdraw the coal for me. Just right clicks on the coal then moves the mouse to the left of the screen and repeats over and over. Just from looking at the coding itself a little bit it seems like a pretty solid first script though aside from that issue =p

NTARelix

2009-01-21 23:39:46

From: AridTag
When attempting to smith Mithril it won't withdraw the coal for me. Just right clicks on the coal then moves the mouse to the left of the screen and repeats over and over. Just from looking at the coding itself a little bit it seems like a pretty solid first script though aside from that issue =p

Does it click anything else before moving left? I used to have a problem where is would click "Withdraw-X" and not be able to type 20, move the mouse, and try again until I stopped the script. I have not fixed this solution yet. One quick temporary fix would be to withdraw 20 coal using "Withdraw-X" and entering 20 before the starting the script so when it withdraws coal, it just clicks the recent amount, "Withdraw-20".
Sorry about the problem. I have no leads on the cause of this. Anyone have any tips?

skatedevil62

2009-01-22 01:05:26

Excellent for a first script, there's a way to clean up the code a bit…But for a first script it's very good!Nice job!

slime288

2009-01-24 23:15:20

jst wondering how do i actually use this script lol. nt sure what to do with it it wont let me start it lol

jackattack123456

2009-01-25 06:59:33

hmm, idk has anyone got any proggiesS?

xking

2009-01-25 09:57:03

it looks like a good script but when trying to run it i get this error message

[Runtime Error] : Exception: Canvas does not allow drawing in line 691 in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Text.scar

plz tell me how to fix
p.s love what it is for a fist script how long did it take u to do

NTARelix

2009-01-26 07:37:25

From: xking
it looks like a good script but when trying to run it i get this error message

[Runtime Error] : Exception: Canvas does not allow drawing in line 691 in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Text.scar

plz tell me how to fix
p.s love what it is for a fist script how long did it take u to do

You probably aren't setting SCAR's client window properly. Make sure you click on the actual game of runescape (the little box in the browser) and not just anywhere on the browser window of runescape. I had this problem for the longest time because I never found anywhere where it says to click on the runescape game itself and not the window.

This took me about 2 days to make. That's not the total time, probably about 3 hours total. 1 hour one day, 2 hours the next. Including updates from the first one, a total of probably 5 hours.

Endzior

2009-02-10 09:59:01

Well i dunno what i did wrong but he only runs opens bank close it runs to furnace goes back opens bank closes it and he can go like this forever

Main problem is he doesn't get ores just runs.

Any help ?

akiryanov

2009-02-21 05:49:32

how do i star the script it wont start for me?

Sabzi

2009-02-22 10:52:44

So I am in the bank, nothing in bag, in the bank at the first place the iron.
I fill in the form and start the script. It opens the bank and right click the second item in the bank then mouse go to left and then right click second and so on and so on. I have tried to change
case(InvCount) of
Amt1: WithdrawEx(2,1,Amt2);
Amt2: WithdrawEx(1,1,Amt1);
0: begin
WithdrawEx(2,1,Amt2);
WithdrawEx(1,1,Amt1);
end;


but all I clould do that the problem mentioned above is with the first slot.
I have placed other things to the second slot in the bank and put the ore there too but nothing happened.

And one more thing. If somebody (like me) writes chicken for example to ore type the script should not start but write that I am stupid.

I am totaly new so I may have written bad thing and srry for bad english too.

edit:
so i chaged the whole WithdrawEx for this:
withdraw(1,1, 28);

and now it withdraw the iron and go to the furnance click on it and wait, look the skill, look the bag but dont start smelting
Am I realy noob that I cant make it work?

Sabzi

2009-02-22 11:24:50

at the moment I cant make it but it would be easier just to go up int the bank and then go the furnance instantly and faster if it counts with scripts

I will learn this whole thing and make some scripts but I am a lazy boy.

Fafhrkek

2009-02-22 12:48:25

Working about 80%

Maxim1914

2009-04-08 19:21:31

i get the following message:
Include file C:\Program Files\SCAR 3.12\includes\SRL\SRL\Misc\Users.scar does not exist.

any ideas where to get it?

Iroki

2009-08-09 17:01:50

gravedigging….

Sir R. M8gic1an

2009-08-10 01:20:00

One massive gravedig. Closed.

~RM