SRL Archive - OSR Help

Interface in chatbox?


sipfer2

2012-05-15 03:17:32

Hey guys,
I was wondering if there is a function which checks if there is a interface open in the chat box? like when you talk with a npc? Searched for it but couldn't find.

Thanks ;)

Brandon

2012-05-15 04:37:18

There's one called "DoConversation"

If your talking about the interface u get when mixing herbs or doing skills then this will work:

Function SkillingInterface: Boolean;
var
Text: String;
Bool: Boolean;
begin
Text:= GetTextAtExWrap(41, 345, 278, 362, 0, 5, 2, 16777215, 10, 'SmallChars');
Bool:= ExecRegExpr('make', Text) or ExecRegExpr('wish to make', Text) or ExecRegExpr('wish | to | make', Text);

If (Bool) then
begin
MouseBox(207, 398, 314, 460, MOUSE_MOVE);
if (WaitUptextMulti(['ake', 'All', 'ke A'], 600)) then
begin
ClickMouse2(MOUSE_LEFT);
Result:= True;
end;
end;
end;

Function WaitSkillingInterface(TimeToWait: Integer): Boolean;
var
T: integer;
begin
T := (GetSystemTime + TimeToWait);
while (GetSystemTime < t) do
begin
if (SkillingInterface) then
begin
Result:= True;
Break;
end;
Wait(50);
end;
end;

John

2012-05-15 06:11:47

From: Brandon
There's one called "DoConversation"

If your talking about the interface u get when mixing herbs or doing skills then this will work:

Function SkillingInterface: Boolean;
var
Text: String;
Bool: Boolean;
begin
Text:= GetTextAtExWrap(41, 345, 278, 362, 0, 5, 2, 16777215, 10, 'SmallChars');
Bool:= ExecRegExpr('make', Text) or ExecRegExpr('wish to make', Text) or ExecRegExpr('wish | to | make', Text);

If (Bool) then
begin
MouseBox(207, 398, 314, 460, MOUSE_MOVE);
if (WaitUptextMulti(['ake', 'All', 'ke A'], 600)) then
begin
ClickMouse2(MOUSE_LEFT);
Result:= True;
end;
end;
end;

Function WaitSkillingInterface(TimeToWait: Integer): Boolean;
var
T: integer;
begin
T := (GetSystemTime + TimeToWait);
while (GetSystemTime < t) do
begin
if (SkillingInterface) then
begin
Result:= True;
Break;
end;
Wait(50);
end;
end;


I don't think that's what he means. He means when you can use ClickToContinue.

CephaXz

2012-05-15 06:18:42

Should be this one.
function ClickContinue(SpaceBar, DoWait: Boolean): Boolean;               

ClickToContinue finds the blue words "Click to continue", ClickContinue finds the green bar, which always found when talking to NPC.

Or this

function AreTalking(): boolean;

Returns true if player is talking to an NPC.

sipfer2

2012-05-15 12:40:43

thanks guys, i was searching for AreTalking() :) thanks for fast respons :P