Hey321's Auto-Dueler ~~~ Help needed!
Ok, i started this, and im having some problems with the waiting till the duel is done, any help with that? Other than that its pretty much perfect :(.
Code:
SCAR Code:
{.Script Info:
# ScriptName = Hey321's Auto-Dueler
# Author = Hey321
# Description = Auto accepts and waits until duel is over
# Version = 0.3
# Date = Dec, 17th
# Comments = Copyright i WILL take action if i find this script being: 1.Sold 2.Impersonated (saying its your when its not)
/Script Info}
{If i forgot you in credits PM me on villu-reborn.com and i will add you.
Credits:
Boreas/Yakman for the chat coords
Junior for the DuelScreen help
Da Der Der for random talking!}
Program DuelTrainer;
{.include SRL/SRL.scar}
var
FalseTimes: Integer;
function Duel: Boolean;
begin
if ( FindColorTolerance ( x, y, 12926 , MCX1, MCY1, MCX2, MCY2, 1 )) Then
begin
Result := True
WriteLn('Woot! We''re True and Safe!')
MMouse(x, y, 3, 3);
Mouse(x,y,3,3, True);
FalseTimes:=FalseTimes-1
end //<------ No Semicolon ( one of these ; ) in here
else //<---- nothing wrong here but the line above is added to this line at compile time
begin
WriteLn('OMFG It''s False');
FalseTimes:=FalseTimes+1
Result := False;
If (FalseTimes>100) Then TerminateScript;
End;
End;
Procedure FunDuel;
Var
RandomDuel : Integer;
DuelMsg : String;
Begin
Repeat
RandomDuel:= random(6)+1;
Case(RandomDuel)Of
0 : DuelMsg:= ('funning all');
1 : DuelMsg:= ('fun dueling');
2 : DuelMsg:= ('funning everyone');
3 : DuelMsg:= ('dueling for fun');
4 : DuelMsg:= ('funning');
5 : DuelMsg:= ('funning anyone');
End;
TypeSend(DuelMsg);
Until(duel)
End;
Procedure Accept1;
Begin
Sleep(1000)
If (findcolorTolerance(x, y, 32768 , MSX1, MSY1, MSX2, MSY2, 25)) Then
Begin
Repeat
Sleep(1000)
MMouse(x, y, 3, 3);
Mouse(x, y, 3, 3, True);
Until (not (findcolorTolerance(x, y, 32768 , MSX1, MSY1, MSX2, MSY2, 25)))
If(not (Gametab(4))) Then
Begin
Repeat
Wait(1000)
If InChat('Well Done!') or
InChat('Oh dear') Then Break;
Until(InChat('Well done!') Or InChat('Oh dear'))
End;
End;
End;
Begin
SetupSRL;
ActivateClient;
Repeat
FunDuel;
Accept1;
Until(False);
End.