Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Password Scripts

Solution ON OUTCHAT {
{ "$1" GREPSUB pw =
{ dta =
{ dta 1 GET GOTOROOM
} pw dta 0 GET == IF
}
[ [ "class1" 104 ]
[ "class2" 117 ]
[ "class3" 118 ]
[ "pinhead" 273 ]
[ "lucknow" 333 ]
] FOREACH
} CHATSTR "^(.*)$" GREPSTR IF
}

OR...................

;Place this script in an access room:
ON ENTER
{
rejected GLOBAL
pwarray GLOBAL
[
;*****enter each room number and password here in form [ 100 "password_for_room_100" ]
[ 147 "password147" ]
[ 148 "password148" ]
;*****end of passwords
] pwarray =
{ "You must enter the password for that room to gain access." LOCALMSG
0 rejected =
} rejected IF
}
ON OUTCHAT
{
pwarray GLOBAL
{ temparray =
{ "" CHATSTR =
"pw" temparray 0 GET ITOA & pw =
pw STRTOATOM EXEC GLOBAL
1 pw STRTOATOM EXEC =
temparray 0 GET GOTOROOM
} CHATSTR temparray 1 GET == IF
} pwarray FOREACH
}


;Place the following script in each password protected room.
ON ENTER
{
rejected GLOBAL
;*****************************************************
;set where to send people if they haven't said the password
86 accessroom =
;*****************************************************
"pw" ROOMID ITOA & pw =
pw STRTOATOM EXEC GLOBAL
{ "You have been given access to this room." LOCALMSG
} { "'page I attempted entry into " ROOMNAME & "." & SAY
1 rejected =
accessroom GOTOROOM
} pw STRTOATOM EXEC
ISWIZARD OR IFELSE
}
 
Was this article helpful? yes / no
Article details
Article ID: 32
Category: Room Scripts
Date added: 04-02-2011 12:43:41
Views: 1052
Rating (Votes): Article rated 5.0/5.0 (1)

 
<< Go back

Powered by Help Desk Software HESK™