Imperial Palaces

Reply
 
Thread Tools Display Modes
  #1  
Old 08-24-2009, 04:52 AM
Luna Luna is offline
Junior Member
 
Join Date: Aug 2009
Posts: 4
Trivia Game script
Ok, So, this is a script I did a while back for a HP palace.
Thanks to Brian for helping me test it.
OK so here's a small legend:
Black - Just code, no need to change it if you don't feel lik eit.
Red - Variabled, you can leave them as they are if you're unsire how to modify them
Green - Variable Values
Blue - Text, you can freely edit that.
Purple - chat commands
Originally Posted by Script
ON OUTCHAT {
{GLOBAL} [gr rv sl hu gr_door sl_door rv_door hu_door h0st] FOREACH
1 gr_door =
2 sl_door =
3 rv_door =
4 hu_door =
{
{
{
"" CHATSTR =
{
"^Gryffindor wins!" SAY "You can't add any more points to that house." STATUSMSG
} {
gr ++
gr gr_door SETSPOTSTATE
}10 gr_door GETSPOTSTATE == IFELSE
} CHATSTR "gr" == IF
{
"" CHATSTR =
{
"^Slytherin wins!" SAY "You can't add any more points to that house." STATUSMSG
} {
sl ++
sl sl_door SETSPOTSTATE
}10 sl_door GETSPOTSTATE == IFELSE
} CHATSTR "sl" == IF
{
"" CHATSTR =
{
"^Ravenclaw wins!" SAY "You can't add any more points to that house." STATUSMSG
} {
rv ++
rv rv_door SETSPOTSTATE
}10 rv_door GETSPOTSTATE == IFELSE
} CHATSTR "rv" == IF
{
"" CHATSTR =
{
"^Hufflepuff wins!" SAY "You can't add any more points to that house." STATUSMSG
} {
hu ++
hu hu_door SETSPOTSTATE
}9 hu_door GETSPOTSTATE == IFELSE
} CHATSTR "hu" == IF
{
"" CHATSTR=
0 hu =
0 gr =
0 rv =
0 sl =
0 gr_door SETSPOTSTATE
0 sl_door SETSPOTSTATE
0 rv_door SETSPOTSTATE
0 hu_door SETSPOTSTATE
0 h0st =
"All points reset." STATUSMSG
} CHATSTR "reset" == IF

{
""CHATSTR=
{
"You can't substract any more points from that house." STATUSMSG
} {
hu --
hu hu_door SETSPOTSTATE
}0 hu_door GETSPOTSTATE == IFELSE
}CHATSTR "-hu" == IF

{
""CHATSTR=
{
"You can't substract any more points from that house." STATUSMSG
} {
gr --
gr gr_door SETSPOTSTATE
}0 gr_door GETSPOTSTATE == IFELSE
}CHATSTR "-gr" == IF

{
""CHATSTR=
{
"You can't substract any more points from that house." STATUSMSG
} {
rv --
rv rv_door SETSPOTSTATE
}0 rv_door GETSPOTSTATE == IFELSE
}CHATSTR "-rv" == IF

{
""CHATSTR=
{
"You can't substract any more points from that house." STATUSMSG
} {
sl --
sl sl_door SETSPOTSTATE
}0 sl_door GETSPOTSTATE == IFELSE
}CHATSTR "-sl" == IF
}
{ "You're not the host bby" STATUSMSG } USERNAME h0st == IFELSE

{
""CHATSTR=
{LOGMSG} [
" " " "
"h0st* -password to turn on Host commands"
"help -Shows this message"
"=====Host Commands====="
"hu -adds one point to Hufflepuff"
"-hu -removes one point from Huffelpuff"
"gr -adds one point to Gryffindor"
"-gr -removes one point from Gryffindor"
"rv -adds one point to Ravenclaw"
"-rv -removes one point from Ravenclaw"
"sl -adds one point to Slytherin"
"-sl -removes one point from Slytherin"
"resets -Resets all housepoints to 0 and turns host status off."
] FOREACH
} CHATSTR "help" == IF

{
"" CHATSTR =
USERNAME h0st =
WHOCHAT WHONAME " is the Host!" & ROOMMSG
} CHATSTR "h0st*" == IF

} ISWIZARD IF
}
ON ENTER {
{GLOBAL} [gr rv sl hu gr_door sl_door rv_door hu_door h0st] FOREACH
{
"Wiz:Say \"help\" to see a list fo available commands" LOCALMSG
}ISWIZARD IF
{
0 hu =
0 gr =
0 rv =
0 sl =
0 gr_door SETSPOTSTATE
0 sl_door SETSPOTSTATE
0 rv_door SETSPOTSTATE
0 hu_door SETSPOTSTATE
0 h0st =
}NBRROOMUSERS 2 < IF
\x22\x4c\x75\x6e\x61\x27\x73\x20\x74\x72\x69\x76\x 69\x61\x20\x73\x63\x72\x69\x70\x74\x22\x20\x53\x54 \x41\x54\x55\x53\x4d\x53\x47
}
NOTE: I didn't want to use the original script because i didn't ask for the owners permission and I didn't feel like re-writing it all so I made a few scripts that generate this content, so if there are some bugs, let me know. Also the original script was a little more synthaxed and more practical than this one, but oh well, you will have to do the same thing over and over again, but it's good for practicing ipt a little. :)
Reply With Quote
  #2  
Old 03-08-2010, 11:38 PM
Arwym Arwym is offline
Junior Member
 
Join Date: Sep 2009
Location: Puerto Rico
Posts: 9
As I am reading it, I think it's pretty good and easy to modify. The only part I do not get is the

Code:
\x22\x4c\x75\x6e\x61\x27\x73\x20\x74\x72\x69\x76\x 69\x61\x20\x73\x63\x72\x69\x70\x74\x22\x20\x53\x54 \x41\x54\x55\x53\x4d\x53\x47
at the end. I'll look it up myself, though.

Thanks for a valuable script! I will definitely try it when my Palace opens.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:35 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.