Log in

View Full Version : Help With Script Change



Seif
01-20-2012, 10:49 PM
Hi I seem to have tried playing around with changing lines of script by following some instructions on how to change the "clickToContinue" lines of text but have accidently replaced the wrong lines. I replaced lines 246-266 and would appreciate it greatly if someone could point me to a thread that includes the original lines of text or could post here what those lines should be. Also if there is a thread that shows what "all" lines of text should look like in order to coincide with the recent game update that would be great aswell. Right now my lines 246-266 look like this:

function ClickContinue(Click, Waiting: Boolean): Boolean;
var
x, y : Integer;
begin
Result := false;
Result := FindColor(x,y, 938793, 221, 457, 295, 474); // normal green, click continue bounds
{if not Result then // not sure if I want this, don't want it pressing space when it doesn't need to.
begin
Result := FindColor(x,y, 3067775, 221, 457, 295, 474);// hilight activated green
if not Result then
Exit;
end;}

if Click and Result then
begin
TypeSendEx(' ', False);
if Waiting then
ChatWait;
end;
end;

Inception
01-21-2012, 12:33 AM
You should try running an update. Seems like you have a pretty old version of that function.

Seif
01-21-2012, 03:32 AM
I've run all updates but it kept my saved texts. If I can get someone to open simba and below "Function List" in the blank space, type "ClickContinue" and scroll down to lines 246-266 and paste the contents it will help me to prevent from having to reinstall Simba. Any help is much appreciated.

kevin33
01-21-2012, 03:36 AM
{************************************************* ******************************
Function ClickContinue(SpaceBar, DoWait: Boolean): Boolean;
By: Narcle
Description: Returns true if the green button in the chat box is found.
It will SpaceBar if true otherwise will mouse it. If DoWait = true
will wait until color count changes.
************************************************** *****************************}
Function ClickContinue(SpaceBar, DoWait: Boolean): Boolean;
var
TPA: TPointArray;
i, C, T: integer;
B: TBox;
ATPA: T2DPointArray;
begin
if ClickContinueEx(SpaceBar, DoWait) then
begin
Result := true;
Exit;
end;
C := GetColorToleranceSpeed;
SetColorToleranceSpeed(1);
FindColorsTolerance(TPA, 11776948, MCX1, MCY1, MCX2, MCY2, 0);//color is constant atm
SetColorToleranceSpeed(C);
if Length(TPA) < 1 then
Exit;
ATPA := SplitTPA(TPA, 2);
for i := 0 to High(ATPA) do
begin
B := GetTPABounds(ATPA[i]);
if InRange(B.x2-B.x1, 58, 72) then
if (CountColorTolerance(1203763, B.x1-5, B.y1+1, B.x2+5, B.y1+15, 37) > 50) then
begin
C := CountColor(0, MCX1, MCY1, MCX2, MCY2);
if SpaceBar then
TypeByte(VK_SPACE)
else
Mouse(B.x1, B.y1, (B.x2-B.x1), 8, true);
Result := True;
T := GetSystemTime + 10000;
if DoWait then
while (C = CountColor(0, MCX1, MCY1, MCX2, MCY2)) and (GetSystemTime < T) do
Wait(50+random(50));
Exit;
end;
end;
end;
This?

Inception
01-21-2012, 03:47 AM
Here is my line 246-266 from that file:

end;
if Result then
Break;
end;
end;

(*
ClickContinue
~~~~~~~~~~~~~

.. code-block:: pascal

function ClickContinue(SpaceBar, DoWait: Boolean): Boolean;


Returns true if the green button in the chat box is found.
It will SpaceBar if true otherwise will mouse it. If DoWait = true
will wait until color count changes.

.. note::

by _ChArMz & Narcle (Original by EvilChicken!)



You need to entirely update your srl/srl/chat.simba file.

Seif
01-21-2012, 07:55 AM
Tyvm all is fixed.