;Alan's Offer/Accept/URL script #2. ;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 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 = "" offeredAvatar = "@" WHOCHAT WHOPOS ITOA SWAP ITOA "," & SWAP & & "You have been offered: $1 by " GREPSUB WHOCHAT WHONAME & ". To activate it say \"accept\"." & LOCALMSG } CHATSTR "^;urloffer (.*)$" GREPSTR WHOCHAT WHOME == NOT AND IF ; { "$1" GREPSUB prps = { "[ " prps & " ] SETPROPS" & offeredAvatar = "" offeredURL = "@" WHOCHAT WHOPOS ITOA SWAP ITOA "," & SWAP & & " You have been offered an avatar by " & WHOCHAT WHONAME & ". To accept it, type \"accept\"." & LOCALMSG } prps ".* .* .* .* .* .* .* .* .* .*" GREPSTR NOT IF "" CHATSTR = } CHATSTR "^;avoffer [\[] ([ 0-9-]+) [\]]" GREPSTR WHOCHAT WHOME == NOT AND IF } offerInScript DEF offerOutScript GLOBAL { offeredAvatar GLOBAL offeredURL GLOBAL { { "$1" GREPSUB addr = { "http://" addr + addr = } addr LOWERCASE "^http://(.*)$" GREPSTR NOT IF ";urloffer " addr & WHOTARGET PRIVATEMSG } { "You must whisper to offer." STATUSMSG } WHOTARGET IFELSE "" CHATSTR = } CHATSTR LOWERCASE "^offerweb (.*)$" GREPSTR IF { { ";urloffer palace://$1" GREPSUB WHOTARGET PRIVATEMSG } { "You must whisper to offer." STATUSMSG } WHOTARGET IFELSE ""CHATSTR = } CHATSTR LOWERCASE "^offerpal (.*)$" GREPSTR IF { { ";urloffer mailto:$1" GREPSUB WHOTARGET PRIVATEMSG } { "You must whisper to offer." STATUSMSG } WHOTARGET IFELSE ""CHATSTR = } CHATSTR LOWERCASE "^offermail (.*)$" GREPSTR 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 } offeredAvatar "" == NOT IF { offeredURL NETGOTO } offeredURL "" == NOT IF "" CHATSTR = } CHATSTR "accept" == 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 }