Seroko
2008-09-26 00:49:19
I am starting a long list of all the randoms done in reflection. Don't flame if you hate reflection, I am not asking your opinion. I am just simply asking you to test these functions and give me your feedback, first off a very very simple script to open scar and run a test on a function for me, just past the function you are testing onto the script and change the function name at the bottom.
Please note I currently am completely unable to play at all and when I say UNTESTED I mean they have never been run, I know thats not good but >_> having bad issues right now in rl.
R_SolveBox [UNTESTED] this one should be VERY basic, would like to change the bitmap to a dtm, suggestions? a screenshot to make the dtm off of anyone?
R_SolveMime [UNTESTED] I know Drags111 has one out but I feel his is rather long and a bit rough, reviews please!
Next will by Molly Random~ [Its done if someone has a character in molly willing to test this function send me a PM because its a little rough]
Script you can paste the function onto, setup declare players, paste the function, and change the area at the bottom to match the function name. Let it play and hit F2. (Make sure SMART is ENABLED >_>)
Please note I currently am completely unable to play at all and when I say UNTESTED I mean they have never been run, I know thats not good but >_> having bad issues right now in rl.
R_SolveBox [UNTESTED] this one should be VERY basic, would like to change the bitmap to a dtm, suggestions? a screenshot to make the dtm off of anyone?
{*******************************************************************************
function R_SolveBox: Boolean;
by: Seroko
Description: Checks for and solves the mysterious box random.
*******************************************************************************}
function R_SolveBox: Boolean;
var
i, x, y : Integer;
begin
i := BitmapFromString(25, 25, 'beNpjYMAF/mMABtIBLo0km' + // From SRL
'UyS7bhMJtsLyCbASQoBJUFKSeCMGjVq1KhRw94ouCFUKfFwcck2h4' +
'wqgCQHEDSZEo8QdjYABzDsFA==');
Result := False;
GameTab(4);
Wait(100 + Random(50));
if FindBitmapMaskTolerance(i, x, y, 547, 202, 737, 466, 5, 5) then
begin
repeat
Mouse(x + 8, y + 8, 10, 10, True);
Wait(3000+Random(2500)); // We want to make sure we look human-like
Mouse((120+(120*GetBoxAnswer)), 290, 30, 10, True);
Wait(1000+Random(1500));
if not(FindBitmapMaskTolerance(i, x, y, 547, 202, 737, 466, 5, 5)) then
Result := True;
until(Result);
end;
FreeBitmap(i);
end;R_SolveMime [UNTESTED] I know Drags111 has one out but I feel his is rather long and a bit rough, reviews please!
{*******************************************************************************
function R_SolveMime: Boolean;
by: Seroko
Description: Checks for and solves the mime random.
*******************************************************************************}
function R_SolveMime: Boolean;
var
Mime : TNPC;
i, mx, my : Integer;
Animation : String;
Emotes : TIntegerArray;
begin
Result := False;
if not FindNPC('Mime', Mime) then
Exit;
Emotes := [857, 860, 861, 866, 1128, 1128, 1130, 1131];
repeat
i := Mime.Animation;
if InIntArray(Emotes, i) then
begin
case i of // Set our Animation text
857: Animation := 'Think';
860: Animation := 'Cry';
861: Animation := 'Laugh';
866: Animation := 'Dance';
1128: Animation := 'Glass Wall';
1128: Animation := 'Lean on air';
1130: Animation := 'Climb Rope';
1131: Animation := 'Glass Box';
end;
while not(FindColorTolerance(mx, my, 1122502, MCX1, MCY1, MCX2, MCY2, 40)) do // Drags111
Wait(100 + Random(100));
Wait(1000 + Random(1000));
FindTextTpaEx(11503238, 10, MCX1, MCY1, MCX2, MCY2, mx, my, Animation, npcchars, ClickLeft)
end;
until(not(FindNPC('Mime', Mime)));
Result := True;
end;Next will by Molly Random~ [Its done if someone has a character in molly willing to test this function send me a PM because its a little rough]
Script you can paste the function onto, setup declare players, paste the function, and change the area at the bottom to match the function name. Let it play and hit F2. (Make sure SMART is ENABLED >_>)
Program Tests;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/reflection/reflection.scar}
const
Members = 'yes'; // YES for members worlds NO for free worlds!!
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
// PASTE THE FUNCTION HERE!!
function RandomWorld: String;
var
Worlds: TIntegerArray;
begin
if (Lowercase(Members) = 'no') then
begin
Worlds := [25, 81, 102, 11, 105, 16, 106, 80, 135, 152, 72, 113, 37, 75,
169, 34, 40, 128, 87, 41, 101, 43, 35, 93, 33, 73, 120, 95, 90,
86, 96, 85, 38, 55, 57, 94, 127, 20, 126, 74, 125, 50, 118,
119, 30, 13, 123, 62, 7, 149, 165, 49, 8, 63, 21, 136, 19, 109,
153, 161, 14, 150, 163, 167, 154, 108, 61, 29, 47, 134, 107,
155, 32];
result := 'world'+IntToStr(Worlds[Random(high(Worlds))]);
end;
if (Lowercase(Members) = 'yes') then
begin
Worlds := [84, 92, 71, 129, 83, 82, 23, 143, 54, 130, 100, 45, 60, 44, 46,
97, 59, 78, 99, 36, 103, 98, 104, 77, 58, 88, 39, 91, 116, 115,
79, 114, 164, 89, 76, 132, 22, 69, 27, 168, 121, 67, 28, 166,
124, 70, 66, 48, 64, 12, 56, 133, 156, 162, 111, 117, 145, 137,
65, 138, 42, 110, 151, 148, 26, 159, 51, 112, 160, 15, 131, 52,
158, 157];
result := 'world'+IntToStr(Worlds[Random(high(Worlds))]);
end;
end;
begin
SetupSRL;
SmartSetup(RandomWorld, True, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
DeclarePlayers;
LoginPlayer;
Repeat
If (IsFKeyDown(2)) Then
Begin
if {FUNCTION NAME THING HERE} then
Writeln('Random ~SHOULD~ be solved');
end;
While IsFKeyDown(2) Do
Wait(1);
until IsFKeyDown(3);
end.