EvilChicken!
2008-05-31 05:28:38
o hai
First of all, in Object.scar, FindObjTPA:
And, PlayersOnMap in MapWalk.scar still doesn't work.
Too high tolerance, I assume.
GetCourseXP, the only procedure in Agility.scar, is useless and should be removed.
Useless skill includes should be removed. Theese are
And, why is DisplayWindow in Mining.scar? It would be more commonly used if placed in 'core' folder. This is actually a poweful tool, especially when debugging TPAs/ATPAs. Or, simpy replace with DebugTPA/-ATPA.
Proc time now.
LogOut: Fixed annoying code and added mousebox.
TheTime: Added option to choose from 12 or 24-hour format.
FightNPC - Was in a horrible state. Switched to FindObjTPA and fixed.
That was all, I had a couple more funtions for QC.scar, but I deleted them. On purpose.
Tell me what you think and if you're aware of any other bugs in SRL that you self cannot fix, please post them here and I'll try my best.
First of all, in Object.scar, FindObjTPA:
if not (cts >= 0) and (cts <= 2) thenshould beif (cts > 1) or (cts < 2) thenAnd, PlayersOnMap in MapWalk.scar still doesn't work.
Too high tolerance, I assume.
GetCourseXP, the only procedure in Agility.scar, is useless and should be removed.
Useless skill includes should be removed. Theese are
- Agility.scar
- Construction.scar
- Farming.scar
- Fletching.scar
- Herblore.scar
- Hunting.scar
- Slayer.scar
- Thieving.scar
And, why is DisplayWindow in Mining.scar? It would be more commonly used if placed in 'core' folder. This is actually a poweful tool, especially when debugging TPAs/ATPAs. Or, simpy replace with DebugTPA/-ATPA.
Proc time now.
{*******************************************************************************
procedure Logout;
By: Starblaster100 / Raymond
Description: Logs you out.
*******************************************************************************}
function Logout: Boolean;
var
X, Y, C, I: Integer;
begin
if (not LoggedIn) or (not GameTab(14)) then
Exit;
Wait(200 + Random(100));
while LoggedIn or (c < 10) do
begin
Inc(c);
if FindText(X, Y, 'here', UpChars, MIX1, MIY1, MIX2, MIY2) then
begin
MouseBox(573, 362, 708, 389, 1);
for i := 0 to 10 do
begin
Wait(750 + random(500));
if not LoggedIn then
begin
Result := True;
Exit;
end;
end;
end;
end;
end;
{*******************************************************************************
function TheTime : string;
By: RsN (fixed by Ron)
Description: Returns current time as a string
*******************************************************************************}
function TheTime(Hours24: Boolean): string;
var
Hour, Mins, Sec, MSec: Word;
PAM: string;
begin
DecodeTime(Now, Hour, Mins, Sec, MSec);
if Hours24 then
Result := (Padz(IntToStr(Hour), 2) + ':' + Padz(IntToStr(Mins), 2) + ':' + Padz(IntToStr(Sec), 2))
else
begin
PAM := 'AM';
if Hour > 12 then
begin
DecEx(Hour, 12);
PAM := 'PM';
end else if Hour = 12 then
PAM := 'PM'
else if Hour = 0 then
Hour := 12;
Result := (Padz(IntToStr(Hour), 2) + ':' + Padz(IntToStr(Mins), 2) + ':' + Padz(IntToStr(Sec), 2) + ' ' + PAM);
end;
end;
{*******************************************************************************
function FightNPC(Colors : TIntegerArray, tol, TimeOut: Integer): Boolean;
By: WT-Fakawi & Cazax
Description: Fights NPC. Input an array of colors.
Tol = color tolerance, TimeOut = Time in MS before exiting.
*******************************************************************************}
function FightNPC(Colors: TIntegerArray; Tol, TimeOut: Integer): Boolean;
var
Mark, X, Y, I: Integer;
begin
if not LoggedIn or FindDead then exit;
for I := 0 to Length(Colors) - 1 do
if FindObjTPA(X, Y, Colors[I], Tol, 1, 5, 5, 12, ['ttack']) then
begin
Result := True;
GetMousePos(X, Y);
if random(2) = 0 then
Mouse(x, y, 0, 0, True) else
begin
Mouse(x, y, 0, 0, False);
Wait(130 + random(175));
ChooseOption('ttack');
end;
if not LoggedIn or FindDead then exit;
Wait(750 + random(850));
FFlag(0);
Mark := GetSystemTime;
repeat
if not LoggedIn or FindDead or (GetSystemTime - Mark > TimeOut) then exit;
Wait(750 + random(750));
FindNormalRandoms;
until not FindColorSpiral(X, Y, 65280, 240, 140, 290, 175);
Exit;
end;
end;LogOut: Fixed annoying code and added mousebox.
TheTime: Added option to choose from 12 or 24-hour format.
FightNPC - Was in a horrible state. Switched to FindObjTPA and fixed.
That was all, I had a couple more funtions for QC.scar, but I deleted them. On purpose.
Tell me what you think and if you're aware of any other bugs in SRL that you self cannot fix, please post them here and I'll try my best.