| |
| « Consul » 1488104040000
| 0 | ||
| There are some scripts which eg water to grow? ie for example below ground water for all to be small and thin apan up to cover the entire map but not meaning to grow once every 1-2 seconds |
| « Censeur » 1488115920000
| 0 | ||
Kingkomand2o a dit : Code Lua 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 translates={!lang es !lang br use tr(name,text) for example: ui.addTextArea(0,tr(name,"welcome"),name) if you want to add more languages, in translates add community={text="text"} example: fr={ hello="Bonjour", } |
| « Consul » 1488134700000
| 0 | ||
Tocutoeltuco a dit : Thank's a lot :) |
| « Citoyen » 1488146580000
| 0 | ||
| Is it possible to make a copy of your mouse? (2 mouse with the same outfit, one is real (a player) and another is fake). I don't think it's possible :v |
| « Consul » 1488205860000
| 0 | ||
Dramatotala a dit : |
| « Consul » 1488246900000
| 0 | ||
| how can I create a map rotation in LUA? ie: a LUA script which plays a map randomly from a specific list of maps every 2 minutes |
| 0 | ||
Heniyengui a dit : no Dramatotala a dit : Velspar's script Censere a dit : Shamousey's map rotation tutorial |
| « Censeur » 1488282240000
| 0 | ||
| How can i add 3 language in the script |
| « Censeur » 1488290580000
| 0 | ||
| [/quote] Code Lua 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 translates={!lang es !lang br use tr(name,text) for example: ui.addTextArea(0,tr(name,"welcome"),name) if you want to add more languages, in translates add community={text="text"} example: fr={ hello="Bonjour", }[/quote] |
| « Consul » 1488312960000
| 0 | ||
| So I'm using a script from this tutorial to create a map rotation original script tfm.exec.disableAutoNewGame(true) maps={0,1,2,3,4,5,6,7,8,9,10} function eventLoop(time,remaining) if remaining<=0 then tfm.exec.newGame(maps[math.random(#maps)]) end end function eventPlayerDied() local i=0 for n,player in pairs(tfm.get.room.playerList) do if not player.isDead then i=i+1 end end if i==0 then tfm.exec.newGame(maps[math.random(#maps)]) end end There are a couple of problems though. If I get cheese and bring it to the hole and win, the countdown will go to 20s but the map will not change over until it goes down to 0s. How can this be fixed? Also, if I /mort twice in 3 seconds (ie to skip a map twice within 3 seconds) I get the error You can't call this function [tfm.exec.newGame] more than once per 3 seconds.. Is there any way to get around this? |
| 0 | ||
Censere a dit : I just made it so it'd set the time to 5 seconds whenever someone goes in the hole Code Lua 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 tfm.exec.disableAutoNewGame(true) Dernière modification le 1488373320000 |
| « Citoyen » 1488370020000
| 0 | ||
Onkei a dit : I think that will set the game time to 00:05 whenever a player get the cheese and not when all the players get the cheese. I didn't try it tho. |
| « Censeur » 1488371940000
| 0 | ||
| Script that will allow me to spawn any sham powerup. |
| « Censeur » 1488379440000
| 0 | ||
Yugofazeclan a dit : Code Lua 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 translates={!lang es !lang br use tr(name,text) for example: ui.addTextArea(0,tr(name,"welcome"),name) if you want to add more languages, in translates add community={text="text"} example: fr={ hello="Bonjour", }[/quote][/quote] I'mean Don't know Do you mean delet en={ welcome="Welcome!", }, es={ welcome="¡Bienvenido!", }, br={ welcome="Bem-vindo!", }, Delft the red color and put the translated script ? |
| « Citoyen » 1488545580000
| 0 | ||
| Hi, I would like to request the code for the mascot,, '' for the tribe. It would be a mouse and replied to 5 questions. "How are you?'' Answer: Well "Who created you?" Answer: Shanteye "What did you eat today?" Answer: cereal with milk, and what? "Do you have a girlfriend?" Answer: No, I Shanteye prohibits "Are you bored here?" Answer: That's my job. Please. Dernière modification le 1488545640000 |
| 0 | ||
Shanteye a dit : I made this for someone else a few pages ago. Code Lua 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 --[[ |
| 0 | ||
| i have a Truth or Dare script but i want to add a mode which enables certain questions when true but only when true. ie players marked as admin can do "!mode [mode]" to set the current mode i ideally don't want someone to do it for me but would like someone to teach me how to do it myself since idk how to do those code boxes i'll put the script in a spoiler admins={"Himitsu_no_yami","Juliebae","Borntolol"} -- 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]="If you could go into an anime world, which anime world would it be?" truth[2]="Whos your favourite anime character?" truth[3]="What was your first anime watched?" truth[4]="If you could kill any anime character, who would it be?" truth[5]="Who do you think is the most badass anime character??" truth[6]="Which anime do you most dislike?" truth[7]="What is the anime with the most episodes youve watched?" truth[8]="Have you ever wanted to bash your keyboard against the wall because of a certain part in anime?" truth[9]="What is the most f'ed up anime u watched?" truth[10]="Who is the funniest anime character you know?" dare={}--you can follow the format 'dare[number]="Dare"' dare[1]="Dress up as an anime character in the game" dare[2]="Start acting like an anime freak in the cafe" dare[3]="Watch bocu no pico" dare[4]="Watch detective conan UNTIL THE END (Over 800 episodes)" dare[5]="Recommend a troll anime to a friend" dare[6]="Rate this Truth or dare ANIME EDITION By Borntolol" dare[7]="Find a meme showing how you feel watching anime" dare[8]="Go to your parents / guardian and start talking about an anime just to make them angry" 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 time>1000 then 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 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, "<", "<") 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, "<", "<") 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, "<", "<") 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, "<", "<") 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 |
| « Consul » 1488625800000
| 0 | ||
Onkei a dit : but how can you do to be in collision with mice? ie for example when the water rises in it as you can plutii it is normal or lava to throw you up |
| 0 | ||
| hi how can i draw a circle with trigonometery Sin Cos Tan please sent me script on private message :D |
| « Citoyen » 1488843540000
| 0 | ||
| Himitsu_no_yami The easiest method I can think of : Code Lua 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -- This number will be linked to the numbers of each mode. 1 To write code, do; [code=syntax(ex. lua)] [ /code ]<- Without spaces. Dramatotala Code Lua 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 mapHeight = 400 Unlocker001 Based off of this : http://stackoverflow.com/a/5301009 Code Lua 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 -- The center of the circle. |