ROOM ID 616 NOCYBORGS HIDDEN NAME "hole sixteen" PICT "hole16.jpg" ARTIST "lion hisself" DOOR ID 88 NAME "putt area" DONTMOVEHERE SHOWFRAME OUTLINE 88,9 502,9 502,306 364,306 364,336 238,336 238,185 88,185 LOC 298,209 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 ; ; [ [ 173 ] [ 60 135 1 ] [ 200 ] [ 92 98 0 ] [ 302 ] [ 193 271 1 ] [ 357 ] [ 130 201 1 ] [ 411 ] [ 60 270 -1 ] ] Xarray = ; [ [ 64 ] [ 170 415 1 ] [ 95 ] [ 197 203 0 ] [ 130 ] [ 170 357 -1 ] [ 201 ] [ 295 357 1 ] [ 265 ] [ 297 415 -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 89 DONTMOVEHERE OUTLINE 308,208 337,208 337,257 308,257 LOC 322,232 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 DOOR ID 3 NAME " " DONTMOVEHERE OUTLINE 408,312 463,312 463,332 408,332 LOC 435,322 SCRIPT ON ENTER { globes GLOBAL globes EXEC ; symbol defs caps GLOBAL smalls GLOBAL syms1 GLOBAL syms2 GLOBAL syms3 GLOBAL name GLOBAL tvar2 GLOBAL ; { { 0 -8 pento 6 3 lineto -7 4 lineto 9 1 pento } "len>" tvar2 GREPSTR "lenƯ" tvar2 GREPSTR OR IF { 3 -11 pento -2 5 lineto 0 6 lineto 3 4 lineto 2 -4 pento } "len(" tvar2 GREPSTR IF { 0 -11 pento 2 5 lineto 0 6 lineto -3 4 lineto 5 -4 pento } "len)" tvar2 GREPSTR IF { 3 -11 pento -2 0 lineto -0 15 lineto 3 0 lineto 2 -4 pento } "len[" tvar2 GREPSTR IF { 0 -11 pento 2 0 lineto 0 15 lineto -3 0 lineto 5 -4 pento } "len]" tvar2 GREPSTR IF { 7 -9 pento 0 -2 lineto -1 0 pento -4 0 lineto 0 1 pento 0 2 lineto 6 3 lineto 0 1 pento 0 1 lineto -3 3 lineto -2 -7 pento -2 2 lineto 0 1 lineto 6 5 lineto 0 3 lineto -1 0 pento -3 0 lineto -3 -3 lineto 11 -1 pento } "len¤" tvar2 GREPSTR IF { 0 -10 pento 0 4 lineto 1 -1 pento 0 -5 lineto 1 1 pento 0 6 lineto 1 -1 pento 0 -6 lineto 1 1 pento 0 15 lineto 3 -1 pento 0 -15 lineto -2 1 pento 4 0 lineto 1 11 pento } "len¦" tvar2 GREPSTR IF { 0 -11 pento 0 4 lineto 3 7 pento } "len'" tvar2 GREPSTR IF { 0 -1 lineto 0 -7 pento 0 -1 lineto 3 9 pento } "len:" tvar2 GREPSTR IF { 4 -11 pento -2 0 lineto 0 1 pento 0 6 lineto -2 0 pento 2 0 lineto 0 1 pento 0 6 lineto 1 0 pento 2 0 lineto 2 -3 pento } "len{" tvar2 GREPSTR IF { 0 3 pento 2 0 lineto 0 -1 pento 0 -6 lineto 2 0 pento -2 0 lineto 0 -1 pento 0 -6 lineto -1 0 pento -2 0 lineto 8 11 pento } "len}" tvar2 GREPSTR IF { 6 -6 pento -2 -2 lineto -2 0 lineto -2 2 lineto 0 4 lineto 2 2 lineto 2 0 lineto 3 -3 lineto 1 2 pento -3 -10 pento -4 15 lineto 8 -4 pento } "len¢" tvar2 GREPSTR IF { 0 -8 pento 3 -3 lineto 0 11 lineto 3 0 pento } "len1" tvar2 GREPSTR IF { 0 -9 pento 2 -2 lineto 3 0 lineto 1 3 lineto 0 2 lineto -1 0 pento 0 1 lineto -5 5 lineto 7 0 lineto 2 0 pento } "len2" tvar2 GREPSTR IF { 0 -9 pento 2 -2 lineto 3 0 lineto 0 1 pento 0 3 lineto -2 0 lineto -1 1 pento 2 0 lineto 2 2 lineto 0 2 lineto -2 2 lineto -2 0 lineto -3 -3 lineto 10 3 pento } "len3" tvar2 GREPSTR IF { 7 -3 pento -7 0 lineto 6 -8 lineto 0 11 lineto 4 0 pento } "len4" tvar2 GREPSTR IF { 0 -2 pento 2 2 lineto 2 0 lineto 2 -2 lineto 0 -3 lineto -2 -2 lineto -5 0 lineto 1 1 pento 0 -3 lineto 1 0 pento 0 -2 lineto 6 0 lineto 2 11 pento } "len5" tvar2 GREPSTR IF { 6 -9 pento -2 -2 lineto -2 0 lineto -2 2 lineto 0 7 lineto 2 2 lineto 2 0 lineto 2 -2 lineto 0 -3 lineto -2 -2 lineto -2 0 lineto -2 2 lineto 9 5 pento } "len6" tvar2 GREPSTR IF { 0 -11 pento 6 0 lineto -1 0 lineto -3 11 lineto 7 0 pento } "len7" tvar2 GREPSTR IF } syms1 DEF } ENDSCRIPT ENDDOOR DOOR ID 4 NAME "next hole" DONTMOVEHERE DEST 617 OUTLINE 408,348 465,348 465,363 408,363 LOC 436,355 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 ENDROOM