content
stringlengths
5
1.05M
concommand.Add( "mute_player", function( ply, cmd, args, argStr ) if ply:IsAdmin() then local target for _, v in ipairs( player.GetHumans() ) do if v:Nick() == argStr then target = v end end if IsValid( target ) then target.muted = ...
local skynet = require "skynet" local log = require "chestnut.skynet.log" local servicecode = require "enum.servicecode" local traceback = debug.traceback local CMD = {} local SUB = {} ------------------------------------------ -- 服务协议 function CMD:start(channel_id, ... ) -- body -- return self:start(channel_id, .....
character_2:UseSkill(1) character_4:UseSkill(1) Summon(1)
--game.player[1] = Allways Admin function isEmpty(value) return value == nil or value == '' end function getRandomSign() if (math.random() < 0.5) then return -1 else return 1 end end function getNewPositionRelativeTotalPlayers() local randomLimit = global.preferredSpawnDistances * ...
--[[ Extension functions for CDOTA_BaseNPC -HasLearnedAbility(abilityName) Checks if the unit has at least one point in ability abilityName. Primarily for checking if talents have been learned. --]] function CDOTA_BaseNPC:HasLearnedAbility(abilityName) local ability = self:FindAbilityByName(abilityName) if ab...
local PLUGIN = PLUGIN; local Clockwork = Clockwork; Clockwork.config:AddToSystem("No Noclip Eavesdrop", "no_noclip_eavesdrop", "Disables eavesdropping from players in observer.", 0, 1, 0); Clockwork.chatBox:RegisterClass("radio_transmit", "ic", function(info) info.channel = info.data.channel; if (table.Count(info....
require "Token" require "AST" require "ParserUtils" require "Utils" require "DoNotation" -- parser function : ( buffer, index ) -> ( successful, buffer, index, value ) -- parser function : ( buffer, index ) -> ( failure, index ) mu = unit function literals( buffer, index ) return choice { match( tokenType.int...
local server = {} return server
-- Copyright (c) 2017-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the license found in the LICENSE file in -- the root directory of this source tree. An additional grant of patent rights -- can be found in the PATENTS file in the same directory. -- --[[ -- -- A helper script...
cc = cc or {} ---AnimationFrame object ---@class AnimationFrame : Ref local AnimationFrame = {} cc.AnimationFrame = AnimationFrame -------------------------------- --- Set the SpriteFrame.<br> ---param frame A SpriteFrame will be used. ---@param frame SpriteFrame ---@return AnimationFrame function AnimationFrame:setSp...
local core = require 'core.hover' local files = require 'files' rawset(_G, 'TEST', true) function TEST(script) return function (expect) files.removeAll() local start = script:find('<?', 1, true) local finish = script:find('?>', 1, true) local pos = (start + finish) // 2 + 1 ...
PLUGIN.name = "Stamina" PLUGIN.author = "Chessnut, AleXXX_007" PLUGIN.desc = "Adds a stamina system to limit running and jumping." if (SERVER) then function PLUGIN:SetupMove(player, movedata) if player:getChar() then local stamina = player:getLocalVar("stm", 100) player:SetJumpPower(player:getChar():getAttrib...
-- Created by jogag -- Part of the Digiline Stuff pack -- Mod: Plastic from homedecor, if homedecor is not installed :) -- + Also checks for pipeworks! -- Texture license: from VanessaE, WTFPL if not minetest.get_modpath("homedecor") and not minetest.get_modpath("pipeworks") then minetest.register_craftitem(":home...
local http = require "resty.http" local lock = require "resty.lock" local ocsp = require "ngx.ocsp" local ssl = require "ngx.ssl" local ssl_provider = require "resty.auto-ssl.ssl_providers.lets_encrypt" local function convert_to_der_and_cache(domain, cert) -- Convert certificate from PEM to DER format. local fullc...
minetest.register_alias("extractor", "technic:lv_extractor") minetest.register_craft({ output = 'technic:lv_extractor', recipe = { {'technic:treetap', 'basic_materials:motor', 'technic:treetap'}, {'technic:treetap', 'technic:machine_casing', 'technic:treetap'}, {'', 'technic:lv_cable',...
function displayData() if (not exports.UCDaccounts:isPlayerLoggedIn(localPlayer)) then return end localPlayer:setData("dxscoreboard_money", exports.UCDutil:tocomma(getPlayerMoney(localPlayer)), true) localPlayer:setData("dxscoreboard_city", exports.UCDutil:getPlayerCityZone(localPlayer), true) --localPlayer:setData...
includeFile("custom_content/intangible/saga_system/sage_intangible_holocron.lua")
module(..., package.seeall) jester.conf.debug = false require "jester.support.string" require "jester.support.table" -- The CLI version assumes it's being run from the FreeSWITCH scripts -- directory, but when run from FreeSWITCH the full path must be specified. local script_path = "./" if jester.is_freeswitch then ...
function create_boss(keys) -- 随机刷boss local vec = Entities:FindByName(nil, "corner_" .. RandomInt(1, 7)) :GetOrigin() local boss = Utils:create_unit_simple( _G.load_boss["boss_" .. RandomInt(1, tonumber(_G.load_boss["boss_count"]))], ...
data:extend( { --fluid-craft************************************************************************************************************************************************************* { type = "recipe", name = "fc-advanced-circuit", category = "fluid-craft", energy_required = 8, enabled = false...
-------------------------------------------------------------------------------- -- Module Declaration -- local mod, CL = BigWigs:NewBoss("Underrot Trash", 1841) if not mod then return end mod.displayName = CL.trash mod:RegisterEnableMob( 133685, -- Befouled Spirit 131492, -- Devout Blood Priest 130909, -- Fetid M...
--[[ LuaOOP Version 0.1.0 Developed by Pyutaro Repository: lua-oop ]] local LuaOOP = {} --[[ Method: Class Turns the classDefinition into a class. To do this, it creates 2 methods: 1. .New (...) If a .New method already exists, the old one is called *after* the new object inherits all of the...
local self = {} GLib.Net.Layer1.Channel = GLib.MakeConstructor (self, GLib.Net.IChannel)
fx_version 'cerulean' games { 'gta5' } description 'NPC-Fuel-Stations' version '1.0.0' client_script "@npc-scripts/client/errorlog.lua" ui_page 'html/ui.html' files { 'html/*', } client_script 'client/client.lua' exports { 'SetFuel', 'GetFuel' }
local allowCountdown = false local startedFirstDialogue = false local startedEndDialogue = false function onStartCountdown() makeAnimatedLuaSprite('ts1', 'ts1', 0, 175); setLuaSpriteScrollFactor('ts1', 0.9, 0.9); addLuaSprite('ts1', false); if not allowCountdown and isStoryMode and not startedFirstDial...
ENT.Contact = "https://space.bilibili.com/3761568/" ENT.Base = "npc_vj_human_base" ENT.Type = "ai" ENT.Author = "Tamill" ENT.Category = "Anime Bodyguard" ENT.Purpose = "" ENT.Instructions = "" ENT.PrintName = "Renri Yamine" ENT.AssetName = "npc_ab_renri_yamine" ENT.ChineseName = "暗音" ENT.Web = "http://steamcommunity.c...
local TestLayer = require("graphic.test.TestLayer") local TestBitmapLayer = class("TestBitmapLayer", TestLayer) function TestBitmapLayer:ctor() TestLayer.ctor(self) end function TestBitmapLayer:init() TestLayer.init(self) self:customLayout() end function TestBitmapLayer:customLayout() self._ui = {} ...
nssm:register_mob("nssm:kraken", "Kraken", { type = "monster", hp_max = 350, hp_min = 350, collisionbox = {-2, 0, -2, 2, 4, 2}, visual = "mesh", mesh = "kraken.x", textures = {{"kraken.png"}, {"kraken2.png"}}, visual_size = {x=15, y=15}, lifetimer=500, inker = false, view_ran...
assert(math.ldexp) assert(math.ldexp(5,5) == 160) assert(math.ldexp(1.2345678,2) == 4.9382712)
--[[ Collectable Group - Server v1.0 Created by Chris Server-side implementation for collectable groups. Keeps track of what collectables have been picked up, and informs clients of what the "official" state is. Also validates pickups and awards resources. See the Readme for a more detailed breakdown of the archite...
local mod = DBM:NewMod(1468, "DBM-Party-Legion", 10, 707) local L = mod:GetLocalizedStrings() mod:SetRevision(("$Revision: 17095 $"):sub(12, -3)) mod:SetCreatureID(95886) mod:SetEncounterID(1816) mod:SetZone() mod:RegisterCombat("combat") mod:RegisterEventsInCombat( "SPELL_CAST_START 192522 192631 192621", "SPELL...
------------------------------------------------------------------------------- -- 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 run_and_jump_low.lua --! @brief...
--[[ Functions below: Ped spawning / clothing attachment Description: function spawns and skins the peds acourding to the players chars , this is also where the start of the train spawn takes place along with fetching players char data from DB , clothing data is done before this function. This also dete...
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- gameView.lua -----------------------------------------------------------------------------------------------------------...
local nvim_command = vim.api.nvim_command local fn = vim.fn local stdpath = fn.stdpath local empty = fn.empty local glob = fn.glob local system = fn.system -- Bootstrap here. local install_path = stdpath('data')..'/site/pack/packer/start/packer.nvim' local packer_bootstrap -- 0 if it is empty, 1 if it's not. Why not...
return { cornecro = { acceleration = 0.2, brakerate = 0.75, buildcostenergy = 1514, buildcostmetal = 108, builddistance = 145, builder = true, buildpic = "cornecro.dds", buildtime = 2400, canassist = false, canmove = true, canpatrol = true, canreclamate = 1, canresurrect = true, canstop = 1...
local draw = require 'lx.draw' local sys = require 'lx.sys' local tk = {} --[[ Widgets: window manager widget Window manager Widows are any widget which determine their own size box widget A box that can be: - scrollable (H/V) - resizable (H/V) Has a single child. Can either: a. constrain the size of the...
-- 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...
gl.setup(1390, 545) local font = resource.load_font("OpenSans-Regular.ttf") function node.render() local bus = resource.render_child("bus") bus:draw(0, 0, 690, 545) local tram = resource.render_child("tram") tram:draw(695, 0, 1390, 545) end
function GenerateQuads(atlas, tilewidth, tileheight) local sheetWidth = atlas:getWidth() / tilewidth local sheetHeight = atlas:getHeight() / tileheight local sheetCounter = 1 local spritesheet = {} for y = 0, sheetHeight - 1 do for x = 0, sheetWidth - 1 do spritesheet[...
--[[ Moves job from active to delayed set. Input: KEYS[1] delayed key KEYS[2] job key KEYS[3] events stream KEYS[4] delayed stream ARGV[1] delayedTimestamp ARGV[2] the id of the job ARGV[3] queue token Output: 0 - OK -1 - Missing job. -1 - Job not in delayed set. Events...
local Commands = require("commands") local Permissions = require("permissions") local Get = require("get") local name = "blockperms" -- Name of the command. local permissions = { bot_owner = false, -- Whether only the bot owner can use this command. manage_server = true, -- Whether you must have `Manage Serve...
-- Example: Getting the x- and y-position of the mouse function love.load() love.graphics.setFont(14) end function love.draw() -- Draws the position on screen. love.graphics.print("The mouse is at:",50,50) love.graphics.print(love.mouse.getX(),50,64) love.graphics.print(love.mouse.getY(),50,78) end
-- These are the default settings. Don't mind changing these. FPP = FPP or {} -- Don't reset the settings when they're already there if FPP.Settings then return end FPP.Settings = {} FPP.Settings.FPP_PHYSGUN1 = { toggle = 1, adminall = 1, worldprops = 0, adminworldprops = 1, canblocked = 0, admincanblocked = 0...
function arithmetic(a, b) print(a + b) print(a - b) print(a * b) print(a / b) print(a // b) print(a % b) print(a ^ b) print(-b) end function bitwise(a, b) print(a & b) print(a | b) print(a ~ b) print(a >> 4) print(a << 4) print(~a) end function relational(a, b) ...
--- Main methods directly available in your addon -- @classmod lib -- @author Alar of Runetotem -- @release 51 -- @set sort=true -- @usage -- -- Create a new addon this way: -- local me,ns=... -- Wow engine passes you your addon name and a private table to use -- addon=LibStub("LibInit"):newAddon(ns,me) -- -- Since now...
----------------------------------------- -- Spell: Sacrifice -- ----------------------------------------- require("scripts/globals/status") require("scripts/globals/magic") require("scripts/globals/msg") ----------------------------------------- function onMagicCastingCheck(caster,target,spell) return 0 end func...
-- windwp/nvim-autopairs local npairs = require 'nvim-autopairs' local Rule = require 'nvim-autopairs.rule' require('nvim-autopairs').setup({ disable_filetype = { 'TelescopePrompt' , 'vim' }, }) -- If you want insert `(` after select function or method item local cmp_autopairs = require('nvim-autopairs.completion....
require "import" import "android.widget.ArrayAdapter" import "android.widget.LinearLayout" import "android.widget.TextView" import "java.io.File" import "android.widget.ListView" import "android.app.AlertDialog" function ChoiceFile(StartPath) --创建ListView作为文件列表 lv=ListView(activity).setFastScrollEnabled(true) --创...
RegisterServerEvent('InitialCore:NotifAppelLTD') AddEventHandler("InitialCore:NotifAppelLTD", function() TriggerClientEvent('InitialCore:NotifAppelLTDC', -1) end) RegisterServerEvent('InitialCore:AppelAcceptedLtd') AddEventHandler('InitialCore:AppelAcceptedLtd', function() local PlayerIdentifier = GetPlayerIde...
local fn = require('tmux.lib.fn') local registry = require('tmux.lib.registry') local cmds = require('tmux.commands') return fn.nested(2, function (P, M) function start_insert() vim.defer_fn(function () P.last.status = -1 if vim.bo.buftype == 'terminal' then vim.cmd('startinsert!') end ...
-- Best/Worst Window return function() local JudgNames = LoadModule("Options.SmartTapNoteScore.lua")() table.sort(JudgNames) -- We need to check what is the worst window available. local CurPrefTiming = LoadModule("Config.Load.lua")("SmartTimings","Save/OutFoxPrefs.ini") local LowestWindow = nil ...
------------------------------------ -- XAF Module - Network:REPClient -- ------------------------------------ -- [>] This is the client side module of Remote Executor Protocol. -- [>] It allows requesting for executing remote located scripts. -- [>] That class implements mechanisms for returning received parameters fo...
/* @library : rlib @docs : https://docs.rlib.io IF YOU HAVE NOT DIRECTLY RECEIVED THESE FILES FROM THE DEVELOPER, PLEASE CONTACT THE DEVELOPER LISTED ABOVE. THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ('CCPL' OR 'LICENSE'). T...
function div(a, b) return math.floor(a/b) end moy = {Jan=1, Feb=2, Mar=3, Apr=4, May=5, Jun=6, Jul=7, Aug=8, Sep=9, Oct=10, Nov=11, Dec=12} function month(s) return 12*(tonumber(s:sub(5, 8))-1990) + moy[s:sub(1, 3)] - 1 end for line in io.lines(arg[1]) do local work, w = {}, 0 for i in line:gsub("; ", ";...
-- Copyright 2015-2017 David B. Lamkins <david@lamkins.net>. See LICENSE. -- man/roff LPeg lexer. local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'man'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Markup. local rule...
local Area = Object:extend() function Area:new() end function Area:update(dt) end function Area:draw() end return Area
local model_convert = {} -- ------------------------------------------------------------------------ -- PROPERTY CONVERTIONS function model_convert.face_2_edges (face) local x, y, z = face[1], face[2], face[3] return {{x, y}, {y, z}, {z, x}} end function model_convert.faces_2_edges (faces) local edges = {} ...
getglobal game getfield -1 ReplicatedStorage getfield -1 Functions getfield -1 TradeGem getfield -1 InvokeServer pushvalue -2 pushstring Blue Gems pushstring 1000000000 pcall 3 1 0
require("engine/test/unittest_helper") --#if log local _logging = require("engine/debug/logging") --#endif local p8utest = {} -- unit test framework mimicking some busted features -- for direct use in pico8 headless -- busted features supported: "it" as "check" (immediate assert, no collection of test results) --...
return { summary = 'Set the dimensions of the BoxShape.', description = 'Sets the width, height, and depth of the BoxShape.', arguments = { { name = 'width', type = 'number', description = 'The width of the box, in meters.' }, { name = 'height', type = 'number', des...
local task = require('lua-channels') local function counter(c) local i = 2 while true do c:send(i) i = i + 1 end end local function filter(p, recv_ch, send_ch) while true do local i = recv_ch:recv() if i % p ~= 0 then send_ch:send(i) end end end local function si...
include "./vendor/premake/premake_customization/solution_items.lua" include "Dependencies.lua" workspace "Rage" architecture "x86_64" startproject "Ragenut" configurations { "Debug", "Release", "Dist" } solution_items { ".editorconfig" } flags { "MultiProcessorCompile" } ...
local path = require 'path' local toml = require 'toml' local Logs = require 'lib.logs' local colors = require 'lib.colors' require 'lib.table' local Config = {} local IS_WIN = package.config:sub(1,1) == "\\" local HOME = IS_WIN and (os.getenv("APPDATA") .. "\\YGOFabrica") or (os.getenv("HOME") .. "/ygofab") local ...
local PPM2 PPM2 = _G.PPM2 local ENABLE_FLASHLIGHT_PASS = CreateConVar('ppm2_flashlight_pass', '1', { FCVAR_ARCHIVE }, 'Enable flashlight render pass. This kills FPS.') local ENABLE_LEGS = CreateConVar('ppm2_draw_legs', '1', { FCVAR_ARCHIVE }, 'Draw pony legs.') local USE_RENDER_OVERRIDE = CreateConVar('ppm2_legs_ne...
package.path = '../src/?.lua;' .. package.path local tap = require 'tapered' --- like and unlike -- like(string, pattern, [msg]) tests if the pattern matches the string -- unlike(string, pattern, [msg]) tests if the pattern does not match the string tap.like('sat', 'sat', "ok - like('sat', 'sat')") tap.like('sat', 'bb...
PLUGIN_NAME = "aCmOdFoRvAh" PLUGIN_AUTHOR = "SDBS (sensor-dream)" PLUGIN_VERSION = "1.1.0" PLUGIN_SITE = "https://github.com/sensor-dream/luamod" PLUGIN_EMAIL = "sensor-dream@sensor-dream.ru" PLUGIN_DESCRIPTION = "Is provided as is. Use at your own risk. The author for the use of this code is not responsible" -- права...
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' 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...
--[[ Provides methods and data core to the implementation of the Roact Virtual DOM. This module doesn't interact with the Roblox hierarchy and should have no dependencies on other Roact modules. ]] local Symbol = require(script.Parent.Symbol) local Core = {} -- Marker used to specify children of a node. Core.Ch...
if GoldSystem == nil then GoldSystem = class({}) end function GoldSystem:OnHeroDeath(killer, victim) safe(function () GoldSystem:_OnHeroDeath(killer, victim) end) end function GoldSystem:_OnHeroDeath(killer, victim) local custom_gold_bonus = tonumber(CustomNetTables:GetTableValue("game_options", "bounty_multi...
----------------------------------- -- -- tpz.effect.CAROL -- ----------------------------------- require("scripts/globals/status") require("scripts/globals/magic") ----------------------------------- function onEffectGain(target,effect) target:addMod(tpz.magic.resistMod[effect:getSubPower()], effect:getPower...
Locales['fr'] = { ['actions'] = 'actions', ['amount'] = 'montant', ['balance'] = 'solde', ['bank'] = 'banque', ['bill_amount'] = 'montant de la facture', ['billing'] ...
--[[ MIT License Copyright (c) 2018 Scott Petersen 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, publis...
data:extend { { type = "selection-tool", name = "ruin-maker", icon = "__ruin-maker__/graphics/ruin-maker.png", icon_size = 64, stack_size = 1, selection_color = {1, 1, 1}, alt_selection_color = {r = 1}, selection_mode = "blueprint", alt_selection_mode = {"any-tile", "any-entity"}, ...
local platform = require "bee.platform" local COMMAND local SKIP = 0 if platform.OS == "Windows" then local pwsh = require "powershell"() if pwsh then COMMAND = pwsh .. " -NoProfile -Command \"Get-CimInstance Win32_Process | Select-Object Name,ProcessId\"" SKIP = 3 else COMMAND = "wm...
AddCSLuaFile("sh_init.lua") include("sh_init.lua")
local ScrollConfig = nil local function GetScrollConfig(id) ScrollConfig = ScrollConfig or LoadDatabaseWithKey("scroll", "scroll") or {} return ScrollConfig[id] end local SuitConfig = nil local function GetSuitConfig(id) if SuitConfig == nil then SuitConfig = {} DATABASE.ForEach("suit", function(row) SuitCo...
-------------------------------------------------------------------------------- -- Emergency control panel for 81-502 -------------------------------------------------------------------------------- -- Copyright (C) 2013-2018 Metrostroi Team & FoxWorks Aerospace s.r.o. -- Contains proprietary code. See license.txt for...
--- 模块功能:软狗功能测试 -- @author openLuat -- @module testSoftDog -- @license MIT -- @copyright openLuat -- @release 2019.11.26 module(...,package.seeall) --[[ 函数名:eatSoftDog 功能 :喂狗 参数 :无 返回值:无 ]] function eatSoftDog() print("eatSoftDog test") rtos.eatSoftDog() end --[[ 函数名:closeSoftDog 功能 ...
ID = {} ID.instances = {} function ID.CreateFactory() local o = { _id_ = 0 } setmetatable(o, { __index = ID }) table.insert(ID.instances, o) return o end function ID:Obtain() local id = self._id_ self._id_ = id + 1 return id end function ID:Reset() self._id_ = 0 end
local menu = {} local bg = {} if not pcall(function () menu.font = love.graphics.newFont("assets/murder.ttf", 150) end) then print("Could not load 'murder.ttf' font..") return 2 end love.graphics.setFont(menu.font) bg.background = {bg1, bg2, bg3, bg4, bg5, bg5} for i = 1, 7 do if not pcall(function () bg.back...
--redis-cli -c --eval lock.lua unit1 , resource locker mode value local r= redis.call('hsetnx',KEYS[1],ARGV[1],ARGV[2]) if r==0 then --锁已存在 local locker=redis.call('hget',KEYS[1],ARGV[1]) local mode=redis.call('hget',KEYS[1],ARGV[1]..'_M') if ARGV[3]=='S' then --申请共享锁 if (mode~='X') then --当前为共享锁 if l...
local nmap = require "nmap" local stdnse = require "stdnse" local string = require "string" description = [[ Checks if a target on a local Ethernet has its network card in promiscuous mode. The techniques used are described at http://www.securityfriday.com/promiscuous_detection_01.pdf. ]] --- -- @output -- Host scri...
local SceneDirector = require "controllers.SceneDirector" local GameDirector = require "controllers.GameDirector" local ScaleDimension = require "util.ScaleDimension" function love.load() scaleDimension = ScaleDimension:new() gameDirector = GameDirector:new() gameDirector.enemiesController:createEnemies() ...
--[[ @ lua debug for vs code @ @ Author luhengsi @ Mail luhengsi@163.com @ Date 2018-06-10 @ @ please check Licence.txt file for licence and legal issues. ]] local sformat = string.format; local sfind = string.find; local ssub = string.sub; local sgsub = string.gsub local sgmatch = string.gmatch; local slower = ...
local orangeButton = { name = 'orange', image = love.graphics.newImage('assets/orangeButton.png'), width = 0, height = 0, x = 0, y = 0 } orangeButton.width = orangeButton.image:getWidth() orangeButton.height = orangeButton.image:getHeight() return orangeButton
-- @start -- @namespace com.github.mounthuaguo.monkeyking.lua -- @version 0.1 -- @name Random -- @description Auto generate some random charactors. -- @author Heramerom -- @type action -- @action Insert Random Charactors -- @action Insert Hex Charactors...
local fn = vim.fn local cmd = vim.api.nvim_command -- packer.nvim -- -- Install packer.nvim if it's not ready. -- -- To know whether packer.nvim is installn or not, check this folder exists: -- -- $DATA/site/pack/packer/start/packer.nvim -- local packer_install_path = fn.stdpath('data') .. ...
tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAfkDeath(true) tfm.exec.newGame([[<C><P F="0"/><Z><S><S X="79" o="aac4d2" L="162" Y="165" c="4" H="334" P="0,0,0.3,0.2,0,0,0,0" T="12"/><S X="169" o="6d9bb3" L="144" Y="201" c="4" H="285" P="0,0,0.3,0.2...
local EdgeDropout, Parent = torch.class('nn.EdgeDropout', 'nn.Module') function EdgeDropout:__init(p,v1,inplace,stochasticInference) Parent.__init(self) self.p = p or 0.5 self.train = true self.inplace = inplace self.stochastic_inference = stochasticInference or false -- version 2 scales output during training inste...
CustomizableWeaponry:addFireSound("K82.FIRE", {"Weapons/K82A3/M82-1.wav","Weapons/K82A3/M82-2.wav","Weapons/K82A3/M82-3.wav",}, 1, 125, CHAN_STATIC) CustomizableWeaponry:addReloadSound("K82.BOLTB", "Weapons/K82A3/boltb.wav") CustomizableWeaponry:addReloadSound("K82.CLIPOUT", "Weapons/K82A3/M82_clipout.wav") Customizab...
-- string.pack do local s = "a" local s1000 = ("a"):rep(1000) -- string.pack uses memory to store its output local ctx = runtime.callcontext({kill={memory=4000}}, string.pack, "ssss", s1000, s, s, s) print(ctx) --> =done print(runtime.callcontext({kill={memory=4000}}, string.pack, "ssss", ...
----------------------------------- -- Area: Aht Urhgan Whitegate -- NPC: Imperial Whitegate -- pos: 152, -2, 0, 50 ----------------------------------- require("scripts/globals/missions") require("scripts/globals/status") require("scripts/globals/titles") require("scripts/globals/besieged") require("scripts/globals/np...
local function rvec(vec) vec.x = math.Round(vec.x) vec.y = math.Round(vec.y) vec.z = math.Round(vec.z) return vec end function EFFECT:Init(data) self.StartPacket = data:GetStart() self.Attachment = data:GetAttachment() local AddVel = vector_origin if LocalPlayer and IsValid(LocalPlayer()) then AddVel = Loc...
require "libstudent" print( "test lua access C++ class" ) local function main() --Student是个table, 调用create方法 local s = Student:create() --lua_gettop()=2 1:table, 2:xx s:setAge(100) s:print() s:setName("BeiJing") s:setAge(1234) s:print() end main()
local m = {} -- module local fileutil = require "fileutil" local SVN = "svn " local svn = SVN .. "--username %s --password %s --no-auth-cache --non-interactive " -- -- sourceCtxPath -- local function sourceCtxPath () local property = require "property" return property.sourceCtxPath or "" end...
local tab = {} local idleTime = {} local paymentTimer local TIMER_HOUR = 3600000 local CHECK_TIMER = 5000 local jobToRanksCount = { [7] = {"Rescuer Man", "Pilot", "Farmer", "Trucker", "Lumberjack", "Trash Collector", "Diver", "Firefighter"}, [8] = {"Fisherman"}, [10] = {"Iron Miner"}, [11] = {"Taxi Driver"} } loc...
-- Copyright (C) 2018 The Dota IMBA Development Team -- -- 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 ...
local process = require('process') local assert = require('assert') if (process.getgid) then console.log('gid', process.getgid()) console.log('uid', process.getuid()) end local tap = require('util/tap') local test = tap.test test("test hrtime", function() assert.equal(type(process.hrtime()), 'number') assert...
------------------------------------------------------ -- Screen identifier ------------------------------------------------------ SCREEN_OPERATOR_IDENTIFIER = "operator" ------------------------------------------------------ -- Digital input states ------------------------------------------------------ SCREEN_OPERATO...