ROOM ID 618 NOCYBORGS HIDDEN NAME "hole eighteen" PICT "hole18.jpg" ARTIST "lion hisself" DOOR ID 88 DONTMOVEHERE SHOWFRAME OUTLINE 33,21 476,21 476,213 33,213 LOC 254,117 SCRIPT ON SELECT { ;spot 88 ; values for "teed" 0= initial, 1= place ball on tee, 2= line up putt, 3= putt delay 4 = putting ; 5= end putt 6 = in the hole 7= next putt 8= prevent double-click ; globes GLOBAL globes EXEC ; ; wait for spot 88 alarms to die down then hit shot ; { setputt EXEC 3 teed = 30 89 SETALARM } teed 2 == IF ; next putt ; { 8 teed = 40 88 SETALARM } teed 7 == IF } ;____________________________________________________________________________________________________________________ ON ALARM { globes GLOBAL globes EXEC ; { lineup EXEC } 1 teed == 2 teed == OR 8 teed == OR IF ; ; tee shot and onward until hole ; { impact EXEC findevent EXEC paintball EXEC paintflite EXEC bounce EXEC 40 88 SETALARM } teed 4 == IF ; next putt ; { 7 teed = setputt EXEC paintball EXEC } teed 5 == IF } ;___________________________________________________________________________ ON ENTER { globes GLOBAL globes EXEC ; { ; inputs deltaX, deltaY, currentX, currentY ; outputs Xx Xy Xy Yyshort, xhit, yhit, verb ; ; [ [ 101 ] [ 75 153 1 ] [ 124 ] [ 89 95 0 ] [ 189 ] [ 108 119 -1 ] [ 200 ] [ 116 152 -1 ] [ 213 ] [ 116 152 1 ] [ 225 ] [ 108 119 1 ] [ 257 ] [ 108 119 -1 ] [ 268 ] [ 75 111 -1 ] [ 280 ] [ 75 111 1 ] [ 293 ] [ 108 119 1 ] [ 404 ] [ 75 153 -1 ] ] Xarray = ; [ [ 79 ] [ 96 408 1 ] [ 92 ] [ 121 127 0 ] [ 107 ] [ 257 293 -1 ] [ 108 ] [ 189 225 -1 ] [ 119 ] [ 189 225 1 ] [ 119 ] [ 257 293 1 ] [ 149 ] [ 96 408 -1 ] ] Yarray = ; ; for each X calc where hit Xarray LENGTH len = len -- 0 xhit = 2 oldyside = currentX oldXpos = 0 Xaction = ;-6001 oldXpos = { 6001 oldXpos = } deltaX 0 < IF 0 Xhshort = 0 Yhshort = 6002 Xxshort = 6003 Yxshort = 6004 curXside = 0 verb = 0 tvar = { len -- Xarray len GET 0 GET currentX - Xdelta = { print exec " ouch" say exit } Xdelta 1000 > Xdelta -1000 < OR IF deltaY Xdelta * deltaX / Ydelta = currentY Ydelta + Ypos = ; left Xarray 1 len + GET 0 GET tvar0 = ; right Xarray 1 len + GET 1 GET tvar1 = Xarray 1 len + GET 2 GET tvar3 = { Xarray 1 len + GET 3 GET tvar3 = } tvar3 1 > IF ; determine vertical collisions { currentX Xdelta + Xpos = ; if cup { { 1 Xhit = Xpos Xhshort = Ypos Yhshort = Xpos oldXpos = 3 verb = ; set action if any and pack it { tvar Xaction = 1000 Xaction *= } Xarray 1 len + GET 2 GET tvar = tvar 1 > IF ; } ; if wall ; at wall to start putt { { 5 verb = } Xpos currentX == IF 1 Xhit = Xpos Xxshort = Ypos Yxshort = Xpos oldXpos = tvar3 curXside = ; set action if any and pack it { tvar Xaction = 1000 Xaction += } Xarray 1 len + GET 2 GET tvar = tvar 1 > IF { 8000 Xxshort = } 1 tvar3 == deltaX 0 >= AND 1 xhit <> AND -1 tvar3 == deltaX 0 < AND 1 xhit <> AND OR IF { 8001 Yxshort = print EXEC } Ypos currentY < 1 oldYside == AND Ypos currentY > 0 oldYside == AND Ypos currentY == AND OR IF } 0 tvar3 == IFELSE } ; putt left deltaX 0 < Xpos currentX <= AND 0 xhit == AND tvar3 0 >= AND tvar0 = deltaX 0 < Xpos currentX <= AND Xpos oldXpos > AND 1 xhit == AND tvar3 0 >= AND tvar1 = tvar0 tvar1 OR tvar0 = ; putt right deltaX 0 > Xpos currentX >= AND 0 xhit == AND tvar3 0 <= AND tvar1 = deltaX 0 > Xpos currentX >= AND Xpos oldXpos < AND 1 xhit == AND tvar3 0 <= AND tvar2 = tvar1 tvar2 OR tvar1 = tvar0 tvar1 OR IF ; if not a gate } Ypos tvar0 >= Ypos tvar1 <= AND IF len -- } { -1 len <> } WHILE { 1 xhit = } 0 xhit == 3 verb == AND IF ;____________________________________________________________________________________________________________________ ; for each Y calc where hit Yarray LENGTH len = len -- 0 yhit = 2 oldXside = currentY oldYpos = 0 Yaction = 7002 Xyshort = 7003 Yyshort = 7004 curYside = { len -- Yarray len GET 0 GET currentY - Ydelta = deltaX Ydelta * deltaY / Xdelta = Xdelta currentX Xdelta + Xpos = ; get top Yarray 1 len + GET 0 GET tvar0 = ; get bottom Yarray 1 len + GET 1 GET tvar1 = Yarray 1 len + GET 2 GET tvar3 = { Yarray 1 len + GET 3 GET tvar3 = } tvar3 1 > IF ; determine horizontal collisions { currentY Ydelta + Ypos = ; if cup { { 1 Yhit = Xpos Xhshort = Ypos Yhshort = Ypos oldYpos = 3 verb = ; set action if any and pack it { tvar Yaction = 1000 Yaction *= } Yarray 1 len + GET 2 GET tvar = tvar 1 > IF ; } ; if wall { ; hit both, an outside corner { { 2 verb = } ; at wall to start putt { 6 verb = } 5 verb == IFELSE } Ypos currentY == IF 1 Yhit = Xpos Xyshort = Ypos Yyshort = Ypos oldYpos = tvar3 curYside = ; set action if any and pack it { tvar Yaction = 1000 Yaction += } Yarray 1 len + GET 2 GET tvar = tvar 1 > IF { 9000 Yyshort = } 1 tvar3 == deltaY 0 >= AND 1 yhit <> AND -1 tvar3 == deltaY 0 < AND 1 yhit <> AND OR IF { 9001 Xyshort = print EXEC } Xpos currentX < 1 oldXside == AND Xpos currentX > 0 oldXside == AND Xpos currentX == AND OR IF } tvar3 0 == IFELSE } ; putt up deltaY 0 < Ypos currentY <= AND 0 yhit == AND tvar3 0 >= AND tvar0 = deltaY 0 < Ypos currentY <= AND Ypos oldYpos > AND 1 yhit == AND tvar3 0 >= AND tvar1 = tvar0 tvar1 OR tvar0 = ; putt down deltaY 0 > Ypos currentY >= AND 0 yhit == AND tvar3 0 <= AND tvar1 = deltaY 0 > Ypos currentY >= AND Ypos oldYpos < AND 1 yhit == AND tvar3 0 <= AND tvar2 = tvar1 tvar2 OR tvar1 = tvar0 tvar1 OR IF ; if not a gate } Xpos tvar0 >= Xpos tvar1 <= AND IF len -- } { -1 len <> } WHILE { 1 yhit = } 0 yhit == 3 verb == AND IF } impact DEF } ENDSCRIPT ENDDOOR DOOR ID 3 NAME "next hole" DONTMOVEHERE DEST 619 OUTLINE 408,347 465,347 465,362 408,362 LOC 436,354 SCRIPT ON ENTER { globes GLOBAL globes EXEC ; ; position avs ; { tvar0 tvar1 SETPOS } 0 tvar0 <> 0 tvar1 <> AND IF inits EXEC { " You've already played this hole..." STATUSMSG } playd ROOMID >= IF { " pssst...no skipping holes....." STATUSMSG } playd ROOMID 1 - < IF } ON LEAVE { globes GLOBAL globes EXEC ; POSX tvar0 = POSY tvar1 = { PAINTCLEAR } NBRROOMUSERS 1 == IF } ENDSCRIPT ENDDOOR DOOR ID 4 NAME " " DONTMOVEHERE OUTLINE 409,312 464,312 464,332 409,332 LOC 436,322 SCRIPT ON ENTER { globes GLOBAL globes EXEC ; symbol defs caps GLOBAL smalls GLOBAL syms1 GLOBAL syms2 GLOBAL syms3 GLOBAL name GLOBAL tvar2 GLOBAL ; { { 4 -11 lineto 4 12 lineto -7 -4 pento 7 0 lineto 3 3 pento } "lenA" tvar2 GREPSTR "lenË" tvar2 GREPSTR OR "lenį" tvar2 GREPSTR OR "lenå" tvar2 GREPSTR OR "lenĖ" tvar2 GREPSTR OR "len€" tvar2 GREPSTR OR "len" tvar2 GREPSTR OR IF { 0 -11 lineto 8 0 lineto 2 2 lineto -3 3 lineto 3 2 lineto 0 2 lineto -3 2 lineto -8 0 lineto 1 -6 pento 7 0 lineto 6 6 pento } "lenB" tvar2 GREPSTR "len§" tvar2 GREPSTR OR IF { 9 -9 pento -2 -2 lineto -4 0 lineto -3 3 lineto 0 5 lineto 3 3 lineto 5 0 lineto 2 -2 lineto 2 2 pento } "lenC" tvar2 GREPSTR IF { 0 -11 lineto 6 0 lineto 3 3 lineto 0 5 lineto -3 3 lineto -6 0 lineto 12 0 pento } "lenD" tvar2 GREPSTR IF { 9 -11 pento -8 0 lineto 0 11 lineto 9 0 lineto -9 -6 pento 8 0 lineto 3 6 pento } "lenE" tvar2 GREPSTR IF { 0 -11 lineto 8 0 lineto -8 6 pento 7 0 lineto 3 5 pento } "lenF" tvar2 GREPSTR IF { 8 -9 pento -2 -2 lineto -3 0 lineto -3 3 lineto 0 5 lineto 3 3 lineto 3 0 lineto 3 -3 lineto 0 -2 lineto -6 0 lineto 9 5 pento } "lenG" tvar2 GREPSTR IF { 0 -12 lineto 0 6 pento 8 0 lineto 0 -5 pento 0 12 lineto 3 -1 pento } "lenH" tvar2 GREPSTR IF { 0 -12 lineto 3 12 pento } "lenI" tvar2 GREPSTR IF { 0 -3 pento 0 2 lineto 2 1 lineto 2 0 lineto 1 -1 lineto 0 -11 lineto 3 12 pento } "lenJ" tvar2 GREPSTR IF { 0 -12 lineto 0 9 pento 9 -9 lineto -5 5 pento 0 2 lineto 5 6 lineto 2 -1 pento } "lenK" tvar2 GREPSTR IF { 0 -11 pento 0 11 lineto 7 0 lineto 2 0 pento } "lenL" tvar2 GREPSTR IF { 0 -11 lineto 5 11 lineto 5 -11 lineto 0 12 lineto 3 -1 pento } "lenM" tvar2 GREPSTR IF { 0 -11 lineto 8 11 lineto 0 -12 lineto 3 12 pento } "lenN" tvar2 GREPSTR IF { 0 -11 lineto 8 11 lineto 0 -12 lineto -6 -2 pento 5 0 lineto 4 14 pento } "len„" tvar2 GREPSTR IF { 3 0 pento 3 0 lineto 3 -3 lineto 0 -5 lineto -3 -3 lineto -3 0 lineto -3 3 lineto 0 5 lineto 3 3 lineto 9 0 pento } "lenO" tvar2 GREPSTR IF { 0 -11 lineto 6 0 lineto 2 2 lineto 0 2 lineto -2 2 lineto -6 0 lineto 11 5 pento } "lenP" tvar2 GREPSTR IF { 3 0 pento 3 0 lineto 3 -3 lineto 0 -5 lineto -3 -3 lineto -3 0 lineto -3 3 lineto 0 5 lineto 3 3 lineto 1 -2 pento 6 2 lineto 2 0 pento } "lenQ" tvar2 GREPSTR IF { 0 -11 lineto 6 0 lineto 2 2 lineto 0 2 lineto -2 2 lineto -6 0 lineto 4 0 pento 5 6 lineto 2 -1 pento } "lenR" tvar2 GREPSTR IF { 0 -2 pento 2 2 lineto 4 0 lineto 2 -2 lineto 0 -2 lineto -2 -1 lineto -1 0 lineto -2 -1 lineto -1 0 lineto -2 -2 lineto 0 -1 lineto 2 -2 lineto 4 0 lineto 3 3 lineto 2 8 pento } "lenS" tvar2 GREPSTR "lenS˙" tvar2 GREPSTR OR IF { 0 -11 pento 9 0 lineto -5 0 pento 0 12 lineto 7 -1 pento } "lenT" tvar2 GREPSTR IF { 0 -11 pento 0 9 lineto 2 2 lineto 4 0 lineto 2 -2 lineto 0 -10 lineto 3 12 pento } "lenU" tvar2 GREPSTR IF { 0 -11 pento 4 11 lineto 4 -12 lineto 3 12 pento } "lenV" tvar2 GREPSTR IF { 0 -11 pento 3 11 lineto 3 -11 lineto 3 11 lineto 3 -12 lineto 3 12 pento } "lenW" tvar2 GREPSTR IF { 10 -12 lineto -9 1 pento 10 12 lineto 2 -1 pento } "lenX" tvar2 GREPSTR IF { 0 -11 pento 4 6 lineto 0 6 lineto 0 -6 pento 4 -7 lineto 2 12 pento } "lenY" tvar2 GREPSTR IF { 1 -11 pento 7 0 lineto -8 11 lineto 9 0 lineto 2 0 pento } "lenZ" tvar2 GREPSTR IF } caps DEF } ENDSCRIPT ENDDOOR DOOR ID 89 NAME "tee" DONTMOVEHERE OUTLINE 372,90 400,90 400,137 372,137 LOC 386,113 SCRIPT ON SELECT ; spot 89 { globes GLOBAL globes EXEC ; ; tee up/paint ball for first putt ; inputs teed, stroke ; outputs currentX, currentY ; { MOUSEPOS currentY = currentX = PAINTUNDO paintball EXEC 1 teed = 40 88 setalarm } 0 teed == 0 stroke == AND IF ; ; hit shot ; { setputt EXEC 3 teed = 30 89 SETALARM } teed 2 == IF ; next putt { 8 teed = 40 88 setalarm } 7 teed == IF } ;___________________________________________________________________________ ON ALARM { globes GLOBAL globes EXEC ; wait for spot 88 alarms to die down then hit shot { setputt EXEC 4 teed = 30 88 SETALARM } 3 teed == IF ; next putt { 2 teed = 40 88 setalarm } 7 teed == IF } ENDSCRIPT ENDDOOR ENDROOM