PDA

View Full Version : Flax spinner



sagabmx
12-27-2010, 03:32 PM
Hi!

Is anyone interested in making a Lumbridge flax spinner?
Very boring stuff, but it pays & gives crafting experience :)

Thanks a bunch.

Sagabmx

Train
12-27-2010, 03:32 PM
I'll take it into consideration if no one else more pro than me does it. ;)

Frement
12-27-2010, 03:48 PM
I'll take it into consideration if no one else more pro than me does it. ;)

I think you would do just fine. I looked at your agility script, with your skills increasing, a flax spinner shouldn't be a problem.

kingarabian
12-27-2010, 06:15 PM
Yeah Train, you should make one, in such a little bit of time on SRL, you've contributed a lot to the community, your bots are good as well :D. If you make one, I'll make sure to use it due to the fact that you are a PRO script maker.

Huthaifah
12-27-2010, 09:27 PM
Yeah Train, you should make one, in such a little bit of time on SRL, you've contributed a lot to the community, your bots are good as well :D. If you make one, I'll make sure to use it due to the fact that you are a PRO script maker.

Agreed

Awkwardsaw
12-27-2010, 09:27 PM
my flax spinner should still work. it might need some changes

e: http://villavu.com/forum/showthread.php?t=57487

smurg
12-28-2010, 06:40 AM
I wrote this some time back, ran it personally. Give it a shot. Tell me how it works. It worked last time i ran it. Uses reflection.


//////////////////////////////////////////////////
/////// ///////
// //
// Smurg's LumbyFlaxSpinner V1.00 //
// -------------------------------- //
// | Fill in lines 33-57 | //
// -------------------------------- //
// Version 1.00 //
// -Start him at lumbridge bank with //
// inventory full of flax. //
// //
/////// ///////
//////////////////////////////////////////////////
/////// ///////
// //
// Release Notes: //
// -1.00: Just released //
// //
// Future Additions: //
// -Breaks, Multi-player //
// //
// Known Bugs: None. //
// //
/////// ///////
//////////////////////////////////////////////////
program LumbyFlaxSpinner;
{.include SRL/SRL/misc/smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/Stats.scar}
{.include Reflection/Reflection.Simba}

const
WORLD = 67;
MEMBERS = True;

DEBUG_MODE = False;
LOADS = 100;

// For http://scriptmanager.freehostia.com/
//--------------------------------------------
SRLStats_UserID = ''; // Temporary Stats ID (not username | Profile --> User ID)
SRLStats_Password = ''; // Password login to stats account.
//--------------------------------------------

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

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
end;{

with Players[1] do // Uncomment if using multiple players.
begin // Not supported right now.
Name := NAME;
Pass := PASS;
Nick := NICK;
Pin := PIN;
Active := ACTIVE;
end;

with Players[2] do
begin
Name := NAME;
Pass := PASS;
Nick := NICK;
Pin := PIN;
Active := ACTIVE;
end;}
end;

// Global Vars
var
SpinPath, BankPath, BankBooth: TPointArray;
TopStairs, BottomStairs: TPoint;
tstrings, Flax, BStrings: integer;
DTMFlax, DTMString: String;
Wheel: TRSObject;
RunTime: extended;

// Global Consts
const
TOL = 3;
QUEST = 14908517;
BANK = 2216175;
MMT = 2;

procedure rwait(time: Integer);
begin
wait(time + random(time / 5));
end;

procedure Debug(str: string);
begin
if(DEBUG_MODE)then writeln(str);
end;

procedure MC(x, y, rx, ry: integer; left: boolean);
begin
mouse(x + RandomRange(-rx,rx), y + RandomRange(-ry,ry), 0, 0, left);
end;

procedure Ooops(str: string);
begin
Logout;
writeln(str);
TerminateScript;
end;

procedure AntiBan;
begin
case Random(100) of
0..5: Gametab(RandomRange(tab_Combat, tab_Notes));
6..9: PickUpMouse;
10..50: SleepAndMoveMouse(RandomRange(200, 1200));
end;
end;

procedure Stats;
begin
if(not(SRLStats_UserID = ''))then
begin
Stats_SendReport;
Stats_ManageAccounts;
end;
end;

procedure StartSMART;
begin
Smart_Server := WORLD;
Smart_Members := MEMBERS;
Smart_Signed := True;
Smart_SuperDetail := False;

ClearDebug;
SetupSRL;
SetUpReflectionEx(true);
DeclarePlayers;
If (Not LoggedIn) Then LogInPlayer;

