content
stringlengths
5
1.05M
-- Copyright 2017 Michael Forney. See LICENSE -- Myrddin LPeg lexer. local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V local M = {_NAME = 'myrddin'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Comments. local line_comment = '...
---- -- @file PhysicsShapeSphere ---- Brief description. -- <#Description#> -- @return <#return value description#> function PhysicsShapeSphere:calculateSerializeBufferSize() end ---- Brief description. -- <#Description#> -- @param btSerializer <#btSerializer description#> -- @return <#return value description#> fu...
-- Assets for fonts do local asset = am.asset.new("basic") :add_texture("data/textures/fontBasic.png") am.gfx_engine.asset(asset) asset = am.asset.new("arial") :add_texture("data/textures/fontArial.png") :texture_window_pixel({right_x = 256}) am.gfx_engine.asset(asset) end
-- local dbg = require("debugger") -- dbg.auto_where = 2 local stub_vim = require'spec.helpers.stub_vim'.stub_vim local complete = require'cccomplete'.complete local api = require'nvimapi' local r = require'spec.helpers.random' insulate("default completion", function() stub_vim{lines = {"", "# a comment", ""}, curso...
#!/usr/bin/env lua -- Image filtering and texturing local cl = require("mooncl") local gl = require("moongl") local glfw = require("moonglfw") local mi = require("moonimage") local sharpen = arg[1] == 'sharpen' local kernelsourcefile = sharpen and "texture_filter.cl" or "transp_filter.cl" if not sharpen then print...
-- Copyright (c) 2020 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("game.rules", function() local rules = require "game.rules" it("has rules for the start of the turn", function() assert.is_function(rules.start_turn) end) ...
ys = ys or {} ys.Battle.BattleBuffHealingSteal = class("BattleBuffHealingSteal", ys.Battle.BattleBuffEffect) ys.Battle.BattleBuffHealingSteal.__name = "BattleBuffHealingSteal" ys.Battle.BattleBuffHealingSteal.FX_TYPE = ys.Battle.BattleBuffEffect.FX_TYPE_LINK ys.Battle.BattleBuffHealingSteal.Ctor = function (slot0, slo...
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild -- -- This file is compatible with Lua 5.3 local class = require("class") require("kaitaistruct") local enum = require("enum") EnumIntRangeU = class.class(KaitaiStruct) EnumIntRangeU.Constants = enum.Enum { zero = 0...
-- Copyright 2021 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 ...
function setPlayerScore(player,score) if (player) and (score) then triggerServerEvent("cSetPlayerScore",player,player,score) end end function givePlayerScore(player,score) if (player) and (score) then triggerServerEvent("cGivePlayerScore",player,player,score) end end function takePlaye...
project "spdlog" kind "StaticLib" language "C++" cppdialect "C++14" targetdir "%{BUILD_DIRECTORY}/bin/%{cfg.buildcfg}" objdir "%{BUILD_DIRECTORY}/bin/obj/%{cfg.buildcfg}" files { "include/**.h", "src/**.cpp", } includedirs { "%{DependencyIncludes...
local socket = require('socket') local sys = require('posix.sys') local zlog = require('zlog') require('util') function get_args() local opts, args = getopt(arg, '', {'--local-address=', '--remote-address=', '--timeout='}) local addr = assert(opts['--local-address'], 'must have option --local-address') local ip, po...
theaterManagerConvoTemplate = ConvoTemplate:new { initialScreen = "", templateType = "Lua", luaClassHandler = "TheaterManagerConvoHandler", screens = {} } init_not_entertainer = ConvoScreen:new { id = "init_not_entertainer", leftDialog = "@conversation/quest_crowd_pleaser_manager:s_2a8b6bf", -- Only entertainers...
return PlaceObj("ModDef", { "title", "Fix Project Morpheus Particle Fell Down", "version", 1, "version_major", 0, "version_minor", 1, "saved", 0, "image", "Preview.png", "id", "ChoGGi_FixProjectMorpheusParticleFellDown", "steam_id", "1576281619", "pops_any_uuid", "fed5b2b8-b74e-4e10-b2f1-190ad5c8b6ba", "autho...
return {'pks'}
local NPC = {}; NPC.Name = "Genetec"; NPC.ID = 15; NPC.Model = Model("models/players/perp2/m_4_01.mdl"); NPC.Invisible = false; // Used for ATM Machines, Casino Tables, etc. NPC.Location = Vector(-9687.8604, 9193.0713, 72.0313); NPC.Angles = Angle(0, 90, 0.000000); NPC.ShowChatBubble = "Normal"; NPC.Sequence = 2...
assets = { Asset("ANIM", "anim/phonograph.zip"), Asset("SOUND", "sound/maxwell.fsb"), Asset("SOUND", "sound/music.fsb"), Asset("SOUND", "sound/gramaphone.fsb") } local function play(inst) inst.AnimState:PlayAnimation("play_loop", true) inst.SoundEmitter:PlaySound(inst.songToPlay, "ragtime") if inst.compo...
local high = {} local low = {} high = setmetatable(high, { __band = function(_, o) return o end, __bor = function() return high end, __bnot = function() return low end, __bxor = function(_, o) if o == low then return high else return low end end, __tostring = function() return '1' end, }) low = setmetatable...
function test1() local thing = nil -- MISSED BY LUACOV print("test1") end test1() function test2() local stuff = function (x) return x end local thing = stuff({ b = { name = 'bob', }, -- comment }) -- MISSED BY LUACOV print("test2") end test2() function test3() if t...
-- AreCoordsCollidingWithExterior() local OwnedHouse = nil local AvailableHouses = {} local blips = {} local Knockings = {} --[[Citizen['CreateThread'](function() while true do Wait(0) DrawEdge(PlayerPedId()) local coords = GetEntityCoords(PlayerPedId()) local found, coords, heading...
--*********************************************************** --** THE INDIE STONE ** --** Author: Yuri ** --*********************************************************** require "DebugUIs/DebugMenu/Statistic/StatisticChart" ---@class StatisticChartDiskOperation...
---@class UnityEngine.Space : System.Enum ---@field value__ int ---@field World UnityEngine.Space ---@field Self UnityEngine.Space local m = {} UnityEngine = {} UnityEngine.Space = m return m
test_run = require('test_run').new() test_run:cmd("push filter ".."'\\.lua.*:[0-9]+: ' to '.lua:<line>\"]: '") crypto = require('crypto') type(crypto) ciph = crypto.cipher.aes128.cbc pass = '1234567887654321' iv = 'abcdefghijklmnop' enc = ciph.encrypt('test', pass, iv) enc ciph.decrypt(enc, pass, iv) -- Failing sce...
local addonName, RIC = ... local L = LibStub("AceLocale-3.0"):GetLocale(addonName) function RIC.getOptions() -- OPTIONS local options = { name = addonName, handler = RIC, type = 'group', args = { general = { name = "General", type = "group", args = { invitebreak = { name = "Invit...
object_tangible_food_generic_dish_trimpian = object_tangible_food_generic_shared_dish_trimpian:new { } ObjectTemplates:addTemplate(object_tangible_food_generic_dish_trimpian, "object/tangible/food/generic/dish_trimpian.iff")
--[[ Record a greeting. ]] -- The greeting name to record. greeting = args(1) -- Mailbox info. mailbox = storage("login_settings", "mailbox_number") mailbox_directory = profile.mailboxes_dir .. "/" .. mailbox mailbox_provisioned = storage("mailbox_settings", "mailbox_provisioned") return { -- Provision the mailb...
--------- -- GUI -- --------- GUI = { button = {}, combobox = {}, edit = {}, gridlist = {}, image = {}, label = {}, memo = {}, scrollbar = {}, scrollpane = {}, tab = {}, tabpanel = {}, window = {} } function clientStart() local screenW, screenH = guiGetScreenSize() ---------------...
local function on_player_selected_area(event) if event.item == "sweeper-tool" then for _, entity in pairs(event.entities) do entity.destroy{do_cliff_correction = false, raise_destroy = true} end end end script.on_event(defines.events.on_player_selected_area, on_player_selected_area)
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('users_pb') local USERS_INFO = protobuf.Descriptor(); local USERS_INFO_USERID_FIELD = protobuf.FieldDescriptor(); local USERS_INFO_MONEY_FIELD = protobuf.FieldDescriptor(); local USERS_INFO_EXP_FIELD = protobuf.FieldDescriptor(); lo...
local vmf = get_mod("VMF") -- Constants used as parameters in some 'chat_manager's functions local CHANNEL_ID = 1 local MESSAGE_SENDER = "" local LOCAL_PLAYER_ID = 0 -- VT2 only local LOCALIZATION_PARAMETERS = {} -- VT2 only local LOCALIZE = false -- VT2 only local LOCALIZE_PARAMETERS = false -- ...
local path_sep = "/" if vim.fn.has("win32") == 1 or vim.fn.has("win64") == 1 then path_sep = "\\" end local M = {} function M.path_concat(left, right) local l = left local r = right if left[#left] == path_sep then l = left:sub(1, #left - 1) end if right[#right] == path_sep then r = right:sub(2) end ret...
function Esp(player, username) if player ~= game:service("Players").LocalPlayer then if player.Character then local torso = player.Character:FindFirstChild("Torso") if torso then local base = Instance.new("BillboardGui") local esP = Instance.new("Frame", base) base.AlwaysOnTop = true ba...
local script_data = { has_checked = false, networks = {}, switches = {} } local map = {} local function new_entity_entry(entity) local base = { entity_number = entity.unit_number, prev = {input = {}, output = {}} } if script_data.networks[entity.electric_network_id] then base.p...
local plugin = plugin if not plugin then --// 플러그인이 아닌데 이 코드가 실행되면 바로 멈춰줌(태스팅 모드에서) return end local AppInfo = { -- APP INFO ["AppIcon"] = "http://www.roblox.com/asset/?id=6007972232"; ["AppIconLight"] = "http://www.roblox.com/asset/?id=6007972463"; -- for toolbar light mode ["AppName"] = "Taskbar"; ["AppId"] =...
local E, C, L = select(2, ...):unpack() if not C.blizzard.custom_position then return end ------------------------------------------------------------------------------------------ -- Set custom position for TalkingHeadFrame ------------------------------------------------------------------------------------------ loc...
require "lib.test.assert" local ArrayQueue = require "lib.structures.queues.ArrayQueue" local queues = {} for _, queue in pairs(queues) do assertTrue(queue:isEmpty()) local aux = {} for i=1,50 do local random_val = math.random() aux[i] = random_val queue:push(random_val) end ...
--[[ TheNexusAvenger Tests the NexusScrollBar class. --]] local NexusUnitTesting = require("NexusUnitTesting") local NexusPluginFramework = require(game:GetService("ReplicatedStorage"):WaitForChild("NexusPluginFramework")) local NexusScrollingFrame = NexusPluginFramework:GetResource("UI.Scroll.NexusScrollingFrame") ...
--- === hs.spotify === --- --- Controls for Spotify music player local spotify = {} local alert = require "hs.alert" local as = require "hs.applescript" local app = require "hs.application" --- hs.spotify.state_paused --- Constant --- Returned by `hs.spotify.getPlaybackState()` to indicates Spotify is paused spotify...
local Timer = class("Timer") function Timer:initialize() self.updateList = {} self.timeouts = {} end function Timer:onNextUpdate(cb) table.insert(self.updateList, cb) end function Timer:setTimeout(cb, delay) table.insert(self.timeouts, {cb = cb, delay = love.timer.getTime() + delay}) end function T...
local technology = table.deepcopy(data.raw["technology"]["effect-transmission"]) technology.upgrade = "true" if settings.startup["wret-overload-enable-beaconmk2"].value == true then data:extend{ technology, --effect transmission 2 (beacon mk 2) { name = "effect-transmission-2", type = "technology",...
local hook local _E if (not IsAddOnLoaded("Bagnon")) then return end local function update(self) local slotFrame = _G[self:GetName()] local slotLink = self:GetItem() SyLevel:CallFilters("Bagnon", slotFrame, _E and slotLink) end local item = Bagnon.ItemSlot or Bagnon.Item local function doHook() if (not hook) then...
function math.dotproduct(x1, y1, z1, x2, y2, z2) return x1*x2 + y1*y2 + z1*z2 end function math.crossproduct(x1, y1, z1, x2, y2, z2) return y1*z2 - y2*z1, z1*x2 - z2*x1, x1*y2 - x2*y1 end function math.length(x, y) return math.sqrt(x*x + y*y) end function math.distance(x1, y1, x2, y2) return math.le...
local lu = require("luaunit") local ubx = require("ubx") local utils = require("utils") local bd = require("blockdiagram") local time = require("time") local ffi = require("ffi") local LOGLEVEL = ffi.C.UBX_LOGLEVEL_DEBUG local CHECK_VERBOSE = false local ni TestSaturation = {} function TestSaturation:teardown() ...
local ffi = require "ffi" local M = {} -- Load the C library local include = function(tag) local f = io.open("include/" .. tag .. ".h") ffi.cdef(f:read("*a")) f:close() ffi.load("lib/lib" .. tag .. ".so", true) end include "geant4" -- Wrap the geant4 functions local Geant4 = ffi.metatype("struct g...
object_tangible_wearables_armor_armor_imperial_guard_shadow_armor_imperial_guard_shadow_bicep_r = object_tangible_wearables_armor_armor_imperial_guard_shadow_shared_armor_imperial_guard_shadow_bicep_r:new { } ObjectTemplates:addTemplate(object_tangible_wearables_armor_armor_imperial_guard_shadow_armor_imperial_guard_sh...
--- @classmod core.physics.EmptyCollisionShape --- A collision shape without actual collision detection. -- -- Extends @{core.physics.CollisionShape}. local engine = require 'engine' local class = require 'middleclass' local Scheduler = require 'core/Scheduler' local CollisionShape = require 'co...
-- ... rust.lua
--记录整个游戏界面切换的布局, 用于新手引导和小红点. layout = {} layout.layer = {} layout.layer[enum.ui.layer.mainMenu] = { froms = {}, parent = enum.ui.scene.dock, links = { world = enum.ui.scene.world, battle = enum.ui.scene.battle, gm = enum.ui.layer.gm, -- btnName = scene or layer } } layout.layer[enum.ui.layer.gm] = { from...
function main(splash) splash.images_enabled = false splash.response_body_enabled = true local url = splash.args.url assert(splash:go(url)) assert(splash:wait(5)) local detectFunction = [[ detect = function(){ var rs = []; softwareData.forEach(function(s) { var matchers = s.matcher...
----------------------------------- -- Area: Periqia (Requiem) -- Mob: Draconic Draugar ----------------------------------- function onMobEngaged(mob, target) local instance = mob:getInstance() local mobID = mob:getID() SpawnMob(mobID +1, instance):updateEnmity(target) end function onMobDeath(mob, playe...
local i = require "luci.dispatcher" local e = require "nixio.fs" local e = require "luci.sys" local e = luci.model.uci.cursor() local o = "brook_server" m = Map(o, translate("Brook Server")) t = m:section(TypedSection, "global", translate("Global Settings")) t.anonymous = true t.addremove = false e = t:option(Flag, ...
local Input = {} local keys = {} local prevKeys = {} function love.keypressed(key) keys[key] = true end function love.keyreleased(key) keys[key] = false end function Input.lateUpdate(dt) for key, value in pairs(keys) do prevKeys[key] = value end end function Input.isHeld(key) if type(ke...
-- original by Doob -- fixed/modified by fingercomp port, radius, t = 31415, 2, 'timer' timer = math.random(3, 6) sounds = { 'entity.endermen.teleport', 'entity.lightning.thunder', 'entity.generic.explode', 'entity.pig.ambient', 'block.slime.step' } blocks = { 'opencomputers:microcontroller', 'opencomput...
local ASSET = {} local dialogue_actors = {} local function NormalizeSoundPath(sound_path, gender) sound_path = string.Replace(sound_path, '%gender%', gender) return sound_path end local function _EmitSound(actor, sound) actor:GetNPC():EmitSound(sound, 70, 100, 1, CHAN_AUTO) end local function _PlayAnimation(dialo...
local server = require "http.server" local headers = require "http.headers" local json = require "rapidjson" local util = require "util" local parser = require "parser" function handle_request(sv, st) local rqh = st:get_headers() local rqm = rqh:get(':method') local path = rqh:get(':path') or '/' local rsh = heade...
local point = {} function point.rotate(x, y, ox, oy, r) local angle = r * math.pi / 180 local sinAngle = math.sin(angle) local cosAngle = math.cos(angle) if ox == 0 and oy == 0 then local tempX = x * cosAngle - y * sinAngle y = y * cosAngle + x * sinAngle x = tempX else ...
-- Simple command parser -- local command = {} local base = _G function command:new() local neu = {} setmetatable(neu, self) self.__index = self return neu end function command:parse(str) local inquote = false local incommand = true local s = str local command = '' local arg = '' loc...
local floor, ceil = math.floor, math.ceil local min, max = math.min, math.max local simple = require("layouts.simple") local compact = require("layouts.compact") local mpp_util = require("mpp_util") local mpp_revert = mpp_util.revert local pole_grid_mt = require("pole_grid_mt") ---@type SimpleLayout local layout = ta...
local Plugin = SS.Plugins:New("Radar") // Chat command local Command = SS.Commands:New("Radar") function Command.Command(Player, Args) local TR = util.GetPlayerTrace(Player) local Trace = util.TraceLine(TR) if not (Trace.Entity) then SS.PlayerMessage(Player, "You must aim at a valid entity!", 1) return...
local colorscheme = 'tokyonight' local status_ok, _ = pcall(vim.cmd, 'colorscheme ' .. colorscheme) if not status_ok then vim.notify('colorscheme ' .. colorscheme .. ' 没有找到!') return 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_generic" ) local utils = require(GetScriptDirectory() .. "/util") local mutil = req...
local KUI, E, L, V, P, G = unpack(select(2, ...)) local KUF = KUI:GetModule("KUIUnits") local UF = E:GetModule('UnitFrames'); local LSM = LibStub("LibSharedMedia-3.0"); UF.LSM = LSM local _G = _G local select = select -- Raid function KUF:ChangeRaidHealthBarTexture() local header = _G['ElvUF_Raid'] local bar = LSM:...
object_mobile_wod_reanimated_witch_04 = object_mobile_shared_wod_reanimated_witch_04:new { } ObjectTemplates:addTemplate(object_mobile_wod_reanimated_witch_04, "object/mobile/wod_reanimated_witch_04.iff")
----------------------------------------- -- ID: 4672 -- Scroll of Barthunder -- Teaches the white magic Barthunder ----------------------------------------- function onItemCheck(target) return target:canLearnSpell(64) end function onItemUse(target) target:addSpell(64) end
--conding:utf-8 package.path=package.path..";./luagy/?.lua" Class=require("grammar.class") require("print.printtable") require"lfs" -------------------------------- --Config: FOLDER_FILE_NAME="FOLDER.MD" local MDFile=Class(function(self) self.filecontant={} self.MainDesrc={} self:getContant(); self.d...
local ghost = {} local image = love.graphics.newImage function ghost.IdleLeftAnimation() local idleLeft = { image('entities/img/ghost/idleLeft1.png'), image('entities/img/ghost/idleLeft2.png'), image('entities/img/ghost/idleLeft3.png'), image('entities/img/ghost/idleLeft4.png'), image('entities/img/ghost/i...
if Config.Framework == "ESX" or Config.Framework == "NewESX" then -- ESX Compatibility code ESX = nil Citizen.CreateThread(function() while ESX == nil do TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) Citizen.Wait(0) end end) ShowNotification = function(str) ESX.ShowNotification(str) ...
local function t(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end local function check_back_space() local col = vim.fn.col('.') - 1 return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil end -- Use (s-)tab to: --- move to prev/next item in completion menuone --- jump ...
local t = Def.ActorFrame{} t[#t+1] = LoadActor("_frame") return t
local MakePlayerCharacter = require "prefabs/player_common" local assets = { -- Asset( "SCRIPT", "scripts/prefabs/player_common.lua"), -- Asset( "SOUND", "sound/willow.fsb"), Asset( "ANIM", "anim/miotan.zip" ), Asset( "ANIM", "anim/ghost_miotan_build.zip" ), } local prefabs = {} local start_inv...
-------------------------------------------------------------------------------- --- Enhanced assertions -- @module lua-nucleo.assert -- This file is a part of lua-nucleo library -- @copyright lua-nucleo authors (see file `COPYRIGHT` for the license) ---------------------------------------------------------------------...
return{ name = 'star', description = 'Star', type = 'material', info = 'a star', MAX_ITEMS = 10, }
local playsession = { {"mewmew", {2819}}, {"drbln", {141575}}, {"Krengrus", {195481}}, {"QuaxzRu", {150165}}, {"Ommuden", {105533}}, {"brftjx", {695}}, {"Merssedes", {92150}}, {"Schwert3000", {2454}}, {"seeyorise", {35675}}, {"Spocks", {14490}}, {"Sp00nkY", {221}}, {"SwampD0nkey", {2584}}, {"bigjoemonger",...
local fail = false print("Test: sub sm pre...") local function state_a(arg) arg.val = arg.val + 1 return stater.NEXT end local function state_b(arg) arg.val = arg.val + 1000 return stater.NEXT end local function sm_pre_run(arg) return true end local function sm_pre_skip(arg) return false end...
fx_version 'adamant' game 'gta5' client_scripts { 'config.lua', 'client/main.lua' } server_scripts { 'config.lua', 'server/main.lua', 'server/vpn/antivpn.lua' -- 'server/mainEN' ( If you want to translate to English, delete (server/main.lua) and activate (server/mainEN ) }
print("Hello from lua! :p") print("LUA:", "attempting to load: test2") print("LUA:", util.execute("test2")) util.tableprint({ "Hello", "World", "Lua", "is", "cool", false, x1 = 5, x2 = { "z", { "lul" } }, x3 = { 5 } }) util.table...
return function() require("nvim-treesitter.configs").setup({ ensure_installed = { "jsonc", "query", "toml", "svelte", "html", "go", "javascript", "lua", "python", "typescript", "c", "cpp", "css", "scss", "yaml", "zig", }, -- one of "all", "maintained" (parsers with maintainers), or a ...
describe("comments", function() setup(function() TOML = require "toml" end) it("everywhere", function() local obj = TOML.parse[=[ # Top comment. # Top comment. # Top comment. # [no-extraneous-groups-please] [group] # Comment answer = 42 # Comment # no-extraneous-keys-please = 999 # Inbetween comment. more =...
NULL_SIGNAL = {signal = { type = "virtual", name = "signal-black" }, count = 0} HALT_SIGNAL = {signal = { type = "virtual", name = "signal-mc-halt"}, count = 1} RUN_SIGNAL = {signal = { type = "virtual", name = "signal-mc-run"}, count = 1} STEP_SIGNAL = {signal = { type = "virtual", name = "signal-mc-step"}, count = 1}...
--- Module which provides transport level interface for emulate connection with HMI for SDL -- -- *Dependencies:* `json`, `qt`, `network` -- -- *Globals:* `atf_logger`, `qt`, `network` -- @module websocket_connection -- @copyright [Ford Motor Company](https://smartdevicelink.com/partners/ford/) and [SmartDeviceLink Con...
LoseFrame = {} LoseFrame.__index = LoseFrame local ViewWidth = 1024 local ViewHeight = 576 local FrameCooldown = 1.0 function LoseFrame:New() local self = {} self.screenSpace = Graphics.ScreenSpace() self.timer = 0.0 setmetatable(self, LoseFrame) return self end function LoseFrame:Process(e...
require "defines" require "GUI" taxiStations = {"#callFARL", "#callSupply"} function createMainUI(player) if player.gui.top.trainTaxi then player.gui.top.trainTaxi.destroy() end GUI.add(player.gui.top, {type="frame", name="trainTaxi", direction="vertical", style="outer_frame_style"}) end function onTrainSt...
hp = 1000 attack = 245 defense = 200 speed = 30 mdefense = 240 luck = 40 float = 0 strength = ELEMENT_NONE weakness = ELEMENT_NONE function initId(id) myId = id end function start() end function get_action(step) if (getRandomNumber(2) == 0) then return COMBAT_CASTING, "Vampire", 1, getRando...
M={} function oa_key(k) return string.format(" key code %d \n", k) end function oa_command(cmd) return string.format(" keystroke \"%s\"\nkeystroke return\ndelay .1 \n", cmd) end function commands_to_oa(commands) local o = "" for k,t in pairs(commands) do o = o .. oa_command(t) en...
--- Provide gzip utility functions. -- @module jls.util.zip.gzip local logger = require('jls.lang.logger') local StringBuffer = require('jls.lang.StringBuffer') local Deflater = require('jls.util.zip.Deflater') local Inflater = require('jls.util.zip.Inflater') local StreamHandler = require('jls.io.streams.StreamHandle...
-- items: 1673 function event_trade(e) local item_lib = require("items"); if e.other:GetFactionLevel(e.other:CharacterID(), e.self:GetID(), e.other:GetRace(), e.other:GetClass(), e.other:GetDeity(), 404, e.self) == 1 then if(item_lib.check_turn_in(e.trade, {item1 = 1673})) then e.self:Emote("looks down at the te...
--[[ © 2020 TERRANOVA do not share, re-distribute or modify without permission of its author. --]] ITEM.name = "Coffee Pot"; ITEM.model = "models/props_office/coffe_pot.mdl"; ITEM.width = 2; ITEM.height = 2; ITEM.description = "A large coffee pot with a glass carafe."; ITEM.capacity = 1650
local colorscheme = "tokyonight" -- tokyonight -- OceanicNext -- gruvbox -- zephyr -- nord -- onedark -- nightfox local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) if not status_ok then vim.notify("colorscheme: " .. colorscheme .. " 没有找到!") return end
ITEM.name = "Eye" ITEM.model ="models/nasca/etherealsrp_artifacts/eye.mdl" ITEM.description = "This artifact looks like an eye." ITEM.longdesc = "This artifact, which resembles the human eye, considerably increases metabolism of the body, helping wounds heal quicker. Experienced stalkers say that Eye also brings luck. ...
a = {} a.b = {} a.b.c = function() print "hello" end a.b.c() ax = {} ax.by = {} ax.by.cz = function() print "hello" end ax.by.cz()
require('playback') ui = { play = function() playingBack = not playingBack if (ACTION_INDEX-1)/#ACTIONS == 1 then resetEverything() end end, step = function() playingBack = false delay_timer = -1 end, reset = function() resetEverything() end, back = function() playing...
-- Module: copax.lock -- Version: 0.1 -- Author: Bruno Silvestre local copas = require("copas") ------------------------------------------------------------------------------- local function acquire(l) while l.locked and ( (not l.reentrant) or (l.current ~= coroutine.running()) ) do table.insert(l.queue, (coro...
return PlaceObj("ModDef", { "title", "WasteRock Prod Info", "version", 3, "version_major", 0, "version_minor", 3, "saved", 0, "image", "Preview.png", "id", "ChoGGi_WasterockProdInfo", "steam_id", "1816128962", "pops_any_uuid", "10811f3f-2a27-4ecb-a34a-17eef76d7385", "author", "ChoGGi", "lua_revision", 249143...
C_LevelSquish = {} ---@param level number ---@param maxFollowerLevel number ---@return number squishedLevel ---[Documentation](https://wow.gamepedia.com/API_C_LevelSquish.ConvertFollowerLevel) function C_LevelSquish.ConvertFollowerLevel(level, maxFollowerLevel) end ---@param level number ---@return number squishedLev...
--!A cross-toolchain build utility based on Lua -- -- 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 la...
local protobuf = require "gw.codec.protobuf" local codec = {} --- 新建codec实例 -- @param[type=table] conf 配置 -- @usage -- -- protobuf -- local codecobj = codec.new({ -- type = "protobuf", -- pbfile = "proto/protobuf/all.bytes", -- idfile = "proto/protobuf/message_define.bytes", -- }) function ...
AddCSLuaFile() ENT.Base = "gballoon_tower_base" ENT.Type = "anim" ENT.PrintName = "Orb of Cold" ENT.Category = "#rotgb.category.tower" ENT.Author = "Piengineer12" ENT.Contact = "http://steamcommunity.com/id/Piengineer12/" ENT.Purpose = "#rotgb.tower.gballoon_tower_05.purpose" ENT.Instructions = "" ENT.Spawnable = fals...
--Device IDs GCHROMA_DEVICE_ALL = 0 GCHROMA_DEVICE_KEYBOARD = 1 GCHROMA_DEVICE_MOUSEPAD = 2 GCHROMA_DEVICE_MOUSE = 3 GCHROMA_DEVICE_HEADSET = 4 GCHROMA_DEVICE_KEYPAD = 5 GCHROMA_DEVICE_LINK = 6 --Mouse lights GCHROMA_MOUSE_SCROLLWHEEL = 0x0203 GCHROMA_MOUSE_LOGO = 0x0703 GCHROMA_MOUSE_BACKLIGHT = 0x0403 GCHROMA_MOUSE_...
project "EngineManaged.Tests" kind "SharedLib" language "C#" location "." files { "EngineManaged.Tests.lua", "**.cs", } links { "System", "EngineManaged", path.join(depsdir,"NUnit","nunit.framework"), path.join(depsdir,"NSubstitute","NSubstitute") }
local cjson = require("cjson") local dbrun = require("db"):set_conf(nil) local function refresh() local endpoints = ngx.shared.endpoints local res = dbrun("SELECT * FROM endpoint") for _, ep in ipairs(res) do endpoints:set(ep.endpoint, cjson.encode(ep), 60 * 60) end ngx.say('{"msg": "refre...