content
stringlengths
5
1.05M
----------------------------------- -- Area: Kazham (250) -- NPC: Jakoh Wahcondalo -- !pos 101 -16 -115 250 -- Starts Quests: A Question of Taste, Cloak and Dagger, Everyone's Grudging -- Inovlved in Missions: ZM3 Kazham's Chieftainess, WM7-2 Awakening of the Gods -- Involved in Quests: Tuning Out ---------------------...
-- Tuple of profile has always 2 fields. -- Field 1 -- user-id -- Field 2 -- key/value dict. Key is always a number. proscribe_host = '10.161.41.111' proscribe_port = 27017 keys_to_proscribe = {324} -- Create a user, then init storage, create functions and then revoke ALL priveleges from user local function init_stor...
-- author chenjian@eventmosh.com -- 此列表需要全匹配 '111.111.111.111' local white_list = { }; -- 此列表只需要匹配前两位 '111.111' local white_list_16 = { } -- 此列表只需要匹配前三位 '111.111.111' local white_list_24 = { } local function ignoreWhitelist(ip) local tips = false; for key,value in ipairs(white_list) do if ip == val...
#!/usr/bin/env luajit --[[ kerr in cartesian form: Alcubierre p. 56, Baumgarte & Shapiro p. 52 ds^2 = (eta_uv + 2 H l_u l_v) for eta_uv = diag(-1,1,1,1) H = (r M - Q^2 / 2) / (r^2 + a^2 z^2 / r^2) l_u = (1, (rx + ay) / (r^2 + a^2), (ry - ax) / (r^2 + a^2), z / r) r is defined as (x^2 + y^2) / (r^2 + a^2) + z^2...
vim.api.nvim_exec( [[ function! FzfWrapHelper(opts) call fzf#run(fzf#wrap(a:opts)) endfunction ]], false ) return vim.fn["FzfWrapHelper"]
require 'lfs' -- Ensure the test is launched within the specs/ folder assert(string.match(lfs.currentdir(), "specs")~=nil, "You must run this test in specs folder") local initial_dir = lfs.currentdir() -- Go to specs folder while (not string.match(lfs.currentdir(), "/specs$")) do lfs.chdir("..") end local specs_d...
------------- -- lua sandboxed environment -- function to cross out functions and userdata. -- modified from dump() function atlatc.remove_invalid_data(o, nested) if o==nil then return nil end local valid_dt={["nil"]=true, boolean=true, number=true, string=true} if type(o) ~= "table" then --check valid data type ...
function UnitNetworkHandler:give_weapon(is_secondary, weapon_factory_id, skin_id) if not self._verify_gamestate(self._gamestate_filter.any_ingame) or not self._verify_sender(sender) then return end local primary = { equipped = true, factory_id = weapon_factory_id, blueprint = manager...
if (get_window_name() == "Clocks") then set_window_position(2500, 550); end
ITEM.name = "TOZ-34 Hunting Shotgun" ITEM.description= "A break-action hunting shotgun firing 12 gauge shells." ITEM.longdesc = "A double barrel hunting shotgun, a classic Russian design popular with hunters and loners alike.\nThe cheap price and long barrel makes it useful for engaging animals and unarmed targets at r...
local misc = require('cmp.utils.misc') local vim_source = {} ---@param id number ---@param args any[] vim_source.on_callback = function(id, args) if vim_source.to_callback.callbacks[id] then vim_source.to_callback.callbacks[id](unpack(args)) end end ---@param callback function ---@return number vim_source.to...
local BaseAPI = require("orange.plugins.base_api") local common_api = require("orange.plugins.common_api") local api = BaseAPI:new("redirect-api", 2) api:merge_apis(common_api("redirect")) return api
local inertic = {} local function toRad(x) return x * (22fx/7fx) / 180fx end local function toDeg(x) return x * 180fx / (22fx/7fx) end function inertic.new(x, y, rotato) local pentagon1 = pewpew.new_customizable_entity(x, y) pewpew.customizable_entity_set_mesh(pentagon1, "/dynamic/p...
local plyMeta = FindMetaTable("Player") function plyMeta:isArrested() return false end
AddCSLuaFile() NIXBOT_MODULES_ENABLED = { "hook", "derma", "ui" }
--[[ number格式化 ]] local NumberLib = {} --判断参数是非数字(not a number) function NumberLib.isNum(_n) return tonumber(_n) and true or false; end --转换成数字,若无法转换成数字,返回默认值,没给定默认值则返回0 function NumberLib.valueOf(_s, _d) return tonumber(_s) or (_d or 0); end -- 获取随机数 function NumberLib.getRandom(round) return math.random(round)...
local json = require("dkjson"); local tbl = getDeviceInfo(); local str = json.encode (tbl, { indent = true }); print (str)
local server = require "resty.websocket.server" local rpc = require "util.rpc" local wb, err = server:new{ timeout = 10, -- in milliseconds max_payload_len = 5242880, -- 5M } if not wb then ngx.log(ngx.ERR, "failed to new websocket: ", err) return ngx.exit(444) end local handler = rpc:new_handler(wb)...
test = require 'u-test' common = require 'common' function SocialManager1Cpp_Handler() StartSocialManagerDoWorkLoopCpp() Sleep(1000) StopSocialManagerDoWorkLoopCpp() test.stopTest(); end test.SocialManager1Cpp = function() common.init(SocialManager1Cpp_Handler) end function OnSocialManagerDoWorkC...
print ([[ A depth-first traversal of a feature node graph starts at the top-level feature node (or pseudo-node) and explores as far along each branch as possible before backtracking. Let's assume that the feature nodes are stored in a list in the order of their traversal (called the ``feature node list''). Two featur...
local FOLDER_NAME, private = ... local L = LibStub("AceLocale-3.0"):NewLocale(FOLDER_NAME, "ptBR", false) if not L then return end L["ALT_KEY"] = "Alt-" L["COLLAPSE_SECTION"] = "Recolher" L["COLUMN_LABEL_REALM"] = "Servidor" L["CONTROL_KEY"] = "Ctrl-" L["EXPAND_SECTION"] = "Expandir" L["LEFT_CLICK"] = "Botão da Esque...
-- Following Websocket RFC: http://tools.ietf.org/html/rfc6455 local struct = require'struct' local bit = require'websocket.bit' local band = bit.band local bxor = bit.bxor local bor = bit.bor local tremove = table.remove local srep = string.rep local ssub = string.sub local sbyte = string.byte local schar = string.cha...
local apply_cli_cell = system_load("cells/shared/fsrv.lua")() local function deploy_pipeline(monitor) local prev monitor = monitor.head -- in build-pipe we check so that there is > 1 entry in the chain while monitor do prev = monitor monitor = monitor.next -- blob transfers (blob=true) instead of state transf...
-- local M = {} M.AliceBlue = cc.c4b(240, 248, 255, 255) M.AntiqueWhite = cc.c4b(250, 235, 215, 255) M.Aqua = cc.c4b(0, 255, 255, 255) M.Aquamarine = cc.c4b(127, 255, 212, 255) M.Azure = cc.c4b(240, 255, 255, 255) M.Beige = cc.c4b(245, 245, 220, 255) M.Bisque = cc.c4b(255, 228, 196, 255) M.Black = cc.c4b(0, 0, 0, 255)...
local skynet = require "skynet" local socket = require "skynet.socket" local sproto = require "sproto" local sprotoloader = require "sprotoloader" local pb = require "pb" local invoke = require "service.invoke" local logger = require "logger" local netpack = require "net.netpack" require "tools/stringtool" local WATCH...
--https://love2d.org/wiki/Tutorial:Fire_Toward_Mouse for the overall bullet implementation --https://love2d.org/forums/viewtopic.php?t=47565 to make the bullets fire based on player direction and not mouse direction bullet = {} bullet.animation = {} bullet.food = {} bulletSpeed = 0 local collision = require("entities/...
object_tangible_storyteller_event_props_pr_love_day_fountain = object_tangible_storyteller_event_props_shared_pr_love_day_fountain:new { } ObjectTemplates:addTemplate(object_tangible_storyteller_event_props_pr_love_day_fountain, "object/tangible/storyteller/event_props/pr_love_day_fountain.iff")
SetupProject("Tut_06_Translation", "Translation.cpp", "data/ColorPassthrough.frag", "data/PosColorLocalTransform.vert") SetupProject("Tut_06_Scale", "Scale.cpp", "data/ColorPassthrough.frag", "data/PosColorLocalTransform.vert") SetupProject("Tut_06_Rotations", "Rotations.cpp", "data/ColorPassthrough.frag", "data/Po...
minetest.register_abm({ -- change wetness of soil by time label = "Farming soil", nodenames = {"group:field"}, interval = 15, chance = 4, action = function(pos, node) local starttime=os.clock() local n_def = minetest.registered_nodes[node.name] or nil if not n_def then return end local wet = n_def.s...
--[[--------------------------------------------------------------------------- Here's an example weapon that you can edit ---------------------------------------------------------------------------]] AddCSLuaFile() if CLIENT then SWEP.PrintName = "AK47" -- The name that shows in the scroll menu and when you hover ov...
BorderPatrolNpc = { click = async(function(player, npc) local t = { graphic = convertGraphic(npc.look, "monster"), color = npc.lookColor } player.npcGraphic = t.graphic player.npcColor = t.color player.dialogType = 0 player.lastClick = npc.ID if player.quest["leviathan"] == 0 then player:dialog...
require("null-ls").setup({ sources = { require("null-ls").builtins.code_actions.gitsigns, require("null-ls").builtins.diagnostics.write_good, require("null-ls").builtins.diagnostics.markdownlint, require("null-ls").builtins.diagnostics.shellcheck.with({ diagnostics_format = "[#{c}] #...
require("unitAI/human_king_ai") require("unitAI/undead_king_ai") if Base == nil then _G.Base = class({}) end function Base:CreateHumanBase() local team = DOTA_TEAM_GOODGUYS local king_spawn_point = Entities:FindByName(nil, "human_king"):GetAbsOrigin() local blacksmith_position = Entities:FindByName(ni...
if not mylib then mylib = {} end function mylib.add_angel_num_icon(table_name, num, x, y, ratio) if ratio==nil then ratio = 0.32 end if x==nil then x = -12 end if y==nil then y = -12 end if angelsmods and angelsmods.petrochem and num<=5 then table.insert(table_name.icons, { icon = "__angelspetrochem__/g...
--[[ Distribution of jobs to engies based on priorities and location of units TODOs: Add support for assistance Respect component location requirements Add support for marker based mobile jobs (mexes / hydros) Handle failures to find locations better Flag engies / jobs th...
local M = require('xe.node_def._checker') local CalcParamNum = M.CalcParamNum local CheckName = M.CheckName local CheckVName = M.CheckVName local CheckExpr = M.CheckExpr local CheckPos = M.CheckPos local CheckExprOmit = M.CheckExprOmit local CheckCode = M.CheckCode local CheckParam = M.CheckParam local CheckNonBlank = ...
CF = nil Citizen.CreateThread(function() while CF == nil do Citizen.Wait(0) TriggerEvent('cf:getSharedObject', function(obj) CF = obj end) end end) RegisterCommand("help", function(source, args, raw) menu() end) function menu() local _elements = {} table.insert(_ele...
mapFields = require("lib/mapFields") self.say("Bowmen are blessed with dexterity and power, taking charge of long-distance attacks, providing support for those at the front line of the battle. Very adept at using landscape as part of the arsenal.") self.say("If you wish to experience what it's like to be a Bowman, com...
-- flags local disable_virtual_hooks = true local enable_pure_virtual = true local default_private_access = false local access = {public = 0, protected = 1, private = 2} function preparse_hook(p) if default_private_access then -- we need to make all structs 'public' by default p.code = string.gsub(p.code, "...
--[[ This prompt shows up when your character is R15 and has layered clothing equipped, and you try to switch to R6. It warns that R6 does not support layered clothing and therefore all layered clothing items will be removed. Action buttons: - Cancel (character stays as R15) - Confirm (character becomes R6, all ...
package.path = package.path .. ';../spec/?.lua' describe("Fuzzel", function() describe(variant, function() fuzzel = require('utilities.fuzzy.fuzzel') setup(function() a = "abcdefg" b = "lbcedfg" c = "badcfeh" d = "hijklmn" end) describe("DamerauLevenshtein_extended", functio...
-- the key binding local bindKeys = {"ctrl", "shift"} -- arrange windows hs.grid.setGrid('8x8') hs.grid.setMargins('0x0') local gw = hs.grid.GRIDWIDTH local gh = hs.grid.GRIDHEIGHT local windowset = function(x, y, w, h) return function() local win = hs.window.focusedWindow() local f = win:frame() f.x = x f...
local playsession = { {"4xBen", {215937}}, {"snoetje", {17954}}, {"RagingPotato", {3402}}, {"Ybloc", {82778}}, {"soapster", {15986}} } return playsession
--[[ RealMobHealth Overrides Module by SDPhantom https://www.wowinterface.com/forums/member.php?u=34145 ]] ------------------------------------------------------------------ -------------------------- --[[ Namespace ]] -------------------------- local AddOn=select(2,...); AddOn.API=AddOn.API or {}; ----------------...
--====================================================================-- -- dmc_widget/widget_background/view_factory.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2015 David McCuskey Permissi...
-- VARIABLES =================================================================== local playerTransform = nil local ownerTransform = nil local jailFenceTransform = nil local slimeTransform = nil local originalRotation = Vector3() local owner_audioEmitter = nil local callOnce = true local minDist = 8 local minHeight = 0...
local STRINGS = GLOBAL.STRINGS STRINGS.CIVI_GEMS = {} -- character -- STRINGS.CHARACTER_NAMES.civi = "Civi" STRINGS.CHARACTER_TITLES.civi = "光暗魔法使" STRINGS.CHARACTER_ABOUTME.civi = "控制光与暗的魔法使, 拥有超强的适应能力和战斗能力." STRINGS.CHARACTER_DESCRIPTIONS.civi = "*通过黑/白宝石升降级\n*能够操纵噩梦" STRINGS.CHARACTER_QUOTES.civi = "\"大幻梦森罗万象...
--=========== Copyright © 2020, Planimeter, All rights reserved. ===========-- -- -- Purpose: -- --==========================================================================-- local ffi = require( "ffi" ) local SDL = require( "sdl" ) io.input( framework.execdir .. "include/glcorearb.h" ) ffi.cdef( io.read( "*all" ) ) ...
local mmmtest = {} function mmmtest.add(a, b) return a + b end function mmmtest.sub(a, b) return a - b end
if GetBot():IsInvulnerable() or not GetBot():IsHero() or not string.find(GetBot():GetUnitName(), "hero") or GetBot():IsIllusion() then return; end local ability_item_usage_generic = dofile( GetScriptDirectory().."/ability_item_usage_shutnik" ) local utils = require(GetScriptDirectory() .. "/util") function AbilityLe...
local Class = require 'lib/middleclass' local Object = require 'object' local Cabbage = Class('Cabbage', Object) local IMAGE = love.graphics.newImage('asset/cabbage.png') local QUAD = love.graphics.newQuad(0, 0, 16, 16, IMAGE:getDimensions()) Cabbage.static.drawGoal = function(r, c) local cr, cg, cb, ca = love.gr...
-- 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...
include("terms") enum = 1 + math.random(15); denom = 1 + math.random(20); temp1 = math.floor(enum/denom) rest1 = enum - temp1 * denom temp2 = math.floor(denom/enum) rest2 = denom - temp2 * enum if (rest1 == 0 or rest2 == 0) then enum = enum + 1 end q = lib.math.gcd(enum, denom) broj = enum/q imen = denom/q ...
local jchash = require "chash.jchash" local ok, new_table = pcall(require, "table.new") if not ok then new_table = function (narr, nrec) return {} end end local function stname(string) -- @string: {string, weight} return string.format("%s#%s", tostring(string[1]), tostring(string[2])) end local function ...
local args = { ... } local b = require "utils.build" local builder = b.new_builder( ".build/cross-lua" ) local utils = b.utils local sf = string.format builder:init( args ) builder:set_build_mode( builder.BUILD_DIR_LINEARIZED ) local suffix = utils.is_windows() and '.exe' or '' local output = 'luac.cross' .. suffix lo...
PLUGIN.name = "Traits" PLUGIN.author = "Pilot" PLUGIN.desc = "Adds traits for characters." -- I hate the way Chessnut makes me add columns if (SERVER) then nut.db.waitForTablesToLoad() :next(function() nut.db.query("ALTER TABLE nut_characters ADD COLUMN _trait INTEGER") :catch(function() end) end) en...
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") include("entities/base_wire_entity.lua") util.AddNetworkString("wac.seatSwitcher.switch") function ENT:Initialize() self.Entity:SetModel("models/props_c17/consolebox01a.mdl") self.Entity:PhysicsInit(SOLID_VPHYSICS) self.En...
state = {} print("Loaded gamestate system ...") state.currentState = "splash" -- Change the current gamestate. function state:changeState(input) self.currentState = input end -- Get the current gamestate. function state:getState() return self.currentState end -- Check if the current gamestate is a certain one...
local LSM = LibStub("LibSharedMedia-3.0") if LSM == nil then return end
RUSSIAN = {} --Updater RUSSIAN["UPDATER_AVAILABLE"] = "доступна." RUSSIAN["UPDATER_QUESTION_UPDATE"] = "Вы хотите обновить приложение?" RUSSIAN["UPDATER_DOWNLOADING"] = "Загрузка обновления..." RUSSIAN["UPDATER_PERCENT"] = "Заверше...
--[[ ******************************************************************************** Project owner: RageQuit community Project name: GTW-RPG Developers: Mr_Moose Source code: https://github.com/GTWCode/GTW-RPG Bugtracker: https://forum.404rq.com/bug-reports Suggestions: https://forum.404rq.com/mta-se...
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BUBBLES) combat:setArea(createCombatArea(AREA_CIRCLE6X6)) function onTargetCreature(creature, target) creature:addDamageCondition(target, CONDITION_DROWN, DAMAGELIST_CONSTANT_PERIOD, 20...
if RequiredScript == "lib/managers/enemymanager" then EnemyManager._MAX_NR_CORPSES = 0 EnemyManager.MAX_MAGAZINES = 0 local old_init = EnemyManager.init function EnemyManager:init(...) old_init(self, ...) self._corpse_disposal_upd_interval = 0 self._shield_disposal_upd_interval = 0 self._shield_disposal_lif...
-- FOOD MOD -- A mod written by rubenwardy that adds -- food to the minetest game -- ===================================== -- >> food/support.lua -- Support external mods -- ===================================== -- The following ingredient list is licensed under WTFPL -- You may use the list in your mod. I am doing th...
RNG_BYTES = { 0x0133, 0x0134, 0x0135, 0x0136, 0x0137, 0x0138, 0x0139, 0x013A } RNG_NUMBER = 0x00 function unrandomize() for _, rng_byte in pairs(RNG_BYTES) do memory2.WRAM:byte(rng_byte, RNG_NUMBER) end end function on_input() unrandomize() end
local path = ... local folder = string.match(path, ".*/") or "" local splash = {} local runtime, tilt, length, heart, powered, win function splash.load() splash = {} win = {} runtime = 0 tilt = 0 length = 9 win.w, win.h, win.flags = love.window.getMode() heart = love.graphics.newImage(folder ....
-- 2020 (c) kontakt@herrsch.de local getn = table.getn or function(t) return #t end -- Lua > 5.1 idom local hotload = require "hotload" local class = hotload "class" local Database = hotload "database" local Storage = class(Database) function Storage:new(table, column1, column2, database) Database.new(self, dat...
function GM:InitializePlayer(ply) ply.rtg_Level = 1 ply.rtg_XP = 0 ply.rtg_SkillAmount = 0 ply.rtg_Skills = {} ply.rtg_gBalloonPops = 0 end
local Sources = ACF.LaserSources net.Receive("ACF_SetupLaserSource", function() local Entity = net.ReadEntity() local NetVar = net.ReadString() local Offset = net.ReadVector() local Direction = net.ReadVector() local Filter = net.WriteType() ACF.AddLaserSource(Entity, NetVar, Offset, Direction, nil, Filter) end...
local skynet = require "skynet" local harbor = require("skynet.harbor") local AGENT_MAX = 20 local mode,handlePath = ... if mode == "agent" then local handle = require(handlePath) skynet.start(function() skynet.dispatch("lua", function (_,_,cmd,...) local f = assert(handle[cmd]) skynet.ret(skynet.pack(f(...)))...
data:extend( { { type = "equipment-grid", name = "grid-alpha", width = 14, height = 14, equipment_categories = {"armor"} }, { type = "equipment-grid", name = "grid-omega", width = 20, height = 20, equipment_categories = {"armor"} } } )
local CONFIG_FILE_PREFIX = "dfcaverns_" df_mapitems.config = {} local print_settingtypes = false local function setting(stype, name, default, description) local value if stype == "bool" then value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name, default) elseif stype == "string" then value = minetest.se...
local class = require("pl.class") local CommandType = require("core.CommandType") local PlayerRoles = require("core.PlayerRoles") ---@class Command : Class local M = class() function M:_init(bundle, name, def, file) self.bundle = bundle self.type = def.type or CommandType.COMMAND self.name = nam...
local mage = {1, 2, 5, 6} local paladin = {3, 7} local knight = {4, 8} local combat = {} for i = 45, 60 do combat[i] = Combat() local condition1 = Condition(CONDITION_ATTRIBUTES) condition1:setParameter(CONDITION_PARAM_TICKS, 7000) condition1:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) condition1:setPa...
-- lua script for GPON exploit local url = require "http/util/url" function canHandle(message) if string.match(message, 'gpon.php') then return true end return false end function handle(message) local foundURL = url.retrieve(message); if (foundURL and string.match(foundURL, 'gpon.php')) th...
-- -- c_exported_functions.lua -- function createPointLight(posX,posY,posZ,colorR,colorG,colorB,colorA,attenuation,...) local reqParam = {posX,posY,posZ,colorR,colorG,colorB,colorA,attenuation} local isThisValid = true local countParam = 0 for m, param in ipairs(reqParam) do countParam = countParam + 1 isThisV...
-- Handles populating the recipe dialog function open_recipe_dialog(flow_modal_dialog, modal_data) local player = game.get_player(flow_modal_dialog.player_index) local product = modal_data.product flow_modal_dialog.parent.caption = {"fp.add_recipe"} -- Result is either the single possible recipe_id, o...
heavy_rocket_launcher = { minimumLevel = 0, maximumLevel = -1, customObjectName = "Heavy rocket launcher", directObjectTemplate = "object/weapon/ranged/heavy/heavy_rocket_launcher.iff", craftingValues = { {"mindamage",900,1350,0}, {"maxdamage",1550,4500,0}, {"attackspeed",12.0,7.0,1}, {"woundchance",17,31,...
----------------------------------- -- Area: Garlaige Citadel -- Mob: Citadel Bats ----------------------------------- require("scripts/globals/regimes") ----------------------------------- function onMobDeath(mob, player, isKiller) tpz.regime.checkRegime(player, mob, 705, 2, tpz.regime.type.GROUNDS) end
cut = 316 niteSings = {{17,30}, {49,64}, {81,96}, {113,130}, {133,138}, {141,162}, {177, 180}, {185,200}, {217,232}, {249, 298}, {313,329}} singIdx = 1 prevCombo = 0 currentBeat = 0 -- So the way we are checking if the current beat is within "nite's turn" -- is a bit more efficient than simply looping through the arr...
require 'busted.runner'() local fun = require "fun" local Text = require "../Text" describe("Text", function () it("Vectorise tokens", function () local tokens = fun.iter({ "a", "b", "ab" }):map(Text.tokeniseWord) local characters, characterToIndex = Text.lookupTable(tokens) assert.are.same(charact...
----------------------------------- -- Area: Northern San d'Oria -- NPC: Helaku -- Involved in Missions 2-3 -- !pos 49 -2 -12 231 ----------------------------------- local ID = require("scripts/zones/Northern_San_dOria/IDs") require("scripts/globals/settings") require("scripts/globals/keyitems") require("scripts/globa...
-- https://vi.stackexchange.com/a/3749/38754 local function open_file_branch(branch, fname) vim.api.nvim_exec('silent r! git show ' .. branch .. ':./' .. fname, false) vim.api.nvim_command('1d') local fname_without_path = fname:match( "([^/]+)$") local base_bufcmd = 'silent file [' .. branch .. '] ' .. ...
function sleeprint(n) local t0 = os.time() while os.time() - t0 <= n do coroutine.yield(false) end print(n) return true end coroutines = {} for i=1, #arg do wrapped = coroutine.wrap(sleeprint) table.insert(coroutines, wrapped) wrapped(tonumber(arg[i])) end done = false while not done do done = t...
local math = require("math") local math_floor = math.floor local ngx_now = ngx.now local setmetatable = setmetatable local _M = { _VERSION = '0.01' } local mt = { __index = _M } function _M.new(reqs, window, cache, expire) if not expire then expire = window * 1.5 else expire = expire ...
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:29' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRI...
#!/usr/bin/lua local Heapsort = {} ----------------------------------------------------------- Heapsort.bubble_down = function(table, begin, last) local root = begin local swap = root local child = root * 2 while child <= last do if table[swap] < table[child] then swap = child end if child + 1 <...
return (function(self, name) if name == nil then -- TODO error here instead of silently ignoring return end local t = api.env.C_Texture.GetAtlasInfo(name) if t == nil then -- TODO determine if we should error here instead of silently ignoring return end m(self, 'SetTexture', t.filename or to...
createObject(2066,348.49166870117,166.05429077148,1013.1875,0,0,0,3,837) createObject(14455,344.10083007813,163.92903137207,1014.8592529297,0,0,270.26989746094,3,837) createObject(1714,347.11071777344,163.90995788574,1013.1875,0,0,0,3,837) createObject(1998,336.17868041992,174.39768981934,1013.1875,0,0,0,3,837) cre...
-- See LICENSE for terms if not g_AvailableDlc.shepard then print("Block Pets needs DLC Installed: Project Laika!") return end local mod_EnableMod -- fired when settings are changed/init local function ModOptions() mod_EnableMod = CurrentModOptions:GetProperty("EnableMod") end -- load default/saved settings OnMs...
FACTION.name = "Cremator" FACTION.description = "--." FACTION.color = Color(0, 150, 0) FACTION.pay = 10 FACTION.models = {"models/cremator.mdl"} FACTION.weapons = {"weapon_crem_immolator"} -- uncomment this if you using vfire -- FACTION.weapons = {"weapon_bp_flamethrower_edited", "weapon_bp_immolator_edited"} -- uncom...
function setDefault(id) _G['defaultStrum'..id..'X'] = defaultX(id) _G['defaultStrum'..id..'Y'] = defaultY(id) setActorAngle(0,id) x0 = getActorX(0) x1 = getActorX(1) x2 = getActorX(2) x3 = getActorX(3) x4 = getActorX(4) x5 = getActorX(5) x6 = getActorX(6) x7 = getActorX(7) y0 = getActorY(0) ...
test = {"т", "т", "н", "н", "т", "н", "т", "т", "т", "н", "н", "н", "т", "н", "т", "т", "т", "н"}
operation = {"Increase", "Decrease"}
-- identify script script = { name = "Test", version = "0.1.0.0" } --[[ versions = { lua = _VERSION, hub, hub_api, lua_plugin } user = { name, email, share = { bytes }, soft = { name, vers }, hubs = { normal, registered, operator }, slots = { total }, ...
---@meta ---@class cc.PhysicsJointGroove :cc.PhysicsJoint local PhysicsJointGroove={ } cc.PhysicsJointGroove=PhysicsJointGroove ---* Set the anchor point on body b. ---@param anchr2 vec2_table ---@return self function PhysicsJointGroove:setAnchr2 (anchr2) end ---* Set the line begin position ---@param grooveA ve...
ESX.Math = {} ESX.Math.Round = function(value, numDecimalPlaces) if numDecimalPlaces then local power = 10^numDecimalPlaces return math.floor((value * power) + 0.5) / (power) else return math.floor(value + 0.5) end end -- credit http://richard.warburton.it ESX.Math.GroupDigits = function(value) local left,n...
return { gen_target = "5.1", gen_compat = "off", global_env_def = "types", include_dir = { "teal", "types" }, source_dir = "teal", build_dir = "lua", }
local composer = require( "composer" ) local scene = composer.newScene() -- ----------------------------------------------------------------------------------- -- Code outside of the scene event functions below will only be executed ONCE unless -- the scene is removed entirely (not recycled) via "composer.removeSce...
-- module_equip.lua -- Written by fuba (fuba82 on CurseForge) and updated by KyrosKrane Sylvanblade (kyros@kyros.info) -- Copyright (c) 2020 fuba and KyrosKrane Sylvanblade -- Licensed under the MIT License, as per the included file. -- Addon version: @project-version@ -- This file defines a module that APR can handle...