carrot
2013-03-22 23:14:32
can you make a flax spinning script?
2013-03-22 23:14:32
2013-03-23 10:57:15
2013-03-23 20:06:29
2013-03-23 20:31:12
2013-03-23 21:58:05
program new;
{$define smart8}
{$i srl-osr/srl.simba}
procedure walktostairs;
begin
MakeCompass('N');
SetAngle(SRL_ANGLE_LOW);
mousebox(630, 146, 639, 147, mouse_left);
while (ismoving) do
wait(10 + random(50));
mousebox(171, 178, 191, 186, mouse_right); // clicks in the black taking you to same spot everytime near stairs
wait(100 + random(20));
waitoption('limb-down', mouse_left);
wait(1500 + random(50));
MakeCompass('W');
SetAngle(SRL_ANGLE_HIGH);
wait(1000 + random(100));
end;
procedure clickspinner;
var
x, y: integer;
begin
if FindColorspiralTolerance(x, y, 873854, 92, 121, 475, 347, 8) then
begin
mmouse(x, y, 3, 3);
if (waitUpTextMulti(['pin'], 800)) then
begin
writeln('yay, we found the wheel');
getMousePos(x, y);
mouse(x, y, 0, 0, mouse_left);
while (ismoving) do
wait(10 + random(50));
wait(1000 + random(100));
mousebox(468, 37, 477, 45, mouse_left);
end;
end;
end;
2013-03-26 02:30:15
2013-03-27 21:20:33
2013-03-29 01:25:30
2013-03-29 16:24:55
2013-03-30 00:08:40
From: wthomas
3 people wanting a spinning thread, 3 people that can learn to code in pascal script.
Break the problem down into small steps, eg:
(assuming lumby castle)
- Bank strings/withdraw flax
- run to stairs
- climb down stairs
- run to spinning wheel
- use spinning wheel
- run to stairs
- climb up stairs
- run to bank;
Banking is done very simply with SRL-OSR include or P07_include, ll the functions are there for you to use, just to open the bank use ACA and create your own method, or if you are making a private script i don't mind if you use my banking method in my essence harvester to use as a base and learn from.
Running to the stairs is as simple as working out the current compass angle and using simple trig to click south ( alternatively you could just make the compass north and then click a hard coded point on the minimap.
For clicking the down the stairs you can use similar code to the banking procedure, use ACA to ind the right color and tolerances, again or edit my procedure you exiting the portal in my essence miner.
Running to the wheel: you can find the iron on the minimap using findsymbol(x,y,'some_constant') where some_constant is the reference for the iron(delve into srl to find this)
using the wheel you again can use a similar function to the stairs one just with different colors, tolerances and uptexts
write function that counts the number of bs in your invent, if this is 28 then you know to run to the stairs again.
Climbing upt he stairs is as simple as climbing down them.
running to the bank: click the bank icon?
Put these functions together in a loop and you'll have a working flax spinning bot, it should take you only a few hours if you break the problem down like this into small easy steps. Its you any script is written, if you approach it in a full on way without breaking it down you wont get anywhere, nor would I.
2013-03-30 23:52:03
2013-03-31 18:14:33
From: wthomas
3 people wanting a spinning thread, 3 people that can learn to code in pascal script.
Break the problem down into small steps, eg:
(assuming lumby castle)
- Bank strings/withdraw flax
- run to stairs
- climb down stairs
- run to spinning wheel
- use spinning wheel
- run to stairs
- climb up stairs
- run to bank;
Banking is done very simply with SRL-OSR include or P07_include, ll the functions are there for you to use, just to open the bank use ACA and create your own method, or if you are making a private script i don't mind if you use my banking method in my essence harvester to use as a base and learn from.
Running to the stairs is as simple as working out the current compass angle and using simple trig to click south ( alternatively you could just make the compass north and then click a hard coded point on the minimap.
For clicking the down the stairs you can use similar code to the banking procedure, use ACA to ind the right color and tolerances, again or edit my procedure you exiting the portal in my essence miner.
Running to the wheel: you can find the iron on the minimap using findsymbol(x,y,'some_constant') where some_constant is the reference for the iron(delve into srl to find this)
using the wheel you again can use a similar function to the stairs one just with different colors, tolerances and uptexts
write function that counts the number of bs in your invent, if this is 28 then you know to run to the stairs again.
Climbing upt he stairs is as simple as climbing down them.
running to the bank: click the bank icon?
Put these functions together in a loop and you'll have a working flax spinning bot, it should take you only a few hours if you break the problem down like this into small easy steps. Its you any script is written, if you approach it in a full on way without breaking it down you wont get anywhere, nor would I.[/QUOTEprogram flaxspin;
{$define smart8}
{$i srl-osr/srl.simba}
procedure DeclarePlayers();
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Nick := '';
Name := '';
Pass := '';
Active := true;
Integers[0] := 0;
end;
procedure walktostairs;
begin
MakeCompass('N');
SetAngle(SRL_ANGLE_LOW);
mousebox(630, 146, 639, 147, mouse_left);
while (ismoving) do
wait(10 + random(50));
mousebox(171, 178, 191, 186, mouse_right); // clicks in the black taking you to same spot everytime near stairs
wait(100 + random(20));
waitoption('limb-down', mouse_left);
wait(1500 + random(50));
MakeCompass('W');
SetAngle(SRL_ANGLE_HIGH);
wait(1000 + random(100));
end;
procedure clickspinner;
var
x, y: integer;
begin
if FindColorspiralTolerance(x, y, 873854, 92, 121, 475, 347, 8) then
begin
mmouse(x, y, 3, 3);
if (waitUpTextMulti(['pin'], 800)) then
begin
writeln('yay, we found the wheel');
getMousePos(x, y);
mouse(x, y, 0, 0, mouse_left);
while (ismoving) do
wait(10 + random(50));
wait(1000 + random(100));
mousebox(468, 37, 477, 45, mouse_left);
end;
end;
end;
Procedure withdrawBank;
begin
if (BankScreen) then
begin
repeat
Deposit(3,28,True);
Wait(RandomRange(210,410));
until (InvCount < 2);
writeln('Withdrawing flax from bank slot 1');
randomMouseClick(93,77);
randomWaitTime;
Clickmouse2(mouse_right);
Wait(randomRange(921,1024));
chooseOptionMulti(['All']);
Wait(randomRange(835,1034));
if (InvCount < 28) then
begin
writeln('Oops...something went wrong, lets try again.')
withdrawBank;
end;
repeat
MMouse(RandomRange(487 - 3, 487 + 3), RandomRange(41 - 3, 41 + 3), 0 ,0);
randomWaitTime;
if (CountColor(2070783,179,32,337,52) = 499) then
Clickmouse2(mouse_left);
until(CountColor(2070783,179,32,337,52) < 499);
end;
end;
Procedure openBankScreen;
begin
if (BankScreen = False) then repeat
setCustomCompass(compPos);
writeln('Attempting to open bank...');
randomWaitTime;
if FindObjCustom(x,y, ['se','ank','ooth'],[bankcolour1,bankcolour2], 5) then
begin
randomWaitTime;
ClickMouse2(mouse_right);
randomWaitTime;
ChooseOptionMulti(['Bank', 'ooth']);
case random(1000) of
1..700: Wait(RandomRange(300, 1000));
701..900: Wait(RandomRange(400, 1500));
901..1000: Wait(RandomRange(500, 3000));
end;
end;
until (BankScreen);
writeln('Attempt was successful!');
end;
procedure loop;
begin
FindNormalRandoms;
if(InvFull) then
begin
openBankScreen;
withdrawBank;
walktostairs;
clickspinner;
end
end;