content
stringlengths
5
1.05M
minetest.register_craftitem("floodfill:bucket", { description = "Floodfill Magic Bucket", inventory_image = "bucket.png^[colorize:gold:80", stack_max = 1, liquids_pointable = true, on_use = function(itemstack, player, pointed_thing) if pointed_thing.type ~= "node" then return end local opos = poi...
X = {} local IBUtil = require(GetScriptDirectory() .. "/ItemBuildlogic"); local npcBot = GetBot(); local talents = IBUtil.FillTalenTable(npcBot); local skills = IBUtil.FillSkillTable(npcBot, IBUtil.GetSlotPattern(1)); X["items"] = { "item_wraith_band", "item_boots", "item_magic_wand", "item_ring_of_aquila", "i...
local _M = {} -- https://forums.coronalabs.com/topic/9760-buffered-movieclip-image-sequence/ ----------------------------- -- LOCALS ----------------------------- local _W = display.contentWidth local _H = display.contentHeight --display.newRect(_W/2, _H/2, _W, _H) ----------------------------- -- INCLUDES ----------...
local L = BigWigs:NewBossLocale("Atal'Dazar Trash", "esES") or BigWigs:NewBossLocale("Atal'Dazar Trash", "esMX") if not L then return end if L then L.skyscreamer = "Vociferador de cielos hambriento" L.tlonja = "T'lonja" L.shieldbearer = "Portaescudos de Zul" L.witchdoctor = "Médica bruja Zanchuli" L.kisho = "Dinom...
local PlatformSurface = require('motras_platform_surface') local Box = require('motras_box') local ModuleUtils = require('modulesutil') local Transf = require('transf') local ModuleUtils = require('motras_modelutils') local PlatformBuilder = require('motras_platform_builder') local PlatformEdge = require('motras_...
-- -- (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 (c) 2015 Anshul Samar -- Copyright (c) 2014, Facebook, Inc. All rights reserved. -- Licensed under the Apache License, Version 2.0 found in main folder -- See original LSTM/LM code: github.com/wojzaremba/lstm -- g_print method from Benjamin Marechal require 'gnuplot' function g_transfer_data(x) r...
-- Name: Onebuddy -- Description: Light and dark atom one theme -- Author: Th3Whit3Wolf <the.white.wolf.is.1337@gmail.com> -- Maintainer: Th3Whit3Wolf <the.white.wolf.is.1337@gmail.com> -- Website: httpc.//github.com/Th3Whit3Wolf/onebuddy -- License: MIT local Color, c, Group, g, s = require...
-- [[ Internal Mapper ]] -- -- A set of functions to provide an internal positional mapper. -- Supplies some callback functions that can be passed to movement -- functions that while update and maintain internal positions.
project "Sandbox" kind "ConsoleApp" language "C++" outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" targetdir ("%{wks.location}/bin/"..outputdir.."/%{prj.name}") objdir ("%{wks.location}/bin-int/"..outputdir.."/%{prj.name}") -- sets the building order dependson { "Hex" } includedirs { "....
-- -- Please see the readme.txt file included with this distribution for -- attribution and copyright information. --
function CreateDoublyLinkedList() local newdll = { firstLink = nil, lastLink = nil, iterator = { currentLink = nil, linksPerTick = nil }, dataIdentifierToLink = {}, count = 0, freeIndexes = {} } return newdll end function AddLink(linkedList, data, dataIdentifier) --Create new link local ne...
-------------------------------- -- @module NavMeshObstacle -- @extend Component -- @parent_module cc -------------------------------- -- -- @function [parent=#NavMeshObstacle] getSyncFlag -- @param self -- @return int#int ret (return value: int) -------------------------------- -- -- @function [parent=#N...
#!/usr/bin/env lua if os.getenv("kak_opt_easymotion_chars") then kak_easymotion_chars = os.getenv("kak_opt_easymotion_chars") else kak_easymotion_chars = "abcdefghijklmnopqrstuvwxyz" end -- Calculate `count` value for Kakoune from the two-char long input. local function getCount(jumper) local counter = string.find...
return { version = "1.5", luaversion = "5.1", tiledversion = "1.7.2", orientation = "orthogonal", renderorder = "right-down", width = 40, height = 20, tilewidth = 8, tileheight = 8, nextlayerid = 7, nextobjectid = 169, properties = {}, tilesets = { { name = "sprite_sheet", firs...
do function conky_round(arg) local n = conky_parse(arg) return math.floor(tonumber(n) + .5) end function conky_wifi_icon(arg) local arg = conky_parse(arg) if arg == "unk" then return " " end local n = tonumber(arg) if (n > 75)...
local corpseIds = {3058, 3059, 3060, 3061, 3064, 3065, 3066} local removalLimit = 500 function onCastSpell(creature, variant, isHotkey) local position = variant:getPosition() local tile = Tile(position) if tile then local items = tile:getItems() if items then for i, item in ipairs(items) do if item:getTy...
local http = require("socket.http") local ltn12 = require("socket.ltn12") function SendFile(FilePath) local files = "" local file = io.open(FilePath,"rb") if file then files = file:read("*a") file:close() end local response_body = {} local boundary = "----------------------------831b...
require "lmkbase" require "lmkutil" local files = lmkbase.files (".") local PreOldPath = "" -- "/usr/local/Trolltech/Qt-4.6.0/lib/" local OldPath = ".framework/Versions/4/" local NewPath = "@executable_path/../Frameworks/Qt/" local libs = { "QtAssistant", "QtCore", "QtDesigner", "QtDesignerComponents", ...
--entity_helper.lua --Templates and constants for the entity prototypes require("copy_prototype") --============================================================================== -- Constants local empty_circuit_connector = { led_red = { filename = graphics .. "empty.png", width = 1, height = 1 }, led_green = { fi...
do --- jit-flush if not jit or not jit.status or not jit.status() then return end for i=1,100 do if i==50 then jit.flush(2) end for j=1,100 do end for j=1,100 do end end jit.flush() local function f() for i=1,100 do end end for i=1,100 do local x = gcinfo(); f() end jit.flush() local f...
local status_ok, lspconfig = pcall(require, "lspconfig") if not status_ok then vim.notify("Lspconfig not found!") return end require("user.lsp.lsp-installer") require("user.lsp.handlers").setup() require("user.lsp.null-ls")
-- -- @copyright (c) 2015 Upstart Illustration LLC. All rights reserved. -- AdNetwork = enum(0 , 'Unknown' , 'AdColony' , 'AdMob' , 'Chartboost' , 'iAd' , 'Leadbolt' , 'Vungle' ) AdType = enum(0 , 'Unknown' , 'Banner' , 'Interstitial' , 'Video' ) AdImpressionType = enum(0 , 'Regular' , 'Pre...
LinkLuaModifier("modifier_oaa_glaives_of_wisdom", "abilities/oaa_glaives_of_wisdom.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_oaa_glaives_of_wisdom_fx", "abilities/oaa_glaives_of_wisdom.lua", LUA_MODIFIER_MOTION_NONE) silencer_glaives_of_wisdom_oaa = class(AbilityBaseClass) function silencer_glaives_of...
local projname = ... -- this file is expected to be included from a project scope local sizzplugins_dir = (solution().basedir .. "/") local hl2sdk_dir = sizzplugins_dir .. "../source-sdk-2013/mp/src/" local sdklib_dir = hl2sdk_dir .. "lib/public/" local sizzlib_dir = sizzplugins_dir .. "lib/" local external...
dofile(ModPath .. "infcore.lua") -- Similarly to CopMovement, HRT's sometimes spawn without a team set. -- This function is called to sync the units to late joiners. To prevent possible crashes, substitute a default team if none is set. Hooks:PreHook(CopBrain, "save", "inf_setbraincopteam", function(self, save_data) ...
local awful = require('awful') local wibox = require('wibox') local gears = require('gears') local clickable_container = require('widget.clickable-container') local dpi = require('beautiful').xresources.apply_dpi local icons = require('themes.icons') local colors = require('themes.dracula.colors') local watch = require...
--Test = require('connecttest') --require('cardinalities') --local events = require('events') --local mobile_session = require('mobile_session') --local mobile = require('mobile_connection') --local tcp = require('tcp_connection') --local file_connection = require('file_connection') --function Test:ActivationApp() ...
--------------------------------------------------------------------------------------------------- ---screen_metrics.lua ---date: 2021.2.27 ---reference: src/api.lua ---desc: Defines ScreenMetrics, which deals with the recording and updating of the current screen --- settings. -------------------------------------...
local Q = require 'Q' local qconsts = require 'Q/UTILS/lua/q_consts' function sum_prod_eval(X, w) local A = {} for i = 1, #X do A[i] = {} local temp = Q.vvmul(X[i], w) for j = i, #X do A[i][j] = Q.sum(Q.vvmul(X[j], temp)):eval() end end return A end return sum_prod_eval
local Scheduler = require('app.helpers.Scheduler') local SoundMng = require('app.helpers.SoundMng') local tools = require('app.helpers.tools') local ConvertToTableView = require('app.helpers.ConvertToTableView') local cache = require('app.helpers.cache') local app = require('app.App'):instance() local GVMessageListVie...
--------------------------------------------------------------------------------------------------- -- func: changesjob -- desc: Changes the players current subjob. --------------------------------------------------------------------------------------------------- require("scripts/globals/status") cmdprops = { pe...
local snet = slib.Components.Network local SERVER = SERVER local table = table local hook = hook local IsValid = IsValid local ipairs = ipairs local AddOriginToPVS = AddOriginToPVS local RealTime = RealTime local isentity = isentity local istable = istable local unpack = unpack local table_insert = table.insert local t...
require 'telescope' local i = 0 context("A context", function() before(function() i = i + 1 end) after(function() i = i - 1 end) context("A nested context", function() test("A passing test", function() assert_true(true) end) test("A failing test", function() assert_true(false) en...
require "app.config.namespace" require "app.config.events"
function set_team() local ChangeTeamFrame = vgui.Create( "DFrame" ) ChangeTeamFrame:SetPos( 50, 50 ) --Set the window in the middle of the players screen/game window ChangeTeamFrame:SetSize( 200, 250 ) --Set the size ChangeTeamFrame:SetTitle( "Change Team" ) --Set title ChangeTeamFrame:SetVisible( true ) ChangeTeam...
-- Graph contains the following Enums: -- Graph.GraphType - Values: OneWay, TwoWay -- OneWay: The Graph will assume connections are one-way (Connect('A', 'B', 1) will connect 'A' to 'B', but not 'B' to 'A' -- TwoWay: The Graph will assume connections are two-way (Conenct('A', 'B', 1) will connect 'A' to 'B' and '...
local awful = require("awful") local wibox = require("wibox") local naughty = require("naughty") local utils = require("utils") local gears = require("gears") local home = os.getenv("HOME") local system_widgets_resources = { { name = "bluetooth", normal_image = home .. "/.config/awesome/themes/Ne...
AddCSLuaFile() SWEP.Base = "weapon_base" SWEP.PrintName = "YAWD Weapon Base" SWEP.Author = "YAWD Team" SWEP.Category = "YAWD" SWEP.Spawnable = false SWEP.AdminOnly = true SWEP.m_WeaponDeploySpeed = 1 SWEP.Slot = 0 SWEP.SlotPos = 0 SWEP.DrawCrosshair = true SWEP.DrawAmmo = true SWEP.Weight = 5 SWEP.ViewModelFOV = 74...
-- minetest/fire/init.lua minetest.register_node("fire:basic_flame", { description = "Fire", drawtype = "firelike", tiles = {{ name="fire_basic_flame_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1}, }}, inventory_image = "fire_basic_flame.png", light_source = 14, groups...
--------------------------------------------------------------------------------------------------- -- Proposal: -- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0221-multiple-modules.md -- Description: -- HMI sent capabilities, where CLIMATE has three modules, to the SDL. -- Mobile App sends...
return {'omdat','omdijken','omdijking','omdoen','omdolen','omdopen','omdoping','omdraai','omdraaien','omdraaiing','omdragen','omduikelen','omduwen','omdonderen','omdwalen','omdurman','omdeden','omdeed','omdijk','omdijkingen','omdijkt','omdijkte','omdoe','omdoet','omdoolde','omdoolt','omdoop','omdoopt','omdoopte','omdoo...
local base = require('imgui.Widget') ---@class im.Checkbox:im.Widget local M = class('im.Checkbox', base) function M:ctor(...) base.ctor(self, ...) end function M:setLabel(label) self:setParam(1, label) return self end function M:getLabel() return self:getParam(1) end function M:setChecked(b) s...
local status_ok, lualine = pcall(require, "lualine") if not status_ok then return end local hide_in_width = function() return vim.fn.winwidth(0) > 80 end local diagnostics = { "diagnostics", sources = { "nvim_diagnostic" }, sections = { "error", "warn" }, symbols = { error = " ", warn = " " }, colored = fals...
local S, L, O, U, D, E = unpack(select(2, ...)); local Module = S:NewNameplateModule('TotemIcon'); -- Local Config local ENABLED; local TOTEM_TEXTURE = 971076; local TOTEM_LOCALIZED_NAME = { ['enUS'] = 'Totem', ['deDE'] = 'Totem', ['esES'] = 'Tótem', ['esMX'] = 'Totém', ['frFR'] = 'Totem', ['...
--[[ 24 * t // s == k CSoundGen::m_iTempoDecrement 24 * t % s == rem CSoundGen::m_iTempoRemainder 24 * t == k * s + rem CSoundGen::m_iTempoAccum + rem 60 * floor(1e6 / intv) == 60 * framerate (0.4....
local SPEED = 4 local ROLL_SPEED = 1 function start(this_pgid) pgid = this_pgid end function stop() end function collide(pid, entity_id) play_sample("sfx/knock.ogg", 1, 0, 1) remove_particle(pid) end function logic(pid) local frames = get_particle_blackboard(pid, 0) local frame = get_particle_blackboard(pid, 1...
nodes = {} edges = {} if nil == len_factor then len_factor = 1 end function start_tree() n = 0 print("strict graph tree {") print("graph [mode=KK,dimen=2]") end function node() if l then node_string = string.format("N%s [shape=plaintext,label=\"%s\"]", N.id, lbl) else node_string = string.format("N%s [shap...
-- Copyright 2014 David Mentler AddCSLuaFile() --[[ = Circular Queue = Store queued objects efficiently. This utility saves memory by tricking lua to store the queue using backing arrays, making it way faster than inserting into a tables first index. queue = CircularQueue( <size = 8> ) queue:Add...
fx_version 'adamant' game 'gta5' description 'ESX Menu Default' version 'legacy' client_scripts { 'client/main.lua' } ui_page { 'html/ui.html' } files { 'html/ui.html', 'html/css/app.css', 'html/js/mustache.min.js', 'html/js/app.js' }
-- Convert mat to .t7 -- Assume the matlab file only has one field require 'torch' require 'paths' require 'mattorch' function tablelength(T) local count = 0 for _ in pairs(T) do count = count + 1 end return count end cmd = torch.CmdLine() cmd:option('--path2file', '.') opt = cmd:parse(arg or {}) dir = paths....
local shadow = {} local image = love.graphics.newImage function shadow.Animation() local shadow = { image('entities/img/shadow/shadow1.png'), image('entities/img/shadow/shadow2.png'), image('entities/img/shadow/shadow3.png') } return shadow end return shadow
--[[ Copyright (c) David-John Miller AKA Anoyomouse 2016 * Part of the warehousing mod * * See LICENCE in the project directory for licence information --]] function define_warehouse_connector(mainOffset) local logisticAnimationOffset = {0.015625, 0.234375}; local result = { connector_main = { ...
-- Discordia Command Manager -- microsievert#2039 local discordia = require "discordia" local class = discordia.class discordia.extensions.string() -- > Creating class base local Command = class("CommandClass") function Command:__init(name) if name then self._name = name self._permissions = {} sel...
local share = require "share" local enet = require "enet" local server = {} do local host function server.start() host = enet.host_create("*:22122") end function server.update(dt) if host then while true do local event = host:service(0) if not event then break ...
--Lua code loader local Globals = (...) or {} local edata = select(2,...) or {} Globals._GameCode = edata.luacode return Globals
RealMobHealth_Options = { ["ShowStatusBarTextAdditions"] = true, ["ShowNamePlateHealthText"] = true, ["ShowTooltipText"] = false, ["EnablePeerCache"] = true, ["ModifyHealthBarText"] = false, ["ShowTooltipHealthText"] = false, } RealMobHealth_CreatureHealthCache = { ["4531-28"] = 2732, ["11611-57"] = 3036, ["1...
require "resty.nettle.types.des" local lib = require "resty.nettle.library" local ffi = require "ffi" local ffi_new = ffi.new local ffi_typeof = ffi.typeof local ffi_copy = ffi.copy local ffi_cdef = ffi.cdef local ffi_str = ffi.string local ceil = math.ceil local assert ...
--- Determines where the tabs will be placed within a @{Chat} Compound. -- @classmod TabLocation local Enum = require("vyzor.enum") --- TabLocation options. -- @table TabLocation. local _enum = { Top = "top", Bottom = "bottom", Right = "right", Left = "left", } local TabLocation = Enum("TabLocation", _enum) ...
local new, centroid; function new(x, y) return { x, y } end function centroid(points, nrep) local x = 0.0 local y = 0.0 local npoints = #points for _ = 1, nrep do x = 0.0 y = 0.0 for i = 1, npoints do local p = points[i] x = x + p[1] y = y...
-- @description Stretch selected items to fit between nearest markers -- @author Aaron Cendan -- @version 1.0 -- @metapackage -- @provides -- [main] . > acendan_Stretch selected items to fit between nearest markers.lua -- @link https://aaroncendan.me -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~~~~~~~~~~ GLOBAL VARS ~...
return { order = 'cCfmpo', kinds = { c = { group = 'neotags_ClassTag' }, C = { group = 'neotags_ConstantTag' }, f = { group = 'neotags_FunctionTag' }, m = { group = 'neotags_MethodTag' }, o = { group = 'neotags_ObjectTag' }, p = { group...
local picoturtle = require "picoturtle" function Turtle(opt) t = picoturtle.new() end function arcr(t, r, deg) for i = 1, deg, 1 do t:fd(r) t:rt(1) end end function arcl(t, l, deg) for i = 1, deg, 1 do t:fd(l) t:lt(1) end end
local Bullet, super = Class(Object) function Bullet:init(x, y, texture) super:init(self, x, y) self.layer = LAYERS["bullets"] -- Set scale and origin self:setOrigin(0.5, 0.5) self:setScale(2, 2) -- Add a sprite, if we provide one if texture then self:setSprite(texture, 0.25, true...
-- -- YATM Debug -- -- Various utilities, modules and items for debugging YATM related features -- local mod = foundation.new_module("yatm_debug", "1.0.0") mod:require("items.lua")
return { name = "Warlock"; description = "An ancient tome of powerful cursed magic. But at what cost?"; pointsGainPerLevel = 1; startingPoints = 1; lockPointsOnClassChange = true; minLevel = 30; maxLevel = 50; -- visual attributes layoutOrder = 3; bookColor = Color3.fromRGB(76, ...
local EditMatcher = {} function EditMatcher.onChanged() local matcher = guiGetInternalData(this, "matcher") if not matcher then return end guiSetText(this, matcher(guiGetText(this)) or "") end function EditMatcher.onBlur() local matcher = guiGetInternalData(this, "matcher") if not matcher then return end ...
local Map = {} function Map:new(params, isoGrid, aiPlayer, humanPlayer) local size = params.size; local newMap = {size=size, isoGrid = isoGrid, distFun=require("math.geometry").manhattanDist}; -- set meta tables so lookups will work setmetatable(newMap, self); self.__index = s...
local converter = require("gesture.view.converter") local M = {} local Canvas = {} Canvas.__index = Canvas M.Canvas = Canvas local vim = vim local set_extmark = vim.api.nvim_buf_set_extmark function Canvas.new(bufnr, ns) local tbl = {_rows = {}, _board_rows = {}, _bufnr = bufnr, _ns = ns} return setmetatable(tb...
local moon = require("moon") local conf = ... if conf and conf.slave then if conf.auto_quit then print("auto quit, bye bye") -- 使服务退出 moon.timeout(10, function() moon.quit() end) end else moon.async(function() while true do moon.new_service("...
local socket = require('socket') local http = require('socket.http') local ltn12 = require('ltn12') local log = require('log') local config = require('config') -- XML modules local xml2lua = require "xml2lua" local xml_handler = require "xmlhandler.tree" ----------------------- -- SSDP Response parser local function p...
WINDOW_WIDTH = 1280 WINDOW_HEIGHT = 720 VIRTUAL_WIDTH = 432 VIRTUAL_HEIGHT = 243 MAX_SCORE = 5 require "baseClass/class" -- lua classes require "baseClass/Observer" -- obeserver Patter require "baseClass/Message" -- observer Patter Push = require "thirdLibrary/push" -- require the library require "Player" requi...
local F = vim.fn local L = vim.loop local utils = require('ucw.utils') local logger = require('ucw.log').logger() local M = {} ---Normalize object keys ---i.e. from {["a.b.c"] = 1} to {a = { b = { c = 1 }}} local function normalize_keys(obj) if type(obj) ~= 'table' then return obj end local res = {} for...
local testcase = require('testcase') local basename = require('basename') function testcase.basename() -- test that extract the basename for _, v in ipairs({ { "", ".", }, { ".", ".", }, { "/.", ".",...
--[[ In the lxp example, we used user values to associate the callback table with the userdatum that represents a parser. This choice created a small problem, because what the C callbacks receive is the lxp_userdata structure, and that structure does not offer direct access to the table. We solved this problem by sto...
local feature = {} feature.name = "Tags" feature.desc = "Use this feature to trigger already created tags. Use the tag command instead to create and manage tags!" feature.onCommandType = "override" local perserver = Misc.loadJson("perserver.json") feature.onMessage = function(m, event) local prefix = Misc.getPrefi...
Touches = class() function Touches:init() -- you can accept and set parameters here self.touches = {} end function Touches:add(t) table.insert(self.touches, {t}) end function Touches:expand(t) table.insert(self.touches[#self.touches],t) end function Touches:draw() local last if #self.touches...
utils = require 'mp.utils' require 'mp.options' local options = { directory = ".", ratings_file = "RBS-ratings.txt", } read_options(options, "ratings-based-shuffle") all_files = {} ratings = {} function init_playlist() mp.osd_message("Initializing ratings-based shuffle..") mp.set_property("shuffle", ...
local skynet = require "skynet" local socket = require "skynet.socket" local httpd = require "http.httpd" local sockethelper = require "http.sockethelper" local urllib = require "http.url" local table = table local string = string local mode, protocol = ... protocol = protocol or "http" local function response(id, wr...
local host, dir, fileuri, query, localfile, callback = ... local doRequest, firstRec, subsRec, finalise local n, total, size = 0, 0 doRequest = function(socket, hostIP) -- luacheck: no unused if hostIP then local con = net.createConnection(net.TCP, 0) -- Note that the current dev version can o...
require("lsp").setup "sh"
local S = homedecor.gettext local bathroom_tile_colors = { { "1", "white/grey", "#c0c0c0:200" }, { "2", "white/dark grey", "#404040:150" }, { "3", "white/black", "#000000:200" }, { "4", "black/dark grey", "" }, { "red", "white/red", "#d00000:150" }, { "green", "white/...
-- copy all globals into locals, some locals are prefixed with a G to reduce name clashes local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,Gload,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,un...
object_static_worldbuilding_vegitation_fngi_mushroom_clump_a1 = object_static_worldbuilding_vegitation_shared_fngi_mushroom_clump_a1:new { } ObjectTemplates:addTemplate(object_static_worldbuilding_vegitation_fngi_mushroom_clump_a1, "object/static/worldbuilding/vegitation/fngi_mushroom_clump_a1.iff")
dead_flesh = { -- this is a scourge spell requirements = function(player) local level = 99 local items = {"surge", "star_staff", "scribes_book", 20000} local itemAmounts = {1, 1, 1, 20000} local description = "Weaken your opponent for a short time." return level, items, itemAmounts, description end }
local logger = require "logger" local tap = {} local FLAG_C = 1 local FLAG_C_OFF = 254 local blocks -- move this into a tap table local current_block local function compute_checksum (data, length) local checksum = 0 for i = 1, length do checksum = checksum ~ data:byte(i) end return checksum end --- --...
ESX = nil local PlayerArrested, PlayersinJail = {}, 0 TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterServerEvent( "esx_extendedjail:suggestions" ) AddEventHandler( "esx_extendedjail:suggestions", function() if source ~= 0 then local xPlayer = ESX.GetPlayerFromId(source) if xPlayer.job.n...
--[[ |WARNING| THESE TESTS RUN IN YOUR REAL ENVIRONMENT. |WARNING| If your tests alter a DataStore, it will actually alter your DataStore. This is useful in allowing your tests to move Parts around in the workspace or something, but with great power comes great responsibility. Don't mess up your stuff! ------------...
function onCreate() -- background stuffs makeLuaSprite('oceanBg1', 'oceanBg1', -825, -900); setScrollFactor('oceanBg1', 1.0, 1.0); scaleObject('oceanBg1', 1.0, 1.0); makeLuaSprite('oceanBg2', 'oceanBg2', -825, -900); setScrollFactor('oceanBg2', 1.0, 1.0); scaleObject('oceanBg2', 1.0, 1.0); makeLuaSprite('oce...
--- init net package -- @author zrong(zengrong.net) -- Creation 2014-01-02 local net = {} net.SocketTCP = import(".SocketTCP") return net
-- Set completeopt to have a better completion experience vim.o.completeopt = 'menuone,noselect' -- luasnip setup local luasnip = require 'luasnip' -- nvim-cmp setup local cmp = require 'cmp' cmp.setup { snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) end, }, mapping =...
slot3 = {} FishingJoyPlayer = class(slot1, "FishingJoyPlayer") FishingJoyPlayer.ctor = function (slot0, slot1) slot0.cannonFireType = 0 slot0.cannonRenderType = 0 slot0.cannonFireMul = 0 slot0.lockfishId = 0 slot0.lockingFish = false slot0.lockedFish = {} slot0.firedBulletCount = 0 slot0.allowFire = false slo...
local shuttle = scene:getObjects("shuttle1_mover")[1]; local military0 = scene:getObjects("military0")[1]; local military1 = scene:getObjects("military1")[1]; local military10 = scene:getObjects("military10")[1]; local military11 = scene:getObjects("military11")[1]; local display1 = nil; local function setupDisplay(na...
local colour = ImportPackage('colours') function cmd_inv(player) if InventoryData[player] == nil then return AddPlayerChat(player, "<span color=\""..colour.COLOUR_LIGHTRED().."\">Server:</> You have nothing in your inventory!") end if #InventoryData[player] == 0 then return AddPlayerChat(p...
--[[ https://gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html SetPedDefaultComponentVariation(ped) ClearPedDecorations(ped) Appearance. Props (0: Hat\ 1: Glass\ 2: Ear\ 6: Watch\ 7: Bracelet): *GetNumberOfPedPropTextureVariations(ped, propId, drawableId) *GetNumberOfPedPropDrawableVar...
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") if CLIENT then SWEP.DrawCrosshair = false SWEP.PrintName = "FN F2000" SWEP.CSMuzzleFlashes = true SWEP.ViewModelMovementScale = 1.15 SWEP.MuzzleEffect = "muzzleflash_6" SWEP.PosBasedMuz = false SWEP.SnapToGrip = true SWEP.ShellScale = 0.6 ...
-- ltfl - Lua Tools For Linux (light fall) -- -- Returns true if the subsystem is 'block' -- and the devtype is 'disk' -- and it has a ID_BUS that is not NULL -- and the ID_TYPE is 'disk' -- -- This will also catch those usb thumb drives local function isPhysicalDisk(dev) if dev.IsInitialized and dev:getProperty("sub...
dofile(ModPath .. "/classes/UT.lua") local packages = {} local settings = UT.getSettings() -- time mode table.insert(packages, "levels/instances/unique/hlm_random_right003/world") table.insert(packages, "levels/instances/unique/hlm_gate_base/world") table.insert(packages, "levels/instances/unique/hlm_door_wooden_whit...
model.floor={} model.floor.handles={} model.floor.handles.e1=sim.getObjectHandle('ResizableFloor_10_50_element') model.floor.handles.e2=sim.getObjectHandle('ResizableFloor_10_50_visibleElement') model.floor.handles.itemsHolder=sim.getObjectHandle('Floor_floorItems') function model.floor.update() local c=model.read...
--- Turbo.lua "The parrot". Repeats everything it is told. -- -- Copyright 2013 John Abrahamsen -- -- 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/LICENS...