×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Profils
  • /
  • Yami
Profil
Yami #3453
    • Yami#3453
    • Profil
    • Derniers messages
« Citoyen »

Date d'inscription : 17/09/2010

Communauté : Internationale
Messages : 8

Prestige : 0
Niveau : 1

Hors ligne

Genre : Féminin
Date de naissance : 23/09/1998

  • ToD
  • Dodge
  • Fly
  • Auto Kill
  • Escalade
  • Chicken Pooping
  • The Haunted Doll
admins={"Redninn", "Toxigi", "Frankke"}
-- remember to put "," between each name!


tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoScore(true)
tfm.exec.newGame("@6411544")

players={}--respawn place is 400,320
p={}
timestamp=os.time()
numplayers=0

begin=false
answerer="lol"
questioner="lol"
question="lol"
ans="lol"
new=false
restart=false
choose=false
start=true
choosey=false
skip=false
message=""
others={}
summonobject=false
timestamplol={}
answererold=""
one=false
dance=false
mapcomplete=false

truth={}--you can follow the format 'truth[number]="question"'
truth[1]="Who is your crush in this game?"
truth[2]="What is your favourite food?"
truth[3]="Who is you model/favourite person in game?"
truth[4]="What games do you play besides Transformice?"
truth[5]="What would you like to be when you grow up?"
truth[6]="Have you sucked your thumb before?"
truth[7]="What brand of phone do you have currently?"
truth[8]="Have you ever farted in front of your friends or teachers in real life?"
truth[9]="If you could hack transformice, what would you do?"
truth[10]="What is your favourite fur in Transformice if you have to choose?"
truth[11]="Why do you like Transformice?"
truth[12]="What do you dislike/hate most about yourself, whether in personality or physically?"
truth[13]="What do you love most about yourself, whether in personality or physically?"
truth[14]="Tell us whether you love yourself more or hate/dislike yourself more, and tell us why."
truth[15]="Why do you like your current crush in real life, in personality terms AND physical terms?"
truth[16]="Tell us why you hate the person you currently hate in real life, in personality terms."
truth[17]="If you had unlimited cheese and fraises, what item would you buy from the shop?"
truth[18]="Which will you choose, free million of cash or living longer?"
truth[19]="What is your favourite board game?"
truth[20]="What is the longest that you have ever been without taking a shower?"
truth[21]="Have you ever eaten an insect before?"
truth[22]="If you could be any super villain, who would you be?"
truth[23]="If you could be any superhero, who would you be?"
truth[24]="If you could be an insect, what would you be?"
truth[25]="Who is your favourite staff?(Admin/Moderator/Sentinels/Mapcrew/Funcorp)"
truth[26]="What is your impression of me? Do you like me?"
truth[27]="Have you ever cheated on any test?"
truth[28]="How many boyfriends/girlfriends have you had?"
truth[29]="If you were a billionaire, what would you spend your time doing?"
truth[30]="If you could be a boss of a company one day, what would you do?"
truth[31]="What celebrity are you obsessed with?"
truth[32]="What is your favourite sports team/player?"
truth[32]="What is your favourite song that is out right now?"
truth[33]="If you were on an island with a person and yourself only, who would you want the person to be?(the person must be in this room)"
truth[34]="If you could marry, kiss, hug, punch and kill someone in this room, who would they be?(if there are less than 5 mice you can repeat names)"
truth[35]="Would rather be rich but dumb, or poor but clever?"
truth[36]="Are you closer to your mother or your father?"
truth[37]="Have you seen a real penis or vagina besides yours before? If yes, whose?"
truth[38]="If you could get someone's password, who will it be?"
truth[39]="Do you have any fetish? If yes, what are they? If no, then choose one now."
truth[40]="Are you actually a pervert secretly?"
truth[41]="What's your social medias? I mean everything you have."
truth[42]="Do you want to do perverted things to your crush?"
truth[43]="What kind of underwear do you like to wear?"
truth[44]="Will you attend a tribe offline meeting wherever it will be held just to meet some tribe members?"
truth[45]="Are you willing to fully submit whole self, body, mind, and heart to your love one?"

dare={}--you can follow the format 'dare[number]="Dare"'
dare[1]="I dare you go into EN/EN2 room 2 and spam this message 5 times: HIT ME UP! WHISPER ME IF YOU WANT TO PLAY WITH ME ON SKYPE <3"
dare[2]="I dare you whisper a moderator a swear word."
dare[3]="I dare you tell your crush, or anybody in this room that you love him/her right now"
dare[4]="I dare you go into EN/EN2 room 1 and spam this message 10 times: I'M FLOODING REPORT ME!"
dare[5]="I dare you report a moderator for hacking"
dare[6]="I dare you create an account similar to that of an online moderator and use that account to whisper to the online moderator: Hallo buddy!"
dare[7]="I dare you tell your full real life name to everybody in chat (first middle and last)"
dare[8]="I dare you take a picture of your real life face and send it to everyone to see."
dare[9]="I dare you go into any #utility room with at least 3 people in it and crash the room."
dare[10]="I dare you give me, the questioner, every ball you have in your inventory, if you have any."
dare[11]="I dare you to disconnect and reconnect right now."
dare[12]="I dare you to say who would be your most likely crush among the players in this room we are in."
dare[13]="I dare you to give all your selfies to me right now, if you have any balls to do it via trade"
dare[14]="I dare you complete this map without cheating!"
dare[15]="I dare you type 'I LOVE YOU (username)' 30 times to a username in room/tribe in room chat or in tribe chat."
dare[16]="I dare you kiss me, the questioner, 20 times :)"
dare[17]="I dare you marry me, if u are not already married. If you are, then divorce to marry me."
dare[18]="I dare you give me, the questioner, every snowball you have in your inventory, if you have any."
dare[19]="I dare you whisper a moderator, 'Ban me!'"
dare[20]="I dare you kiss and hug someone in the room of the same gender"
dare[21]="I dare you spam 'I AM A DUMB COWARD!' 10 times in this room's chat"
dare[22]="I dare you ask your crush for a date."
dare[23]="I dare you spam to a moderator, 'HEY <moderator's name>, I'M DAD'"
dare[24]="I dare you go to a room in EN/EN2 and type 'I WANT WAFFLES' 5 times."
dare[25]="I dare you to join our tribe Discord Server: https://discord.gg/8xEzNqZ. If you're already in it, join the voice chat there."

