Newcomers

This is a forum for newcomers to the Personality Forge. Many questions can be answered by reading the Book of AI and the FAQ under the "My Bots" link in the upper corner.

Posts 3,709 - 3,720 of 8,132
Many questions are answered in the FAQ.


18 years ago #3709
That reminds me, I've been meaning to ask: is there any way of doing partial string match on memories? Sort of simple regex in AIScipt. In particular I'd like Max to respond differently to guests. Any way of doing something like:

<?PF if (mem-nickname) matches "guest*"; ?>

18 years ago #3710
Conceivably <?PF if (mem-nickname) is "guest([1234567890]+)"; ?> might do it, but I wouldn't put money on it.

Hmm. You could always try putting all possible guest names in a plugin (guest1, guest2... guest999) and then <?PF if (mem-nickname) is "(guestpluginname)"; ?>
I still wouldn't put money on it, but I think it would be more likely to work.

18 years ago #3711
Thanks psimagus, it worked. One little problem though. How do I avoid the spellcheck if the name was typed in lowercase? During the debugging, it changed my name from bea to bead. lol

18 years ago #3712
Although this might be a little technical (it's a double iframe), it is possible to determine whether a user is a guest or not, and save it back to a memory.

This way you could respond to a guest with this AIScript:
<?PF if "guest" is "yes"; ?> or <?PF if (mem-guest) exists; ?> (depending on how you set it up)

Unfortunately, this only works with non-flash bots. But if anyone is interested, just IM me.

trevorm: <?PF if (mem-nickname) is "(guestpluginname)"; ?> might actually work for a flash bot. More manual labor, but it could work.

18 years ago #3713
r41334t:
How do I avoid the spellcheck if the name was typed in lowercase?

type raw in the AI Script box, and it will bypass the spell-correction.

trevorm:
<?PF if (mem-nickname) is "(guestpluginname)"; ?> might actually work for a flash bot. More manual labor, but it could work.

If it does work, you can make yourself eternally popular by making it a shared plugin, and saving the need for everyone else to duplicate the labour

18 years ago #3714
Would anyone care to test my robot for me so I can see how far it gets before it stops making sense?

Here is the link:

http://www.personalityforge.com/directchat.php?BotID=41748&MID=41746

Thanks.

18 years ago #3715
I thought I had understood the book of AI in this respect, but something isn't working for me.

I have a keyphrase: "(asl|a/s/l)" which I thought would match either: "asl" or "a/s/l" but it never hits this when I input either. What should I do?

18 years ago #3716
I would try putting "raw" in the AIscript box and see if that fixes it. I've never tried to code for that, so I don't know for sure it will work.

18 years ago #3717
I have a keyphrase: "(asl|a/s/l)" which I thought would match either: "asl" or "a/s/l" but it never hits this when I input either. What should I do?

To catch the backslashes, you'll have to make it a raw mode regex (and possibly escape them with spaces and/or forward slashes.) If (asl|a[/]s[/]l) (re) or (asl|a[ /]s[ /]l) (re) don't work, try adding a slash in the opposite direction before each backslash (still inside the square brackets.) I haven't coded for slashes myself, but this approach works for !?^$+- etc.

18 years ago #3718
Nothing seems to work, but it's obviously the forward slashes, so I'll just leave that out for now. It works fine without Thanks for the advice.

Do I always need to have "raw" in the AI script for those kinds of regular expressions?

18 years ago #3719
I cant get the AI Scroit to work pweez help O.O

18 years ago #3720
Do I always need to have "raw" in the AI script for those kinds of regular expressions?

Yes, usually.


Posts 3,709 - 3,720 of 8,132

» More new posts: Doghead's Cosmic Bar