content
stringlengths
5
1.05M
local Dispatcher = {} Dispatcher.__index = Dispatcher setmetatable(Dispatcher, Dispatcher) --------------------------------------------------------------------------------------------------- function Dispatcher.__call() local dispatcher = {tasks = {task}, newTasks = {}, isRunning = false} return se...
return {'yip'}
local CloneUtils = Ballance2.Utils.CloneUtils local GameLuaObjectHost = Ballance2.Services.LuaService.LuaWapper.GameLuaObjectHost local LevelBuilderGameObject = nil function LevelBuilderInit() LevelBuilderGameObject = CloneUtils.CloneNewObject(Game.CorePackage:GetPrefabAsset('LevelBuilder.prefab'), 'GameLevelBuilde...
local tArgs = {...} local bridge if type(tArgs[1]) == "string" and peripheral.getType(tArgs[1]) == "openperipheral_bridge" then bridge = peripheral.wrap(tArgs[1]) bridge.clear() else error("could not find bridge on side: "..tostring(tArgs[1])) end do -- API installing / loading local program = fs.getDir(shell.getR...
require("enumerations") require("patterns") require("utils") contentFixer = require("contentFixer") tableHelper = require("tableHelper") inventoryHelper = require("inventoryHelper") packetBuilder = require("packetBuilder") local BaseCell = class("BaseCell") function BaseCell:__init(cellDescription) self.data = ...
f = loadfile( "C:\\Github\\Ggg.Github\\Ggg.Lua\\apps\\app-docs\\lua.org\\pil\\Part1TheLanguage\\Chap8CompilationExecutionAndErrors\\intro5\\foo.lua" ) f() -- defines `foo' foo("ok") --> ok
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- modifier_huskar_bu...
return { enabled = function(name) local value = os.getenv(name) if value and value ~= '0' then return value else return false end end }
addresses = { --== this must be a link between the quest-text and the id ==-- questGroup_offset = 0x4F0, --===========================================================-- --== fixed the casting bar but i'm not sure, that the "player.casting" is completely fixed ==-- castingBarPtr = 0xA6BBC8, castingBar_offs...
-- Copyright 2016 Google Inc, NYU. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
local shopTabPanel,items_gui; itemsTab = nil; local perks = {}; player_perks = {}; -------------------- --- Loading GUI ---- -------------------- function onShopInit ( tabPanel ) shopTabPanel = tabPanel if shopTabPanel and not itemsTab then itemsTab = guiCreateTab ( 'GC Perks', shopTabPanel ) if itemsTab then ...
--[[ Limit the maximum code value Copyright 2016 Xiang Zhang Usage: th limit_code.lua [input] [output] [limit] --]] local torch = require('torch') -- A Logic Named Joe local joe = {} function joe.main() local input = arg[1] or '../data/dianping/train_word.t7b' local output = arg[2] or '../data/dianping/train_...
local armor_mod = minetest.get_modpath("3d_armor") -- Replace min/max table with random value from min to max local function get_val(val) if type(val) == "table" then val = math.random(val.min or 1, val.max or 5) end return val end function fire_plus.burn_player(player, burns, damage, not_initial) if not playe...
local M = {} M.glslView = function() local bufnr = vim.api.nvim_get_current_buf() local full_file_path = vim.api.nvim_buf_get_name(0) local handle -- pre-declared to avoid diagnostic error. handle = vim.loop.spawn( 'glslViewer', { args = { full_file_path, '-l' } }, function() handle:close() ...
--------------------------------------------------------------------------------------------------- -- --filename: game.ui.CreateMainContent --date:2019/11/22 23:24:39 --author: --desc: -- --------------------------------------------------------------------------------------------------- local strClassName = 'game.ui....
if SERVER then AddCSLuaFile( "voicechannels/sh_voicechannels.lua" ) end include( "voicechannels/sh_voicechannels.lua" )
function repeat_key(key, length) if #key >= length then return key:sub(1, length) end times = math.floor(length / #key) remain = length % #key result = '' for i = 1, times do result = result .. key end if remain > 0 then result = result .. key:sub(1, remain) ...
local moonbreaker = require "moonbreaker" local mocks = require "spec.mocks" describe("moonbreaker", function() local limit, timeout = 5, 30 local clock, breaker before_each(function() clock = mocks.Clock() breaker = moonbreaker { limit = limit, timeout = timeout, ...
local ostime = os.time local mathrand = math.random -------时间相关-------- function GetSecond() return ostime() end function GetDate() return os.date("%Y/%m/%d %H:%M:%S", ostime()) end function RandomList(lst) if #lst == 0 then return nil end return lst[mathrand(1,#lst)] end local M = {} ...
object_ship_nova_orion_smuggler_medium_tier8 = object_ship_shared_nova_orion_smuggler_medium_tier8:new { } ObjectTemplates:addTemplate(object_ship_nova_orion_smuggler_medium_tier8, "object/ship/nova_orion_smuggler_medium_tier8.iff")
MoveChildrenSystem = function(schedule) local MoveChildren = function(w, singletons, e, idx, cmpts) local type0 = CmptAccessType.new( "Ubpa::Utopia::Translation", AccessMode.WRITE ) local type1 = CmptAccessType.new( "Ubpa::Utopia::WorldTime", AccessMode.LATEST_SINGLETON ) local cmptPtr ...
function merge(tbls) local res = {} for i,v in ipairs(tbls) do for i2,v2 in ipairs(v) do table.insert(res,v2) end end return res end function allExcept(tbls, except) local tomerge = {} for i,v in pairs(tbls) do if i~=except then table.insert(tomerge, v) end end return merge(tomerge) end airfi...
-- copy all globals into locals, some locals are prefixed with a G to reduce name clashes local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,Gload,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,un...
-- Generated by CSharp.lua Compiler local System = System System.namespace("Slipe.Client.Browsers.Events", function (namespace) namespace.class("OnResourceBlockedEventArgs", function (namespace) local __ctor__ __ctor__ = function (this, url, domain, reason) this.Url = System.cast(System.String, url) ...
return { ADD = "SHAPE_ADD", SETUP = "SHAPE_SETUP", UPDATE = "SHAPE_UPDATE", UPDATE_POSITION = "SHAPE_UPDATE_POSITION", UPDATE_SPEED = "SHAPE_UPDATE_SPEED" }
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. module(..., package.seeall) local engine = require("core.app") local config = require("core.config") local timer = require("core.timer") local pci = require("lib.hardware.pci") local ethernet = require("lib.protocol.ethern...
local playsession = { {"joe32", {1807443}}, {"0icke0", {1877842}}, {"huyj2k", {803495}}, {"cogito123", {885292}}, {"WiredMesh", {4300043}}, {"COOL-ITEM", {518871}}, {"Gundex", {462253}}, {"HardcoreRocco", {107704}}, {"Silverline", {17953}}, {"perfectwill", {2753413}}, {"craigrood", {107149}}, {"Giatros", {1...
-- Force Stepmania to move the background to the middle as needed function Actor:scale_or_crop_background() if SL.Global.BackgroundZoom == 1 and SL.Global.BackgroundYOffset == 0 then self:scale_or_crop_background_no_move() self:xy(SCREEN_CENTER_X, SCREEN_CENTER_Y) else local xscale= 240 / self:GetWidth() loca...
-- Following currently not used anymore, but keep in case people change their mind again: --[=[ model.disp={} function model.disp.createDisplay() if model.camera>=0 then if model.imgToDisplay>0 then if not model.disp.ui then -- We need the resolution of the real camera: ...
-- Copyright (c) 2019 StefanT <stt1@gmx.at> -- See LICENSE.md in the project directory for license information. -- -- Update the provider stops tab. -- -- @param parent The LuaGuiElement of the tab's parent element -- @param player The player -- function update_dialog_tab_provider(parent, player) parent.clear() ...
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. module(..., package.seeall) local lib = require("core.lib") local schema = require("lib.yang.schema") local data = require("lib.yang.data") local binary = require("lib.yang.binary") local stream = require("lib.yang.stream") local util = req...
local PATH = (...):gsub('%.[^%.]+$', '') local Camera = { activeCamera = nil, } Camera.__index = Camera local defaultShader = love.graphics.newShader(PATH.."/shader.glsl") --- Generates a new Camera. -- @param w, h The dimension of the Camera. Defaults to window size -- @returns A new Camera object. function Came...
insulate("documentation on Production", function() require "init" require "spec.mocks" require "spec.asserts" require "spec.universe" it("new", function() -- tag::basic[] local products = { power = Product:new("Energy Cell"), o2 = Product:new("Oxygen"), ...
while true do screen:clear() pad = Controls.read() if pad:cross() then txtmsg = System.startOSK("Enter Name","Enter Name") System.message(txtmsg,0) end file = io.open("name.txt" , "w") file:write(txtmsg) file:close() dofile("pimpin_list.lua") screen.waitVblankStart() screen.flip() end ...
local K = require("game.constants") local function processBurn(board, x, y) local burn = board.get(x, y) burn.destroy = K.BURN_DESTROY_TIME local function destroy(matcher) local c = 1 for u, v, b in board.allCoordinates() do if b and not b.destroy and not b.selected and matcher(b) then b....
/*--------------------------------------------------------------------------- Create the tables used for banning ---------------------------------------------------------------------------*/ hook.Add("DatabaseInitialized", "FAdmin_CreateMySQLTables", function() MySQLite.query("CREATE TABLE IF NOT EXISTS FAdminBans(...
local globalTimer = 0 function AsyncLoad() return true; end function AsyncFinalize() return true; end function Init() end function Update(delta, total) globalTimer = globalTimer + delta; end function Draw() g2d.SetColor(255,0,0,255); g2d.FillRect(10,10,255,255); end
function main() hello() a = read("first") b = read("second") soma = a+b print("Total: " .. soma ) end main()
local TableUtil = require("sebaestschjin-tts.TableUtil") local XmlUiFactory = require("sebaestschjin-tts.xmlui.XmlUiFactory") local XmlUiElement = require("sebaestschjin-tts.xmlui.XmlUiElement") ---@class seb_XmlUi_Image : seb_XmlUi_Element ---@class seb_XmlUi_Image_Static ---@overload fun(element: tts__UIImageElemen...
--[[ SD 模块接线说明 TF模块 -- Air640W CS -- PB9(对应为gpio29) SCK -- SPI_SCK, PB16, gpio21 MISO -- SPI_MISO, PB17, gpio22 MOSI -- SPI_MOSI, PB18, gpio23 淘宝链接: https://item.taobao.com/item.htm?id=609983719613 小卡版本 ]] local sys = require "sys" log.info("main", "sdcard demo") sys.ti...
local ffi = require("ffi") local O = require(LIBPATH.."object") local M = {} --local Matrix = {} --Matrix.__index = Matrix local Matrix = O.class() function M.mat3() return Matrix(3,3) end function M.mat4() return Matrix(4,4) end function M.identity(dim1, dim2) assert(dim1, "Matrix.identity: no dimension given") ...
--[[ ########################################################## S V U I By: Failcoder ########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- --[[ GLOBALS ]]-- local _G = _G; local unpack = _G.unpack; local select = _G.s...
-- Interface powered, user friendly, unit editor --[====[ gui/gm-unit =========== An editor for various unit attributes. ]====] local gui = require 'gui' local dialog = require 'gui.dialogs' local widgets = require 'gui.widgets' local guiScript = require 'gui.script' local utils = require 'utils' local args = {...} ...
AddCSLuaFile() ENT.Base = "bw_base_electronics" ENT.Type = "anim" ENT.PrintName = "Drug Lab" ENT.Model = "models/props_lab/crematorcase.mdl" ENT.PowerRequired = 10 ENT.PowerCapacity = 5000 ENT.Drain = 15 ENT.Status = "Press e to start cooking!" if SERVER then util.AddNetworkString( "BaseWars.DrugLab.Menu" ...
local m = {} function m.compute(dna1, dna2) if string.len(dna1) ~= string.len(dna2) then return -1 end local diff = 0 local i = 1 for c in dna1:gmatch(".") do if c ~= dna2:sub(i, i) then diff = diff + 1 end i = i + 1 end return diff end return m
---- -- @file ButtonHUDBuilder ---- Brief description. -- <#Description#> -- @return <#return value description#> function ButtonHUDBuilder:calculateSerializeBufferSize() end ---- Brief description. -- @author James Folk, 16-02-11 15:02:06 -- <#Description#> -- @param dataBuffer <#dataBuffer description#> -- @param...
require('quest') local function cadlind_locket_quest_start_fn() -- Intentionally does nothing. Cadlind's quest isn't really a -- traditional quest with an intro speech - she just reacts -- to being given back the locket she gave to Cornel. end local function cadlind_locket_quest_precond_fn() return player_ha...
-- ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ -- ||p |||l |||u |||g |||i |||n || ||s |||e |||t |||t |||i |||n |||g |||s || -- ||__|||__|||__|||__|||__|||__|| ||__|||__|||__|||__|||__|||__|||__|||__|| -- |/__\|/__\|/__\|/__\|/__\|/__\| |/__\|/__\|/__\|/__\|/__\|/__\|/__\|/__\| -- === autop...
----------------------------------- -- Area: Windurst Woods -- NPC: Manyny -- Standard Merchant NPC -- Confirmed shop stock, August 2013 ----------------------------------- local ID = require("scripts/zones/Windurst_Woods/IDs") require("scripts/globals/shop") ----------------------------------- function onTrade(playe...
local _oldClientsideModel = ClientsideModel ClientsideModel = function(model, render) -- print(model) local CSEnt = _oldClientsideModel(model, render) hook.Run('OnCSEntCreated', model, CSEnt) return CSEnt end
local core = require "sys.core" local localEnvConfig = require "localenvconfig" local processconfig = require "processconfig" local configMgr = {} local client = require "http.client" local useDefault = (tonumber(core.envget("usedefault")) == 1) local queryConfigUrl = core.envget("queryconfigurl") local sho...
#!/usr/local/bin/lua -i math.randomseed(os.time()) function shuffle(deck) for i = #deck, 2, -1 do local card = math.random(i) deck[i], deck[card] = deck[card], deck[i] end return deck end function test() print(table.unpack(shuffle({1,2,3,4,5}))) end
local main = require("telescope._extensions.repo.main") local health = require("telescope._extensions.repo.health") return require("telescope").register_extension({ health = health.check, exports = { list = main.list, cached_list = main.cached_list, -- Default command, for now, may chan...
--[[ Instructions: Follow the instructions explained in the section 'Setting up the Gate' Create a Server Script in ServerScriptService and include the following code --]] local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local events = ReplicatedSto...
-- Main injection point -- @script ServerMain -- @author Quenty local ReplicatedStorage = game:GetService("ReplicatedStorage") local ServerScriptService = game:GetService("ServerScriptService") local LoaderUtils = require(ServerScriptService:FindFirstChild("LoaderUtils", true)) local clientFolder, serverFolder, shar...
PNC = {} PNC.Core = {} PNC.Core.Arrests = {} PNC.Core.Reports = {} PNC.Core.Tickets = {} PNC.Core.StolenVehicles = {} PNC.Core.PrisonerTransportRequests = {} PNC.Config = {} print("Loading XYZ PNC") local path = "xyz_pnc/" if SERVER then local files, folders = file.Find(path .. "*", "LUA") for _, folder in Sorted...
--this was made by TetaBonita, not me... function EFFECT:Init(data) self.WeaponEnt = data:GetEntity() self.Attachment = data:GetAttachment() if not (self.WeaponEnt:IsValid() and self.WeaponEnt:IsWeapon()) then return end self.Normal = data:GetNormal() if self.WeaponEnt:IsCarriedByLocalPlayer() and GetViewEn...
local data = nil local dead = false local sx, sy = guiGetScreenSize ( ) local hospitals = { } addEvent ( 'NGHospitals:onClientWasted', true ) addEventHandler ( 'NGHospitals:onClientWasted', root, function ( d ) dead = true data = d l_tick = getTickCount ( ) ind = 0 rec_y = sy moveMode = true drawRec = false a...
--[[ demo说明: 1. 演示wifi联网操作 2. 演示长连接操作 3. 演示简易的网络状态灯 ]] -- LuaTools需要PROJECT和VERSION这两个信息 PROJECT = "modbus2relay" VERSION = "1.0.0" -- 引入必要的库文件(lua编写), 内部库不需要require local sys = require "sys" log.info("main", "simple modbus relay demo") -- /////////////////////////////////////////////////////////////////////////////...
--------------------------------------------------------------------------- -- $Id: setting_server.lua 67543 2012-05-08 04:07:22Z gzyangguangdong@NETEASE.COM $ -- 配置哪些策划文档需要转换 --------------------------------------------------------------------------- --[-[ return { -- 转换程序代码, 原始数据文件, 输出数据文件, 保留, 转换过滤表 --------------...
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRI...
local startAt = 1 local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Stats = ReplicatedStorage:WaitForChild("RenderStats") local AssignLine = ReplicatedStorage:WaitForChild("AssignLine") local SendDataE = ReplicatedStorage:WaitForChild("SendData") local Pa...
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
--- --- File: publishSubscribe.lua --- Lua Publish Subscribe.lua --- --- --- publishSubscribe = {} publishSubscribe.queue = {} function publishSubscribe.initializePublishSubscribe() -- null function right now end function publishSubscribe.flush( event ) publishSubscribe.queue[event] = {} end function publi...
local Structure = require "roomgen.Structure" local RoomUtils = require "roomgen.RoomUtils" local StPredef = Class.create("StPredef", Structure) function StPredef:init( room , evalArea,number) Structure.init(self,room,evalArea, number) self.evalArea = evalArea self.structType = "StPredef" self.timeStamp = os.time...
require('lspkind').init({ -- enables text annotations -- -- default: true with_text = true, maxwidth = 50, -- default symbol map -- can be either 'default' (requires nerd-fonts font) or -- 'codicons' for codicon preset (requires vscode-codicons font) -- -- default: 'default'/ 'c...
-- Snipers Dream Team Mod [Portals File] (v1.0) -- Copyright (c) 2022, Jericho Crosby <jericho.crosby227@gmail.com> local SDTM = {} -- Called when a new game has started: -- Loops through portals table: SDTM[map][portals] -- Sets self.portals to the portal table. function SDTM:LoadPortals() local map = self.map ...
local app = app local Class = require "Base.Class" local Object = require "Base.Object" local Utils = require "Utils" local Slices = require "Sample.Slices" local Card = require "Card" local Path = require "Path" local FS = require "Card.FileSystem" local NotSet = 0 local Enqueued = 1 local Working = 2 loc...
-- 'folke/whick-key-nvim' return function(c) return { {'WhichKey', c.bright_cyan}, {'WhichKeyGroup', c.blue}, {'WhichKeySeparator', c.grayish}, {'WhichKeyDesc', c.dark_white}, {'WhichKeyFloat', c.none, c.black}, {'WhichKeyValue', c.dark_white}, } end
local anim8 = require 'vendor/anim8' local gamestate = require 'vendor/gamestate' local tween = require 'vendor/tween' local sound = require 'vendor/TEsound' local middle = require 'hawk/middleclass' local camera = require 'camera' local dialog = require 'dialog' local Scene = {} Scene.__index = Scene local function...
-- Copyright (c) 2017, The OctNet authors -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this list of ...
local PausedState = { menu = nil } PausedState.__index = PausedState setmetatable(PausedState, { __index = gg.GameState }) function PausedState.new() local new = setmetatable({}, PausedState) new:init() return new end function PausedState:init() gg.GameState.init(self, sn.State.Paused) lo...
lesser_resilience = class({}) function lesser_resilience:OnCreated( data ) -- ### VALUES START ### -- self.resilience = 20 -- ### VALUES END ### -- if not IsServer() then return end self:SetStackCount(self.resilience) end function lesser_resilience:GetAttributes() return MODIFIER_ATTRIBUTE_...
object_mobile_storyteller_super_battle_droid_boss = object_mobile_shared_storyteller_super_battle_droid_boss:new { } ObjectTemplates:addTemplate(object_mobile_storyteller_super_battle_droid_boss, "object/mobile/storyteller_super_battle_droid_boss.iff")
local wibox = require("wibox") local module = {} local function new(textbox,font_name,shape_form) local button = wibox.widget { { { text = " "..textbox.." ", font = font_name, widget = wibox.widget.textbox }, ...
local HYutil = require("HYutil.HY") local Path = require("HYutil.Path") --------------------------------------------- -- SHAPE ------------------------------------ --------------------------------------------- --v1.0 local Shape = { tag={createShape=false, toTable=false, closed=false, pathNew=false, lengthAll...
--- table utility -- @module tabutil -- @alias tab local tab = {} --- print the contents of a table -- @tparam table t table to print tab.print = function(t) for k,v in pairs(t) do print(k .. '\t' .. tostring(v)) end end --- return a lexigraphically sorted array of keys for a table -- @tparam table t table to sort...
local composer = require( "composer" ) local loadsave = require( "loadsave" ) local roleslib = require( "scenes.library.roles" ) local scene = composer.newScene() local uiGroup = display.newGroup() local settings = loadsave.loadTable( "settings.json" ) local ui = { background, frontbox, title, roles = {}, playe...
data.raw["fluid"]["lubricant"].order = "e[lubricant]-a[lubricant]"
airplane = airplane or WidgetLib.newSimple() do controls = { pitchup = false, pitchdown = false, bankleft = false, bankright = false, yawleft = false, yawright = false, thrust = 0 } end if platform() == "windows" then stdkeyids["w"] = 87 stdkeyids["a"] = 65 stdkeyids["s"] = 83 stdkeyids["d"] = ...
--[[ © 2013 GmodLive private project do not share without permission of its author (Andrew Mensky vk.com/men232). --]] local greenCode = greenCode; local math = math; local CMENU_PLUGIN = greenCode.plugin:Get("rp_custommenu"); local cBGColor = Color(0,0,0); local cNormalColor = Color(81,222,81); local cBad...
gmidentity = false; function createLabel(name, isgm) identityname = name; gmidentity = isgm; namewidget = addTextWidget("chatfont", name); namewidget.setPosition("center", 0, 0); namewidget.setMaxWidth(60); if gmidentity then namewidget.setFont("chatitalicfont"); else resetMenuItems(); re...
--- **GeminiHook-1.0** offers safe Hooking/Unhooking of functions, methods and frame scripts. -- Using GeminiHook-1.0 is recommended when you need to unhook your hooks again, so the hook chain isn't broken -- when you manually restore the original function. -- -- **GeminiHook-1.0** can be embeded into your addon, eithe...
addEvent("onClientGUIColorPickerAccepted", false) local gs = { bg = {0, 0, 0, 255}, alpha = 0.8, mrg = 10, mrg2 = 5, btn = {w = 80, h = 20}, edit = {w = 50}, lbl = {w = guiFontGetTextExtent("H:")}, bar = {w = 128} } local ColorPicker = {} ColorPicker.elements = {} ColorPicker.thread = nil ColorPicker.accept...
for line in io.lines(arg[1]) do local a, r = {}, {} for i in line:gmatch("[^ ;]+") do a[#a+1] = i end local h = math.ceil(#a/2) for i = 1, h-1 do r[tonumber(a[h+i])] = a[i] end for i = 1, h do if not r[i] then r[i] = a[h] break end end print(table.concat(r, " ")) end
slot0 = class("FireworkFactoryView", import("..BaseMiniGameView")) slot1 = Mathf slot0.getUIName = function (slot0) return "FireworkFactoryUI" end slot0.MINIGAME_ID = 4 slot2 = 50 slot3 = { { color = "FFD26FFF", name = "na" }, { color = "DE89ECFF", name = "k" }, { color = "8F77DFFF", name = "rb" },...
local Config = require('opus.config') local Event = require('opus.event') local itemDB = require('core.itemDB') local Socket = require('opus.socket') local Terminal = require('opus.terminal') local UI = require('opus.ui') local Util = require('opus.util') local colors = _G.colors local fs ...
--[[Main audio object]]-- -- Makes itself an object -- local audio = {} -- Initializer function -- function audio.initialize(loaderObj) loader = loaderObj audio.volume = 100 audio.isMute = false end -- Starts BGM -- function audio.startBGM(name) audio.bgm = love.audio.newSource(name, "stream") audio.bgm:se...
nssm:register_mob("nssm:larva", "Mantis Larva", { type = "monster", hp_max = 12, hp_min = 8, collisionbox = {-0.3, 0, -0.3, 0.3, 0.41, 0.3}, visual = "mesh", mesh = "larva.x", textures = {{"larva.png"}}, visual_size = {x=3, y=3}, makes_footstep_sound = false, view_range = 10, ...
StatTool = { desription = "Show file statistics", inventory_image = "core_stat.png", wield_image = "core_stat.png", tool_capabilities = {punch_attack_uses = 0, damage_groups = {stat = 1}} } function StatTool.parse_mode_bits(mode) local res = {} local perms = { ["DIR"] = 0x80, ["...
require('spec/setup/busted')() local Core = require('__stdlib__/stdlib/core') --luacheck: ignore describe('Core', function() end )
if itemFunctions == nil then print ( '[ItemFunctions] creating itemFunctions' ) itemFunctions = {} -- Creates an array to let us beable to index itemFunctions when creating new functions itemFunctions.__index = itemFunctions end function itemFunctions:new() -- Creates the new class print ( '[ItemFunctions] itemFun...
-- tl_ops_limit -- en : leak bucket -- zn : 漏桶流控 -- @author iamtsm -- @email 1905333456@qq.com local cjson = require("cjson"); local tlog = require("utils.tl_ops_utils_log"):new("tl_ops_limit_leak_bucket"); local tl_ops_utils_func = require("utils.tl_ops_utils_func"); local ok, new_tab = pcall(require, "table.new") ...
-- Rank System [Top List Command File] (v1.0) -- Copyright (c) 2022, Jericho Crosby <jericho.crosby227@gmail.com> local Command = { command_name = 'toplist', admin_level = -1, players_to_show = 10, help = 'Syntax: /toplist', description = 'View list of top 10 players', no_perm = 'You need to be...
local log = require("vimrc.log") local Path = require("plenary.path") local gitutil = require("vimrc.project.gitutil") local M = {} function M.is_sub_folder(child, parent) -- Quickly exit if its not possible if not child:sub(1, #parent) == child then return false end parent = Path:new(parent):absolute() ...
--- WARNING: This file is always implicitly loaded by C++. --- Don't change anything here unless you know what you're doing! Elona.game.Debug.inspect = require_relative("inspect").inspect Elona.game.HCL = require_relative("hclua") Elona.game.Iter = require_relative("iter") Elona.game.ReadOnly = require_relative("reado...
Objects = { createObject (16357,1737.6000000,-833.9000200,61.5000000,0.0000000,331.7490000,0.0000000), createObject (8411,1821.1000000,-855.4000200,34.8000000,0.0000000,0.0000000,270.5000000), createObject (5837,1813.1000000,-850.2000100,101.5000000,0.0000000,0.0000000,270.2470000), createObject (3749,1810.2002000,-833...
----------------------------------- -- Area: Windurst Woods -- NPC: Spare Two -- Working 100% -- Involved in quest: A Greeting Cardian ----------------------------------- require("scripts/globals/quests") ----------------------------------- function onTrade(player,npc,trade) end function onTrigger(player,npc) l...
-- Returns the details of the Heronian Triangle with sides a, b, c or nil if it isn't one local function tryHt( a, b, c ) local result local s = ( a + b + c ) / 2; local areaSquared = s * ( s - a ) * ( s - b ) * ( s - c ); if areaSquared > 0 then -- a, b, c does form a triangle local are...
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local wa = require "luci.tools.webadmin" local sys = require "luci.sys" local fs = require "nixio.fs" local nx = require "nixio" local has_pptp = fs.acces...