Log in

View Full Version : Help getting chat text!pls



Hugolord
04-14-2007, 06:43 AM
how do i get chat text? like the blacktext like if you mine an ore it says ore is mined how i do that? an someone help me pls?

nielsie95
04-14-2007, 07:07 AM
Take a look in the Text include in Scar, but I think it can be done with Inchat or InChatMulti

Hugolord
04-14-2007, 06:08 PM
what do you mean get inchat? i read scar/slr manual but i dont understand it there..

Jason2gs
04-14-2007, 06:35 PM
You gotta learn to understand it, mate.

You're not always going to have someone here to tell you where you should go and what you should do. Nielsie already told you where to look, you gotta take it from there.

omgh4x0rz
04-14-2007, 07:13 PM
function InChat(Text: String): Boolean;
By: WT-Fakawi
Description:
Grabs Last Chat Line and performs checks on occurence of text

Hugolord, this is a pretty simple one, but I'll guide you through it. The first thing you do is read through all the information given to you in the manual.

What type of argument needs to be supplied for the function? If you didn't say string, you're an idiot.

Now, what defines a string? You should know this from doing your first writeln tutorial with Hello World. If you don't, move back three squares and skip your next turn.

Ok, now we know that this function is supposed to look for a string in the chatbox (the name and description tell us that), all you have to do is enter the text you want it to look for.

Since this is a funtion that returns a boolean (true/false), you can use really simple if-then statements


if (InChat('Do you understand now?')) then
writeln('No...');

Hugolord
04-14-2007, 09:14 PM
omfg omgh4x0rz ty so much i understand now tyvm for mini-Tut :p