This is an excerpt from my .pat file and is an example
of a room bot that I've been playing around with when
I have some spare time. It's pretty basic right now
but it will hopefully start you in the right
direction:
ROOM
ID 96
NAME "New Room 96"
PICT "Clouds.GIF"
PICTURE ID 1 NAME "none.gif" TRANSCOLOR 0 ENDPICTURE
PICTURE ID 2 NAME "thewitch.gif" TRANSCOLOR 0
ENDPICTURE
SPOT
ID 1
DONTMOVEHERE
OUTLINE 417,239 450,256 491,369 430,366
LOC 448,306
PICTS 1,0,0 2,0,0 ENDPICTS
SCRIPT
ON ENTER {
{ 1 ME SETSPOTSTATELOCAL } 100 ALARMEXEC
{ "@423,275 Greetings, " USERNAME " Welcome to my
home. If there is anything you need assistance with
just say help." + + LOCALMSG } 110 ALARMEXEC
{ 0 ME SETSPOTSTATELOCAL } 250 ALARMEXEC
}
ON OUTCHAT {
{ "$1" GREPSUB kw =
{ dta =
{ dta 1 GET EXEC
} kw dta 0 GET == IF
}
;the format to add commands is [ "trigger word" {
;script to be activated } ]
[ [ "help"
{
{ 1 ME SETSPOTSTATELOCAL } 10 ALARMEXEC
"@423,275 My commands are: rules, zap, huggers."
LOCALMSG
{ 0 ME SETSPOTSTATELOCAL } 200 ALARMEXEC
} ]
[ "rules"
{
{ 1 ME SETSPOTSTATELOCAL } 10 ALARMEXEC
"@423,275 The Rules here are in your log."
LOCALMSG
{ LOGMSG } [ "rule 1" "rule 2" "rule 3" ]
FOREACH
{ 0 ME SETSPOTSTATELOCAL } 200 ALARMEXEC
} ]
[ "zap"
{ 1 ME SETSPOTSTATELOCAL
WHOCHAT WHOPOS cy = cx =
255 0 0 PENCOLOR 3 PENSIZE 423 275
cx cy LINE ")NO" SAY
{ PAINTUNDO } 10 ALARMEXEC
"@423,275 !GOTCHA!!" LOCALMSG
{ 0 ME SETSPOTSTATELOCAL } 200 ALARMEXEC
} ]
[ "huggers"
{
1 ME SETSPOTSTATELOCAL
WHOCHAT WHOPOS mx = my =
"xos" s =
s my 83 - mx ADDLOOSEPROP
s my 71 - mx 41 + ADDLOOSEPROP
s my 44 - mx 68 + ADDLOOSEPROP
s my mx 83 + ADDLOOSEPROP
s my 44 + mx 68 + ADDLOOSEPROP
s my 71 + mx 41 + ADDLOOSEPROP
s my 83 + mx ADDLOOSEPROP
s my 71 + mx 41 - ADDLOOSEPROP
s my 44 + mx 68 - ADDLOOSEPROP
s my mx 83 - ADDLOOSEPROP
s my 44 - mx 68 - ADDLOOSEPROP
s my 71 - mx 44 - ADDLOOSEPROP
{ 0 ME SETSPOTSTATELOCAL } 200 ALARMEXEC
"" CHATSTR =
} ]
] FOREACH
} CHATSTR "^(.*)$" GREPSTR IF
}
ENDSCRIPT
ENDSPOT
ENDROOM
The part about being able to get avs from the bot
would be a bit more complicated since the bot won't
have it's own .ipt or .prp. I'll have to play around
with this a bit before I can post anything. I think I
know how to do it but don't want to post anything til
I can test it out.
Hope this helps,
Frodo
--- Pauleine Dean <sexydean1@...> wrote:
>
> Ok the bot that is produced at west pole via their
> room I want to make into
> a room script so that when peeps come in they can
> chat the bot and collect
> av¹s from it as well can this be done?
> Help! This is what I got from that room, and its
> used as a cyborg....smiles
>
> ;;; COPY FROM HERE DOWN ;;;
>
> ; Buddy Bot by Art Fink, 2001
> ; http://bots.artfink.com
>
> ON SIGNON
> {
> ;;; things I'll need to remember ;;;
> {GLOBAL} [ myName ownerName comeHere avArray
> userSaid1 userSaid2 userSaid3
> userSaid4 userSaid5 reply1 reply2 reply3 reply4
> reply5 ownerGreet userGreet
> isBot ] FOREACH
>
> ;;; names, commands, av's ;;;
> "damebot" myName =
> "Alan(p)+" ownerName =
> "here" comeHere =
> [
> [918624812 918624773 918624723 918624704 918624592
> 918624019 952737871
> -1233784404 ]
> [975365788 975365836 975365843 975365799 975365900
> 975365828 975365773 ]
> [961966237 961966292 -1222028109 961966280 961966272
> -1222028257 ]
> [894425242 894424691 894424850 894425195 894425087
> 894424681 ]
> [922380565 919843623 919790240 919843534 919843389
> 919843352 919843152
> 922380430 ]
> ] avArray =
>
> ;;; if I hear these.. ;;;
> "hello" userSaid1 =
> "how are you" userSaid2 =
> "where can i get av's?" userSaid3 =
> "where can i get props?" userSaid4 =
> "ok" userSaid5 =
>
> ;;; ..I'll reply with these ;;;
> "hi there" reply1 =
> "great and you?" reply2 =
> "ooo i can share some with you" reply3 =
> "ooo i can share some with you" reply4 =
> "ok here i go" reply5 =
>
> ;;; greetings I use ;;;
> "hi" userGreet =
> "!" ownerName & ownerGreet =
> 1 isBot =
> }
>
> ON ENTER {
> ;;; Auto-Greet ;;;
> numUsrs GLOBAL
> NBRROOMUSERS numUsrs =
> { 300 ME SETALARM } greet IF
> }
>
> ON INCHAT {
> ;;; Globals ;;;
> {GLOBAL} [ botSays myName ownerName ownerSaid
> comeHere greet avArray
> userSaid1 userSaid2 userSaid3 userSaid4 userSaid5
> reply1 reply2 reply3
> reply4 reply5] FOREACH
>
> ;;; my owner said ;;;
> WHOCHAT WHONAME ownerName == WHOCHAT WHONAME "^[*]"
> GREPSTR OR ownerSaid =
>
> ;;; my name is said ;;;
> CHATSTR myName SUBSTR CHATSTR USERNAME SUBSTR OR
> nameSaid =
>
> ;;; my reply ;;;
> "" botSays =
> {
> ;;; owner commands ;;;
> {
> ;;; go to owner ;;;
> { "ok" botSays = WHOCHAT WHOPOS SETPOS} CHATSTR
> comeHere SUBSTR IF
>
> ;;; turn greet on/off ;;;
> {"ok" botSays = 1 greet = 300 ME SETALARM} CHATSTR
> "greet on" SUBSTR IF
> {":ok" botSays = 0 greet =} CHATSTR "greet off"
> SUBSTR IF
>
> ;;; change avatar ;;;
> { "$1" GREPSUB ATOI 1 - avIndex =
> avArray avIndex GET SETPROPS
> } CHATSTR "av ([0-9]+)" GREPSTR IF
> ;
> } ownerSaid IF
>
> ;;; Chat Replies ;;;
> {reply1 botSays =} CHATSTR userSaid1 SUBSTR IF
> {reply2 botSays =} CHATSTR userSaid2 SUBSTR IF
> {reply3 botSays =} CHATSTR userSaid3 SUBSTR IF
> {reply4 botSays =} CHATSTR userSaid4 SUBSTR IF
> {reply5 botSays =} CHATSTR userSaid5 SUBSTR IF
> } nameSaid WHOCHAT WHOME == NOT AND IF
>
> ;;; say reply / no flood ;;;
> { botSays SAY TICKS 60 + antiFlood = } "" botSays ==
> NOT antiFlood TICKS <
> AND IF
> }
>
> ON ALARM {
> {GLOBAL} [greet numUsrs lastUserin greetMsg
> ownerName ownerGreet userGreet]
> FOREACH
> "" greetmsg =
> ;;; greet new user ;;;
> { NBRROOMUSERS 1 - ROOMUSER WHONAME lastUserin =
> { userGreet " " & lastUserin & greetMsg =
> { ownerGreet SAY }
> { greetMsg SAY } lastuserin ownerName == IFELSE
> } numUsrs NBRROOMUSERS < IF
> NBRROOMUSERS numUsrs =
> 300 ME SETALARM
> } { BREAK } greet IFELSE
> }
>
> ;;; COPY FROM HERE UP ;;;
>
>
=====
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/