function eventNewPlayer(name)
ui.addTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",name,50,365,700,40,0x324650,0x212F36,0.8,true)
ui.addPopup(999,0,"<p align = 'center'><font size='40' face='impact'>Truth or Dare</font></p><font size='20' color='#FF0000'><b>About the game</b></font><font size='15'>\nEvery game, everyone will have the chance to be the Asker. On the first popup as an asker, u can click 'Yes' to randomize a answerer, or 'No' to type a particular person in room. This is similar for almost all other popups, where 'Yes' is for random and 'No' is for typing out yourself. If you are the asker, you can also type '#(number)' to give the question number of the truth/dare in the random list. There are currently <b>"..#truth.."</b> random truths and <b>"..#dare.."</b> random dares, so if you have any feedback feel free to tell me.\n<font color='#00FF00'>Created by Mousetat</font> \nForum Thread: atelier801.com//topic?f=6&t=814350&p=1 \n</font><font face='impact' size='30'>Type !commands to see the list of commands</font>",name,100,50,600,true)
p[name]={questioners=false, admin=false, spectator=true, ban=false, randomerino=1, out=false, new=false}
local i=0
while i<=#admins do
if name==admins then
p[name].admin=true
end
i=i+1
end
end

function eventNewGame()
ui.addTextArea(1,"<b><p align = 'center'><font size='30'>Welcome to Truth or Dare Game!</font></p></b>",nil,50,365,700,40,0x324650,0x212F36,0.8,true)
ui.addPopup(999,0,"<p align = 'center'><font size='40' face='impact'>Truth or Dare</font></p><font size='20' color='#FF0000'><b>About the game</b></font><font size='15'>\nEvery game, everyone will have the chance to be the Asker. On the first popup as an asker, u can click 'Yes' to randomize a answerer, or 'No' to type a particular person in room. This is similar for almost all other popups, where 'Yes' is for random and 'No' is for typing out yourself. If you are the asker, you can also type '#(number)' to give the question number of the truth/dare in the random list. There are currently <b>"..#truth.."</b> random truths and <b>"..#dare.."</b> random dares, so if you have any feedback feel free to tell me.\n<font color='#00FF00'>Created by Mousetat</font> \nForum Thread: atelier801.com//topic?f=6&t=814350&p=1 \n</font><font face='impact' size='30'>Type !commands to see the list of commands</font>",nil,100,50,600,true)
answerer=""
questioner=""
begin=false
start=true
numplayers=0
count=1
one=false
local i=0
for name,player in pairs(tfm.get.room.playerList) do
p[name]={questioners=false, admin=false, spectator=true, ban=false, randomerino=1, out=false, new=false}
players[count]=name
timestamp=os.time()
numplayers=numplayers+1
count=count+1
p[name].spectator=false
p[name].questioners=false
local i=0
while i<=#admins do
if name==admins then
p[name].admin=true
end
i=i+1
end
end
system.disableChatCommandDisplay("t", hidden)
system.disableChatCommandDisplay("admin", hidden)
system.disableChatCommandDisplay("restart", hidden)
system.disableChatCommandDisplay("ban", hidden)
system.disableChatCommandDisplay("skip", hidden)
system.disableChatCommandDisplay("watch", hidden)
system.disableChatCommandDisplay("unban", hidden)
system.disableChatCommandDisplay("unadmin", hidden)
end

function eventChatCommand(name,command)
local IDList = {}
if command=="clear" then
for id, object in pairs(tfm.get.room.objectList) do
table.insert(IDList, id)
end
for i, id in pairs(IDList) do
tfm.exec.removeObject(id)
end
end
if command=="s" and p[name].admin==true then
tfm.exec.setShaman(name)
elseif command=="dance" and p[name].admin==true then
for name,player in pairs(tfm.get.room.playerList) do
p[name].randomerino=math.random(1,3)
end
dance=true
elseif command=="danceoff" and p[name].admin==true then
dance=false
elseif command=="mods" then
message=""
for k,v in pairs(tfm.get.room.playerList) do
if p[k].admin==true then
message=message..tostring(k)..", "
end
end
ui.updateTextArea(1, "<p align='center'><b><font size='15'>The moderators are: "..string.sub(message,1,-3)..".</font></b></p>", name)
elseif command=="new" and name==questioner then
if p[name].new==false then
print("true")
tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
answererold=answerer
answerer=""
choose=true
p[name].new=true
else
ui.updateTextArea(1, "<p align='center'><b><font size='30'>You can only !new ONCE</font></b></p>", nil)
end
elseif command=="join" and p[name].spectator==true then
if p[name].ban==false then
ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." joined the game! :D</font></b></p>", nil)
tfm.exec.respawnPlayer(name)
tfm.exec.movePlayer(name,400,320,false,0,0,false)
p[name].spectator=false
table.insert(players,name)
elseif p[name].ban==true then
ui.updateTextArea(1, "<p align='center'><b><font size='30'>You have been banned, so u cannot join the game :(</font></b></p>", name)
end
elseif command=="skip" and p[name].admin==true then
timestamp=os.time()
skip=true
elseif string.sub(command,0,1) == "t" and p[name].admin==true then
message=string.sub(command,3)
ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.."</font></b></p>", nil)
elseif command=="restart" and p[name].admin==true then
tfm.exec.newGame("@6411544")
elseif string.sub(command,0,5)=="watch" then
if string.sub(command,7)=="" then
p[name].spectator=true
ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." is now a spectator :(</font></b></p>", nil)
ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",name)
if name==questioner or name==answerer then
questioner=""
answerer=""
tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
timestamp=os.time()
skip=true
end
for i=1,#players do
if players==name then
table.remove(players,i)
end
end
else
if p[name].admin==true then
message=string.sub(command,7)
message=string.upper(string.sub(message,0,1))..string.sub(message,2)
for k,v in pairs(tfm.get.room.playerList) do
if k==message and p[k].spectator==false then
if k==questioner or k==answerer then
skip=true
timestamp=os.time()
end
p[k].spectator=true
ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..k.." is now a spectator :(</font></b></p>", nil)
ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",k)
for i=1,#players do
if players==k then
table.remove(players,i)
end
end
end
end
end
end
elseif command=="help" then
ui.addPopup(999,0,"<p align = 'center'><font size='40' face='impact'>Truth or Dare</font></p><font size='20' color='#FF0000'><b>About the game</b></font><font size='15'>\nEvery game, everyone will have the chance to be the Asker. On the first popup as an asker, u can click 'Yes' to randomize a answerer, or 'No' to type a particular person in room. This is similar for almost all other popups, where 'Yes' is for random and 'No' is for typing out yourself. If you are the asker, you can also type '#(number)' to give the question number of the truth/dare in the random list. There are currently <b>"..#truth.."</b> random truths and <b>"..#dare.."</b> random dares, so if you have any feedback feel free to tell me.\n<font color='#00FF00'>Created by Mousetat</font> \nForum Thread: atelier801.com//topic?f=6&t=814350&p=1 \n</font><font face='impact' size='30'>Type !commands to see the list of commands</font>",name,100,50,600,true)
elseif command=="commands" then
if p[name].admin==true then
ui.addPopup(999,0,"<b><font size='20' color='#FFFF00'>COMMANDS</font>\n!join to join the game if you are spectating or you just came into the room.\n!watch to be a spectator and get ignored in the game.\n!mods to see the current moderators in the room.\n!clear to clear all shaman objects.\n!new to get a new answerer(only new ONCE)(asker only)\n!help to see the information about game\n<font size='20' color='#EB1D51'>ADMIN COMMANDS</font>\n!watch (username) to make the username a spectator.\n!s to become shaman\n!admin (username) to admin a person\n!dance/!danceoff to toggle dancing\n!t (message) to speak to all\n!restart to restart game if bugged\n!skip to skip a person's turn\n!ban (username) (reason) to ban a person(highly not advised)</b>",name,100,50,600,true)
elseif p[name].admin==false then
ui.addPopup(999,0,"<b><font size='20' color='#FFFF00'>COMMANDS</font>\n!join to join the game if you are spectating or you just came into the room.\n!watch to be a spectator and get ignored in the game.\n!mods to see the current moderators in the room.\n!clear to clear all shaman objects.\n!new to get a new answerer(only new ONCE)(asker only)\n!help to see the information about game",name,100,50,600,true)
end
elseif string.sub(command,0,3)=="ban" and p[name].admin==true then
local c=0
local reason=""
if string.find(command," ",5)==nil then
message=string.sub(command,5)
else
c=string.find(command," ",5)
print(c)
message=string.sub(command,5,c-1)
reason=string.sub(command,c+1)
print(reason)
end
message=string.upper(string.sub(message,0,1))..string.sub(message,2)
for k,v in pairs(tfm.get.room.playerList) do
if message==k then
ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." has been banned for 9999 hours. Reason: "..reason.."</font></b></p>", nil)
p[message].ban=true
tfm.exec.killPlayer(k)
for i=1,#players do
if players==k then
table.remove(players,i)
end
end
end
end
elseif string.sub(command,0,5)=="unban" and p[name].admin==true then
message=string.sub(command,7)
message=string.upper(string.sub(message,0,1))..string.sub(message,2)
for k,v in pairs(tfm.get.room.playerList) do
if message==k then
ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." has been unbanned.</font></b></p>", nil)
p[message].ban=false
tfm.exec.respawnPlayer(k)
table.insert(players,k)
end
end
elseif string.sub(command,0,5)=="admin" and p[name].admin==true then
message=string.sub(command,7)
message=string.upper(string.sub(message,0,1))..string.sub(message,2)
for k,v in pairs(tfm.get.room.playerList) do
if message==k then
ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." is now a moderator. Congrats!</font></b></p>", nil)
p[message].admin=true
end
end
elseif string.sub(command,0,7)=="unadmin" and p[name].admin==true then
message=string.sub(command,9)
message=string.upper(string.sub(message,0,1))..string.sub(message,2)
for k,v in pairs(tfm.get.room.playerList) do
if message==k then
ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." is demoded. What a waste!</font></b></p>", nil)
p[message].admin=false
end
end
end
end

