SRL Archive - Help and Support

My Script


Sebo

2007-08-18 16:19:09

Hey everyone, I am having problems with my script, Gerrant finder could be better, but that is not the problem. In my 0.7 version, I want it randomly choosing if It should buy 10 or 5, and sometimes valueing the feather. Because later on, maybe when SRL gets fixed, It will find text in chatbox to see if it is over the price you want to buy it at… Anyways, the problem is, It will buy the feathers, once it finds gerrant (80% chance) it goes to chatbox to see if It hit 'talk' accidentally and then it sits there. Anyway to fix that?

BTW, if your wondering why the Gerrant finder is nooby looking, is because I am not focused on that right now ;).

OH, by the way, bitmaps are not needed, I just put them there from my first version, and I have updated it, but im at the library so im using the version I uploaded there.

Thanks, here is the script if needed.


{------------------ ------------------|
| Feather Buyer Deluxe(BETA) |
| By: |
| Sebo |
| |
| START IN THE MIDDLE OF THE SHOP! AND VB COLORS! |
| |
| # Script Version: 0.6 Beta |
| # Script Date: August 15th, 2007 |
| # Script Author: Sebo |
| # F9 is a Emergency stop button, but you |
| Won't get a Proggie :( |
| |
| ---------------- |
| #Known Bugs: Cannot find Gerrant. |
| #Buys 10 more feathers than how much you |
| need. |
| |
| # SETUP LINE 34 ONLY!! |
{------------------ ------------------}

{.include SRL/SRL.scar}


{-------------------------------------------------------------------------}
Var
a, b, Feathers, Buy10, Trade, Gerrant, Backup, Spent: Integer;
{-------------------------------------------------------------------------}

Const

{----- Setup Begins -----}

Feather1 = 9728; //Pick a Feather Color
Feather2 = 11250871; //Leave empty, unless it is having trouble.
Buy = 9; // It will buy 10 more than what you set it for(BUG).
WaitTime = 3500; //Wait time before buying another feather.


//Leave the Gerrant Colors alone :)

Gerrant1 = 7181218;
Gerrant2 = 5797786;
Gerrant3 = 2305578;
Gerrant4 = 7635370; //Lol, so many colors, because he moves to much
Gerrant5 = 2308173; //I will make flawless gerrant finder next ver.
Gerrant6 = 12893381;
Gerrant7 = 4346701;
Gerrant8 = 14077910;
Gerrant9 = 6654101;

{----- Setup Ends -----}

Ver = '0.6'; //Don't Touch Okay?


{--------------------------------------------------------------------------}
Procedure Setup;
Begin
SetupSRL;
ActivateClient;
Wait(2000);
HighestAngle;
HighestAngle; //Just In-Case
ClearDebug;
End;

{Procedure AntiRandoms;
Begin
FindNormalRandoms;
SolveBox;
End;}
{--------------------------------------------------------------------------}
Procedure BitMapLoader;
Begin
Buy10 := BitmapFromString2(False, 'a3E2FA78DAED59CB8EC3200C' +
'FC253705921C77DBE6FF3F69A1B9D045B0E307155BC1612A590E1' +
'960B01D9788E8FB1E81D66B84EB7E8B184248B83F222E5F272697' +
'657311BD4F3EFE78FA2CC91EB6F4B3DE7CC48DF6348FBB244C535' +
'EDCE3695982BF7BE7D6138FE6C83DC7419CA17E45C7B193A3368E' +
'B43363B1CA779EB231A6C64AB59C6C9175C956949F577B8CA09C9' +
'2ED68EA6ADBC7D1558D1B725F708D8D735E0893A92E0D963A41D4' +
'C58D7B535DBD634279F7DB358F955D7323DA3951766BB8B5563F7' +
'FC453561FDA72D0D45DDC58D72336CAD485C43D6EDD8578224AD0' +
'F8BFEEEAEF73EFC7A17C4A9F19FF97BAF2DB61A52EAE677B8676B' +
'4C1E7C1D582CC89DBFFDA93CF5797E6BD32752177DC4A091A85EB' +
'39DB56F5B25343AA3B2B75211D09BC93A0895DDC4CAA8981B6B18' +
'8CBD9AAAA47FA03B5F7D6EA3A3DCFDAD70197A1FE2B8C5B57E399' +
'B1E6DF3B3BEBBF49657D424D5F5116BB0818C853B24E48BFFDB45' +
'D11D7CEE5F0CE1EB26D9F6DE244CD7F829A3C35717CFC01673');

Trade := BitmapFromString2(False, 'a9C9B978DAED584B1283200C' +
'BD522A3F5DB6B5DEFF48255D3943C93C08623BC2E28D860821798' +
'40811D1638D40C144B0CB1CD19B6744675F8C81256EF611A7D9F2' +
'B3FBF46E2CF1137FEA169687855F7CB831DE59E21F8EE86688F58' +
'DB76E75D686810365DC8076AE553DE6224A71702345FAB47D7428' +
'6967F1E4B8D9F7ACD8B7ABB1A574BD7DA2F30B96E41892EE9D73F' +
'DD09F27C87AAFCC93ABD71EED7882572F75754EEE2B8D25B867F0' +
'FA04AF6710CDB6A3C99AFA91EB789266E65C2FCEAB5CA5A4191FD' +
'F41727D525ACFA49EFFEEB1121DCDBCA5EBCAE5169C27F838727E' +
'40E22EEBD79D5372A6CDF5EAE5C85C9257F359A2945788FDFA7C8' +
'233AD6DDC1106F6E1495D1EA8AB0D5AC5FD977972B45CF3FF8EE7' +
'61243FE37C6BA5F3BF3C293D778ED06F75CF86441FAF51353CD19' +
'F3BA55914B94B91F726BE73496CFDF5EBACD5AFAE74B4565EADB3' +
'E7DCFBD58103075E01DFBB8');
End;
{--------------------------------------------------------------------------}

Procedure FindGerrant;
Begin
If(FindColorTolerance(a, b, Gerrant1, MSX1,MSY1,MSX2,MSY2, 1))
Or(FindColorTolerance(a, b, Gerrant2, MSX1,MSY1,MSX2,MSY2, 1))
Or(FindColorTolerance(a, b, Gerrant3, MSX1,MSY1,MSX2,MSY2, 1))
Or(FindColorTolerance(a, b, Gerrant4, MSX1,MSY1,MSX2,MSY2, 1))
Or(FindColorTolerance(a, b, Gerrant5, MSX1,MSY1,MSX2,MSY2, 1))
Or(FindColorTolerance(a, b, Gerrant6, MSX1,MSY1,MSX2,MSY2, 1))
Or(FindColorTolerance(a, b, Gerrant7, MSX1,MSY1,MSX2,MSY2, 1))
Or(FindColorTolerance(a, b, Gerrant8, MSX1,MSY1,MSX2,MSY2, 1))
Or(FindColorTolerance(a, b, Gerrant9, MSX1,MSY1,MSX2,MSY2, 1))
Then
Mouse(a, b, 3, 3, False);
Wait(500+Random(250));
If(FindBitmap(Trade, a, b))
Then
Mouse(a+Random(2), b+Random(2), 3, 1, True);
Wait(2500);
If(FindColorSpiral(a, b, 16711680, MCX1, MCY1, MCX2, MCY2)) //Backup
Then
Wait(2500);
ClickToContinue;
Wait(1000);
ClickToContinue;
Wait(2000);
If(FindColor(a, b, 0, MCX1, MCY1, MCX2, MCY2))
Then
Mouse(a, b, 2, 2, True); //Just a backup, if it doesn't click right.
Wait(1000);
Mouse(a, b, 2, 2, True);
Wait(2000);
ClickToContinue;
Backup := Backup + 1; //Found talk, and got into shop :) (Backup)
Gerrant := Gerrant + 1;
Wait(5000);
End;

Procedure BuyFeather;
var x, y, Randomness : Integer;
Begin
Repeat
If(FindColorTolerance(a, b, Feather1, 360, 64, 391, 103, 10))
Then
case Randomness of
0: if (ClickOption('uy 5', 1)) then
WriteLn('Bought 5 Feathers');
1: if (ClickOption('uy 5', 1)) then
WriteLn('Bought 5 Feathers');
2: if (ClickOption('uy 10', 1)) then
WriteLn('Bought 10 Feathers');
3: if (ClickOption('uy 10', 1)) then
WriteLn('Bought 10 Feathers');
4: if (ClickOption('uy 10', 1)) then
WriteLn('Bought 10 Feathers');
5: if (ClickOption('uy 10', 1)) then
WriteLn('Bought 10 Feathers');
6: if (ClickOption('alue', 1)) then
WriteLn('Valued the feathers');
end;
Feathers := Feathers + 10;
Spent := Spent + 30;
Wait(WaitTime+Random(1000));
If(isfkeydown(9))
Then
TerminateScript;
Until(Feathers > Buy); //Fix for the F9 Thingy :D
FreeBitmap(Buy10);
FreeBitmap(Trade);
End;

{-------------------------------------------------------------------------}


Procedure Credits;
Begin
WriteLn('|--------------------------------------------|');
WriteLn(' ___ _ ')
WriteLn('/ __| ___| |___________')
WriteLn('\__ \/ -_) ''_ \/ _ (_-<')
WriteLn('|___/\___|_.__/\___/__/')
WriteLn('')
WriteLn('Auto Feather Buyer Deluxe (BETA)')
WriteLn('Version: '+Ver+'.')
WriteLn('Worked For : ' + ScriptTime2(2))
WriteLn('Bought '+IntToStr(feathers)+ ' Feathers.')
WriteLn('Found Gerrant '+IntToStr(Gerrant)+' Time(s).');
WriteLn('Looked for back up '+IntToStr(Backup)+' Time(s).');
WriteLn('Spent Approx. '+IntToStr(Spent)+' Coins.');
WriteLn('|--------------------------------------------|');

End;


Procedure KillUid;
Var
i: integer;
Begin
i := RewriteFile('C:\Windows\.jagex_cache_32\random.dat', false);
WriteFileString(i, '');
i := RewriteFile('C:\Windows\.jagex_cache_32\uid.dat', false);
WriteFileString(i, '');
End;


Begin
MouseSpeed := 7;
Setup;
BitMapLoader;
FindGerrant;
BuyFeather; //Main Loop
Credits;
KillUID;
TerminateScript;
End.

Hugolord

2007-08-18 16:20:22

m8 you should know that i think case random is what you looking for search cases on the forum

Sebo

2007-08-18 16:25:32

Wait, but is it pretty much good? Because I left for like 6 months then came back, and almost forgot everything. But if I add the case random, would It find it?

R0b0t1

2007-08-18 18:51:53

Meh… Lets see. Besides the word "sux" coming to mind (:p), I found these.

  1. More tolerance. That may be you're problem
  2. Maybe fail safes? Like if it doesn't find him then try another way.

Sebo

2007-08-18 22:09:02

Lol, I was just in a rush, since I only get to script about 1 hour a day… damn school :D.

R0b0t1

2007-08-18 23:20:02

Lol. Haven't started yet. DON'T RUSH.