content
stringlengths
5
1.05M
-- This is generated code, DO NOT UPDATE! -- If you have a fix, head over to https://github.com/Kong/priority-updater and -- send a PR on the original template files -- capture original plugin name, and new priority from filename local plugin_name, priority = ({...})[1]:match("^kong%.plugins%.([^%.]-)_(%d+)%.schema$")...
local THNN = require "nn.THNN" local TemporalRowConvolution, parent = torch.class("nn.TemporalRowConvolution", "nn.Module") function TemporalRowConvolution:__init(inputFrameSize, kW, dW, featFirst) parent.__init(self) self.inputFrameSize = inputFrameSize self.kW = kW self.dW = dW or 1 self.weight = torch....
-- Add some simple nodes local function register_default(name) minetest.register_node(":default:"..name, { description = name.." description", tiles = name.."_texture.png", buildable_to = false, walkable = true, }) end register_default("furnace") register_default("stone") register_default("stonebrick") reg...
att.PrintName = "KerMag" att.Icon = Material("entities/acwatt_kerkmo.png") att.Description = "Powerful ammunition made by KerkOTech. Heavy power rounds are effective at close range, but uneffective when shot from a distance." att.Desc_Pros = { } att.Desc_Cons = { } att.AutoStats = true att.Slot = "ammo_shotgun"...
data:extend( { { type = "fluid", name = "nitrogen", default_temperature = 25, heat_capacity = "1KJ", base_color = {r=0.0, g=0.0, b=1.0}, flow_color = {r=0.5, g=0.5, b=0.5}, max_temperature = 100, icon = "__Engineersvsenvironmentalist__/graphics/icons/chemicals/nitrogen.png", -- pres...
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild -- -- This file is compatible with Lua 5.3 local class = require("class") require("kaitaistruct") SwitchIntegers = class.class(KaitaiStruct) function SwitchIntegers:_init(io, parent, root) KaitaiStruct._init(self, i...
-- ITS - In The Shadows -- Copyright (C) 2015, 2016, 2017 James Niemira -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later ve...
-- ----------------------------------------------------------------------------- -- Table -- ----------------------------------------------------------------------------- local Table = { ruleName = 'Table' } -- ----------------------------------------------------------------------------- -- Parse -- -----------------...
local blips = { -- Example {title="", colour=, id=, x=, y=, z=}, -- Discord {title="Race Track", colour=1, id=147, x=915.6083, y=-2918.35669, z=4.88864136}, } Citizen.CreateThread(function() for _, info in pairs(blips) do info.blip = AddBlipForCoord(info.x, info.y, info.z) SetBlipSprite(...
--[[ Create unifont database from png file Copyright 2015 Xiang Zhang Usage: qlua createunifont.lua [input] [output] --]] local image = require('image') local io = require('io') local math = require("math") local torch = require("torch") -- A Logic Named Joe local joe = {} function joe.main() local input = arg[1...
#!/usr/bin/lua --[[ This is a custom build script to compile haste using nvcc, the CUDA compiler. It uses some Lua logic to generate a Makefile and executes it automatically. It can be run as follows: ./build.lua - build haste in default mode (debug at the moment) ./build.lua debug ...
ind = math.random(2) number1 = 101 + math.random(9999) number2 = 101 + math.random(number1 - 99) deg1 = math.random(2) deg2 = math.random(2) if (deg1 ~= deg2) then deg = 2 if(deg1 < deg2) then number1 = number1 * 10 else number2 = number2 * 10 end else deg = deg1 end if (ind == 2) ...
--[[ Buy Confirmation - Server by: standardcombo v1.0 --]] function OnCompleteBuy(player, itemId) local itemDefinition = _G.Consumables.GetDefinition(itemId) if itemDefinition and itemDefinition.cost <= player:GetResource("Coins") then local item = World.SpawnAsset(itemDefinition.equipment, {networkContext =...
local _, sm = ... sm.shapes = {} local mod = sm.shapes local L = sm.L local db local keys = {} local function interpolate(points, angle) for i = 1, #keys do tremove(keys) end for k, v in pairs(points) do tinsert(keys, k) end table.sort(keys) local pre, post = 0, 360 for _, key in ipairs(keys) do if key <= ...
--[[ ScriptItem.lua @Author : DengSir (tdaddon@163.com) @Link : https://dengsir.github.io ]] local ns = select(2, ...) local Addon = ns.Addon local GUI = LibStub('tdGUI-1.0') local ScriptItem = Addon:NewClass('ScriptItem', GUI:GetClass('ViewItem')) function ScriptItem:Constructor() local Bg = self:Creat...
local function taskCompare(a, b) return a.time > b.time end local TaskScheduler = {} TaskScheduler.prototype = {} TaskScheduler.__index = TaskScheduler.prototype function TaskScheduler.new() local self = {} self.currentTime = 0 self._tasks = {} setmetatable(self, TaskScheduler) return self end function Task...
include('shared.lua') include("wac/keyboard.lua") function ENT:Think() if not self.valid then return end if not self:GetNWBool("locked") then local mouseFlight = self:GetNWBool("active") if self.sounds.Start then if mouseFlight != self.IsOn then if mouseFlight then self.sounds.Start:Play(...
-- Badges & Bandits: Character Creator Script (SERVER)
---------------------------------------------------------------------------------------------------- -- -- Copyright (c) Contributors to the Open 3D Engine Project. -- For complete copyright and license terms please see the LICENSE at the root of this distribution. -- -- SPDX-License-Identifier: Apache-2.0 OR MIT -- --...
local Objects = script.Parent local Class = require(Objects:WaitForChild("Class")) local Object = { } function Object.new(ClassName, Properties, Methods, OnCall) if not Properties then Properties = { } end if not Methods then Methods = { } end local CreatedObject = { Properties = Properties; Meth...
--Child Folders includeFile("custom_content/tangible/loot/beast/serverobjects.lua") includeFile("custom_content/tangible/loot/creature_loot/serverobjects.lua") includeFile("custom_content/tangible/loot/generic/serverobjects.lua") includeFile("custom_content/tangible/loot/generic_deed/serverobjects.lua") includeFile("cu...
local Player = class_new("Player") local PlayerShape = require "src/playerShape" Player.baseSpeed = 2.5--3 Player.speed = 2.5 Player.size={ big = 70, small = 25 } function Player.new(data,parent) local self = Player.newObject() -- SET PROPERTIES self.color = data.color self.input = data.input self.angle ...
--[[ Designed and written in it's entirety by Kironte (roblox.com/users/49703460/profile). Made for the Roblox Neural Network Library. For documentation and the open source license, refer to: github.com/Kironte/Roblox-Neural-Network-Library Last updated 11/13/2020 ]] local Package = script:FindFirstAncestorOfClass("F...
--This was programmed by vissequ#1301 (Discord). You may use this any way you wish, but please do not remove this credit. local oCFrame = script.Parent.PrimaryPart.CFrame local prim = script.Parent.PrimaryPart local bav = Instance.new("BodyAngularVelocity", script.Parent.PrimaryPart) bav.MaxTorque = Vector3.new(math....
bgml.fsutils = {} function bgml.fsutils.exists(path) local f = io.open(path) if f then f:close() return true end return false end function bgml.fsutils.split_path(path) local ret = {} local last = nil for segment in path:gmatch("[^"..DIR_DELIM.."]+") do table.insert...
local Basic_Cmds = { color_code = 0x000000, --0x000000 is the default hex color code, it will be given a value later - its value is in "Settings.lua" success_emoji = "✅", error_emoji = "❌", } -- May error if you try to add more valid prefixes. local Valid_Prefixes = {">", "<", "+", "-", ";", ":", "....
vim.g.mapleader = "," vim.g.maplocalleader = "_" vim.g.hlsearch = true vim.opt.autowrite = true -- enable auto write vim.opt.clipboard = "unnamedplus" -- sync with system clipboard vim.opt.conceallevel = 2 -- Hide * markup for bold and italic vim.opt.confirm = true -- confirm to save changes before exiting modified bu...
local Player = game.Players.LocalPlayer -- populates player scripts in case the stuff expected to be there is not there if Player.PlayerScripts:FindFirstChild("assetsLoaded") == nil then --Player.PlayerScripts:ClearAllChildren() for e,Script in pairs(game.StarterPlayer.StarterPlayerScripts:GetChildren()) do if Pl...
------------------------------------------------------------------------ --[[ RepeaterCriterion ]]-- -- Applies a criterion to each of the inputs in a Table using the -- same target (the target is repeated). -- Useful for nn.Repeater and nn.Sequencer. --------------------------------------------------------------------...
AddCSLuaFile() ENT.Base = "bw_entityarmor" ENT.Type = "anim" ENT.PrintName = "Armor Upgrade Kit v2" ENT.Model = "models/props_junk/cardboard_box004a.mdl" ENT.ArmorAmt = 1500
local errlog = errlog local table_insert =table.insert local table_sort = table.sort local tonumber = tonumber local math_floor = math.floor local EQUIP_MAINTYPE = 10--装备主类型 local WUJIANG_ID_LIMIT = 2000---武将ID最大值 local EMBRYO_WEAPON_PART = 1---武器胚子部位 local XINWU = 1--武将信物的类型ID local EQUIP_STAGE = 4--武器进阶材料的类型ID local ...
local fs = require("filesystem") local shell = require("shell") local args = shell.parse(...) if #args == 0 then io.write("Usage: man <topic>\n") io.write("Where `topic` will usually be the name of a program or library.\n") return 1 end local topic = args[1] for path in string.gmatch(os.getenv("MANPA...
--[==[ luawinapi - winapi wrapper for Lua Copyright (C) 2011 Klaus Oberhofer. See copyright notice in LICENSE file parser for winapi declaration files --]==] local lpeg = require 'lpeg' --------------------------------------------------------------------------- -- shortcuts -- local locale ...
local function block(color) return { tags = {color, "Block"}, components = { Body = {width=32, height=56}, Ai = {"ColoredBlockAI"}, PhysicsBody = {}, Sprite = { texture = "moveable_block", region = {0, 0, 32, 56}, ...
---------------------------------------------------------------- -- Copyright (c) 2012 Klei Entertainment Inc. -- All Rights Reserved. -- SPY SOCIETY. ---------------------------------------------------------------- local viz_thread = include( "gameplay/viz_thread" ) local array = include( "modules/array" ) local cdef...
---------------------------------------------------------------------------------------------------- -- This is a class to set the layout of UIComponent. -- -- @author Makoto -- @release V3.0.0 ---------------------------------------------------------------------------------------------------- -- import local class = ...
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by Dylan Malandain. --- DateTime: 26/01/2019 17:36 --- UITimerBarPool = setmetatable({}, UITimerBarPool) UITimerBarPool.__index = UITimerBarPool ---New ---@return table ---@public function UITimerBarPool.New() local _UITimerBarPool = { Ti...
-- Returns solution(s) to a quadratic equation in table form. -- Table will be empty if solutions are imaginary or invalid. function QuadraticSolver(a, b, c) if a == 0 then -- Actually linear if b ~= 0 then return { -c / b } else return {} -- Division by zero... end else ...
FAdmin.ScoreBoard.Player.Information = {} FAdmin.ScoreBoard.Player.ActionButtons = {} function FAdmin.ScoreBoard.Player.Show(ply) ply = ply or FAdmin.ScoreBoard.Player.Player FAdmin.ScoreBoard.Player.Player = ply if not IsValid(ply) or not IsValid(FAdmin.ScoreBoard.Player.Player) then FAdmin.ScoreBoard.Ch...
-------------------------------------------------------------------------------- -- 0080-functional.lua: tests for (pseudo-)functional stuff -- This file is a part of lua-nucleo library -- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license) -----------------------------------------------------------...
-- cleanup python shit -- clear video gl.setup(1920, 1080) local font = resource.load_font("jost.ttf") local background = resource.load_image("background.jpg") -- local video = util.videoplayer("LogoTransparent.mp4",{loop = true, audio = false}) local logo = resource.load_image("SharePic.png") fu...
local COMMAND = Clockwork.command:New("GetSoundAliasList"); COMMAND.tip = "Prints all sound alias list in your console."; COMMAND.access = "a"; -- Called when the command has been run. function COMMAND:OnRun(player, arguments) Clockwork.player:Notify(player, "A list of all sound aliases has been printed in your cons...
GameListSorters["Name Grouped by Type"] = function(Item1, Item2, Type) if Item1.Type ~= Item2.Type then return Item1.Type > Item2.Type end if Type == SortType.Descending then return string.lower(Item1.Name) > string.lower(Item2.Name) end return string.lower(Item1.Name) < string.lower(Item2.Name) end
local BaseInstance = import("./BaseInstance") local InstanceProperty = import("../InstanceProperty") local Signal = import("../Signal") local validateType = import("../validateType") local Humanoid = BaseInstance:extend("Humanoid", { creatable = true, }) function Humanoid:init(instance) getmetatable(instance).insta...
local data_util = require("data_util") old_position={x=0,y=0,surface=0,distance=0,tick=0} function draw(event) local player = game.get_player(event.player_index) local distance = player.mod_settings["gl-distance"].value local duration = player.mod_settings["gl-lifetime"].value local x = math.floor(player.charac...
-- globalsplus.lua -- Like globals.lua in Lua 5.1.4 but records fields in global tables too. -- Probably works but not well tested. Could be extended even further. -- -- usage: luac -p -l example.lua | lua globalsplus.lua -- -- D.Manura, 2010-07, public domain local function parse(line) local idx,linenum,opname,ar...
set_project("irrlicht") option("tools", {default = false, showmenu = true}) add_rules("mode.debug", "mode.release") add_requires("bzip2", "libjpeg-turbo", "libpng", "zlib") if is_plat("linux") then add_requires("libx11", "libxxf86vm", "libxcursor", "libxext") end if has_config("tools") and is_plat("macosx", "lin...
return { version = "1.4", luaversion = "5.1", tiledversion = "2020.06.12", orientation = "orthogonal", renderorder = "right-down", width = 256, height = 256, tilewidth = 32, tileheight = 32, nextlayerid = 15, nextobjectid = 988, properties = {}, tilesets = { { name = "...
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterServerEvent('server:tick') AddEventHandler('server:tick', function(type,para) local player = ESX.GetPlayerFromId(source) local source = source local item = player.getQuantity('doge') if player.getQuantity('doge') >= ...
local __exports = LibStub:NewLibrary("ovale/simulationcraft/definitions", 80300) if not __exports then return end local __class = LibStub:GetLibrary("tslib").newClass local pairs = pairs local ipairs = ipairs local kpairs = pairs __exports.interruptsClasses = { mind_freeze = "DEATHKNIGHT", pummel = "WARRIOR", ...
-- Mouse -- Stephen Leitnick -- November 07, 2020 local Workspace = game:GetService("Workspace") local UserInputService = game:GetService("UserInputService") local Janitor = require(script.Parent.Parent.Janitor) local Signal = require(script.Parent.Parent.Signal) local RAY_DISTANCE = 1000 --[=[ @class Mouse @clien...
Drugs.RegisterZoneLoaded('harvest', function(zone) local position = zone.position or {} local outputs = zone.outputs or {} if (position == {} or outputs == {}) then return false end local zoneName, zoneAction = Drugs.GenerateZoneNameAndAction('harvest', nil, outputs) local blip = false...
----------------------------------------- -- Spell: Blink ----------------------------------------- require("scripts/globals/magic") require("scripts/globals/msg") require("scripts/globals/status") ----------------------------------------- function onMagicCastingCheck(caster, target, spell) return 0 end function ...
local util = {} function util.newStatus(pos, time, drawable) return { pos=pos, time=time, drawable=drawable, controller=require('game.control.StatusController')() } end function util.newTextStatus(pos, time, font, string, color) return util.newStatus(pos, time, game.gfx.TextDrawable(font, strin...
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:27' 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...
require "core/class" Queue = Class:new() Queue.items = {} Queue.count = 0 function Queue:enqueue(item) self.count = self.count + 1 table.insert(self.items, item) end function Queue:dequeue() if self.count > 0 then local item = self.items[1] table.remove(self.items, 1) self.count =...
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' ui_page "web/index.html" client_scripts { "client/client.lua" } files { "web/index.html", "web/img/radio.png", "web/scripts/listener.js", "web/styles/index.css", "web/styles/reset.css", "web/styles/MotorolaScreentype.woff" } dependencies...
array={} function array.checkSortedArray(array) for i = 2, #array do if(names[i-1]>names[i]) then return false end end return true end function array.searchClosestIdx(array,val) local low = 0 local high = #array local med =math.floor((high + low) / 2) local temp while (hi...
-- Copyright 2020 Dhiraj Wishal -- SPDX-License-Identifier: Apache-2.0 ---------- Image Loader project description ---------- project "ImageLoader" kind "StaticLib" language "C++" systemversion "latest" cppdialect "C++17" staticruntime "On" targetdir "$(SolutionDir)Builds/Core/Binaries/$(Configuration)-$(Platf...
local module = {} function module.start() -- Initial sensors end function module.read(motion, motionStatus, current) -- Read sensors package.loaded["sensors"] = nil local status local moist_value = 0 local temp = -999 local humi = -999 local baro = -999 local dew = -999 local gdstring = "" loca...
local ACF = ACF ACF.BulletEffect = ACF.BulletEffect or {} local function BulletFlight(Bullet) local DeltaTime = ACF.CurTime - Bullet.LastThink local Drag = Bullet.SimFlight:GetNormalized() * (Bullet.DragCoef * Bullet.SimFlight:LengthSqr()) / ACF.DragDiv local Correction = 0.5 * (Bullet.Accel - Drag) * Delt...
function widget:GetInfo() return { name = "Statistics Collection", desc = "Receive unit stats and write to file in /luaui/config \nIf your experiment needs statistics, you should have done a better experiment", author = "Bluestone", date = "", license = "GNU GPL, v3 or later", layer ...
local function construct(main, lib) local textLabel = Instance.new("TextLabel") textLabel.AnchorPoint = Vector2.new(1, 0.5) textLabel.Size = UDim2.new(1, -8, 1, 0) textLabel.Position = UDim2.new(1, 0, 0.5, 0) textLabel.ClipsDescendants = true textLabel.BackgroundTransparency = 1 textLabel.Fo...
local slope_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, {-0.5, -0.25, -0.25, 0.5, 0, 0.5}, {-0.5, 0, 0, 0.5, 0.25, 0.5}, {-0.5, 0.25, 0.25, 0.5, 0.5, 0.5} } } local slope_cbox_long = { type = "fixed", fixed = { {-0.5, -0.5, -1.5, 0.5, -0.375, 0.5}, -- ...
--[[ Copyright (c) 2015 深圳市辉游科技有限公司. --]] local Resources = {} local imgPath = 'images/' Resources.Images = { HeadIcons = { ['head1'] = imgPath .. 'head0.png', ['head2'] = imgPath .. 'head1.png', ['head3'] = imgPath .. 'head2.png', ['head4'] = imgPath .. 'head3.png', ['head5'] = imgPath .. 'hea...
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf/protobuf" local TAJIEHELPSCENEDATA_PB = require("TajieHelpSceneData_pb") module('TajieHelp2DB_pb') TAJIEHELP2DB = protobuf.Descriptor(); local TAJIEHELP2DB_TAJIEHELPSCENEDATA_FIELD = protobuf.FieldDescriptor(); local TAJIEHELP2DB_UPDATETIME...
-- ------ extra functions ------ -- function interfaceCheck() metricValue = ut.trim(sys.exec("uci -p /var/state get network." .. arg[1] .. ".metric")) if metricValue == "" then -- no metric errorNoMetric = 1 else -- if metric exists create list of interface metrics to compare against for duplicates uci.cursor()...
--translated by FrenZy#7752 from GFL Teams on Discord return { ["CONGRATS_COMMAND"] = "Ger dig konfetti och festliga ljud. Dock endast för din klient.", ["CONGRATS_GLOBAL"] = "Grattis, du slog serverns rekord för högsta nådda rundan!", ["CONGRATS_MAP"] = "Grattis! Du slog kartans rekord för högsta nådda rundan! Fö...
return { { name = "2018-08-30-130000_integration_access_settings", up = [[ CREATE TABLE IF NOT EXISTS integration_access_settings( id uuid, source_identifier text, target_identifier text, PRIMARY KEY (id) ); ...
function Collectionator.Utilities.ColorName(link, name) local qualityColor = Auctionator.Utilities.GetQualityColorFromLink(link) return "|c" .. qualityColor .. name .. "|r" end
ModifyEvent(-2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2); AddItem(173, 1); do return end;
object_tangible_furniture_modern_shared_bar_counter_s1_treasure_map = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/furniture/modern/shared_bar_counter_s1_treasure_map.iff" } ObjectTemplates:addClientTemplate(object_tangible_furniture_modern_shared_bar_counter_s1_treasure_map, "object/t...
pillar = {} pillar.num = 5 pillar.topposition = {x = 0.0, y= 10.0, z= 0.0} pillars = {} for i=1,5 do -- pillars[i] = pillar local t = pillar pillars[i]=t pillars[i].num = i end local t = pillars[1] -- t.num = 10 pillars[1].topposition.y = 10.0 pillars[2].topposition.y = 20.0 function Test() ...
if settings.startup["enable-morebobsaddon"] and settings.startup["enable-morebobsaddon"].value == true then if mods["aai-industry"] then if aai_industry == true then table.insert(data.raw["recipe"]["burner-mint"].normal.ingredients,{"motor", 1}) table.insert(data.raw["recipe"]["burner-mint"].expensive.ingr...
--*********************************************************** --** THE INDIE STONE ** --*********************************************************** require "TimedActions/ISBaseTimedAction" ---@class ISLoadBulletsInMagazine : ISBaseTimedAction ISLoadBulletsInMagazine = ISBaseTimed...
return { level = 61, need_exp = 130000, clothes_attrs = { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, }, }
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.Author = wac.author ENT.Category = "" ENT.Spawnable = false ENT.AdminSpawnable = false
local term = require("term") for fs in component.list("filesystem") do local fs = component.proxy(fs) local used = fs.spaceUsed() local total = fs.spaceTotal() local percentage = used / total local label = fs.getLabel() label = label and " (" .. label .. ")" or "" term.print(string.format(...
local party = require('party'); local actions = require('actions'); local magic = require('magic'); local actions = require('actions'); return { -- Scans the party (including the current player) for those needing heals -- @returns list of party indicies needing heals NeedHeals = function(self, hppCheck) loc...
local sprotoparser = require "sprotoparser" local proto = {} proto.c2s = sprotoparser.parse [[ .package { type 0 : integer session 1 : integer } handshake 1 { response { msg 0 : string } } create 2 { request { device 0 : string type 1 : string param 2 : string } response { result 0 : boolean ch...
#!/usr/local/bin/lua -i function sortFile(inp, out) if (not out) and inp then print("Are you sure you want to overwrite " .. inp .. "?") response = string.sub(string.lower(io.stdin:read("l")),1,1) print(response) if response ~= "y" then print("Abort sortFile") io.stdout:flush() retur...
local ok, sqlite = pcall(require, "sqlite") if not ok then error "Firefox depends on sqlite.lua (https://github.com/tami5/sqlite.lua)" end local firefox = {} local utils = require "telescope._extensions.bookmarks.utils" local ini = require "telescope._extensions.bookmarks.parser.ini" -- Path components to the defa...
local kalman_filter = require("kalmanFilter") local function main() -- first generate our data. local array_values = {} for i=1, 5 do array_values[i] = 12 end print("\nbefore noise: " .. table.concat(array_values, " ")) for i=1, 5 do if i % 2 == 0 then array_values[i] = array_values[i] + math.random(4...
function setupstuff () blipshowing = 0 soundlevel = 0 thisplayer = getLocalPlayer () local x, y = guiGetScreenSize() x = x * 0.092 y = y * 0.71 thesoundbar = guiCreateProgressBar ( x, y, 100, 20, false ) SoundText = guiCreateLabel ( .35 , 0, 100, 20, "Sound", true, thesoundbar ) guiLabelSetColor ( SoundText, 1...
Error = function() end error = function() end ErrorNoHalt = function() end game.ConsoleCommand("sv_region 0") -- WorldWide local dur = "materials/fprp/" for _,v in pairs(file.Find(dur.."*","GAME")) do resource.AddFile(dur..v); end hook.Run("fprpStartedLoading"); GM.Version = "3.0" GM.Name = "fprp" GM.Author = "aS...
--esmobs v1.3 --maikerumine --made for Extreme Survival game --License for code is WTFPL ------------------------- --MINETEST MOBS ------------------------- -- Dungeon Master by PilzAdam mobs:register_mob("esmobs:dungeon_master", { type = "monster", passive = false, damage = 4, attack_type = "dogshoot", pathfindi...
-------------------------------------------------------------------------- -- This collection of routines are used to convert a table into a string. -- This string is valid lua code. Note that this will only work for "DAG" -- and not loops. There are more general solutions available but the -- output less attractive. ...
-- A simple Result<V, E> type to simplify control flow with installers and updaters local result = {} local ok_result_mt = { and_then = function(self, f, ...) local r = f(...) if r == nil then return result.err('Nil result in and_then! ' .. vim.inspect(debug.traceback())) end self.ok = r.ok ...
local lrucache = require("resty.lrucache") --创建缓存实例,并指定最多缓存多少条目 local cache, err = lrucache.new(200) if not cache then ngx.log(ngx.ERR, "create cache error : ", err) end local function set(key, value, ttlInSeconds) cache:set(key, value, ttlInSeconds) end local function get(key) return cache:get(key) end ...
--[[dropdownData = { type = "multiselect", dataType = "set" -- or "list" name = "My Multiple Selection Combo Box", -- or string id or function returning a string choices = {"table", "of", "choices"}, choicesValues = {"foo", 2, "three"}, -- if specified, these values will get passed to setFunc instea...
--[==[ - Author: ezhex1991@outlook.com - CreateTime: 2018-02-27 17:18:49 - Orgnization: #ORGNIZATION# - Description: --]==] local M = {} ----- CODE ----- local SceneManager = CS.UnityEngine.SceneManagement.SceneManager local LoadSceneMode = CS.UnityEngine.SceneManagement.LoadSceneMode function M.LuaAwake(in...
local RCON_USAGE = [[ usage: rcon <client-name> Use `status` to find the client name.]] --- -- Request server info from connected clients. -- hubot.RegisterCommand( "rcon", { desc = "Remotely execute console commands on connected servers.", run = function(args) if #args < 1 then return RCON_USAGE end loca...
minstyngar = Creature:new { customName = "Minstyngar", socialGroup = "townsperson", level = 300, chanceHit = 50, damageMin = 1800, damageMax = 3600, baseXp = 79336, baseHAM = 1050000, baseHAMmax = 1200000, armor = 3, resists = {60,60,60,60,60,60,60,60,60}, meatType = "meat_carnivore", meatAmount = 1000, h...
-- Checks if bot was disabled on specific chat local function is_channel_disabled( receiver ) if not _config.disabled_channels then return false end if _config.disabled_channels[receiver] == nil then return false end return _config.disabled_channels[receiver] end local function enable_channel(receiver) if...
local kata = {} kata.braces = { { open = "(", close = ")" }, { open = "{", close = "}" }, { open = "[", close = "]" } } kata.validBraces = function(braces) local stack = {} for index = 1,braces:len() do local c = braces:sub(index,index) if #stack > 0 and stack[#stack].close == c th...
local Config = require('opus.config') local UI = require('opus.ui') local config = Config.load('saver', { enabled = true, timeout = 60, }) return UI.Tab { title = 'Screen Saver', description = 'Screen saver', [1] = UI.Window { x = 2, y = 2, ex = -2, ey = 5, }, label1 = UI.Text { x = 3, y = 3, valu...
Popup = File.LoadLua("global/popup.lua")() Fonts = File.LoadLua("global/fonts.lua")() data = File.LoadLua("menuintroscreen/credits_data.lua")() data_ms = File.LoadLua("menuintroscreen/credits_microsoft.lua")() data_libs = File.LoadLua("menuintroscreen/credits_libraries.lua")() header_font = Fonts.h1 subhead...
return { code = 902, key = "SUIT_STATE_ERROR", }
function getItemAttack(item) return getItemAttribute(item.uid, "attack") or getItemInfo(item.itemid).attack end function getItemDefense(item) return getItemAttribute(item.uid, "defense") or getItemInfo(item.itemid).defense end function getItemArmor(item) return getItemAttribute(item.uid, "armor") or getIt...
return { id = "S002", events = { { alpha = 0.422, code = 2, style = { text = "前往查看<color=#ffde38>建造</color>详情!", mode = 1, posY = -132.4, dir = 1, posX = 423.25 }, ui = { path = "OverlayCamera/Overlay/UIMain/toTop/frame/bottomPanel/btm/buttons_container/buildButton", pathI...