Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
local initModuleTimer = 1000 local playerData = { } local stageNames = { "I", "II", "III", "IV", "V" } local totalStages = #stageNames local displayStageNames = function(playerName) for i = 1, totalStages do ui.addTextArea(i, "<p align='center'><font size='30' color='#000000'><B>" .. stageNames[i], playerName, 390 + (i - 1) * 200, 180, 200, nil, 1, 1, 0, false) end ui.setMapName("Perguntas") end local setPlayerData = function(playerName) playerData[playerName] = { currentStage = 0, hasSkipped = false } tfm.exec.setPlayerScore(playerName, 0) end local chooseShaman = true local newShaman, nextShaman local currentQuestion, currentAnswer local skip = 0 local getNewShaman = function() if nextShaman and playerData[nextShaman] then return nextShaman end local scores, counter = { }, 0 local hasMoreThanZeroPoints = false local score for playerName, data in next, playerData do score = tfm.get.room.playerList[playerName].score counter = counter + 1 scores[counter] = { playerName = playerName, score = score } if score > 0 then hasMoreThanZeroPoints = true end end if hasMoreThanZeroPoints then table.sort(scores, function(p1, p2) return p1.score > p2.score end) return scores[1].playerName else return scores[math.random(counter)].playerName end end local resetAllScores = function() for playerName in next, tfm.get.room.playerList do tfm.exec.setPlayerScore(playerName, 0) end end local moveAllToSpawnPoint = function() for playerName in next, tfm.get.room.playerList do tfm.exec.movePlayer(playerName, 125, 365) end end local displayAnswer = function() if not currentAnswer then return end tfm.exec.chatMessage("A resposta da pergunta era <B>" .. currentAnswer .. "</B>.") end local startChooseFlow = function(ignoreAnswer) if newShaman then tfm.exec.respawnPlayer(newShaman) newShaman = nil end if not ignoreAnswer then displayAnswer() end currentQuestion = nil currentAnswer = nil skip = 0 chooseShaman = true moveAllToSpawnPoint() ui.removeTextArea(0) tfm.exec.setGameTime(5) tfm.exec.chatMessage("Escolhendo Shaman...") end local displayQuestion = function(playerName) if not currentQuestion then return end ui.addTextArea(0, "<p align='center'><font size='20'>" .. currentQuestion, playerName, 5, 50, 400, nil, nil, nil, .75, true) end local resetAllPlayerData = function() for playerName, data in next, playerData do data.hasSkipped = false data.currentStage = 0 end end eventNewPlayer = function(playerName) setPlayerData(playerName) displayStageNames(playerName) displayQuestion(playerName) tfm.exec.respawnPlayer(playerName) tfm.exec.chatMessage("<J>Bem vindo ao module Corrida de Perguntas! Digite !help para mais informações.", playerName) end eventNewGame = function() for playerName in next, tfm.get.room.playerList do setPlayerData(playerName) end displayStageNames() startChooseFlow() end eventLoop = function(currentTime, remainingTime) if initModuleTimer > 0 then initModuleTimer = initModuleTimer - 500 return end if chooseShaman then if remainingTime > 0 then return end chooseShaman = false newShaman = getNewShaman() nextShaman = nil tfm.exec.killPlayer(newShaman) tfm.exec.chatMessage("<J>Você é o shaman! Digite <B>!q</B> para fazer a pergunta", newShaman) resetAllScores() resetAllPlayerData() ui.setShamanName(newShaman) tfm.exec.chatMessage("<CEP>".. newShaman .. " estará fazendo as perguntas agora") tfm.exec.setGameTime(60) else if remainingTime <= 0 then startChooseFlow() end end end eventChatCommand = function(playerName, command) if chooseShaman then return end if playerName == newShaman then if command == 'q' then ui.addPopup(0, 2, "Digite sua pergunta", newShaman, 200, 170, 400, true) elseif command == "skip" then tfm.exec.chatMessage("<R>".. playerName .. " pulou a vez") startChooseFlow() return end end if command == "help" then tfm.exec.chatMessage("<CEP>O minigame consiste em um Shaman que irá realizar perguntas para os demais jogadores responder. O primeiro jogador a acertar 5 perguntas ganha o jogo e se torna o próximo Shaman. Digite !q para fazer uma pergunta quando for sua vez de ser o Shaman.", playerName) elseif command == "skip" then if playerData[playerName].hasSkipped then return end playerData[playerName].hasSkipped = true local half = math.ceil(tfm.get.room.uniquePlayers / 2) skip = skip + 1 if skip >= half then tfm.exec.chatMessage("<R>".. newShaman .. " perdeu a vez") startChooseFlow() else tfm.exec.chatMessage("Skip", playerName) end end end eventPopupAnswer = function(id, playerName, answer) if chooseShaman then return end if playerName ~= newShaman then return end if id == 0 then -- Pergunta currentAnswer = nil currentQuestion = answer tfm.exec.chatMessage("Sua pergunta: " .. answer, playerName) ui.addPopup(1, 2, "Digite a resposta da sua pergunta", playerName, 200, 170, 400, true) elseif id == 1 then -- Resposta currentAnswer = string.lower(answer) displayQuestion() tfm.exec.setGameTime(60) tfm.exec.chatMessage("A resposta para sua pergunta: " .. currentAnswer, playerName) end end eventChatMessage = function(playerName, message) if chooseShaman then return end if message ~= currentAnswer then return end if playerName == newShaman then return startChooseFlow() end tfm.exec.chatMessage("<VP>".. playerName .. " acertou!") displayAnswer() currentAnswer = nil tfm.exec.movePlayer(playerName, 500 + playerData[playerName].currentStage * 200, 365) playerData[playerName].currentStage = playerData[playerName].currentStage + 1 tfm.exec.setPlayerScore(playerName, 1, true) if playerData[playerName].currentStage == totalStages then nextShaman = playerName startChooseFlow(true) else tfm.exec.setGameTime(60) ui.removeTextArea(0) end end eventPlayerLeft = function(playerName) playerData[playerName] = nil if chooseShaman then return end if playerName ~= newShaman and playerName ~= nextShaman then return end startChooseFlow() end tfm.exec.disableAutoNewGame() tfm.exec.disableAutoShaman() tfm.exec.disableAfkDeath() tfm.exec.disableMortCommand() tfm.exec.disableAutoScore() system.disableChatCommandDisplay() tfm.exec.newGame('<C><P DS="m;45,365,65,365,85,365,105,365,125,365,145,365,165,365,185,365,205,365,225,365,245,365,265,365,285,365,305,365,325,365,345,365" L="1400" /><Z><S><S L="400" H="20" X="1390" Y="200" T="10" P=",,.3,,270,,," /><S L="400" X="10" H="20" Y="200" T="10" P=",,.3,,90,,," /><S L="400" X="390" H="20" Y="200" T="10" P=",,.3,,270,,," /><S L="400" H="20" X="400" Y="200" T="10" P=",,.3,,90,,," /><S L="400" H="20" X="590" Y="200" T="10" P=",,.3,,270,,," /><S L="400" X="790" H="20" Y="200" T="10" P=",,.3,,270,,," /><S L="400" H="20" X="990" Y="200" T="10" P=",,.3,,270,,," /><S L="400" X="1190" H="20" Y="200" T="10" P=",,.3,,270,,," /><S L="400" X="600" H="20" Y="200" T="10" P=",,.3,,90,,," /><S L="400" H="20" X="800" Y="200" T="10" P=",,.3,,90,,," /><S L="400" X="1000" H="20" Y="200" T="10" P=",,.3,,90,,," /><S L="400" H="20" X="1200" Y="200" T="10" P=",,.3,,90,,," /><S L="1400" X="700" H="20" Y="10" T="10" P=",,.3,,180,,," /><S L="1400" H="20" X="700" Y="390" T="10" P=",,.3,,,,," /></S><D /><O /></Z></C>')
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
Free Crypto Method (NEVER SEEN BEFORE)
JavaScript | 1 sec ago | 0.26 KB
⭐⭐⭐Exploit 500$ in 15 Minutes⭐⭐⭐
Java | 1 sec ago | 0.08 KB
⭐⭐⭐MAKE $500 IN 15 MIN⭐⭐⭐
Java | 5 sec ago | 0.06 KB
⭐⭐⭐MAKE $500 IN 15 MIN⭐⭐⭐
Java | 7 sec ago | 0.06 KB
✅ MAKE $900 INSTANTLY
JavaScript | 8 sec ago | 0.26 KB
✅ MAKE $500 IN 15 MIN
JavaScript | 13 sec ago | 0.26 KB
⭐⭐⭐Crypto Accounts⭐⭐⭐
Java | 13 sec ago | 0.08 KB
⭐⭐⭐Swapzone Glitch (Working)⭐⭐⭐
Java | 16 sec ago | 0.06 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!