Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
fly = false chamane = false vampire = false bootcamp = false survivor = false quizz = false -- Liste des commandes commands = {"stop", "time", "color", "kill", "ch", "respawn", "meep", "help", "bc", "next"} -- Liste des cartes bootcamp pouvant être jouées (en attendant de pouvoir jouer une carte aléatoire d'une rotation) bootcampMaps = {"@1427980", "@161434", "@216173", "@172621", "@500000", "@3908151", "@512887","@374995", "@306365", "@155606", "@333002", "@172547", "@3734998", "@1737914", "@2989803", "@3136410", "@438449", "@976944", "@1595965", "@1636814", "@2009003", "@3804078", "@3768117", "@3799357", "@3278138", "@3311534", "@3779861", "@3576303", "@3780618", "@2789121", "@2811229", "@3659983", "@3759157", "@597804", "@2998268", "@2132250", "@3745158", "@3338283", "@3062939", "@3137929", "@3560999", "@3182487", "@3725142", "@3012311", "@3493456", "@343456", "@208056", "@881158", "@492399", "@268915", "@505619", "@397469", "@729863", "@184648", "@156720", "@541693"} -- Liste des cartes survivor pouvant être jouées (en attendant de pouvoir jouer une carte aléatoire d'une rotation) survivorMaps = {"@3540608","@492283","@1026249","@1545834","@1659906","@1659906","@3295213","@3699989","@741041","@489470","@395246","@292672","@306106","@3584123","@1522692","@3107377","@2387888","@3685564","@787131","@2408376","@3670885","@3620709","@3584826","@3587860","@3549404","@481676","@3550350","@3480467"} -- Durée d'un bootcamp (défaut: 6min soit 360 secondes) bootcampDuration = 360 tfm.exec.disableAfkDeath(true) tfm.exec.newGame() function eventNewPlayer(playerName) displayCredits(playerName) tfm.exec.bindKeyboard(playerName, 79, true) tfm.exec.bindKeyboard(playerName, 80, true) tfm.exec.respawnPlayer(playerName) if fly==true then tfm.exec.bindKeyboard(playerName,32,true) end if chamane==true then tfm.exec.setShaman(playerName) end end function eventPlayerDied(playerName) if bootcamp==true then tfm.exec.respawnPlayer(playerName) end if chamane==true then tfm.exec.setShaman(playerName) tfm.exec.respawnPlayer(playerName) end if survivor==true then tfm.exec.setPlayerScore(playerName, 1, true) if tfm.get.room.playerList[playerName].isShaman==true then tfm.exec.setPlayerScore(p, 0, false) tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)]) for p,_ in pairs(tfm.get.room.playerList) do if tfm.get.room.playerList[p].isShaman==false then if tfm.get.room.playerList[p].isDead==false then tfm.exec.setPlayerScore(p, math.random(3) + 15, true) end end end else survivorShaman = "" nbSurv = 0 for p,_ in pairs(tfm.get.room.playerList) do if tfm.get.room.playerList[p].isShaman==false then if tfm.get.room.playerList[p].isDead==false then nbSurv = nbSurv + 1 end else survivorShaman = p end end if nbSurv <= 1 then tfm.exec.setPlayerScore(survivorShaman, 0, false) tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)]) for p,_ in pairs(tfm.get.room.playerList) do if tfm.get.room.playerList[p].isShaman==false then if tfm.get.room.playerList[p].isDead==false then tfm.exec.setPlayerScore(p, math.random(3) + 15, true) end end end end end end end function eventPlayerWon(playerWon) if bootcamp==true then tfm.exec.respawnPlayer(playerWon) tfm.exec.setPlayerScore(playerWon, 20, true) end end function eventNewGame() displayCredits(nil) for p,_ in pairs(tfm.get.room.playerList) do tfm.exec.bindKeyboard(p,79,true) tfm.exec.bindKeyboard(p,80,true) if fly==true then tfm.exec.bindKeyboard(p,32,true) end if chamane==true then tfm.exec.setShaman(p) end end if vampire==true then hasVampired = false tfm.exec.setUIMapName("<font color='#BABD2F'>Mini-jeu :</font> <font color='#C2C2DA'>Vampire</font>") end if fly==true then tfm.exec.setUIMapName("<font color='#BABD2F'>Mini-jeu :</font> <font color='#C2C2DA'>Fly</font>") end if chamane==true then tfm.exec.setUIShamanName("Tout le monde !") tfm.exec.setUIMapName("<font color='#BABD2F'>Mini-jeu :</font> <font color='#C2C2DA'>Chamane</font>") end if bootcamp==true then tfm.exec.setUIMapName("<font color='#BABD2F'>Mini-jeu :</font> <font color='#C2C2DA'>Bootcamp</font>") end if survivor==true then tfm.exec.setUIMapName("<font color='#BABD2F'>Mini-jeu :</font> <font color='#C2C2DA'>Survivor</font>") end end function eventKeyboard(playerName, keyCode, True, x, y) if keyCode==79 then displayGestionnaire(false, playerName) end if keyCode==80 then ui.addPopup(1, 2, "Entrez le code de la map que vous voulez jouer :", playerName, 300, 150, 200) end if fly==true then if keyCode==32 then tfm.exec.movePlayer(playerName, playerName.x, playerName.y, false, 0, -50, off) end end end function eventPopupAnswer(popupId, playerName, answer) if popupId==1 then if answer~="" then activate() tfm.exec.newGame(answer) end end end hasVampired = false function eventLoop(currentTime, timeRemaining) if vampire==true then if hasVampired==false then if timeRemaining<=105000 then tfm.exec.setVampirePlayer(randomPlayer()) hasVampired = true end end end if bootcamp==true then if timeRemaining<=0 then tfm.exec.newGame(bootcampMaps[math.random(#bootcampMaps)]) tfm.exec.setGameTime(bootcampDuration) end end if survivor==true then if timeRemaining<=0 then for p,_ in pairs(tfm.get.room.playerList) do if tfm.get.room.playerList[p].isShaman==false then tfm.exec.setPlayerScore(p, math.random(3) + 15, true) else tfm.exec.setPlayerScore(p, 0, false) end end tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)]) end end end function eventChatCommand(playerName, message) if message=="stop" then activate() tfm.exec.newGame() end if message=="next" then if bootcamp==true then tfm.exec.disableAutoScore(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAfkDeath(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAutoNewGame(true) tfm.exec.newGame(bootcampMaps[math.random(#bootcampMaps)]) tfm.exec.setGameTime(bootcampDuration) end end if message:sub(0, 2)=="bc" then if bootcamp==true then tfm.exec.disableAutoScore(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAfkDeath(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAutoNewGame(true) tfm.exec.newGame(message:sub(4)) tfm.exec.setGameTime(bootcampDuration) end end if message:sub(0,4)=="time" then tfm.exec.setGameTime(message:sub(6)) end if message:sub(0,5)=="color" then if string.len(message) > 6 then tfm.exec.setNameColor(playerName, "0x"..message:sub(7).."") end end if message=="kill" then tfm.exec.killPlayer(playerName) end if message=="ch" then tfm.exec.setPlayerScore(playerName, 9001, add) end if message=="respawn" then if chamane==true then tfm.exec.setShaman(playerName) end if survivor==false then tfm.exec.respawnPlayer(playerName) end end if message=="meep" then tfm.exec.giveMeep(playerName) end if message=="help" then displayHelp(false, playerName) end end function eventTextAreaCallback(textAreaId, playerName, callback) if callback=="callbackClose" then displayHelp(true, playerName) elseif callback=="callbackCommands" then displayHelp(true, playerName) displayCommands(false, playerName) elseif callback=="callbackCloseCommands" then displayCommands(true, playerName) elseif callback=="callbackAccueilCommands" then displayCommands(true, playerName) displayHelp(false, playerName) elseif callback=="callbackMinijeux" then displayHelp(true, playerName) displayMinijeux(false, playerName) elseif callback=="callbackCloseMinijeux" then displayMinijeux(true, playerName) elseif callback=="callbackAccueilMinijeux" then displayMinijeux(true, playerName) displayHelp(false, playerName) elseif callback=="callbackCloseGestionnaire" then displayGestionnaire(true, playerName) elseif callback=="callbackBootcamp" then displayGestionnaire(true, playerName) activate("bootcamp") elseif callback=="callbackChamane" then displayGestionnaire(true, playerName) activate("chamane") elseif callback=="callbackFly" then displayGestionnaire(true, playerName) activate("fly") elseif callback=="callbackVampire" then displayGestionnaire(true, playerName) activate("vampire") elseif callback=="callbackSurvivor" then displayGestionnaire(true, playerName) activate("survivor") elseif callback=="callbackStop" then displayGestionnaire(true, playerName) activate(nil) end end function displayHelp(doClose, playerName) if doClose==true then ui.removeTextArea(3, playerName) ui.removeTextArea(4, playerName) ui.removeTextArea(5, playerName) ui.removeTextArea(6, playerName) else ui.addTextArea(3, "<p align='center'><font color='#C2C2DA' size='35' >Aide</font></p><br /><b> Appuyez sur O pour lancer le gestionnaire de modules<br /> Appuyez sur P pour jouer une carte<br /></b> <font size='13'><br /> Quelle catégorie souhaiteriez-vous consulter ?</font>", playerName, 200, 100, 400, 200, 0x324650, 0x6A8FA2, 1f) ui.addTextArea(4, "<font size='15'><a href='event:callbackClose'>x</a></font>", playerName, 206, 105, 20, 30, 0x324650, 0x324650, 1f) ui.addTextArea(5, "<p align='center'><a href='event:callbackCommands'>Commandes</a></p>", playerName, 275, 250, 100, 20, 0x3C5064, 0x3C5064, f1) ui.addTextArea(6, "<p align='center'><a href='event:callbackMinijeux'>Mini-jeux</a></p>", playerName, 425, 250, 100, 20, 0x3C5064, 0x3C5064, f1) end end function displayCommands(doClose, playerName) if doClose==true then ui.removeTextArea(7, playerName) ui.removeTextArea(8, playerName) ui.removeTextArea(9, playerName) else ui.addTextArea(7, "<p align='center'><font color='C2C2DA' size='35' >Commandes</font></p><br /><b> !help :</b> Affiche l'aide<br /><b> !stop :</b> Interrompt le mini-jeu en cours<br /><b> !kill :</b> Mourir instantanément<br /><b> !respawn :</b> Réapparaître instantanément<br /><b> !ch :</b> Vous serez chamane lors de la prochaine partie<br /><b> !meep :</b> Vous serez pourvu du pouvoir de meep<br /><b> !time [secondes] :</b> Modifie le temps de la partie en cours<br /><b> !color [code héxadécimal] :</b> Change la couleur de votre pseudo<br /><b> !next :</b> (mini-jeu bootcamp) Change de carte<br /><b> !bc [@code] :</b> (mini-jeu bootcamp) Joue une carte en bootcamp", playerName, 200, 90, 400, 220, 0x324650, 0x6A8FA2, 1f) ui.addTextArea(8, "<font size='15'><a href='event:callbackCloseCommands'>x</a></font>", playerName, 206, 105, 20, 30, 0x324650, 0x324650, 1f) ui.addTextArea(9, "<font size='15'><a href='event:callbackAccueilCommands'>←</a></font>", playerName, 570, 105, 20, 30, 0x324650, 0x324650, 1f) end end function displayMinijeux(doClose, playerName) if doClose==true then ui.removeTextArea(10, playerName) ui.removeTextArea(11, playerName) ui.removeTextArea(12, playerName) else ui.addTextArea(10, "<p align='center'><font color='C2C2DA' size='35' >Mini-jeux</font></p><br /><font color='#BABD2F'> • fly :</font> Volez autant que vous le pouvez !<br /><font color='#BABD2F'> • chamane :</font> Tout le monde béneficie des pouvoirs de chamane.<br /><font color='#BABD2F'> • vampire :</font> Évitez le vampire !<br /><font color='#BABD2F'> • bootcamp :</font> Un système intelligent d'entraînement au bootcamp.", playerName, 200, 100, 400, 200, 0x324650, 0x6A8FA2, 1f) ui.addTextArea(11, "<font size='15'><a href='event:callbackCloseMinijeux'>x</a></font>", playerName, 206, 105, 20, 30, 0x324650, 0x324650, 1f) ui.addTextArea(12, "<font size='15'><a href='event:callbackAccueilMinijeux'>←</a></font>", playerName, 570, 105, 20, 30, 0x324650, 0x324650, 1f) end end function displayGestionnaire(doClose, playerName) if doClose==true then ui.removeTextArea(13, playerName) ui.removeTextArea(14, playerName) ui.removeTextArea(15, playerName) ui.removeTextArea(16, playerName) ui.removeTextArea(17, playerName) ui.removeTextArea(18, playerName) ui.removeTextArea(19, playerName) ui.removeTextArea(20, playerName) if bootcamp==true or chamane==true or vampire==true or fly==true or survivor==true or quizz==true then ui.removeTextArea(21, playerName) end else if bootcamp==true or chamane==true or vampire==true or fly==true or survivor==true or quizz==true then ui.addTextArea(13, "<p align='center'><font color='#C2C2DA' size='25' >Gestionnaire de mini-jeux</font><br><br>Veuillez selectionner le mini-jeu désiré :", playerName, 200, 100, 400, 235, 0x324650, 0x6A8FA2, 1f) else ui.addTextArea(13, "<p align='center'><font color='#C2C2DA' size='25' >Gestionnaire de mini-jeux</font><br><br>Veuillez selectionner le mini-jeu désiré :", playerName, 200, 100, 400, 200, 0x324650, 0x6A8FA2, 1f) end ui.addTextArea(14, "<font size='15'><a href='event:callbackCloseGestionnaire'>x</a></font>", playerName, 205, 105, 20, 30, 0x324650, 0x324650, 1f) ui.addTextArea(15, "<p align='center'><a href='event:callbackBootcamp'>Bootcamp</a></p>", playerName, 225, 200, 100, 20, 0x3C5064, 0x3C5064, f1) ui.addTextArea(16, "<p align='center'><a href='event:callbackChamane'>Chamane</a></p>", playerName, 225, 250, 100, 20, 0x3C5064, 0x3C5064, f1) ui.addTextArea(17, "<p align='center'><a href='event:callbackVampire'>Vampire</a></p>", playerName, 350, 200, 100, 20, 0x3C5064, 0x3C5064, f1) ui.addTextArea(18, "<p align='center'><a href='event:callbackFly'>Fly</a></p>", playerName, 350, 250, 100, 20, 0x3C5064, 0x3C5064, f1) ui.addTextArea(19, "<p align='center'><a href='event:callbackSurvivor'>Survivor</a></p>", playerName, 475, 200, 100, 20, 0x3C5064, 0x3C5064, f1) ui.addTextArea(20, "<p align='center'><a href='event:callbackCommingsoon'>Coming soon...</a></p>", playerName, 475, 250, 100, 20, 0x3C5064, 0x3C5064, f1) if bootcamp==true or chamane==true or vampire==true or fly==true or survivor==true or quizz==true then ui.addTextArea(21, "<p align='center'><a href='event:callbackStop'>Arrêter le mini-jeu en cours</a></p>", playerName, 225, 300, 350, 20, 0x3C5064, 0x3C5064, f1) end end end function displayCredits(playerName) ui.addTextArea(2, "Module par Deathmatic & Allounett", NIL, 5, 375, 400, 20, 0x6A7495, 0x6A7495, 0f) end function activate(target) if target=="bootcamp" then fly = false chamane = false vampire = false survivor = false quizz = false bootcamp = true tfm.exec.disableAutoScore(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAfkDeath(true) tfm.exec.newGame(bootcampMaps[math.random(#bootcampMaps)]) tfm.exec.setGameTime(bootcampDuration) elseif target=="chamane" then fly = false vampire = false bootcamp = false survivor = false quizz = false chamane = true tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAfkDeath(true) tfm.exec.newGame(tfm.get.room.currentMap) elseif target=="fly" then chamane = false vampire = false bootcamp = false survivor = false quizz = false fly = true tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAfkDeath(true) tfm.exec.newGame(tfm.get.room.currentMap) elseif target=="vampire" then fly = false chamane = false bootcamp = false survivor = false quizz = false vampire = true tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAfkDeath(true) tfm.exec.newGame(tfm.get.room.currentMap) elseif target=="survivor" then fly = false chamane = false bootcamp = false vampire = false quizz = false survivor = true tfm.exec.disableAutoScore(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(false) tfm.exec.disableAfkDeath(false) tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)]) else vampire = false chamane = false fly = false bootcamp = false survivor = false quizz = false tfm.exec.disableAfkDeath(false) tfm.exec.disableAutoShaman(false) tfm.exec.disableAutoNewGame(false) tfm.exec.disableAutoScore(false) tfm.exec.disableAutoTimeLeft(false) tfm.exec.newGame() end end function randomPlayer() k = 1 for p,_ in pairs(tfm.get.room.playerList) do table[k] = p k = k + 1 end random = math.random(k) return table[random] end
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
웹 보안 - HTML & JavaScript 기초
6 hours ago | 6.45 KB
Trevor-powershell
6 hours ago | 0.15 KB
Halo Evolutions 21
13 hours ago | 1.25 KB
EU Defense Stocks
1 day ago | 0.06 KB
Halo Evolutions 19
1 day ago | 0.42 KB
Halo Evolutions 17
1 day ago | 0.43 KB
Halo Evolutions 16
1 day ago | 0.20 KB
gen5
1 day ago | 0.75 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!