SRL Archive - Research & Development Lounge

Fixed SetChat for updated RS


Narcle

2007-11-05 21:55:50

For those of you that need a working SetChat, did a quick fix.
Changed the cords and added assist (5).

procedure SetChat2(state: string; chat: Integer);//Temporary working one till SRL update
var
x, y, mx, my, Color: Integer;
begin
case chat of
1: mx := 145;
2: mx := 199;
3: mx := 316;
4: mx := 261;
5: mx := 373;
else Exit;
end;
my := 492;
case LowerCase(State) of
'on': begin Color := 65280; State :='On'; end;
'off': begin Color := 255; State :='Off'; end;
'hide': begin Color := 16776960; State :='Hide'; end;
'friends': begin Color := 65535; State :='Friends'; end;
else Writeln('State in SetChat does not exist!');
end;
if not FindColor(x, y, Color, mx - 10, my - 10, mx + 10, my + 10) then
begin
Mouse(mx, my, 8, 8, False);
Wait(450 + Random(175));
ChooseOption(State);
end;
end;

BobboHobbo

2007-11-05 22:39:48

Did RS update?

Narcle

2007-11-06 00:58:52

yea they added a "assist" button in the setchat area, wanted a working one real quick so I modified it

JuKKa

2007-11-06 01:02:05

u could have added for the assist button aswell :P

Edit: oh i think i didnt notice u already did xP

Anyways gj.. ill include to my srl ;)

mastaraymond

2007-11-06 10:18:32

This one is wrong and will cause some lil problem! No offence, but in the original SetChat Trade and Friend's got different numbers ;). 1) Public 2) Private 3) Trade 4) Clan, so you better use mine :).

  case chat of
1: mx := 145;
2: mx := 199;
3: mx := 316;
4: mx := 261;
5: mx := 373;
else Exit;
end;

n3ss3s

2007-11-06 10:39:00

Devs fixed I think, because when I used two SetChat(1, 'Hide') and SetChat(3, 'Off') it did those and then set assist to false.

Btw, there is one thing devs need to fix.

Its a little bot-like that even if the chat was on like Hide, it still sets it to Hide again..

EDIT: Your seems to check..

mastaraymond

2007-11-06 10:51:33

From: n3ss3s
Devs fixed I think, because when I used two SetChat(1, 'Hide') and SetChat(3, 'Off') it did those and then set assist to false.

Btw, there is one thing devs need to fix.

Its a little bot-like that even if the chat was on like Hide, it still sets it to Hide again..

EDIT: Your seems to check..

Dude, there is 1 tab added, it might find the colors of the old tab, but it won't work for all since we've got 5 buttons now instead of 4..

Oh please change the coords correctly in your first post ^.^, as stated up :rolleyes:.

Narcle

2007-11-06 11:31:52

Oh I see what I did, fixing. >.>
Thing is, I would count from the left to right anyways. So probably should have them back to what I normally had them, and rename the numbers correctly for next SRL update.

mastaraymond

2007-11-06 11:35:53

From: Narcle
Oh I see what I did, fixing. >.>
Thing is, I would count from the left to right anyways. So probably should have them back to what I normally had them, and rename the numbers correctly for next SRL update.

Its all done because all the script would need fixing for this, but yeah i made this error to in the begin.. But i do get why they done it, although its not really logical.

Narcle

2007-11-06 11:45:28

From: mastaraymond
Its all done because all the script would need fixing for this, but yeah i made this error to in the begin.. But i do get why they done it, although its not really logical.

/shrug
As long as we know how it works. I really wasn't worried about it, since I mainly just use it in my current scripts to turn ALL off.