SetAngle(True);
end;

procedure SetupStats;
begin
Stats_UserID := SRLStats_UserID;
Stats_Password := SRLStats_Password;
Stats_ScriptID := '80';
end;

procedure SetVars;
begin
SetLength(SpinPath, 2);
SetLength(BankPath, 2);
SetLength(BankBooth, 1);
SpinPath[0] := Point(3205, 3208);
SpinPath[1] := Point(3209, 3214);
BankPath[0] := Point(3205, 3208);
BankPath[1] := Point(3208, 3220);
BankBooth[0] := Point(3208, 3222);
TopStairs := Point(3205, 3208);
BottomStairs := Point(3205, 3208);
Flax := 1779;
BStrings := 1777;
Wheel := NewObject(36970, 0, Point(3209, 3212));
DTMFlax := 'mlwAAAHicY2dgYDjEzcBwgBtCnwXiC0C8E4h3APFjoPw9IH4D xE+B+C4Q' +
'PwTiJ0DM5c7D4LN0JZDFxOA5bxGYDtywBUxLAkkQZsBCM+LBU AAAQ/cRgQ=='
DTMString := 'mlwAAAHicY2dgYFjAxcCwDIinAPEiIF4HxGuAeBY' +
'Q72JkYDgMxNuAeC0Q7wPio0C8BYhz00KAupmwYjkG3IARD4YC ABdYCzQ=';
end;

procedure BankIt;
var
x, y, strings, DTM: Integer;
begin
strings := R_CountItemID(BStrings);
//OpenBank('lb', true, true);
R_OpenBankBooth('lb');
rwait(750);
R_DepositAll(True);
DTM := DTMFromString(DTMFlax);
repeat
if(FindDTM(DTM, x, y, MSX1, 80, MSX2, MSY2))then
begin
MC(x, y, 7, 7, false);
rwait(400);
R_ChooseOption('draw-Al');
end;
if(InvCount < 28)then
DepositAll;
rwait(2200);
until(R_CountItemID(Flax) = 28)
FreeDTM(DTM);
IncEx(tstrings, 28);
incEx(Stats_CustomVars[1], strings);
incEx(Stats_CustomVars[2], strings * 15);
Stats;
end;

procedure WalkToBank;
var
PT: TPoint;
i, f, x, y: Integer;
begin
repeat
if(findcolorspiraltolerance(x, y, QUEST, MMX1, MMY1, MMX2, MMY2, 10))then
begin
R_FindRandoms;
WalkToTile(BankPath[0], MMT, 0);
PT := TileToMS(BottomStairs, 1);
MC(PT.x, PT.y, 5, 5, false);
if(R_ChooseOption('limb-u'))then
begin
repeat
wait(100 + random(50));
if(i > 25)then
begin
Inc(f);
Continue;
end;
Inc(i);
until(findcolorspiraltolerance(x, y, BANK, MMX1, MMY1, MMX2, MMY2, 10)) or (f > 3)
i := 0;
end;
end;
until(findcolorspiraltolerance(x, y, BANK, MMX1, MMY1, MMX2, MMY2, 10)) or (f > 3)
R_FindRandoms;
WalkToTile(BankPath[1], 1, 0);
end;

procedure WalkToWheel;
var
PT: TPoint;
Spinning: Boolean;
i, f, t, x, y, DTM: Integer;
begin
SetRun(True);
Spinning := False;
repeat
WalkToTile(SpinPath[0], MMT, 0);
R_FindRandoms;
PT := TileToMS(TopStairs, 1);
MC(PT.x, PT.y, 5, 5, false);
if(R_ChooseOption('limb'))then
begin
repeat
wait(100 + random(50));
if(i > 25)then
begin
Inc(f);
Continue;
end;
Inc(i);
until(findcolorspiraltolerance(x, y, QUEST, MMX1, MMY1, MMX2, MMY2, 10))
i := 0;
R_FindRandoms;
WalkToTile(SpinPath[1], 1, 0);
PT := TileToMS(TileToPoint(Wheel.Tile), 1);
MC(PT.x, PT.y, 2, 2, true);
Flag;
rwait(2000);
repeat
rwait(200);
if(t > 20)then
begin
PT := TileToMS(TileToPoint(Wheel.Tile), 1);
MC(PT.x, PT.y, 2, 2, true);
Flag;
rwait(2000);
end;
if(t > 50)then
Ooops('Didnt walk to wheel.');
Inc(t);
until(findcolorspiraltolerance(x, y, 2070783, MCX1, MCY1, MCX2, MCY2, 20))
t := 0;
DTM := DTMFromString(DTMString);
repeat
rwait(200);
if(t > 40)then
Ooops('Couldnt find the string button.');
Inc(t);
until(FindDTM(DTM, x, y, MCX1, MCY1, MCX2, MCY2))
FreeDTM(DTM);
t := 0;
MC(x, y + random(10), 20, 15, true);
Spinning := True;
end else
begin
Inc(f);
Continue;
end;
until(Spinning = True) or (f > 3)
end;

