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,710 - 3,721 of 8,132
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.
Do I always need to have "raw" in the AI script for those kinds of regular expressions?
Yes, usually.
I cant get the AI Scroit to work pweez help
What are you trying to do with it?
Posts 3,710 - 3,721 of 8,132
Many questions are answered in the FAQ.
psimagus
18 years ago
18 years ago
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.
Hmm. You could always try putting all possible guest names in a plugin (guest1, guest2... guest999) and then
I still wouldn't put money on it, but I think it would be more likely to work.
r41334t
18 years ago
18 years ago
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
alc003
18 years ago
18 years ago
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.
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.
psimagus
18 years ago
18 years ago
r41334t:
How do I avoid the spellcheck if the name was typed in lowercase?
typeraw 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
type
trevorm:
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

KrishnaDan
18 years ago
18 years ago
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.
Here is the link:
http://www.personalityforge.com/directchat.php?BotID=41748&MID=41746
Thanks.
gautoo
18 years ago
18 years ago
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?
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?
Ulrike
18 years ago
18 years ago
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.
psimagus
18 years ago
18 years ago
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
gautoo
18 years ago
18 years ago
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?

Do I always need to have "raw" in the AI script for those kinds of regular expressions?
psimagus
18 years ago
18 years ago
Yes, usually.
psimagus
18 years ago
18 years ago
What are you trying to do with it?
» More new posts: Doghead's Cosmic Bar