\n"..GroundsTime,nil,370,2,60,60, 0xffffff, 0x000001,1,true)
if GroundsTime == 3 then
tfm.exec.addPhysicObject(0, 800,780, {type = 3, restitution = 0, friction = 0.3, width = 1000, height = 40, groundCollision = false, miceCollision = false})
tfm.exec.addPhysicObject(1, 360,780, {type = 12, color = 0xff0000, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(2, 650,780, {type = 12, color = 0x0000ff, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(3, 950,780, {type = 12, color = 0xffff00, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(4, 1240,780, {type = 12, color = 0x00ff00, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
end
if GroundsTime == 0 then
ui.removeTextArea(1)
tfm.exec.addPhysicObject(0, 800,780, {type = 3, restitution = 0, friction = 0.3, width = 1000, height = 40, groundCollision = false, miceCollision = false})
tfm.exec.removePhysicObject(1)
tfm.exec.removePhysicObject(2)
tfm.exec.removePhysicObject(3)
tfm.exec.removePhysicObject(4)
if RealGround == 1 then
tfm.exec.addPhysicObject(1, 360,780, {type = 12, color = 0xff0000, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
end
if RealGround == 2 then
tfm.exec.addPhysicObject(2, 650,780, {type = 12, color = 0x0000ff, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
end
if RealGround == 3 then
tfm.exec.addPhysicObject(3, 950,780, {type = 12, color = 0xffff00, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
end
if RealGround == 4 then
tfm.exec.addPhysicObject(4, 1240,780, {type = 12, color = 0x00ff00, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
end
end
end
--
T1 = 0
end -- 1sec
-- every 0.5sec --
if Randomevent == 12 then
for name in next, tfm.get.room.playerList do
SBCD[name] = SBCD[name] + 1
end
end
if CTime == 9 and Randomevent == 11 then
for name in next, tfm.get.room.playerList do
if tfm.get.room.playerList[name].movingRight == true then
tfm.exec.killPlayer(name)
end
if tfm.get.room.playerList[name].movingLeft == true then
tfm.exec.killPlayer(name)
end
if tfm.get.room.playerList[name].isJumping == true then
tfm.exec.killPlayer(name)
end
end
end
if CTime == 2 and Clicked == 1 then
AcidRain = 0
for name in next, tfm.get.room.playerList do
if tfm.get.room.playerList[name].isVampire == true then
tfm.exec.setVampirePlayer(clicker, false)
tfm.exec.killPlayer(name)
tfm.exec.removePhysicObject(1)
tfm.exec.removePhysicObject(2)
tfm.exec.removePhysicObject(3)
tfm.exec.removePhysicObject(4)
tfm.exec.removePhysicObject(5)
end
end
end
if CTime <= 0 and Clicked == 1 then
tfm.exec.removeImage(Boff)
tfm.exec.removeImage(Bon)
Bon = tfm.exec.addImage("1875b7f1e29.png","_1",785,720)
ui.addTextArea(0," ",nil,780,710,35,30, 0x111111, 0x000000,0)
eventTimeIsUp()
eventResetVariables()
end
---
if AcidRain == 1 then
RainBlockID = RainBlockID + 3
tfm.exec.addPhysicObject(RainBlockID, (math.random(380,1220)),400 -40, {type = 19, restitution = 0, friction = 0, width = 10, height = 20, dynamic = true, mass = 9999, fixedRotation = true, angularDamping = RainSpeed, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(RainBlockID + 1, (math.random(380,1220)),400 -80, {type = 19, restitution = 0, friction = 0, width = 10, height = 20, dynamic = true, mass = 9999, fixedRotation = true, angularDamping = RainSpeed, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(RainBlockID + 2, (math.random(380,1220)),400 -120, {type = 19, restitution = 0, friction = 0, width = 10, height = 20, dynamic = true, mass = 9999, fixedRotation = true, angularDamping = RainSpeed, groundCollision = false, miceCollision = true})
tfm.exec.addImage("1855a945ec1.png","+"..RainBlockID,-5,-10)
tfm.exec.addImage("1855a945ec1.png","+"..RainBlockID +1,-5,-10)
tfm.exec.addImage("1855a945ec1.png","+"..RainBlockID +2,-5,-10)
end
end -- Loop-0
function eventKeyboard(name, key, down, x, y) -- Keys
if Randomevent == 11 then
tfm.exec.killPlayer(name)
end
if Randomevent == 12 and key == 3 then
if tfm.get.room.playerList[name].isDead == false and SBCD[name] >= 2 then
if tfm.get.room.playerList[name].isFacingRight == true then
tfm.exec.addShamanObject(17, x-25, y+25,90,3,-1)
end
if tfm.get.room.playerList[name].isFacingRight == false then
tfm.exec.addShamanObject(17, x+25, y+25,270,-3,-1)
end
SBCD[name] = 0
end
end
end -- Keys
function eventTimeIsUp() -- Time's UP
if Randomevent == 1 then
tfm.exec.removePhysicObject(0)
tfm.exec.addPhysicObject(0, 800,780, {type = 6, restitution = 0, friction = 0.3, width = 1200, height = 40, groundCollision = true, miceCollision = true})
end
if Randomevent == 2 then
for name in next, tfm.get.room.playerList do
tfm.exec.respawnPlayer(name)
tfm.exec.setShaman(name, false)
end
end
if Randomevent == 3 then
tfm.exec.removePhysicObject(0)
tfm.exec.removePhysicObject(1)
tfm.exec.removePhysicObject(2)
tfm.exec.removePhysicObject(3)
tfm.exec.removePhysicObject(4)
tfm.exec.addPhysicObject(0, 800,780, {type = 6, restitution = 0, friction = 0.3, width = 1200, height = 40, groundCollision = true, miceCollision = true})
end
if Randomevent == 7 then
tfm.exec.removePhysicObject(1)
tfm.exec.removePhysicObject(2)
tfm.exec.removePhysicObject(3)
tfm.exec.removePhysicObject(4)
tfm.exec.removePhysicObject(5)
end
if Randomevent == 9 then
tfm.exec.addPhysicObject(0, 800,780, {type = 6, restitution = 0, friction = 0.3, width = 1200, height = 40, groundCollision = true, miceCollision = true})
tfm.exec.removePhysicObject(1)
end
if Randomevent == 10 then
ui.addTextArea(0," ",nil,780,710,35,30, 0x111111, 0x000000,0)
end
if Randomevent == 12 then
tfm.exec.removePhysicObject(1)
tfm.exec.removePhysicObject(2)
tfm.exec.removePhysicObject(3)
tfm.exec.removePhysicObject(4)
tfm.exec.addPhysicObject(0, 800,780, {type = 6, restitution = 0, friction = 0.3, width = 1200, height = 40, groundCollision = true, miceCollision = true})
end
if Randomevent == 14 then
tfm.exec.removeObject(HeavyBox1)
tfm.exec.addPhysicObject(0, 800,780, {type = 6, restitution = 0, friction = 0.3, width = 1200, height = 40, groundCollision = true, miceCollision = true})
end
---
for name in next, tfm.get.room.playerList do
if tfm.get.room.playerList[name].isDead == false then
OriginalScore[name] = OriginalScore[name] + 1
tfm.exec.setPlayerScore(name, OriginalScore[name])
end
end
tfm.exec.setUIMapName(RoomName)
if Randomevent == 8 then
eventMainMap()
end
for name in next, tfm.get.room.playerList do
tfm.exec.respawnPlayer(name)
end
end -- Time's UP
function chooseRandomEvent(clicker) -- Random-Event
Randomevent = (math.random(1,14))
--
if Randomevent == 1 then
tfm.exec.chatMessage(MREN1)
CTime = 30
tfm.exec.setUIMapName(REN1)
tfm.exec.setGameTime(32)
RainSpeed = (math.random(0,15) / 10)
RainBlockID = 0
AcidRain = 1
tfm.exec.removePhysicObject(0)
tfm.exec.addPhysicObject(0, 800,780, {type = 6, restitution = 0, friction = 0.3, width = 800, height = 40, groundCollision = true, miceCollision = true})
end
if Randomevent == 2 then
tfm.exec.chatMessage(MREN2)
CTime = 30
tfm.exec.setUIMapName(REN2)
tfm.exec.setGameTime(32)
for name in next, tfm.get.room.playerList do
tfm.exec.setShamanMode(name, 0)
tfm.exec.setShaman(name, true)
tfm.exec.setShamanMode(name, 0)
end
end
if Randomevent == 3 then
tfm.exec.chatMessage(MREN3)
CTime = 30
tfm.exec.setUIMapName(REN3)
tfm.exec.setGameTime(32)
RealGround = (math.random(1,4))
GroundsTime = 20
tfm.exec.addPhysicObject(1, 360,780, {type = 12, color = 0xff0000, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(2, 650,780, {type = 12, color = 0x0000ff, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(3, 950,780, {type = 12, color = 0xffff00, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(4, 1240,780, {type = 12, color = 0x00ff00, restitution = 0, friction = 0, width = 120, height = 40, groundCollision = false, miceCollision = true})
end
if Randomevent == 4 then
tfm.exec.chatMessage(MREN4)
CTime = 30
tfm.exec.setUIMapName(REN4)
tfm.exec.setGameTime(32)
tfm.exec.setVampirePlayer(clicker, true)
tfm.exec.addPhysicObject(1, 550,700, {type = 10, color = 0xff0000, restitution = 0, friction = 0.3, width = 120, height = 40, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(2, 1050,700, {type = 10, color = 0x0000ff, restitution = 0, friction = 0.3, width = 120, height = 40, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(3, 300,700, {type = 10, color = 0xffff00, restitution = 0, friction = 0.3, width = 120, height = 40, groundCollision = true, miceCollision = true})
tfm.exec.addPhysicObject(4, 1300,700, {type = 10, color = 0x00ff00, restitution = 0, friction = 0.3, width = 120, height = 40, groundCollision = true, miceCollision = true})
tfm.exec.addPhysicObject(5, 800,660, {type = 10, restitution = 0, friction = 0.3, width = 200, height = 40, groundCollision = true, miceCollision = true})
end
if Randomevent == 5 then
tfm.exec.chatMessage(MREN5)
CTime = 7
tfm.exec.setUIMapName(REN5)
tfm.exec.setGameTime(8)
tfm.exec.addShamanObject(40, 800, 600)
end
if Randomevent == 6 then
CTime = 7
tfm.exec.setUIMapName(REN6)
tfm.exec.chatMessage(MREN6)
tfm.exec.setGameTime(8)
tfm.exec.addShamanObject(40, 560, 760)
tfm.exec.addShamanObject(40, 680, 760)
tfm.exec.addShamanObject(40, 800, 760)
tfm.exec.addShamanObject(40, 920, 760)
tfm.exec.addShamanObject(40, 1040, 760)
end
if Randomevent == 7 then
CTime = 15
tfm.exec.setUIMapName(REN7)
tfm.exec.chatMessage(MREN7)
tfm.exec.setGameTime(16)
tfm.exec.addPhysicObject(1, 1200,660, {type = 12, color = 0x000000, restitution = 0, friction = 0.04, width = 40, height = 200, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(2, 980,580, {type = 12, color = 0x000000, restitution = 0, friction = 0.04, width = 40, height = 40, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(3, 800,580, {type = 12, color = 0x000000, restitution = 0, friction = 0.04, width = 40, height = 40, groundCollision = false, miceCollision = true, contactListener = true})
tfm.exec.addPhysicObject(4, 400,660, {type = 12, color = 0x000000, restitution = 0, friction = 0.04, width = 40, height = 200, groundCollision = false, miceCollision = true})
tfm.exec.addPhysicObject(5, 620,580, {type = 12, color = 0x000000, restitution = 0, friction = 0, width = 40, height = 40, groundCollision = false, miceCollision = true})
end
if Randomevent == 8 then
tfm.exec.chatMessage(MREN8)
CTime = 30
tfm.exec.newGame([[