PDA

View Full Version : flax spining script



carrot
03-23-2013, 03:14 AM
can you make a flax spinning script?

MagicClty
03-23-2013, 02:57 PM
Yes! This is something I would love too.

adeghati
03-24-2013, 12:06 AM
+1. Would be really useful, gotta get 50 craft for rfd :/

wthomas
03-24-2013, 12:31 AM
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.

kyleinkman
03-24-2013, 01:58 AM
**note this is very basic and is not a complete script just somthing for you to work off of**

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;

Deftinw0lf
03-26-2013, 06:30 AM
Thank you for posting the start!

Question though, having no knowledge of scripting, what would I need to do to this to get a decent script?

I am happy to learn, just need a little guidance, thank you!

imatable
03-28-2013, 01:20 AM
it would be awesome if someone could develop this into a proper script for everyone to use.

Anatomical
03-29-2013, 05:25 AM
Lol there isn't many Simba developers. You gotta learn it yourself. I started watching a few tuts today. Seems a bit complex, but with time hopefully ill get better.

kanko
03-29-2013, 08:24 PM
if u read alot about it and look at tutorials u will get better

botterboi
03-30-2013, 04:08 AM
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.
I am trying to learn how to code and was gonna make this script but with 5 hours into it and it can't even do one smooth run. I'm to mind fucked to even put in fail safes and other things like that let alone finish it. I may pick this back when I am well rested. If anyone wants to take what I got so far and use it feel free.20365

awong
03-31-2013, 03:52 AM
im working on one right now and it spins and neitizot all flax spinners should use this place since thers no stairs etc so its super easy to make a script

marijuana420
03-31-2013, 10:14 PM
[QUOTE=wthomas;1201962]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.[/QUOTE




program 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;