Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- sets the difficulty level of the area the player is in
- areaDifficulty = 10
- -- timer for spawning new mobs
- mobTimer = 120
- -- player"playerName"lvlxx
- endPlayerName = string.len(event[4]) - 5
- playerName = string.sub(event[4],6,endPlayerName)
- playerLevel = string.sub(event[4],endPlayerName,string.len(event[4]))
- while true do
- os.startTimer(5)
- mobTimer = mobTimer - 5
- event = { os.pullEvent() }
- if string.sub(event[4],0,6) == "player" and event[5]<20 and event[5]>10 and event[1] == "modem_message" then
- if mobTimer > 60
- mobTimer = mobTimer - 1
- timer = nil
- timer = os.startTimer(5)
- elseif mobTimer < 10
- if areadifficulty + 1 < playerLevel/3
- math.randomseed(os.time())
- local diceRoll = math.random(100)
- if diceRoll < 40 then
- mobTimer - 1
- elseif diceRoll < 60 and diceRoll > 40 then
- spawnMediumHostile()
- mobTimer = 150
- elseif diceRoll > 60
- spawnHardHostile()
- mobTimer = 210
- end
- elseif areadifficulty + 1 < playerLevel/2
- math.randomseed(os.time())
- local diceRoll = math.random(100)
- if diceRoll < 20 then
- mobTimer - 1
- elseif diceRoll < 60 and diceRoll > 20 then
- spawnMediumHostile()
- mobTimer = 150
- elseif diceRoll > 60 and diceRoll < 70
- spawnEasyHostile()
- mobTimer = 90
- elseif diceRoll > 70
- spawnHardHostile()
- mobTimer = 210
- end
- elseif areadifficulty + 1 < playerLevel/1.5
- math.randomseed(os.time())
- local diceRoll = math.random(100)
- if diceRoll < 20 then
- mobTimer - 1
- elseif diceRoll < 50 and diceRoll > 20 then
- spawnMediumHostile()
- mobTimer = 150
- elseif diceRoll > 80 and diceRoll < 50
- spawnEasyHostile()
- mobTimer = 90
- elseif diceRoll > 80
- spawnHardHostile()
- mobTimer = 210
- end
- elseif areadifficulty + 1 < playerLevel
- math.randomseed(os.time())
- local diceRoll = math.random(100)
- if diceRoll < 30 then
- mobTimer - 1
- elseif diceRoll < 50 and diceRoll > 30 then
- spawnMediumHostile()
- mobTimer = 150
- elseif diceRoll > 95 and diceRoll < 50
- spawnEasyHostile()
- mobTimer = 90
- elseif diceRoll > 95
- spawnHardHostile()
- mobTimer = 210
- end
- elseif areadifficulty + 1 < playerLevel/2
- math.randomseed(os.time())
- local diceRoll = math.random(100)
- if diceRoll < 20 then
- mobTimer - 1
- elseif diceRoll < 30 and diceRoll > 20 then
- spawnMediumHostile()
- mobTimer = 150
- elseif diceRoll < 40
- spawnEasyHostile()
- mobTimer = 90
- end
- end
- end
- elseif event[1] == "timer" then
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement