;Alan's Offer/Accept/URL script. ;Modified from a script by an unknown author ;Offerer whispers "offer" to offer an avatar or "offerweb
" or "offerpal ". ;Recipient answers "accept" to accept the av or "accepturl" to accept the address. ;Place the following script at your gate. Place the last portion in every room where you ;want this functionality. ON SIGNON { offeredAvatar GLOBAL "" offeredAvatar = offeredURL GLOBAL "" offeredURL = ; offerInScript GLOBAL { offeredAvatar GLOBAL offeredURL GLOBAL { "$1" GREPSUB offeredURL = "You have been offered: $1 by " GREPSUB WHOCHAT WHONAME & ". To activate it say \"accepturl\"." & LOCALMSG } CHATSTR "^;urloffer ([0-9a-zA-Z\./?=%:@~]+)" GREPSTR WHOCHAT WHOME == NOT AND IF ; { "$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 IF "" CHATSTR = } CHATSTR "^;avoffer [\[] ([0-9<>A-Fa-f -]+) [\]]" GREPSTR WHOCHAT WHOME == NOT AND IF } offerInScript DEF offerOutScript GLOBAL { offeredAvatar GLOBAL offeredURL GLOBAL { { ";urloffer http://$1" GREPSUB WHOTARGET PRIVATEMSG } { "You must whisper to offer." STATUSMSG } WHOTARGET IFELSE "" CHATSTR = } CHATSTR LOWERCASE "^offerweb ([0-9a-zA-Z\./?=%:@~]+)$" GREPSTR IF { { ";urloffer palace://$1" GREPSUB WHOTARGET PRIVATEMSG } { "You must whisper to offer." STATUSMSG } WHOTARGET IFELSE ""CHATSTR = } CHATSTR LOWERCASE "^offerpal ([0-9a-zA-Z\./?=%:@~]+)$" GREPSTR IF { { ";urloffer mailto:$1" GREPSUB WHOTARGET PRIVATEMSG } { "You must whisper to offer." STATUSMSG } WHOTARGET IFELSE ""CHATSTR = } CHATSTR LOWERCASE "^offermail ([0-9a-zA-Z\./?=%:@~]+)$" GREPSTR IF { offeredURL NETGOTO "" CHATSTR = } CHATSTR "accepturl" == offeredURL "" == NOT AND IF { { { 0 i = ";avoffer [ " { i USERPROP ITOA & " " & i ++ } { i NBRUSERPROPS < } WHILE "]" & WHOTARGET PRIVATEMSG } NBRUSERPROPS IF } { "You must whisper to offer." STATUSMSG } WHOTARGET IFELSE "" CHATSTR = } CHATSTR "offer" == IF ; { offeredAvatar STRTOATOM EXEC "" CHATSTR = } "accept" CHATSTR == offeredAvatar "" == NOT AND IF ;Dont let anybody say the automated commands { "" CHATSTR = } CHATSTR "^;avoffer" GREPSTR IF { "" CHATSTR = } CHATSTR "^;urloffer" GREPSTR IF } offerOutScript DEF } ;The following is part of the this gate script. ;In addition, place the following section, only, in rooms where you want this function. ON INCHAT { offerInScript GLOBAL offerInScript EXEC } ON OUTCHAT { offerOutScript GLOBAL offerOutScript EXEC }