PDA

View Full Version : West Falador Smelter



ngovil21
11-09-2006, 01:56 AM
This is my first SCAR Script. I've spent a lot of time of it. Most of the code is my own, but I did tweak some of the SRL Functions to work better with my script.

I tried using DTMs to find the road color, but they don't always work... If anyone could tell me of the best way to get the road color, that would be cool. I tried bitmaps, but they were always getting the wrong color.

This script doesn't have multiplayers because I don't see the need to have multiple people running.


As long as the road color is found it runs for me flawlessly.

I didn't put in to many randoms because I have never gotten any other than talking ones and wanted the least amount of lag on my slow computer, although there might be too many other wasted stuff.

Comments and constructive criticism would be nice. Also post progress reports would be appreciated.

Remember to start from WEST Falador bank, NOT East Falador.

Edit 1: Improved the Road DTMs I hope.

Edit 2: Added TaraJunky's cexy Falador Road Color Finder and added it will nwo walk you to West Falador Bank if you are in East Falador Bank.

lardmaster
11-09-2006, 02:50 AM
very good, i probably wont look at it much :( about finding the road color, i would seriously suggest large DTMs set a very high tolerance for the color picked for the road, and pick the new color from where it finds that point on the DTM. there might be something special about RRW. idk, ask fawaki, i think he is very pround of it (i think he made it)

ngovil21
11-09-2006, 11:51 PM
Thanks for the quick reply. I looked at radial road walker and didn't find anything special. Also FindFaladorRoadColor wasn't working very well for me.

I updated the DTM a little to what I find is more accurate and efficient.

The script also should walk back from the furnace if start in the furnace.

tarajunky
11-10-2006, 12:53 AM
Thanks for the quick reply. I looked at radial road walker and didn't find anything special. Also FindFaladorRoadColor wasn't working very well for me.

I updated the DTM a little to what I find is more accurate and efficient.

The script also should walk back from the furnace if start in the furnace.

Try this! Should be flawless.




function FindFallyRoadColor:integer; // By Tarajunky
var red,green,blue:integer;
var TestColor,a,b,GenericFallyRoadColor:integer;
begin
GenericFallyRoadColor:=6518652;
Flag;
a:=595;
b:=30;
repeat
b:=b+1;
repeat;
a:=a+1;
if FindColorTolerance(x,y,GenericFallyRoadColor,a,b,7 00,120,60) then
begin
a:=x;
b:=y;
TestColor:=GetColor(x,y);
red:=(TestColor mod 256);
green:=((TestColor/256) mod 256);
blue:=((TestColor/256) / 256);
if Red-Green>=2 then if Red-Green<=15 then
if Red-Blue>=20 then if Red-Blue<=30 then
if Green-Blue>=10 then if Green-Blue<=26 then
begin
if GetColor(a+5,b+5)=TestColor then
if GetColor(a+3,b+3)=TestColor then
if GetColor(a,b+5)=TestColor then
if GetColor(a+5,b)=TestColor then
if GetColor(a,b+3)=TestColor then
if GetColor(a+3,b)=TestColor then
if GetColor(a+5,b+3)=TestColor then
if GetColor(a+3,b+5)=TestColor then
begin
result:=TestColor;
Writeln('Falador RoadColor = '+IntToStr(TestColor));
exit;
end;
end;
end else a:=700;
until a>=700;
a:=595;
until b>=120;
Writeln('Could not find Falador Road Color!');
result:=0;
end;

Replace your roadcolor finding procedure with this and then call RoadColor:=FindFallyRoadColor in your script.

Definitely let me know how it works for you!

ngovil21
11-11-2006, 02:25 AM
Wow thanks TaraJunky, that procedure works awesome. Way, way better then my nooby DTM method. No wonder you're a developer.

Anyways now I added the ability to automatically walk from East Falador Bank to West Falador bank if you accidently didn't follow the directions.

tarajunky
11-11-2006, 06:56 AM
You can remove the begins and ends from this part of the code...


'bronze' : begin bmp:= BronzeBar end;
'iron' : begin bmp:=IronBar end;
'silver' : begin bmp:=SilverBar end;
'steel' : begin bmp:=SteelBar end;
'gold' : begin bmp:=GoldBar end;
'mithril' : begin bmp:=MithrilBar end;
'admantite' : begin bmp:=AdamantBar end;
'rune' : begin bmp:=RuniteBar end;


Just have 'blah': bmp:=blahbar;

You can also remove all the banking information for Varrock and Al kharid since you are never going to use it.

Looks great. I don't have any smelters to test this with, so no progress reports. Clean up your standards a bit and post some progress reports yourself if you get new ones.

:)

