home *** CD-ROM | disk | FTP | other *** search
- on DoSitLoop
- global lastSitThing, initialpause, happy, dancecount
- if initialpause > 0 then
- set initialpause to initialpause - 1
- end if
- set hresult to CheckStates()
- if hresult = 1 then
- exit
- end if
- set BBB to random(100)
- if happy > 1000 then
- if BBB < 5 then
- set dancecount to 0
- set lastSitThing to "dance a"
- setanim("dance a")
- exit
- end if
- end if
- if BBB < 90 then
- set lastSitThing to "SIT"
- setanim("SIT")
- exit
- end if
- if initialpause = 0 then
- if BBB < 95 then
- setanim("SquashDown")
- exit
- end if
- end if
- if BBB < 99 then
- if lastSitThing <> "blink" then
- set lastSitThing to "blink"
- setanim("blink")
- exit
- end if
- end if
- if lastSitThing <> "turn" then
- set lastSitThing to "turn"
- setanim("turn")
- exit
- end if
- set lastSitThing to "SIT"
- setanim("SIT")
- exit
- end
-