Go Back   The Palace Avatar Chat Community Forums. > Palace Builders Palace Users > User Questions

User Questions
The spot for asking your Palace Client and Palace Server Questions.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-23-2004, 02:45 AM
Palace User
 
Join Date: Mar 2003
Posts: 9
Rep Power: 0
ShellGirl63 is on a distinguished road
Need to add locks for my Yahtzee rooms

Hi; can someone please help me figure out how add door locks to the old Kahlua Yahtzee rooms that didn't have a door lock; as well as the Yahtzee 6 rooms that don't have a door lock? My guests complain that all the rooms don't have locks; sometimes they want them for privacy and sometimes for stopping music; but seems like there are getting to be several Yahtzee scripts out there now and not all have locks and I'm just afraid to attempt to put them in on my own.
Thank you in advance
Reply With Quote
  #2 (permalink)  
Old 05-23-2004, 11:51 AM
maarten's Avatar
Palace Planet Founder
 
Join Date: Oct 2002
Location: DiGiLaNd
Posts: 1,170
Rep Power: 10
maarten is on a distinguished road
Lockable doors are pretty simple once you know how:

First set the room to Private.

Make a door with the same ID number as your room.
(If your room ID is 100, the door should be 100 as well)

Set the door type to "Lockable door"

Make sure it leads to somewhere like your gate or Game room.

-Now you make a second door with Type "Deadbolt"
This is the door where you add our lock and unlock pictures in so make sure you set it also to "don't move here"

The key here is to point the doordestination to the room the door is in. So if your in Yahtzee 6 make sure the deadbolt door destination is set to Yahtzee 6.

This should do the trick, I'm pretty sure you don't need any but I have uploaded the door lock and unlock pics I made for my own Palace. You can find them in the Gallery / donated roomart
__________________
Please don't ask me for help in private, use the USER QUESTIONS forum if you need help.
Reply With Quote
  #3 (permalink)  
Old 05-23-2004, 09:56 PM
Palace User
 
Join Date: Mar 2003
Posts: 9
Rep Power: 0
ShellGirl63 is on a distinguished road
Thank you for your response, Maarten. I can get the concept into my brain; but getting it into the room; of course; does not work because it crashes the palace and knocks me out. Therefore; trying to add this into the .pat file is next to impossible. WHERE in that room in the .pat file would it go? I actually got it into one room; and instead of the lock and unlock pics, it turned into balls and X's; which of course I can't open in the room to change to unl.gif because the room is too full and it bounces me out again and i crash. The .pat file changes unl.gif into things like PICS 12,0,0 and 13,0,0 and now the rooms are getting quite messed up. There's now outlines and Locations that i have no clue about. Is this just too hard to get one script to add in a lock; and just change the ID and Dest ID for each room? this is basically what i've tried and although the concept works; it just blows me right out and the pictures are all wrong. Where in each room in the .pat file does this stuff go? can it go at the end of that particular rooms scripts? or do i need to put it somewhere into the middle of the script after doors and before yahtzee scripts?

DOOR
LOCKABLE
ID 4247
DONTMOVEHERE
DEST 4247
OUTLINE 466,165 493,165 493,183 466,183
LOC 480,174
PICTS
12,0,0
13,0,0
ENDPICTS
SCRIPT
ON SELECT {
{ ME UNLOCK }
{ ME LOCK }
ME GETSPOTSTATE IFELSE
ENDSCRIPT
ENDDOOR
Reply With Quote
  #4 (permalink)  
Old 05-23-2004, 10:48 PM
maarten's Avatar
Palace Planet Founder
 
Join Date: Oct 2002
Location: DiGiLaNd
Posts: 1,170
Rep Power: 10
maarten is on a distinguished road
Hey

Your room probly has to many spots and you should not try to author them with the client it might corrupt the room.

An easy solution for this is the following:

Make a new room, add the yahtzee background, this will give you a good idea where to put the lock door spots.

Then copy this info from your Pat file to the yahtzee room.

As for the pictures this is actually simpler then you might think: In the room description there is a list of pictures used in your room with a number. This is the number that is used in spot pics and correspondes with the number from this list.

It usually looks something like this:

PICTURE ID 4 NAME "unl.gif" TRANSCOLOR 0 ENDPICTURE

Picture ID 4 is the number of the picture that will match the PICTS you used in your door.

TRANSCOLOR 0 means your gif is transparent.

Just try this and see what happens in another copy of your yahtzee room.

'duplicate your existing working yahtzee room and add the info from the new room to it and see what happens. Don't use the original unless your sure you got a good backup :)

