content
stringlengths
5
1.05M
#!/usr/bin/env lua local gl = require("moongl") local glfw = require("moonglfw") local SCR_WIDTH, SCR_HEIGHT = 800, 600 local vertex_shader_source = [[ #version 330 core layout (location = 0) in vec3 aPos; void main() { gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0); } ]] local fragment_shader1_source = [[ #vers...
CorelliaCoronetScreenPlay = CityScreenPlay:new { numberOfActs = 1, screenplayName = "CorelliaCoronetScreenPlay", planet = "corellia", gcwMobs = { {"stormtrooper_sniper", "rebel_master_sergeant", -501.3, 28, -4644.5, -2, 0, "", ""}, {"stormtrooper_squad_leader", "rebel_surface_marshall", -502.1, 28, -4701.1, ...
----------------------------------- -- Ability: Retaliation -- Allows you to counterattack but reduces movement speed. -- Obtained: Warrior Level 60 -- Recast Time: 00:03:00 -- Duration: 00:03:00 ----------------------------------- require("scripts/globals/status") ----------------------------------- function onAbilit...
--Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf.protobuf" module('Protol.common_pb') HEADER = protobuf.Descriptor(); HEADER_CMD_FIELD = protobuf.FieldDescriptor(); HEADER_SEQ_FIELD = protobuf.FieldDescriptor(); HEADER_CMD_FIELD.name = "cmd" HEADER_CMD_FIELD.full_name = ".Header.cmd" HEADE...
object_static_worldbuilding_terminal_floor_travel_01 = object_static_worldbuilding_terminal_shared_floor_travel_01:new { } ObjectTemplates:addTemplate(object_static_worldbuilding_terminal_floor_travel_01, "object/static/worldbuilding/terminal/floor_travel_01.iff")
function onSpeak(player, type, message) local playerAccountType = player:getAccountType() if player:getLevel() == 1 and playerAccountType < ACCOUNT_TYPE_GAMEMASTER then player:sendCancelMessage("You may not speak into channels as long as you are on level 1.") return false end if type == TALKTYPE_CHANNEL_Y then...
-- NetHack 3.7 Wizard.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ -- Copyright (c) 1992 by David Cohrs -- NetHack may be freely redistributed. See license for details. -- des.level_init({ style = "solidfill", fg = " " }); des.level_flags("mazelevel"); des.map([[ ...
function table.removeByValue(t, value) for i,v in pairs(t) do if v == value then table.remove(t, i) end end end function table.swap(array, index1, index2) array[index1], array[index2] = array[index2], array[index1] end function table.shuffle(array) local counter = #array while counter > 1 do local index...
-- imported modules local color = require 'engine.color' -- module local logger = {} function logger.logItems(items, itemCount) local messages = {} if 1 == itemCount then messages = { { 1, 1, 1, 1 }, 'There is ', color.crimson, items[next(items)].desc.blueprint.name, { 1, 1, 1, 1 }, ' lying there' } ...
------------------------------------------------------------------------------- -- Mob Framework Mod by Sapier -- -- You may copy, use, modify or do nearly anything except removing this -- copyright notice. -- And of course you are NOT allow to pretend you have written it. -- --! @file init.lua --! @brief animalmateria...
require('teeswift') local nw = "(((((COLLI:0.10374812919279975676,CAPCA:0.07285820959258730578)72:0.01687633680392261470,((CHAPE:0.09436074887800374733,CALAN:0.20253965688958708302)81:0.02742615135783911876,(PICPU:0.21751383294136364399,(OPHHO:0.09675872794281610567,((MELUN:0.08887850140662424681,NESNO:0.0587417730005...
-- This table is indexed by coroutine and simply contains the time at which the coroutine -- should be woken up. local WAITING_ON_TIME = {} local WAITING_ON_MOVE = {} -- Keep track of how long the game has been running. local CURRENT_TIME = 0 local savedStates = {} local function wait(ms, id) if id and savedStates[i...
local httpd = require "maoj.http.httpd" local ls = require "maoj.http.socket" local task = require "maoj.thread" local urllib = require "maoj.http.url" local serv = {} function serv.on_exit(obj,exit_cb) obj._exit_cb = exit_cb end function serv.exit(obj) obj._exit = true end function serv.location(obj,l) local lc...
-- Copyright 2022 SmartThings -- -- 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 law or agreed to in ...
#!/usr/bin/env lua config = require("config") json = require("cjson") require("utils") posts = json.decode(readFile(config.posts_path)) addPost{ title = getInput("title"), content = getInput("content"), author = {1} } syncPostsRefs()
-- This script template has each of the script entry point functions. -- They are described in detail in VR-Forces Configuration Guide. -- Some basic VRF Utilities defined in a common module. require "vrfutil" -- Global Variables -- -- Global variables get saved when a scenario gets checkpointed in one of the folowin...
log = require('lib/log') -- copied from lua-csv submodule csv = require('lib/csv') log.info("LOADING ELEVATION") local f = csv.open("./data/elevation.csv") ElevationTable = {} for fields in f:lines() do data = {} data['elevation'] = fields[2] data['lng'] = fields[3] data['lat'] = fields[4] Elevati...
local landmines = {} local landmineUtils = require("utils/LandmineUtils") local technologyUtils = require("utils/TechnologyUtils") local recipeUtils = require("utils/RecipeUtils") local makeRecipe = recipeUtils.makeRecipe local addEffectToTech = technologyUtils.addEffectToTech local makeLandmine = landmineUtils.makeL...
local ntype ntype = require("moonscript.types").ntype local Transformer do local _class_0 local _base_0 = { transform_once = function(self, scope, node, ...) if self.seen_nodes[node] then return node end self.seen_nodes[node] = true local transformer = self.transformers[ntype(nod...
---@class IsoBrokenGlass : zombie.iso.objects.IsoBrokenGlass IsoBrokenGlass = {} ---@public ---@return void function IsoBrokenGlass:addToWorld() end ---@public ---@return String function IsoBrokenGlass:getObjectName() end ---@public ---@param arg0 ByteBuffer ---@param arg1 boolean ---@return void function IsoBrokenG...
local BOSS = {} BOSS.Num = 2 //Boss ID number. 1,2,3,etc if making a new boss make sure it increments in order! BOSS.PName = "Terrorist" //Boss name BOSS.Music = { } //Put music in BOSS.Music for it to play during fight. 'pvb_enablebossmusic' in console controls if its playing (client side) function BOSS:Init() local...
--[[ MFF: Prevent trees from destroying existing blocks This is the list of "safe" blocks in which a tree can grow They were moved outside the local safety function for speed (I hope) --]] local c_air = minetest.get_content_id("air") local c_ignore = minetest.get_content_id("ignore") -- MFF: The local functi...
------------------- ABOUT ---------------------- -- -- In this cold planet hero seeks for a part of the -- antigravity device. He has to capture Thanta who -- knows where the device is hidden. Hero will be -- able to use only the ice gun for this mission. HedgewarsScriptLoad("/Scripts/Locale.lua") HedgewarsScriptLoad(...
-- file: snake.lua Snake = Object.extend(Object) --- Constructor of Snake Class ---@param segments table ---@param isAlive boolean function Snake:new(segments, isAlive) self.segments = segments self.alive = isAlive self.directionQueue = { 'right' } end --- Execute event by transitions into frames ---@par...
local L = require "lpeg" local u = {} function u.inherit(meta) local MT = meta or {} local M = setmetatable({}, MT) M.__index = M local m = setmetatable({}, M) m.__index = m return M, m end function u.export(mod, constructor) mod.__call = constructor return setmetatable({}, mod) end local s = requ...
-- Called OnSpellStart function ElectromagneticPulse(keys) local caster = keys.caster local ability = keys.ability local ability_level = ability:GetLevel() - 1 local mana_to_burn_percent = ability:GetLevelSpecialValueFor("mana_burned", ability_level) local delay = ability:GetLevelSpecialValueFor("delay", abili...
local base_arrow = { visual = "sprite", visual_size = {x = 0.5, y = 0.5}, velocity = 8, textures = {}, tail = 1, -- enable tail tail_texture = "dmobs_ice.png", hit_player = function(self, player) player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 8}, }, nil) end, ...
if Config.Debug then --- Set fuel in chat -- /fuel <0.100> RegisterCommand('fuel', function(_, args, _) local level = args[1] local vehicle = GetPlayersLastVehicle() if vehicle then SetVehicleFuelLevel(vehicle, level / 1.0) -- needs to be float end end) -...
-- SemVer parser by hugeblank https://github.com/hugeblank -- Parses strings that meet SemVer 2.0.0 specs as documented here: https://semver.org/spec/v2.0.0.html -- Feel free to use/redistribute/modify this file. Should you do so keep the above 3 lines as they are. -- Any strings that don't meet SemVer specs the parse...
-- idk who might need it, but: -- incredible-gmod.ru if not (debug.getmetatable(hook) and debug.getmetatable(hook).__call) then return end setmetatable(hook, {__call = function(self, v) return { Add = function(self, name, func) hook.Add(v, name, func) return self end } ...
local osmose = require 'osmose' local et = osmose.Model 'Chimney' ---------- -- User parameters ---------- et.inputs = { -- Exhaust gas coming from the engine T_TC_OUT_M = {default=350, unit='C'}, T_TC_OUT_L = {default=400, unit='C'}, LOAD_SHIFT_LM = {default = 0.51, unit = '-'}, -- The shi...
local Object = require 'libs.classic' local Piece = Object:extend() function Piece:new(shape, rotation, position, block_offsets, gravity, lock_delay, skin, colour, big) self.shape = shape self.rotation = rotation self.position = position self.block_offsets = block_offsets self.gravity = gravity self.lock_delay ...
-- pwd -- print(shell.pwd())
---@class Cursor C_Cursor = {} function C_Cursor.DropCursorCommunitiesStream() end ---@return string, string clubId, streamId function C_Cursor.GetCursorCommunitiesStream() end ---@return table item function C_Cursor.GetCursorItem() end ---@param clubId string ---@param streamId string function C_Cursor.SetCursor...
local ffi = require 'ffi' ffi.cdef[[ struct sd_html_renderopt { struct { int header_count; int current_level; int level_offset; } toc_data; unsigned int flags; /* extra callbacks */ void (*link_attributes)(struct sd_buf *ob, const struct sd_buf *url, void *self); }; typedef enum { HTML_SKIP_HTML = (1 <...
-- N-body benchmark from benchmarks game -- https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/nbody.html -- -- Original code by Mike Pall and Geoff Leyland, with modifications by Hugo -- Gualandi for correctness, clarity, and compatibility with Pallene. -- * Fix implementation of advance() to us...
-------------------------------------------------------------------------------- ------------------------------ ##### ## ------------------------------ ------------------------------ ## ## # ## ------------------------------ ------------------------------ ## ## ## ## ---------------------------...
----------------------------------- -- Area: Apollyon NE -- Mob: Goobbue Harvester ----------------------------------- require("scripts/globals/limbus") require("scripts/globals/pathfind") local ID = require("scripts/zones/Apollyon/IDs") local flags = tpz.path.flag.NONE local path = { {424.271, 0.000, 22.975}, ...
Matrix = Matrix or {} Matrix.__index = Matrix function Matrix.new(row, col) local self = {} self.row = row self.col = col for i = 0, self.row - 1 do self[i] = {} for j = 0, self.col - 1 do self[i][j] = 0 end end setmetatable(self, Matrix) return self end function Matrix.__mul(a, b) local type_a = t...
local isreadable = require "isreadable" local t = require "testhelper" io.open( "isreadable.txt", "wb" ):close() t( isreadable( "isreadable.txt" ), true ) os.remove( "isreadable.txt" ) t( isreadable( "isreadable.txt" ), false ) t.test_embedded_example() t()
package.cpath = "./cservice/?.so;./luaclib/?.so" package.path = "lualib/?.lua" local socket = require "clientsocket" local cjson = require "cjson" --local skynet = require "skynet" local i = 50 local fd = assert(socket.connect("127.0.0.1",9999)) print(".....fd is :",fd) --local sampleJson = [[{"age":"23","testArray"...
local parser = require("moocscript.parser") local compile = require("moocscript.compile") describe("test success #repeat", function() local mnstr=[[ a = 1 repeat { a += 2; if a >= 10 { break } } until {} and fn(){}; return a ]]...
local pairs = pairs; local tostring = tostring; local tonumber = tonumber; local tinsert = table.insert; local twipe = table.wipe; local VUHDO_ACTIVE_TRACE_SPELLS = { -- [<unit GUID>] = { -- ["latest"] = <latest trace spell ID>, -- ["spells"] = { -- [<spell ID>] = { -- ["icon"] = <spell icon>, -- ["startTi...
----------------------------------- -- Area: Wajaom Woodlands -- ZNM: Vulpangue ----------------------------------- mixins = {require("scripts/mixins/rage")} require("scripts/globals/status") require("scripts/globals/weather") ----------------------------------- function onMobInitialize(mob) mob:setMobMod(tpz.mobM...
-- Copyright (c) 2021 Johnathan P. Irvin -- -- 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, pu...
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterServerEvent('elec:vote') AddEventHandler('elec:vote', function(candidate) local _source = source local xPlayer = ESX.GetPlayerFromId(_source) local candidate = candidate MySQL.Async.execute('UPDATE users SET vote = @vote WHERE ...
return { number = 7, name = "Some Persistent Gems...", message = "You might need to match the same gem more than once sometimes. Destroy the selected gems to proceed.", timer = false, countDownSpeed = 15, -- only used if timer is true. Controls the speed of the timer. newColumn = function(column) prob...
--i figured i should start using local functions despite 1.6 using like none local undo_clear, undo_store, undo_stopstore--[[, undo_undo]] local meta_data, promptedmetadatasave local updatetilesscrollbar, updatelevelscrollbar local worldscrollbarheight, levelscrollbarheight local tilehotkeys = { ["1"] = {t=false, enti...
-- If player is underground, do <f()>. -- <yunder> specifies the maximum underground y coordinate. function screalms.check_underground(player, yunder, f) if player:get_pos().y > yunder then return end -- What node is the player's head in? local nh = minetest.registered_nodes[minetest.get_node(vector.add(player:g...
local tools = {} local conf = require("modules.tools.config") tools["RishabhRD/popfix"] = { opt = false } tools["nvim-lua/plenary.nvim"] = { opt = false } tools["nvim-telescope/telescope.nvim"] = { opt = true, cmd = "Telescope", module = "telescope", config = conf.telescope, requires = { { "nvim-lua/plenary.nvi...
function start_fx_hand(dt) print("start_fx_hand()") DEMO_STATE = fx_hand end function fx_hand(dt) fx_clock = demo_clock - get_fx_start_time('fx_hand') fx_clock_norm = fx_clock / get_fx_end_time('fx_hand') background_update(dt) gsplus:SetBlend2D(gs.BlendAlpha) gsplus:SetDepthTest2D(true) zoom_han...
local z = ... return function(v) package.loaded[z] = nil z = nil local n = v.name local p = tonumber(v.pos) if p == 0 then p = nil end local f = v.file local fl = tonumber(v.flush) if fl == 0 then fl = nil end if not n or not f then return "File body missing" end local n1 = "~"..n local n2 = "-"..n1 if not...
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) ESX.RegisterServerCallback('RubyMenu:getUsergroup', function(source, cb) local xPlayer = ESX.GetPlayerFromId(source) local group = xPlayer.getGroup() local ident = xPlayer.getIdentifier() cb(group) end) platenum = math.ran...
local cmd, g = vim.cmd, vim.g local hiLinks = require "settings.utils".hiLinks local highlights = require "settings.utils".highlights -- vim.cmd("colorscheme paper") -- vim.cmd("colorscheme github-light") -- vim.cmd("set background=light") cmd "syntax enable" cmd "set termguicolors" cmd "colorscheme nord" g.nord_uni...
local Wrapper = require('core/support/Wrapper') ---@class PlayerDevData : PlayerDevelopmentData local PlayerDevData = Wrapper.make() ---@public ---@param owner gameObject ---@return PlayerDevData function PlayerDevData.resolve(owner) return PlayerDevData.wrap(PlayerDevelopmentSystem.GetData(owner or Game.GetPlayer()...
--ARGV[1]代表单个待判断元素对应的字节长度, -- 索引 1-length 代表键,0为不存在,1为存在 local array = {} local aL = table.getn(ARGV) - 1 local kL = table.getn(KEYS) local bitL = ARGV[1] --把单个元素所对应的下标取出来 local elementSize = aL / bitL --第一个元素2...ARGV[1]+1,第二个ARGV[1]+2...2ARGV[1]+1 for index = 1, elementSize --判断单个元素的情况 do local notAdd = true f...
local utils = require 'projects.utils' -- **************************************************************************** -- -- **************************************************************************** local function close() vim.cmd "execute 'SClose'" end local function load(session_name) if session_name and ...
data:extend{ { type = 'bool-setting', name = 'picker-tool-bp-updater', setting_type = 'startup', default_value = true, order = 'tool-bp-updater' } } data:extend{ { type = 'string-setting', name = 'picker-bp-updater-version-increment', setting_...
-- Copyright (C) 2009-2010 ARATA Mizuki -- See file COPYRIGHT for more information local _G = _G local type,tonumber,assert,error,pcall = type,tonumber,assert,error,pcall local pairs,ipairs,rawset,select,unpack = pairs,ipairs,rawset,select,unpack local string = require "string" local table = require "table" local ...
---@meta ---@class cc.DelayTime :cc.ActionInterval local DelayTime={ } cc.DelayTime=DelayTime ---* Creates the action.<br> ---* param d Duration time, in seconds.<br> ---* return An autoreleased DelayTime object. ---@param d float ---@return self function DelayTime:create (d) end ---* ---@return self function Del...
if SERVER then AddCSLuaFile( "shared.lua" ) end SWEP.HoldType = "normal" if CLIENT then SWEP.PrintName = "Death Station" SWEP.Slot = 6 SWEP.ViewModelFOV = 10 SWEP.EquipMenuData = { type="Weapon", model="models/props/cs_office/microwave.mdl", desc="Allows people to...
local zmq = require "lzmq" local zmqcopas = require "zmq.copas" local copas = require "copas" local unpack = table.unpack or unpack local zmqctx = zmq.context({io_threads = 1}) local listenaddr = "inproc://#1" -- Create a listener that runs until it receives -- a single message with "STOP" local listen = zmqctx:socke...
-- Castlevania: Order of Ecclesia -- Simple RAM Display (good for livestreaming!) local opacityMaster = 0.68 local showHitboxes = not true gui.register(function() local frame = emu.framecount() local lagframe = emu.lagcount() local moviemode = "" local igframe = memory.readdword(0x02100374) local camx = math.flo...
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by thealchemist0033. --- DateTime: 4/25/2021 3:38 PM --- --[[ Copyright © 2016 F. Georget <fabien.georget@gmail.com> This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Versi...
local handle1 = Instance.new("Part") handle1.Parent = game.Workspace.acb227 handle1.Name = "NewBrick" handle1.Size = Vector3.new(1, 1, 1) handle1.Position = Vector3.new(15, 15, 15) handle1.Anchored = true handle1.CanCollide = true handle1.Locked = true handle1.BrickColor = BrickColor.new("Really black") handle...
-------------------------------------------------------------------------------- -- GLOBAL CONFIGURATION -- -------------------------------------------------------------------------------- conf = { autostart = 2, stats = true, debug = false, decreasedRadius ...
return { { effect_list = { { type = "BattleBuffAddAttrRatio", trigger = { "onAttach", "onRemove" }, arg_list = { attr = "attackRating", number = -1500 } } } }, { effect_list = { { type = "BattleBuffAddAttrRatio", trigger = { "onAttach", "onRemo...
ability_bristleback = class({}) function ability_bristleback:GetIntrinsicModifierName() return 'modifier_ability_bristleback_buff' end LinkLuaModifier('modifier_ability_bristleback_buff', 'heroes/bristleback/bristleback', LUA_MODIFIER_MOTION_NONE) -- Original https://github.com/EarthSalamander42/dota_imba/blob/77d0b1f...
local component = require("component") local unicode = require("unicode") local filesystem = {} local mtab = {name="", children={}, links={}} local fstab = {} local function segments(path) local parts = {} for part in path:gmatch("[^\\/]+") do local current, up = part:find("^%.?%.$") if current then ...
if vim.b.did_ftp == true then return end local opt_local = vim.opt_local local b = vim.b opt_local.textwidth = 100 opt_local.cursorline = true opt_local.colorcolumn = "101" opt_local.signcolumn = "number" opt_local.cursorline = false opt_local.cursorcolumn = false b.vimrc_null_ls_lsp_signs_enabled = 1
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> 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 $Id$ ]]-- mod...
ACT_VM_FIDGET_EMPTY = ACT_VM_FIDGET_EMPTY or ACT_CROSSBOW_FIDGET_UNLOADED ACT_VM_BLOWBACK = ACT_VM_BLOWBACK or -2 SWEP.Locomotion_Data_Queued = nil local ServersideLooped = { [ACT_VM_FIDGET] = true, [ACT_VM_FIDGET_EMPTY] = true, --[ACT_VM_IDLE] = true, --[ACT_VM_IDLE_EMPTY] = true, --[ACT_VM_IDLE_SILENCED] = tru...
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('StoryBit', { ActivationEffects = { PlaceObj('AddTrait', { 'Trait', "Genius", }), }, Category = "Tick_FounderStageDone", Effects = {}, Enabled = true, Image = "UI/Messages/Events/15_artist.tga", MainMapExclusive = false, Prerequi...
-------------------------------------------------------------------------------- local Icon = {} -------------------------------------------------------------------------------- function Icon:draw(options) local icon = display.newImage( options.parent, options.path ) if(options.disabled...
local mixer_yatm_network = { kind = "machine", groups = { machine_worker = 1, energy_consumer = 1, }, default_state = "off", states = { conflict = "yatm_machines:mixer_error", error = "yatm_machines:mixer_error", off = "yatm_machines:mixer_off", on = "yatm_machines:mixer_on", }, en...
local FxControlHelper = require "fx_control_helper" local fx_controller = FxControlHelper:new() -- # Effekseer の設定 fx_controller:set_effect("vci_subitem_name") fx_controller:disable_effect_loop() -- # AudioClip の設定 fx_controller:set_sound("audio_clip_name") fx_controller:set_sound_volume(0.5) fx_controlle...
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
Hooks:PostHook(UpgradesTweakData, "init", "TIER5_UpgradesTweakData_init", function(self) self.values.player.heisters_never_die = { 50, 100 } self:add_definition_v2("player", "heisters_never_die", {1, 2}) self.values.player.dodge_T5_boost = { 0.4, 0.6 } self:add_definition_v2("player", "dodge_T5_boost",...
local awful = require('awful') local wibox = require('wibox') local beautiful = require('beautiful') local gears = require('gears') local helpers = require('helpers') local bling = require('bling') local dpi = require('beautiful').xresources.apply_dpi beautiful.init(gears.filesystem.get_configuratio...
---------------------------------------------------------------------------------------------------- -- The next group of functions extends the default lua table implementation -- to include some additional useful methods. -- -- @author Makoto -- @release V3.0.0 ---------------------------------------------------------...
rocketturret = class:new() function rocketturret:init(x, y, r) --PHYSICS STUFF self.x = x-1 self.y = y-15/16 self.width = 1 self.height = 15/16 self.static = true self.active = true self.category = 5 self.dir = "left" self.mask = {true} self.autodelete = true --IMAGE STUFF self.drawable = true self....
local TableSetup = [[ local action = {} for i = 1, cases do action[-i] = function() return i end end local function default() end ]] local cases = { TableIndex = { setup = TableSetup, action = ";(action[case] or default)()", }, MetaTable = { setup = TableSetup..[[ setmetatable(action, {__index = funct...
-- Prosody IM -- Copyright (C) 2012-2014 Florian Zeitz -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- -- luacheck: ignore 431/log module:set_global(); local new_uuid = require "util.uuid".generate; local formdecode = require "util.http".formdecode...
local kong_auth_pep_common = require "gluu.kong-common" local path_wildcard_tree = require"gluu.path-wildcard-tree" local pl_tablex = require "pl.tablex" local logic = require "rucciva.json_logic" local array_mt = {} --- Utility function for json logic. Check value is array or not -- @param tab: Any type of data loca...
local list = { { val = 1 }, { val = 4 }, { val = 2 } } table.sort( list, function( item1, item2 ) return item1.val > item2.val end ) for index, val in pairs( list ) do print( index, val.val ) end
local modemPer = peripheral.find("modem") modemPer.closeAll() --close previously open channels modemPer.open(0) modemPer.open(1) while true do local cases = { [87] = "forward", -- w [83] = "back", -- s [65] = "turnLeft", -- a [68] = "turnRight", -- d [81] = "up", -- q [90] = "down", -- z ...
-- this file is a very simple lua file function test() if true then io.write("test\n") end end for i=1,10 do io.write("test"..i.."\n") end io.stdout:flush()
--[[ Copyright (c) 2021-2022 Jason Morley, Tom Sutcliffe 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, ...
#! /usr/bin/env lua -- Default colors to use when writing the merged values -- they have to be valid html color codes as used inside the <font> tag local default_color_a = "white" local default_color_b = "yellow" -- Utility to covert from a srt timestamp in the format "00:00:00,000" to a number function str_t...
function P8INT:REBOOT_OUTLET(outletNumber) local uri = P8INT:GET_MATRIX_URL() .. "/power/reboot/" .. outletNumber C4:urlGet(uri) end
DEFINE_BASECLASS( "player_default" ) local PLAYER = {} -- -- See gamemodes/base/player_class/player_default.lua for all overridable variables -- PLAYER.DisplayName = "Prop" PLAYER.WalkSpeed = 222 PLAYER.RunSpeed = 222 PLAYER.CanUseFlashlight = false PLAYER.UseVMHands = false PLAYER.Avo...
-- =========================================================================== -- Base File -- =========================================================================== include("UnitFlagManager"); -- =========================================================================== -- Cached Base Functions -- =============...
--[[ PHYSICS LIBRARY THING WRITTEN BY MAURICE GU�GAN FOR MARI0 DON'T STEAL MY SHIT Licensed under the same license as the game itself. ]]-- --MASK REFERENCE LIST ---1: *ALWAYS NOT COLLIDE* ---2: WORLD ---3: MARIO ---4: GOOMBA ---5: KOOPA ---6: MUSHROOM/ONEUP/FLOWER/STAR ---7: GEL DISPENSER ---8: GEL ---9: BOX --...
local INVENTORY_TYPE_ID = "grid" ITEM.name = "Enhanced Backpack" ITEM.desc = "Light as a feather, larger than it seems." ITEM.model = "models/warz/alicebackpack.mdl" ITEM.material = "models/props_lab/security_screens" ITEM.width = 2 ITEM.height = 2 ITEM.invWidth = 4 ITEM.invHeight = 4 ITEM.category = "Storage" ITEM.fl...
modifier_shaco_jack_in_the_box = class({}) -------------------------------------------------------------------------------- -- Classifications function modifier_shaco_jack_in_the_box:IsHidden() return false end function modifier_shaco_jack_in_the_box:IsPurgable() return false end ----------------------------------...
local socket = require "socket" local http = require "socket.http" print("socket version: " .. socket._VERSION) local host1 = "www.baidu.com" local file = "/ " local host = "www.lua.org" local file1 = "/ftp/lua-5.3.3.tar.gz " local file2 = "/ftp/lua-5.3.2.tar.gz " local file3 = "/ftp/lua-5.3.1.tar.gz " loc...
--------------------------------- -- Theme and Buffer Settings -- --------------------------------- buffer.use_tabs = false buffer.tab_width = 4 buffer.wrap_mode = buffer.WRAP_WORD buffer.edge_column = 79 buffer.edge_mode = buffer.EDGE_LINE if CURSES then view:set_theme('jabbo-term') end -- Theme if not CURSE...
local Light = { ["MainBackground"] = Color3.new(255/255, 255/255, 255/255), ["Titlebar"] = Color3.new(227/255, 227/255, 227/255), ["Dropdown"] = Color3.new(255/255, 255/255, 255/255), ["Tooltip"] = Color3.new(255/255, 255/255, 255/255), ["Notification"] = Color3.new(255/255, 255/255, 255/255), ["ScrollBar"] = Col...
-- A component to render a stack of notification messages local Message = require "message" local Notifier = { canvas = nil, style = { margin_top = 120, space = 10 } } function Notifier:new (canvas, messages) local o = setmetatable ({}, self) self.__index = self o.canvas = canvas o.messages = ...
-- pass it a table and optionally hierarchy number function printNbtTables(t, n) -- default hierarchy n to 0 if not set n = n or 0 -- indent string, length based on hierarchy local s = string.rep(" ", n) -- loop through all key/value pairs of the table for k,v in pairs(t) do -- ...