content
stringlengths
5
1.05M
local IPlotRenderable = require("mod.plot.api.IPlotRenderable") local Path = require("mod.plot.api.Path") local PlotLine = class.class("PlotLine", IPlotRenderable) function PlotLine:init(color) self.path = Path:new() self.color = color or { 0, 0, 0 } end function PlotLine:add_point(x, y) table.insert(self.p...
--[[ Melee Ability - Server v1.2-b by: standardcombo Handles melee combat interaction of attack abilities on weapons such as swords. --]] -- Module dependencies local MODULE = require( script:GetCustomProperty("ModuleManager") ) function COMBAT() return MODULE:Get("standardcombo.Combat.Wrap") end local EQUIPM...
local cache = {} local module = { cache = cache } module.start = function() hs.fnutils.each(notify.enabled, function(notifyName) cache[notifyName] = require('utils.notify.' .. notifyName) cache[notifyName]:start() end) end module.stop = function() hs.fnutils.each(cache, function(notify) notify:stop...
local playsession = { {"Vogrov", {14460}}, {"Phoenix27833", {29650}}, {"MrJSelig", {582194}}, {"Llzzard", {2936}}, {"ColonelWill", {1772}}, {"625dennis", {2099}}, {"LeeFactor", {1109967}}, {"Ed9210", {1231168}}, {"AGoodName", {411121}}, {"FudgeZombie", {5831}}, {"Swagbag", {754569}}, {"cactauz", {13542}}, ...
--- help to run a command and process result to get data --- when command run it display a loading text local uv = vim.loop local animation = require('wlanimation') local efffects = require('wlanimation.effects') local cache_utils = require('windline.cache_utils') local M = {} local tbl_loading = { '⠋', '⠙', '⠹', '⠸'...
local PetVendors = { --Table of Pet Vendor Locations [1] = {Name = TEXT("Sys114932_name"), X = 0.491, Y = 0.410}, --Howling Mountains - Matt Sorrun [2] = {Name = TEXT("Sys114936_name"), X = 0.597, Y = 0.879}, --Silverspring - Cruise Sorrun [4] = {Name = TEXT("Sys114937_name"), X = 0.564, ...
local event = require("event") local AutoYielder = {} AutoYielder.lastYieldTime = os.clock() AutoYielder.yieldInterval = 4.5 function AutoYielder.yield() local now = os.clock() if now - AutoYielder.lastYieldTime >= AutoYielder.yieldInterval then event.pull(0.1) AutoYielder.lastYieldTime = now ...
--[==[ - Author: ezhex1991@outlook.com - CreateTime: 2018-11-28 18:53:31 - Organization: #ORGANIZATION# - Description: --]==] local GameObject = CS.UnityEngine.GameObject local PrimitiveType = CS.UnityEngine.PrimitiveType local M = {} ----- CODE ----- local cube = GameObject.CreatePrimitive(PrimitiveType.Cub...
local image = {} local hsvShader local supported = select(2, love.getVersion()) == 10 or love.graphics.isSupported("shader") image.shader = [[ vec3 rgb2hsv(vec3 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4...
function addNotification(player, text, time) if isElement(player) and getElementType(player) == "player" and type(text) == "string" then triggerClientEvent(player, "onClientAddNotification", player, text, time) return true else return false end end
----------------------------------------------------------------------- -- Upvalued Lua API. ----------------------------------------------------------------------- -- Functions local date = _G.date local error = _G.error local type = _G.type -- Libraries local table = _G.table ---------------------------------------...
return { version = "1.5", luaversion = "5.1", tiledversion = "1.7.2", orientation = "orthogonal", renderorder = "right-down", width = 72, height = 64, tilewidth = 16, tileheight = 16, nextlayerid = 5, nextobjectid = 89, properties = {}, tilesets = { { name = "dungeon-tileset", ...
-- Implement the workspace files command for solution-scope files require('vstudio') premake.api.register { name = "workspace_files", scope = "workspace", kind = "list:string", } premake.override(premake.vstudio.sln2005, "projects", function(base, wks) if wks.workspace_files and #wks.workspace_files > ...
local U = require'snippets.utils' local go = { } local m = {} m.get_snippets = function() return go end return m
local AmmoTypes = {} -- -- Called by modders to add a new ammo type. -- Ammo types aren't something you can add on the fly. You have one -- opportunity during loadtime. The ammo types should also be IDENTICAL on -- server and client. -- If they're not you will receive errors and maybe even crashes. -- -- -- game.A...
if not Global.editor_mode then return end local F = table.remove(RequiredScript:split("/")) if F == "groupaistatebase" then Hooks:PostHook(GroupAIStateBase, "_init_misc_data", "EditorGroupAIInit", function(self) self._enemies_spawned_assault = 0 self._enemies_spawned_lifetime = 0 self._en...
data:extend{ { type = "electric-energy-interface", name = "microwave-power-receiver", icon = "__base__/graphics/icons/accumulator.png", icon_size = 32, flags = {"placeable-neutral", "player-creation"}, minable = {hardness = 0.2, mining_time = 0.5, result = "electric-e...
local F = "__Factorissimo2__"; local S = "__space-factorissimo-updated__" require("circuit-connector-sprites") --[[ Missing Assets -dimentions: width = 832 height = 736 -/graphics/icon/space-factory-4.png -/graphics/factory/space-factory-4-shadow.png -/graphics/factory/space-factory-4.png -dimentions: ...
-- rainbow tools minetest.register_tool("ores:rainbow_pick", { description = "Rainbow Pickaxe", inventory_image = "ranbowpick.png", tool_capabilities = { full_punch_interval = 1.2, max_drop_level=0, groupcaps={ cracky = {times={[1]=3.00, [2]=1.20, [3]=0.40}, uses=30, maxlevel=2}, }, damage_groups = {fle...
-- See LICENSE for terms local table_clear = table.clear local table_find = table.find local T = T local procall = procall local options local mod_MoreSpecInfo local mod_PosPassList local mod_HideRocket local mod_PosX local mod_PosY -- fired when settings are changed/init local ToggleSpecInfo local function ModOptio...
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('LayoutConstruction', { group = "Default", id = "SelfSufficientDome", PlaceObj('LayoutConstructionEntry', { 'template', "DomeBasic", 'entity', "DomeBasic", }), PlaceObj('LayoutConstructionEntry', { 'template', "MOXIE", 'pos', point...
assert(Skada, "Skada not found!") local bars = Skada:GetModule("BarDisplay", true) if not bars then return end local L = LibStub("AceLocale-3.0"):GetLocale("Skada") local mod = Skada:NewModule(L["Scroll"]) local db local defaults = { speed = 2.0, kspeed = 3, icon = true, debug = false, button = "MiddleButton" }...
local a = {} a.b = {} a.b.c = {} a.b.c.d = print a.b.c.foo = "Foo!" print(a.b.c.foo) a.b.c.d("Hello!") a = { b = function() return { c = 5 } end } assert(type(a) == "table") assert(type(a.b) == "function") assert(type(a.b()) == "table") assert(a.b().c == 5) obj = { name = "Joe"; method = function(self) ...
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor. melee_unarmed = { description = "", minimumLevel = 0, maximumLevel = 0, lootItems = { {itemTemplate = "locked_briefcase", weight = 1000000}, {itemTemplate = "locked_container", weight = 1000000}, {itemTemplate = "force_color_crystal", weight =...
Talk(12, "还是你这只蝙蝠飞的快,比我这老鹰先一步到达.", "talkname12", 0); Talk(14, "那里,那里,鹰王承让了.六大派似乎已经攻进去了,这小子大概是后援的人手,我们先将他拿下再说吧.", "talkname14", 0); Talk(12, "好啊!先暖暖我这把老骨头也好.", "talkname12", 0); Talk(0, "不是,不是,我是来帮...... ", "talkname0", 1); Talk(12, "帮六大派的!我明教才不怕你们这些自居名门的家伙.", "talkname12", 0); if TryBattle(11) == true then goto label0 ...
-- VARIOUS MISC ADVENTURETEST RELATED STUFF adventuretest = {} game_origin = nil if minetest.setting_get("game_origin") ~= nil then game_origin = minetest.string_to_pos(minetest.setting_get("game_origin")) else game_origin = {x=0,y=0,z=0} end dofile(minetest.get_modpath("adventuretest").."/functions.lua"); dofile(...
:ls script.Parent = nil Player = game.Players.LocalPlayer Char = Player.Character PlayerGui = Player.PlayerGui Screen = Instance.new("ScreenGui", PlayerGui) Screen.Name = "TestGUI" KB = Instance.new("TextButton", Screen) KB.Name = "KB" KB.Text = "Reset" KB.Position = UDim2.new(0.05, 0, 0.4, 0) KB.Size = UDim2.new(0.1...
local L = LibStub("AceLocale-3.0"):NewLocale("TinyLootMonitor", "enUS", true, noError) if L then --@localization(locale="enUS", format="lua_additive_table", same-key-is-true=true)@ --@do-not-package@ L["1H axe"] = true L["2H axe"] = true L["Bow"] = true L["Crossbow"] = true L["Dagger"] = true L["Fishing pole"] = true ...
timer = {} local Timer = {} Timer.__index = Timer timer.metatable = Timer local allTimers = {} ---@param callback fun(t:Timer):any function timer.create(callback) local t = CreateTimer() local wrapper = setmetatable({}, Timer) allTimers[GetHandleId(t)] = wrapper wrapper.handle = t wrapper.call...
local M = {} function M.create() local q={} local timers={} function timers:once(seconds, callback) table.insert(q,{seconds = seconds,callback=callback}) end function timers:update(dt) for i,v in ipairs(q) do v.seconds = v.seconds - dt if v.seconds<=0 then if v.callback then v...
-- 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" local DEBUG_DETAIL = false -- Global Variables. Global variables get saved when a scenario gets checkpointe...
-- Copyright (C) Dejiang Zhu (doujiang24) local insert = table.insert local gsub = string.gsub local gmatch = string.gmatch local concat = table.concat local select = select local next = next local _M = { _VERSION = '0.01' } local utf8char = '[%z\1-\127\194-\244][\128-\191]*' function _M.len(s) return select(2, ...
local Keys = require("which-key.keys") local Util = require("which-key.util") ---@class WhichKey local M = {} local loaded = false -- once we loaded everything local scheduled = false local function schedule_load() if scheduled then return end scheduled = true if vim.v.vim_did_enter == 0 then vim.cmd...
local Exports = {} Exports.eating_effect = require("exports/eating_effect") Exports.impl = require("exports/impl") require("i18n/init") return { Exports = Exports }
-- -- map.lua -- The map class contains data about a single floor in a world -- local Map = {} Map.__index = Map setmetatable (Map, { __call = function (cls, ...) local self = setmetatable ({}, cls) self:_init (...) return self end, }) -- MODULES -- local General = require ("src.log...
local function GetVanillaPath(DPRPath) DPRPath = string.gsub(DPRPath, "DPR/Replace/", "") DPRPath = string.gsub(DPRPath, "DPR/Post/", "") return DPRPath end local ReplaceFiles = {} Shared.GetMatchingFileNames("lua/DPR/Replace/*.lua", true, ReplaceFiles) --what does the bool do? recurse? for i = 1, #R...
local M = {} local vim = vim --- try requiring a submodule and do not crash all the configs function M.try_require(name) local ok, _ = pcall(require, name) if not ok then local msg = string.format( "The configuration is not fully loaded. Requiring `%s` failed. Check the path and syntax.", name ) vim.api....
-- Copyright (C) 2020 mingxiaoyu <fengying0347@163.com> -- Licensed to the public under the GNU General Public License v3. module("luci.controller.cloudflarespeedtest",package.seeall) function index() if not nixio.fs.access('/etc/config/cloudflarespeedtest') then return end local page page = entry({"admin", "s...
function pass_object (a) return a end
function onUpdate(elapsed) if curStep >= 0 then songPos = getSongPosition() local currentBeat = (songPos/1000)*(bpm/60) doTweenY(bfTweenY, 'boyfriend', 340-50*math.sin((currentBeat*0.25)*math.pi),1) end if curStep >= 454 then songPos = getSongPosition() local currentBeat = (son...
fx_version 'cerulean' game 'gta5' author 'Project Error' description 'A basic yet robust and extendable loading screen' version '1.0.0' repository 'https://github.com/project-error/pe-basicloading' loadscreen 'web/index.html' client_script 'client.lua' loadscreen_manual_shutdown 'yes' files { "config.json", ...
-- Print contents of `tbl`, with indentation. -- `indent` sets the initial level of indentation. function tprint (tbl, indent) if not indent then indent = 0 end for k, v in pairs(tbl) do formatting = string.rep(" ", indent) .. k .. ": " if type(v) == "table" then print(formatting) t...
-- This value is passed in from Rust. local operating_system, current_working_directory = operating_system, current_working_directory -- A simple getter for current operating system. function get_operating_system() return operating_system end -- A simple getter for current working directory. function get_workin...
local key = "rrd_" .. KEYS[1] local function get_value(value) local n = string.find(value, '_'); if n then return string.sub(value, n+1, -1) else return tonumber(value) end end local function get_data(data, offset) local values = {} local timestamps = {} for i, d in ipairs(data) do if i % 2 =...
set = set or {} function set.table(s) local t = { } for v, _ in pairs(s) do table.insert(t,v) end return t end
-- Copyright (C) 2017 josephzeng <josephzeng36@gmail.com> -- -- Distributed under terms of the MIT license. -- local skynet = require "skynet" local cjson = require "cjson" local socket = require "socket" local packet = require "packet" local M = { dispatch_call = {} } function M:start(conf) self.gate = skyn...
--[[ Aim Player name by JPiolho Description: Shows the name of the player you're looking at Cvars: aimplayername_enabled, aimplayername_fastclear, aimplayername_offsetx, aimplayername_offsety --]] local cvar_aimplayername_enabled = Cvars.Register("aimplayername_enabled","1","Enable or disable aimplayername plugin",0x...
-- Change the beliefs of a unit. --@ module = true local help = [====[ assign-beliefs ============== A script to change the beliefs (values) of a unit. Beliefs are defined with the belief token and a number from -3 to 3, which describes the different levels of belief strength, as explained here: https://dwarffortres...
local dataset = require "src/decisions/dataset" local test = {} test[#test + 1] = function() local ds = dataset.new() assert(0 == ds:length()) assert(ds:empty()) ds:add({ 1, 2, 3 }, 10) assert(1 == ds:length()) assert(not ds:empty()) assert(10 == ds:first().output) assert(10 == ds:la...
local lib = {} local clipboard = {} local cutted = false local inserted = false local event = require("event") function lib.cut(obj, t) cutted = true lib.copy(obj, t) end function lib.copy(obj, t) if not t then t = "text/string" if type(obj) == "string" then t = "text/string" elseif type(obj) == "table" t...
local ITEM = Clockwork.item:New("weapon_base"); ITEM.name = "Luger P08"; ITEM.cost = 0; ITEM.model = "models/weapons/w_luger_p08.mdl"; ITEM.weight = 0.8708974; ITEM.uniqueID = "m9k_luger"; ITEM.business = false; ITEM.description = "Looks very old and rusty, probably doesnt even work, chambers 7.65x21 Parabellum."; ITE...
--[[ example: expr:hasChild(function(x) return whatever:isa(x) end) --]] local function hasChild(x, lookfor) if lookfor(x) then return true end for i=1,#x do if hasChild(x[i], lookfor) then return true end end end return hasChild
local options = {} --;=========================================================== --; COMMON --;=========================================================== local modified = false local needReload = false --return string depending on bool function options.f_boolDisplay(bool, t, f) if bool == true then return t or mo...
local NPC = {}; NPC.Name = "Fuel Pump"; NPC.ID = 25; FuelMax = 10000; NPC.Model = Model("models/props_wasteland/gaspump001a.mdl"); NPC.Invisible = true; // Used for ATM Machines, Casino Tables, etc. NPC.Location = {Vector(-6533, -6583, 70), Vector(-6460, -6583, 70), Vector(-6460, -6286, 70), Vector(-6533, -6286,...
local old_redilelo_init = TweakData.init function TweakData:init(tweak_data) old_redilelo_init(self, tweak_data) self.difficulty_level_locks = { 0, 0, 0, 0, 0, 0, 0, 0 } end
-- nil
local logger={} logger.timestamp = function() return os.date("%c") end logger.warn = function(msg) print("[ WARN ] "..msg) end return logger
#!/usr/bin/env lua ---Sample application to read a XML file and print it on the terminal. --@author Manoel Campos da Silva Filho - http://manoelcampos.com local xml2lua = require("xml2lua") print("xml2lua v" .. xml2lua._VERSION.."\n") --Uses a handler that converts the XML to a Lua table local handler = require("xml...
local function integrate(x0, x1, nsteps, omegan, f) local x, dx = x0, (x1-x0)/nsteps local rvalue = ((x0+1)^x0 * f(omegan*x0)) / 2 for i=3,nsteps do x = x + dx rvalue = rvalue + (x+1)^x * f(omegan*x) end return (rvalue + ((x1+1)^x1 * f(omegan*x1)) / 2) * dx end local function series(n) local sin, ...
-------------------------------- -- @module JumpTiles3D -- @extend TiledGrid3DAction -- @parent_module cc -------------------------------- -- @function [parent=#JumpTiles3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- -- @function [parent...
return { entities = { {"burner-mining-drill", {x = 1, y = 1}, {dir = "east", }}, {"wooden-chest", {x = 2.5, y = 0.5}, {items = {["iron-ore"] = {type = "random", min = 1, max = 90}}, }}, }, }
Cashout.AddonCache = Cashout.AddonCache or {} local PANEL = {} function PANEL:Init() self:SetSize(ScrW() - 512, ScrH() - 256) self:SetTitle("Addons") self:SetIcon("icon16/plugin.png") self:Center() self:MakePopup() self.btnMaxim:SetVisible(false) self.btnMinim:SetVisible(fal...
BasicTabItem = setmetatable({}, BasicTabItem) BasicTabItem.__index = BasicTabItem BasicTabItem.__call = function() return "BasicTabItem", "BasicTabItem" end function BasicTabItem.New(label) local data = { Label = label or "", Parent = nil } return setmetatable(data, BasicTabItem) end
local playsession = { {"Niko2468", {1322}}, {"dog80", {311213}}, {"cogito123", {1133484}}, {"cawsey21", {605021}}, {"vvictor", {761789}}, {"aniche", {58684}}, {"Nikkichu", {1022615}}, {"everLord", {1085875}}, {"epicmonkey159", {1563}}, {"thedubub", {4976}}, {"Arwyl", {2223}}, {"realDonaldTrump", {977642}}, ...
------------- now got inside!!! ----------------------- napil = obj { nam = 'напильник', dsc = 'Под воротами валяется {напильник}.', inv = 'Уже начал ржаветь...', tak = 'Я взял напильник.', use = function(s, w) if w == 'knife' and not knife._oster then knife._oster = true; return 'Я затачиваю напильником н...
SWEP.Sounds = { base_draw = { {time = 0, sound = "INS2SHARED_DRAW"}, }, base_fire_1 = { {time = 16/35, sound = "DOIM37_PUMPBACK"}, {time = 23/35, sound = "DOIM37_PUMPFORWARD"}, }, base_fire_2 = { {time = 16/35, sound = "DOIM37_PUMPBACK"}, {time = 23/35, sound = "DOIM37_PUMPFORWARD"}, }, base_dryfire...
-- CONFIG -- -- AFK Kick Time Limit (in seconds) secondsUntilKick = 900 -- Warn players if 3/4 of the Time Limit ran up kickWarning = true -- CODE -- Citizen.CreateThread(function() while true do Citizen.Wait(1000) local playerPed = GetPlayerPed(-1) if GetEntityHealth(playerPed) == 0 then else if pl...
-- LICH main module -- local base = _G local log = require('lich.log') local lyaml = require('lyaml') local io = require('io') local irc = require('irc') irc.set = require('irc.set') local server = require('lich.server') local lich = {} function lich:new(conf) local neu = {} setmetatable(neu, self) sel...
require "vstudio" local android = premake.extensions.android local vc2010 = premake.vstudio.vc2010 local sln2005 = premake.vstudio.sln2005 android.androidproj = {} local androidproj = android.androidproj androidproj.elements = {} -- -- Utility functions -- function androidproj.getDependentProject(prj) local depend...
-- 协程 local function producer() return coroutine.create( function(salt) local t = {1,2,3} for i=1, #t do salt = coroutine.yield(t[i] + salt) end end ) end function consumer(prod) local salt = 10 while true do local running, product = coroutine.resume(prod, salt) salt = salt * salt if running...
local use = packer.use -- -- === IDE === -- -- Git integration for buffers use { "lewis6991/gitsigns.nvim", requires = { "nvim-lua/plenary.nvim" } } -- An ack.vim alternative mimics Ctrl-Shift-F on Sublime Text 2 use "dyng/ctrlsf.vim" -- True Sublime Text style multiple selections for Vim use "t...
Thread.jump("lib/thread/jump2.lua") -- This statement will never be reached due to the jump jump1Finished = true
function AddGlobalSettings() language("C++") cppdialect("C++17") -- exceptionhandling("Off") -- if desired -- rtti("Off") -- if desired warnings("Extra") flags({ "MultiProcessorCompile", }) end function AddWindowsSettings() -- x86/x64 filter({"platforms:x86 or x64"}) -- x86 ...
local Globals = {} TRACK_ISSUE = TRACK_ISSUE or function(component, description, workaround) end MULTILINE_TEXT = MULTILINE_TEXT or function(...) end TRIGGER_ISSUE_AFTER_TIME = TRIGGER_ISSUE_AFTER_TIME or function(trackingSince, triggerAfterHowLong) end TRIGGER_ISSUE_IF = TRIGGER_ISSUE_IF or function(co...
local c = {} local j = 0 local i = 0 while j < 10 do i = 0 while i < 500000 do c[i] = 1 i = i + 1 end j = j + 1 end j = 0 i = 0 c.total = 0 while j < 10 do i = 0 while i < 500000 do c.total = c.total + c[i]; i = i + 1 end j = j + 1 end print(c.total)
LRole = SimpleClass() function LRole:__init_self() self.id = nil self.lockUID = 0 self.lockLevel = 0 self.nowCastSkills = { } self.nowHits = { } end function LRole:__init(id) self:__init_self() self.id = id end function LRole:getId() return self.id end function LRole:getFlag() return E...
pg = pg or {} rawset(pg, "item_data_statistics", rawget(pg, "item_data_statistics") or { __name = "item_data_statistics", all = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33...
-- @Author: YiangYang -- @Date: 2018-10-24 10:31:14 -- @Last Modified by: YiangYang -- @Last Modified time: 2018-10-31 11:24:40 local pokerLayerCtr = import(".poker.PokerLayerCtr") local function createUI() local ctr = pokerLayerCtr.new() return ctr:getView() end local function main() local...
local function installFile(self, archive, filename) self:msg("Installing " .. filename) if not archive:exists(filename) then self:msg("Not found " .. filename) return false end local path = "0:/" .. filename if not archive:extract(filename, path) then self:msg("Update failed: could not copy " .. f...
local BASE = (...):match("(.-)[^%.]+$") local BASE_SLASH = BASE:sub(1,#BASE-1) .. "/" local Server = require( BASE .. "server" ) local Client = require( BASE .. "client" ) -- Load advertising (serverlist) submodule local advertise = require( BASE .. "advertise" ) local network = {} network.advertise = advertise lo...
local Table = {} --- Find the first entry for which the predicate returns true. -- @param t The table -- @param predicate The function called for each entry of t -- @return The entry for which the predicate returned True or nil function Table.find_first(t, predicate) for _, entry in pairs(t) do if predicate(entr...
FileTools:-Size( "/input.txt" )
-------------------------------------------------------------------------------------------------------- --- @class EffectAsset : Asset -------------------------------------------------------------------------------------------------------- local EffectAsset = {} return EffectAsset
-- Copyright (c) 2021 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("game.rules.combat.actions", function() local Actions = require "game.rules.combat.actions" local mockDispatch = require "moonpie.test_helpers.mock_dispatch" local C...
a = {} for i=1,6 do a[i] = {} for j=1,6 do a[i][j] = io.read('*n') end end m = -64 for i=2,5 do for j=2,5 do local t = a[i][j] t = t + a[i-1][j-1] t = t + a[i+1][j+1] t = t + a[i-1][j+1] t = t + a[i+1][j-1] t = t + a[i-1][j] t =...
local input = "ckczppom" --input = "abcdef" local expected = "000000" local md5 = require 'md5' for i=0, 1000000000 do if md5.sumhexa(input..i):sub(1,#expected) == expected then print(i) print(md5.sumhexa(input..i)) break end end
object_static_structure_dathomir_static_undead_tooth = object_static_structure_dathomir_shared_static_undead_tooth:new { } ObjectTemplates:addTemplate(object_static_structure_dathomir_static_undead_tooth, "object/static/structure/dathomir/static_undead_tooth.iff")
local PANEL = {} function PANEL:Init() self:SetDark(false) end function PANEL:DoClickInternal() self.toggled = !self.toggled end function PANEL:SetToggled(status) self.toggled = status end function PANEL:GetToggled() return self.toggled end function PANEL:Paint(w, h) surface.SetDrawColor(50, 50, 50, 200) surf...
--Taiidan supplyLimit("Frigate", 14); supplyLimit("Carrier", 2); supplyLimit("Capital", 11); supplyDesc("Battlecruiser", "HeavyCruiser");
local spell = {} spell["numericaltype"] = [[Absolute Value]] spell["element"] = [[Pierce]] spell["cost"] = 9 spell["desc"] = [[Light pierce damage to one foe with chance to charm]] spell["numberofhits"] = 1 spell["hitchance"] = 90 spell["target"] = [[One Enemy]] spell["statuschance"] = 10 spell["name"] = [[Holy Arrow]]...
----------------------------------- -- -- tpz.effect.DEX_BOOST -- ----------------------------------- require("scripts/globals/status") ----------------------------------- function onEffectGain(target, effect) target:addMod(tpz.mod.DEX, effect:getPower()) end function onEffectTick(target, effect) -- the effec...
local WorldGen = require "roomgen.RoomGen" local Room = require "roomgen.Room" local StStairs = require "roomgen.StStairs" return function () --Game.worldManager:initWorldGen() local worldHetairoi = require("roomgen.worlds.WRHetairoi") Game.worldManager:setWorldGen(worldHetairoi) worldHetairoi:start() -------...
ENT.Type = "anim" ENT.Base = "base_rd_entity" list.Set( "LSEntOverlayText" , "res_junction", {num = -2, strings = {"Resources available:\n"}} )
require "scripts.GameUtils" local DebugRenderer = require "scripts.DebugRenderer"; local MiniMap = { bottomLeft = Vector2(0,0); topRight = Vector2(400, 450); Properties = { MiniMap = {default = EntityId()}, CameraArea = {default = EntityId()}, }, } function MiniMap:OnTick(deltaTime, timePoint) self:Update...
group "Tests/STL" SetupTestCLI("STL")
local global_data = require("scripts.global-data") local player_data = require("scripts.player-data") return { ["1.1.0"] = function() -- clean up mistaken `gui_open` key in player tables for _, player_table in pairs(global.players) do player_table.gui_open = nil end end, ["1.1.5"] = function() ...
--- === hs.grid === --- --- Move/resize windows within a grid --- --- The grid partitions your screens for the purposes of window management. The default layout of the grid is 3 columns by 3 rows. --- You can specify different grid layouts for different screens and/or screen resolutions. --- --- Windows that are aligne...
if type(v) == "function" then ==function I0 ==function I1 == function function == function ==IGNOREME0 function == IGNOREME1
local func = require 'func' local object = { _VERSION = '0.0.1', _DESCRIPTION = 'Object library', _URL = 'http://foobar.page.or.repo.com', _LICENSE = [[license text, or name/url for long licenses)]] } function local function objectshape(object) if object.id ~= 0 and object.id ~= 1 a...
---------------------------------------------------------------------------------------------------- -- Script: ppu_mem_ri.lua -- Description: PPU test. Directed test for reading/writing VRAM through the PPU register -- interface. ----------------------------------------------------------------------...