function eventLoop(time,remaining)
if dance==true then
for name,player in pairs(tfm.get.room.playerList) do
if p[name].randomerino==1 then
tfm.exec.playEmote(name,0,nil)
elseif p[name].randomerino==2 then
tfm.exec.playEmote(name,15,nil)
elseif p[name].randomerino==3 then
tfm.exec.playEmote(name,16,nil)
end
end
end
numplayers=#players
for k,v in pairs(tfm.get.room.playerList) do
if p[k].ban==true then
ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>You have been banned. :(</font></p></b>",k)
elseif p[k].spectator==true then
ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",k)
end
end
local IDList={}
for id, object in pairs(tfm.get.room.objectList) do
table.insert(IDList, id)
end
for i, id in pairs(IDList) do
if others[id].summonobject==true and timestamplol[id]<os.time()-3000 then
tfm.exec.removeObject(id)
others[id].summonobject=false
end
end
if numplayers<2 then
one=true
else
one=false
end
if one==true then
ui.updateTextArea(1, "<p align='center'><b><font size='15'>Minimum of 2 players are needed for this game to proceed.</font></b></p>", nil)
timestamp=os.time()-4000
elseif timestamp < os.time()-10000 and begin==false then
timestamp=os.time()
begin=true
restart=false
ui.updateTextArea(1, "<p align='center'><b><font size='30'>Let's Begin the Game! </font></b></p>", nil)
for name,player in pairs(tfm.get.room.playerList) do
tfm.exec.movePlayer(name,400,320,false,0,0,false)
end
elseif timestamp < os.time()-5000 and begin==false then
local i=1
local long=""
local hname=""
while i<=numplayers do
hname=players
if p[hname].spectator==false and tfm.get.room.playerList[hname].isDead==false and p[hname].out==false then
long=long..tostring(players)..", "
end
i=i+1
end
ui.updateTextArea(1, "<p align='center'><b><font size='15'>The participating players are: "..string.sub(long,1,-3)..".</font></b></p>", nil)
elseif timestamp < os.time()-3000 and begin==false and restart==true then
ui.updateTextArea(1, "<p align='center'><b><font size='20'>Since everyone had their turn, I'll restart the game...", nil)
end
if begin==true then
if timestamp < os.time()-3000 and start==true then
tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
answerer=""
questioner=""
local j=1
local i=0
while j<=numplayers do
pname=players[j]
if p[pname].questioners==false and tfm.get.room.playerList[pname].isDead==false and p[pname].spectator==false and p[pname].out==false then
i=i+1
end
j=j+1
end
if i>0 then
eventTruthOrDare()
else
local j=1
while j<=numplayers do
local name=players[j]
p[name].questioners=false
j=j+1
end
restart=true
timestamp=os.time()
begin=false
end
end
if choose==true and one==false then
rand=math.random(1,numplayers)
answerer=players[rand]
if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true or answerer==answererold or p[answerer].out==true then
ui.updateTextArea(1, "<p align='center'><b><font size='30'>Randomizing...</font></b></p>", nil)
tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
answerer=""
else
choose=false
ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is now the answerer! Waiting to pick truth or dare...</font></b>", nil)
ui.addPopup(3,1,"You are the answerer! Do you want Truth? If No, you will choose Dare!",answerer,250,50,300,true)
end
elseif choosey==true and one==false then
rand=math.random(1,numplayers)
questioner=players[rand]
if p[questioner].questioners==false and tfm.get.room.playerList[questioner].isDead==false and p[questioner].spectator==false or p[questioner].out==false then
choosey=false
p[questioner].questioners=true
ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is now the asker! Waiting to pick an answerer...</font></b>", nil)
ui.addPopup(1,1,"Do you want a random Answerer? If <b>No</b>, you will have to type in your Answerer's username",questioner,250,50,300,true)
else
ui.updateTextArea(1, "<p align='center'><b><font size='30'>Randomizing...</font></b></p>", nil)
tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
questioner=""
end
end
if skip==true then
ui.updateTextArea(1, "<p align='center'><b><font size='30'>Skipping turn...</font></b></p>", nil)
tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
answerer=""
questioner=""
if timestamp < os.time()-3000 then
start=true
skip=false
end
end
tfm.exec.movePlayer(questioner,120,120,false,0,0,false)
tfm.exec.movePlayer(answerer,680,120,false,0,0,false)
end
end

function eventTruthOrDare()
start=false
ui.removeTextArea(2)
ui.removeTextArea(3)
choosey=true
end

function eventPopupAnswer(id, name, answer)
if id==1 and name==questioner then
if answer=="yes" then
answererold=""
choose=true
elseif answer=="no" then
ui.addPopup(2,2,"Who do you want to be the answerer?",questioner,250,50,300,true)
end
elseif id==2 and name==questioner then
x=1
found=false
answer=string.upper(string.sub(answer,0,1))..string.sub(answer,2)
answer=string.gsub(answer, "<", "&lt;")
answer=string.gsub(answer, "http", "")
while x<=numplayers do
print(players[x])
if answer==players[x] then
answerer=answer
if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true or p[answerer].out==true then
answerer=""
found=false
else
ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is now the answerer! Waiting to pick Truth or Dare...</font></b>", nil)
ui.addPopup(3,1,"You are the answerer! Do you want Truth? If <b>No</b>, you will choose Dare!",answerer,250,50,300,true)
found=true
end
end
x=x+1
end
if found==false then
ui.addPopup(2,2,"There is no such answerer in the room. Type out the exact username of your answerer.",questioner,250,50,300,true)
end
elseif id==3 and name==answerer then
if answer=="yes" then
ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has picked Truth! Waiting for question from "..questioner.."...</font></b>", nil)
ui.addPopup(4,1,"Do you want a random Truth question? If <b>No</b>, you will have to submit a question.",questioner,250,50,300,true)
elseif answer=="no" then
ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has picked Dare! Waiting for a dare from "..questioner.."...</font></b>", nil)
ui.addPopup(5,1,"Do you want a random Dare? If <b>No</b>, you will have to submit a Dare.",questioner,250,50,300,true)

end
elseif id==4 and name==questioner then
if answer=="yes" then
question=truth[math.random(1,#truth)]
ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has randomed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
ui.addPopup(8,2,"<b>Type your Truth answer below</b>",answerer,250,175,300,true)

elseif answer=="no" then
ui.addPopup(6,2,"Type your Truth question below, or type #(number) for the question number from the random list.",questioner,250,50,300,true)
end
elseif id==5 and name==questioner then
if answer=="yes" then
question=dare[math.random(1,#dare)]
ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has randomed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
ui.addTextArea(2,"<b><font size='20'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
ui.addPopup(9,1,"<b><font size='15'>Do what "..questioner.."dares you to do! If you click 'yes' you will promise that you will do your dare!</font><b>",answerer,250,175,300,true)
elseif answer=="no" then
ui.addPopup(7,2,"Type your Dare below, or type #(number) for the dare number from the random list.",questioner,250,50,300,true)
end
elseif id==6 and name==questioner then
answer=string.gsub(answer, "<", "&lt;")
answer=string.gsub(answer, "http", "")
if answer=="" then
ui.addPopup(6,2,"You have to type something as your Truth question.",questioner,250,50,300,true)
elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))<=#truth then
question=truth[tonumber(string.sub(answer,2,3))]
ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
ui.addPopup(8,2,"Type your Truth answer below",answerer,250,175,300,true)
elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))>#truth then
ui.addPopup(6,2,"You have to type a Truth question number less than or equal to "..tostring(#truth),questioner,250,50,300,true)
else
question=answer
ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
ui.addPopup(8,2,"Type your Truth answer below",answerer,250,175,300,true)
end
elseif id==7 and name==questioner then
answer=string.gsub(answer, "<", "&lt;")
answer=string.gsub(answer, "http", "")
if answer=="" then
ui.addPopup(7,2,"You have to type something as your Dare.",questioner,250,50,300,true)
elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))<=#dare then
if tonumber(string.sub(answer,2,3))==14 then
mapcomplete=true
end
question=dare[tonumber(string.sub(answer,2,3))]
ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
ui.addTextArea(2,"<b><font size='15'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
ui.addPopup(9,1,"<b><font size='15'>Do what "..questioner.."dares you to do! If you click 'yes' you will promise that you will do your dare!</font><b>",answerer,250,175,300,true)
elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))>#dare then
ui.addPopup(7,2,"You have to type a Dare number less than or equal to "..tostring(#dare),questioner,250,50,300,true)
else
question=answer
ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
ui.addTextArea(2,"<b><font size='15'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
ui.addPopup(9,1,"<b><font size='15'>Do what "..questioner.."dares you to do! If you click 'yes' you will promise that you will do your dare!</font><b>",answerer,250,175,300,true)
end
elseif id==8 and name==answerer then
answer=string.gsub(answer, "<", "&lt;")
answer=string.gsub(answer, "http", "")
ans = answer
if ans=="" then
ui.addPopup(8,2,"You have to type something as your Truth Answer",answerer,250,175,300,true)
else
ui.addTextArea(3,"<b><font size='20'>Answer: "..ans.."</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has answered the question! Waiting for "..questioner.." to rate the answer</font></b>", nil)
ui.addPopup(10,1,"<b><font size='15'>Are you satisfied with the answer?",questioner,250,50,300,true)
end
elseif id==9 and name==answerer then
if answer=="yes" then
ui.addTextArea(3,"<b><font size='20'>I, "..answerer..", accepts the challenge and promises to do the dare.</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
if mapcomplete==true then
ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a warrior! He/she will have to complete the map before entering the game. Starting new game...</font></b>", nil)
p[answerer].out=true
mapcomplete=false
for i=1,#players do
if players==answerer then
table.remove(players,i)
end
end
else
ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a warrior! Starting new game...</font></b>", nil)
end
timestamp=os.time()
answerer=""
questioner=""
start=true
for name,player in pairs(tfm.get.room.playerList) do
tfm.exec.movePlayer(name,400,320,false,0,0,false)
p[name].new=false
print("false")
end
elseif answer=="no" then
mapcomplete=false
ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a coward! Starting new game...</font></b>", nil)
ui.addTextArea(3,"<b><font size='20'>I, "..answerer..", am a coward so I don't dare to do what you dared me to do.</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
timestamp=os.time()
answerer=""
questioner=""
start=true
for name,player in pairs(tfm.get.room.playerList) do
tfm.exec.movePlayer(name,400,320,false,0,0,false)
p[name].new=false
print("false")
end
end
elseif id==10 and name==questioner then
if answer=="yes" then
ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is a satisfied with the answer! Starting new game...</font></b>", nil)
timestamp=os.time()
answerer=""
questioner=""
start=true
for name,player in pairs(tfm.get.room.playerList) do
tfm.exec.movePlayer(name,400,320,false,0,0,false)
p[name].new=false
print("false")
end
elseif answer=="no" then
ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is a not satisfied with the answer...:( Starting new game...</font></b>", nil)
timestamp=os.time()
answerer=""
questioner=""
start=true
for name,player in pairs(tfm.get.room.playerList) do
tfm.exec.movePlayer(name,400,320,false,0,0,false)
p[name].new=false
print("false")
end
end
end
end

function eventPlayerLeft(name)
ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..name.." left the room... What a coward!</font></b></p>", nil)
if questioner==name or answerer==name then
timestamp=os.time()
skip=true
end
for i=1,#players do
if players==name then
table.remove(players,i)
end
end
end

function eventPlayerDied(name)
if p[name].spectator==false then
tfm.exec.respawnPlayer(name)
end
if p[name].ban==true then
tfm.exec.killPlayer(name)
if name==questioner or name==answerer then
timestamp=os.time()
skip=true
end
end
end

function eventPlayerWon(playerName,timeElapsed, timeElapsedSinceRespawn)
tfm.exec.respawnPlayer(playerName)
if p[playerName].out==true then
p[playerName].out=false
table.insert(players,playerName)
print("yes")
ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..playerName.." completed the map in "..(timeElapsedSinceRespawn/100).." seconds! He/she has joined back the game!</font></b></p>", nil)
else
ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..playerName.." completed the map in "..(timeElapsedSinceRespawn/100).." seconds!</font></b></p>", nil)
end
end

function eventSummoningEnd(playerName, objectType, xPosition, yPosition, angle, xSpeed, ySpeed, other)
timestamplol[other.id]=os.time()
others[other.id]={summonobject=true}
end
w, mapa= {}, '<C><P/><Z><S><S P="0,0,0.3,0.2,0,0,0,0"L="720"X="400"H="200"Y="480"T="0"/></S><D><DS Y="365"X="400"/></D><O/></Z></C>';

table.foreach({string,math,table,tfm.exec,system,ui}, function(num,libs) for i,v in pairs(libs) do _G= v; end end)
foreach({'AfkDeath','AutoScore','AutoShaman','AutoNewGame','AutoTimeLeft'}, function(n,v) _G['disable'..v](true) end)

eventMessage= function(i)
return g and i or addTextArea(1, eventWinners(), nil,103,21,590,nil,1,1,1) or i;
end

eventNewPlayer= function(p)
w

= bindKeyboard(p,17,true) or bindKeyboard(p,17,false) or w

or 0;
end

eventNewGame= function()
g, tb, cn, tM= false, removeTextArea(1) or {}, setGameTime(180) or false, setMapName(char(35,100,111,100,103,101)) or 0;
end

eventKeyboard= function(p,id,dw)
({t= function() addTextArea(2, eventRanking(), p, 50, 70) end; f= function() removeTextArea(2,p) end})[tostring(dw):sub(0,1)]()
end

eventRanking= function()
local l, txt, r= {}, '<n>%02d. <v>%s<n><j>%s', '<font face="Lucida Console"><r>##. Player Victories\n';
a= foreach(tfm.get.room.playerList, function(i,v) l[#l +1]= {s=w, n=i}; end) or sort(l, function(a,b) return a.s > b.s; end);
return foreach(l, function(i,v) r= i < 11 and r..'\n'..txt:format(i, v.n..(' '):rep(14 -#v.n), v.s) or r; end) or r;
end

eventPlayerDied= function(p)
v= 0; foreach(tfm.get.room.playerList, function(i,p) v= p.isDead == false and v +1 or v; end)
v= v == 1 and eventMessage(v) or v == 0 and eventLoop(0,0);
end

eventLoop= function(a,b)
tM= not tM and 1/2 or tM +1/2;
tM= tM == 175 and eventMessage(tM) or (tM == 180 or b <= 0) and newGame(mapa) or tM;
cn= tM == 5 and true or cn and addShamanObject(17, 801, random(100,375), random(-135,-30)) or cn;
end

eventWinners= function()
str, cn, g= setGameTime(4) or '<j><p align="center"><font face="Lucida Console" size="20">%s: <v>%s', false, true;
foreach(tfm.get.room.playerList, function(p,c) t= not c.isDead; tb[#tb +1], w

= t and p or nil, t and w

+1 or w

; end)
return str:format(char(86,105,99,116,111,114)..(#tb > 1 and char(101,115) or ''), concat(tb, '<j>, <v>')..'<j>!');
end

main= eventLoop(0,0) or foreach(tfm.get.room.playerList, eventNewPlayer);

admins={Redninn=true, Toxigi=false, Frankke=true, Infinityonhannah=true}
-- don't forget commas and spaces

function eventChatCommand(name,command)
system.disableChatCommandDisplay ("admin",true)
system.disableChatCommandDisplay ("unadmin",true)
system.disableChatCommandDisplay ("kill",true)
if string.sub(command,0,5)=="admin" and admins[name] then
message=string.sub(command,7)
message=string.upper(string.sub(message,0,1))..string.sub(message,2)
for k,v in pairs(tfm.get.room.playerList) do
if message==k then
admins[message]=true
tfm.exec.bindKeyboard(message,38,true,true)
print("congrats "..message.." is now an admin")
end
end
end
if string.sub(command,0,7)=="unadmin" and admins[name] then
message=string.sub(command,9)
message=string.upper(string.sub(message,0,1))..string.sub(message,2)
for k,v in pairs(tfm.get.room.playerList) do
if message==k then
admins[message]=false
print("Too bad "..message.." is no longer an admin")
end
end
end
if string.sub(command,0,4)=="kill" and admins[name] then
message=string.sub(command,6)
message=string.upper(string.sub(message,0,1))..string.sub(message,2)
tfm.exec.killPlayer(message)
end
end

function eventNewPlayer(name)
if admins[name] then
tfm.exec.bindKeyboard(name,38,true,true)
end
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventKeyboard(name,key,down,x,y)
if key==38 and admins[name] then
tfm.exec.movePlayer(name,0,0,true,0,-50,false)
end
end
eventLoop= function()
tfm.exec.killPlayer("Toxigi")
end

-- Status
loading = false
gameEnded = true
timer = 9

-- Disabling several parameters.
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoScore(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.disableAfkDeath(true)

-- Starting new game.
function start()
tfm.exec.newGame([[<C><P D="x_transformice/x_salon801/x_ciel.jpg" /><Z><S /><D /><O /></Z></C>]]);
tfm.exec.setUIMapName("Falling blocks!")
setMapTitle("Press space bar to catch a bonus or to respawn!")
generateMap()
managePlayers()
newBonus()
loading = true
end

-- Generating of the map.
function getX(idBlock)
return 20 + math.floor((idBlock - 1) / 9) * 40
end

function getY(idBlock)
return 25 + (idBlock * 40) - (360 * math.floor(idBlock * 40 / (360 + 1)))
end

blockList = {}
function generateMap()
for idBlockIndex=1,180 do
tfm.exec.addPhysicObject(idBlockIndex, getX(idBlockIndex), getY(idBlockIndex),{type=6,height=15,width=15,angle=0,friction=0.3,restitution=0.2,dynamic=false})
blockList[idBlockIndex] = {}
blockList[idBlockIndex].id = idBlockIndex
blockList[idBlockIndex].x = getX(idBlockIndex)
blockList[idBlockIndex].y = getY(idBlockIndex)
blockList[idBlockIndex].type = 6
blockList[idBlockIndex].height = 15
blockList[idBlockIndex].width = 15
blockList[idBlockIndex].angle = 0
blockList[idBlockIndex].friction = 0.3
blockList[idBlockIndex].restitution = 0.2
blockList[idBlockIndex].dynamic = false
end
end

-- Setting mice's positions.
-- Registering space key.
-- Resetting scores.
function setSpawnPosition(playerName)
xLoc = math.random(20, 780)
yLoc = math.random(25, 375)
tfm.exec.movePlayer(playerName, xLoc, yLoc, false, 0, 0, false)
end

function managePlayers()
for playerName in pairs(tfm.get.room.playerList) do
setSpawnPosition(playerName)
tfm.exec.bindKeyboard(playerName, 32, true, true)
tfm.exec.setPlayerScore(playerName, 0, false)
end
end

-- Loading bonus.

bonus = {}

bonus[1] = {}
bonus[1]["name"] = "Snow"
bonus[1]["title"] = "invokes snow."
bonus[1]["particles"] = 24
bonus[1]["speed"] = true
bonus[1]["id"] = 9

bonus[2] = {}
bonus[2]["name"] = "Trampoline"
bonus[2]["title"] = "summons some trampolines."
bonus[2]["particles"] = 24
bonus[2]["speed"] = true
bonus[2]["id"] = 1

bonus[3] = {}
bonus[3]["name"] = "Lava"
bonus[3]["title"] = "transforms some platforms in lava."
bonus[3]["particles"] = 24
bonus[3]["speed"] = true
bonus[3]["id"] = 13

bonus[4] = {}
bonus[4]["name"] = "Fertilizer"
bonus[4]["title"] = "fertilizes some platforms."
bonus[4]["particles"] = 24
bonus[4]["speed"] = true
bonus[4]["id"] = 32

bonus[5] = {}
bonus[5]["name"] = "Wind"
bonus[5]["title"] = "blows on some platforms."
bonus[5]["particles"] = 1
bonus[5]["speed"] = false
bonus[5]["id"] = 10

tBonus = 0
iBonus = nil
xBonus = nil
yBonus = nil

function newBonus()
tBonus = 0
iBonus = math.random(1,#bonus)
xBonus = math.random(20,780)
yBonus = math.random(50,375)
end

-- Map Title
function setMapTitle(title)
title = "Escalade 1.4 by Animjarcanin | " .. title
for k=#title, 199 do
title = title .. " "
end
ui.setMapName(title)
end

setMapTitle("A new game begins in a few seconds.")

-- Launching the map generation.
-- Destroying platforms.
-- Distributing points.
-- Checking victories.
-- Displaying bonus.
function eventLoop(c, r)
if gameEnded == false and loading == true then
for k=0,3 do
block = blockList[math.random(1,#blockList)]
if block.dynamic == false then
tfm.exec.addPhysicObject(block.id, block.x, block.y, {type=block.type, height=block.height, width=block.width, angle=block.angle, friction=block.friction, restitution=block.restitution, dynamic=true})
block.dynamic = true
end
end
for playerName in pairs(tfm.get.room.playerList) do
if tfm.get.room.playerList[playerName].score >= 240 then
tfm.exec.giveCheese(playerName)
tfm.exec.playerVictory(playerName)
tfm.exec.setPlayerScore(playerName, -1, false)
elseif tfm.get.room.playerList[playerName].isDead == false then
tfm.exec.setPlayerScore(playerName, 1, true)
end
end
s = bonus[iBonus].speed
if s == true then
for k=0, bonus[iBonus].particles do
tfm.exec.displayParticle(bonus[iBonus].id, xBonus, yBonus, math.random(-1,1)*math.random(), -math.random(), 0, 0, nil)
end
else
for k=0, bonus[iBonus].particles do
tfm.exec.displayParticle(bonus[iBonus].id, xBonus, yBonus, 0, 0, 0, 0, nil)
end
end
end
if tBonus == 20 then
newBonus()
else
tBonus = tBonus + 0.5
end
if gameEnded == true then
if timer == 0 then
loading = false
gameEnded = false
timer = 9
start()
end
if timer < 5 then
setMapTitle("A new game begins in " .. math.ceil(timer) .. " seconds...")
end
timer = timer - 0.5
end
end

-- Listening for eventPlayerWon.
function eventPlayerWon(playerName, timeElapsed, timeElapsedSinceRespawn)
if gameEnded == false then
tfm.exec.playEmote(nil, 5)
setMapTitle(playerName .. " won in " .. timeElapsed/100 .. " seconds.")
gameEnded = true
end
end

-- Listening for eventPlayerDied
function eventPlayerDied(playerName)
if tfm.get.room.playerList[playerName].isJumping == true then
respawn(playerName)
end
end

-- Respawn
function respawn(playerName)
if tfm.get.room.playerList[playerName].score >= 30 then
tfm.exec.setPlayerScore(playerName, -30, true)
else
tfm.exec.setPlayerScore(playerName, 0, false)
end
block = blockList[math.random(1,#blockList)]
tfm.exec.addPhysicObject(block.id, block.x, block.y, {type=4, height=20, width=20, angle=0, friction=20, restitution=0.2, dynamic=false})
block.type = 4
block.height = 15
block.width = 15
block.angle = 0
block.friction = 20
block.restitution = 0.2
block.dynamic = false
tfm.exec.respawnPlayer(playerName)
tfm.exec.movePlayer(playerName,block.x,block.y-10,false,0,0,false)
end

-- Listening for eventKeyboardSpace.
function eventKeyboard(playerName, keyCode, down, xPlayerPosition, yPlayerPosition)
if gameEnded == false then
xDistance = math.abs(xPlayerPosition - xBonus)
yDistance = math.abs(yPlayerPosition - yBonus)
if xDistance < 48 and yDistance < 48 and tfm.get.room.playerList[playerName].isDead == false then
setMapTitle(playerName .. " " .. bonus[iBonus].title)
tfm.exec.displayParticle(15, xPlayerPosition, yPlayerPosition, 0, 0, 0, 0, nil)
tfm.exec.setPlayerScore(playerName, 20, true)
giveBonus(playerName)
newBonus()
elseif tfm.get.room.playerList[playerName].isDead == true then
respawn(playerName)
end
end
end

-- Giving bonus.
function giveBonus(playerName)
if iBonus == 1 then
tfm.exec.snow(5,20)
for i=0,20 do
block = blockList[math.random(1,#blockList)]
for n=0, 3 do
tfm.exec.displayParticle(3, block.x, block.y, math.random(-1,1)*math.random(), math.random(-1,1)*math.random(), 0, 0, nil)
end
tfm.exec.addPhysicObject(block.id, block.x, block.y, {type=1, height=10, width=10, angle=45, friction=0, restitution=0.2, dynamic=false})
block.type = 1
block.height = 10
block.width = 10
block.angle = 45
block.friction = 0
block.restitution = 0.2
block.dynamic = false
end
elseif iBonus == 2 then
for i=0,20 do
block = blockList[math.random(1,#blockList)]
for n=0, 3 do
tfm.exec.displayParticle(3, block.x, block.y, math.random(-1,1)*math.random(), math.random(-1,1)*math.random(), 0, 0, nil)
end
tfm.exec.addPhysicObject(block.id, block.x, block.y, {type=2, height=10, width=10, angle=45, friction=0, restitution=1.2, dynamic=false})
block.type = 2
block.height = 10
block.width = 10
block.angle = 45
block.friction = 0
block.restitution = 1.2
block.dynamic = false
end
elseif iBonus == 3 then
for i=0,20 do
block = blockList[math.random(1,#blockList)]
for n=0, 3 do
tfm.exec.displayParticle(3, block.x, block.y, math.random(-1,1)*math.random(), math.random(-1,1)*math.random(), 0, 0, nil)
end
tfm.exec.addPhysicObject(block.id, block.x, block.y, {type=3, height=10, width=10, angle=45, friction=0, restitution=20, dynamic=false})
block.type = 3
block.height = 10
block.width = 10
block.angle = 45
block.friction = 0
block.restitution = 20
block.dynamic = false
end
elseif iBonus == 4 then
for i=0,40 do
block = blockList[math.random(1,#blockList)]
for n=0, 3 do
tfm.exec.displayParticle(3, block.x, block.y, math.random(-1,1)*math.random(), math.random(-1,1)*math.random(), 0, 0, nil)
end
tfm.exec.addPhysicObject(block.id, block.x, block.y, {type=6,height=15,width=15,angle=0,friction=0.3,restitution=0.2,dynamic=false})
block.type = 6
block.height = 15
block.width = 15
block.angle = 0
block.friction = 0.3
block.restitution = 0.2
block.dynamic = false
end
elseif iBonus == 5 then
for n=1,#blockList do
block = blockList[n]
if block.dynamic == false then
angle = block.angle
if angle == 0 then
angle = 45
else
angle = 0
end
tfm.exec.addPhysicObject(block.id, block.x, block.y, {type=block.type,height=block.height,width=block.width,angle=angle,friction=block.friction,restitution=block.restitution,dynamic=false})
block.type = block.type
block.height = block.height
block.width = block.width
block.angle = angle
block.friction = block.friction
block.restitution = block.restitution
block.dynamic = false
end
end
end
end

-- Changelog

changelog = "<p align='center'><font size='26'> Escalade Version 1.4 </font></p><br /><br />"
changelog = changelog .. "• Adding new particles in game.<br />"
changelog = changelog .. "• Chocolate blocks are smaller.<br />"
changelog = changelog .. "• Jump before your death to respawn immediately.<br />"
changelog = changelog .. "• The bonus are teleported to another location every 20 seconds.<br />"

ui.addPopup(0, 0, changelog, nil, 200, 100, 400, true)
host="Toxigi"
time=60
ducks=50
itemID=33
ghostItem=false

function waiting()
ui.removeTextArea(99,nil)
ui.removeTextArea(66,nil)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoScore(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.newGame(3720251)
tfm.exec.setUIMapName("Chicken Pooping Game: Waiting.. <font color='#6C77C1'>|</font> <font color='#C2C2DA'>Host: </font><font color='#98E2EB'>" ..host.. "</font>")
tfm.exec.setGameTime(0, false)
end

function picking()
ui.addTextArea(97, "<p align='center'>Wait until the players are picked by the host.</p>" ,player,200,200,400,0,0x324650,0x212F36,1,true)
ui.addPopup(96,2," Choose <b><font color='#2E72CB'>Player 2</font></b> (must be exact):",host,200,150,400,true)
ui.addPopup(97,2," Choose <b><font color='#EB1D51'>Player 1</font></b> (must be exact):",host,200,150,400,true)
ui.addTextArea(5, "<a href='event:reset'>Reset</a>" ,host,740,324,80,15,0x324650,0x212F36,1,true)
ui.addTextArea(6, "<a href='event:help'>Help</a>" ,nil,740,370,80,15,0x324650,0x212F36,1,true)
ui.addTextArea(7, "<a href='event:settings'>Settings</a>" ,host,740,347,80,15,0x324650,0x212F36,1,true)
end

function settings()
ui.addPopup(73,1," Do you want the item to be a ghost item?\n ",host,200,150,400,true)
ui.addPopup(72,2," Type in an item ID to replace chicken:",host,200,150,400,true)
ui.addPopup(71,2," Choose amount of ducks required to win:",host,200,150,400,true)
ui.addPopup(70,2," Pick time (range: 0-117):",host,200,150,400,true)
end

function loadGame()
n = 0
m = 0
ui.removeTextArea(97,nil)
tfm.exec.disableAutoNewGame(false)
tfm.exec.setUIMapName("Chicken Pooping Game! <font color='#6C77C1'>|</font> <font color='#C2C2DA'>Host: </font><font color='#98E2EB'>" ..host.. "</font>")
tfm.exec.setGameTime(time+3, true)
tfm.exec.setNameColor(player1,0xEB1D51)
tfm.exec.setNameColor(player2,0x2E72CB)
ui.addTextArea(1, "<b>Player 1:\n" ..player1.. "</b>",nil,160,208,120,0,0x324650,0x212F36,0,true)
ui.addTextArea(2, "<b>Chicken pooped:\n" ..n.. "</b>",nil,160,253,120,0,0x324650,0x212F36,0,true)
ui.addTextArea(3, "<b>Player 2:\n" ..player2.. "</b>",nil,520,208,120,0,0x324650,0x212F36,0,true)
ui.addTextArea(4, "<b>Chicken pooped:\n" ..m.. "</b>",nil,520,253,120,0,0x324650,0x212F36,0,true)
tfm.exec.movePlayer(player1,220,145,false,0,0,false)
tfm.exec.movePlayer(player2,580,145,false,0,0,false)
tfm.exec.bindKeyboard(player1, 40, true, true)
tfm.exec.bindKeyboard(player2, 83, true, true)
function eventPlayerLeft(player)
if player==player1 then
tfm.exec.setGameTime(5, false)
ui.addTextArea(66,"<p align='center'><font size='72' color='#EB1D51'>" ..player1.. "</font><font size='72' color='#C2C2DA'> has left the game. Game will restart.</p></font>",nil,0,50,800,0,0x324650,0x212F36,0,true)
roundWon()
elseif player==player2 then
tfm.exec.setGameTime(5, false)
ui.addTextArea(66,"<p align='center'><font size='72' color='#2E72CB'>" ..player2.. "</font><font size='72' color='#C2C2DA'> has left the game. Game will restart.</p></font>",nil,0,50,800,0,0x324650,0x212F36,0,true)
roundWon()
end
end
end

function roundWon()
ui.removeTextArea(1,nil)
ui.removeTextArea(2,nil)
ui.removeTextArea(3,nil)
ui.removeTextArea(4,nil)
tfm.exec.bindKeyboard(player1, 40, true, false)
tfm.exec.bindKeyboard(player2, 83, true, false)
end

function update(id1,id2,number,playerName,var,loser,x,y)
xFart = math.random(-20,20)+x
yFart = math.random(10,25)+y
ui.updateTextArea(id1,"<b>Player "..number..":\n" ..playerName.. "</b>",nil)
ui.updateTextArea(id2,"<b>Chicken pooped:\n" ..var.. "</b>",nil)
tfm.exec.addShamanObject(itemID, x, y+20, 0, 0, 20, ghostItem)
tfm.exec.displayParticle(3, xFart, yFart, 0, 0, 0, 0, nil)
if var==ducks then
ui.addTextArea(99,"<p align='center'><font size='72' color='#BABD2F'>" ..playerName.. " won the game!</p></font>",nil,0,200,800,0,0x324650,0x212F36,0,true)
tfm.exec.displayParticle(6, xFart, yFart, 0, 0, 0, 0, loser)
tfm.exec.movePlayer(loser,400,-30,false,0,0,false)
tfm.exec.setGameTime(5, false)
roundWon()
end
end

function eventTextAreaCallback(textArea, player, callback)
if textArea==5 then
waiting()
roundWon()
picking()
elseif textArea==6 then
ui.addPopup(98,0,"<p align='center'><font size='32'>Instructions</font></p><font color='#EB1D51'>\n Player 1</font> presses on down arrow.\n<font color='#2E72CB'> Player 2</font> presses on 's' button.\n Goal is to reach " ..ducks.. " ducks in " ..time.. " seconds. Good luck!\n\n<p align='center'><font size='8'></a>Game made by Cyanny.</font>",player,200,130,400,true)
elseif textArea==7 then
tfm.exec.disableAutoNewGame(true)
picking()
settings()
end
end

function eventKeyboard(player, key, down, x, y)
if key==40 then
n = n + 1
update(1,2,1,player1,n,player2,x,y)
elseif key==83 then
m = m + 1
update(3,4,2,player2,m,player1,x,y)
end
end

function eventPopupAnswer(popUpId, host, answer)
if popUpId==70 then
time = tonumber(answer)
if answer=="" then
time = tonumber(60)
end
end
if popUpId==71 then
ducks = tonumber(answer) -- THANK YOU SO MUCH, ABDELTIF
if answer=="" then
ducks = tonumber(50)
end
end
if popUpId==72 then
itemID = answer
if answer=="" then
itemID = 33
end
end
if popUpId==73 then
if answer=="yes" then
ghostItem = true
elseif answer=="no" then
ghostItem = false
end
end
if popUpId==97 then
player1 = answer
end
if popUpId==96 then
player2 = answer
loadGame()
end
end

function eventNewGame()
waiting()
roundWon()
picking()
end

function eventNewPlayer(player)
tfm.exec.respawnPlayer(player)
end

waiting()
picking()
-- Insert your victim's name (person who you would like to move) here without removing the quotation marks.
doll = "Katiejunebug"
tfm.exec.setUIMapName(doll.." is not in control of their own body :o")
-- Insert YOUR name here without removing the quotation marks.
god = "Princessdjt"
-- That's it! You can now run the script and troll people!

-- Editing the following code is not advised.

-- Binding the keyboard for god(you)
-- 73 is I, the key for Up.
-- 75 is K, the key for Down
-- 74 is J, the key for Left.
-- 76 is L, the key for Right.

for name in pairs(tfm.get.room.playerList) do
-- Instead of binding each key seperately, we put them all in a group.
for keys, k in pairs({73, 74, 75, 76}) do
--And now the keys are binded!
tfm.exec.bindKeyboard(god, k, true, true)
end
end

-- Listening for keyboard events.
-- You'll notice that move values are different because it makes the doll easier to control.

function eventKeyboard(god, key, down, x, y)
if key == 73 then
--Moves the player Up by 50 pixels
tfm.exec.movePlayer(doll, 0, 0, true, 0, -50, false)
elseif key == 75 then
-- Moves the player Down by 40 pixels
tfm.exec.movePlayer(doll, 0, 0, true, 0, 40, false)
elseif key == 74 then
-- Moves the player Left by 40 pixels
tfm.exec.movePlayer(doll, 0, 0, true, -40, 0, false)
elseif key == 76 then
-- Moves the player Right by 40 pixels
tfm.exec.movePlayer(doll, 0, 0, true, 40, 0, false)
end
end

-- Prints out your doll's name only to you.

print("<font color='#FFFF00'>"..doll.."<font color='#FFFF00'> is now your doll!")
  • Profils
  • /
  • Yami
Profil
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27