I just need a quick answer, I used to know how to do this but I forgot xD =[.
example.
SCAR Code:WaitUpText('ree','ak',1200);
Is this the way I would seperate tree and oak for the UpText? I forgot xD. Is it a comma used in between or what? lol.
I just need a quick answer, I used to know how to do this but I forgot xD =[.
example.
SCAR Code:WaitUpText('ree','ak',1200);
Is this the way I would seperate tree and oak for the UpText? I forgot xD. Is it a comma used in between or what? lol.
Don't Troll, Don't Fight, Just keep the Respect
Status : Offline
Feel free to re-make my scripts ;D
Community Member
I cant find WaitUpText in srl? but
IsUpTextMultiCustom(Text: TStringArray): Boolean;
IsUpTextMultiCustom(['ree','oak']);
Is what you would do for that
So try brackets around your strings.
The Script worked, It was just meant to practice making my own AutoColor(Which I think is the best way of finding a color) and it worked, but the thing is I never understood Arrays, and I think I'm just gonna learn about it in Coh3n's guide for TArrays and stuff. Anyways heres the script :
SCAR Code:program ClickTheTree;
{.include SRL/SRL.scar}
Function ChopTree : Boolean;
var
x, y : Integer;
begin
if not LoggedIn then Exit;
MakeCompass('n');
SetRun(True);
x := MSCX;
y := MSCY;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 1.39);
if FindColorSpiralTolerance(x, y, 1922119, MSX1, MSY1, MSX2, MSY2, 10) then
begin
Writeln('Found Tree, Saved its Coordinates to X and Y.');
MMouse(x, y, 4, 4);
if IsUpTextMultiCustom(['ree','ak']) then
begin
Writeln('UpText Found, Chopping Tree');
Mouse(x, y, 0, 0, True);
Result := True;
end else
Writeln('UpText not Found');
end else
Writeln('Did not find the Tree =[');
end;
begin
SetupSRL;
ClearDebug;
ActivateClient;
if ChopTree then
Writeln('Chopped the Tree')
else
Writeln('Did not Chop the Tree');
end.
It found the uptext.
I know theres some way of doing it like this.SCAR Code:if IsUpTextMultiCustom(['ree','ak']) then
God I cant believe I forgot >.>SCAR Code:if WaitUpText('ree','oak', 1020) then
Don't Troll, Don't Fight, Just keep the Respect
Status : Offline
Feel free to re-make my scripts ;D
Community Member
Writing an SRL Member Application | [Updated] Pascal Scripting Statements
My GitHub
Progress Report:13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you have serious physchological problems 13:46 <@BenLand100> HE GETS IT! 13:46 <@BenLand100> HE FINALLY GETS IT!!!!1
Yeah! that was it >.> Im mentally deficient lol.
Don't Troll, Don't Fight, Just keep the Respect
Status : Offline
Feel free to re-make my scripts ;D
Community Member
Writing an SRL Member Application | [Updated] Pascal Scripting Statements
My GitHub
Progress Report:13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you have serious physchological problems 13:46 <@BenLand100> HE GETS IT! 13:46 <@BenLand100> HE FINALLY GETS IT!!!!1
Ugh, I just got a Type mismatch error.
Line 16: [Error] (20672:35): Type mismatch in script Any reason why?SCAR Code:if WaitUpText(['ree','ak'], 1500) then
Don't Troll, Don't Fight, Just keep the Respect
Status : Offline
Feel free to re-make my scripts ;D
Community Member
SCAR Code:// * function WaitUptextMulti(S: TStringArray; Time: integer): Boolean; // By Marpis & N1ke!
// * function WaitUptext(S: String; Time: Integer): Boolean; // By N1ke!
Only WaitUpTextMulti supports an array of strings![]()
Ohz >.>
Taken from Timing.Scar >.> isnt it a boolean? I mean, it sais it there I think, And Isn't it a fail safe?SCAR Code:{*******************************************************************************
function WaitUptext(S: String; Time: Integer): Boolean;
By: Marpis edited by N1ke!
Description: Waits for an UpText, returns true if found
*******************************************************************************}
Don't Troll, Don't Fight, Just keep the Respect
Status : Offline
Feel free to re-make my scripts ;D
Community Member
SCAR Code:WaitUpText('ak', 1500);
WaitUpTextMulti(['ree','ak'], 1500);
You're mixing up regular and multi, one uses a string array i.e. [ill'', 'llo', 'low'] the other uses 1 string for ONE uptext i.e. 'illow' for willow.
Ohz...
Guess ill stop being lazy and just make it
SCAR Code:Wait(1000);
if IsUpTextMultiCustom(['ree','ak']) then
thanks for the help guys, didn't go over arrays and stuff so it didn't point out to me.
God bless you!
Last edited by Heavenguard; 12-08-2009 at 12:30 AM.
Don't Troll, Don't Fight, Just keep the Respect
Status : Offline
Feel free to re-make my scripts ;D
Community Member
Yeah Heavenguard, I edited my post after I realized I made a mistake.
Don't give up, you are my favorite Jr member by far keep striving and learning! I love you dedication!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)