I have this so far http://paste.villavu.com/show/v5vRobQEY4pI9YwqHyK7/
I want it to ChopTree until(InvFull)
Bank and repeat
Tell me how to do this and which commands and where to put what, cause I mess things up a lot.
Thanks.
I have this so far http://paste.villavu.com/show/v5vRobQEY4pI9YwqHyK7/
I want it to ChopTree until(InvFull)
Bank and repeat
Tell me how to do this and which commands and where to put what, cause I mess things up a lot.
Thanks.
offtopic: I would recommend you making some other script such as superheater/alcher to get used to some of the commonly used functions(thats how i started off).
ontopic: In your script, all you're doing is getting the co-ords of the tree, after that you need to click the tree, so you use mouse(x, y....), then use repeated loops to click the tree if you're not woodcutting.
I also made woodcutter as first script. It's quite a challenge. The hardest part is making an 'waitWhileCutting' function. Is it crowded where you are cutting? Else I suggest looking in SRL animation.scar.
Working on: Tithe Farmer
No, I'm a member, so it's easier for me. Right now having trouble with banking IDK where to put it, this is what I have so far
http://paste.villavu.com/show/8ImCvwiqRQORIVhsnB5w/
And how easy is an alcher?
here is a little help with the tree finding
Simba Code:procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
with Players[0] do
begin
Name := '*********';
Pass := '*********';
Nick := '';
Pin := '*********'; // Bank Pin
Member := True;
Active := True;
end;
end;
function FindTree: Boolean; // i suggest you change this to a function
Var
TreeLocation :Tpoint;
begin
if not LoggedIn then Exit; // this is good practice, and helps not causing infinite loops
if (FindColorTolerance(TreeLocation.x, TreeLocation.y, 1324067, MSX1, MSY1, MSX2, MSY2, 5)) then // searches for the colour
begin
MMouse(TreeLocation.X, TreeLocation.Y, 0, 0); // moves to the exact point the correct colour is found
if (WaitUpTextMulti(['Tree', 'ree', 'etc'], RandomRange(400, 550))) then // searches for correct uptext,
begin // need a wait as uptext doesnt appear right away
Result := True;
writeln('Successfully found and clicked a tree');
Exit
end else
begin
Result := False;
writeln('FindColor true but uptext false, Result := False');
Exit;
end
end else
begin
Result := False;
writeln('Could not find the correct colour, Result := False');
Exit;
end;
end;
end;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
FindTree;
end.
i tried to explain it as i went, is should work but its just an idea i hope it helps
I need help with banking, where do I put the const
Bank_DR = 'db' ; // (Draynor Bank), and Bonfield changing right now.
1. Got this now. But when I put play it opens tab with bank includes.http://paste.villavu.com/show/TZIRDwMuZi3H2SYrEgbG/
Last edited by Huthaifah; 07-11-2011 at 08:56 AM.
can you post what you have?
i would also suggest using TPointArrays for finding the trees, it will be alot more accurate, it is like creating a list(array) of tpoints where correct colours are found instead of just one single colour
there are alot of good tutorial on this
about the banking that would depend on how you have writen your banking procedure
No lol, on simba it opens a new tab about bank includes. like OpenBank, DepositItems, you know what I mean.
@Master easier no bots so I can take my time and not wait for the tree to regrow.
Is it possible for one of you guys to take over my computer and show me how this goes?
taking over your computer wont really help
something that helps me make scripts is planning
eg
i write something like that, then make my procedures/functions to suit, doing this may or may not help you with your logicCode:willow banker start off in bank check levels and if axe is equiped if equiped walk to trees, if not search bank for one when character is at the tree find and cut wait until full repeat
did you understand the tree finding function i posted for you?
can you post everything you have made, i will try to help you
or you can go on irc
Last edited by Bonfield; 07-11-2011 at 09:25 AM.
Thanks, I want my bot to do wat you said Bonfield.....
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
All of the draynor woodcutters are old. Help me fix this error, [Error] (6:1): Duplicate identifier 'Bank_DR' at line 5
Compiling failed.
http://paste.villavu.com/show/OE0tK3EGnOZaLNJxHsMu/
It gives that because there is already a constant Bank_DR in bank.scar. You should change it to something else.
Code:const Bank_FE = 'feb'; // (Falador East Bank) Bank_FW = 'fwb'; // (Falador West Bank) Bank_VE = 'veb'; // (Varrock East Bank) Bank_VW = 'vwb'; // (Varrock West Bank) Bank_GE = 'geb'; // (Varrock GE Bank) Bank_DR = 'db' ; // (Draynor Bank) Bank_AK = 'akb'; // (Al-Kharid Bank) Bank_EV = 'eb' ; // (Edgeville Bank) Bank_CT = 'ctb'; // (Catherby bank) Bank_CM = 'clt'; // (Camelot bank) Bank_NA = 'nab'; // (North Ardougne bank) Bank_SA = 'sab'; // (South Ardougne bank) Bank_YN = 'ynb'; // (Yanille bank) Bank_NG = 'ngb'; // (North gnome bank) Bank_SG = 'sgb'; // (South gnome bank) Bank_WG = 'wgb'; // (Warrior guild bank) Bank_FG = 'fgb'; // (Fishing guild bank)
Rusting away
You don't really need that as a const. And also don't half ass the script and expect it to compile.
Have the tree detection ready and completed 100%
then
Have it chop the tree and make sure its chopped or being chopped.
then
wait till full inventory and have it count the items.
THEN
Work on banking.
And don't forget walking. Continue reading tutorials. Read them 50000 times until you get it. Also look at other similar scripts. They don't have to be woodcutters, they could be miners that have the same concept.
Also don't say "help me" after each little error. Please try and figure it out.
But I like your progress.
Last edited by kingarabian; 07-11-2011 at 05:20 PM.
Faith is an oasis in the heart which will never be reached by the caravan of thinking.
The only updated tutorial is c0h3ns and he doesn't talk about this stuff..
I hear you, try looking through the different includes in SRL for useful functions and use those instead of coding your own. It's saving me a lot of time and confusion. Then if you have specific issue, people here can help.![]()
I'm Silent SPYSecret project: 0%Need help? Send me a PM
How do I add ChopTree? Or what is the function that chops the tree.
Simba Code:function FindTreeAndChop: Boolean; // i suggest you change this to a function
Var
TreeLocation :Tpoint;
begin
if not LoggedIn then Exit; // this is good practice, and helps not causing infinite loops
if (FindColorTolerance(TreeLocation.x, TreeLocation.y, 1324067, MSX1, MSY1, MSX2, MSY2, 5)) then // searches for the colour
begin
MMouse(TreeLocation.X, TreeLocation.Y, 0, 0); // moves to the exact point the correct colour is found
if (WaitUpTextMulti(['Tree', 'ree', 'etc'], RandomRange(400, 550))) then // searches for correct uptext,
begin // need a wait as uptext doesnt appear right away
Mouse(TreeLocation.x, TreeLocation.y, 5, 5, True); // this is where you click the tree
Result := True;
writeln('Successfully found and clicked a tree');
Exit
end else
begin
Result := False;
writeln('FindColor true but uptext false, Result := False');
Exit;
end
end else
begin
Result := False;
writeln('Could not find the correct colour, Result := False');
Exit;
end;
end;
thats the part where the script will click the tree in the example i showed you, you have to write that SRL doesnt have preset functions like thisMouse(TreeLocation.x, TreeLocation.y, 5, 5, True);
do you understand what the code i posted is supposed to do? not saying it will work but what it is supposed to do is it checks for a colour moves the mouse to it, checks the uptext and if bot are right its clicks the tree
i suggest read about TPA's and do the same. they can be bit hard to get your head around at first so if you would like help pm me or post here
Kk bot is working, except it keeps clicking the tree and doesn't stop until its gone. And I want to add randomness to the mouse so I Don't get banned easily. http://pastebin.com/AXWpdkUQ
There are currently 1 users browsing this thread. (0 members and 1 guests)