home *** CD-ROM | disk | FTP | other *** search
- on TimePasses
- global Hungry, tired, sucky, pacifierflag, cold, bored, happymodifier, wet, happy, draggin, dragChan, dragonChan, oldtoyloc, objsLocList, objsChan, selectedSprite, lastSelectedSprite, whichanim, dancecount, danceFever, stepDancin, musicBoxChan, musicBoxFirst, shownnappie, usingObject, nappieSprite, feedoffx1, feedoffx2, feedoffy1, feedoffy2, feedfallx, feedfally, beirbotal, agol, botalbainne, feedingtime, gothim, startloc, floorlist, threshhold, tickleflag, snugglebuns, rockabilly, fallyplace, lasth, lastv, backdragonchan, frontdragonchan, closingin
- UpdateEmotionalStates()
- ClearClosingInFlag()
- if tickleflag > 0 then
- if the mouseUp or not rollOver(dragonChan) then
- set tickleflag to 0
- end if
- exit
- end if
- if gothim = 1 then
- if the mouseUp then
- set x to the locH of sprite dragChan
- set y to the locV of sprite dragChan + 30
- if y < getAt(fallyplace, 4) then
- if (x > getAt(fallyplace, 1)) and (x < getAt(fallyplace, 3)) then
- set the memberNum of sprite dragonChan to the memberNum of sprite dragChan
- set the locH of sprite dragonChan to x
- set the locV of sprite dragonChan to y
- set startloc to the loc of sprite dragonChan
- set the locH of sprite dragChan to 2000
- set rockabilly to 0
- set gothim to 0
- if dragonChan = frontdragonchan then
- set the memberNum of sprite backdragonchan to the memberNum of sprite dragChan
- set the locH of sprite backdragonchan to the locH of sprite frontdragonchan
- set the locV of sprite backdragonchan to the locV of sprite frontdragonchan
- set the memberNum of sprite frontdragonchan to the number of member "blankie"
- set dragonChan to backdragonchan
- end if
- setanim("drop dragon")
- exit
- end if
- end if
- set floortop to getAt(floorlist, 1)
- set floorbottom to getAt(floorlist, 2)
- set floorleft to getAt(floorlist, 3)
- set floorright to getAt(floorlist, 4)
- if x > (floorright - 20) then
- set x to floorright - 20
- end if
- if x < (floorleft + 20) then
- set x to floorleft + 20
- end if
- if y < (floortop + 25) then
- set y to floortop + 25
- end if
- if y > floorbottom then
- set y to floorbottom - 5
- end if
- set the locH of sprite dragonChan to x
- set the locV of sprite dragonChan to y
- set startloc to the loc of sprite dragonChan
- set the locH of sprite dragChan to 2000
- set rockabilly to 0
- set gothim to 0
- LayerDragon()
- setanim("SIT")
- exit
- else
- if (the mouseH > (lasth + 20)) or (the mouseH < (lasth - 20)) then
- if rockabilly > 0 then
- set rockabilly to rockabilly + 1
- if rockabilly = 30 then
- setanim("Pickup Sleep")
- exit
- end if
- end if
- end if
- set lasth to the mouseH
- set lastv to the mouseV
- set the locH of sprite dragChan to lasth
- set the locV of sprite dragChan to lastv
- exit
- end if
- end if
- if draggin = 1 then
- if the mouseDown then
- set whichobj to getAt(objsList, selectedSprite - objsChan + 1)
- set whatyoureallyreallywant to TauntHim()
- if beirbotal then
- if whichobj = "botal" then
- set newx to the mouseH
- set newy to the mouseV
- if whatyoureallyreallywant = 1 then
- set hresult to ReachForTheSkies(newx, newy)
- if hresult = 1 then
- exit
- end if
- end if
- if (the mouseH > (the locH of sprite dragonChan - feedoffx1)) and (the mouseH < (the locH of sprite dragonChan - feedoffx2)) then
- if (the mouseV > (the locV of sprite dragonChan - feedoffy1)) and (the mouseV < (the locV of sprite dragonChan - feedoffy2)) then
- if agol = 0 then
- if whatyoureallyreallywant = 1 then
- set the locH of sprite dragChan to 2000
- set agol to 1
- setanim("drink held bottle")
- exit
- end if
- set the locH of sprite dragChan to the mouseH
- set the locV of sprite dragChan to the mouseV
- exit
- end if
- set feedingtime to feedingtime + 1
- set happymodifier to happymodifier + 5
- if sucky > 0 then
- set sucky to sucky - 2
- end if
- if Hungry > 0 then
- set Hungry to Hungry - 3
- end if
- exit
- end if
- end if
- if agol then
- set the locH of sprite dragChan to the mouseH
- set the locV of sprite dragChan to the mouseV
- set agol to 0
- setanim("take away bottle")
- exit
- else
- set the locH of sprite dragChan to the mouseH
- set the locV of sprite dragChan to the mouseV
- exit
- end if
- end if
- end if
- set newx to the mouseH
- set newy to the mouseV
- set the locH of sprite dragChan to newx
- set the locV of sprite dragChan to newy
- if whatyoureallyreallywant = 1 then
- set hresult to ReachForTheSkies(newx, newy)
- if hresult = 1 then
- exit
- end if
- end if
- if whichobj = "nappie" then
- if rollOver(dragonChan) then
- if whatyoureallyreallywant = 1 then
- if not shownnappie then
- set shownnappie to 1
- if lastSelectedSprite > 0 then
- set BBB to lastSelectedSprite
- set lastSelectedSprite to selectedSprite
- set selectedSprite to BBB
- ReshelveItem(1)
- end if
- setanim("show diaper")
- exit
- end if
- end if
- end if
- end if
- else
- set newx to the mouseH
- set newy to the mouseV
- set whichobj to getAt(objsList, selectedSprite - objsChan + 1)
- if whichobj = "musicbox" then
- set hresult to 0
- if (newx > getAt(floorlist, 3)) and (newx < getAt(floorlist, 4)) then
- if (newy > getAt(floorlist, 1)) and (newy < getAt(floorlist, 2)) then
- set nodancing to 0
- set danceFever to 1
- set stepDancin to 0
- set wantdat to 1
- set draggin to 0
- set musicBoxChan to selectedSprite
- puppetSprite(musicBoxChan, 1)
- set the memberNum of sprite musicBoxChan to musicBoxFirst
- if the left of sprite dragChan < the left of sprite dragonChan then
- set overlap to the right of sprite dragChan - the left of sprite dragonChan
- else
- set overlap to the right of sprite dragonChan - the left of sprite dragChan
- end if
- if overlap > 0 then
- if the top of sprite dragChan < the top of sprite dragonChan then
- set overlap to the bottom of sprite dragChan - the top of sprite dragonChan
- else
- set overlap to the bottom of sprite dragonChan - the top of sprite dragChan
- end if
- end if
- if overlap < 0 then
- set the loc of sprite musicBoxChan to the loc of sprite dragChan
- else
- set blarg to the locH of sprite dragChan
- if (blarg + 100) < getAt(floorlist, 4) then
- set the locH of sprite musicBoxChan to blarg + 100
- set the locV of sprite musicBoxChan to the locV of sprite dragChan
- else
- set the locH of sprite musicBoxChan to blarg - 100
- set the locV of sprite musicBoxChan to the locV of sprite dragChan
- end if
- end if
- set shelfy to selectedSprite
- put shelfy
- set newmember to getAt(getAt(objsLocList, selectedSprite - objsChan + 1), 2)
- set the memberNum of sprite selectedSprite to newmember
- set bottomoffset to the height of member newmember - getAt(the regPoint of member newmember, 2)
- ShuffleSprites(shelfy, the locV of sprite shelfy, bottomoffset)
- clutterFloor(musicBoxChan, the locH of sprite musicBoxChan, the locV of sprite musicBoxChan)
- set the locH of sprite dragChan to 2000
- if whichanim = "cold sleep (loop)" then
- set selectedSprite to lastSelectedSprite
- set lastSelectedSprite to 0
- setanim("cry b")
- exit
- end if
- case whichanim of
- "sleep a":
- set selectedSprite to lastSelectedSprite
- set lastSelectedSprite to 0
- setanim("wake up")
- exit
- "sleep b":
- set selectedSprite to lastSelectedSprite
- set lastSelectedSprite to 0
- setanim("bad dream")
- exit
- "drop dragon", "fallguy", "afterthefall", "I falled", "UnMasked":
- set selectedSprite to lastSelectedSprite
- set lastSelectedSprite to 0
- exit
- end case
- if not usingObject then
- if not closingin then
- set dancecount to 0
- if lastSelectedSprite > 0 then
- set BBB to lastSelectedSprite
- set lastSelectedSprite to selectedSprite
- set selectedSprite to BBB
- ReshelveItem(1)
- end if
- set selectedSprite to 0
- setanim("dance a")
- exit
- end if
- end if
- set selectedSprite to lastSelectedSprite
- set lastSelectedSprite to 0
- exit
- end if
- end if
- end if
- if beirbotal then
- if whichobj = "botal" then
- set draggin to 0
- if feedingtime > 700 then
- set beirbotal to 0
- end if
- if agol then
- set agol to 0
- set the locH of sprite dragChan to 2000
- set the memberNum of sprite selectedSprite to botalbainne
- set the locH of sprite selectedSprite to the locH of sprite dragonChan - feedfallx
- set the locV of sprite selectedSprite to the locV of sprite dragonChan - feedfally
- set selectedSprite to 0
- setanim("take away bottle")
- exit
- end if
- set blarg to []
- append(blarg, the locH of sprite dragChan)
- append(blarg, the locV of sprite dragChan)
- ReshelveItem(blarg)
- set the locH of sprite dragChan to 2000
- if not usingObject then
- set distx to abs(newx - ((the right of sprite dragonChan + the left of sprite dragonChan) / 2))
- set disty to abs(newy - ((the bottom of sprite dragonChan + the top of sprite dragonChan) / 2))
- if distx > disty then
- set dist to distx
- else
- set dist to disty
- end if
- set hresult to 0
- if dist < 40 then
- if Hungry < threshhold then
- RejectItem(Hungry)
- exit
- end if
- end if
- end if
- exit
- end if
- end if
- if whichobj = "nappie" then
- if shownnappie then
- if rollOver(dragonChan) then
- set usingObject to 1
- set draggin to 0
- set the locH of sprite dragChan to 2000
- set selectedSprite to 0
- set shownnappie to 0
- setanim("give diaper")
- exit
- else
- set the locH of sprite dragChan to the mouseH
- set the locV of sprite dragChan to the mouseV
- exit
- end if
- end if
- end if
- set distx to abs(newx - ((the right of sprite dragonChan + the left of sprite dragonChan) / 2))
- set disty to abs(newy - ((the bottom of sprite dragonChan + the top of sprite dragonChan) / 2))
- if distx > disty then
- set dist to distx
- else
- set dist to disty
- end if
- set hresult to 0
- if dist < 40 then
- set hresult to SeeIfHeWantsIt()
- if hresult = 0 then
- set draggin to 0
- ReshelveItem(1)
- set the locH of sprite dragChan to 2000
- exit
- end if
- end if
- if hresult = 0 then
- set draggin to 0
- set blarg to []
- append(blarg, the locH of sprite dragChan)
- append(blarg, the locV of sprite dragChan)
- ReshelveItem(blarg)
- set the locH of sprite dragChan to 2000
- end if
- end if
- end if
- end
-