content
stringlengths
5
1.05M
local setfenv = setfenv local idl = require "oil.corba.idl" --[[VERBOSE]] local verbose = require "oil.verbose" module "oil.corba.idl.ir" -------------------------------------------------------------------------------- ------------------------------------------------------...
--[[ Name: holden.lua For: TalosLife By: TalosLife ]]-- local Car = {} Car.VIP = true Car.Make = "Holden" Car.Name = "Holden GTS" Car.UID = "holden_gts" Car.Desc = "The Holden, gmod-able by TDM" Car.Model = "models/tdmcars/hsvgts.mdl" Car.Script = "scripts/vehicles/TDMCars/hsvgts.txt" Car.Price = 45000 Car.FuellTan...
assert(Skada, "Skada not found!") -- cache frequently used globals local pairs, ipairs, format, select, tostring = pairs, ipairs, string.format, select, tostring local tContains, min, max, floor = tContains, math.min, math.max, math.floor local getSpellInfo = Skada.getSpellInfo or GetSpellInfo local newTable, delTable...
local mod = DBM:NewMod(658, "DBM-Party-MoP", 1, 313) local L = mod:GetLocalizedStrings() local sndWOP = mod:SoundMM("SoundWOP") mod:SetRevision(("$Revision: 9469 $"):sub(12, -3)) mod:SetCreatureID(56732) mod:SetZone() mod:RegisterCombat("combat") mod:RegisterEventsInCombat( "SPELL_CAST_SUCCESS", "SPE...
local Gui = require("api.Gui") local Chara = require("api.Chara") local Rand = require("api.Rand") local RandomEventPrompt = require("api.gui.RandomEventPrompt") local RandomEvent = {} local global_kind = "normal" local KINDS = table.set { "normal", "sleep", "disabled" } function RandomEvent.set_kind(kind_) kin...
-- Copyright (c) 2019 Redfern, Trevor <trevorredfern@gmail.com> -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT return function(align, min, max, size) local pos if align == "right" or align == "bottom" then pos = max - size elseif align == "center" or align == "m...
if not modules then modules = { } end modules ['lxml-ctx'] = { version = 1.001, comment = "companion to lxml-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } -- will be cleaned up ...
local b4={}; for x,_ in pairs(_ENV) do b4[x]=x end local lib={} lib.big = math.huge lib.fmt = string.format lib.R = math.random local _id=0 function lib.id() _id = 1 + _id; return _id end function lib.push(t,x) t[1+#t]=x; return x end function lib.sort(t,f) table.sort(t,f); return t end function lib.map(t,f...
ITEM.name = "Monitor" ITEM.desc = "Covered in dust and in poor condition" ITEM.model = "models/props_lab/monitor01a.mdl" ITEM.width = 2 ITEM.height = 2 ITEM.money = {1, 6}
-- Copyright (c) 2021 Kirazy -- Part of Artisanal Reskins: Bob's Mods -- -- See LICENSE in the project directory for license information. -- Check if reskinning needs to be done if not (reskins.bobs and reskins.bobs.triggers.logistics.entities) then return end -- Set input parameters local inputs = { type = "stor...
APP_ID = "SWUpdate Rescue GUI" LOGO = "logo.png" NOREBOOT = true NETWORK_INTERFACES = {"eth0", "eth1"} LANG= "de" STYLESHEETS = "industrial" function SAVEIPADDRESS(setup) print("SAVEIPADDRESS called") end
-------------------------------- -- @module DisplayManager -- @extend Ref -- @parent_module ccs ---@class ccs.DisplayManager:ccs.Ref local DisplayManager = {} ccs.DisplayManager = DisplayManager -------------------------------- --- ---@return cc.Node function DisplayManager:getDisplayRenderNode() end -------------...
--[[ ~ Weapon Store ~ Shared ~ ~ Lexi ~ --]] ENT.Type = "anim"; ENT.Base = "base_anim"; ENT.PrintName = "Weapon Store"; ENT.Author = "Lexi"; ENT.Purpose = "A respawning weapon pickup point."; ENT.Spawnable ...
-- видеоскрипт для видеобалансера "CDN Movies" https://cdnmovies.net (18/4/22) -- Copyright © 2017-2022 Nexterr | https://github.com/Nexterr-origin/simpleTV-Scripts -- ## необходим ## -- модуль: /core/playerjs.lua -- ## открывает подобные ссылки ## -- http://moonwalk.cam/movie/4514 -- http://moonwalk.cam/serial/5...
local mg = require "moongen" local memory = require "memory" local device = require "device" local ts = require "timestamping" local filter = require "filter" local hist = require "histogram" local stats = require "stats" local timer = require "timer" local log = require "log" -- set addresses here loca...
#!/usr/bin/env luajit local vimba = require'vimba' local ret = vimba.init() print("init", ret) local names = {"1930", "1920"} local camera_ids = {"169.254.196.158", "169.254.104.127"} local xml = {'GT1930C-settings.xml', "GT1920C-settings.xml"} local cameras = {} for i, CAM_ID in ipairs(camera_ids) do print("Open...
return { name = "Blue Friends", author = "evilnote4d", version = "0.5", message = [[ If you didn't like red slimes, you will hate the blue ones. These creatures can sense your presence and will follow you everywhere. Fortunately, they are not very smart. ]], data = [[ ############# #+##...
--*********************************************************** --** THE INDIE STONE ** --** Author: turbotutone ** --*********************************************************** local function getLuaNetModule( _name, _debug ) local self = {}; local self_command...
return {'mozaiek','mozaiektegel','mozaiekvloer','mozaisch','mozetta','mozzarella','mozaiekwerk','mozaiekbeeld','mozambikaan','mozambikaans','mozambique','mozart','mozes','mozilla','mozaieken','mozaiektegels','mozaiekvloeren','mozaische','mozambikaanse','mozettas','mozarts','mozes'}
local theClockFont = "Tahoma bold" function onResStart () local dxStatus = dxGetStatus() if tonumber(dxStatus['VideoMemoryFreeForMTA']) > 250 then local testFont = guiCreateFont( "tutano_cc_v2.ttf", 0.07*BGWidth ) if testFont then theClockFont = testFont end end end addEventHandler ( "onClientResourceSta...
object_tangible_furniture_all_frn_all_decorative_sm_s4 = object_tangible_furniture_all_shared_frn_all_decorative_sm_s4:new { } ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_all_decorative_sm_s4, "object/tangible/furniture/all/frn_all_decorative_sm_s4.iff")
-- Keys[1] is ip, argv[1] is time duration, argv[2] is times local key = 'rate:limiting:' .. KEYS[1] local rate_count = redis.call('LLEN', key) local rate_max = tonumber(ARGV[2]) -- Because of 'deterministic commands', we cannot use redis.call('TIME')[1] local ctime = tonumber(ARGV[3]) if rate_count < rate_max then ...
local vim = vim local cfg = require("tmux.configuration") local keymaps = require("tmux.keymaps") local wrapper = require("tmux.wrapper") local function winnr(direction) return vim.api.nvim_call_function("winnr", { direction }) end local function wincmd(direction) return vim.api.nvim_command("wincmd " .. direction)...
local util = require("genvdoc.util") local plugin_name = vim.env.PLUGIN_NAME local example_path = ("./spec/lua/%s/example.lua"):format(plugin_name) vim.o.runtimepath = vim.fn.getcwd() .. "," .. vim.o.runtimepath dofile(example_path) require("genvdoc").generate(plugin_name .. ".nvim", { sources = { { name = "lu...
CLASS.name = "Metropolice Recruit" CLASS.faction = FACTION_MPF CLASS.isDefault = true function CLASS:CanSwitchTo(client) return Schema:IsCombineRank(client:Name(), "RCT") end CLASS_MPR = CLASS.index
object_mobile_exar_kun_cultist_f = object_mobile_shared_exar_kun_cultist_f:new { } ObjectTemplates:addTemplate(object_mobile_exar_kun_cultist_f, "object/mobile/exar_kun_cultist_f.iff")
-- Copyright (c) 2017 Pierre Chapuis -- see LICENSE file ------------------------------------------------------------ -- test salsa20.lua local salsa20 = require "plc.salsa20" local bin = require "plc.bin" local function test_salsa20_encrypt_decrypt() -- Check we can decrypt what we encrypted. local plain = "L...
-- See https://wiki.openstreetmap.org/wiki/Key:railway for infomation -- train globals name = "locomotive" vehicle_types = { "vehicle", "motor_vehicle", "motorcar", "train", "freight" } constraints = { "maxweight", "maxwidth" } minspeed = 10 maxspeed = 300 -- default speed profiles speed_profile = { ["rail"] = 100,...
require("SWObjects") f = new SWObjects.AtomFactory() assert(1 == 1, "tautology test")
------------------------------- --Hook library-------------- ------------------------------- hook = {} hook.Hooks = {} --Default hooks, for reference hook.HookNames = {"Think", "RecieveLine", --server,line //done "RecieveChat", --server,user,mask,room,nick,msg //done "PrivateMessage", --ser...
--[[ Copyright (c) 2015 深圳市辉游科技有限公司. --]] local cjson = require('cjson.safe') local AccountInfo = class('AccountInfo') local _info = {} function AccountInfo.create() _info = { currentUser = {}, accounts = {} } local fu = cc.FileUtils:getInstance() local cjson = require('cjson.safe') local sessionI...
-- Utility Functions REFERENCE_WIDTH = 1280 REFERENCE_HEIGHT = 800 -- returns a string of all elements of a set function setToString(set) if set == nil then return "nil" end local l = {} for e in pairs(set) do l[#l + 1] = e end return "{" .. table.concat(l, ", ") .. "}" end -- shallow copi...
TILESIZE = 8 SCALING_FACTOR = 4 ANIMATE = require 'anim8' hitBox = {} game = false local enemies = {} local spawnDelay = 2 local lastSpawn = love.timer.getTime() local function checkHit() for i, enemy in ipairs(enemies) do if hitBox[2] > enemy:left() and hitBox[1] < enemy:right() and ...
local gears = require("gears") local awful = require("awful") require("awful.autofocus") local beautiful = require("beautiful") local naughty = require("naughty") local menubar = require("menubar") -- Config directory local config = gears.filesystem.get_dir("config") -- Check if awesome encountered an error during st...
local ReplicatedStorage = game:GetService("ReplicatedStorage") local common = ReplicatedStorage:WaitForChild("common") local Thunks = require(common:WaitForChild("Thunks")) return { id = "itempack_rainbow", name = "Rainbow Item Pack", desc = ( "Contains every rainbow item.\n".. "List of c...
local _, private = ... --[[ Lua Globals ]] -- luacheck: globals next --[[ Core ]] local Aurora = private.Aurora local Base, Hook, Skin = Aurora.Base, Aurora.Hook, Aurora.Skin local Color, Util = Aurora.Color, Aurora.Util do --[[ FrameXML\GameTooltip.lua ]] function Hook.EmbeddedItemTooltip_Clear(self) if...
asset = "http://www.roblox.com/asset/?id=" meshes = {["blast"] = 20329976,["ring"] = 3270017,["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["cloud"] = 1095708,["diamond"] = 9756362} sounds = {["explode"] = 130792180;} torsomesh = "rbxasset://fonts/torso.mesh" colours = {"Tr. Red","Black","Tr. Blue","Black...
local api = vim.api local fn = vim.fn local log = require("metals.log") local util = require("metals.util") local Path = require("plenary.path") local function filename_from_uri(full_uri) local parts = util.split_on(full_uri, "/") return parts[#parts] end local handle_decoder_response = function(result, uri, dec...
ITEM.name = "Red Beacon" ITEM.throwent = "nut_beacon" ITEM.throwforce = 650 ITEM.desc = "beaconDesc" ITEM.price = 80 ITEM.exRender = true ITEM.iconCam = { pos = Vector(98.124336242676, 82.42163848877, 60.427516937256), ang = Angle(25.154916763306, -139.95780944824, -42.897842407227), fov = 4.0647949973453, outline...
if SERVER then AddCSLuaFile() end -- create the exported table fw.team = fw.team or {} -- load internal dependencies fw.dep(SHARED, "notif") fw.dep(SHARED, "hook") fw.dep(SERVER, "data") fw.dep(SERVER, "chat_commands") -- load core team system fw.include_sh "teams_sh.lua" fw.include_sv "teams_sv.lua" fw.include_cl ...
local api = require("fromage") local client = api() local enumerations = client.enumerations() coroutine.wrap(function() client.connect("Username#0000", "password") if client.isConnected() then print("Creating topic:") local topic = client.createTopic("Testing API", "Aye Hey Hi", { f = enumerations.forum.at...
factory.taker = {} function factory.taker.take(pos,dir,invlist) local src = vector.add(pos,dir) local meta = minetest.env:get_meta(src) local inv = meta:get_inventory() if not inv:is_empty(invlist) then local list = inv:get_list(invlist) for i,item in ipairs(list) do if item:get_name() ~= "" then factor...
--[[ Copyright (C) 2019 Onset Roleplay Developers: * Logic_ * Bork Contributors: * Blue Mountains GmbH ]]-- -- Variables local EnvTimer EnvHour = 12 EnvMin = 0 EnvWeather = 1 EnvTemperature = 30 EnvFog = 0 local apikey = '4e444684a31d5a4b581548a901e6f0e8' local url = 'http://api.openweathermap.org/data/2.5/weather...
if ( os.istarget( "Windows" ) ) then OSDependentRootDir = path.join( "..", "..", "dependencies", "glslang" ) else OSDependentRootDir = VulkanSDKDir end OSDependentIncludeDir = path.join( OSDependentRootDir, "include" ) OSDependentEnabled = false if ( os.isdir( OSDependentIncludeDir ) ) then OSDependentLibDir = pat...
function BladeStrikeBlink(keys) local caster = keys.caster local casterPos = caster:GetAbsOrigin() local target = keys.target local targetPos = target:GetAbsOrigin() local pid = caster:GetPlayerID() local ability = keys.ability local level_multiplier = ability:GetLevelSpecialValueFor("lvl_multiplier", (ability:G...
local skynet = require "skynet" local db_modules = {} local modules = {} setmetatable(db_modules, { __index = function(t, k) local mod = modules[k] if mod ~= nil then return mod end mod = require(k.."."..k.."_db") if mod then modules[k] = mod end return mod end }) return db_modules
local gs = {} gs.w = 640 gs.h = 480 gs.columns = 3 gs.mrgT = 20 gs.mrg = 5 gs.mrg2 = gs.mrg * 2 gs.btn = {} gs.btn.w = 80 gs.btn.h = 20 local ImageDialog = {} ImageDialog.gui = {} ImageDialog.thread = nil ImageDialog.focused = nil ImageDialog.result = nil ImageDialog.accepted = nil function ImageDialog.init() Ima...
local random = require 'lqc.random' local r = require 'lqc.report' local command = require 'lqc.fsm.command' local fsm = require 'lqc.fsm' local state = require 'lqc.fsm.state' local algorithm = require 'lqc.fsm.algorithm' local lqc = require 'lqc.quickcheck' local lqc_gen = require 'lqc.lqc_gen' local frequency = lqc_...
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterServerEvent("utk_fh:startcheck") AddEventHandler("utk_fh:startcheck", function(bank) local _source = source local copcount = 0 local Players = ESX.GetPlayers() for i = 1, #Players, 1 do local xPlayer = ESX.GetPl...
local config = {} config.HTTP_SCHEMA = "HTTP" config.HTTP_VERSION = "1.1" config.HTTP_PORT = 80 -- config.HTTPS_PORT = 443 config.HTTP_AGENT = "levent/1.0" config.HTTP_ABS_PATH = "/" -- supported methods -- http methods is case-sensitive config.HTTP_METHODS = { OPTIONS = "OPTIONS", GET = "GET", HEAD...
-- only on macOS util = require('lspconfig.util') local root_path = '/Users/icy/Leet/lua-language-server' local bin_path = root_path .. '/bin/macOS/lua-language-server' require'lspconfig'.sumneko_lua.setup { cmd = { bin_path, "-E", root_path .. '/main.lua' }, settings = { Lua = { runtime = { ve...
function alert(msg) SetTextComponentFormat("STRING") AddTextComponentString(msg) DisplayHelpTextFromStringLabel(0, 0, 1, -1) end function notify(string) SetNotificationTextEntry("STRING") AddTextComponentString(string) DrawNotification(true, false) end --https://runtime.fivem.net/doc/natives/...
-- You probably shouldnt touch these. local AnimationDuration = -1 local ChosenAnimation = "" local ChosenDict = "" local IsInAnimation = false local MostRecentChosenAnimation = "" local MostRecentChosenDict = "" local MovementType = 0 local PlayerGender = "male" local PlayerHasProp = false local PlayerProps = {} local...
--[[ Information here --]] local main = require(game.Nanoblox) return { Roles = { --------------------------- ["FmELlZ2YaD"] = { _order = 1, name = "Owner", color = Color3.fromRGB(255, 0, 0), giveToCreator = true, inheritCommandsWithTags = {"level5"}, limitCommandsPerInterval = false, ...
IncludeDir = {} IncludeDir["GLFW"] = "./Deps/glfw/include/" IncludeDir["Glad"] = "./Deps/glad/include/" IncludeDir["ImGui"] = "./Deps/imgui/" IncludeDir["ImGui2"] = "./Deps/imgui/backends" IncludeDir["stb"] = "./Deps/stb/" IncludeDir["Box2D"] = "./Deps/box2d/include" IncludeDir["SpirvCross"] = "./Deps/SPIRV-Cross" Incl...
--------------------------------------------------------------- -- Copyright 2021 Deviap (https://deviap.com/) -- --------------------------------------------------------------- -- Made available under the MIT License: -- -- https://github.com/deviap/deviap-main/blob/master/LICENSE -- ...
fx_version 'bodacious' games {'gta5'} description 'NPC-Shops' version '1.0.0' client_script{ 'client/client.lua', 'gui.lua', "@npc-scripts/client/errorlog.lua" } server_script 'server/server.lua'
load(between("a","0.8<","<0.9"))
function mail.webmail_send_hook(m) mail.channel.send({ type = "new-message", data = m }) end mail.register_on_receive(mail.webmail_send_hook)
--[[ Copyright (c) 2010-2013 Matthias Richter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dis...
AddCSLuaFile( "shared.lua" ) include("shared.lua")
AddCSLuaFile() function SWEP:PlaySound(snd) if not snd then return end if istable(snd) then snd = table.Random(snd) end self:EmitSound(snd) end function SWEP:GetReserveAmmo() return self.Owner:GetAmmoCount(self:GetPrimaryAmmoType()) end function SWEP:GetAimAngle() local ply = self.Owner if ply:IsNPC()...
--[[ qff.lua version: 18.05.21 Copyright (C) 2018 Jeroen P. Broks This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any ...
local colMap = { ["Amulet"] = "Amulet2_ModsKey", ["Ring"] = "Ring_ModsKey", ["Belt"] = "Belt2_ModsKey", ["Quiver"] = "Quiver_ModsKey", ["Helmet"] = "Helmet2_ModsKey", ["Body Armour"] = "BodyArmour2_ModsKey", ["Boots"] = "Boots2_ModsKey", ["Gloves"] = "Gloves2_ModsKey", ["Shield"] = "Shield2_ModsKey", ["Bow"] ...
--test_scheduler.lua package.path = package.path..";../?.lua" local Kernel = require("schedlua.kernel") local idx = 0; local maxidx = 20; local function counter(name, nCount) for num=1, nCount do idx = num local eventName = name..tostring(idx); print(eventName, idx) signalOne(eventName); yield(); end ...
am.addCMD("a", 'Admin chat', 'Chat', function(caller, text) for k,v in pairs(player.GetAll()) do if (!v:IsAdmin() and v ~= caller) then continue end local c = caller:IsAdmin() and '[Admin Chat] ' or '[TO ADMINS] ' am.notify(v, am.red, c, team.GetColor(caller:Team()), caller:Nick(),': ', am.def, text) end end)...
local editor = script.Parent.Main.Outline local editor2 = script.Parent.Editor local lua_keywords = {"and", "break", "do", "else", "elseif", "end", "false", "for", "function", "goto", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then", "true", "until", "while"} local global_env = {"GetLibrary" ,"__tV"...
w = {} f = {} q = {} _menuPool = NativeUI.CreatePool() mainMenu = NativeUI.CreateMenu("Marijuana", "The Liberty Family Italia") _menuPool:Add(mainMenu) CurrentWeather = "NO" local fertilizzanteNBR = 0 local acquaNBR = 0 local sementeQTE = 0 local sementetipo = 0 local myJob = nil local ...
local take = package.loaded.take local function proglib(self, arg, shared) assert(type(arg.name) == 'string', 'name missing') assert(type(arg.src) == 'string' or type(arg.src) == 'table', 'src missing') local src = (type(arg.src) == 'string') and {arg.src} or arg.src local osrc = {} for _,name in i...
return require(script.Parent._Index["kampfkarren_roact-hooks@0.3.0"]["roact-hooks"])
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") util.AddNetworkString "starfall_hologram_clip" function ENT:Initialize() self.BaseClass.Initialize() self:SetSolid(SOLID_NONE) self:SetMoveType(MOVETYPE_NOCLIP) -- TODO: custom movetype hook? self:DrawShadow(false) self:SetScale(Vector...
-- The MapSpawner handles what and when to spawn enemies based on the current level. -- It must be updated in the game loop -- spawn_sequences hold all info needed to spawn enemis MapSpawner = Object:extend() local spawn_sequences = { { level = 1, { wave_num = 1, total_enemies = 1, type = ...
return { talon_basilisk = { acceleration = 0.084, brakerate = 0.336, buildcostenergy = 8951, buildcostmetal = 513, builder = false, buildpic = "talon_basilisk.dds", buildtime = 7000, canattack = true, canguard = true, canhover = true, canmove = true, canpatrol = true, canstop = ...
function io.writefile(name, data) local fd = assert(io.open(name, "w")) local r,e = assert(fd:write(data)) fd:close() return r,e end function io.readfile(name) local fd = assert(io.open(name, "r")) local r,e = assert(fd:read('*a')) fd:close() return r,e end function io.exists(name) ...
fx_version 'adamant' game 'gta5' description 'FusionPwN Customs' version '2.1.0' server_scripts { '@mysql-async/lib/MySQL.lua', '@es_extended/locale.lua', 'locales/en.lua', 'locales/fr.lua', 'locales/pl.lua', 'locales/br.lua', 'locales/de.lua', 'config.lua', 'functions.lua', 'server/main...
slot0 = class("MetaCharacterSynLayer", import("...base.BaseUI")) slot0.getUIName = function (slot0) return "MetaCharacterSynUI" end slot0.init = function (slot0) slot0:initUITextTips() slot0:initData() slot0:findUI() slot0:addListener() end slot0.didEnter = function (slot0) slot0:updateShipImg() slot0:updateP...
local module = {async = true} local function Handle(info, call) local behavior = script[info.model:GetAttribute('Behavior')] require(behavior)[call](info) end function module.Start(info) task.spawn(Handle, info, 'Start') end function module.Stop(info) task.spawn(Handle, info, 'Stop') end return mod...
---@type BuffomatAddon local TOCNAME, BOM = ... BOM.Class = BOM.Class or {} ---@class BuffomatAddon ---@field ALL_PROFILES table<string> Lists all buffomat profile names (group, solo... etc) ---@field RESURRECT_CLASS table<string> Classes who can resurrect others ---@field MANA_CLASSES table<string> Classes with mana ...
ESX = nil local PlayerData = {} local GUI = {} GUI.Time = 0 local HasAlreadyEnteredMarker = false local LastZone = nil local CurrentAction = nil local CurrentActionMsg = '' local CurrentAction...
-- -- Created by IntelliJ IDEA. -- User: Sam Elmer -- Date: 8/11/12 -- Time: 9:03 AM -- To change this template use File | Settings | File Templates. -- RESOURCES = {} --TODO: Complete Documentation --TODO: For Developers: You need to fill this file out with your custom RD replacement/whatever. if (SERVER) then ...
function receive(message) if(message.type == "init" or (message.type == "wakeup" and message.wakeup_id == "ping_trigger")) then if(message.type == "init") then print("Start ping actor") sequence_number = 0 else sequence_number = sequence_number + 1 end publish(Publication.new( ...
local class = require 'gabe.class' local they = it describe("classes", function() they("can be constructed", function() local K = class 'k' function K:method() end K.field = true assert.equal(type(K.method), 'function') assert.equal(type(K.field), 'boolean') end) they("can create objects", function() ...
C_UIWidgetManager = {} ---@param setID number ---@return UIWidgetInfo[] widgets ---[Documentation](https://wow.gamepedia.com/API_C_UIWidgetManager.GetAllWidgetsBySetID) function C_UIWidgetManager.GetAllWidgetsBySetID(setID) end ---@return number setID ---[Documentation](https://wow.gamepedia.com/API_C_UIWidgetManager...
---- -- Test cases for xlsxwriter.lua. -- -- Test the creation of a simple xlsxwriter.lua file with strings that -- require XML escaping. -- -- Copyright 2014, John McNamara, jmcnamara@cpan.org -- local Workbook = require "xlsxwriter.workbook" local workbook = Workbook:new("test_escapes01.xlsx") local worksheet = wo...
module(..., package.seeall) local barYposition = 112 local barXPosition = 10 local barWidth = 300 local healthViewXPosition local healthViewYPosition local localStorage = require 'gameLogic.localStorage' local levelSetting = require 'gameLogic.levelSetting' local statTable = levelSetting.getTable("mainCharStat") fun...
local inline_table = {'1' , '2' , '3' , '4'}
-- This is a part of uJIT's testing suite. -- Copyright (C) 2020-2022 LuaVela Authors. See Copyright Notice in COPYRIGHT -- Copyright (C) 2015-2020 IPONWEB Ltd. See Copyright Notice in COPYRIGHT local function foo(x) if x > 42000 then return x * 2 else return math.floor(x / 10) end end loc...
---Very simple thing for smooth UI animations. Call it with a number for its initial state and it would ---return you a function. Each frame, call this function with your new target value and it would give you ---a smoothly changing numerical value. Unlike functions like `math.applyLag()`, this one is a bit more ---com...
-- -- The following code is taken from parts of LOOP - Lua Object-Oriented Programming -- by Renato Maia <maia@inf.puc-rio.br> -- Mostly, the base module, the simple inheritance module and the ObjectCache. -- local pairs = pairs local unpack = unpack local rawget = rawget local rawset ...
--- Custom theme default values. local beautiful = require("beautiful") local custom_defaults = {} -- mail widget custom_defaults.mail_fg_urgent = beautiful.fg_urgent custom_defaults.mail_fg_normal = beautiful.fg_normal custom_defaults.mail_fg_focus = beautiful.fg_focus -- memory widget custom_defaults.mem_bg = bea...
local sig, size, path, ext = ngx.var.sig, ngx.var.size, ngx.var.path, ngx.var.ext local secret = "" -- signature secret key local images_dir = ngx.var.document_root .. "/images/" -- where images come from local cache_dir = ngx.var.document_root .. "/cache/" -- where images are cached local function return_not_found(m...
LinkLuaModifier("modifier_astral_trekker_entrapment", "heroes/astral_trekker/astral_trekker_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_astral_trekker_war_stomp_changer", "heroes/astral_trekker/astral_trekker_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_astral_trekker_war_...
function GAME:Config( cfg ) cfg.Title = "Example - SSAO" cfg.Width = 1280 cfg.Height = 720 return cfg end function GAME:Initialize() -- Set up renderer render.SetDepthEnabled( true ) -- Load scene self.Model = Model( "models/ssao_scene.obj" ) -- Load noise texture self.NoiseTexture = Texture( "textures...
function _init() cls() c = cameralib.new() party = 0 points = {} for i = 1,100 do add(points,{rnd(4)-2,rnd(4)-2,rnd(4)-2}) end end function _draw() cls() color(7) for i,v in pairs(points) do c:point( v ) end for i = -2,2,0.3 do party += 1 color(party) c:line( {1,i,1}, {1,i,-1...
-- mod-version:1 lite-xl 2.00 -- for zig fmt formatter local config = require "core.config" local formatter = require "plugins.formatter" config.zigfmt_args = {} -- zig fmt doesn't need any args when formatting single file formatter.add_formatter { name = "zig fmt", file_patterns = {"%.zig$"}, command = ...
---------------------------------------------------------------------- -- Create CNN and loss to optimize. -- -- Clement Farabet ---------------------------------------------------------------------- require 'torch' -- torch require 'image' -- to visualize the dataset require 'nn' -- provides all sorts of tra...
function levelSystem(level_num, difficulty, Type) --the Type argument is capitalized due to type being a keyword in Lua --function to generate multi-floored levels --each level has its own item and enemies local Map = {} local CollisionMap = {} local enemies = {} local items = {} local...
class("AboutScreen").extends(Screen) function AboutScreen:init() AboutScreen.super.init(self) self.about = About() end function AboutScreen:enter(context) self.about:enter(context) end function AboutScreen:leave() self.about:leave() end function AboutScreen:sidebarClosed() self.about:sidebarClosed() end func...
{data={name="", author="Magnus siiftun1857 Frankline"}, blocks={ {1881000, {3.5, 0}}, {1881003, {-6.5, 0}, 1.571, bindingId=0}, {1881001, {3.5, 10}, -3.142}, {1881001, {3.5, -10}, 3.142}, {1881002, {3.5, -20}, -3.142}, {1881002, {3.5, 20}, 3.142}, {1881002, {-6.5, -10}, -3.142}, {188100...
require("settings_butt") CustomNetTables:SetTableValue("butt_settings", "default", BUTTINGS) local l0 = CustomGameEventManager:RegisterListener("butt_setting_changed", function(_,kv) BUTTINGS[kv.setting] = kv.value print(kv.setting,":",kv.value) end) local l1 =ListenToGameEvent("game_rules_state_change", ...