PDA

View Full Version : Text.



The Legendary
05-13-2015, 03:23 AM
So I'm attempting to make auto replies to noobs or autoer reporter that ask questions while in game.
For example. You're botting smithing and here comes a player. He says "what's your smithing lvl". And the bot should look for lvl then typesend back "70". but script can't seen to get the text in the chatbox right -.-

For Instance
in game chatbox line 8 is "lol nope"
writeln(getchatboxtext(8,clblue));
Script would return 4U4 l$op instead of lol nope like in game.

I want it to be like this so it get the correct text from the game and reply.
if GetChatBoxText(8,clblue) = ('lvl')then reply70;



Do I need to load a specific text file or what to make simba read right?
How is what the in game text look like.
http://i59.tinypic.com/mjbhqv.png

=RSPS botter=

rj
05-13-2015, 03:34 PM
Try this:

function getchat(const line:integer):string;
var
texttpas, textatpa:t2dpointarray;
texttpa:tpointarray;
textcolors:tintegerarray;
i:integer;
begin
textcolors := [128, 16711680, 0, 255, 16711935, 16776960, 16777215, 8388736];
setLength(texttpas, length(textcolors));
for i := 0 to high(textcolors) do
findColors(texttpas[i], textcolors[i], 7, 402 + (line * 14), 495, 413 + (line * 14));
texttpa := mergeAtpa(texttpas);
textatpa := splittpaex(texttpa, 1, 10);
SortATPAFromFirstPointX(textatpa, Point(0, 0));
result := getTextATPA(textatpa, 3, 'smallchars07');
end;

The Legendary
05-13-2015, 10:44 PM
Try this:

function getchat(const line:integer):string;
var
texttpas, textatpa:t2dpointarray;
texttpa:tpointarray;
textcolors:tintegerarray;
i:integer;
begin
textcolors := [128, 16711680, 0, 255, 16711935, 16776960, 16777215, 8388736];
setLength(texttpas, length(textcolors));
for i := 0 to high(textcolors) do
findColors(texttpas[i], textcolors[i], 7, 402 + (line * 14), 495, 413 + (line * 14));
texttpa := mergeAtpa(texttpas);
textatpa := splittpaex(texttpa, 1, 10);
SortATPAFromFirstPointX(textatpa, Point(0, 0));
result := getTextATPA(textatpa, 3, 'smallchars07');
end;

I don't know how to read this -.- you mind give me some description of it?
like what do i need to put anything in textcolor etc?

-I got an out of bounds error when putting this in the loop:
writeln(getchat(8));

rj
05-13-2015, 11:11 PM
I don't know how to read this -.- you mind give me some description of it?
like what do i need to put anything in textcolor etc?

-I got an out of bounds error when putting this in the loop:
writeln(getchat(8));

Wat server is this for

findColors(texttpas[i], textcolors[i], 7, 402 + (line * 14), 495, 413 + (line * 14));

401 is the top x were the chatbox starts, 495 is the top y

The Legendary
05-14-2015, 01:56 AM
Wat server is this for

findColors(texttpas[i], textcolors[i], 7, 402 + (line * 14), 495, 413 + (line * 14));

401 is the top x were the chatbox starts, 495 is the top y
http://i62.tinypic.com/2v0z9m8.png
I can't seen to make it work on it, even after changing those i still got an out of bound error
This is for emps world can be found at https://emps-world.net/index.php

rj
05-14-2015, 02:07 AM
http://i62.tinypic.com/2v0z9m8.png
I can't seen to make it work on it, even after changing those i still got an out of bound error
This is for emps world can be found at https://emps-world.net/index.php

Are you running classic or opengl?

The Legendary
05-14-2015, 02:26 AM
Are you running classic or opengl?

Classic, because simba is blind with opengl mode.
make sure to re-size the client to the smallest size allowed

The Legendary
05-19-2015, 07:03 AM
rj Can you help me with this?
As you can see the first chatline is always correct but not the rest.

http://i57.tinypic.com/fzb31w.jpg
program pm;
{$I SRL/SRL.simba}
function kgetchat(const line:integer):string;
var
texttpas, textatpa:t2dpointarray;
texttpa:tpointarray;
textcolors:tintegerarray;
i:integer;
begin
textcolors := [128, 16711680, 0, 255, 16711935, 16776960, 16777215, 8388736];
setLength(texttpas, length(textcolors));
for i := 0 to high(textcolors) do
findColors(texttpas[i], textcolors[i], 7, 12 + (line * 14), 495, 399 + (line * 14));
texttpa := mergeAtpa(texttpas);
textatpa := splittpaex(texttpa, 1, 10);
SortATPAFromFirstPointX(textatpa, Point(0, 0));
result := getTextATPA(textatpa, 3, 'smallchars07');
end;
Begin
ClearDebug;
SetupSRL;
ActivateClient;
Wait(1000);
writeln(kgetchat(1));
writeln(kgetchat(2));
writeln(kgetchat(3));
writeln(kgetchat(4));
writeln(kgetchat(5));
writeln(kgetchat(6));
writeln(kgetchat(7));
writeln(kgetchat(8));
end.

Debug:


SRL Compiled in 16 msec
Madara: Buying b gloves
MadaTa[BuyV$VoVest
VdV:V$VV9aI 1m
VdV:V$V#9aI 1m
VV:VV9eaaId1msfast boots' lava cape cash
VVVV9aeaId1smfast boots' lava cape cash
V:VV! 9aeaId1smfast boots' lava cape cash
V:VV9eaetIa 1dsmfast boots' lava cape cash
Successfully executed.

EDIT: I still need help with this and I check this topic multiple times a day ;[