procedure WaitUntilDone;
var
c, i: Integer;
begin
c := R_CountItemID(Flax);
repeat
LevelUp;
rwait(1000);
R_FindRandoms;
LevelUp;
AntiBan;
Gametab(25);
Inc(i);
until(R_CountItemID(BStrings) = c) or (i > 120)
end;

procedure Report;
begin
if(DEBUG_MODE = false)then
ClearDebug;
RunTime := GetTimeRunning div 1000.0 div 60.0 div 60.0;
writeln('---------------------------------------------');
writeln('------- Smurgs LumbyFlaxSpinner V1.00 -------');
writeln('---------------------------------------------');
writeln('Crafting Experience Gained: ' + IntToStr(tstrings * 15) + '. (' + IntToStr(Round((tstrings * 15) div RunTime)) + ' xp/hr)');
writeln('Bow Strings Made: ' + IntToStr(tstrings) + '. (' + IntToStr(Round((tstrings) div RunTime)) + ' strings/hr)');
writeln('Has been running: ' + TimeRunning);
writeln('---------------------------------------------');
end;

begin
StartSMART;
SetVars;
if(not(SRLStats_UserID = ''))then SetupStats;
repeat
WalkToWheel;
WaitUntilDone;
WalkToBank;
BankIt;
Report;
until(tstrings > (LOADS * 28))
Logout;
writeln('Script Finished.');
end.

Train
12-28-2010, 02:54 PM
Someone beat me to it.. :(
I was making it with color anyway... I suppose people find Reflection more reliable though.

Awkwardsaw
12-28-2010, 04:34 PM
Someone beat me to it.. :(
I was making it with color anyway... I suppose people find Reflection more reliable though.

trust me, finding the spinning wheel with color is next to impossible to find fast and effeciently, as its the same color as the entire room pretty much

Train
12-28-2010, 05:28 PM
trust me, finding the spinning wheel with color is next to impossible to find fast and effeciently, as its the same color as the entire room pretty much

If a human can see it, so can a color bot.

Awkwardsaw
12-28-2010, 06:13 PM
If a human can see it, so can a color bot.

seeing it isnt the problem, distinguishing it from every thing else is what matters. yes you can run a tpa/ atpa, and it will find it eventually, but it takes for ever

Frement
12-28-2010, 06:37 PM
seeing it isnt the problem, distinguishing it from every thing else is what matters. yes you can run a tpa/ atpa, and it will find it eventually, but it takes for ever

Where would I find the spinning wheel? So I can go test a function.

Blumblebee
12-28-2010, 09:47 PM
seeing it isnt the problem, distinguishing it from every thing else is what matters. yes you can run a tpa/ atpa, and it will find it eventually, but it takes for ever

not really. If you effectively take the color ranges and spinning wheel size, etc it shouldn't take more than one(ish) search(es).

i luffs yeww
12-28-2010, 10:16 PM
Where would I find the spinning wheel? So I can go test a function.

Second floor (first for EU I think? Go up the stairs once).

Awkwardsaw
12-28-2010, 11:20 PM
not really. If you effectively take the color ranges and spinning wheel size, etc it shouldn't take more than one(ish) search(es).

thats what i said at first, :(

Train
12-29-2010, 12:10 AM
thats what i said at first, :(

Try to make a new function? :p

sagabmx
01-04-2011, 12:57 PM
Sorry for not responding! Hit a window & got my wrist got cut open 'a bit'.
Gonna try the script :)

sagabmx
01-04-2011, 02:44 PM
Works fine! :D
Want me to create a mirror?

smurg
01-04-2011, 03:04 PM
Works fine! :D
Want me to create a mirror?

Are you talking about my script/Awkwardsaw's? And if so, can you just post in the thread I made in public scripts or his, so we can keep all the discussion together. ty

Plus you can check updates there.