Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame("@7466611")
- local arrows = {}
- local MAX_ARROWS = 10
- local ARROW_FORCE = 40
- local timer = 0
- local TIMER_LOOPAT = 8
- function showArrows(n)
- ui.addTextArea(1, "<font size='20'>Arrows: " .. arrows[n], n, 10, 20, nil, nil, 0x000000, 0x2e2e2e, 0.6, true)
- end
- function eventNewPlayer(n)
- arrows[n] = MAX_ARROWS
- showArrows(n)
- system.bindMouse(n, true)
- end
- function eventMouse(n, x, y)
- local data = tfm.get.room.playerList[n]
- if not data.isDead and arrows[n] > 0 and data.isVampire == false then
- local angle = math.atan2(y - data.y, x - data.x)
- tfm.exec.addShamanObject(
- 35,
- data.x + 50 * math.cos(angle),
- data.y + 50 * math.sin(angle),
- math.deg(angle),
- math.cos(angle) * ARROW_FORCE,
- math.sin(angle) * ARROW_FORCE
- )
- arrows[n] = arrows[n] - 1
- showArrows(n)
- end
- end
- table.foreach(tfm.get.room.playerList, eventNewPlayer)
- players = {}
- for name,player in pairs(tfm.get.room.playerList) do
- table.insert(players,name)
- end
- tfm.exec.setUIMapName("<font color='#FFFFFF'><font size='13px'>Welcome to the vampire module. We made it for the tribe, Have fun!")
- tfm.exec.disableMortCommand(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAfkDeath(false)
- function eventTextAreaCallback(id,n,ev)
- if ev=="click1" then
- ui.addTextArea(2,"<p align='center'><font color='#00ffff'><font size='13px'><a href='event:click2'>Overjoy06</a></font></p>",nil,695,100,100,20, 0x000000, 0x00ffff,1,true)elseif ev=="click2" then
- ui.addTextArea(3,"<p align='center'><font color='#FFFB00'><font size='13px'><a href='event:close'>Have Fun!</a></font></p>",nil,695,150,100,20, 0x000000, 0xFFFB00,1,true)
- elseif ev=="close" then
- for i=2,4 do ui.removeTextArea(i) end end
- end
- ui.addTextArea(4,"<p align='center'><font color='#ff0000'><font size='13px'><a href='event:click1'>Made By</a></font></p>",nil,695,50,100,20, 0x000000, 0xff0000,1,true)
- tfm.exec.setUIMapName("<font color='#FFFFFF'>Welcome to the tribe module 'Vampires vs. Mices' ")
- local blue, red = {}, {}
- local inBlue = false
- local blueRespawn = { x = 790 , y = 380 }
- local redRespawn = { x = 189, y = 347 }
- function eventNewPlayer(name)
- inBlue = not inBlue
- if inBlue then
- blue[name] = true
- else
- red[name] = true
- end
- end
- for n in next, tfm.get.room.playerList do
- eventNewPlayer(n)
- end
- function eventNewGame()
- for n in next, blue do
- tfm.exec.movePlayer(n, blueRespawn.x, blueRespawn.y)
- end
- for n in next, red do
- tfm.exec.movePlayer(n, redRespawn.x, redRespawn.y)
- end
- end
- for players in pairs(red) do
- tfm.exec.setVampirePlayer(players)
- end
- for n in next, tfm.get.room.playerList do
- -- If player is in the blue team then they can fly/vamp.
- if blue[n] then
- system.bindKeyboard(n, 32, true, false)
- elseif red[n] then
- tfm.exec.setVampirePlayer(n)
- system.bindKeyboard(n, 32, true, true)
- end
- end
- function eventKeyboard(n, key, down, x, y)
- if y > 0 then
- tfm.exec.movePlayer(n, 0, 0, true, 0, -50, false)
- end
- end
- eventNewGame()
- for name,player in pairs(tfm.get.room.playerList) do
- if name == "Overjoy06#0000" then
- ui.addTextArea(6, "Welcome <font color='0022FF'>Overjoy06#0000 (The Creator)", nil, 0, 150, 800, 100, 0x0a0a0a, 0x0a0a0a, 0, true)
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- if name == "Zad#8091" then
- ui.addTextArea(7, "Welcome <font color='0022FF'>Zad#8091 (The Vampire Leader)", nil, 0, 165, 800, 100, 0x0a0a0a, 0x0a0a0a, 0, true)
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- if name =="Haxor_333#0000" then
- ui.addTextArea(8, "Welcome <font color='0022FF'>Haxor_333#0000 (The Idea Maker)", nil, 0, 180, 800, 100, 0x0a0a0a, 0x0a0a0a, 0, true)
- end
- end
- ui.addTextArea(9, "Tribe Important People here",nil, 0, 135, 800, 100, 0x0a0a0a, 0x0a0a0a, 0, true)
- for name,player in pairs(tfm.get.room.playerList) do
- if name =="Adooma_pro#7870" then
- ui.addTextArea(10, "Welcome <font color='0022FF'>Adooma_pro#7870 (The Skeletons Leader)", nil, 0, 180, 800, 100, 0x0a0a0a, 0x0a0a0a, 0, true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement