home *** CD-ROM | disk | FTP | other *** search
- global gHands, gCupsToMove, gCupSprites, eatshit, gCounta, gCenterOfRotation, gAxisX, gAxisY, gFunk, speed, gPickCup, gCountaWhat, gBalls
-
- on getRadians theDegrees
- return theDegrees * PI / 180
- end
-
- on getDegrees theRadians
- return theRadians * 180.0 / PI
- end
-
- on getRotationCenter aList
- xC = float(aList[1].locH) + (abs(float(aList[1].locH) - float(aList[2].locH)) / 2.0)
- yC = (float(aList[1].locV) + float(aList[2].locV)) / 2.0
- return [xC, yC]
- end
-
- on getAxis aList
- return abs(aList[2].locH - aList[1].locH) / 2
- end
-
- on getTwoRandomCups
- the randomSeed = the ticks * 55.54999999999999716
- cupsAvail = gCupSprites.duplicate()
- gCupsToMove = []
- repeat with i = 1 to 2
- temp = cupsAvail[random(cupsAvail.count)]
- cupsAvail.deleteOne(temp)
- gCupsToMove.add(temp)
- end repeat
- gCupsToMove.sort()
- moveCups()
- end
-
- on moveCups
- if gCupsToMove[1].locH > gCupsToMove[2].locH then
- temp = gCupsToMove[1]
- temp2 = gCupsToMove[2]
- gCupsToMove.deleteAll()
- gCupsToMove = [temp2, temp]
- end if
- gCupsToMove[1].oLoc = gCupsToMove[1].locV
- gCupsToMove[2].oLoc = gCupsToMove[2].locV
- gCenterOfRotation = getRotationCenter(gCupsToMove)
- gAxisX = getAxis(gCupsToMove)
- gAxisY = gAxisX
- gCupsToMove[1].pAngle = getRadians(180)
- gCupsToMove[2].pAngle = getRadians(0)
- eatshit = 1
- timeout("switch").new(50, #asslick)
- end
-
- on asslick
- if eatshit then
- gCupsToMove[1].fuckYou(speed)
- gCupsToMove[2].fuckYou(speed)
- gHands[#right].loc = gCupsToMove[1].loc
- gHands[#left].loc = gCupsToMove[2].loc
- if (gCupsToMove[1].locV = gCupsToMove[1].oLoc) or (gCupsToMove[2].locV = gCupsToMove[2].oLoc) then
- if (2 mod 2) = 0 then
- eatshit = 0
- if gCounta < gCountaWhat then
- gCounta = gCounta + 1
- getTwoRandomCups()
- fuckOffShit()
- else
- puppetSound(8, 0)
- gCounta = 0
- gHands[#left].loc = gHands[#left].pOriginalLoc
- gHands[#right].loc = gHands[#right].pOriginalLoc
- timeout("switch").forget()
- gPickCup = 1
- if gCountaWhat < 18 then
- gCountaWhat = gCountaWhat + 1
- end if
- if (gBalls.count mod 3) = 0 then
- if speed < 40 then
- speed = speed + 5
- end if
- end if
- end if
- end if
- end if
- end if
- end
-
- on fuckOffShit
- repeat while not fuckinCool()
- if gHands[#right].locH > gCupsToMove[1].locH then
- gHands[#right].locH = gHands[#right].locH - 20
- end if
- if gHands[#left].locH < gCupsToMove[2].locH then
- gHands[#left].locH = gHands[#left].locH + 20
- end if
- updateStage()
- end repeat
- end
-
- on fuckinCool
- if (gHands[#right].locH <= gCupsToMove[1].locH) and (gHands[#left].locH >= gCupsToMove[2].locH) then
- return 1
- else
- return 0
- end if
- end
-