Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- General Lua functions
- rgba(R, G, B, A) -- Returns a color with alpha channel
- rgb(R, G, B) -- Returns a color
- lerpColor(Color1, Color2, Alpha) -- Returns a linear interpolated color between Color1 and Color2
- print(Text) -- Prints text to the console
- console(Text) -- Prints text to the console
- consoleRGB(Text, Color) -- Prints colored text to the console
- notify(Title, Text) -- Displays a notification
- modifySound(soundName, Pitch, Volume) -- Changes the pitch and volume of a sound
- modifySoundRe(regEx, Pitch, Volume) -- Changes the pitch and volume of all sounds matching regEx
- searchSound(regEx) -- Finds and displays the names of sounds matching regEx
- searchSoundRe(regEx) -- Finds and displays the names of sounds matching regEx
- bindKey(keyName, Event, Function) -- Binds a key to a Lua function
- unbindKey(keyName, Event) -- Unbinds a key
- searchTribesInputCommands(regEx) -- Finds and displays the Tribes keybinds matching regEx
- reloadSounds() -- Reloads all custom sound files
- stopwatch.toggle() -- Toggles the stopwatch on and off
- stopwatch.start() -- Starts or restarts the stopwatch
- stopwatch.stop() -- Stops the stopwatch
- stopwatch.isRunning() -- Returns 1 if the stopwatch is running, 0 otherwise
- stopwatch.time() -- Returns the stopwatch time as floating point number
- stopwatch.timeStr() -- Returns the stopwatch time as string in a typical stopwatch format
- state.save() -- Saves your current location, speed, health to slot number 1
- state.saveTo(slotNumber) -- Saves your current location, speed, health to a certain slotNumber
- state.recall() -- Recalls location, speed, health of slot number 1
- state.recallTo(slotNumber) -- Recalls location, speed, health of a certain slotNumber
- state.tp() -- Teleports you to the saved location of slot number 1
- state.tpTo(slotNumber) -- Teleports you to the saved location of a certain slotNumber
- state.reset() -- Resets all saved slots
- state.setToSpawns() -- Sets the saved slots to the spawn locations of your team
- route.rec() -- Starts or stops route recording
- route.record() -- Starts or stops route recording
- route.recStart() -- Starts or restarts route recording
- route.recStop() -- Stops route recording
- route.replay() -- Starts or stops replaying of a recorded route
- route.replayStart(startTime) -- Starts or restarts replaying of a recorded route beginning from startTime
- route.replayStop() -- Stops replaying of a recorded route
- route.reset() -- Resets the currently recorded route
- route.save(Description) -- Saves the currently recorded route with Description
- route.load(routeNumber) -- Loads route recording routeNumber
- route.search(regEx) -- Displays route names matching regEx
- route.find(regEx) -- Displays route names matching regEx
- route.list() -- Loads and displays a list of all routes for the current map
- route.getAll() -- Loads all routes for the current map
- route.getEnemy() -- Loads all routes of the opposing team for the current map
- route.enableBot(Enable) -- Toggles or turns the route bot on or off
- toggleTurrets() -- Toggles base turrents on and off
- togglePower() -- Toggles the generator power on and off
- returnFlags() -- Returns all loose flags
- config.reloadVariables() -- Reloads all Lua config variables without reloading the whole configs
- config.reload() -- Reloads the Lua configs
- Canvas drawing functions
- drawText(Text, Color, X, Y, Alignment, Scaling) -- Draws text using the damage number font
- drawSmallText(Text, Color, X, Y, Alignment, shadowDistance, Scaling) -- Draws text using the small console font
- drawUTText(Text, Color, X, Y, Alignment, shadowDistance, Size) -- Draws text using the default UT HUD font
- getTextSize(Text, Scaling) -- Returns the text size of Text using the damage number font
- getSmallTextSize(Text, Scaling) -- Returns the text size of Text using the small console font
- getUTTextSize(Text, Size) -- Returns the text size of Text using the default UT HUD font
- drawRect(X1, Y1, X2, Y2, Color) -- Draws a rectangle
- drawBox(X1, Y1, X2, Y2, Color) -- Draws a box
- drawProgressBar(X1, Y1, X2, Y2, Color, Direction, fillPercentage) -- Draws a progress bar (Directions are: 0-Up 1-Right 2-Down 3-Left)
- draw2dLine(X1, Y1, X2, Y2, Color) -- Draws a 1 pixel 2D line (Alpha channel in color does not work with this)
- LuaRef functions (they get called by the game if they are declared in your code)
- onDamageNumberCreate(overheadNumbersArray, number, location, isShielDamage) -- Gets called whenever a damage number is created
- onDamageNumberUpdate(overheadNumbersArray, TrHUD, DeltaTime) -- Gets called whenever a damage number is updated
- onDrawCustomHud(canvasSizeX, canvasSizeY) -- Gets called every frame
- onAddToCombatLog(AggressorTeam, AggressorName, WeaponIconId, VictimName, VictimTeam) -- Gets called whenever a new message for the kill feed is created
- onChatMessage(SenderTeamId, Channel, SenderName, Message) -- Gets called whenever a new chat message arrives
- onGameMessage(Message, DisplayDuration) -- Gets called whenever a new game message is created
- onKillMessage(Text, VictimName) -- Gets called whenever we kill somebody
- onDrawHealthBar(LocationX, LocationY, isFriend, HealthPct) -- Gets called every frame to draw the IFF health bars
- onQueueAccolade(IconID, Title, Subtitle, IsBadge) Refer to http://pastebin.com/ACauRiwL for IconIDs
- Data getters
- viewPort.size()
- viewPort.isMainMenuOpen()
- viewPort.isScoreboardOpen()
- player.name()
- player.isAlive()
- player.isFirstPerson()
- player.isRaged()
- player.isVehicle()
- player.isShielded()
- player.hasFlag()
- player.energy()
- player.energyMax()
- player.energyPct()
- player.ping()
- player.classId()
- player.health()
- player.healthMax()
- player.speed()
- player.respawnTime()
- player.numDeployables()
- player.numMines()
- player.score()
- player.rabbitRank()
- player.teamNum()
- player.kills()
- player.deaths()
- player.assists()
- player.arenaSpawnsLeft()
- weapon.isReadyToFire(equipPointNumber)
- weapon.isReloading(equipPointNumber)
- weapon.isPack(equipPointNumber)
- weapon.isPassiveReady(equipPointNumber)
- weapon.isLowAmmo(equipPointNumber)
- weapon.ammo(equipPointNumber)
- weapon.ammoMax(equipPointNumber)
- weapon.ammoCarried(equipPointNumber)
- weapon.ammoMaxCarried(equipPointNumber)
- weapon.ammoTotal(equipPointNumber)
- weapon.name(equipPointNumber)
- currentWeapon.isReadyToFire()
- currentWeapon.isReloading()
- currentWeapon.isReloaded()
- currentWeapon.isPack()
- currentWeapon.isLowAmmo()
- currentWeapon.ammo()
- currentWeapon.ammoMax()
- currentWeapon.ammoCarried()
- currentWeapon.ammoMaxCarried()
- currentWeapon.ammoTotal()
- currentWeapon.reticuleIndex()
- currentWeapon.equippedAt()
- currentWeapon.name()
- vehicle.health()
- vehicle.healthMax()
- vehicle.energyPct()
- vehicle.ammo()
- vehicle.ammoMax()
- vehicle.speed()
- game.type()
- game.timeStr()
- game.spectators()
- game.isOfflinePlay()
- game.isOver()
- game.isGenUp(teamNumber)
- game.isWarmUp()
- game.genAutoRepairTime(teamNumber)
- game.overTimeLimit()
- game.score(teamNumber)
- game.scoreLimit()
- game.time()
- game.timeLimit()
- game.timeSeconds()
- game.realTimeSeconds()
- rabbit.leaderBoardScore(leaderBoardIndex)
- rabbit.leaderBoardName(leaderBoardIndex)
- rabbit.rabbitName()
- cah.pointsNum()
- cah.pointsHeld(teamNumber)
- cah.pointHolder(pointNumber)
- cah.pointLabel(pointNumber)
- arena.round()
- arena.roundScore(teamNumber)
- arena.playerStatus(teamNumber, playerNumber)
- flag.isHome(teamNumber)
- flag.returnTime(teamNumber)
- flag.holderName(teamNumber)
Add Comment
Please, Sign In to add comment