Good luck!
__________________
Please don't ask me for help in private, use the USER QUESTIONS forum if you need help.
Reply With Quote
  #5 (permalink)  
Old 05-24-2004, 12:40 AM
Palace User
 
Join Date: Mar 2003
Posts: 9
Rep Power: 0
ShellGirl63 is on a distinguished road
Sorry; i have even less of a clue what any of this means now.
I have 33 yahtzee rooms; and all i wanted to do was add a lock to them. Now I'm supposed to copy all my rooms to get "door lock spots"? I don't even know what that is. I take the yahtzee scripts I've had over the years from Kahlua and Script Barn and all the other places I've collected them; and now can't just modify my .pat file to add a lock? I've had several palaces for almost 2 years; and currently have 575 rooms. Its not a fancy palace; its just basic fun scripts and pretty rooms and now....these dreaded yahtzee's that i can't lock.
I'm sorry; can someone please explain this in a more simpler way for me to understand; thats not a lot of codes? I can copy things just fine; but I'm not a programmer. For example; the Yahtzee 6 rooms from Script Barn; has anyone added a lock to these that they can share the script with me?
Reply With Quote
  #6 (permalink)  
Old 05-24-2004, 01:59 PM
maarten's Avatar
Palace Planet Founder
 
Join Date: Oct 2002
Location: DiGiLaNd
Posts: 1,170
Rep Power: 10
maarten is on a distinguished road
Hey hi,

Sorry to confuse you like this but it was just a simple explenation about how to combine room info in a safe way. Perhaps later when your more used to editing the Pserver.pat file you might take a look at this again.


Ok I've pretty much done what was described in the previous post: made a new room, edited the door lock in the place I wanted it to be and then copied this information from one room into the Yahtzee 6 room.

Here is the end result you can use in your Palace:

