content stringlengths 5 1.05M |
|---|
local Tunnel = module("_core", "lib/Tunnel")
local Proxy = module("_core", "lib/Proxy")
cAPI = Proxy.getInterface("API")
API = Tunnel.getInterface("API")
local FirstSpawn = false
local car = nil
local ped = nil
local coords = vector3(2538.675,-1144.211,50.175)
RegisterCommand('first', function()
TriggerEvent('F... |
local WRAPPER = {}
function WRAPPER.get_module(base_path, game_id, file_name)
local full_path = base_path .. "." .. game_id .. "." .. file_name
if game_id == nil then
error("Error (" .. full_path .. ".lua): game_id is nil: " .. tostring(game_id))
end
local module = require (full_path)
i... |
-- Global to all starfalls
local checkluatype = SF.CheckLuaType
local registerprivilege = SF.Permissions.registerPrivilege
-- Register privileges
-- 3 = no one, 2 = anyone, 1 = admin
registerprivilege("navmesh.generate", "Begin generation", "Allows the user to generate a navmesh for the map. This process is highly res... |
local condition = Condition(CONDITION_OUTFIT)
condition:setTicks(20 * 1000) -- should be approximately 20 seconds
condition:setOutfit({lookType = 137, lookHead = 113, lookBody = 120, lookLegs = 114, lookFeet = 132}) -- amazon looktype
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
player:add... |
local function test()
print("test")
end
return {
test = test
}
|
--[[
Author: Sascha Steinbiss <ss34@sanger.ac.uk>
Copyright (c) 2014-2015 Genome Research Ltd
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE S... |
--[[
Name: "init.lua".
Product: "kuroScript".
--]]
include("sh_init.lua");
-- Add some shared Lua files.
AddCSLuaFile("cl_init.lua");
AddCSLuaFile("sh_init.lua");
-- Called when the entity initializes.
function ENT:Initialize()
self:SharedInitialize();
-- Set some information.
self:SetModel(MODEL_CURRENCY);
... |
--------------------------------------------------------------------------------
-- Module declaration
--
local mod, CL = BigWigs:NewBoss("Rokmar the Crackler", 547, 571)
if not mod then return end
mod:RegisterEnableMob(17991)
-- mod.engageId = 1941 -- no boss frames
-- mod.respawnTime = 0 -- resets, doesn't respawn
... |
os.loadAPI("ws/log.lua"); local log = _G["log.lua"]
os.loadAPI("ws/Constants.lua"); local Constants = _G["Constants.lua"]
os.loadAPI("ws/Peripherals.lua"); local Peripherals = _G["Peripherals.lua"]
os.loadAPI("ws/Utils.lua"); local Utils = _G["Utils.lua"]
os.loadAPI("ws/World.lua"); local World = _G["World.lua"]
local... |
function _init()
memset(0,0,0x2000)
reload(0x2000,0,0x2000,"logo1.p8")
for addr=0,0x1fff do
out=peek(addr)
if peek(0x2000+addr) & 15 != 0 then
out |= 4
end
if peek(0x2000+addr) & 15<<4 != 0 then
out |= 4<<4
end
poke(addr,out)
end
reload(0x2000,0,0x2000,"logo2.p8")
for addr=0,0x1fff do
out=peek... |
-- BIG BUTTON
goo.bigbutton = class('goo big button', goo.object)
goo.bigbutton.image = {}
goo.bigbutton.image.right = love.graphics.newImage(goo.skin..'bigbutton_left.png')
goo.bigbutton.image.middle = love.graphics.newImage(goo.skin..'bigbutton_middle.png')
goo.bigbutton.image.left = love.graphics.newImage(goo.skin..... |
--[[
Copyright 2016 GitHub, Inc
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 writing, software
distr... |
-- loop.lua
-- loops through parameters for experimentation
--[[
Checklist:
1. modify var_list
2. set varied parameter equal to var
3. put varied parameter in model name
]]
-- list of parameters over which to loop
var_list = {100,200,400,600}
for i,var in ipairs(var_list) do
params = {
batch_size=40, -- m... |
--- A 3 component vector.
-- @module vec3
local sqrt = math.sqrt
local cos = math.cos
local sin = math.sin
local vec3 = {}
local vec3_mt = {}
-- Private constructor.
local function new(x, y, z)
return setmetatable({
x = x or 0,
y = y or 0,
z = z or 0
}, vec3_mt)
end
-- Do the check to see if JI... |
--[[
Fix Zone Tuning
Author: Native Instruments
Written by: Yaron Eshkar
Modified: August 11, 2021
--]]
-- Imports
local root_path = filesystem.parentPath(scriptPath)
package.path = root_path .. "/?.lua;" .. package.path
local ctZones = require("Modules.CtZones")
local start_group = 0
local end_group = 0
local ver... |
-- Generated by CSharp.lua Compiler
local System = System
System.namespace("Slipe.Client.IO.Events", function (namespace)
namespace.class("OnKeyEventArgs", function (namespace)
local __ctor__
__ctor__ = function (this, key, isPressed)
this.Key = System.cast(System.String, key)
this.IsPressed = Sys... |
call_lightning_mage = {
cast = function(player, target)
local spellName = "Call Lightning"
if not player:canCast(1, 1, 0) then
return
end
local damage = 150 + (player.level * 3) + math.floor(((player.will + 1) / 2) * 3)
local worked = global_zap.cast(player, target, damage, 120, 0)
if worked ~= 0 then
... |
function SendMessage(a_Player, a_Message)
a_Player:SendMessageInfo(a_Message)
end
function SendMessageSuccess(a_Player, a_Message)
a_Player:SendMessageSuccess(a_Message)
end
function SendMessageFailure(a_Player, a_Message)
a_Player:SendMessageFailure(a_Message)
end
--- Kicks a player by name, with the specified r... |
local TCP = require "internal.TCP"
local sock_recv = TCP.recv
local sock_send = TCP.send
local sock_close = TCP.close
local dataset = require "process.dataset"
local session = require "process.session"
local session_wakeup = session.wakeup
local lpack = require "pack"
local lpack_encode = lpack.encode
local lpack_de... |
--------------------------------------------------------
-- Minetest :: Auth Redux Mod v2.10 (auth_rx)
--
-- See README.txt for licensing and release notes.
-- Copyright (c) 2017-2018, Leslie E. Krause
--------------------------------------------------------
-----------------------------------------------------
-- Glo... |
-- Check if the player gave up before the song properly ended.
local af = Def.ActorFrame{
OffCommand=function(self)
-- In OutFox and newer versions of SM 5.1 there is the GaveUp()
-- function available. For SM 5.0.12 and older SM 5.1 versions
-- we do the best we can by checking the song position. It
-- doesn... |
workspace "MadSword"
architecture "x86_64"
startproject "Sandbox"
configurations{
"Debug",
"Release",
"Dist"
}
flags
{
"MultiProcessorCompile"
}
--临时变量 定义 输出目录
--详细的所有支持的tokens
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}... |
local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
local eval = helpers.eval
local has_powershell = helpers.has_powershell
local matches = helpers.matches
local nvim = helpers.nvim
local nvim_dir = helpers.nvim_dir
describe(':make', function()
clear()
before_each(function ()... |
local ops = {}
table.insert(ops,{
label = "NOP",
info = "No Operation. :)",
exe = function(self)
end,
arg = 0,
})
table.insert(ops,{
label = "SET",
info = "Set contents of register defined by ARG2 with value of ARG1.",
exe = function(self)
self.registers[ self.args[2] ] = self.args[1]
end,
arg... |
--------------------------------
-- @module RichElementCustomNode
-- @extend RichElement
-- @parent_module ccui
--------------------------------
-- @function [parent=#RichElementCustomNode] init
-- @param self
-- @param #int int
-- @param #color3b_table color3b
-- @param #unsigned char char
-- @param #cc.Node node
-... |
function insert(s, pos, word)
return s:sub(1, pos - 1) .. word .. s:sub(pos)
end
function remove(s, pos, n)
return s:sub(1, pos - 1) .. s:sub(pos + n)
end
function insertUtf8(s, pos, word)
return s:sub(1, utf8.offset(s, pos) - 1) .. word .. s:sub(utf8.offset(s, pos))
end
function removeUtf8(s, pos, n)
return s:s... |
-- simple test
local bzlib = require 'ffi_bzlib'
--[[
local bz = bzlib:new(
dest_buff_size -- Optional, default is 8192.
-- The libbz2.so will return BZ_OUTBUFF_FULL(-8)
-- if this buffer size is not enough to storage
-- the output data.
)
]]--
local bz = bzlib:new()
local bin1 ... |
registrar = {
ASSET = 1,
DRAWABLE = 1,
ENTITY = 0,
FACTORY = 1,
PHYSICS = 1,
ANIMATION = 0,
INPUT = 1,
SCRIPT = 1,
CAMERA = 0,
MOUSE_MOVE = 0,
UI = 0,
}
function setup()
aabb = createDefault(100, 100, 128, 128, 255, 255, 255, 255)
setAABBCollision(aabb, 128, 128)
setScript(aabb, "Games/test/collider.lua"... |
local endpoints = require "kong.api.endpoints"
local Logger = require("logger")
local schema = kong.db.endpoint_access_control_permissions.schema
local function get_cache_key(api_key, method)
return "endpoint_access_control_permissions:" .. api_key .. ":" .. method
end
-- local function decode_url(key)
-- local ... |
function getSample()
local sample = world.lightLevel(entity.position())
return math.floor(sample * 1000) * 0.1
end |
function ResizeLight(Light, LightSize)
Light.Size = LightSize
Light.Mesh.Scale = Vector3.new(LightSize.x * 0.5, LightSize.y * 1.335, LightSize.z * 0.5)
end
local Model = Instance.new("Model", Workspace)
Model.Name = "Hologram"
local Base = Instance.new("Part", Model)
Base.Name = "Base"
Base.FormFactor = "Custom"
Base... |
--Copyright (C) 2009 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
... |
local c = {}
local function test(self)
print("test function.")
local steps = action.Steps(
action.FadeBy(-255, 1.0),
action.FadeBy(255, 1.0)
)
local act = action.Repeat(steps, 0)
act.name = "fade"
self:stopAction("fade")
--self:runAction(act)
self:setOpacity(2... |
local TableUtils = require('utils.class')
local Xetrov = require('steering.xetrov')
local Vehicle = require('core.vehicle')
--- Defines a character.
local Character = TableUtils.class()
--- Initialises Character class instances.
function Character:init(vehicle, offset)
self.vehicle = vehicle
self.offse... |
-- function reference
local type = type
local pcall = pcall
-- include
local log = require("log.index")
local ec = require("define.errorCode")
local handler = require("handler.index")
local router = {}
local function resolveMessage(data)
local id = data.id
local body = data.body
if not id then
log... |
-- VARIABLES ===================================================================
dLight = false
pLight = false
sLight = false
currentLight = nil
-- FUNCTIONS ===================================================================
function Constructor()
end
function OnUpdate(dt)
if (IsKeyPressed(KEY_1)) then
owner:Ad... |
local status_ok, lualine = pcall(require, "lualine")
if not status_ok then
return
end
lualine.setup {
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = ""},
section_separators = { left = "", right = ""},
disabled_filetypes = {},
always_divide_... |
--[[
GD50
chain1
Example used to showcase a way of moving something from point to point using
the Timer:finish function.
]]
-- Don't do this in a "real" project, I've only done this so we don't need
-- to have copies of the extra libraries in every directory. Best practice is
-- to set things up so yo... |
include('sky/unstable')
sky.use('device/make_note')
sky.use('device/transform')
sky.use('io/norns')
local lsys = include('lib/dep/lua-lsys/lsys')
local devices = include('lib/devices')
tu = require('tabutil')
ng = devices.NoteGesture{
debug = true,
}
main = sky.Chain{
ng,
sky.Logger{ bypass = true },
}
input ... |
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style 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.
local gtn = require ... |
local Matrix = {}
local function getIn(m, i, j, c)
return m[i * c + j]
end
local function setIn(v, m, i, j, c)
m[i * c + j] = v
end
function Matrix.create(rows, cols, default)
local mat = {}
for i=1,rows do
for j=1,cols do
mat[i * cols + j] = default
end
end
retur... |
local skynet = require "skynet"
local puremagic = require "puremagic"
local io = io
local root = skynet.getenv "static_path" or "./static/"
local cache = setmetatable({}, { __mode = "kv" })
local function cachefile(_, filename)
local v = cache[filename]
if v then
return v
end
local f = io.open (root .. filenam... |
--[[
ChatBubbles - Display text bubbles on top of entities
]]
util.AddNetworkString('chatbubbles.show')
ChatBubbles = {
-- max. length for the text
MAX_TEXT_LEN = 100,
-- limit how many times showChatBubble can be called per second
SHOW_BURST_LIMIT = 3
}
-- keep track of the burst limit for players
local burst... |
--------------------------------
-- @module BezierBy
-- @extend ActionInterval
-- @parent_module cc
--------------------------------
--
-- @function [parent=#BezierBy] startWithTarget
-- @param self
-- @param #cc.Node target
--------------------------------
--
-- @function [parent=#BezierBy] clone
-- @pa... |
style =
{["off_color"] = "fff",
["on_color"] = "fff",
["line_color"] = "000",
["line_width"] = "0.3"};
diff_style =
{["off_color"] = "fff",
["on_color"] = "fff",
["line_color"] = "000",
["line_width"] = "2"};
text_style = {["font_size"] = "16"}
cifre = {};
num... |
yellow_scroll = {
use = function(player)
if player.warpOut == 0 then
player:sendMinitext("Unable to warp out.")
return
end
if player:canPK(player) then
-- pvp maps
player:sendMinitext("Unable to warp out.")
return
end
if player.m == 666 then
return
end
if player.state == 1 then
pl... |
--Message:
-- uuid
-- payload - HSET "data" -> uuid (first byte is version, the remainder is payload
-- expiration - ZSET "expirations:<channel>" -> (time) / uuid (optional)
-- deliveryCount - HSET "deliveries" -> uuid (int)
-- timestamp - HSET "timestamps" -> uuid
-- headers -... |
Money = {}
Money.open = false
function Money.create()
phone.money = {button = {}, edit = {}, gridlist = {}}
phone.money.edit["search_players"] = GuiEdit(18, 97, 274, 28, "", false, phone.image["phone_window"])
phone.money.edit["amount"] = GuiEdit(25, 466, 131, 44, "", false, phone.image["phone_window"])
phone.mo... |
a = 5 * 90
print(a) |
-----------------------------------
-- Area: Uleguerand Range
-- NM: Bonnacon
-----------------------------------
require("scripts/globals/hunts")
require("scripts/globals/mobs")
-----------------------------------
function onMobInitialize(mob)
mob:setMobMod(tpz.mobMod.ADD_EFFECT, 1)
end
function onAdditionalEf... |
object_tangible_loot_creature_loot_collections_space_capacitor_mark_03_koensayr = object_tangible_loot_creature_loot_collections_space_shared_capacitor_mark_03_koensayr:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_space_capacitor_mark_03_koensayr, "object/tangible/loot/creature/l... |
-- Credit to CloneTrooper1019
-- https://devforum.roblox.com/t/sky-upperhue-and-sky-lowerhue-colorsequences/49817
local day = 86400
local hour = day/24
local riseAndSetTime = hour/2
local sunRise = day*0.25
local sunSet = day*0.75
local upperSkyAmbient = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.... |
script.Parent = Instance.new('Glue')
LocalPlayer = game.Players.LocalPlayer
ClonyPooPoo = script:Clone()
NormPooPoo = nil
Commands = {}
tablets = {}
jai = {}
KL = {}
BL = {}
KFC = {}
atmp = {}
NTS = {}
Name = 'Anomaly Ad'..'ministration Tablets'
Bet = ";"
AntiFall = true
Globals = _G
GuiChat=true
GlobalTable = {}
Explo... |
require "prototypes.unselectable-lamp-panel"
require "prototypes.invisible-combinators"
-- Item
local item = table.deepcopy(data.raw["item"]["small-lamp"])
overwriteContent(item, {
name = "color-display-row",
order = "z[small-lamp]2",
place_result = "color-display-row",
icon = "__integratedCircuitry__/gra... |
#!/usr/bin/env lua
require'lib.autoload'
CLI.name = 'LEXE'
CLI.version = '1.1'
CLI.options = {
build = {
description = 'Change build directory path.',
alias = 'b',
default = './build'
},
entry = {
description = 'Change path for entry file.',
alias = 'e',
def... |
display.setStatusBar(display.HiddenStatusBar)
local widget = require('widget')
local json = require('json')
local microphone = require('plugin.microphone')
microphone.enableDebug() -- Shows when signal detector changes states.
display.setDefault('background', 1)
local x, y = display.contentCenterX, display.contentC... |
local function add_button(gui)
gui.add({type = "button", name = "WallBuilderBlueprintRead", caption = "WB", style = "blueprint_button_style"})
end
local function createBlueprintButton(player)
local topGui = player.gui.top
if not topGui.WallBuilderBlueprintRead then
add_button(topGui)
en... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by hartnett.
--- DateTime: 2019/11/4 20:44
---
local ngx = ngx
local string = string
local http = require("resty.http")
local core = require("apisix.core")
local basic_auth = require("apisix.plugins.exchange-mobile.basic_auth")
local util = require(... |
---
--- ActionHelper.lua
---
--- Copyright (C) 2018 Xrysnow. All rights reserved.
---
local mbg = require('util.mbg.main')
---@class mbg.ActionHelper
local ActionHelper = {}
mbg.ActionHelper = ActionHelper
---ParseFrom
---@param c mbg.String
---@return mbg.IAction
function ActionHelper.ParseFrom(c)
if c:contains... |
---------------------------------------------------------------------------------------
-- Lua module to parse a Portable Executable (.exe , .dll, etc.) file and extract metadata.
--
-- NOTE: numerical information is extracted as strings (hex) to prevent numerical overflows in
-- case of 64 bit fields (bit/flag fields)... |
return {
LrSdkVersion = 3.0,
LrSdkMinimumVersion = 3.0, -- minimum SDK version required by this plug-in
LrToolkitIdentifier = 'au.id.willthames.photodeck',
LrPluginName = 'PhotoDeck',
LrPluginInfoUrl = 'https://github.com/willthames/photodeck.lrdevplugin',
LrExportServiceProvider = {
title = "PhotoDeck... |
AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Data Transferrer"
ENT.WireDebugName = "DataTransfer"
if CLIENT then return end -- No more client
function ENT:Initialize()
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:SetU... |
local PrepFilter = require(script.Parent._Filter)
local lshift = bit32.lshift
local clamp = math.clamp
local min = math.min
return PrepFilter("Dodge", function(background: number, foreground: number): number
local bg = clamp(background * 255, 0, 255)
local fg = foreground * 255
return (bg == 255) and bg or min... |
-- ... init.lua
require("Comment").setup()
|
vim.opt.formatoptions:append({ t = true })
vim.opt.wrap = true
vim.opt.linebreak = true
vim.opt.textwidth = 0
vim.opt.wrapmargin = 0
vim.opt.foldlevel = 999
vim.opt.colorcolumn = "0"
|
AddCSLuaFile()
DEFINE_BASECLASS("micro_component")
ENT.Base = "micro_component"
function ENT:Initialize()
BaseClass.Initialize(self)
if CLIENT then
self.sound_alarm = CreateSound(self,"npc/turret_floor/alarm.wav")
self.sound_critical = CreateSound(self,"ambient/alarms/siren.wav")
end
end
function ENT:GetComp... |
local mod = DBM:NewMod(868, "DBM-SiegeOfOrgrimmarV2", nil, 369)
local L = mod:GetLocalizedStrings()
local sndWOP = mod:SoundMM("SoundWOP")
local sndZQ = mod:SoundMM("SoundZQ")
local sndTT = mod:SoundMM("SoundTT")
mod:SetRevision(("$Revision: 11389 $"):sub(12, -3))
mod:SetCreatureID(72311, 72560, 72249, 73910, 7230... |
local cooking = require "cooking"
local aliases=
{
cookedsmallmeat = "smallmeat_cooked",
cookedmonstermeat = "monstermeat_cooked",
cookedmeat = "meat_cooked"
}
local null_ingredient = {tags={}}
function GetIngredientData(prefabname)
local name = aliases.prefabname or prefabname
return cooking.ingredients[name] ... |
require("lang_en");
require("user_cfg");
-------------------- 设置芯片信息 ----------------------
cfg:addKeyInfo("chipname", "AC630N");
-------------------- 设置默认加载的fw文件 --------------
cfg:addKeyInfo("default_fwfile", cfg.projDir .. '/conf/output/default/default_cfg.fw');
cfg:addKeyInfo("ota.bin:path", cfg.projDir .. "/../o... |
-- A frame that contains a grid of buttons
local _, Addon = ...
local ButtonBar = Addon:CreateClass('Frame', Addon.Frame)
ButtonBar:Extend(
'OnCreate',
function(self)
self.buttons = {}
end
)
ButtonBar:Extend(
'OnAcquire',
function(self)
self:ReloadButtons()
end
)
ButtonBar:Ex... |
TestFlat = {
setUp = function (self)
self.a = array("a", "b", array("c", "d", array("e", "f")))
end;
["test: Should return an empty array when the array is empty"] = function ()
luaunit.assertEquals(array():flat().__data, {})
luaunit.assertEquals(array():flat(0).__data, {})
luaunit.assertEquals(array():fla... |
data:extend(
{
{
type = "technology",
name = "military-5",
icon = "__DyTech-Warfare__/graphics/technology/military.png",
effects =
{
{
type = "unlock-recipe",
recipe = "sniper"
},
{
type = "unlock-recipe",
recipe = "sniper-magazine"
}
... |
local AddonName, AddonTable = ...
-- De Other Side
AddonTable.deotherside = {
-- Hakkar the Soulflayer
181737,
182621,
183479,
182134,
183504,
179330,
179328,
179325,
179326,
179324,
179322,
179331,
-- The Manastorms
181509,
182748,
179339,
179340,... |
local PLUGIN = PLUGIN
PLUGIN.name = "Plugin Configuration"
PLUGIN.author = "Cheesenut"
PLUGIN.desc = "Adds a menu for enabling/disabling plugins."
if (SERVER) then
PLUGIN.overwrite = PLUGIN.overwrite or {}
util.AddNetworkString("nutPluginDisable")
util.AddNetworkString("nutPluginList")
function PLUGIN:getPlugin... |
#!/bin/lua
local https = require 'ssl.https'
local lfs = require "lfs"
local cjson = require "cjson"
require "utils"
-- see cwa-server/services/distribution/api_v1.json
-- paths: date/{date} date/{date}/hour date/{date}/hour/{hour}
-- protobuf def file: keyExportFormat
-- message: .de.rki.coronawarnapp.server.protoc... |
local function AddPlayerModel( name, model )
list.Set( "PlayerOptionsModel", name, model )
player_manager.AddValidModel( name, model )
end
AddPlayerModel( "COD MW2 OpFor 1", "Models/COD players/opfor1.mdl" )
AddPlayerModel( "COD MW2 OpFor 2", "Models/COD players/opfor2.mdl" )... |
-----------------------------------
-- Area: La Theine Plateau
-- NPC: Tayula
-- Type: Mission
-- !pos -311.785 50.351 182.063 102
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
player:startEvent(105);
end;
function onEventUpdate(player,csid,option)
en... |
local main = {}
local sailor = require "sailor"
local markdown = require "markdown"
local function read_md(path)
local f = io.open (sailor.path.."/"..path..".md", "rb")
if f then
local src = f:read("*all")
f:close()
return markdown(src)
end
return false
end
local function is_directory(path)
local... |
local Prop = {}
Prop.Name = "Garage 4"
Prop.Cat = "Garage"
Prop.Price = 500
Prop.Doors = {
Vector( -11764.000000, -7328.000000, -13824.000000 ),
}
GM.Property:Register( Prop ) |
local http = require "resty.http"
local cjson = require "cjson"
-- <<<<<<<< Source from https://github.com/zmartzone/lua-resty-openidc/blob/v1.5.3/lib/resty/openidc.lua
local function openidc_parse_json_response(response)
local err
local res
-- check the response from the OP
if response.status ~= 200 t... |
local class = require('opus.class')
local UI = require('opus.ui')
local Util = require('opus.util')
local colors = _G.colors
UI.Slider = class(UI.Window)
UI.Slider.defaults = {
UIElement = 'Slider',
height = 1,
barChar = UI.extChars and '\140' or '-',
barColor = colors.gray,
sliderChar = UI.extChars and '... |
require "spec.approx"
describe("#ema ExponentialMovingAverage", function()
local ExponentialMovingAverage = require "ExponentialMovingAverage"
local Bar = require "Candlestick"
it("new() ", function()
local ema = ExponentialMovingAverage(3)
assert.are.same(3, ema.period)
assert.are.s... |
-- Copyright 2022 philh30
--
-- 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 writ... |
selectattackpetc = {
{"saroot", "CompositeCreaturePet", "none", SEQUENCEBEHAVIOR},
{"attack0", "SelectWeaponCreaturePet", "saroot", BEHAVIOR},
{"attack1", "SelectAttackCreaturePet", "saroot", BEHAVIOR},
}
selectattackpetd = {
{"saroot", "CompositeDroidPet", "none", SEQUENCEBEHAVIOR},
{"attack0", "SelectWeaponDroid... |
-- // Services
local Players = game:GetService("Players")
-- // Signal Constructor
local Signal = loadstring(game:HttpGet("https://raw.githubusercontent.com/Quenty/NevermoreEngine/version2/Modules/Shared/Events/Signal.lua"))()
-- // Add custom property to an Object
local addProperty = function(Object, Name, Value)
... |
--[[
角色
--]]
local THIS_MODULE = ...
local C_LOGTAG = "Role"
local C_EQUIPTYPES = {"W","A","H","S"}
local AsynchNotifier = require("app.main.modules.common.AsynchNotifier")
local Role = class("Role", require("app.main.logics.games.Serializable"),
AsynchNotifier)
-- 创建常量
local ROLEATTR = nil -- 角色属性
local function... |
--[[
--MIT License
--
--Copyright (c) 2019 PapyElGringo
--Copyright (c) 2019 Tom Meyers
--
--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 th... |
local _, nChat = ...
local sub = string.sub
local match = string.match
StaticPopupDialogs["NCHAT_ALTCLICK"] = {
text = ERR_INVITE_PLAYER_S,
button1 = INVITE,
button2 = CANCEL,
OnAccept = function(self)
InviteUnit(self.data)
end,
timeout = 0,
whileDead = true,
hideOnEscape = tr... |
--[[
Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local addtrigger = {}
local mattata = require('mattata')
local redis = require('libs.redis')
function addtrigger:init()
addtrigger.commands = mattata.commands(self.info.usernam... |
----------------------------------------------------------------------
-- This file is used to train coarse net with reinforced database
--
-- I: mitosis database 94x94
-- O: trained cnn model (nn)
----------------------------------------------------------------------
require 'torch'
require 'nn'
require 'cu... |
local Keys = {
["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKS... |
-- ------------------------------------------------------------------------------
-- RP Tags
-- by Oraibi, Moon Guard (US) server
-- ------------------------------------------------------------------------------
--
-- This work is licensed under the Creative Commons Attribution 4.0 International
-- (CC BY 4.0) license.... |
dofile("screen_reader_common.inc");
dofile("ui_utils.inc");
local per_click_delay = 0;
button_names = {
"Wet Jugs",
"Wet Clay Bricks",
"Wet Firebricks",
"Wet Clay Mortars"
};
function clickAll(image_name)
-- Find buttons and click them!
srReadScreen();
xyWindowSize = srGetWindowSize();
local buttons = findAl... |
local qcfg = require 'Q/UTILS/lua/qcfg'
local function set_memo(is_memo)
if (type(is_memo) ~= "boolean") then return nil end
qcfg._modify("is_memo", is_memo)
return true
end
return require('Q/q_export').export('set_memo', set_memo)
|
Map = {}
local oldInterior = 0
function Map.start()
oldInterior = localPlayer.interior
if not oldInterior then
oldInterior = 0
end
localPlayer.interior = 16
MapWorld.start()
MapCamera.start()
MapControls.start()
MapIcons.start()
MapUI.start()
end
function Map.draw()
MapIcons.draw()
MapUI.draw()
end
func... |
-- GLOBAL
ANS_CONFIG = {};
local Ans = select(2, ...);
local Config = Ans.Object.Register("Config");
-- default config holders
local GENERAL_DEFAULT = {
showDressing = false,
useCoinIcons = false,
tooltipRealmRecent = true,
tooltipRealmMin = true,
tooltipRealm3Day = true,
tooltipRealmMarket = ... |
-- Server Objects
includeFile("custom_content/static/worldbuilding/furniture/cheap/frn_all_chep_armoire_s01.lua")
includeFile("custom_content/static/worldbuilding/furniture/cheap/frn_all_chep_bookcase_s01.lua")
includeFile("custom_content/static/worldbuilding/furniture/cheap/frn_all_chep_cabinet_s01.lua")
includeFile("... |
return class.interface("ICoords", {
get_size = "function",
get_tiled_width = "function",
get_tiled_height = "function",
tile_to_screen = "function",
find_bounds = "function",
... |
---@class IsoRadio : zombie.iso.objects.IsoRadio
IsoRadio = {}
---Overrides:
---
---getObjectName in class IsoObject
---@public
---@return String
function IsoRadio:getObjectName() end
---@protected
---@param arg0 boolean
---@return void
function IsoRadio:init(arg0) end
|
local function GetEntityPosRounded(ent)
local v = ent:GetPos()
return {
x = math.Round(v.x),
y = math.Round(v.y),
z = math.Round(v.z)
}
end
local function GetEntityPosRoundedString(ent)
v = GetEntityPosRounded(ent)
x = v.x
y = v.y
z = v.z
return "X: " .. x .. ", Y: " .. y .. ", Z: " .. z
end
local DOOR_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.