SRL Archive - SRL Bugs

SetChat and the letter 'f'


Coh3n

2009-11-26 11:55:53

Recently, FEAR came to me wondering why his SetChat procedures weren't working. So I edited SetChat a bit and made it faster. I also added constants, although SetChat wasn't the problem. The problem was that SCAR wasn't recognizing the ChooseOption letters 'ff', when side by side. In other words, it would never turn the chats 'Off'. Every other option worked fine.

Here is my edited SetChat if you want to take a look:

{ const Chat Constants;
Description: Constants representing the different chats in RS. }
const
chat_Game = 0;
chat_Public = 1;
chat_Private = 2;
chat_Clan = 3;
chat_Trade = 4;
chat_Assist = 5;

procedure SetChat(State: string; Chat: Integer);
var
x, y, mx, Color: Integer;
begin
case chat of
chat_Game: mx := 90;
chat_Public: mx := 145;
chat_Private: mx := 200;
chat_Clan: mx := 260;
chat_Trade: mx := 320;
chat_Assist: mx := 373;

else
begin
srl_Warn('SetChat', 'Chat(' + IntToStr(chat) + ') does not exist.', warn_AllVersions);
Exit;
end;
end;

State := LowerCase(State);
case State of
'on', 'all': Color := 65280;
'off': Color := 255;
'hide': Color := 16776960;
'friends', 'filter': Color := 65535;

else
srl_Warn('SetChat', State + ' does not exist.', warn_AllVersions);
end;

State := Capitalize(State);
if not FindColor(x, y, Color, mx - 10, 486, mx + 10, 503) then
begin
Mouse(mx, 496, 4, 4, False);
WaitOption(Copy(State, 2, Length(State)), 500);
end;
end;
I also tested with a Staff of Air, and it didn't work, but it worked with Amulet of Strength. So it looks like it only happens when a double 'f' comes up.

FEAR

2009-11-26 13:17:25

Lol I thought you said you had some thing to do first. Was this it? :p Thanks for the quick fix :D

Edit: Err Still doesn't work lol

Coh3n

2009-11-26 13:53:24

Yes this was it. :tongue: and this version works better but its not "fixed" unless someone updated the fonts.

Wanted

2009-11-26 14:32:31

I released 4 chat functions a while back aswell as an AmountEx that examined.

If you want to see: http://www.villavu.com/forum/showthread.php?t=48320

Nava2

2009-11-26 15:10:33

That means that the 'f' bitmap may be out..

Coh3n

2009-11-26 16:34:17

From: Nava2
That means that the 'f' bitmap may be out..

Yes, that's why I posted it under 'Bugs'. :tongue:

Nava2

2009-11-26 18:27:07

Can you try using 'f' in a different ChooseOption?

Coh3n

2009-11-26 18:47:01

From: Nava2
Can you try using 'f' in a different ChooseOption?

Sure, know an item off the top of your head that has 'f' in it? :tongue:

Nava2

2009-11-26 18:55:26

Coif, also constants should be used for the state of the chat.

Coh3n

2009-11-26 19:03:04

I tested with an Amulet of Strength, and it worked fine. You're right, I'll add the other constants.

Nava2

2009-11-26 19:09:24

From: Coh3n
I tested with an Amulet of Strength, and it worked fine. You're right, I'll add the other constants.


Where is there an 'f' in amulet of strength..

Coh3n

2009-11-26 19:36:27

From: Nava2
Where is there an 'f' in amulet of strength..

Amulet of strength ;)

Rubix

2009-11-26 21:56:59

From: Nava2
Where is there an 'f' in amulet of strength..


im sorry but this is offtopic, but /facepalm.

Narcle

2009-11-26 22:22:46

From: Rubix
im sorry but this is offtopic, but /facepalm.


/agree lol
That was BAD Nava haha - I'll :duh: for you.


Anyways is there an item for chooseoption that has 2 f's next to each other like "Off." It might be the way its ordered and 2 f's in a row messes it up.

senrath

2009-11-26 22:34:22

You can try daffodils.

Nava2

2009-11-26 22:52:22

Yeah, I went to coh3n's house, and he explained what I did.. I facepalmed then facepalmed again..

The two 'f's might over lap.

Coh3n

2009-11-27 10:08:47

From: senrath
You can try daffodils.

Any idea where those might be?

FEAR

2009-11-27 13:54:01

Any staff will do :p

Coh3n

2009-11-27 14:06:47

From: FEAR
Any staff will do :p

Thanks! :smile:

I tested with Staff of Air, and it didn't work. So I guess it is just when 'ff' comes up, not 'f'.

Nava2

2009-11-27 15:05:26

From: Coh3n
Thanks! :smile:

I tested with Staff of Air, and it didn't work. So I guess it is just when 'ff' comes up, not 'f'.


Well, don't tell freddy.. he'll freak out.

Coh3n

2009-11-27 16:04:57

From: Nava2
Well, don't tell freddy.. he'll freak out.

Well we wouldn't want that, would we?

FEAR

2009-11-28 03:18:16

From: Nava2
Well, don't tell freddy.. he'll freak out.


From: Coh3n
Well we wouldn't want that, would we?


[SPAM] Noooo I neeeeeeeeeed tis pl0x :fiery: [SPAM]

:p

Coh3n

2009-11-28 10:15:49

Lol, I'm sure it will get fixed eventually. To be honest, it's not something that comes up often, so it's not priority. Just be patient, and it'll come. ;)

FEAR

2009-11-28 17:18:46

From: Coh3n
Lol, I'm sure it will get fixed eventually. To be honest, it's not something that comes up often, so it's not priority. Just be patient, and it'll come. ;)


Meh…Guess I have to do without it in my script :)

Or find some other way to set em off :p

Coh3n

2009-11-28 17:20:39

Its not hard at all. I'm sure you can figure it out. ;)

FEAR

2009-11-28 17:32:52

From: Coh3n
Its not hard at all. I'm sure you can figure it out. ;)


:D Well that will come later after I finish the script. Hey Coh3n could you get on msn? Or Google chat w/e you use :p I need to ask you something.

Coh3n

2009-11-28 17:34:35

I'm on my phone right now. I'll be on later, if you don't mind waiting.

FEAR

2009-11-28 17:38:29

From: Coh3n
I'm on my phone right now. I'll be on later, if you don't mind waiting.


I gtg now. I will leave you a offline msg and chat later then :)