NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAfkDeath(true)
players={}
toDespawn={}
maps={"@3110","@3045","@3336","1","2","3","@2349"}
racing={"@3110","@3045","@3336","@2349"}
vanilla={"1","2","3","4"}
function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,80,true,true)
for i,key in ipairs({32,40,83}) do
tfm.exec.bindKeyboard(name,key,true,true)
end
players[name]={
timestamp=os.time(),
profile={dg=0,win=0,total=0},
offsets={x=2, y=10},
use=true
}
end
tfm.exec.newGame(maps[math.random(#maps)])
function eventKeyboard(name,key,down,x,y)
a=players[name].profile.total
rate=players[name].profile.win/a*100
if (key==80) then
ui.addTextArea(1,"<B><VP>Profil:"..name.."<BR><CH>Win:"..players[name].profile.win.."<BR>Mevcut Paranız:"..players[name].profile.dg.."<BR>rate:"..rate.."",name,300,100,200,250,1,nil,0.6)
tfm.exec.addImage("cdfb821a64e211e78ef9109836a51f7d.jpg","..name..",400,200)
ui.addTextArea(2,"<a href='event:X'>X",name,480,100,20,20,nil,0.9,0.9)
end
if (key==32 or key==40 or key==83) and not tfm.get.room.playerList[name].isDead and started and players[name].use then
if players[name].timestamp < os.time()-1000 then
local id=tfm.exec.addShamanObject(17, x+(tfm.get.room.playerList[name].isFacingRight and players[name].offsets.x or -players[name].offsets.x), y+players[name].offsets.y, tfm.get.room.playerList[name].isFacingRight and 90 or 270)
players[name].timestamp=os.time()
table.insert(toDespawn,{os.time(),id})
end
end
end

function eventChatCommand(name,command)
local arg={}
for argument in command:gmatch("[^%s]+") do
table.insert(arg,argument)
end
if arg[1]=="off" then
if tonumber(arg[2]) and tonumber(arg[3]) then
players[name].offsets.x=tonumber(arg[2])
players[name].offsets.y=tonumber(arg[3])
else
players[name].offsets.x=2
players[name].offsets.y=10
end
tfm.exec.chatMessage("Offsets changed to X:"..players[name].offsets.x.." Y:"..players[name].offsets.y,name)
end
end

function eventNewGame()
ui.removeTextArea(30)
started=false
c=0
for n in pairs(tfm.get.room.playerList) do
players[n].profile.total=players[n].profile.total+1
end
end

function eventLoop(time,remaining)
if remaining ==0 then
tfm.exec.newGame(maps[math.random(#maps)])

end
if time >= 3000 and not started then
started=true
end

for i,cannon in ipairs(toDespawn) do
if cannon[1] <= os.time()-3000 then
tfm.exec.removeObject(cannon[2])
table.remove(toDespawn,i)
end
end
end
function eventPlayerDied(name)

tfm.exec.respawnPlayer(name)
end
for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end
c=0
function eventPlayerWon(n)
c=c+1
if c==1 then
tfm.exec.setGameTime(5)
print("<R>"..n.." maçı kazandı!")
ui.addTextArea(30,"<a href='event:racing'>Racing</a> <a href='event:vanilla'>Vanilla</a> <a href='event:random'>Random</a> ",n,400,200,200,50)
players[n].profile.win=players[n].profile.win+1
players[n].profile.dg=players[n].profile.dg+20
end
end
function eventLoop(time,remaining)
if remaining <=0 then
tfm.exec.newGame(maps[math.random(#maps)])

end
if time >= 3000 and not started then
started=true
end

for i,cannon in ipairs(toDespawn) do
if cannon[1] <= os.time()-3000 then
tfm.exec.removeObject(cannon[2])
table.remove(toDespawn,i)
end
end
end
function eventTextAreaCallback(id, name, callback)
if callback=="racing" then
tfm.exec.newGame(racing[math.random(#racing)])
tfm.exec.setUIShamanName("<VP>Tür: <J>RacingFFA")
end
if callback=="vanilla" then
tfm.exec.newGame(vanilla[math.random(#vanilla)])
tfm.exec.setUIShamanName("<VP>Tür: <J>FFAvaniL")
end
if callback=="random" then
tfm.exec.newGame(maps[math.random(#maps)])
tfm.exec.setUIShamanName("<VP>Tür: <J>random")
end

if callback=="X" then
ui.removeTextArea(1,name)
ui.removeTextArea(2,name)
end
end
nextMap = math.random(#maps)
tfm.exec.newGame(maps[nextMap][1])
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.