home *** CD-ROM | disk | FTP | other *** search
- on ChannelVoice where, who, saywhat, what, sample
- global voicestate, mouthoff, voicegraph, soundgraph, voicestring, voicelength, voicespot, voicestep, oldtime, oldmouth, oldface, facespot, oldxface, oldyface, lastvoice
- if sample = 11 then
- set sample to 11025
- end if
- if sample = 22 then
- set sample to 22050
- end if
- set voicestate to 1
- if lastvoice <> who then
- set mouthindex to [2, 8, 6, 11, 3, 10, 6, 11, 2, 5, 6, 9, 8, 6, 4, 8, 7, 6, 6, 11, 5, 10, 7, 3, 6, 6, 1]
- set stuffumouth to [EMPTY, "A", "E", "O", "U", "C", "W", "M", "L", "F"]
- set tempmouth to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- repeat with xxx = 1 to 10
- set bbb to getAt(stuffumouth, xxx) & who
- set bee to the number of member bbb
- preLoadCast(bee)
- setAt(tempmouth, xxx, bee)
- end repeat
- set voicegraph to []
- repeat with xxx = 1 to 27
- set aaa to getAt(mouthindex, xxx)
- if aaa = 11 then
- set ccc to 0
- else
- set ccc to getAt(tempmouth, aaa)
- end if
- append(voicegraph, ccc)
- end repeat
- set lastvoice to who
- end if
- set soundgraph to the number of member saywhat
- set voicestring to what
- set oldxface to -2000
- set oldyface to -2000
- set facespot to integer(where / 100)
- set voicespot to where - (facespot * 100)
- set ddd to getAt(voicegraph, 27)
- if (soundgraph = 0) or (ddd = 0) then
- novoice()
- exit
- end if
- puppetSprite(voicespot, 1)
- set voicelength to the size of cast soundgraph + 0.01
- if the machineType = 256 then
- set voicelength to voicelength + (sample / 4)
- set voicestring to " " & voicestring
- set what to " " & what
- if soundBusy(1) or soundBusy(2) then
- set voicelength to voicelength + (sample / 2)
- set voicestring to " " & voicestring
- set what to " " & what
- end if
- end if
- set voicestep to float(voicelength * 60 / sample) / float(length(what))
- set voicelength to float(voicelength / sample) * 60.00001000000000317
- set oldtime to mouthoff
- set oldmouth to 20000
- set oldface to ddd
- set mouthoff to the timer
- voiceupkeep()
- set mouthoff to the timer
- end
-
- on PuppetVoice where, who, saywhat, what, sample
- global voicestate, mouthoff, voicegraph, soundgraph, voicestring, voicelength, voicespot, voicestep, oldtime, oldmouth, oldface, facespot, oldxface, oldyface, lastvoice, jellyjam
- if sample = 11 then
- set sample to 11025
- end if
- if sample = 22 then
- set sample to 22050
- end if
- set voicestate to 1
- if (lastvoice <> who) or (lastvoice = jellyjam) then
- set mouthindex to [2, 8, 6, 11, 3, 10, 6, 11, 2, 5, 6, 9, 8, 6, 4, 8, 7, 6, 6, 11, 5, 10, 7, 3, 6, 6, 1]
- set stuffumouth to [EMPTY, "A", "E", "O", "U", "C", "W", "M", "L", "F"]
- set tempmouth to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- repeat with xxx = 1 to 10
- set bbb to getAt(stuffumouth, xxx) & who
- set bee to the number of member bbb
- preLoadCast(bee)
- setAt(tempmouth, xxx, bee)
- end repeat
- set voicegraph to []
- repeat with xxx = 1 to 27
- set aaa to getAt(mouthindex, xxx)
- if aaa = 11 then
- set ccc to 0
- else
- set ccc to getAt(tempmouth, aaa)
- end if
- append(voicegraph, ccc)
- end repeat
- set lastvoice to who
- end if
- set soundgraph to the number of member saywhat
- set voicestring to what
- set oldxface to -2000
- set oldyface to -2000
- set facespot to integer(where / 100)
- set voicespot to where - (facespot * 100)
- set ddd to getAt(voicegraph, 27)
- if (soundgraph = -1) or (ddd = 0) then
- set voicestate to 0
- exit
- end if
- puppetSprite(voicespot, 1)
- set voicelength to the size of cast soundgraph + 0.01
- if the machineType = 256 then
- set voicelength to voicelength + (sample / 4)
- set voicestring to " " & voicestring
- set what to " " & what
- if soundBusy(1) or soundBusy(2) then
- set voicelength to voicelength + (sample / 2)
- set voicestring to " " & voicestring
- set what to " " & what
- end if
- end if
- set voicestep to float(voicelength * 60 / sample) / float(length(what))
- set voicelength to float(voicelength / sample) * 60.00001000000000317
- set oldtime to mouthoff
- set oldmouth to 20000
- set oldface to ddd
- puppetSound(saywhat)
- updateStage()
- set mouthoff to the timer
- voiceupkeep()
- set mouthoff to the timer
- end
-
- on voiceupkeep
- global voicestate, mouthoff, voicegraph, soundgraph, voicestring, voicelength, voicespot, voicestep, oldtime, oldmouth, oldface, facespot, oldxface, oldyface
- if voicestate = 1 then
- if facespot > 0 then
- set xxx to the locH of sprite facespot
- set yyy to the locV of sprite facespot
- if (xxx <> oldxface) or (yyy <> oldyface) then
- set the locH of sprite voicespot to xxx
- set the locV of sprite voicespot to yyy
- set oldxface to xxx
- set oldyface to yyy
- end if
- end if
- set timefor to the timer
- set ack to timefor - mouthoff
- if ack < 0 then
- set mouthoff to mouthoff - oldtime
- set ack to timefor - mouthoff
- end if
- if ack > (voicelength + 1) then
- novoice()
- exit
- end if
- set oldtime to timefor
- set pbsst to integer(ack / voicestep) + 1
- if pbsst = oldmouth then
- exit
- end if
- set oldmouth to pbsst
- set inchar to char pbsst of voicestring
- set invalue to charToNum(inchar)
- set newface to 0
- if inchar = " " then
- set newface to getAt(voicegraph, 27)
- else
- if (invalue > 64) and (invalue < 91) then
- set newface to getAt(voicegraph, invalue - 64)
- else
- if (invalue > 96) and (invalue < 124) then
- set newface to getAt(voicegraph, invalue - 96)
- end if
- end if
- end if
- if newface = 0 then
- set pink to random(13)
- if pink = 11 then
- set newface to getAt(voicegraph, 3)
- else
- if pink > 11 then
- set newface to getAt(voicegraph, 12)
- else
- set newface to getAt(voicegraph, 9)
- end if
- end if
- end if
- if (newface = 0) or (newface = oldface) then
- exit
- end if
- set the castNum of sprite voicespot to newface
- set oldface to newface
- end if
- end
-
- on ClearVoices
- global lastvoice, lastvoice2
- set lastvoice to "Illbedamned"
- set lastvoice2 to "Illbedamned"
- end
-
- on VoicePreset who
- global lastvoice, voicegraph
- if lastvoice <> who then
- set mouthindex to [2, 8, 6, 11, 3, 10, 6, 11, 2, 5, 6, 9, 8, 6, 4, 8, 7, 6, 6, 11, 5, 10, 7, 3, 6, 6, 1]
- set stuffumouth to [EMPTY, "A", "E", "O", "U", "C", "W", "M", "L", "F"]
- set tempmouth to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- repeat with xxx = 1 to 10
- set bbb to getAt(stuffumouth, xxx) & who
- set bee to the number of member bbb
- preLoadCast(bee)
- setAt(tempmouth, xxx, bee)
- end repeat
- set voicegraph to []
- repeat with xxx = 1 to 27
- set aaa to getAt(mouthindex, xxx)
- if aaa = 11 then
- set ccc to 0
- else
- set ccc to getAt(tempmouth, aaa)
- end if
- append(voicegraph, ccc)
- end repeat
- set lastvoice to who
- end if
- end
-
- on novoice Channel
- global voicestate, voicespot, voicegraph
- if voicestate > 0 then
- set the castNum of sprite voicespot to getAt(voicegraph, 27)
- set voicestate to 0
- if Channel = 2 then
- sound stop 2
- end if
- puppetSound(0)
- puppetSprite(voicespot, 0)
- end if
- end
-
- on ChannelVoice2 where2, who2, saywhat2, what2, sample2
- global voicestate2, mouthoff2, voicegraph2, soundgraph2, voicestring2, voicelength2, voicespot2, voicestep2, oldtime2, oldmouth2, oldface2, facespot2, oldxface2, oldyface2, lastvoice2
- if sample2 = 11 then
- set sample2 to 11025
- end if
- if sample2 = 22 then
- set sample2 to 22050
- end if
- set voicestate2 to 1
- if lastvoice2 <> who2 then
- set mouthindex2 to [2, 8, 6, 11, 3, 10, 6, 11, 2, 5, 6, 9, 8, 6, 4, 8, 7, 6, 6, 11, 5, 10, 7, 3, 6, 6, 1]
- set stuffumouth2 to [EMPTY, "A", "E", "O", "U", "C", "W", "M", "L", "F"]
- set tempmouth2 to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- repeat with xxx2 = 1 to 10
- set bbb2 to getAt(stuffumouth2, xxx2) & who2
- set bee2 to the number of member bbb2
- preLoadCast(bee2)
- setAt(tempmouth2, xxx2, bee2)
- end repeat
- set voicegraph2 to []
- repeat with xxx2 = 1 to 27
- set aaa2 to getAt(mouthindex2, xxx2)
- if aaa2 = 11 then
- set ccc2 to 0
- else
- set ccc2 to getAt(tempmouth2, aaa2)
- end if
- append(voicegraph2, ccc2)
- end repeat
- set lastvoice2 to who2
- end if
- set soundgraph2 to the number of member saywhat2
- set voicestring2 to what2
- set oldxface2 to -2000
- set oldyface2 to -2000
- set facespot2 to integer(where2 / 100)
- set voicespot2 to where2 - (facespot2 * 100)
- set ddd2 to getAt(voicegraph2, 27)
- if (soundgraph2 = 0) or (ddd2 = 0) then
- set voicestate2 to 0
- exit
- end if
- puppetSprite(voicespot2, 1)
- set voicelength2 to the size of cast soundgraph2 + 0.01
- if the machineType = 256 then
- set voicelength2 to voicelength2 + (sample2 / 4)
- set voicestring2 to " " & voicestring2
- set what2 to " " & what2
- if soundBusy(1) or soundBusy(2) then
- set voicelength2 to voicelength2 + (sample2 / 2)
- set voicestring2 to " " & voicestring2
- set what2 to " " & what2
- end if
- end if
- set voicestep2 to float(voicelength2 * 60 / sample2) / float(length(what2))
- set voicelength2 to float(voicelength2 / sample2) * 60.00001000000000317
- set oldtime2 to mouthoff2
- set oldmouth2 to 20000
- set oldface2 to ddd2
- set mouthoff2 to the timer
- voiceupkeep2()
- set mouthoff2 to the timer
- end
-
- on PuppetVoice2 where2, who2, saywhat2, what2, sample2
- global voicestate2, mouthoff2, voicegraph2, soundgraph2, voicestring2, voicelength2, voicespot2, voicestep2, oldtime2, oldmouth2, oldface2, facespot2, oldxface2, oldyface2, lastvoice2
- if sample2 = 11 then
- set sample2 to 11025
- end if
- if sample2 = 22 then
- set sample2 to 22050
- end if
- set voicestate2 to 1
- if lastvoice2 <> who2 then
- set mouthindex2 to [2, 8, 6, 11, 3, 10, 6, 11, 2, 5, 6, 9, 8, 6, 4, 8, 7, 6, 6, 11, 5, 10, 7, 3, 6, 6, 1]
- set stuffumouth2 to [EMPTY, "A", "E", "O", "U", "C", "W", "M", "L", "F"]
- set tempmouth2 to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- repeat with xxx2 = 1 to 10
- set bbb2 to getAt(stuffumouth2, xxx2) & who2
- set bee2 to the number of member bbb2
- preLoadCast(bee2)
- setAt(tempmouth2, xxx2, bee2)
- end repeat
- set voicegraph2 to []
- repeat with xxx2 = 1 to 27
- set aaa2 to getAt(mouthindex2, xxx2)
- if aaa2 = 11 then
- set ccc2 to 0
- else
- set ccc2 to getAt(tempmouth2, aaa2)
- end if
- append(voicegraph2, ccc2)
- end repeat
- set lastvoice2 to who2
- end if
- set soundgraph2 to the number of member saywhat2
- set voicestring2 to what2
- set oldxface2 to -2000
- set oldyface2 to -2000
- set facespot2 to integer(where2 / 100)
- set voicespot2 to where2 - (facespot2 * 100)
- set ddd2 to getAt(voicegraph2, 27)
- if (soundgraph2 = 0) or (ddd2 = 0) then
- novoice2()
- exit
- end if
- puppetSprite(voicespot2, 1)
- set voicelength2 to the size of cast soundgraph2 + 0.01
- if the machineType = 256 then
- set voicelength2 to voicelength2 + (sample2 / 4)
- set voicestring2 to " " & voicestring2
- set what2 to " " & what2
- if soundBusy(1) or soundBusy(2) then
- set voicelength2 to voicelength2 + (sample2 / 2)
- set voicestring2 to " " & voicestring2
- set what2 to " " & what2
- end if
- end if
- set voicestep2 to float(voicelength2 * 60 / sample2) / float(length(what2))
- set voicelength2 to float(voicelength2 / sample2) * 60.00001000000000317
- set oldtime2 to mouthoff2
- set oldmouth2 to 20000
- set oldface2 to ddd2
- puppetSound(saywhat2)
- updateStage()
- set mouthoff2 to the timer
- voiceupkeep2()
- set mouthoff2 to the timer
- end
-
- on voiceupkeep2
- global voicestate2, mouthoff2, voicegraph2, soundgraph2, voicestring2, voicelength2, voicespot2, voicestep2, oldtime2, oldmouth2, oldface2, facespot2, oldxface2, oldyface2
- if voicestate2 = 1 then
- if facespot2 > 0 then
- set xxx2 to the locH of sprite facespot2
- set yyy2 to the locV of sprite facespot2
- if (xxx2 <> oldxface2) or (yyy2 <> oldyface2) then
- set the locH of sprite voicespot2 to xxx2
- set the locV of sprite voicespot2 to yyy2
- set oldxface2 to xxx2
- set oldyface2 to yyy2
- end if
- end if
- set timefor2 to the timer
- set ack2 to timefor2 - mouthoff2
- if ack2 < 0 then
- set mouthoff2 to mouthoff2 - oldtime2
- set ack2 to timefor2 - mouthoff2
- end if
- if ack2 > (voicelength2 + 1) then
- novoice2()
- exit
- end if
- set oldtime2 to timefor2
- set pbsst2 to integer(ack2 / voicestep2) + 1
- if pbsst2 = oldmouth2 then
- exit
- end if
- set oldmouth2 to pbsst2
- set inchar2 to char pbsst2 of voicestring2
- set invalue2 to charToNum(inchar2)
- set newface2 to 0
- if inchar2 = " " then
- set newface2 to getAt(voicegraph2, 27)
- else
- if (invalue2 > 64) and (invalue2 < 91) then
- set newface2 to getAt(voicegraph2, invalue2 - 64)
- else
- if (invalue2 > 96) and (invalue2 < 124) then
- set newface2 to getAt(voicegraph2, invalue2 - 96)
- end if
- end if
- end if
- if newface2 = 0 then
- set pink2 to random(13)
- if pink2 = 11 then
- set newface2 to getAt(voicegraph2, 3)
- else
- if pink2 > 11 then
- set newface2 to getAt(voicegraph2, 12)
- else
- set newface2 to getAt(voicegraph2, 9)
- end if
- end if
- end if
- if (newface2 = 0) or (newface2 = oldface2) then
- exit
- end if
- set the castNum of sprite voicespot2 to newface2
- set oldface2 to newface2
- end if
- end
-
- on VoicePreset2 who2
- global lastvoice2, voicegraph2
- if lastvoice2 <> who2 then
- set mouthindex2 to [2, 8, 6, 11, 3, 10, 6, 11, 2, 5, 6, 9, 8, 6, 4, 8, 7, 6, 6, 11, 5, 10, 7, 3, 6, 6, 1]
- set stuffumouth2 to [EMPTY, "A", "E", "O", "U", "C", "W", "M", "L", "F"]
- set tempmouth2 to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- repeat with xxx2 = 1 to 10
- set bbb2 to getAt(stuffumouth2, xxx2) & who2
- set bee2 to the number of member bbb2
- preLoadCast(bee2)
- setAt(tempmouth2, xxx2, bee2)
- end repeat
- set voicegraph2 to []
- repeat with xxx2 = 1 to 27
- set aaa2 to getAt(mouthindex2, xxx2)
- if aaa2 = 11 then
- set ccc2 to 0
- else
- set ccc2 to getAt(tempmouth2, aaa2)
- end if
- append(voicegraph2, ccc2)
- end repeat
- set lastvoice2 to who2
- end if
- end
-
- on novoice2 Channel2
- global voicestate2, voicespot2, voicegraph2
- if voicestate2 > 0 then
- set the castNum of sprite voicespot2 to getAt(voicegraph2, 27)
- set voicestate2 to 0
- if Channel2 = 2 then
- sound stop 2
- end if
- puppetSound(0)
- puppetSprite(voicespot2, 0)
- end if
- end
-