Results 1 to 6 of 6

Thread: Reading text ingame

  1. #1
    Join Date
    Nov 2014
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default Reading text ingame

    Can a bot read text in runescape? For example, if I typed !follow 'battleyou' in game is it possible to make it read the text and do what the command is programmed to do? If so, how can I do that?

  2. #2
    Join Date
    Apr 2015
    Location
    FireFox
    Posts
    528
    Mentioned
    10 Post(s)
    Quoted
    227 Post(s)

    Default

    I don't believe we have the ability to take advantage of such feature as our client simply reflects off the game... All it would see is yellow/blue but not be able to make out the message I believe. Though I might very well be wrong, hopefully you get a 100% answer soon as I am also interested!
    Scripting with ogLib

  3. #3
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Reflection could, in theory, read the text. I'm not sure if there are built-in methods for doing so, though.

    Does Tesseract work for any of the OSRS libraries? If so, Tesseract can read text perfectly.

    Your last option would be the old-school way: bitmap font set. Probably not the best way to do it
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  4. #4
    Join Date
    Nov 2014
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    I dont know how to do any of that, hah:P

  5. #5
    Join Date
    Aug 2007
    Posts
    539
    Mentioned
    20 Post(s)
    Quoted
    266 Post(s)

    Default

    With reflection, just about anything is possible (except getting models and etc ) but, you can get nearby player's overhead text with reflection.

    Simba Code:
    function getPeopleTexts:TStringArray;
    var _players : TReflectPlayerArray;
        i : integer;
    begin
      _players.GetAll;
      for i:=0 to high(_players) do begin
          setLength(result, length(result)+1);
          result[high(result)] := _players[i].GetSpokenText;
      end;
    end;

    That function will return all player's that are loaded their overhead text to a string array. You can use that to find if any of those strings in that array if they contain '!follow' or '!say', etc commands. You can then chop off the command part of the text ('!cmd ') and then find what the argument is. (i know theres a way to chop string's of their text, but im not quite exactly how to do so, you are going to have to ask someone or search it up)

  6. #6
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by ineedbot View Post
    With reflection, just about anything is possible (except getting models and etc ) but, you can get nearby player's overhead text with reflection.

    Simba Code:
    function getPeopleTexts:TStringArray;
    var _players : TReflectPlayerArray;
        i : integer;
    begin
      _players.GetAll;
      for i:=0 to high(_players) do begin
          setLength(result, length(result)+1);
          result[high(result)] := _players[i].GetSpokenText;
      end;
    end;

    That function will return all player's that are loaded their overhead text to a string array. You can use that to find if any of those strings in that array if they contain '!follow' or '!say', etc commands. You can then chop off the command part of the text ('!cmd ') and then find what the argument is. (i know theres a way to chop string's of their text, but im not quite exactly how to do so, you are going to have to ask someone or search it up)
    Janilabo's string handing commands, specifically: after()

    Simba Code:
    function After(s, str: string): string;
    var
      p, strL, sL: Integer;
    begin
      sL := Length(s);
      strL := Length(str);
      if (sL < strL) then
      begin
        p := Pos(s, str);
        if (p > 0) then
          Result := Copy(str, (p + sL), ((1 + strL) - (p + sL)));
      end else
        Result := '';
    end;

    var
      str: string;

    begin
      ClearDebug;
      str := 'What comes after this? After() WORKS!';
      WriteLn(After('this? ', str));
    end.

    So something to the effect of:

    Simba Code:
    commandString := after('!cmd', getPeopleTexts[0]);
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •