Avatar Sharing Script (Offer/Accept)

If you dont know how this script works, just visit Mansion, Welcome or The Avatatr palace and have a friend whisper "offer" to you. You will recieve an offer of his current avatar, then when you say "accept" you will wear those props. The AvShare script allows you to do away with your old dressing room and make your whole palace av friendly ;)

 To Install, put this script in your gate:

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 }

 Then, in every room youd like the script to work in, add this script:
ON OUTCHAT { offerOutScript GLOBAL offerOutScript EXEC }
ON INCHAT { offerInScript GLOBAL offerInScript EXEC }

Thats all there is too it! Enjoy! = )