EvilChicken!
2008-05-03 04:49:19
I'm ûber bored, time WAS 2:29 AM. Improoving fuctions. GO!
1: Replacement for RandomRClick:
2: I worked on a fix for PickUpMouse, but failed on making a good one. Still, point is that in theory it kinda is slightly detectable now since it allways follows a specific pattern. A better one should be made.
3: AlmostLogOut looks REALLY bottish. That procedure is almost serving against its purpose! The mouse movements are too fast in my opinion, and I think this proc should be improoved.
4: Amount.scar stack counting functions are broken?
5: I really hope autocoloring functions like FindRockColor ect are fixed in Rev#17?
6: Antirandoms.scar. We still do not have a FindPlant! PriSoner has a good findplant function in his woodcutter!
7: The description of FindDead is wrong and slightly misleading.
8: Allways annoyed me: FindMod. I think that scripter should self decide what happends upon mod encounter. What if logging out at that exact moment would mess up the script? Easy fix:
9: Small fix for FindInventoryRandoms. Fixed to return true if finds box and a little wait after gametab(4) for anti-lag and more human-like behaviour.
10: Devs might want to take a look at Antirandoms.scar, not all functions return true if they spot a random. I don't know if its me who go it wrong..
11: Doorprofiles.scar supposedly is outdated and has a comipling error in line 285:
12: InPin waits until LoggedIn = False if it fails? I saw PriSoner have a better one with failsafes in his script.
13: Deposit is still broken? I saw a thread about the issue yesterday..
14: We need a better BankOpener for Lumbridge!
15: MFF, MFNF and similar procedures should have more descriptive descriptions for people who do not know what they do. Currently, it says only in what ways it is better than the old functions. The old functions are not present. You get the point.
16: Coordinates on SetChat should be fixed, it sometimes misclicks.
17: GetSkillLevel should be removed in my opinion. People will just need to learn how to update.
18: I understood xor, thanks N3S! Result:
19: Added MouseBox for increased randomness. Raymond said he already replaced the old one with this, but just in case he didn't, he it is.
20: GameTab should be changed to use MouseBox in one of three (or less/more) occasions. Something like this:
21: LogIn should use MouseBox on the 'Existing User' and the 'Log In' button. Just to be safe. And maybe modify typesend not to press enter when typed in password?
22: PlayersOnMap does not work.
23: The whole MapWalk include seems slighly .. Outdated/old. Comments everywhere ect.
24: Wizz, fixed the stupid pixel movement in Mouse?
25: Add a description for WindMouse
26: Don't know if that has been fixed, but in FindObjTPA,
And, add 'XS, YS, XE, YE' to it aswell? To give user the ability to restrain search area.
27: Replacement for Flag;?
28: In my opinion, 'LoggedIn' belongs in LogIn.scar.
29: Fixed the World.ini in Rev#17?
30:
31: Why do we have the UsersManager include if it doesn't even compile? (The way an include should compile..)
Line 402: [Error] (13031:1): Unknown identifier 'LoadUs' in script C:\Programfiler\SCAR 3.15b\Includes\SRL\SRL\misc\UsersManager.scar
32: WorldSwitcher is slightly broken. Can't remember if I alredy mentioned, but it forgets to click world sometimes.
33: This procedure should definetly be implemented in SRL!
1: Replacement for RandomRClick:
procedure RandomRClick;
var
DX, DY: Integer;
m: Byte;
begin
if LoggedIn = False then exit;
m := MouseSpeed;
MouseSpeed := 6 + random(11);
Mouse(random(MSX2),random(MSY2), 0, 0, false);
Wait(170 + random(150));
if random(3) = 1 then
ChooseOption('xamine');
MouseSpeed := M;
end;- Generally made it better in my opinion.2: I worked on a fix for PickUpMouse, but failed on making a good one. Still, point is that in theory it kinda is slightly detectable now since it allways follows a specific pattern. A better one should be made.
3: AlmostLogOut looks REALLY bottish. That procedure is almost serving against its purpose! The mouse movements are too fast in my opinion, and I think this proc should be improoved.
4: Amount.scar stack counting functions are broken?
5: I really hope autocoloring functions like FindRockColor ect are fixed in Rev#17?
6: Antirandoms.scar. We still do not have a FindPlant! PriSoner has a good findplant function in his woodcutter!
7: The description of FindDead is wrong and slightly misleading.
8: Allways annoyed me: FindMod. I think that scripter should self decide what happends upon mod encounter. What if logging out at that exact moment would mess up the script? Easy fix:
function FindMod: Boolean;
var
tx, ty: Integer;
begin
if (UseFindMod = False) or (LoggedIn = False) then exit;
if (BmpMod = 0) or (BmpAdmin = 0) then
LoadSRLBitMaps;
if (FindColorTolerance(tx, ty, 14737632, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindColorTolerance(tx, ty, 589815, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
if (FindBitmapToleranceIn(bmpMod, tx, ty, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindBitmapToleranceIn(bmpAdmin, tx, ty, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
begin
Result := True;
WriteLn('******** FOUND MOD ********');
WriteFileString(TheFile, '******** FOUND MOD ********' + Chr(13));
TakeScreen('Found mod');
Inc(Mods);
SaveToChatLog;
Players[CurrentPlayer].Rand := 'Found Mod';
end;
end;9: Small fix for FindInventoryRandoms. Fixed to return true if finds box and a little wait after gametab(4) for anti-lag and more human-like behaviour.
function FindInventoryRandoms: Boolean;
var
CTab:Integer;
begin
CTab := GetCurrentTab;
GameTab(4);
wait(375 + random(500));
if FindLamp(LampSkill) then
Result := True;
if FindBox then begin
SolveBox;
Result := True;
end;
GameTab(CTab);
end;10: Devs might want to take a look at Antirandoms.scar, not all functions return true if they spot a random. I don't know if its me who go it wrong..
11: Doorprofiles.scar supposedly is outdated and has a comipling error in line 285:
Result := SplitTPA(tmpTPA3);Supposed to be Result := SplitTPA(tmpTPA3, 1); Right?12: InPin waits until LoggedIn = False if it fails? I saw PriSoner have a better one with failsafes in his script.
13: Deposit is still broken? I saw a thread about the issue yesterday..
14: We need a better BankOpener for Lumbridge!
15: MFF, MFNF and similar procedures should have more descriptive descriptions for people who do not know what they do. Currently, it says only in what ways it is better than the old functions. The old functions are not present. You get the point.
16: Coordinates on SetChat should be fixed, it sometimes misclicks.
17: GetSkillLevel should be removed in my opinion. People will just need to learn how to update.
18: I understood xor, thanks N3S! Result:
procedure SetRun(Run: Boolean);
begin
GameTab(11);
if Run xor (GetColor(634, 421) = 1974404) then
MouseBox(625, 413, 658, 448, 1);
end;Replacement for current SetRun. Added MouseBox for increased randomness, everything has been tested. Idea gotten from "Retaliate" procedure.19: Added MouseBox for increased randomness. Raymond said he already replaced the old one with this, but just in case he didn't, he it is.
procedure Retaliate(AutoRet:Boolean);
Var
X, Y: Integer;
begin
GameTab(1);
if AutoRet xor FindColor(X, Y, 1777020, 624, 385, 719, 396) then
MouseBox(570, 360, 715, 399, 1);
end;- The small things add up.20: GameTab should be changed to use MouseBox in one of three (or less/more) occasions. Something like this:
If Random(3) = 1 then begin
CoordsBox := IntToBox(X1, Y1, X2, Y2);
MouseBox(CoordsBox.X1, CoordsBox.Y1, CoordsBox.X2, CoordsBox.Y2);
end else begin
Coords:= Point(X, Y);
Mouse(Coords.X, Coords.Y, 8, 8, true);
end.21: LogIn should use MouseBox on the 'Existing User' and the 'Log In' button. Just to be safe. And maybe modify typesend not to press enter when typed in password?
22: PlayersOnMap does not work.
23: The whole MapWalk include seems slighly .. Outdated/old. Comments everywhere ect.
24: Wizz, fixed the stupid pixel movement in Mouse?
25: Add a description for WindMouse
26: Don't know if that has been fixed, but in FindObjTPA,
if not (cts >= 0) and (cts <= 2) then
cts := 1; // Standard.should be if InRange(CTS, 1, 3) = false then
cts := 1; // Standard.(Not the inrange, it just looks cool. 1 to 3, not 2.)And, add 'XS, YS, XE, YE' to it aswell? To give user the ability to restrain search area.
27: Replacement for Flag;?
procedure Flag(MaxTime: Integer);
var
Time, CX, CY: Integer;
begin
CX := MMCX;
CY := MMCY;
Wait(250);
if FindColorSpiral(CX, CY, 255, MMX1, MMY1, MMX2, MMY2) then begin
repeat
if LoggedIn = False then Exit;
Wait(800 + random(400));
Inc(Time);
until (FindColorSpiral(CX, CY, 255, MMX1, MMY1, MMX2, MMY2) = False) or (Time > MaxTime);
end;
end;
28: In my opinion, 'LoggedIn' belongs in LogIn.scar.
29: Fixed the World.ini in Rev#17?
30:
procedure FindSymbols(var AnsTPA: array of TPoint; SymbolName: string); should be procedure FindSymbols(var AnsTPA: TPointArray; SymbolName: string); Small, but annoying.31: Why do we have the UsersManager include if it doesn't even compile? (The way an include should compile..)
Line 402: [Error] (13031:1): Unknown identifier 'LoadUs' in script C:\Programfiler\SCAR 3.15b\Includes\SRL\SRL\misc\UsersManager.scar
32: WorldSwitcher is slightly broken. Can't remember if I alredy mentioned, but it forgets to click world sometimes.
33: This procedure should definetly be implemented in SRL!
{*******************************************************************************
function RndWorld(wType: integer): integer;
By: PriSoner
Description: Returns a random world number. Uses worlds.ini to get a world count
and check if world is members or free.
Options: Enter 1 to return any valid random world.
2 to return any valid Free Play World
3 to return any valid Members World
*******************************************************************************}
function RandWorld(wType: integer): integer;
var winipath: String;
rndcount: integer;
begin
if (wType > 0) and (wType < 4) then
begin
winipath := AppPath + 'includes\SRL\SCSS\worlds.ini';
rndcount := StrToInt(ReadINI('Worlds', 'Count', winipath));
case wType of
1: repeat
result := Random(rndcount) + 1;
until (ReadINI('World' + IntToStr(result), 'Type', winipath) = 'Free') or
(ReadINI('World' + IntToStr(result), 'Type', winipath) = 'Members');
2: repeat
result := Random(rndcount) + 1;
until (ReadINI('World' + IntToStr(result), 'Type', winipath) = 'Free');
3: repeat
result := Random(rndcount) + 1;
until (ReadINI('World' + IntToStr(result), 'Type', winipath) = 'Members');
end;
writeln('Your Randomly Chosen World is: ' + IntToStr(result));
end else
begin
writeln('function RandWorld: Incorrect value! Valid Range is 1 to 3. Terminating Script!');
TerminateScript;
end;
end;