content
stringlengths
5
1.05M
BigWigs:AddSounds("Shivermaw", { [201354] = "Alarm", [201355] = "Alert", [201379] = "Warning", [201672] = "Long", [201960] = "Info", [202062] = "Warning", }) BigWigs:AddSounds("Thalena", { [202779] = {"Alert","Info"}, [202947] = "Alarm", [203381] = "Long", }) BigWigs:AddSounds("Festerface", { [201598] = "A...
local K, C, L, _ = select(2, ...):unpack() if C.Error.White ~= true and C.Error.Black ~= true then return end -- All errors on http://wowwiki.wikia.com/wiki/WoW_Constants/Errors -- White list errors, that will not be hidden K.White_List = { [ERR_INV_FULL] = true, [ERR_QUEST_LOG_FULL] = true, [ERR_ITEM_MAX_COUNT] = ...
local Graph = require "graph" local Room = require "room" local settings = require "settings" --convenience variables local startx = settings.startingTile.gridx local starty = settings.startingTile.gridy --singleton / global variable which holds all doors local Rooms = {} local graph = Graph() local rooms = {} local ...
--[[ MTA Role Play (mta-rp.pl) Autorzy poniższego kodu: - Patryk Adamowicz <patrykadam.dev@gmail.com> Discord: PatrykAdam#1293 Link do githuba: https://github.com/PatrykAdam/mtarp --]] local death = {} death.active = false function death.hide() removeEventHandler( "onClientGUIClick", death.butt...
---@class SeedEffect @enum SeedEffect = {} --- --- 0 SeedEffect.SEED_NORMAL = 0 --- --- 1 SeedEffect.SEED_MOVEMENT_PITCH = 1 --- --- 2 SeedEffect.SEED_HEALTH_PITCH = 2 --- --- 3 SeedEffect.SEED_CAMO_ISAAC = 3 --- --- 4 SeedEffect.SEED_CAMO_ENEMIES = 4 --- --- 5 SeedEffect.SEED_CAMO_PICKUPS = 5 --- --- 6 SeedEffect.SEE...
function handle_record(record) local balance = record:get('BALANCE') local base = balance * record:get("CURRVALUE"); local precision = tonumber(record:get("SCALE")); local result =string.format("%.2f", balance); if precision == 1 then result = string.format("%.0f", balance) end; if precisio...
local names = { { "chris", "Chris Danford", "Seattle, WA, USA" }, { "glenn", "Glenn Maynard", "Boston, MA, USA" }, { "steve", "Steve Checkoway", "San Diego, CA, USA" } } local frame = Def.ActorFrame { BeginCommand = function(self) SCREENMAN :GetTopScreen() :PostScreenMessage("SM_BeginFadingOut", (3 * #name...
-- Requiring all endpoint related test modules require "endpoints.NodesTest.NodesEndpointTest" require "endpoints.NodesTest.HotThreadsTest" require "endpoints.NodesTest.InfoTest" require "endpoints.NodesTest.ShutdownTest" require "endpoints.NodesTest.StatsTest"
-- See LICENSE for terms local pairs, type, tostring, table = pairs, type, tostring, table local IsValid = IsValid local GetCursorWorldPos = GetCursorWorldPos local MsgPopup = ChoGGi.ComFuncs.MsgPopup local RetName = ChoGGi.ComFuncs.RetName local Translate = ChoGGi.ComFuncs.Translate local RandomColour = ChoGGi.ComFu...
-- Copyright 2017-2019 Jason Tackaberry -- -- 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 la...
ITEM.name = "Long-Las Receiver" ITEM.model = Model("models/weapons/w_package.mdl") ITEM.description = "A receiever designed for a long-las."
local birdX = math.random(600, 950); local birdY = math.random(-100, -250); function onCreate() -- background shit makeLuaSprite('Skyg', 'alley/Sky_galaxy', -600, -3750); setScrollFactor('Skyg', 1.0, 1.0); scaleObject('Skyg', 1.0, 1.0); makeLuaSprite('Skyr', 'alley/Sky_reaching_galaxy', -600, -2730); setScrollF...
local ITEM = momoIRTweak.FastItem local FLUID = momoIRTweak.FastFluid local AddIng = momoIRTweak.recipe.SafeAddIngredient local Replace = momoIRTweak.recipe.ReplaceIngredient local Rem = momoIRTweak.recipe.RemoveIngredient local ele = momoTweak.electronics local components = momoTweak.components local SetTime = momoIRT...
function EventHorizon:InitializeClass() self.config.gcdSpellID = 1966 self.config.past = -1 -- Number of seconds to show in the past. Default = -3 self.config.future = 11 -- Number of seconds to show in the future. Default = 11 -- Assassination --[[ Blindside self:newSpell({ requiredTree = 1, requ...
-- Base16 Snazzy color -- Author: Chawye Hsu (https://github.com/chawyehsu) based on Hyper Snazzy Theme (https://github.com/sindresorhus/hyper-snazzy) -- to be use in your theme.lua -- symlink or copy to config folder `local color = require('color')` local M = {} M.base00 = "#282a36" -- ---- M.base01 = "#34353e" -- ...
package.path = "./?/init.lua;" .. package.path local lemur = require("lib") describe("Lemur", function() it("should load modules directly", function() local habitat = lemur.Habitat.new() local root = habitat:loadFromFs("spec/require") local module = root:FindFirstChild("a") assert.not_nil(module) local ...
GarynRaidersBunkerScreenPlay = ScreenPlay:new { numberOfActs = 1, screenplayName = "GarynRaidersBunkerScreenPlay", lootContainers = { 5555918, 5555917, 5555916, 5555915, 5555912, 5555914 }, lootLevel = 15, lootGroups = { { grou...
--- -- @module factory local types = require("lualife.types") local typeutils = require("typeutils") local Size = require("lualife.models.size") local Point = require("lualife.models.point") local FieldSettings = require("biohazardcore.models.fieldsettings") local GameSettings = require("biohazardcore.models.gamesetti...
-- Simple selection sort algorithm implementation -- See: http://en.wikipedia.org/wiki/Selection_algorithm -- Returns the k-smallest (or k-largest) element in a given array -- while performing an in-place partial sort -- list : a given sequence of elements -- k : (optional) the k-element to be selected, defau...
require('onmt.init') local tester = ... local LinearTest = torch.TestSuite() function LinearTest.regular() local m_standard = nn.Linear(5,20) m_standard:getParameters():uniform(-0.1, 0.1) local m_rindex = nn.Linear(5,20) m_rindex.weight = m_standard.weight m_rindex.bias = m_standard.bias local input = to...
workspace "Holy" --solution name architecture "x64" configurations { "Debug", --contains everything "Release", --tradeoff between speed and infos debugging "Dist" -- distrubution build, everything striped } outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" -- DEBUG/WIN/x64 project "Holy" --...
Config = {} Config.EnableLicense = true Config.LicensePrice = 25000 Config.PricePain = 100 Config.PriceKnife= 650 Config.PriceHammer = 800 Config.PriceMachette = 750 Config.PriceSns = 15000 Config.PriceBtt = 800 Config.PricePied = 550 Config.PriceClip = 150 Config.PriceGrip = 200 Config.PriceSilent = 250 Confi...
--[[ Gold management system Inifinite gold, gold based API's, gold based UI's... ]] require('components/gold/gold') require('components/gold/hero_kills')
Paddle=class{} function Paddle:init(x,y,width,height) self.x=x self.y=y self.width=width self.height=height self.paddle_speed=200 end function Paddle:up(dt) self.y=math.max(0,self.y+ -self.paddle_speed*dt) end function Paddle:down(dt) self.y=math.min(virtual_height-20,self.y+ self.paddle_speed*dt) end func...
--@import see.io.InputStream --@import see.util.Math --@extends see.io.InputStream --[[ Modified float conversions from http://snippets.luacode.org/snippets/IEEE_float_conversion_144. Modified integer conversions from http://lua-users.org/wiki/ReadWriteFormat. ]] --[[ An InputStream for doing more advanc...
Config = {} Config.DrawDistance = 100.0 Config.MarkerType = 1 Config.MarkerSize = { x = 1.5, y = 1.5, z = 1.0 } Config.MarkerColor = { r = 50, g = 50, b = 204 } Config.EnablePlayerManagement = true Config.EnableArmoryManag...
----------------------------------- -- Area: Sea Serpent Grotto -- Mob: Vampire Bat ----------------------------------- require("scripts/globals/regimes") ----------------------------------- function onMobDeath(mob, player, isKiller) tpz.regime.checkRegime(player, mob, 806, 2, tpz.regime.type.GROUNDS) end
-- httpserver-init.lua -- Part of nodemcu-httpserver, launches the server. -- Author: Marcos Kirsch -- Function for starting the server. -- If you compiled the mdns module, then it will also register with mDNS. local startServer = function(ip) local conf = dofile('httpserver-conf.lc') if (dofile("httpserver.lc")...
workspace "SakuraEngine" architecture "x64" configurations { "Debug", "Release", "Dist" } outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" IncludeDir = {} IncludeDir["Glad"] = "SakuraEngine/vendor/Glad/include" IncludeDir["Imgui"] = "SakuraEngine/vendor/Imgui" group "Dependencies" include ...
a = 4 % 3 b = -4 % 3 c = 4 % -3 d = -4 % -3
local module = { _version = "vector.lua v2019.14.12", _description = "a simple vector library for Lua based on the PVector class from processing", _url = "https://github.com/themousery/vector.lua", _license = [[ Copyright (c) 2018 themousery Permission is hereby granted, free of charge, to any person o...
require "gameoflife" function love.load() GRIDSIZE = 32 GRID = createGrid(GRIDSIZE) randomize(GRID) RANDCOLOUR1 = {math.random(255),math.random(255),math.random(255)} -- filled cells RANDCOLOUR2 = {math.random(255),math.random(255),math.random(255)} -- empty cells CELLSIZE = 10 XOFFSET = 15 YOFFSET = 15 GO ...
require("gameData/gameData") BindingGuidelinesDataInterface = class(DataInterfaceBase) BindingGuidelinesDataInterface.Intervals = 60 * 60 * 24 * 3 BindingGuidelinesDataInterface.getInstance = function() if not BindingGuidelinesDataInterface.s_instance then BindingGuidelinesDataInterface.s_instance = new(B...
----------------------------------------- -- ID: 19007 -- Item: Death Penalty ----------------------------------------- require("scripts/globals/msg") require("scripts/globals/npc_util") ----------------------------------- function onItemCheck(target) if target:getFreeSlotsCount() == 0 then return tpz.msg....
SPELL.Name = "Time warp" SPELL.Description = "なぜあなたはそれを翻訳しましたか for 3 seconds" SPELL.Combo = "wind water lightning" SPELL.Icon = Material("magic/spell_icons/time_warp") if SERVER then local canCast = true function SPELL:OnCasted(ply) if ply:DealDamageIfWettened() then return false end if !canCas...
---Pretty-prints all arguments. function p(...) end
--Copyright (C) 2009 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
--This example will output a pulse on FIO1 (FIO4 for T4) a specified amount of time after a -- rising edge is detected on FIO0 (FIO5 on T4). The delay between detection of a crossing -- and the beginning of the pulse is controlled by the F32 value in USER_RAM at -- modbus address 46000-46001. print("Begin") local s...
--!strict --[[ Calls the given callback, and stores any used external dependencies. Arguments can be passed in after the callback. If the callback completed successfully, returns true and the returned value, otherwise returns false and the error thrown. The callback shouldn't yield or run asynchronously. NOTE: ...
--[[---------------------------------------------------------------------------- Application Name: DownloadControl Summary: Using the Download Control available as a UI-Builder Control Package. Description: The sample provides "Download"functionality for certain files (e.g. text- or image-files) via t...
return Def.CourseContentsList { MaxSongs = 4; NumItemsToDraw = 8; -- xxx: Doesn't scroll anymore. --[[ InitCommand=cmd(x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y+91); OnCommand=cmd(zoomy,0;bounceend,0.3;zoom,1); OffCommand=cmd(zoomy,1;bouncebegin,0.3;zoomy,0); --]] ShowCommand=cmd(bouncebegin,0.3;zoomy,1); Hide...
----------------------------------- -- ESX Init ----------------------------------- ESX = nil Citizen.CreateThread(function() while ESX == nil do TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) end end) ----------------------------------- -- Location Logic -----------------------------------...
local m_iTeamNum = se.get_netvar("DT_BasePlayer", "m_iTeamNum") local a1 = 0 local a2 = 0 local a3 = { "y", "y u", "yu", "yu n", "yun g", "yung", "yung g", "yung ge", "yung geo", "yung geor", "yung georg", "yung george", "yung george", "...
require 'torch' require 'optim' require 'os' require 'optim' require 'xlua' require 'jitter' -- small library to add jitter to images local image = require 'image' local optParser = require 'opts' local opt = optParser.parse(arg) local WIDTH, HEIGHT = 32, 32 local DATA_PATH = (opt.data ~= '' and opt.data or './data/'...
function formatter(fmt, ...) local args, order = {...}, {} fmt = fmt:gsub('%%(%d+)%$', function(i) table.insert(order, args[tonumber(i)]) return '%' end) return string.format(fmt, table.unpack(order)) end function file_content(filename) local f = assert(io.open(filename, "r")) local...
-- String Utilities -- Mostly thanks to @scottcs -- <https://github.com/scottcs/dot_hammerspoon/blob/master/.hammerspoon/utils/string.lua> ----------------------------------------------- local lib = {} -- Split a string on pattern -- @returns Table lib.split = function(str, pat) local t = {} -- NOTE: use {n = 0...
require "controller" local md5 = require 'md5' local mime = require("mime") security = controller.new({name="security"}) function security.login_GET(request) return security:view_response("login") end function security.status_GET(request) if request.user==nil then return security:view_response("login") els...
local global = require 'core.global' local vim = vim -- Create cache dir and subs dir local createdir = function () local data_dir = { global.cache_dir..'backup', global.cache_dir..'session', global.cache_dir..'swap', global.cache_dir..'tags', global.cache_dir..'undo' } if vim.fn.isdirecto...
local BasePlugin = require "kong.plugins.base_plugin" local URLRewriter = BasePlugin:extend() URLRewriter.PRIORITY = 700 function split(s, delimiter) result = {} for match in (s..delimiter):gmatch("(.-)"..delimiter) do table.insert(result, match) end return result end function URLRewriter:new() URLR...
object_building_mustafar_terrain_must_bridge_rock_arch_50m = object_building_mustafar_terrain_shared_must_bridge_rock_arch_50m:new { } ObjectTemplates:addTemplate(object_building_mustafar_terrain_must_bridge_rock_arch_50m, "object/building/mustafar/terrain/must_bridge_rock_arch_50m.iff")
-- -- (C) 2013 Kriss@XIXs.com -- 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,unpack,_VERSION,xpcall,module,require=coroutine,package,str...
-- Copyright 2017-2021 David B. Lamkins <david@lamkins.net>. See LICENSE. -- Spin LPeg lexer, see https://www.parallax.com/microcontrollers/propeller. local lexer = require('lexer') local token, word_match = lexer.token, lexer.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local lex = lexer.new('spin') -- Whitesp...
AddCSLuaFile( "cl_init.lua" ) -- Make sure clientside AddCSLuaFile( "shared.lua" ) -- and shared scripts are sent. include('shared.lua') ENT.BouncesTillDeath = 4 ENT.Bounces = 0 function ENT:Initialize() self:SetModel( "models/hunter/misc/sphere025x025.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) -- Make u...
-- load credentials (e.g., 'SSID' and 'PASSWORD') dofile("credentials.lua") function syncClock() -- sync time sntp.sync("pool.ntp.org", function() --print("[SNTP] synced time: " .. rtctime.get()) end, function() --print("[SNTP] error") end, nil) end function startup() if file.open("init.lua") =...
-- Copyright (c) Microsoft Corporation. All rights reserved. -- Licensed under the Apache 2.0 License. return { __environment = [[ env.transaction_type = { PAYMENT = 1, TRANSFER = 2, CASH_OUT = 3, DEBIT = 4, CASH_IN = 5 } function env.jsucc(result) retur...
local cjson = require('cjson') local configuration = cjson.encode(cjson.decode([[{ "services": [ { "proxy": { "hosts": [ "localhost", "127.0.0.1" ], "policy_chain": [ { "name": "apicast.policy.echo" } ] } } ] } ]])) local function d...
dire_tower_attack = class({}) LinkLuaModifier("modifier_dire_tower_attack", "pve/abilities/units/dire_tower/dire_tower_attack/modifier_dire_tower_attack", LUA_MODIFIER_MOTION_NONE) function dire_tower_attack:GetCastAnimationCustom() return ACT_DOTA_CUSTOM_TOWER_ATTACK end function dire_tower_attack:GetPlaybackRateOve...
--This file adds to the vanilla techs if modSetting("enablemodresearch").value == true then --if the infinite research is enabled in the startup settings --note: if you're looking for the conditions, they're in functions.basic add_infinite_technology("weapon-shooting-speed", 7, ...
function love.load() math.randomseed(os.time()) math.random() math.random() joystick = love.joystick.getJoysticks()[1] paddle = require("paddle") ball = require("ball") require("collisionUtility") paddle1 = paddle.makePaddle(8, 300, 16, 80, "keyboard") paddle2 = paddle.makePaddle(love.graphics.getWi...
local cmem = require 'libcmem' local ffi = require 'ffi' local qconsts = require 'Q/UTILS/lua/q_consts' local qc = require 'Q/UTILS/lua/q_core' local is_base_qtype = require 'Q/UTILS/lua/is_base_qtype' local get_ptr = require 'Q/UTILS/lua/get_ptr' local tmpl = qconsts.Q_S...
require "PluginInit" require "Logger" require "AspectRatioMapping" require "AspectRatio" require "TableHelper" return { metadataFieldsForPhotos = { {id = 'aspectRatioFilter'}, { id = 'aspectRatio', title = 'Aspect Ratio', dataType = 'string', browsable = tr...
EXIT_TO = nil function Main() local self = Escena() local screen_ima = nil local game_title = nil local newbutton = nil local creditos = nil local salir = nil local background = nil local STATE = 0 local limpiar_fondo = false local scroll_ima = nil self.s...
-- 添加砖块: tile.type local function _add_tile(tile_type, position) add_tile(tile_type, position.x * tile.size, position.y * tile.size) end -- 添加基地 function base(position) _add_tile(tile.base, position) end -- 添加砖块 function brick(position) _add_tile(tile.brick, position) end -- 添加大砖块(由四个砖块组成) function bric...
return Def.Quad{ Name= "line" }
print('This is a test')
return require("tangerine.fennel.1-0-0")
object_tangible_quest_menagerie_terminal_56 = object_tangible_quest_shared_menagerie_terminal_56:new { } ObjectTemplates:addTemplate(object_tangible_quest_menagerie_terminal_56, "object/tangible/quest/menagerie_terminal_56.iff")
BorgarStory = Story:extend() function BorgarStory:new() BorgarStory.super.new(self) self.lines = { "#bg gfx/bg1.png", "3017.UC", "08.12 1745 HOME", "#bg gfx/bg7.png", "#music bgm/Lazy Marine - 91 T2.wav", "I've received a fair amount of money from work this mont...
--[[ Copyright (C) 2018 Google Inc. 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 2 of the License, or (at your option) any later version. This program is distributed in the hope th...
--[[ Chunk loader information ]]-- local metadata = require("metadata") -- fuel in hours local chunkFuelResource = {} chunkFuelResource["railcraft:dust[0]"] = 2 chunkFuelResource["minecraft:ender_pearl[0]"] = 4 chunkFuelResource["railcraft:dust[6]"] = 8 chunkFuelResource["railcraft:dust[7]"] = 12 local chunkLoaderA...
local log = require 'tools.logger' local find = function (t, msg) for _, m in ipairs(t) do if msg:match (m) then return true end end return false end -- Retries a function/action if it fails for given reason, -- up to retry_limit. 'reasons' holds a list of errors to match against. -- If the error...
#!/usr/bin/env lua -- Numerical reduction using scalars and using vectors local cl = require('mooncl') local function printf(...) io.write(string.format(...)) end -- cl.trace_objects(true) -- Create device, context, and command queue local platform = cl.get_platform_ids()[1] local device = cl.get_device_ids(platfor...
object_mobile_outbreak_undead_boss_f_both_01 = object_mobile_shared_outbreak_undead_boss_f_both_01:new { } ObjectTemplates:addTemplate(object_mobile_outbreak_undead_boss_f_both_01, "object/mobile/outbreak_undead_boss_f_both_01.iff")
--[[ --=====================================================================================================-- Script Name: Map Vote System, for SAPP (PC & CE) Description: This script is a drop-in replacement for SAPP's built-in voting system. - features - 1). Cast and re-cast your vote. ...
require("lib.lclass") require("lib.ecs.Component") class "MenuComponent" ("Component") function MenuComponent:MenuComponent() self.typeName = "MenuComponent" end
return { get = function(req, res) res:write('hello world') end }
local AceGUI = LibStub("AceGUI-3.0") -- Lua APIs local pairs, assert, type = pairs, assert, type -- WoW APIs local PlaySound = PlaySound local CreateFrame, UIParent = CreateFrame, UIParent -- Global vars/functions that we don't upvalue since they might get hooked, or upgraded -- List them here for Mikk's FindGlobals...
local zproto = require "zproto" local xproto = zproto:parse[[ rpc 0x1001 { .content:string 1 } ]] return xproto
local S, L, O, U, D, E = unpack(select(2, ...)); local Module = S:NewNameplateModule('Auras_MythicPlus'); local Stripes = S:GetNameplateModule('Handler'); -- Lua API local pairs, table_wipe, math_max = pairs, wipe, math.max; -- WoW API local CooldownFrame_Set, GetCVarBool, UnitIsUnit, AuraUtil_ForEachAura = CooldownF...
-- luacheck: ignore 212/self local sql = require "util.sql"; local xml_parse = require "util.xml".parse; local resolve_relative_path = require "util.paths".resolve_relative_path; local stanza_preserialize = require "util.stanza".preserialize; local unpack = unpack local function iterator(result) return function(res...
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by Muulfz. --- DateTime: 12/8/2020 3:47 PM --- RegisterCommand(vRP.lang.commands.police.search_register.cmd, function(source, args, rawCommand) vRP.police_search_reg(source) end ) RegisterCommand(vRP.lang.commands.police.show_police_records.cmd,...
local t=setmetatable({}, {__newindex=function(t,k,v) assert(v == "foo"..k) rawset(t, k, "bar"..k) end}) for i=1,100 do t[i]="foo"..i end for i=1,100 do assert(t[i] == "bar"..i) end for i=1,100 do t[i]="baz"..i end for i=1,100 do assert(t[i] == "baz"..i) end local t=setmetatable({foo=1,bar=1,baz=1},{}) t.baz=nil...
for e,l in pairs({(function(l,...)local L="This file was obfuscated using PSU Obfuscator 4.0.A | https://www.psu.dev/ & discord.gg/psu";local u=l['TYj4IJE'];local M=l[((#{(function(...)return 926,988,461,832;end)()}+685560321))];local x=l[((602053885-#("still waiting for luci to fix the API :|")))];local E=l[(769725418...
----------------------------------- -- Area: Lower Jeuno -- Door: Merchant's House -- Starts & Finishes Quest: Save My Son -- Optional Involvement in Quest: Chocobo's Wounds, Path of the Beastmaster ----------------------------------- local ID = require("scripts/zones/Lower_Jeuno/IDs") require("scripts/globals/setti...
--[[ 编辑器逻辑 ]] --默认跟编辑器目录一致 local _projectResPath local _projectUITemplatePath local _projectAniTemplatePath local _projectScriptPath local _projectScriptDialogPath local _gameWorkDir local _scriptUseTemplateInfo = {} local _templateUsedByScriptsInfo = {} local _templateUseAniInfo = {} local _aniUsedByTemplateInfo...
-- checkAlerts.lua local members = redis.call('smembers', KEYS[1]); if table.getn(members) == 0 then redis.call('srem','zmon:alert-acks', ARGV[1]); return redis.call('srem','zmon:alerts', ARGV[1]); else return redis.call('sadd','zmon:alerts', ARGV[1]); end
function usage() io.stderr:write(string.format("Usage: %s file\n", arg[0])) io.stderr:write("Checks a GFF file for line-sortedness.\n") os.exit(1) end function split(str, sep) local fields = {} str:gsub("([^"..sep.."]*)"..sep, function(c) table.insert(fields, c) end) return fields end if #arg == 1 then gf...
local cgm = gg.class.cgm ---功能: 角色换服 ---@usage ---用法: rebindserver 角色ID 目标服务器ID function cgm:rebindserver(args) if self.master and not self.master:is_super_gm() then return self:say("禁用危险指令") end local isok,args = gg.checkargs(args,"int","string") if not isok then return self:say("用法: rebindserver 角...
local rect = display.newRect(300, 500, 400, 400) rect:setFillColor(1, 0, 1) local mask = graphics.newMask("mask2.png") rect:setMask(mask) rect.maskRotation = 45 rect.maskScaleX = 1
local json = require 'cjson' local now = os.time() -- This is script which checks system activity and shut it down -- for max_inactive timeout. Just call it from cron. Once a minute -- for example. This script stores its previous state in status_path -- file. The state is an JSON object with next fields: -- active : ...
#include "scripts/utils.lua" #include "scripts/menu.lua" #include "scripts/savedata.lua" #include "scripts/ui.lua" #include "datascripts/color4.lua" #include "datascripts/inputList.lua" local forcefieldActive = false local circleSprite = nil function init() saveFileInit() menu_init() circleSprite = LoadSprite("...
----------------------------------- -- Area: Mhaura -- NPC: Keshab-Menjab -- Type: Standard NPC -- !pos -15.727 -9.032 54.049 249 ----------------------------------- require("scripts/globals/settings") ----------------------------------- function onTrade(player, npc, trade) end function onTrigger(player, npc) pl...
local validatorRoot = script.Parent local ToastRoot = validatorRoot.Parent local DialogRoot = ToastRoot.Parent local AppRoot = DialogRoot.Parent local UIBloxRoot = AppRoot.Parent local Packages = UIBloxRoot.Parent local t = require(Packages.t) local validateColorInfo = require(UIBloxRoot.Core.Style.Validator.validate...
local M = {} M.current = {} M.valid = "abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ" function M.reset() M.current = {} end function M.get(buf) local first_letter = buf.filename:sub(1, 1) -- should only match alphanumeric characters local invalid_char = first_letter:match("[^%w]") if not M.current[f...
--[[------------------------------------------------- Notes: > This code is using a relative image filepath. This will only work as long as the location it is from always exists, and the resource it is part of is running. To ensure it does not break, it is highly encouraged to move images into your local resource ...
function func_a(s) for i=1, 10 do coroutine.yield("A", i, s+i); end end function func_b (v) for i=1,5 do coroutine.yield("B", i, v+i); end end usb:on(); -- Program starts here: co1 = coroutine.create( func_a ); fu2 = coroutine.wrap( func_b ); tempfile = io.open( "tempf.txt" , "w" ); w...
-- <leader> = space vim.g.mapleader = " " -- common options local opts = {noremap = true, silent = true} -- shorten function name local keymap = vim.api.nvim_set_keymap -- Modes -- normal_mode = "n", -- insert_mode = "i", -- visual_mode = "v", -- visual_block_mode = "x", -- term_mode = "t", -- command_mo...
Span = function(el) color = el.attributes['color'] -- if no color attribute, return unchange if color == nil then return el end -- tranform to <span style="color: red;"></span> if FORMAT:match 'html' then -- remove color attributes el.attributes['color'] = nil -- use style attribute instead ...
-- Async local async = require 'async' -- Nb of jobs: local N = 32 -- Run: async.run(function() for i = 1,N do local code = [[ local jobid = ${jobid} local njobs = ${njobs} print("running job " .. jobid .. " out of " .. njobs) ]] async.process.dispatch(code, {jobid = i...
local server = require "nvim-lsp-installer.server" local path = require "nvim-lsp-installer.path" local platform = require "nvim-lsp-installer.platform" local std = require "nvim-lsp-installer.installers.std" local Data = require "nvim-lsp-installer.data" local root_dir = server.get_server_root_path "rust" local VERS...