content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
spawnpoint 'a_m_y_cyclist_01' { x = -1037.89, y = -2738.01, z = 20.17 }
nilq/small-lua-stack
null
local t = require "taptest" local flyweightstore = require "flyweightstore" local function diff( a, b ) return a ~= b end t( type( flyweightstore() ), "function" ) local fly = flyweightstore() t( type( fly( 1 )), "table" ) t( fly( 1 ), fly( 2 ), diff ) t( type( fly( 1, nil, 0/0, 3 ) ), "table" ) t( fly( 1, nil, 0/...
nilq/small-lua-stack
null
local DemoAddon = {} local GeminiGUI function DemoAddon:new(o) o = o or {} setmetatable(o, self) self.__index = self return o end function DemoAddon:Init() Apollo.RegisterAddon(self, false, "", {"Gemini:GUI-1.0"}) end function DemoAddon:OnDependencyError(strDep, strError) return false end function Dem...
nilq/small-lua-stack
null
-- common grenade projectile code AddCSLuaFile() ENT.Type = "anim" ENT.Model = Model("models/weapons/w_eq_flashbang_thrown.mdl") AccessorFunc( ENT, "thrower", "Thrower") function ENT:SetupDataTables() self:NetworkVar("Float", 0, "ExplodeTime") end function ENT:Initialize() self:SetModel(self.Model) self:...
nilq/small-lua-stack
null
local cjson = require("cjson") local io = io local ngx = ngx local table = table local type = type local next = next local pcall = pcall local M = {} require("foxcaves.module_helper").setmodenv() function M.register_shutdown(func) if not ngx.ctx.shutdown_funcs then ngx.ctx.shutdown_funcs = {} end ...
nilq/small-lua-stack
null
-- include useful files u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "utils.lua") u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "common.lua") u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "commonpatterns.lua") extra = 0 level = 1 incrementTime = 5 achievementUnloc...
nilq/small-lua-stack
null
local addonName, wc = ... --公共函数 --输出,自动解定身减速,考虑延迟,弃用 function dps_old(cost, mana) if not wc.strongControl and wc.enoughMana(mana) and (wc.needUnroot() or wc.ableShift() and not wc.enoughEnergywithNextTick(cost)) then SetCVar('autoUnshift', 1) else SetCVar('autoUnshift', 0) end end --输出,自动解定身减速,考...
nilq/small-lua-stack
null
local KUI, E, L, V, P, G = unpack(select(2, ...)) local KS = KUI:GetModule("KuiSkins") local S = E:GetModule("Skins") -- Cache global variables -- Lua functions local _G = _G local select = select -- WoW API -- Global variables that we don't cache, list them here for the mikk's Find Globals script -- GLOBALS: local ...
nilq/small-lua-stack
null
-- lua-lru, LRU cache in Lua -- Copyright (c) 2015 Boris Nagaev -- See the LICENSE file for terms of use. local cut local setNewest local del local makeFreeSpace local mynext local lru = {} lru.__index = lru lru.__pairs = function() return mynext, nil, nil end function lru.new(max_size, max_bytes) local self = set...
nilq/small-lua-stack
null
-- Copyright (C) 2017 Deyan Dobromirov -- Signal processing functionalities library if not debug.getinfo(3) then print("This is a module to load with `local signals = require('signals')`.") os.exit(1) end local tonumber = tonumber local tostring = tostring local type = type local se...
nilq/small-lua-stack
null
object_static_structure_general_waypoint_personal_white = object_static_structure_general_shared_waypoint_personal_white:new { } ObjectTemplates:addTemplate(object_static_structure_general_waypoint_personal_white, "object/static/structure/general/waypoint_personal_white.iff")
nilq/small-lua-stack
null
-- -*- mode: lua; tab-width: 2; indent-tabs-mode: 1; st-rulers: [70] -*- -- vim: ts=4 sw=4 ft=lua noet --------------------------------------------------------------------- -- @author Daniel Barney <daniel@pagodabox.com> -- @copyright 2014, Pagoda Box, Inc. -- @doc -- -- @end -- Created : 30 Jan 2015 by Daniel Barney...
nilq/small-lua-stack
null
local openssl = require'openssl' local csr,bio,ssl = openssl.csr,openssl.bio, openssl.ssl local sslctx = require'sslctx' _,_,opensslv = openssl.version(true) host = arg[1] or "127.0.0.1"; --only ip port = arg[2] or "8383"; loop = arg[3] and tonumber(arg[3]) or 100 local params = { mode = "server", protocol = "t...
nilq/small-lua-stack
null
local API = {} local table_insert = table.insert local ipairs = ipairs local type = type local tostring = tostring local cjson = require("cjson") local utils = require("orange.utils.utils") local orange_db = require("orange.store.orange_db") local redirect_db = require("orange.plugins.redirect.redirect_db") API["/redi...
nilq/small-lua-stack
null
RegisterCommandSuggestion({ 'me', 'do' }, 'Provide information or an action for others around you.', { { name = 'action/information', help = 'The action or information to disclose.' } }) RegisterCommandSuggestion({ 'ooc', 'global' }, 'Send a global out of character message.', { { name = 'message', help = 'The m...
nilq/small-lua-stack
null
require("mod.ffhp_matome.data.chip") require("mod.ffhp_matome.data.theme")
nilq/small-lua-stack
null
return { sourceName = 'luacheck', command = 'luacheck', debounce = 100, args = { '--codes', '--no-color', '--quiet', '-' }, offsetLine = 0, offsetColumn = 0, formatLines = 1, formatPattern = { [[^.*:(\d+):(\d+):\s\(([W|E])\d+\)\s(.*)(\r|\n)*$]], { line = 1, column = 2, security = 3, message = { ...
nilq/small-lua-stack
null
return function(lumiere,mui) local eztask = lumiere:depend "eztask" local lmath = lumiere:depend "lmath" local class = lumiere:depend "class" local gel = lumiere:depend "gel" local radio_button=gel.class.element:extend() function radio_button:__tostring() return "radio_button" end funct...
nilq/small-lua-stack
null
data:extend ({ -- Special --teleport-effect { type = "explosion", name = "pre-teleport-effect", flags = {"not-on-map"}, animations = { { filename = "__morebobs__/graphics/entity/teleport/teleport-effect.png", priority = "extra-high", width = 48, height = 64, frame_count = 1, li...
nilq/small-lua-stack
null
QhunUnitHealth.TargetOfTargetUnitFrame = {} QhunUnitHealth.TargetOfTargetUnitFrame.__index = QhunUnitHealth.TargetOfTargetUnitFrame function QhunUnitHealth.TargetOfTargetUnitFrame.new(uiInstance) -- call super class local instance = QhunUnitHealth.AbstractUnitFrame.new( uiInstance, "tar...
nilq/small-lua-stack
null
local TalentPlanner = {} --[[ TODO: actual character points on TalentFrame ]]-- TalentPlanner.options = { learningEnabled = true, allowVirtualBuild = false, -- allows the planner to remove points actually assigned for planning purposes state = false, assumedLevel = 60 } TalentPlanner.data = {} Talen...
nilq/small-lua-stack
null
local null_ls = requirePlugin("null-ls") if not null_ls then return end local formatting = null_ls.builtins.formatting local diagnostics = null_ls.builtins.diagnostics local code_actions = null_ls.builtins.code_actions null_ls.setup({ debug = true, sources = { -- frontend -- diagnostics.eslint_d, --...
nilq/small-lua-stack
null
local function unityLuaSearcher(name) if _G["__gamemodules_lua__" .. name] ~= nil then return assert(load(_G["__gamemodules_lua__" .. name].text)) end end table.insert(package.searchers, 2, unityLuaSearcher)
nilq/small-lua-stack
null
local ai_controller = {} function ai_controller:load(world, movables) self.world = world self.movables = movables self.player = movables[1] self.frequency = 15 self.counter = 0 end function ai_controller:update(dt) self.counter = self.counter + 1 if self.counter > self.frequency then self.counter = 0 f...
nilq/small-lua-stack
null
-------------------------------- -- @module TransitionProgress -- @extend TransitionScene -- @parent_module cc -------------------------------- -- -- @function [parent=#TransitionProgress] create -- @param self -- @param #float t -- @param #cc.Scene scene -- @return TransitionProgress#TransitionProgress...
nilq/small-lua-stack
null
local HOTKEY = "F4" local TOGGLE_CMD = "togglets" local TEXTURE_FILENAME = "img/arrow_ts.png" local MAX_DIST = 60 local g_Root = getRootElement() local g_ResRoot = getResourceRootElement(getThisResource()) local g_Me = getLocalPlayer() local g_SmoothList = {} -- {player = rrz} local g_AllPlayers = {} local ...
nilq/small-lua-stack
null
local present, gitsigns = pcall(require, 'gitsigns') if not present then require('vima.utils').notify_missing('gitsigns.nvim') return end local on_attach = function(bufnr) require('vima.plugins.which-key').setup_gitsigns_mappings(gitsigns, bufnr) end gitsigns.setup({ on_attach = on_attach, signs = { add...
nilq/small-lua-stack
null
local configs = require 'nvim_lsp/configs' local util = require 'nvim_lsp/util' local name = "rnix" local function make_installer() local P = util.path.join local install_dir = P{util.base_install_dir, name} local bin = P{install_dir, "bin", "rnix-lsp"} local cmd = {bin} local X = {} function X.install(...
nilq/small-lua-stack
null
--# selene: allow(unused_variable) ---@diagnostic disable: unused-local -- This sub-module provides access to the current location set configuration settings in the system's dynamic store. ---@class hs.network.configuration local M = {} hs.network.configuration = M -- Returns the name of the computeras specified in t...
nilq/small-lua-stack
null
config = {} function reload_config() local path = load('lspconfig').util.root_pattern("nvim.lua")(fn.expand('%:p')) if path then config = loadfile(path..'/nvim.lua')() end end function merge_config(root, tbl) return table.merge(tbl, config[root] or {}) end reload_config()
nilq/small-lua-stack
null
--[[ Made for 0.9.21 Copyright (C) 2012 Vatten 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, d...
nilq/small-lua-stack
null
---------------------------------------------------------- -- Load RayUI Environment ---------------------------------------------------------- RayUI:LoadEnv("Skins") local S = _Skins local function LoadSkin() S:SetBD(GossipFrame) GossipFrame:DisableDrawLayer("BORDER") GossipFrameInset:DisableDrawLayer("BORDER")...
nilq/small-lua-stack
null
-- this test uses the official JSON schema test suite: -- https://github.com/json-schema-org/JSON-Schema-Test-Suite local json = require 'cjson' json.decode_array_with_array_mt(true) local jsonschema = require 'resty.ljsonschema' -- the full support of JSON schema in Lua is difficult to achieve in some cases -- so so...
nilq/small-lua-stack
null
local t = {} for line in io.lines() do table.insert(t, line) end s = table.concat(t, '\n') .. '\n'
nilq/small-lua-stack
null
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by Administrator. --- DateTime: 2020/4/22 18:17 --- function room_init(pid,rid) rooms[pid] = rid for key, value in pairs(rooms) do print(key,value) end print("init room ", pid) end function player_init(pid,playerdata) pri...
nilq/small-lua-stack
null
function test() local a, b = 3301, 5 return a >> b end jit("compile", test) local res = test() assert(res == 3301 >> 5) --[[ function <../tests/24_OP_SHR.lua:1,4> (5 instructions at 0x1f47590) 0 params, 3 slots, 0 upvalues, 2 locals, 2 constants, 0 functions 1 [2] LOADK 0 -1 ; 3301 2 [2] LOADK 1 -2 ...
nilq/small-lua-stack
null
---@class ToyBoxInfo C_ToyBoxInfo = {} ---@param itemID number function C_ToyBoxInfo.ClearFanfare(itemID) end ---@param itemID number ---@return bool needsFanfare function C_ToyBoxInfo.NeedsFanfare(itemID) end
nilq/small-lua-stack
null
require("config-local").setup({ -- Default configuration (optional) config_files = { ".nvimrc.lua", ".nvimrc" }, -- Config file patterns to load (lua supported) -- hashfile = vim.fn.stdpath("data") .. "/config-local-hashfile", -- Where the plugin keeps files data -- autocommands_create = false, -- Create autocomman...
nilq/small-lua-stack
null
-- Copyright (C) 2017 yushi studio <ywb94@qq.com> -- Licensed to the public under the GNU General Public License v3. require "luci.http" require "luci.dispatcher" local m, sec, o local encrypt_methods = { "table", "rc4", "rc4-md5", "rc4-md5-6", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-1...
nilq/small-lua-stack
null
local files = { [1] = { "client", "https://raw.githubusercontent.com/CoolMan119/HousePost/master/client.lua" }, [2] = { "server", "https://raw.githubusercontent.com/CoolMan119/HousePost/master/server.lua" } } if term.isColor() == false then print("Sorry, But you need a...
nilq/small-lua-stack
null
-- 'Class' representing a floor of a subfactory with individual assembly lines Floor = {} function Floor.init(creating_line) local floor = { level = 1, -- top floor has a level of 1, it's initialized with Floor.init(nil) origin_line = nil, -- set below, only if level > 1. The line this subfloor i...
nilq/small-lua-stack
null
--- === TextClipboardHistory === --- --- Keep a history of the clipboard, only for text entries --- --- Originally based on [code by VFS](https://github.com/VFS/.hammerspoon/blob/master/tools/clipboard.lua), but with many changes and some contributions and inspiration from [asmagill](https://github.com/asmagill/hammers...
nilq/small-lua-stack
null
ix.randomitems.tables["event_anomaly_razortree"] = { {500, {"value_statue_cat"}}, {500, {"value_statue_horse"}}, {500, {"value_statue_lion"}}, {250, {"artifact_mementomori"}}, }
nilq/small-lua-stack
null
instrument { name = "Psychological Line" } period = input (28, "front.period", input.integer, 1) input_group { "front.ind.dpo.generalline", color = input { default = "#96ADBC", type = input.color }, width = input { default = 1, type = input.line_width } } input_group { "front.platform.baseline", ...
nilq/small-lua-stack
null
local _, ns = ... local AceGUI = LibStub("AceGUI-3.0") ns.backdropTemplate = select(4, GetBuildInfo()) > 90000 and "BackdropTemplate" ns.typeWidgets = {} local tremove = table.remove function ns.Confirm(text, callback) local root = AceGUI:Create("Window") root.sizer_se:Hide() root.sizer_s:Hide() ro...
nilq/small-lua-stack
null
object_tangible_furniture_city_flag_city_04 = object_tangible_furniture_city_shared_flag_city_04:new { } ObjectTemplates:addTemplate(object_tangible_furniture_city_flag_city_04, "object/tangible/furniture/city/flag_city_04.iff")
nilq/small-lua-stack
null
return {'detachement','detachementscommandant','detacheren','detachering','detacheringsbedrijf','detacheringsbureau','detacheringsovereenkomst','detail','detailfoto','detailhandel','detailhandelaar','detailhandelconcern','detailhandelsactiviteit','detailhandelsbedrijf','detailhandelsconcern','detailhandelsketen','detai...
nilq/small-lua-stack
null
local fn = vim.fn local opt = vim.opt local map = vim.api.nvim_set_keymap vim.bo.expandtab = true vim.bo.shiftwidth = 2 vim.bo.softtabstop = 2 opt.scrolloff = 999 vim.g.mapleader = "," map("n", "<Leader>w", ":write<CR>", { noremap = true }) map("n", "<Leader>q", ":q<CR>", { noremap = true }) -- map('n', '<Esc>', "<C...
nilq/small-lua-stack
null
-- mod_push_appserver_fcm -- -- Copyright (C) 2017 Thilo Molitor -- -- This file is MIT/X11 licensed. -- -- Submodule implementing FCM communication -- -- imports -- unlock prosody globals and allow ltn12 to pollute the global space -- this fixes issue #8 in prosody 0.11, see also https://issues.prosody.im/1033 prosod...
nilq/small-lua-stack
null
local buyMenu local lastHouse AddEvent("OnTranslationReady", function() buyMenu = Dialog.create(_("buy_house"), _("house_buy_text", _("currency_symbol")), _("buy"), _("cancel")) end) AddRemoteEvent("ShowHouseBuyDialog", function(house, id, price) lastHouse = house Dialog.setVariable(buyMenu, "price",...
nilq/small-lua-stack
null
-- a timer to dynamically set the awesome window manager background -- every 1 second. -- -- the background color is based on the hexadecimal value of the current -- time mapped to rgb. this algorithm mimics the same effect as this -- JS version: -- -- http://colorclock.nogoodatcoding.com/ -- -- which is in turn based...
nilq/small-lua-stack
null
PoisonDartTrapNpc = { click = function(block, npc) local animation = 1 if (block.blType == BL_PC) then if block.state == 1 then return end block:sendMinitext("You stepped on a trap!") if not block:canPK(block) then return end end block.attacker = npc.owner removeTrapItem(npc) npc:...
nilq/small-lua-stack
null
description "Ragdoll when Shot (by Scott)" -- Server -- Client client_scripts { "client.lua", --"client2.lua", }
nilq/small-lua-stack
null
--单个玩家的逻辑 local player = {} player.pid = 0 player.nickName = "" player.ip = "" player.sex = "" player.headimgurl = "" player.roomId = 0 player.site = 0 player.score = 0 player.totalScore = 0 player.winCount = 0 player.zhongzhuangCount = 0 player.dianpaoCount = 0 player.waitStartGame = 0 --0为等待client发送开始通知...
nilq/small-lua-stack
null
local u_acute_utf8 = string.char(195)..string.char(186) -- C3 BA local u_acute_latin1 = string.char(250) -- FA describe("Lua object model:", function() local lom before_each(function() lom = require "lxp.lom" end) -- run all tests twice; using plain and threat protected parser for _, parser in ipairs { "lxp"...
nilq/small-lua-stack
null
local VirtualUser = game:GetService("VirtualUser") game:GetService("Players").LocalPlayer.Idled:connect(function() VirtualUser:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame) wait(1) VirtualUser:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame) end) local ReplicatedStorage = game:GetSe...
nilq/small-lua-stack
null
local IUiElement = require("api.gui.IUiElement") local TopicWindow = require("api.gui.TopicWindow") local VisualAIPlanGrid = require("mod.visual_ai.api.gui.VisualAIPlanGrid") local Draw = require("api.Draw") local Color = require("mod.extlibs.api.Color") local UiShadowedText = require("api.gui.UiShadowedText") local V...
nilq/small-lua-stack
null
math.randomseed(tick() * math.random(-100000, 100000)) --[[------------------------------------------------------------------- ---------------------- Information & Licensing ------------------------ ----------------------------------------------------------------------- PROGRAMMER(S): UnlimitedKeeping / Avenze OWNE...
nilq/small-lua-stack
null
---------------------------------- -- Area: Norg -- NPC: Paleille -- Type: Item Deliverer -- !pos -82.667 -5.414 52.421 252 -- ----------------------------------- local ID = require("scripts/zones/Norg/IDs"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) ...
nilq/small-lua-stack
null
-- Copyright 2006-2014 Mitchell mitchell.att.foicica.com. See LICENSE. -- Adapted from php.lua by Josh Girvin <josh@jgirvin.com> -- PHP/Hack LPeg lexer. local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V local M = {_NAME = 'hack'} -- Whitespac...
nilq/small-lua-stack
null
local pkg = {} function pkg.serializeTable0(val, name, depth) depth = depth or 0 local res = {} if name then if type(name) == "string" then table.insert(res, string.rep(" ", depth) .. string.format("[%q]=", name)) elseif type(name) == "number" then table.insert(res...
nilq/small-lua-stack
null
-- Dirt Monster by PilzAdam foodchain:register_mob("foodchain:dirt_monster", { type = "monster", passive = false, attack_type = "dogfight", damage = 2, hp_min = 3, hp_max = 27, armor = 100, collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4}, visual = "mesh", mesh = "mobs_stone_monster.b3d", textures = {"mobs_d...
nilq/small-lua-stack
null
_ENV=namespace "game" using_namespace "luaClass" using_namespace "container" ---@class BattleStatistics class("BattleStatistics"){ CLASS_DEBUG(false); } function BattleStatistics:BattleStatistics(sprite) self.sprite=sprite --分数 self.scores=100 --攻击次数 self.attackCount=0 --受击次数 self.hitCo...
nilq/small-lua-stack
null
require "Scripts/Levels/ILevel" require "Scripts/Enemies/FireSpinner" require "Scripts/Enemies/Hopper" require "Scripts/Enemies/BouncingBomb" Tutorial = { _name = "Tutorial", _tmxPath = "Levels/Tutorial.tmx", _rows = 10, _columns =10, _heroX = 5, _heroY = 5, _enemies = {}, _beatPause = 0.5, _beatBuffer = 0.1...
nilq/small-lua-stack
null
-- -- Xbox Series X/S tests -- Copyright Blizzard Entertainment, Inc -- local p = premake local suite = test.declare("scarlett_globals") local vc2010 = p.vstudio.vc2010 -- -- Setup -- local wks, prj function suite.setup() p.action.set("vs2019") wks, prj = test.createWorkspace() end local function prepa...
nilq/small-lua-stack
null
---------------------------------------------------------------- -- API Ban Sync - A Simple FiveM Script, Made By Jordan.#2139 -- ---------------------------------------------------------------- config = { APIName = "https://protectthedevs.com", -- The name of your api apiURL = 'https://protectthedevs.co...
nilq/small-lua-stack
null
-- app.config.custom中的配置会覆盖*.config,可以通过skynet.getenv获取,并且支持值为table, return { --[[ db_type = "redis", db_is_cluster = false, db_config = { host = "127.0.0.1", port = 6000, auth = "redispwd", }, ]] --[[ db_type = "redis", db_is_cluster = true, db_config = ...
nilq/small-lua-stack
null
-- @AlexOp_ was here local tree local max_dist = 500 local min_dist = 10 local width, height = 400, 400 local Branch = require(script.Branch) local Leaf = require(script.Leaf) local Tree = {} Tree.__index = Tree function Tree.new() local self = setmetatable({ leaves = {}, branches = {} },Tree) for i = 1, 500...
nilq/small-lua-stack
null
vim.cmd [[packadd packer.nvim]] local configs = { clang_format = function() require('plugins/clang-format') end, cmp = function() require('plugins/cmp') end, commenter = function() require('plugins/commenter') end, cokeline = function() require('plugins/cokeline') end, cpp_enhanced_highlight = function() req...
nilq/small-lua-stack
null
local BasePlugin = require "kong.plugins.base_plugin" local singletons = require "kong.singletons" local constants = require "kong.constants" local meta = require "kong.meta" local kong = kong local server_header = meta._SERVER_TOKENS local DEFAULT_RESPONSE = { [300] = "Multiple Choices", [301] = "Moved Permane...
nilq/small-lua-stack
null
-- Some concepts borrowed from https://github.com/zzamboni/dot-hammerspoon hyper = {"ctrl", "alt", "cmd", "shift"} hs.logger.defaultLogLevel="info" hs.window.animationDuration = 0 hs.loadSpoon("SpoonInstall") spoon.SpoonInstall.repos.miro = { url = "https://github.com/miromannino/miro-windows-manager", desc ...
nilq/small-lua-stack
null
local _, T = ... local L = T.L local cfgFrame = CreateFrame("Frame", nil, UIParent) -- Header local cfgFrameHeader = cfgFrame:CreateFontString("OVERLAY", nil, "GameFontNormalLarge") cfgFrameHeader:SetPoint("TOPLEFT", 15, -15) cfgFrameHeader:SetText("Requires Level X") -- Info text local cfgDescription =...
nilq/small-lua-stack
null
--Made by Skovsbøll#3650 RegisterNetEvent("revive") AddEventHandler("revive", function() local plyCoords = GetEntityCoords(GetPlayerPed(-1), true) ResurrectPed(GetPlayerPed(-1)) SetEntityHealth(GetPlayerPed(-1), 200) ClearPedTasksImmediately(GetPlayerPed(-1)) SetEntityCoords(GetPlayerPed(-1), plyCoords.x, plyCoor...
nilq/small-lua-stack
null
function onUse(cid, item, frompos, item2, topos) doTransformItem(item.uid,4008) doPlayerAddItem(cid, 2675, math.random(10)) doDecayItem(item.uid) return 1 end
nilq/small-lua-stack
null
--[[ HarvestHPTracker by: Chris Client-side tracking of HP of objects in the world. Put into a require() script, so that it's easy to access from anywhere. --]] local prop_HarvestManager = script:GetCustomProperty("_HarvestManager") local mgr = require(prop_HarvestManager) local API = {} local damaged...
nilq/small-lua-stack
null
-- NOTES: -- games that rely on custom model shaders are SOL -- -- for projectile lights, ttl values are arbitrarily -- large to make the lights survive until projectiles -- die (see ProjectileDestroyed() for the reason why) -- -- for "propelled" projectiles (rockets/missiles/etc) -- ttls should be the actu...
nilq/small-lua-stack
null
----------------------------------- -- Area: Cloister of Frost -- Mob: Shiva Prime -- Involved in Quest: Trial by Ice, Trial Size Trial by Ice ----------------------------------- mixins = {require("scripts/mixins/job_special")} ----------------------------------- function onMobSpawn(mob) tpz.mix.jobSpecial.config(...
nilq/small-lua-stack
null
superblt = false for _, mod in pairs(BLT and BLT.Mods:Mods() or {}) do if mod:GetName() == "SuperBLT" and mod:IsEnabled() then superblt = true break end end if superblt == false then if UpdateThisMod then UpdateThisMod:Add({ mod_id = 'Real Weapon Names', data = { modworkshop_id = 19958, dl_url...
nilq/small-lua-stack
null
local combat = Combat() combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) function onCreateMagicWall(creature, tile) local item = Game.createItem(Game.getWorldType() == WORLD_TYPE_NO_PVP and ITEM_MAGICWALL_SAFE or ITEM_MAGICWALL, 1, tile) item:setAttribute(ITEM_ATTRIBUTE_DURATION, math.random(14000,...
nilq/small-lua-stack
null
--- === plugins.finalcutpro.browser.csv === --- --- Save Browser to CSV local require = require --local log = require "hs.logger".new "index" local fcp = require "cp.apple.finalcutpro" local i18n = require "cp.i18n" local tools = require "cp.tools" local dialog ...
nilq/small-lua-stack
null
local dependency2 = require("dependency2") local otherfile = require("otherfile") return { f1 = function() return dependency2.f2() end, otherFileFromDependency1 = otherfile.someFunc }
nilq/small-lua-stack
null
setBufferPosY(60480) lookDown() turnOnBorders() turnOffBorders() print(getBufferBB()) do clearTrace() local minx,miny,maxx,maxy = getBufferBB() print(minx,miny,maxx,maxy) print((miny+maxy)/2) print((maxy-miny)/2 - maxy) end setBufferName("buffcmdtest.lua") 0
nilq/small-lua-stack
null
ITEM.name = "Pouch" ITEM.desc = "A small ammo pouch" ITEM.model = "models/weapons/w_eq_defuser.mdl" ITEM.price = 10 ITEM.width = 1 ITEM.height = 1 ITEM.invWidth = 2 ITEM.invHeight = 2
nilq/small-lua-stack
null
-------------------------------------------------------------------------- -- This class generates a progress bar. To use do: -- -- local pb = ProgressBar:new{stream = io.stdout, max = N, barWidth=100} -- for i = 1, N do -- pb:progress(i) -- -- stuff you want to show progress on. -- ...
nilq/small-lua-stack
null
local uv = {} uv.fs = require 'uv.fs' uv.http = require 'uv.http' uv.loop = require 'uv.loop' uv.parallel = require 'uv.parallel' uv.process = require 'uv.process' uv.system = require 'uv.system' uv.timer = require 'uv.timer' uv.url = require 'uv.url' return uv
nilq/small-lua-stack
null
-- See LICENSE for terms -- wtf? fix for this error: -- Error loading file PackedMods/*****/Code/Script.lua: PackedMods/*****/Code/Script.lua:1: syntax error near '<\1>' -- make it do nothing instead of breaking something SupplyGridFragment.RandomElementBreakageOnWorkshiftChange = empty_func
nilq/small-lua-stack
null
--[[---------------------------------------------------------------------------- This file is part of Friday Night Funkin' Rewritten by HTV04 ------------------------------------------------------------------------------]] audio = { playSound = function(sound) sound:stop() sound:play() end } graphics...
nilq/small-lua-stack
null
local function generate_sources(null_ls) local sources = { null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.rustfmt, null_ls.builtins.formatting.stylua, } if require("language.lsp.which").path_exists("markdownlint") then table.insert(sources, null_ls.builtin...
nilq/small-lua-stack
null
local assets= { Asset("ANIM", "anim/nightmaresword.zip"), Asset("ANIM", "anim/swap_nightmaresword.zip"), } local function onfinished(inst) inst:Remove() end local function onequip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_nightmaresword", "swap_nightmaresword") owner.AnimStat...
nilq/small-lua-stack
null
local mt = getmetatable("") mt.__call = function() return "works" end local str = "test" assert.Equal("works", str()) mt.__call = nil
nilq/small-lua-stack
null
--[[ MIT License Copyright (c) 2019 nasso <nassomails ~ at ~ gmail {dot} com> 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, ...
nilq/small-lua-stack
null
--[[ Copyright 2021 Manticore Games, Inc. 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, distrib...
nilq/small-lua-stack
null
local usd = {} usd.vector3 = function(source) local x, y, z = source:match("^%(([-%d.]+),([-%d.]+),([-%d.]+)%)$") return Vector3.new(tonumber(x), tonumber(y), tonumber(z)) end usd.color3 = function(source) local x, y, z = source:match("^%(([%d.]+),([%d.]+),([%d.]+)%)$") return Color3.new(tonumber(x), tonumber(y),...
nilq/small-lua-stack
null
-- ホムンクルスタイプ取得 -- ホム選択時の単純な判定用で、細かい判定はHomunculus内へ function GetHomunculusType(id) return GetV(V_HOMUNTYPE, id) end -- typeやその他の条件を加味して、適切なAIを選択 function CreateHomunculus(id) local type = GetHomunculusType(id) local homu = Homunculus -- ここにホム選択ロジック if type == FILIR or type == FILIR2 or type == FILIR_H or typ...
nilq/small-lua-stack
null
CompMod:ChangeAlienTechmapTech(kTechId.Spores, 8, 10) CompMod:ChangeResearch(kTechId.Spores, kTechId.BioMassSix, kTechId.None, kTechId.AllAliens)
nilq/small-lua-stack
null
v1 = vessel.get_interface('srb1') v2 = vessel.get_interface('srb2') note = oapi.create_annotation() note:set_pos (0.3,0.05,0.9,0.95) note:set_colour ({r=1,g=0.6,b=0.2}) note2 = oapi.create_annotation() note2:set_pos (0.3,0.8,0.9,1) note2:set_colour ({r=1,g=0.7,b=0.3}) intro = 'Space physics: Spin stabilisation' not...
nilq/small-lua-stack
null
-- Tests for moving the hero nh.parse_config("OPTIONS=number_pad:0"); nh.parse_config("OPTIONS=runmode:teleport"); local POS = { x = 10, y = 05 }; local number_pad = 0; function initlev() nh.debug_flags({mongen = false, hunger = false, overwrite_stairs = true }); des.level_flags("noflip"); des.reset_level(...
nilq/small-lua-stack
null
--////////////////////////////////////////////////////////////////////// --************************ --PlayerTurnEvent --************************ PlayerTurnEvent = {} PlayerTurnEvent.__index = PlayerTurnEvent setmetatable(PlayerTurnEvent, {__index = Event}) function PlayerTurnEvent.new(turnPlayer) local self = setm...
nilq/small-lua-stack
null
Lottery = {} Lottery.__index = Lottery function Lottery.new() local self = {} setmetatable(self, Lottery) -- list of entries in the lottery. Elements are of the form self._entries = {} -- total number of lots in the pool -- Lots can come in decimals as well, like 0.02 self._lotsTotal = 0 ...
nilq/small-lua-stack
null
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include('shared.lua') local attachChance = 0.3 function ENT:Initialize() self:PhysicsInit( SOLID_VPHYSICS ) self:SetMoveType( MOVETYPE_VPHYSICS ) self:SetSolid( SOLID_VPHYSICS ) self:SetCollisionGroup( COLLISION_GROUP_DEBRIS ) self.DoneSim = fal...
nilq/small-lua-stack
null