ngovil21
11-11-2006, 07:46 AM
Thanks for the feedback.

I'll clean up the code a bit including a bunch of the unnecessary parentheses. Cut me some slack, this is my first script. :D Anyways thanx on the feedback. I think I'm going to start working on a Rimmington Miner and Banker.

CamHart
11-11-2006, 02:50 PM
I can hook you up with my methods for finding the road color that work very well for me if you would like... I'm still writing my first official RS2 script, so just PM or reply here saying so and ill try to come back and post it.

Ransom
11-11-2006, 03:02 PM
Seems to work pretty good but i can't seem to get it to pick up the coal from the bank. When i select steel it just get iron, pauses, then walkes toward the furnace and freaks out because I have no coal lol. Any ideas? I looked through the script and it seemed ok. I'm no expert though. Any ideas?

Ransom

Edit: Maybe the bitmap isn't working anymore?

Edit2: I replaced the CoalOre bitmap in the smithing skill include to

(13, 13, 'z78DA8D935B0EC4200845B724' +
'4FF1B356BBFF258D2D7E38433BA9263744C309C29513310A1 7AA5' +
'80418B0A57341FA5D7E02B49161A6460DCBAA7E2B9D1BA98A 206D' +
'1E071A8081A58E152BD4951C3439474D84AAC737B43EB6380 D8FB' +
'1936B7C85EE32EAD6430A758FDFD088477F283233CACE5F1A 6928' +
'286091B6EAA4C9E816E5A6C2396705E657349FC5AAD72C2C6 9E66' +
'2A23B5767DED062550F9375CED48B7C435B3AFF8A663ADCE1 F193' +
'DFBE384F34E7D49CF8707DEF5E3EDD5E5DFD76A5C5DCE9706 1C6C' +
'35D34990BEDAF9FA7329F35887126706F878943ECF04D7F0C 1BF4' +
'598FFF91AB2A23DD787BC89AB91F5BF1CFF4')

Now it works flawlessly. But it does use over twice the memory as the old smaller bitmap.

ngovil21
11-11-2006, 08:28 PM
@CamHart:No I have gotten the road color to work flawlessly thanx to tarajunky. Good luck with your first script.

@Ransom:The problem wasn't with the SRL bitmaps. I had just set the tolerance levels of the bitmaps too high. I lowered them and now it shouldn't do that. All I hope now is that the tolerance isn't too low.

crimedevil
01-04-2007, 05:07 PM
still dont work...


r] (18347:10): Duplicate identifier 'FINDFALLYROADCOLOR' in script C:\Documents and Settings\Eigenaar\Local Settings\Temporary Internet Files\Content.IE5\P11O1HDG\WestFaladorSmelter[1].scar

atm999
01-14-2007, 04:10 PM
rename the findfallyroadcolor function and the call for it to something else. I had the same problem but couldn't find what caused it, but a rename fixed it.

Boreas
01-14-2007, 04:12 PM
Because since srl 3.6 tarajunky's auto colors have been in srl, and this hasn't been updated since then.

d0nk
02-11-2007, 07:12 AM
nice just woundering has eny one been baned from it ?

julle13
02-11-2007, 09:48 AM
Dunno, u maybe get banned with this, coz I can't see any antibans, but it's ur decide to run or not to run it.
U can always put ur own antibans into it ;)