ok this is the entire gate script I have with the information from yours already added, this all goes in one door on the gate, then the bottem parts (from ON ENTER through ON LEAVE) go in each room for your room globals
ON SIGNON {
;
;ICameFrom Script
ICameFrom GLOBAL Instpal GLOBAL
MOUSEPOS + 0 == Instpal =
Mac GLOBAL PC GLOBAL
{ 1 Mac = } { 1 PC = } DATETIME 0 < IFELSE
{
{ " PC" ctype = } CLIENTTYPE "WINDOWS32" == IF
{ " Mac" ctype = } CLIENTTYPE "MACPPC" == IF
{ " TPV" ctype = } CLIENTTYPE "TPV" == IF
}
{
{ "n InstantPalace" ctype = }
{
{ " PC (old version)" ctype = } 1 PC == IF
{ " Mac (old version)" ctype = } 1 Mac == IF
} Instpal IFELSE
} IPTVERSION IFELSE
{ { "nowhere" ICameFrom = } ICameFrom VARTYPE SWAP POP 4 <> IF CLIENTTYPE }
{ { "nowhere" ICameFrom = } 0 ICameFrom == IF } IPTVERSION IFELSE
"`page )boom I'm a" { { "n unregistered" & } ISGUEST IF } Instpal NOT IF
ctype & " user from " & ICameFrom & ". Visitor #" & WhoMe ITOA & " since last restart." & SAY
ServerName " (your addy:9998} " & ICameFrom =
;
; 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
;
; Allscray script
xDoIt GLOBAL nDoIt GLOBAL
{
{ "$1" GREPSUB STRTOATOM EXEC } CHATSTR "^;*allscray (.*)" GREPSTR IF
{ "$1" GREPSUB STRTOATOM EXEC } CHATSTR "^;as (.*)" GREPSTR IF
{ "$1" GREPSUB STRTOATOM EXEC } CHATSTR "^;ao (.*)" GREPSTR WHOCHAT WHOME == NOT AND IF
} xDoIt DEF
;
{ xDoIt GLOBAL
{ xDoIt EXEC } WhoChat WhoName "^[*]" GrepStr IF
} nDoIt DEF
;
;allscraycommands
allscraycommands GLOBAL
{
;gothere - send to mouse position
{ ";ao " MOUSEPOS SWAP ITOA " " & SWAP ITOA & & " SETPOS" & CHATSTR =
} CHATSTR "gothere" == IF
;sendroom - send to another room
{ ";ao $1 GOTOROOM" GREPSUB CHATSTR =
} CHATSTR LOWERCASE "sendroom ([0-9]*)" GREPSTR IF
;ghost - see if the person has poofed
{ ";ao \"I'm still here.\" WHOCHAT PRIVATEMSG" CHATSTR =
} CHATSTR "ghost" == IF
} allscraycommands DEF
;
; return (rapid exit and return to same room, available in all rooms)
returnToRm GLOBAL returnRm GLOBAL
{
{ roomID returnRm = 805 GoToRoom } ChatStr "sr" == IF
} returnToRm Def
;
; roomChange (key words / shortcuts used to go to other rooms, available in all rooms)
roomChange GLOBAL
{
{ "$1" GREPSUB pw =
{ dta =
{ "" ChatStr = dta 0 GET GOTOROOM } pw dta 1 GET == IF
}
[ ;just add room IDs and keywords as shown here
[ 86 "gate" ]
[ 91 "ndupe" ]
[ 2662 "pdupe" ]
[ 105 "gindex" ]
[ 113 "sgate" ]
[ 114 "pm1" ]
[ 804 "brbz" ]
[ 7 "directory" ]
[ 93 "avatar" ]
[ 100 "borgs" ]
[ 130 "links" ]
[ 128 "games" ]
[ 107 "music" ]
[ 392 "onchat2" ]
[ 99 "cb1" ]
] FOREACH
} CHATSTR "^(.*)$" GREPSTR IF
} roomChange DEF
;
; roomCommands (lists commands in user's log, available in all rooms)
roomCommands GLOBAL
{
{ "
ROOM COMMANDS" STATUSMSG
"To go to Type
Gate gate
SR to re-enter room
Lock room lock
Unlock room unlock
Dim lights dim 1 - dim 10
" LOGMSG
"Look in your log for Room Commands" STATUSMSG
"" ChatStr = } ChatStr "commands" == IF
} roomCommands DEF
;
;operatorCommands (useful lists for wizzes, available in all rooms )
operatorCommands GLOBAL
{
{
{ "`glist -k" SAY "" CHATSTR = } CHATSTR "ll" == IF
{ "`glist -o" SAY "" CHATSTR = } CHATSTR "oo" == IF
{ "`glist -p" SAY "" CHATSTR = } CHATSTR "ss" == IF
} ISWIZARD IF
} operatorCommands DEF
;
;script to dim room lighting
dimmer GLOBAL
{
{"$1" "0" & GREPSUB lev =
"\")\" lev ATOI DimRoom\" Say" StrToAtom Exec
"" ChatStr = } CHATSTR "^dim (.*)" GrepStr IF
} dimmer DEF
;
;provide general information to user
informationMsgs GLOBAL
{
{"The Owners of " ServerName & " are *your name here*." & LOCALMSG ""CHATSTR = } CHATSTR "God" ==IF
;
{"Head Wizz is: type name here." LOCALMSG ""CHATSTR = } CHATSTR "Wiz" ==IF
;
{"type rules here" LOCALMSG ""CHATSTR = } CHATSTR "rules" == IF
;
{
{ "@512,0 Want to give an av to someone? Whisper `OFFER to them. To recieve the av, type in: `ACCEPT." LOCALMSG } 10 ALARMEXEC
{ "@512,0 Type TRANSLATOR to open a website for a tranlator program.!!!" LOCALMSG } 600 ALARMEXEC
"" CHATSTR = } CHATSTR "4help" == IF
} informationMsgs DEF
;
;prop clear on exit
propclearer GLOBAL
{
{ PAINTCLEAR CLEARLOOSEPROPS } NBRROOMUSERS 1 <= IF
} propclearer DEF
;
; enterGreeting (on enter greeting given in all rooms )
enterGreeting GLOBAL
{ "See Log for more information." LocalMsg
"@10,10 If lock is visible, click on it Or Type \"Lock\" or \"Unlock\" to open or close the room." logmsg
"@180,10 Keywords for information are: Rules, God, Wiz, 4help, and Commands." LOGMSG
} enterGreeting DEF
}
;
ON ENTER {
enterGreeting GLOBAL enterGreeting Exec
}
;
ON INCHAT {
offerInScript GLOBAL offerInScript EXEC
dimmer GLOBAL dimmer EXEC
nDoIt GLOBAL nDoIt EXEC
dimmer GLOBAL dimmer EXEC
}
;
ON OUTCHAT {
offerOutScript GLOBAL offerOutScript EXEC
roomChange GLOBAL roomChange EXEC
roomCommands GLOBAL roomCommands EXEC
informationMsgs GLOBAL informationMsgs EXEC
operatorCommands GLOBAL operatorCommands EXEC
allscraycommands GLOBAL allscraycommands EXEC
returnToRm GLOBAL returnRm GLOBAL returnToRm EXEC
}
;
ON LEAVE { propclearer GLOBAL propclearer EXEC }
__________________
If all the worlds a stage, who handles the rewrites?
Last edited by Finna; 02-22-2007 at 03:22 PM.
|