Code:
ROOM
	ID 269
	PRIVATE
	NAME "Yahtzee 6 Corral"
	PICT "yahcorral.gif"
	PICTURE ID 1 NAME "onept.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 2 NAME "dicecor1.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 3 NAME "dicecor2.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 4 NAME "dicecor3.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 5 NAME "dicecor4.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 6 NAME "dicecor5.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 7 NAME "dicecor6.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 8 NAME "yholdwood.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 9 NAME "1markgold.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 10 NAME "2markgold.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 11 NAME "3markgold.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 12 NAME "3xmarkgold.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 13 NAME "badgelights.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 14 NAME "dicecr1.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 15 NAME "dicecr2.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 16 NAME "dicecr3.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 21 NAME "lock1.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 22 NAME "lock2.gif" TRANSCOLOR 0 ENDPICTURE
	BOLT
		ID 1270
		DONTMOVEHERE
		DEST 270
		OUTLINE 475,196  506,196  506,229  475,229
		LOC 492,212
		SCRIPT
		ENDSCRIPT
		ENDBOLT
	DOOR
		LOCKABLE
		ID 270
		OUTLINE 3,197  42,197  11,224  3,230
		LOC 491,213
		PICTS 21,0,0 22,0,0 ENDPICTS
		SCRIPT
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 1
		OUTLINE 25,150  55,150  55,177  25,177
		LOC 40,162
		PICTS 1,0,0 2,0,0 3,0,0 4,0,0 5,0,0 6,0,0 7,0,0 14,0,0 15,0,0 16,0,0 ENDPICTS
		ENDSPOT
	SPOT
		ID 2
		OUTLINE 66,149  96,149  96,176  66,176
		LOC 81,161
		PICTS 1,0,0 2,0,0 3,0,0 4,0,0 5,0,0 6,0,0 7,0,0 14,0,0 15,0,0 16,0,0 ENDPICTS
		ENDSPOT
	SPOT
		ID 3
		OUTLINE 107,150  137,150  137,177  107,177
		LOC 122,162
		PICTS 1,0,0 2,0,0 3,0,0 4,0,0 5,0,0 6,0,0 7,0,0 14,0,0 15,0,0 16,0,0 ENDPICTS
		ENDSPOT
	SPOT
		ID 4
		OUTLINE 149,150  179,150  179,177  149,177
		LOC 164,162
		PICTS 1,0,0 2,0,0 3,0,0 4,0,0 5,0,0 6,0,0 7,0,0 14,0,0 15,0,0 16,0,0 ENDPICTS
		ENDSPOT
	SPOT
		ID 5
		OUTLINE 190,149  220,149  220,176  190,176
		LOC 205,161
		PICTS 1,0,0 2,0,0 3,0,0 4,0,0 5,0,0 6,0,0 7,0,0 14,0,0 15,0,0 16,0,0 ENDPICTS
		ENDSPOT
	SPOT
		ID 6
		OUTLINE 230,149  260,149  260,176  230,176
		LOC 246,161
		PICTS 1,0,0 2,0,0 3,0,0 4,0,0 5,0,0 6,0,0 7,0,0 14,0,0 15,0,0 16,0,0 ENDPICTS
		ENDSPOT
	SPOT
		ID 13
		DONTMOVEHERE
		OUTLINE 116,24  170,24  170,40  116,40
		LOC 156,33
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 0 GET crv = ME co =
"@167,34 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 14
		DONTMOVEHERE
		OUTLINE 116,41  170,41  170,56  116,56
		LOC 156,49
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 1 GET 2 * crv = ME co =
"@167,51 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 15
		DONTMOVEHERE
		OUTLINE 116,57  170,57  170,73  116,73
		LOC 156,66
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 2 GET 3 * crv = ME co =
"@167,66 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 16
		DONTMOVEHERE
		OUTLINE 116,74  170,74  170,90  116,90
		LOC 156,83
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 3 GET 4 * crv = ME co =
"@167,84 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 17
		DONTMOVEHERE
		OUTLINE 116,91  170,91  170,107  116,107
		LOC 156,100
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 4 GET 5 * crv = ME co =
"@167,100 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 18
		DONTMOVEHERE
		OUTLINE 116,108  170,108  170,123  116,123
		LOC 156,116
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 5 GET 6 * crv = ME co =
"@167,117 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 19
		DONTMOVEHERE
		OUTLINE 311,7  366,7  366,22  311,22
		LOC 343,16
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "[3456]" GREPSTR dt * crv =
 ME co =
"@343,18 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 20
		DONTMOVEHERE
		OUTLINE 311,23  366,23  366,40  311,40
		LOC 343,32
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "[456]" GREPSTR dt * crv =
 ME co =
"@343,33 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 21
		DONTMOVEHERE
		OUTLINE 311,41  366,41  366,56  311,56
		LOC 343,49
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "[56]" GREPSTR dt * crv =
 ME co =
"@343,51 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 22
		DONTMOVEHERE
		OUTLINE 311,57  366,57  366,72  311,72
		LOC 343,65
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "3.*3" GREPSTR 35 *  crv =
 ME co =
"@343,67 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 23
		DONTMOVEHERE
		OUTLINE 311,73  366,73  366,88  311,88
		LOC 343,81
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "4" SUBSTR dd "2" SUBSTR AND 35 *  crv =
 ME co =
"@343,82 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 24
		DONTMOVEHERE
		OUTLINE 311,106  366,106  366,121  311,121
		LOC 343,114
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dt crv = ME co =
"@343,117 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 25
		DONTMOVEHERE
		OUTLINE 465,25  509,25  509,40  465,40
		LOC 500,32
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd " [123] [123] [123] [123] " GREPSTR 25 *  crv =
 ME co =
"@500,32 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 26
		DONTMOVEHERE
		OUTLINE 465,41  509,41  509,57  465,57
		LOC 500,49
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd " [12] [12] [12] [12] [12] " GREPSTR 40 *  crv =
 ME co =
"@500,49 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 27
		DONTMOVEHERE
		OUTLINE 465,58  509,58  509,74  465,74
		LOC 500,66
		PICTS 1,0,0 9,0,0 ENDPICTS
		SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd " 1 1 1 1 1 1 " GREPSTR 50 *  crv =
 ME co =
