Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ OLDSURVIVOR, escrito por eshkation ]]--
- tfm.exec.disableAllShamanSkills(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoNewGame(true)
- system.maps = {
- {2644055, "151216fa793.png", 0, -2, 999},
- {2644040, "1512176c14f.png", 0, -2, 999},
- {2644273, "151217fd47a.png", 0, -2, 999},
- {2644268, "151218194c7.png", 0, -2, 999},
- {2644264, "15121844a01.png", 0, -2, 999},
- {2644260, "1512185bfff.png", 2, -2, 999},
- {2644248, "15121897b2e.png", 0, -2, 999},
- {2644246, "151218cee5f.png", 0, -2, 999},
- {2644229, "151218e737c.png", 0, -2, 999},
- {2644226, "15121906391.png", 0, -2, 999},
- {2644222, "1512192bca9.png", 0, -2, 6},
- {2644212, "1512195b56a.png", 0, -2, 999},
- {2644199, "1512196ee98.png", 0, -2, 999},
- {2644171, "15121987e04.png", 0, -2, 2},
- {2644164, "1512199d51d.png", 0, -2, 999},
- {2644153, "151219c3718.png", 0, -2, 999},
- {2644150, "15121a01814.png", 0, -2, 999},
- {2644117, "15121a11450.png", 0, -2, 999},
- {2644108, "1512524c2d9.png", 0, -2, 999},
- {2644090, "151223c3bb4.png", 0, -3, 999},
- {2644074, "151223e43f0.png", 0, -25, 999},
- {2644065, "15122410feb.png", 0, -2, 999},
- {2644060, "1512243226f.png", 0, -2, 999},
- {2644026, "15122494505.png", -6, -13, 999},
- {2644019, "151224e0d27.png", 0, -2, 999},
- {2644028, "15125270d51.png", 0, -2, 999},
- {2644017, "15125282e49.png", 0, -2, 999},
- {2644015, "15125295aa0.png", 0, -2, 999},
- {2644010, "151252ae7fe.png", 0, -2, 999},
- {2644007, "151252b9fa9.png", 0, -2, 999},
- {2644004, "151252c5014.png", 0, -2, 999},
- {2644001, "1512530727a.png", 0, -62, 999},
- {2643998, "15125338b29.png", -2, -2, 999},
- {2643993, "15125361f21.png", -3, -2, 999},
- {2643985, "1512537707b.png", -2, -2, 999},
- {2643980, "15125383cec.png", -3, -2, 999},
- {2643977, "151253a30d7.png", 0, -2, 999},
- {6359710, "151253c1ee5.png", -2, -20, 999},
- {2643968, "151253f357a.png", -2, -20, 999},
- {2643966, "1512540110b.png", -2, -20, 999},
- {2643964, "15125414f94.png", -8, -19, 999},
- {2643955, "1512543ecb1.png", -8, -19, 999},
- {2643952, "15125447b14.png", -8, -19, 999},
- {2643948, "15125453b17.png", -8, -19, 999},
- {2643946, "1512ae198e5.png", -8, -2, 999},
- {2643943, "1512ae31b53.png", -8, -2, 999},
- {2643940, "1512ae3f71b.png", -8, -2, 999},
- {2643935, "1512ae4a995.png", -8, -2, 999},
- {2643931, "1512ae5de0a.png", -8, -2, 999},
- {2643926, "1512ae6b258.png", -8, -2, 999},
- {2643923, "1512ae7e0e6.png", -8, -2, 999},
- {2643920, "1512ae934eb.png", -8, -2, 999},
- {2643914, "1512ae9dfaf.png", -8, -2, 999},
- {2643909, "1512aea9fc4.png", -8, -2, 999},
- {2643907, "1512aeb7d58.png", -8, -2, 999},
- {2643904, "1512aec7142.png", -8, -2, 999},
- {2643899, "1512aed34b0.png", -8, -2, 999},
- {2643896, "1512af8a81a.png", -8, -2, 999},
- {2643892, "1512af9e409.png", -8, -2, 999},
- {2643889, "1512afaeb5a.png", -8, -2, 999},
- {2643886, "1512afcbc8e.png", -8, -2, 999},
- {2643884, "1512aff0c4e.png", -8, -2, 999},
- {2643875, "1512b00839c.png", -8, -2, 999},
- {2643870, "1512b0269b7.png", -8, -2, 999},
- {2643864, "1512b0555f4.png", -8, -2, 999},
- {2643856, "1512b075891.png", -8, -2, 999},
- {2643849, "1512b07c486.png", -8, -2, 999},
- {2643846, "1512b08391d.png", -8, -2, 999},
- {2643839, "1512b0a130e.png", -8, -2, 999},
- {2643833, "1512b0af4c9.png", -8, -2, 999},
- {2643829, "1512b0b950b.png", -8, -2, 999},
- {2643824, "1512b0cee70.png", -8, -2, 999},
- {2643820, "1512b0df456.png", -8, -2, 999},
- {2643816, "1512b0e91ea.png", -8, -2, 999},
- {2643804, "1512b0f2a46.png", -8, -2, 999},
- {2643799, "1512b0fbe29.png", -8, -2, 999},
- {2643792, "1512b107b0c.png", -8, -2, 999}
- }
- system.messages = {
- translations = {
- en = {
- newShaman = {"Get them tiger! *-*", "whisper"},
- oneMiceRemain = {"Good job, <ROSE>%s<N>, your turn now!", "modchat"},
- newShamanTurn = {"Beware of <ROSE>%s<N>!", "modchat"},
- timeLeft = {"Time's up, <ROSE>%s<N> failed. ^_^", "modchat"},
- newPlayer = {"Welcome to oldsurvivor, type !help on chat to get help.", "whisper"},
- shamanDied = {"Awww, <ROSE>%s<N> died! T-T", "modchat"},
- helpMessage = {"Welcome to the old survivor room!\n- No meep and shortcurts\n- No divine mode\n- No skills!\nTry to survive the shaman to become the next to kill the mice! Bugs? report to Eshkation!", "whisper"},
- divineNotAllowed = {"<ROSE>Shaman divine mode isn't allowed here, please change your shaman mode in order to play."}
- },
- br = {
- newShaman = {"Pegue-os tigrão! *-*", "whisper"},
- oneMiceRemain = {"Bom trabalho, <ROSE>%s<N>, agora é seu turno!", "modchat"},
- newShamanTurn = {"Cuidado com <ROSE>%s<N>!", "modchat"},
- timeLeft = {"Acabou o tempo, <ROSE>%s<N> falhou. ^_^", "modchat"},
- newPlayer = {"Bem vindo a oldsurvivor, digite !help no chat para obter ajuda.", "whisper"},
- shamanDied = {"Awww, <ROSE>%s<N> morreu! T-T", "modchat"},
- helpMessage = {"Bem-vindo a sala old survivor!\n- Sem meep e atalhos\n- Sem modo divino\n- Sem habilidades !\nTente sobreviver ao shaman para se tornar o próximo a matar os ratos! Bugs? Reporte ao Eshkation!", "whisper"},
- divineNotAllowed = {"<ROSE>Modo divino não é permitido aqui, por favor mude o seu modo shaman para jogar."}
- },
- es = {
- newShaman = {"¡matarlos tigre! *-*", "whisper"},
- oneMiceRemain = {"Buen trabajo, <ROSE>%s<N>, ahora es tu turno!", "modchat"},
- newShamanTurn = {"Cuidado con <ROSE>%s<N>!", "modchat"},
- newPlayer = {"Bienvenido a oldsurvivor, tipo !help en el chat para información.", "whisper"},
- shamanDied = {"Awww, <ROSE>%s<N> murió! T-T", "modchat"},
- helpMessage = {"Bem-vindo a sala old survivor!\n- Sem meep e atalhos\n- Sem modo divino\n- Sem habilidades !\nSé el último ráton en pie para ser el próximo shaman! Bugs? Reporte ao Eshkation!", "whisper"},
- divineNotAllowed = {"<ROSE>Shaman divine mode isn't allowed here, please change your shaman mode in order to play."}
- },
- tr = {
- newShaman = {"Onları Yok Et Kaplan! *-*", "whisper"},
- oneMiceRemain = {"İyi iş çıkardın, <ROSE>%s<N>, diğer tura geçtin!", "modchat"},
- newShamanTurn = {"Şaman <ROSE>%s<N>, dikkat edin!", "modchat"},
- timeLeft = {"Zaman doldu, <ROSE>%s<N> ne yazıkki başarısız oldun. ^_^", "modchat"},
- newPlayer = {"Oldsurvivor odasına hoş geldin, yardım almak için !help komutunu kullanabilirsin.", "whisper"},
- shamanDied = {"Ahhh Hayır!, <ROSE>%s<N> öldü! T-T", "modchat"},
- helpMessage = {"Oldsurvivor Odasına Hoş Geldin.\n- Kısayol ve Meep yok!\n- Kutsal Mod yok!\n- Beceriler yok!\nFareleri öldürün ve bir sonraki Şaman olmak için hayatta kalmaya çalışın! Bug ve Hatalar için Eshkation ile iletişime geçin!", "whisper"},
- divineNotAllowed = {"<ROSE>İlahi Modu ile oynamak istiyorsunuz fakat buna izin verilmiyor.Lütfen Şaman modunuzu değiştirin."}
- },
- },
- types = {
- modchat = "<ROSE>• [%s] <N>",
- whisper = '<CEP>> [%s] [<CE>%s<CEP>]'
- }
- }
- system.info = {
- botname = "Oldsurvivor",
- actualShaman = "Honk"
- }
- system.roundRunning = false
- system.mapindex = false
- function eventNewPlayer(player)
- print(player)
- str = system.translate("newPlayer")
- tfm.exec.chatMessage(string.format(system.messages.types.whisper, str), player)
- if (system.mapindex) then
- img = system.maps[system.mapindex]
- tfm.exec.addImage(img[2], "_999"..img[5], 0+img[3], 20+img[4], nil)
- end
- end
- function eventNewGame()
- system.announceNewShaman()
- system.killPlayersDivineMode()
- system.roundRunning = true
- end
- function eventChatCommand(player, command)
- if (command == "help") then
- str = system.translate("helpMessage")
- tfm.exec.chatMessage(string.format(system.messages.types.whisper, str), player)
- end
- end
- function eventLoop(timeElapsed, timeRemain)
- timeRemain = math.ceil(timeRemain/1000)
- if (timeRemain == 2) then
- if (system.roundRunning) then
- str = string.format(system.translate("timeLeft"), system.info.actualShaman)
- tfm.exec.chatMessage(string.format(system.messages.types.modchat, str), nil)
- system.info.actualShaman = system.getRandomAlivePlayer()
- end
- system.chooseNewMap()
- end
- end
- function eventPlayerDied(player)
- if (player == system.info.actualShaman) then
- if (system.roundRunning) then
- system.roundRunning = false
- str = string.format(system.translate("shamanDied"), system.info.actualShaman)
- tfm.exec.chatMessage(string.format(system.messages.types.modchat, str), nil)
- system.info.actualShaman = system.getRandomAlivePlayer()
- tfm.exec.setGameTime(7)
- end
- else
- if (system.roundRunning) then
- alives = system.getAlivePlayers()
- if (alives[1] == 1) then
- system.roundRunning = false
- system.info.actualShaman = alives[2][1]
- str = string.format(system.translate("oneMiceRemain"), alives[2][1])
- tfm.exec.chatMessage(string.format(system.messages.types.modchat, str), nil)
- tfm.exec.setGameTime(7)
- elseif (alives[1] == 0) then
- system.roundRunning = false
- str = string.format(system.translate("oneMiceRemain"), system.info.actualShaman)
- tfm.exec.chatMessage(string.format(system.messages.types.modchat, str), nil)
- tfm.exec.setGameTime(7)
- end
- end
- end
- end
- function eventSummoningEnd(player, objectType, xPosition, yPosition, angle, objectDescription)
- objectType = objectType..""
- if (objectType:sub(0,2) == "17") then
- tfm.exec.addImage("151183b1405.png", "#"..objectDescription.id, -15, -15)
- else
- if (string.len(objectType) > 2) then
- objectType = objectType:sub(1, -3)
- end
- allowedObjects = {[0] = true, [1] = {"1511d263d61.png", -15, -15}, [2] = {"1511d274f0e.png", -30, -30}, [3] = {"1511d292941.png", -50, -5}, [4] = {"1511d29afba.png", -100, -5}, [6] = true, [7] = true, [10] = true, [24] = true, [26] = true, [27] = true, [28] = true, [32] = true}
- if not (allowedObjects[objectType+0]) then
- tfm.exec.removeObject(objectDescription.id)
- else
- -- http://images.atelier801.com/1511d2a494d.png
- if not (allowedObjects[objectType+0] == true) then
- data = allowedObjects[objectType+0]
- tfm.exec.addImage(data[1], "#"..objectDescription.id, data[2], data[3])
- end
- end
- end
- end
- function system.getRandomAlivePlayer()
- alives = {}
- for player, data in pairs(tfm.get.room.playerList) do
- if not (data.isDead) then
- if not (data.isShaman) then
- table.insert(alives, player)
- end
- end
- end
- mouse = alives[math.random(#alives)]
- if (mouse == nil) then
- mouse = system.info.actualShaman
- end
- return mouse
- end
- function system.getAlivePlayers()
- alives = {}
- for player, data in pairs(tfm.get.room.playerList) do
- if not (data.isDead) then
- if not (data.isShaman) then
- table.insert(alives, player)
- end
- end
- end
- return {#alives, alives}
- end
- function system.killPlayersDivineMode()
- for player, data in pairs(tfm.get.room.playerList) do
- if (data.shamanMode == 2) then
- str = system.translate("divineNotAllowed")
- tfm.exec.chatMessage(str, player)
- tfm.exec.killPlayer(player)
- end
- end
- end
- function system.announceNewShaman()
- tfm.exec.setShaman(system.info.actualShaman)
- ui.setShamanName(system.info.actualShaman)
- str = system.translate("newShaman")
- tfm.exec.chatMessage(string.format(system.messages.types.whisper, str), system.info.actualShaman)
- str = string.format(system.translate("newShamanTurn"), system.info.actualShaman)
- tfm.exec.chatMessage(string.format(system.messages.types.modchat, str), nil)
- end
- function system.chooseNewMap()
- system.mapindex = math.random(#system.maps)
- tfm.exec.newGame(system.maps[system.mapindex][1])
- img = system.maps[system.mapindex]
- tfm.exec.addImage(img[2], "_999"..img[5], 0+img[3], 20+img[4], nil)
- end
- function system.translate(key)
- community = string.lower(tfm.get.room.community)
- if not (system.messages.translations[community]) then
- community = "en"
- end
- if (system.messages.translations[community][key]) then
- return system.messages.translations[community][key][1]
- else
- return "$"..key
- end
- end
- function system.getHighestScore()
- high = {"souris", -1}
- for player, data in pairs(tfm.get.room.playerList) do
- if (data.score >= high[2]) then
- high = {player, data.score}
- end
- end
- return high[1]
- end
- function MAIN()
- system.messages.types.whisper = string.format(system.messages.types.whisper, tfm.get.room.community, system.info.botname).." %s"
- system.messages.types.modchat = string.format(system.messages.types.modchat, system.info.botname).."%s"
- for player, data in pairs(tfm.get.room.playerList) do
- eventNewPlayer(player)
- end
- system.info.actualShaman = system.getHighestScore()
- system.chooseNewMap()
- end
- MAIN()
Advertisement
Add Comment
Please, Sign In to add comment