SRL Archive - OSR Help

AutoResponder help


aran armath

2010-06-03 18:08:10

I am having trouble getting Simba to recognize the user name of the character logged in and the person who spoke. Any suggestions would be appreciated.

Sex

2010-06-03 18:25:47

For the username of character logged in just use Players[CurrentPlayer].Name. The person who spoke use LastChatter or copying before the : of the line.

aran armath

2010-06-03 18:28:45

LastChatter(Name1);
if (Lowercase(Name1) = Lowercase(Players[CurrentPlayer].Name)) then

^Like that?

Sex

2010-06-03 18:29:52

If you are trying to see if you were the last person to talk, then yes that is correct.

aran armath

2010-06-03 18:35:45

From: Sex
If you are trying to see if you were the last person to talk, then yes that is correct.

Fixed it…. Added and end else…begin…

bbri06

2010-06-03 19:04:26

If it's not working, it is most likely because LastChatter is returning the name followed by a question mark. It does that for me. If that is the case, do this

LastChatter(Name1);
Name2 := GetLetters(Name1);
if (Lowercase(Name2) = Lowercase(Players[CurrentPlayer].Name)) then

aran armath

2010-06-03 19:27:07

From: bbri06
If it's not working, it is most likely because LastChatter is returning the name followed by a question mark. It does that for me. If that is the case, do this

LastChatter(Name1);
Name2 := GetLetters(Name1);
if (Lowercase(Name2) = Lowercase(Players[CurrentPlayer].Name)) then


Think it sometimes does that, but it just worked when I tested it. GetLetters wont work for me since I use numbers in some names, but its a great fix.

Edit. Ill just add it to both.

Tim0suprem0

2010-06-03 23:36:23

From: bbri06
If it's not working, it is most likely because LastChatter is returning the name followed by a question mark. It does that for me. If that is the case, do this

LastChatter(Name1);
Name2 := GetLetters(Name1);
if (Lowercase(Name2) = Lowercase(Players[CurrentPlayer].Name)) then


Wow thanks I have been trying to figure out why LastChatter was randomly messing up! Every time I tested it was without punctuation, so I couldn't figure out what was going wrong.

You da best.