"@500,66 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 28
		DONTMOVEHERE
		OUTLINE 311,89  366,89  366,105  311,105
		LOC 343,97
		PICTS 1,0,0 9,0,0 10,0,0 11,0,0 12,0,0 12,0,0 12,0,0 12,0,0 12,0,0 12,0,0 12,0,0 12,0,0 12,0,0 12,0,0 12,0,0 12,0,0 ENDPICTS
		SCRIPT
ON SELECT { yhtz GLOBAL co GLOBAL dd GLOBAL myturn GLOBAL
crv GLOBAL mysc GLOBAL btt GLOBAL
{ dd "6" SUBSTR yts =
   { 
    { "Sorry, you zeroed out your Yahtzee-6 line earlier- you are ineligible for a bonus." LOCALMSG
    } yts yhtz 0 < AND IF
    { ")applause " USERNAME " collects a Yahtzee-6 bonus!" & & ROOMMSG
      "@511,0 Joker rules-- you get to score it on a regular line as well!" LOCALMSG
       200 mysc += ME GETSPOTSTATE 1 + ME SETSPOTSTATE
      1 btt = yhtz ++
    } yts yhtz 0 > AND btt NOT AND IF
   }
   { ;yahtzee for the first time, -1 if yts is 0, 1 if yts is 1
     yts 100 * crv = ME co =
     "@343,101 This will score you a " crv ITOA & LOCALMSG
     { "!WARNING: zeroing out this box makes you ineligible for Yahtzee-6 bonuses!" LOCALMSG
     } crv NOT IF    
   } yhtz IFELSE
} myturn IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 29
		DONTMOVEHERE
		OUTLINE 454,77  483,77  483,101  454,101
		LOC 491,91
		PICTS 1,0,0 9,9,0 ENDPICTS
		SCRIPT
ON SELECT { ut GLOBAL myturn GLOBAL
{
 { "@491,91 You need " 80 ut - ITOA & " more points to get the upper table bonus" & LOCALMSG }
 { "@491,91 You already have the upper table bonus!" LOCALMSG
 } ME GETSPOTSTATE NOT IFELSE
} myturn IF
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 12
		DONTMOVEHERE
		OUTLINE 232,140  266,140  266,184  232,184
		LOC 245,162
		PICTS 1,0,0 8,0,0 ENDPICTS
		SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 11
		DONTMOVEHERE
		OUTLINE 184,140  231,140  231,184  184,184
		LOC 205,162
		PICTS 1,0,0 8,0,0 ENDPICTS
		SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 10
		DONTMOVEHERE
		OUTLINE 141,140  184,140  184,184  141,184
		LOC 164,162
		PICTS 1,0,0 8,0,0 ENDPICTS
		SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 9
		DONTMOVEHERE
		OUTLINE 99,140  141,140  141,184  99,184
		LOC 122,162
		PICTS 1,0,0 8,0,0 ENDPICTS
		SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 8
		DONTMOVEHERE
		OUTLINE 58,140  99,140  99,184  58,184
		LOC 81,162
		PICTS 1,0,0 8,0,0 ENDPICTS
		SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 7
		DONTMOVEHERE
		OUTLINE 17,140  58,140  58,184  17,184
		LOC 40,162
		PICTS 1,0,0 8,0,0 ENDPICTS
		SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 31
		NAME "Start Game"
		DONTMOVEHERE
		LOC 459,27
		SCRIPT
ON ENTER { { "A game of yahtzee is currently being played- click play to join!" LOCALMSG } ME GETSPOTSTATE WHONAME "." GREPSTR IF 
{ 0 ME SETSPOTSTATE } ME GETSPOTSTATE WHOME == IF
{ POSX 160 RANDOM 224 + SETPOS } POSY 225 < IF
ad GLOBAL "" ad = 
"Script by Foxy, ?2003 Graphics by Tybalt & Speck ?2003" STATUSMSG
"For free distribution only!" LOGMSG
{ DUP GLOBAL 0 SWAP =
} [ ref rollt crv mysc ut yhtz plyrs ckbxs myturn co lastroll] FOREACH
al27 GLOBAL
{ dt GLOBAL dd GLOBAL lastroll GLOBAL
  { { EXEC SETSPOTSTATE
    } lastroll STRTOATOM EXEC FOREACH
  } lastroll 0 != IF
    0 dt = [ 0 0 0 0 0 0 ] dd =
   "[ " lastroll =
 { dc = dc 6 + GETSPOTSTATE lck = 
  { 6 RANDOM 1 + dv = dv dc SETSPOTSTATE }
  { dc GETSPOTSTATE dv = } lck NOT IFELSE
  dv dt += dd dv 1 - GET 1 + dd dv 1 - PUT
  lastroll "{" + dv ITOA + " " + dc ITOA + " }" + lastroll =
 } [ 1 2 3 4 5 6 ] FOREACH
"[ " { ITOA + " " + } dd FOREACH
" ]" & dd =
lastroll "]" + lastroll =
{ "@105,268 )applause !YAHTZEE-6!!" ROOMMSG
} dd "6" SUBSTR IF
} al27 DEF
 al26 GLOBAL
{ rollt GLOBAL dd GLOBAL dt GLOBAL
crv GLOBAL 0 crv = co GLOBAL 0 co =
{ ")dice2" SAY } rollt 6 == IF
{ 0 cr = rollt --
 { cr ++
  { 7 rollt cr + DUP 3 / 3 * - + cr SETSPOTSTATE 
  } cr 6 + GETSPOTSTATE NOT IF
 } { cr 6 < } WHILE
 al26 GLOBAL al26 30 ALARMEXEC
}
{ al27 GLOBAL al27 EXEC
} rollt IFELSE
} al26 DEF
al24 GLOBAL
{ plyrs GLOBAL hsc GLOBAL phsc GLOBAL ref GLOBAL
{  { "@0,100 !Game over!" ROOMMSG
   { "@100,100 ..and our winner is: " ROOMMSG
    "@160,160 )applause !" phsc & "!!" & ROOMMSG
   } hsc IF
   0 ref = 1 sp =
 { 0 sp SETSPOTSTATE sp ++ } { sp 33 < } WHILE
{ ";?5" SAY } 60 ALARMEXEC
  } plyrs "." GREPSTR NOT IF
} ref IF
} al24 DEF
al25 GLOBAL
{ plyrs GLOBAL al25 GLOBAL al24 GLOBAL
plyrs "^-([0-9]+)-(.*)$" GREPSTR POP
"$1" GREPSUB cp = "$2" GREPSUB oth =
{ oth GREPSUB plyrs = plyrs "^-([0-9]+)-(.*)$" GREPSTR POP
   "$1" GREPSUB cp = "$2" GREPSUB oth =
} { cp ATOI WHONAME "." GREPSTR NOT plyrs "" == NOT AND } WHILE
{ "@" cp ATOI WHOPOS ITOA SWAP ITOA " " & SWAP & & cp ATOI WHONAME " is up!" & & ROOMMSG
  ";?3" cp & cp ATOI PRIVATEMSG
  oth "-" & cp & "-" & plyrs =
}
{ al24 30 ALARMEXEC
} plyrs "" == NOT IFELSE
} al25 DEF
}
ON SELECT { ref GLOBAL plyrs GLOBAL ad GLOBAL hsc GLOBAL phsc GLOBAL
{ { "A game is currently in session. Click play to join." LOCALMSG }
  { "Resetting game, click again to start a new one." LOCALMSG
    0 ME SETSPOTSTATE ";?5" SAY 
   { cr ++ 0 cr SETSPOTSTATE } { cr 29 < } WHILE 
  } ME GETSPOTSTATE WHONAME "." GREPSTR IFELSE
}
{ WHOME ME SETSPOTSTATE 1 ref = "" plyrs = "-" ad = 0 hsc = "" phsc =
 USERNAME " has started a game of Yahtzee-6! Click play to join!" & ROOMMSG
 "@511,0" USERNAME & ", click the roll button to start play after everyone joins." & LOCALMSG
} ME GETSPOTSTATE IFELSE
}
ON INCHAT { ref GLOBAL plyrs GLOBAL phsc GLOBAL hsc GLOBAL
{
 { DUP GLOBAL 0 SWAP =
 } [ ref rollt crv mysc ut yhtz plyrs ckbxs myturn co phsc hsc btt lastroll] FOREACH
 "" plyrs =
} CHATSTR ";?5" == IF
{ 0 ref = "" plyrs = "" phsc = 0 hsc =
} ref WHOME ME GETSPOTSTATE <> AND IF
;26 inchat
 mysc GLOBAL ckbxs GLOBAL ut GLOBAL yhtz GLOBAL
rollt GLOBAL myturn GLOBAL co GLOBAL dd GLOBAL dt GLOBAL
{ { 0 SWAP SETSPOTSTATE } [ 7 8 9 10 11 12] FOREACH
 1 myturn = 13 sp = ckbxs tckbxs =
{ tckbxs DUP 2 / 2 * - sp SETSPOTSTATE
  2 tckbxs /= sp ++
} { sp 28 < } WHILE
{ 1 28 SETSPOTSTATE 
{ yhtz 28 SETSPOTSTATE } yhtz 1 > IF
}
{ 0 28 SETSPOTSTATE } yhtz IFELSE
0 32 SETSPOTSTATE 0 crv = 0 co =
"[0 0 0 0 0 0]" dd = 0 dt =
ut 80 >= 29 SETSPOTSTATE
{ 0 SWAP SETSPOTSTATE } [ 1 2 3 4 5 6 ] FOREACH
} ";?3" WHOME ITOA & CHATSTR == IF
;25 inchat
 ref GLOBAL plyrs GLOBAL ad GLOBAL
mysc GLOBAL ckbxs GLOBAL ut GLOBAL yhtz GLOBAL
plyrs GLOBAL hsc GLOBAL phsc GLOBAL al25 GLOBAL
ad "." GREPSTR stt =
{ "-" WHOCHAT ITOA & "-" & ad =
 { "You're already in the game, " WHOCHAT WHONAME & 
   WHOCHAT PRIVATEMSG
 }
 { WHOCHAT WHONAME " has joined the game!" & ROOMMSG
  ";?2" WHOCHAT ITOA & WHOCHAT PRIVATEMSG
  ad plyrs & plyrs =
 } plyrs ad SUBSTR IFELSE
{ "" ad = } stt NOT IF
} CHATSTR ";?1" == ref AND IF
{ ;initialize variables to play
0 mysc = 0 ckbxs = 0 ut = 0 yhtz =
} CHATSTR ";?2" WHOME ITOA & == IF
{ al25 90 ALARMEXEC
} ";?3" CHATSTR == ref AND IF
{ "-$1-" GREPSUB pq =
  "$2" GREPSUB ATOI ps =
  ")applause !" "$1" GREPSUB ATOI WHONAME " has finished with a final score of " & &
  "$2!" GREPSUB &  ROOMMSG
   { "@150,0 !New high score for the game!" ROOMMSG
    "$1" GREPSUB ATOI WHONAME phsc = ps hsc =   
   } ps hsc > IF
  plyrs "^(.*)" pq & "(.*)$" & GREPSTR POP
  "$1$2" GREPSUB plyrs =
  al24 GLOBAL al24 60 ALARMEXEC al25 120 ALARMEXEC
} CHATSTR "^;?4([0-9]+)-([0-9]+)$" GREPSTR ref AND IF
{ { "$1$2" GREPSUB plyrs = 
    WHOCHAT WHONAME " has left the game." & ROOMMSG
{ al25 EXEC } "$2" GREPSUB "" == IF
  } plyrs "^(.*)-" WHOCHAT ITOA "-(.*)$" & & GREPSTR IF
} CHATSTR ";?6" == ref AND IF
}
ON OUTCHAT { { "" CHATSTR = } CHATSTR "^;?" GREPSTR IF 
 ref GLOBAL plyrs GLOBAL al25 GLOBAL
 { "" CHATSTR = plyrs tp = "[ " plar = "$1" GREPSUB ATOI drp =
  { plar " $1 " GREPSUB & plar = "$2" GREPSUB tp =
  } { tp "^-([0-9]+)-(.*)$" GREPSTR } WHILE
  plar "]" & STRTOATOM EXEC plar =
  { drp -- "" plyrs = 0 cnt =
   { ts =
     { plyrs "-" & ts ITOA & "-" & plyrs = }
     { "Dropping " ts WHONAME & " from the game" & LOGMSG
     } cnt drp != IFELSE
     cnt ++
   } plar FOREACH
  } drp 0 > plar LENGTH drp >= AND IF
  { al25 25 ALARMEXEC } plar LENGTH drp 1 + == IF
 } ref CHATSTR "player drop *([0-9]+)$" GREPSTR AND IF
 { "" CHATSTR = plyrs tp = 0 ps =
   "Current players:" LOGMSG
   { ps ++ ps ITOA ". " & "$1" GREPSUB ATOI WHONAME & LOGMSG
     "$2" GREPSUB tp = 
   } { tp "^-([0-9]+)-(.*)$" GREPSTR } WHILE
 } ref CHATSTR "player list" == AND IF
}
ON LEAVE { ";?6" SAY }
		ENDSCRIPT
		ENDSPOT
	SPOT
		ID 32
		NAME "Start - Play - Roll - Quit - Instructions"
		DONTMOVEHERE
		OUTLINE 303,140  504,140  504,184  303,184
		LOC 392,156
		PICTS 13,79,-39 13,98,-39 13,117,-39 13,136,-39 1,0,0 ENDPICTS
		SCRIPT
ON SELECT { MOUSEPOS POP ys =
0 ss = 
{ ys < ss += } [ 341 383 423 464 ] FOREACH
[
;"Start" 
{31 SELECT}
;"Play"
 { myturn GLOBAL btt GLOBAL lastroll GLOBAL
 { co GLOBAL crv GLOBAL mysc GLOBAL ut GLOBAL ckbxs GLOBAL
    dd GLOBAL yhtz GLOBAL
  { crv mysc += 
    0 btt =
    { { "@491,91 !UPPER TABLE BONUS!" ROOMMSG
        50 mysc +=
      } ut 80 < crv ut + 80 >= AND IF
      crv ut += 
    } co 19 < IF
    "I have a score of " mysc ITOA & SAY
    { 1 co SETSPOTSTATE } co 28 < IF
    { 1 co SETSPOTSTATE dd "6" SUBSTR 2 * 1 - yhtz =
    } co 28 == yhtz NOT AND IF
    12 cs = 0 ckbxs = 1 vl =
    { cs ++ cs GETSPOTSTATE ckd = { 1 ckd = } cs co == IF
      { vl ckbxs += } ckd IF 2 vl *=
    } { cs 27 < } WHILE
   0 myturn =
   { ";?3" SAY } 
   { ; { 50 mysc += } ut 80 > IF
      ";?4" WHOME ITOA & "-" & mysc ITOA & SAY
    { DUP GLOBAL 0 SWAP =
    } [ rollt crv mysc ut yhtz ckbxs myturn co btt ] FOREACH
   } ckbxs 32767 < yhtz NOT OR IFELSE
 } co IF
 }
 { ";?1" SAY "dice2" SOUND } myturn IFELSE
}
;"Roll" 
 { ref GLOBAL ad GLOBAL rollt GLOBAL crv GLOBAL myturn GLOBAL al25 GLOBAL
{ "" ad = al25 EXEC }
{ { { ME GETSPOTSTATE 1 + ME SETSPOTSTATE
     6 rollt = 0 crv =
     al26 GLOBAL al26 EXEC
    }ME GETSPOTSTATE 4 < IF
  } myturn IF
} ref ad ".." GREPSTR AND IFELSE
}
;"Instructions"
 {
"Instructions are in your log" STATUSMSG
{ LOGMSG } [
"" "***YAHTZEE 6 RULES***" ""
"Six dice, four rolls!"
"Upper Table, Triples, Quads, Short & Full Straights, & Chance:"
"  --all qualify the same as regular Yahtzee"
"Yahtzee is now 6 of a kind"
"Pents is five of a kind"
"Six Straight is 1, 2, 3, 4, 5, and 6, in any order"
"Full House is 2 of a kind and 4 of a kind"
"Half House is 3 of a kind and 3 of a kind"
"Upper Table Bonus is fifty points when you score eighty in the upper table"
"Check the board for other score changes!"
"" "***General Play***" ""
"To start a Yahtzee game, one person clicks on the start game button and becomes the referee." 
"Everyone who wants to play- including the referee- clicks on the Play button to join the game."
"When everyone has joined, the referee clicks the Roll button to start play."
"Anyone can join at any time by clicking play."
"Anyone who wants to quit can click the quit button to do so."
"Anyone who leaves the room automatically quits!"
"If the referee leaves the room, the game is over!"
"Click on the start game button to reset the game if that happens."
"When play starts, the person whose turn it is clicks roll to roll for the first time and get their dice."
"You lock and unlock the dice by clicking on them, locked dice are marked."
"Click on the score sheet in the blank spot you want to score in, or click roll up to thrice more."
"When you click on the score sheet, it tells you what you'll score with that option. If you like it, click Play to score that and finish your turn."
"Clicking on the Upper Table Bonus Status box tells you how many points you need to get that bonus"
"Scoring YAHTZEES- you score your first yahtzee the same way you score other scores, by clicking on yahtzee and then play. Score Yahtzee bonuses automatically by first clicking on Yahtzee when you roll one."
"When someone fills out their score card, they automatically give their final score."
"Stick around after you're through- the referee remembers the highest score, and will announce it when everyone finishes!"
"Players can click play to rejoin an ongoing game after they finish. In that case the game continues until everyone either quits or finishes their game."
"" "***Referee Commands" ""
"\x22Player List\x22 produces a list in your log of all current players and numbers- THIS CHANGES EACH TURN"
"\x22Player Drop x\x22 removes player number x from play and goes to the next one if needed"
"NOTE: it is highly recommended that the referee have the new palace client!"
] FOREACH
}
;"Quit" 
 { ref GLOBAL ";?6" SAY 
{ { DUP GLOBAL 0 SWAP =
  } [ rollt crv mysc ut yhtz ckbxs myturn co btt lastroll] FOREACH
}
{";?5" WHOME PRIVATEMSG } ref IFELSE
}
] ss GET EXEC
}
		ENDSCRIPT
		ENDSPOT
	ENDROOM

Now that is the whole room, if you just want to keep your current yahtzee rooms and add a lockable door, here is just the code I have added:


Code:
	PICTURE ID 21 NAME "lock1.gif" TRANSCOLOR 0 ENDPICTURE
	PICTURE ID 22 NAME "lock2.gif" TRANSCOLOR 0 ENDPICTURE
	BOLT
		ID 1270
		DONTMOVEHERE
		DEST 270
		OUTLINE 475,196  506,196  506,229  475,229
		LOC 492,212
		SCRIPT
		ENDSCRIPT
		ENDBOLT
	DOOR
		LOCKABLE
		ID 270
		OUTLINE 3,197  42,197  11,224  3,230
		LOC 491,213
		PICTS 21,0,0 22,0,0 ENDPICTS
		SCRIPT
		ENDSCRIPT
		ENDSPOT
Add this AFTER the last row of pictures in your current Yahtzee room. Before the first SPOT.


NOTE:

You need to change TWO things here to suit your own needs, I'm afraid there is no other option:

1: Make sure ID 270 is identical to the Id of your room. Check room info to see the ID of the room your using this for.

2: lock1.gif and lock2.gif should be replaced with an image you are using or you should get the little lock button from the Gallery here on Palace Planet.



And its a lot simpler then you think, all you need to do is follow the step by step explenation even if you have 56403 rooms in your Palace you only need to edit one at the time. :P

good luck! :D
__________________
Please don't ask me for help in private, use the USER QUESTIONS forum if you need help.
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
Trackbacks are On
Pingbacks are On
Refbacks are On


The Latest Posts
Title, Username, & Date Last Post Forum
reading the palace server log
09-15-2011 12:18 AM
by bardos
Palace Builders
Releasing source code
09-14-2011 07:55 AM
by Sman™
Developers Forum
need help with gotoroom script
09-11-2011 01:09 PM
by bardos
Palace Builders
playing music in your palace, how?
09-06-2011 12:26 AM
by maarten
Palace Builders
pserver process
08-01-2011 04:44 AM
by PalaceWeb
./Linux
XPALACE BLOKING
07-26-2011 04:43 AM
by wolfsar
Palace Builders
Online Users: 35
2 members and 33 guests
accermick, Evariurpazima
Most users ever online was 1,010, 06-27-2007 at 11:45 PM.
Stats
Members: 4,761
Threads: 1,145
Posts: 4,011
Top Poster: maarten (1,170)
Welcome to our newest member, Evariurpazima


All times are GMT +2. The time now is 10:47 AM.


Powered by vBulletin
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0