ok don't know if this will help as its part of the gate scripting I use but will gladly share it with you. (also will put in the offer scripting I have)
Quote:
Originally Posted by
; offer/accept script
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
; return (rapid exit and return to same room, available in all rooms)
returnToRm GLOBAL returnRm GLOBAL
{
{ roomID returnRm = 1002 GoToRoom } ChatStr "return" == IF
} returnToRm Def
room globals for these two
ON INCHAT {
offerInScript GLOBAL offerInScript EXEC
}
ON OUTCHAT {
offerOutScript GLOBAL offerOutScript EXEC
returnToRm GLOBAL returnRm GLOBAL returnToRm EXEC
}