content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
-- Copyright (c) 2015-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. local Bullet, par...
nilq/small-lua-stack
null
------------------------------------------------- -- Calendar Widget for Awesome Window Manager -- Shows the current month and supports scroll up/down to switch month -- More details could be found here: -- https://github.com/streetturtle/awesome-wm-widgets/tree/master/calendar-widget -- @author Pavel Makhov -- @copyr...
nilq/small-lua-stack
null
endpointMap = { ["367abb81-9844-35f1-ad32-98f038001003"] = "svcctl", ["86d35949-83c9-4044-b424-db363231fd0c"] = "ITaskSchedulerService", ["378e52b0-c0a9-11cf-822d-00aa0051e40f"] = "sasec", ["1ff70682-0a51-30e8-076d-740be8cee98b"] = "atsvc", ["0a74ef1c-41a4-4e06-83ae-dc74fb1cdd53"] = "idletask", ...
nilq/small-lua-stack
null
local def = { name = "bt_mobs:bleeder", nametag = "Bleeder", stats = { hp = 15, lifetime = 500, can_jump = 1, can_swim = true, hostile = true, }, modes = { idle = {chance=0.5}, walk = {chance=0.5, moving_speed=1.0}, follow = {}, }, combat = { attack_damage = 3, attack_speed = 0.8, attack_ra...
nilq/small-lua-stack
null
---@meta --- ---Can simulate 2D rigid body physics in a realistic manner. This module is based on Box2D, and this API corresponds to the Box2D API as closely as possible. --- ---@class love.physics love.physics = {} --- ---Returns the two closest points between two fixtures and their distance. --- ---@param fixture1 ...
nilq/small-lua-stack
null
--- --- ColaFramework --- Copyright © 2018-2049 ColaFramework 马三小伙儿 --- ObjectPool的使用示例 --- --- ObjectPool Test local LOjectPool = require("Common.Collections.LObjectPool") local index = 0 local createAction = function() local gameobj = UnityEngine.GameObject.New() gameobj.na...
nilq/small-lua-stack
null
local IEventEmitter = require("api.IEventEmitter") local IMapObject = require("api.IMapObject") local IModdable = require("api.IModdable") local IObject = require("api.IObject") -- A feat is anything that is a part of the map with a position. Feats -- also include traps. local IFeat = class.interface("IFeat", {}, { IM...
nilq/small-lua-stack
null
--[[ < CATHERINE > - A free role-playing framework for Garry's Mod. Development and design by L7D. Catherine 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) an...
nilq/small-lua-stack
null
-- -- Oath official mod, by permission of Leder Games. -- -- Created and maintained by AgentElrond. Latest update: 2020 -- -- This file contains card data so that the main script file can be shorter. -- function onLoad() cardsTable = { -- Site cards have their own save ID numbering system except for 255, which...
nilq/small-lua-stack
null
ModLoader.SetupFileHook("lua/Gamerules.lua", "lua/ModPanelsPlusPlus/Gamerules.lua", "post") ModLoader.SetupFileHook("lua/ModPanels/FileHooks.lua", true, "halt") -- Load Shine hooks ModLoader.SetupFileHook( "lua/shine/core/shared/hook.lua", "lua/shine/hook.lua", "post" ) kModPanels = {} local dot = string.byte('.') l...
nilq/small-lua-stack
null
Background = { } -- private variables local background -- public functions function Background.init() background = g_ui.displayUI('background.otui') background:lower() local clientVersionLabel = background:getChildById('clientVersionLabel') clientVersionLabel:setText('OTClient ' .. g_app.getVersion() .. '\n'...
nilq/small-lua-stack
null
BuildEnv(...) Collect = Addon:NewClass('Collect') Collect._Meta.__lt = function(a, b) return a:GetStamp() > b:GetStamp() end function Collect:Constructor(collectType, id, stamp) self.collectType = collectType self.id = id self.stamp = stamp end function Collect:GetCollectType() ...
nilq/small-lua-stack
null
if node.bootreason()==1 then tmr.alarm(0,1000,0,function() require("main") end) else require("main") end
nilq/small-lua-stack
null
function on_activate(parent, ability) local targets = parent:targets():hostile():touchable() local targeter = parent:create_targeter(ability) targeter:set_selection_touchable() targeter:add_all_selectable(targets) targeter:add_all_effectable(targets) targeter:activate() end function on_target_...
nilq/small-lua-stack
null
return {'ypresien'}
nilq/small-lua-stack
null
local names = require "personnameutil" local firstNamesMale = names.unitedKingdom.english.firstNamesMale local firstNamesFemale = names.unitedKingdom.english.firstNamesFemale local lastNames = names.unitedKingdom.english.lastNames function data() return { makeName = function (male) if (male) then return firstNa...
nilq/small-lua-stack
null
help("\tThis module sets up the OSCAR modules subsystem.") whatis("Description: Sets up the OSCAR modules subsystem.") local mroot = os.getenv("MODULEPATH_ROOT") local oscarDir = pathJoin(mroot,"Oscar") prepend_path("MODULEPATH", oscarDir) local a = {} for file in lfs.dir(oscarDir) do if (file ~= "." and file ~= "...
nilq/small-lua-stack
null
require "util" require "config" local TrainCounter = {} TrainCounter.__index = TrainCounter TrainCounter.version = 1 function TrainCounter.new(counter_entity) local self = setmetatable({}, TrainCounter) self.type = "TrainCounter" self.version = TrainCounter.version counter_entity.operable = false self.coun...
nilq/small-lua-stack
null
-- note: this example only works with luajit local win = am.window{letterbox = false} ffi.cdef[[ typedef struct { float x, y; } vec2; typedef struct { float r, g, b, a; } color; ]] local n = 200000 local sz = ffi.sizeof("vec2[?]", n) local vbuf = am.buffer(sz) local verts = ffi.cast("vec2*", vbuf.dataptr) local vel...
nilq/small-lua-stack
null
--[[ Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. ]]-- local tnt ...
nilq/small-lua-stack
null
root_dir = "../../" config_dir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" exe_dir = root_dir .. "bin/" .. config_dir .. "/%{prj.name}" obj_dir = root_dir .. "bin-obj/" .. config_dir .. "/%{prj.name}" workspace "PopHead" architecture "x86" location (root_dir) startproject "PopHead" confi...
nilq/small-lua-stack
null
-- source: https://gist.github.com/starwing/1757443a1bd295653c39 local tonumber = _G.tonumber local ffi = require("ffi") local math = require("math") if jit.os == "Windows" then ffi.cdef [[ unsigned __stdcall GetTickCount(void); ]] local lib = ffi.load "KERNEL32" gettime = lib.GetTickCo...
nilq/small-lua-stack
null
local http = require "socket.http" require "love.timer" http.TIMEOUT = 1 local channel1 = love.thread.getChannel( "downloaders_in" ) while true do if channel1:getCount()>0 then local uri = channel1:pop() if uri then local resp = http.request( uri ) or "Failed" local channel2 = love.thread.getChannel( "down...
nilq/small-lua-stack
null
--[[ @class Blend.story ]] local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).load(script) local RunService = game:GetService("RunService") local Blend = require("Blend") local Maid = require("Maid") local ValueObject = require("ValueObject") local Rx = requir...
nilq/small-lua-stack
null
function print ( msg, p, r, g, b ) return exports.NGMessages:sendClientMessage ( msg, p, r, g, b ) end function ejectPlayer ( p, _, nab ) if nab then if isPedInVehicle ( p ) then if getPedOccupiedVehicleSeat ( p ) == 0 then local ej = getPlayerFromNamePart ( nab ) local veh = getPedOccupiedVehicle ( p ) ...
nilq/small-lua-stack
null
---------------------------------------------------- --===================Aurelien=====================-- ---------------------------------------------------- ------------------------Lua------------------------- local DrawMarkerShow = true local DrawBlipTradeShow = true -- -900.0, -3002.0, 13.0 -- -800.0, -3002.0, 13...
nilq/small-lua-stack
null
Config = {} Config.Locale = 'en' Config.DoorList = { -- -- Mission Row First Floor -- -- Entrance Doors -- -- { -- -- textCoords = vector3(434.7, -982.0, 31.5), -- -- authorizedJobs = { 'police', 'offpolice' }, -- -- locked = false, -- -- distance = 2.5, -- -- doors = { -- -- { -- -- objName = ...
nilq/small-lua-stack
null
function GM:HandlePlayerNoClipping( ply, velocity ) if ( ply:GetMoveType() != MOVETYPE_NOCLIP || ply:InVehicle() ) then if ( ply.m_bWasNoclipping ) then ply.m_bWasNoclipping = nil ply:AnimResetGestureSlot( GESTURE_SLOT_CUSTOM ) if ( CLIENT ) then ply:SetIK( true ) end end return end if ( !ply....
nilq/small-lua-stack
null
local Syntactic_utils = { --Shift / Reduce Syntactic Table syntactic_table = function () --Creating the syntactic table from the LR(0) automaton local shift_reduce_table = {} for i = 1, 59 do shift_reduce_table[i] = {} end --Initializing the array shift_reduc...
nilq/small-lua-stack
null
--- Visual Display. -- A UTF-8 based text display. -- @module ROT.TextDisplay local ROT = require((...):gsub(('.[^./\\]*'):rep(1) .. '$', '')) local TextDisplay = ROT.Class:extend("TextDisplay") --- Constructor. -- The display constructor. Called when ROT.TextDisplay:new() is called. -- @tparam[opt=80] int w Width of ...
nilq/small-lua-stack
null
local ui, uiu, uie = require("ui").quick() local utils = require("utils") local threader = require("threader") local scener = require("scener") local fs = require("fs") local config = require("config") local sharp = require("sharp") local native = require("native") local scene = { name = "Threader Test" } local ...
nilq/small-lua-stack
null
TabView = setmetatable({}, TabView) TabView.__index = TabView TabView.__call = function() return "PauseMenu" end function TabView.New(title, subtitle, sideTop, sideMid, sideBot) local _data = { Title = title or "", Subtitle = subtitle or "", SideTop = sideTop or "", SideMid = si...
nilq/small-lua-stack
null
verbalScriptCheckShop = function(player, npc, speech) Tools.configureDialog(player, npc) local buyItems = {} local maxAmounts = {} local words = {} local itemName = "" for word in speech:gmatch("[%w\'%-%[%]]+") do table.insert(words, word) end if (words[1] == "i" and words[2] == "buy") then Tools.checkKa...
nilq/small-lua-stack
null
-- Routine for NPC "Chicken Chaser" loadRoutine = function(R, W) if (W:isConditionFulfilled("npc_chickenchaser", "dead")) then R:setDisposed() return end R:setTilePosition(15,12) R:setLooped(false) R:setReloadEnabled(true) if (W:isConditionFulfilled("npc_chickenchaser", "dies") an...
nilq/small-lua-stack
null
object_tangible_collection_rare_heavy_void = object_tangible_collection_shared_rare_heavy_void:new { gameObjectType = 8211,} ObjectTemplates:addTemplate(object_tangible_collection_rare_heavy_void, "object/tangible/collection/rare_heavy_void.iff")
nilq/small-lua-stack
null
--[[ AI Framework gamemode. This file contains the base AI Game mode with default settings. These settings are then overriden in every specified gamemode. Defaults: FixedDuration: No Duration: 0 NumPlayers: 1 FixedHeroes: Yes Heroes: npc_dota_hero_sven Starting level: 1 Starting gold: 625 ]] BaseAIGameMod...
nilq/small-lua-stack
null
local _, Jardo = ... oUF.Tags.Methods['jardo:shorthealth'] = function(unit) local cur = UnitHealth(unit) local max = UnitHealthMax(unit) return Jardo:round((cur / max) * 100, 1) .. "%" end oUF.Tags.Methods['jardo:health'] = function(unit) local cur = UnitHealth(unit) local max = UnitHealthMax(unit) retu...
nilq/small-lua-stack
null
import ('System') import ('Assignment') import ('Assignment.Movement') import ('Assignment.Entity') import ('Assignment.World') function enter(entity, world) local chaseEntities = world:EntitiesInArea(entity.Location, 100.0, EntityType.Herbivore) if chaseEntities.Count > 0 then local seek = Seek() seek.ChaseEnt...
nilq/small-lua-stack
null
local playerReducer = require('reducers/player') describe("player reducer", function() function initState() return playerReducer({}, {type = "__INIT__"}) end it("should change direction to UP", function() local state = initState() state.y = 32 local nextState = playerReduc...
nilq/small-lua-stack
null
-- Menu background "level" script -- Level dimensions playfieldWidth = 100.0; playfieldHeight = 100.0; -- Creates the level background function BackgroundCreate() starsCount = math.random(100,200); nebulaCount = math.random(8, 12); local bg = math.random(1,2); if(bg == 1) then nebula1_R = 0.1; ...
nilq/small-lua-stack
null
----------------------------------------------- -- battleaxe.lua -- Represents a battleaxe that a player can wield or pick up -- Created by NimbusBP1729 ----------------------------------------------- -- -- Creates a new battleaxe object -- @return the battleaxe object created return { hand_x = 9, hand_y = 40, f...
nilq/small-lua-stack
null
mpackage = "Cross Profile Communication"
nilq/small-lua-stack
null
local M = {} function M.get(defaults, user) vim.tbl_deep_extend('force', defaults, user) return defaults end return M
nilq/small-lua-stack
null
cflags{ '-std=c11', '-Wall', '-Wextra', '-Wpedantic', '-Wno-maybe-uninitialized', '-D _GNU_SOURCE', '-isystem $builddir/pkg/libtls-bearssl/include', '-isystem $builddir/pkg/ncurses/include', } pkg.deps = { 'pkg/libtls-bearssl/headers', 'pkg/ncurses/headers', } exe('catgirl', [[ buffer.c chat.c command.c co...
nilq/small-lua-stack
null
--[[ Desc: Rectangle Author: SerDing Since: 2017-07-28 21:54:14 Alter: 2020-09-11 11:37:50 ]] local _GRAPHICS = require("engine.graphics") local _Vector2 = require("utils.vector2") ---@class Engine.Graphics.Drawable.Rect local _Rect = require("core.class")() function _Rect:Ctor(x, y, w, h) self._x = x or 0 sel...
nilq/small-lua-stack
null
function onEvent(name, value1, value2) if name == 'play' then makeAnimatedLuaSprite('foxy3-play', 'foxy3-play', -950, -500); addAnimationByPrefix('foxy3-play', 'foxy3-play', 'idle'); addLuaSprite('foxy3-play', true); scaleObject('foxy3-play', 2.1, 2.1); objectPlayAnimation('foxy3-play', 'idle', tru...
nilq/small-lua-stack
null
----------------------------------- -- Area: West Ronfaure -- NPC: Adalefont -- !pos -176.000 -61.999 377.460 100 ----------------------------------- local ID = require("scripts/zones/West_Ronfaure/IDs") ----------------------------------- function onTrade(player, npc, trade) end function onTrigger(player, npc) ...
nilq/small-lua-stack
null
--[[ --=====================================================================================================-- Script Name: Set Ammo (command), for SAPP (PC & CE) Implementing API version: 1.11.0.0 Description: Set loaded|unloaded ammo for yourself (or others) Command Syntax: /setammo [player] [type] [ammo] V...
nilq/small-lua-stack
null
-- VARIABLES local module = { map = {}, background = {}, far_away = {}, --tile info list_tile_info = {}, nb_tile = 0, --background list_tile_info_back = {}, nb_tile_back = 0, --far away list_tile_info_fa = {}, nb_tile_fa = 0, --flag checkpoint flag = false, flagx = 0, flagy = 0, --m...
nilq/small-lua-stack
null
-- This script will be used for testing/debugging purposes in setting up some basic player storage. local MetaAbilityProgressionConstants_API = require(script:GetCustomProperty("MetaAbilityProgressionConstants_API")) local MetaAbilityProgressionUTIL_API = require(script:GetCustomProperty("MetaAbilityProgressionUTIL_AP...
nilq/small-lua-stack
null
local base_ui = require"module/gui/component/base_ui" local rectangle = require"module/graphics/rectangle" local utf8 = require"library/utf8_simple" local lksd = love.keyboard.isDown local function insert_str(str,pos,ins) return utf8.sub(str,0,pos)..ins..utf8.sub(str,pos + 1,utf8.len(str)) end local input = class...
nilq/small-lua-stack
null
local entity = {} entity["level"] = [[78]] entity["spellDeck"] = {} entity["spellDeck"][1] = [[Akasha Arts]] entity["spellDeck"][2] = [[]] entity["spellDeck"][3] = [[Ziodyne]] entity["spellDeck"][4] = [[]] entity["spellDeck"][5] = [[Bufudyne]] entity["spellDeck"][6] = [[]] entity["heritage"] = {} entity["heritage"][1] ...
nilq/small-lua-stack
null
local paseto = require "paseto.v2.core" local basexx = require "basexx" describe("v2 protocol core", function() describe("key generation", function() it("should generate a symmetric key", function() local symmetric = paseto.generate_symmetric_key() assert.equal(paseto.SYMMETRIC_KEY_BYTES, #symmetri...
nilq/small-lua-stack
null
-- Copyright 2013 by Till Tantau -- -- This file may be distributed an/or modified -- -- 1. under the LaTeX Project Public License and/or -- 2. under the GNU Public License -- -- See the file doc/generic/pgf/licenses/LICENSE for more information -- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd...
nilq/small-lua-stack
null
require 'xlua' local bench_utils = {} -- Read the last line of a command line output handler local read_last_line = function(handler) -- hack to get the last line of a file local last_line for line in handler:lines() do last_line = line end return last_line end -- Print one line to the output file local...
nilq/small-lua-stack
null
require("libs.lua.numbers") -- get the value of a nested table by accessing the keys passed as array function table.getMD(tabl,keyArray) local cur = tabl for _,key in pairs(keyArray) do cur = cur[key] if cur == nil then return nil end end return cur end -- set the value of a nested table by accessing the key...
nilq/small-lua-stack
null
--[[ The MIT License (MIT) Copyright (c) 2021, Milind Gupta 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, m...
nilq/small-lua-stack
null
Name = "epicikr" Colors = {"Cyan", "Black"} Plrs = game:GetService("Players") me = Plrs[Name] char = me.Character Modelname = "xGun" Toolname = "xGun" Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"} necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) sele...
nilq/small-lua-stack
null
local AdManager = {} local isDevice = (system.getInfo("environment") == "device") local platform = system.getInfo("platform") local platform_list = {"android", "ios"} local appodeal = nil local isInit = false local isBannerShown = false local isPlatformAllowed , getAppKey , adListener function AdManager.init(optio...
nilq/small-lua-stack
null
--[[ Generated by Scrooge version: ? rev: ? built at: ? --]] -- Service interfaces are not supported for Lua
nilq/small-lua-stack
null
local Gui = require 'utils.gui' local table = require 'utils.table' local gui_names = Gui.names local type = type local concat = table.concat local inspect = table.inspect local pcall = pcall local loadstring = loadstring local rawset = rawset local Public = {} local luaObject = {'{', nil, ", name = '", nil, "'}"} l...
nilq/small-lua-stack
null
#! /usr/bin/env lua local Serpent = require "serpent" local primes = {} for line in io.lines "primes.txt" do for prime in line:gmatch "%S+" do primes [#primes+1] = tonumber (prime) end end print (Serpent.dump (primes))
nilq/small-lua-stack
null
-- Foo is unused- only accessed circularly local foo = {} function foo.bar(baz) for i=1, 5 do local q for a, b, c in pairs(foo) do print(4) end end end foo[foo] = 1 foo[1] = foo foo[foo] = foo foo.meta = function() return function() print(foo) end end local x = 5 x = 6 x = 7; pri...
nilq/small-lua-stack
null
local api = { GAME_PAUSED=2, GAME_RUN=1, } local gta = require("gta") local ffi = require("ffi") ffi.cdef[[ typedef unsigned char undefined; typedef unsigned int ImageBaseOffset32; typedef unsigned char byte; typedef unsigned int dword; typedef long long longlong; typedef unsigned char uchar; typedef unsigned in...
nilq/small-lua-stack
null
local decoder = sjson.decoder() --test1 --data1='{"channel":{"id":846323,"latitude":"0.0","longitude":"0.0"}}' --decoder:write(data1) --ret= decoder:result() --print(ret["channel"]["id"]) --print(ret["channel"]["latitude"]) ...
nilq/small-lua-stack
null
--[[--------------------------------------------------------------------------- gName-Changer | SERVER SIDE CODE This addon has been created & released for free by Gaby Steam : https://steamcommunity.com/id/EpicGaby -----------...
nilq/small-lua-stack
null
----------------------------------- -- Area: Lower Jeuno -- NPC: Chetak -- Standard Merchant NPC ----------------------------------- local ID = require("scripts/zones/Lower_Jeuno/IDs") require("scripts/globals/shop") function onTrade(player, npc, trade) end function onTrigger(player, npc) local stock = { ...
nilq/small-lua-stack
null
local t = Def.ActorFrame{ Font("mentone","24px") .. { Name="Above"; -- was Artist InitCommand=function(self) self:y(-8):zoom(0.8):horizalign(left):vertalign(bottom):NoStroke():shadowlength(1):maxwidth(SCREEN_CENTER_X*0.75) end; SetCommand=function(self) local text = ""; if GAMESTATE:GetCurrentSong() t...
nilq/small-lua-stack
null
local status, treesitter = pcall(require, "nvim-treesitter.configs") if (not status) then return end treesitter.setup { ensure_installed = {}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages sync_install = false, -- install languages synchronously (only applied to `ensure_installed...
nilq/small-lua-stack
null
--[[ This is to test turtle scripts from IDEs outside of computercraft MIT License (MIT) 2014 Robert David Alkire II ]] turtle = {} local mockTurtle= turtle --- number or "unlimited" local fuelLevel = 50 turtle.popCount = 5 turtle.itms = {} local itms = turtle.itms local slts turtle.selected = 1 -- Slot Num local...
nilq/small-lua-stack
null
local unpack = unpack or table.unpack local lexer_search_path do local parts = { } for part in package.path:gmatch('[^;]+') do local _continue_0 = false repeat if not (part:match("%?%.lua$")) then _continue_0 = true break end table.insert(parts, (part:gsub("%?%.lua", "synta...
nilq/small-lua-stack
null
local glyphsets = { a = "abcdefghijklmnopqrstuvwxyz", A = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", d = "0123456789", s = " " } local glyphs = {} -- TODO support all utf8 private use areas function glyphs.getPrivateUsePoint(i) return string.char(238, 128, 129 + i) end local function subfn(op, num) num = tonumber(num...
nilq/small-lua-stack
null
local setmetatable = setmetatable local tostring = tostring local setfenv = setfenv local concat = table.concat local assert = assert local open = io.open local load = load local type = type local HTML_ENTITIES = { ["&"] = "&amp;", ["<"] = "&lt;", [">"] = "&gt;", ['"'] = "&quot;", ["'"] = "&#39;", ...
nilq/small-lua-stack
null
local util = {} function util.rgb(r, g, b) return {r / 255, g / 255, b / 255} end local floor, ceil = math.floor, math.ceil function util.round(x) if x % 1 >= 0.5 then return ceil(x) else return floor(x) end end function util.mapData(tab) local out = {} for k, v in pairs(tab) ...
nilq/small-lua-stack
null
local symbol = {} _G.LV_SYMBOL_AUDIO = "\xef\x80\x81"-- 61441, 0xF001 _G.LV_SYMBOL_VIDEO = "\xef\x80\x88"-- 61448, 0xF008 _G.LV_SYMBOL_LIST = "\xef\x80\x8b"-- 61451, 0xF00B _G.LV_SYMBOL_OK = "\xef\x80\x8c"-- 61452, 0xF00C _G.LV_SYMBOL_CLOSE = "\xef\x...
nilq/small-lua-stack
null
use_lightsys = 0 -- v.gravity = btVector3(0,0,0) p = Plane(0,1,0) p.col = "#333333" p.pre_sdl = [[ plane { <0,1,0>,0]] if (use_lightsys == 1) then p.post_sdl = [[ pigment{ checker rgb ReferenceRGB(Gray20) rgb ReferenceRGB(Gray60) } } ]] else p.post_sdl = [[ pigment { checker rgb <...
nilq/small-lua-stack
null
x = 10 local i = 1 -- local to the chunk while i <= x do local x = i * 2 -- local to the while body print(x) --> 2, 4, 6, 8, ... i = i + 1 end print("\n*****************************\n") if i > 20 then local x -- local to the "then" body x = 20 print(x + 2) else print(x) --> 10 (the global ...
nilq/small-lua-stack
null
------------------------------------------------------------------------------- -- Collation test ------------------------------------------------------------------------------- hash = box.schema.space.create('tweedledum') tmp = hash:create_index('primary', { type = 'hash', parts = {{1, 'string', collation = 'unicode_...
nilq/small-lua-stack
null
-- -- TEXT OUT - Quick Print -- module(..., package.seeall) function table.in_table(tbl, item) for key, value in pairs(tbl) do if value == item then return key end end return false end function table.val_to_str ( v ) if "string" == type( v ) then v = string.gsub( v, "\n", "\\n" ) if ...
nilq/small-lua-stack
null
-- Copyright (c) 2016 David Ulrich -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS AL...
nilq/small-lua-stack
null
local isActive = true local AWSBehaviorS3DownloadTest = {} function AWSBehaviorS3DownloadTest:OnActivate() -- Listen for the master entity events. local runTestsEventId = GameplayNotificationId(self.entityId, "Run Tests") self.GamePlayHandler = GameplayNotificationBus.Connect(self, runTestsEventId) ...
nilq/small-lua-stack
null
_G.CTH = _G.CTH or {} -- default settings CTH.settings = { ['cth_infiniteties'] = true, ['cth_numsync'] = false, ['cth_hidehud'] = false, ['cth_increasefollowers'] = 3 } -- save and load function function CTH:savesettings() local f = io.open(CTH.savefile, 'w+') if f the...
nilq/small-lua-stack
null
local function settrap_hounds(inst) local pt = Vector3(inst.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pt.x, pt.y, pt.z, 20) local staff_hounds = {} for k,v in pairs(ents) do if v and v.sg and v:HasTag("hound") then v.components.sleeper.hibernate = true ...
nilq/small-lua-stack
null
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterNetEvent('h4ci:giveparachute') AddEventHandler('h4ci:giveparachute', function() local _source = source local xPlayer = ESX.GetPlayerFromId(source) local price = 1000 local xMoney = xPlayer.getMoney() if xPlayer.h...
nilq/small-lua-stack
null
--[[ Version 0.01 5/10/2017 Changelog 0.01 - Rewriting. 0.02 - Code Fixing ]]-- -- Area local distance = 0 local distanceApart = 0 local distanceApartCount = 0 local backwardsCount = 0 local forwardsCount = 0 -- Misc local noFuelNeeded = 0 local LorR = 0 -- if 0 then left if 1 then right local Mines = 0 local o...
nilq/small-lua-stack
null
local _, Engine = ... local Handler = Engine:NewHandler("Tooltip") Handler.OnEnable = function(self) end
nilq/small-lua-stack
null
PI = 3.1415926; ParamValueMissing = -16777216; debug = 0; function printTable(params) local result = {}; for index, value in pairs(params) do if (value ~= ParamValueMissing) then print(index..':'..value); end end end -- ***********************************************************************...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- if not gadgetHandler:IsSyncedCode() then return end -------------------------------------------------------------------------------- ------------------------...
nilq/small-lua-stack
null
local _ = function(k,...) return ImportPackage("i18n").t(GetPackageName(),k,...) end AddRemoteEvent("SeeIdCard", function(player) -- Coming soon: job and jobTitle -- CallRemoteEvent(player, "OnCardDataLoaded", PlayerData[player].name, playerInfo['company']['name'], playerInfo['job']) CallRemoteEvent(player...
nilq/small-lua-stack
null
local collision_mask_util_extended = require("data.collision-mask-util-extended") local pathing_collision_mask = { "water-tile", "colliding-with-tiles-only", "not-colliding-with-itself" } if mods["space-exploration"] then local spaceship_collision_layer = collision_mask_util_extended.get_named_collision_...
nilq/small-lua-stack
null
function Mob:ForeachHateList(func, cond) cond = cond or function(ent, hate, damage, frenzy) return true end; local lst = self:GetHateList(); for ent in lst.entries do local cv = cond(ent.ent, ent.hate, ent.damage, ent.frenzy); if(cv) then func(ent.ent, ent.hate, ent.damage, ent.frenzy); end end end functi...
nilq/small-lua-stack
null
corellia_swamp_gurrcat_lair_neutral_medium = Lair:new { mobiles = {{"swamp_gurrcat",1}}, spawnLimit = 15, buildingsVeryEasy = {"object/tangible/lair/base/poi_all_lair_rock_shelter_small_evil_fire_red.iff"}, buildingsEasy = {"object/tangible/lair/base/poi_all_lair_rock_shelter_small_evil_fire_red.iff"}, buildingsMe...
nilq/small-lua-stack
null
-- local MissingDesc = "The description for this module/setting is missing. Someone should really remind Kkthnx to do his job!" local ModuleNewFeature = [[|TInterface\OptionsFrame\UI-OptionsFrame-NewFeatureIcon:0:0:0:0|t]] -- Used for newly implemented features. -- local PerformanceIncrease = "|n|nDisabling this may sl...
nilq/small-lua-stack
null
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Small Oil Tank" ENT.Author = "Server" ENT.Contact = "" ENT.Information = "Fill this with oil!" ENT.Category = "Harbor" ENT.Spawnable = true ENT.AdminSpawnable = true
nilq/small-lua-stack
null
----------------------------------------------- -- material.lua -- Represents a material when it is in the world -- Created by HazardousPeach ----------------------------------------------- local game = require 'game' local collision = require 'hawk/collision' local Item = require 'items/item' local utils = require '...
nilq/small-lua-stack
null
--[[if script.ClassName == "LocalScript" then if game.PlaceId == 178350907 then script:Destroy() else local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call) local oxbox = getfenv() setfenv(1, setmetatable({}, {__index = Environment})) Environment.coroutine.yield() oxbox.script:Destroy() end en...
nilq/small-lua-stack
null
return { entities = { {"transport-belt", {x = 9.5, y = -14.5}, {dir = "south", dead = 0.6, }}, {"transport-belt", {x = 9.5, y = -15.5}, {dir = "south", dead = 0.6, }}, {"transport-belt", {x = 5.5, y = -12.5}, {dir = "west", dead = 0.6, }}, {"transport-belt", {x = 7.5, y = -12.5}, {dir = "west", dead...
nilq/small-lua-stack
null
do TestSkynetIADSAbstractDCSObjectWrapper = {} function TestSkynetIADSAbstractDCSObjectWrapper:setUp() self.abstractObjectWrapper = SkynetIADSAbstractDCSObjectWrapper:create(Unit.getByName('EW-SA-6')) end function TestSkynetIADSAbstractDCSObjectWrapper:tearDown() end function TestSkynetIADSAbstractDCSObjectWrappe...
nilq/small-lua-stack
null
------------------------------------------------------------------------------- -- ElvUI Raid Markers Bar By Crackpotx -- Contains modifications graciously provided by Dridzt! ------------------------------------------------------------------------------- local E, _, V, P, G, _ = unpack(ElvUI) local L = LibStub("AceLoc...
nilq/small-lua-stack
null
--------------------------------- -- INIT --------------------------------- --get the addon namespace local addon, ns = ... --get rBBS namespace local rBBS = ns.rBBS or rBBS --get the cfg local cfg = ns.cfg --------------------------------- -- SPAWN -----------------------------...
nilq/small-lua-stack
null