;Share 2.1 by Hex - http://hex.palaceplanet.net ; This script replaces the original av share (offer/accept) gate section. ; If you had the original share (offer/accept) script installed thruought your palace, ; you will only need to update your gate with the following script. ; This version adds support for sharing URL links, to offer a link say ; "offerurl http://www.apple.com" or "offerurl palace://koko.chatserve.com" etc... ; To accept a link say "accepturl" ON ENTER { offeredAvatar GLOBAL offerInScript GLOBAL offerOutScript GLOBAL offeredURL GLOBAL "" offeredURL = { offeredAvatar GLOBAL offeredURL GLOBAL { "$1" GREPSUB offeredURL = "You have been offered a URL link to $1 by " GREPSUB WHOCHAT WHONAME & ". To visit it say \"accepturl\"." & LOCALMSG } CHATSTR "^;urloffer ([0-9a-zA-Z\./?=%:@]+)" GREPSTR WHOCHAT WHOME <> 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 WHOCHAT WHOME <> AND IF "" CHATSTR = } CHATSTR "^;avoffer [\[] ([0-9<>A-Fa-f -]+) [\]]" GREPSTR IF } offerInScript DEF { offeredAvatar GLOBAL offeredURL GLOBAL { "" CHATSTR = } CHATSTR "^;urloffer" GREPSTR ISWIZARD NOT AND IF { ";urloffer $1" GREPSUB CHATSTR = } CHATSTR LOWERCASE "^offerurl ([0-9a-zA-Z\./?=%:@]+)$" GREPSTR WHOTARGET ISWIZARD OR AND IF { "" CHATSTR = "Error: Invalid Syntax: Try \"offerurl http://www.apple.com\"" LOCALMSG } CHATSTR "^offerurl" GREPSTR IF { { "; Transfering too " offeredURL & "..." & SAY offeredURL NETGOTO } { "You havent been offered a link" LOCALMSG } offeredURL "" == NOT IFELSE "" CHATSTR = } CHATSTR "accepturl" == 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 { "" 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 }