Jump to content
Wanted

Chat.scar testing

Recommended Posts

I just added some chat box text reading methods, and there's a whole bunch of other stuff too like SetChat etc.

 

I plan to add more specific chat box reading methods but they will all just use the core ones I have so far

 

A complete list of whats current in Chat.scar

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             Official SCAR Include
                                  Runescape 2
                                 Chat Routines
--------------------------------------------------------------------------------
* function GetCurrentChat: Integer;
    By: Wanted
* function GetChatTabBounds(ChatTab: Integer): TBox;
    By: Wanted
* function GetChatStatus(Chat: Integer): Integer;
    By: Wanted
* function SetChat(Chat, State: Integer): Boolean;
    By: Wanted
* function SetChats(Chats, States: TIntegerArray): TBooleanArray;
    By: Wanted
* function FixChat: Boolean;
    By: Wanted
* function GetChatLineBounds(Line: Integer): TBox;
    By: Wanted
* function GetChatTextEx(Line, TextColor: Integer): string;
    By: Wanted
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

Line 0 is the top line, line 7 is the bottom, and line 8 is the very very bottom one with your login name etc..

Link to comment
Share on other sites

Ive been trying for about the last hour to try to get the GetChatTextEx(Line, TextColor: Integer): string; i went all the way back to just a basic code and i keep just getting random ...i...-_ and things like that. heres the script i was running.

program chat;

{$DEFINE RS2}

{$DEFINE SMART}

 

{.include OSI\OSI.scar}

procedure ScriptTerminate;

begin

FreeOSI;

end;

 

var

I: Integer;

s: AnsiString;

begin

SetUpOSI;

I := 0;

Repeat

s := GetChatTextEx(7, 0)

WriteLn(s);

Wait(1000);

Until I > 1

end.

 

Would be a pretty neat thing if i could get it to work, i know its gotta be something im doing wrong. But that would be awesome for detecting where you guy is and what he is doing =p

Link to comment
Share on other sites

Ah some annoying bullshit problem that only exists under rare recreations, tried coming up with viable solutions for some time and couldn't so I just simplified the way it works now it should be good though you'll get big annoying white spaces if the text color you enter doesn't start on the far left but it shouldn't be a problem.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...