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?
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?
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
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
I dont know how to do any of that, hah:P
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
There are currently 1 users browsing this thread. (0 members and 1 guests)