Scn AAAMusikWürfelScript
short Choosing
short button
float timer
short playerflag
Begin onActivate player
if Choosing == 0
set Choosing to -1
endif
end
Begin onEquip player
if Choosing == 0
set Choosing to -1
endif
end
Begin gameMode
If (Choosing == -1)
if getcontainer == player
MessageBox "Was möchtet ihr tun?", "Ablegen", "Musik auswählen", "Fertig"
set playerflag to 1
else
MessageBox "Was möchtet ihr tun?", "Nehmen", "Musik auswählen", "Fertig"
set playerflag to 0
endif
set Choosing to 1
return
elseif (Choosing == 1)
set button to GetButtonPressed
if (button== -1)
return
elseif (button == 0)
if playerflag == 0
Activate
else
dropme
endif
Set Choosing to 0
elseif (button == 1)
Set Choosing to -2
elseif (button == 2)
Set Choosing to 0
endif
Endif
If (Choosing == -2)
MessageBox "Welche Musik möchtet ihr hören?", "Lied 1", "Lied 2", "Lied 3", "Lied 4", "Lied 5", "Zurück", "Abbrechen"
set Choosing to 2
return
elseif (Choosing == 2)
set button to GetButtonPressed
if (button == -1)
return
elseif (button == 5)
Set Choosing to -1
elseif (button == 6)
Set Choosing to 0
else
StreamMusic random
set Choosing to 3
set timer to 2
return
endif
elseif (Choosing == 3)
if timer > 0
set timer to timer - getsecondspassed
return
endif
if (button == 0)
StreamMusic "Data\Music\Eydis\Lied_1.mp3"
elseif (button == 1)
StreamMusic "Data\Music\Eydis\Lied_2.mp3"
elseif (button == 2)
StreamMusic "Data\Music\Eydis\Lied_3.mp3"
elseif (button == 3)
StreamMusic "Data\Music\Eydis\Lied_4.mp3"
elseif (button == 4)
StreamMusic "Data\Music\Eydis\Lied_5.mp3"
endif
set Choosing to 0
Endif
End
Begin menuMode
If (Choosing == -1)
if getcontainer == player
MessageBox "Was möchtet ihr tun?", "Ablegen", "Musik auswählen", "Fertig"
set playerflag to 1
else
MessageBox "Was möchtet ihr tun?", "Nehmen", "Musik auswählen", "Fertig"
set playerflag to 0
endif
set Choosing to 1
return
elseif (Choosing == 1)
set button to GetButtonPressed
if (button== -1)
return
elseif (button == 0)
if playerflag == 0
Activate
else
dropme
endif
Set Choosing to 0
elseif (button == 1)
Set Choosing to -2
elseif (button == 2)
Set Choosing to 0
endif
Endif
If (Choosing == -2)
MessageBox "Welche Musik möchtet ihr hören?", "Lied 1", "Lied 2", "Lied 3", "Lied 4", "Lied 5", "Zurück", "Abbrechen"
set Choosing to 2
return
elseif (Choosing == 2)
set button to GetButtonPressed
if (button == -1)
return
elseif (button == 5)
Set Choosing to -1
elseif (button == 6)
Set Choosing to 0
else
StreamMusic random
set Choosing to 3
set timer to 2
return
endif
elseif (Choosing == 3)
if timer > 0
set timer to timer - getsecondspassed
return
endif
if (button == 0)
StreamMusic "Data\Music\Eydis\Lied_1.mp3"
elseif (button == 1)
StreamMusic "Data\Music\Eydis\Lied_2.mp3"
elseif (button == 2)
StreamMusic "Data\Music\Eydis\Lied_3.mp3"
elseif (button == 3)
StreamMusic "Data\Music\Eydis\Lied_4.mp3"
elseif (button == 4)
StreamMusic "Data\Music\Eydis\Lied_5.mp3"
endif
set Choosing to 0
Endif
End