ON ENTER
{
offeredAvatar GLOBAL
offerInScript GLOBAL
offerOutScript GLOBAL
{
offeredAvatar GLOBAL prps GLOBAL
{
"$1" GREPSUB prps =
{
"[ " prps & " ] SETPROPS" & offeredAvatar
=
"@" WHOCHAT WHOPOS ITOA SWAP ITOA "," &
SWAP & &
" You have been offered an avatar by " & WHOCHAT
WHONAME &
". To accept it, type \"accept\"." &
LOCALMSG
} prps ".* .* .* .* .* .* .* .* .* .*" GREPSTR NOT
prps "-$" GREPSTR
NOT AND
prps "- " GREPSTR NOT AND prps ">$" GREPSTR
NOT AND prps "> " GREPSTR
NOT AND
prps "<$" GREPSTR NOT AND prps "< "
GREPSTR NOT AND WHOCHAT WHOME <> AND IF
"" CHATSTR =
} CHATSTR "^;avoffer [\[] ([0-9<>A-Fa-f -]+) [\]]"
GREPSTR IF
} offerInScript DEF
{
offeredAvatar GLOBAL
{
{
{
0 i = ";avoffer [ "
{
i USERPROP ITOA & " " & i ++
} { i NBRUSERPROPS < } WHILE "]" & WHOTARGET
PRIVATEMSG
} NBRUSERPROPS IF
}
{
"You have to whisper the offer." STATUSMSG
} WHOTARGET IFELSE
"" CHATSTR =
} CHATSTR "offer" == IF
{
"" CHATSTR = offeredAvatar STRTOATOM EXEC
} "accept" CHATSTR == "\"accept\""
CHATSTR == OR offeredAvatar "" <> AND IF
{
"" CHATSTR =
} CHATSTR "^;avoffer" GREPSTR IF
} offerOutScript DEF
}
ON OUTCHAT { offerOutScript GLOBAL offerOutScript EXEC
}
ON INCHAT { offerInScript GLOBAL offerInScript EXEC }
|