Code: Select all
-- All glory to God, Jesus Christ, and the Holy Spirit.
function playSong(song)
if song == "zombies" then
minetest.sound_play("zombies", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "prison" then
minetest.sound_play("prison", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "cell_outbreak" then
minetest.sound_play("cell_outbreak", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "surviving_for_a_while" then
minetest.sound_play("surviving_for_a_while", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "campsite" then
minetest.sound_play("campsite", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "five" then
minetest.sound_play("five", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "hotel" then
minetest.sound_play("hotel", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "jungle" then
minetest.sound_play("jungle", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "shelter" then
minetest.sound_play("shelter", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "survival" then
minetest.sound_play("survival", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "the_pentagon_is_under_attack" then
minetest.sound_play("the_pentagon_is_under_attack", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "the_president_is_missing" then
minetest.sound_play("the_president_is_missing", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "the_swarm" then
minetest.sound_play("the_swarm", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "tomb" then
minetest.sound_play("tomb", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
if song == "vanclerie" then
minetest.sound_play("vanclerie", { pos = {x=0, y=0, z=0}, max_hear_distance = 31000, gain = 1.0, })
end
end
function GetRandomSong()
if DataPointMap.MapToPlay == "prison" then
selection = math.random(1,11)
if selection == 1 then
playSong("zombies")
end
if selection == 2 then
playSong("prison")
end
if selection == 3 then
playSong("cell_outbreak")
end
if selection == 4 then
playSong("zombies")
end
if selection == 5 then
playSong("prison")
end
if selection == 6 then
playSong("cell_outbreak")
end
if selection == 7 then
playSong("zombies")
end
if selection == 8 then
playSong("prison")
end
if selection == 9 then
playSong("cell_outbreak")
end
if selection == 10 then
playSong("prison")
end
if selection == 11 then
playSong("surviving_for_a_while")
end
end
if DataPointMap.MapToPlay == "hotel" then
selection = math.random(1,11)
if selection == 1 then
playSong("zombies")
end
if selection == 2 then
playSong("hotel")
end
if selection == 3 then
playSong("hotel")
end
if selection == 4 then
playSong("zombies")
end
if selection == 5 then
playSong("hotel")
end
if selection == 6 then
playSong("hotel")
end
if selection == 7 then
playSong("zombies")
end
if selection == 8 then
playSong("hotel")
end
if selection == 9 then
playSong("hotel")
end
if selection == 10 then
playSong("hotel")
end
if selection == 11 then
playSong("surviving_for_a_while")
end
end
if DataPointMap.MapToPlay == "jungle" then
selection = math.random(1,11)
if selection == 1 then
playSong("zombies")
end
if selection == 2 then
playSong("jungle")
end
if selection == 3 then
playSong("jungle")
end
if selection == 4 then
playSong("jungle")
end
if selection == 5 then
playSong("jungle")
end
if selection == 6 then
playSong("jungle")
end
if selection == 7 then
playSong("zombies")
end
if selection == 8 then
playSong("jungle")
end
if selection == 9 then
playSong("jungle")
end
if selection == 10 then
playSong("jungle")
end
if selection == 11 then
playSong("surviving_for_a_while")
end
end
if DataPointMap.MapToPlay == "campsite" then
selection = math.random(1,11)
if selection == 1 then
playSong("zombies")
end
if selection == 2 then
playSong("campsite")
end
if selection == 3 then
playSong("campsite")
end
if selection == 4 then
playSong("zombies")
end
if selection == 5 then
playSong("campsite")
end
if selection == 6 then
playSong("campsite")
end
if selection == 7 then
playSong("zombies")
end
if selection == 8 then
playSong("campsite")
end
if selection == 9 then
playSong("campsite")
end
if selection == 10 then
playSong("campsite")
end
if selection == 11 then
playSong("surviving_for_a_while")
end
end
if DataPointMap.MapToPlay == "shelter" then
selection = math.random(1,11)
if selection == 1 then
playSong("zombies")
end
if selection == 2 then
playSong("shelter")
end
if selection == 3 then
playSong("shelter")
end
if selection == 4 then
playSong("zombies")
end
if selection == 5 then
playSong("shelter")
end
if selection == 6 then
playSong("shelter")
end
if selection == 7 then
playSong("zombies")
end
if selection == 8 then
playSong("shelter")
end
if selection == 9 then
playSong("shelter")
end
if selection == 10 then
playSong("shelter")
end
if selection == 11 then
playSong("surviving_for_a_while")
end
end
if DataPointMap.MapToPlay == "tomb" then
selection = math.random(1,11)
if selection == 1 then
playSong("the_swarm")
end
if selection == 2 then
playSong("survival")
end
if selection == 3 then
playSong("tomb")
end
if selection == 4 then
playSong("the_swarm")
end
if selection == 5 then
playSong("survival")
end
if selection == 6 then
playSong("tomb")
end
if selection == 7 then
playSong("the_swarm")
end
if selection == 8 then
playSong("tomb")
end
if selection == 9 then
playSong("tomb")
end
if selection == 10 then
playSong("tomb")
end
if selection == 11 then
playSong("surviving_for_a_while")
end
end
if DataPointMap.MapToPlay == "vanclerie" then
selection = math.random(1,11)
if selection == 1 then
playSong("the_swarm")
end
if selection == 2 then
playSong("survival")
end
if selection == 3 then
playSong("vanclerie")
end
if selection == 4 then
playSong("the_swarm")
end
if selection == 5 then
playSong("survival")
end
if selection == 6 then
playSong("the_president_is_missing")
end
if selection == 7 then
playSong("the_swarm")
end
if selection == 8 then
playSong("vanclerie")
end
if selection == 9 then
playSong("the_president_is_missing")
end
if selection == 10 then
playSong("vanclerie")
end
if selection == 11 then
playSong("surviving_for_a_while")
end
end
if DataPointMap.MapToPlay == "five" then
selection = math.random(1,11)
if selection == 1 then
playSong("the_swarm")
end
if selection == 2 then
playSong("survival")
end
if selection == 3 then
playSong("five")
end
if selection == 4 then
playSong("five")
end
if selection == 5 then
playSong("survival")
end
if selection == 6 then
playSong("the_pentagon_is_under_attack")
end
if selection == 7 then
playSong("the_swarm")
end
if selection == 8 then
playSong("five")
end
if selection == 9 then
playSong("the_pentagon_is_under_attack")
end
if selection == 10 then
playSong("five")
end
if selection == 11 then
playSong("surviving_for_a_while")
end
-- added
end
-- added
end