content stringlengths 5 1.05M |
|---|
-----------------------------------
-- Area: Xarcabard
-- NPC: Beastmen_s_Banner
-- !pos 153.000 -36.444 23.500 112
-----------------------------------
local ID = require("scripts/zones/Xarcabard/IDs")
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
pl... |
local json = json
local pairs = pairs
local const = require("const")
GameRecorder = class("GameRecorder")
GameRecorder.__index = GameRecorder
function GameRecorder:ctor()
self.recordPath = const.RECORD_PATH
self.isNewPlayer = true
self.record = {}
end
function GameRecorder:create()
local recorder = GameRecorder... |
function Square(Number)
return Number * Number
end
function LuaPrint(Text)
print("LUA", Text);
end
function HelloLua(fromC)
if not fromC then
LuaPrint("Hello, from Lua!")
else
LuaPrint("Hello, from C++!")
end
end
local Success = FileW("Text.txt", "New Files Contents")
if Success t... |
fx_version 'cerulean'
game 'gta5'
name 'DanFrmSpace Weapons Truck Robbery'
description 'Robbery script for the weapons truck in GTA V'
author 'DanFrmSpace'
url 'https://github.com/d0p3t/fivem-ts-boilerplate'
client_script {
'dist/client/*.client.js',
'config.ts'
}
server_script 'dist/server/*.server.js'
|
local skynet = require "skynet"
local netpack = require "skynet.netpack"
local socket = require "skynet.socket"
local client_fd = ...
client_fd = tonumber(client_fd)
skynet.register_protocol {
name = "client",
id = skynet.PTYPE_CLIENT,
unpack = netpack.tostring
}
local function task(msg)
... |
--[[
/ Bulk Fade /
About:
This module was created to make bulk tweening much easier.
Bulk tweening is when you tween all the elements together for a better transition.
Version:
- 1.3
- 11/12/2021
Author(s):
kingerman88
]]
-- / Types / --
type ArrayList<T> = {[number]:T};
type IndexArray<I,V> = {[I... |
-- lua-logo.lua
sqrt=math.sqrt
PI=math.pi
RESOLUTION=512
p:begin_page(RESOLUTION, RESOLUTION)
p:translate(RESOLUTION/2, RESOLUTION/2)
p:scale(RESOLUTION/2/sqrt(2), RESOLUTION/2/sqrt(2))
-- planet
p:setcolor("fill", "rgb", 0, 0, 0.5)
p:circle(0, 0, 1)
p:fill()
-- hole
r=1-sqrt(2)/2
p:setcolor("fill", "rgb", 1, 1, ... |
local ffi = require("ffi")
local ffi_util = require("common.ffi_util")
do --- ffi-parse-cdef
ffi_util.checkfail({
"int",
"int aa1; int aa2 ",
"static int x;",
"static const long long x = 1;", -- NYI
"static const double x = 1;", -- NYI
"static const bool x = 1;", -- NYI (intentional, n... |
-- WirePlumber
--
-- This file contains the API that is made available to the Lua scripts
--
-- Copyright © 2020 Collabora Ltd.
-- @author George Kiagiadakis <george.kiagiadakis@collabora.com>
--
-- SPDX-License-Identifier: MIT
local function Constraint (spec)
assert (type(spec[1]) == "string", "Constraint: expec... |
HeroName[13] = "阿尔托莉亚"
HeroMain[13] = "力量"
HeroType[13] = |Ewrd|
RDHeroType[13] = |h017|
IllHeroType[13] = |E038|
HeroTypePic[13] = "ReplaceableTextures\\CommandButtons\\BTNSaber.blp"
HeroSize[13] = 1.2
HeroReadySound[13] = "sound\\H013_Ready.mp3"
LearnSkillId = {|A1A1|, |A1A2|,... |
local chat = require('core.chat')
local command = require('core.command')
local event = require('core.event')
local math = require('math')
local channel = require('core.channel')
local server = require('shared.server')
local string = require('string')
local struct = require('struct')
local table = require('table')
que... |
BLACK_EXPORT_START_RATIO = 10;
BLACK_EXPORT_ABORT_RATIO = 6;
BLACK_EXPORT_PRIZE = math.random (10000, 15000);
blackexport = {
vehicles = {},
lastid = 0,
location = 0,
locations = {},
marker_location = {1664.06, 713.35, 9.82},
};
addEventHandler ("onResourceStart", resourceRoot,
function ()
for ... |
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor.
polearm_staff_wood_reinforced = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/weapon/melee/polearm/lance_staff_wood_s2.iff",
craftingValues = {
{"mindamage",41,52,0},
{"maxdamage",86,111,0},
{"at... |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("moonpie.redux.createSlice", function()
local store = require "moonpie.redux.store"
local createSlice = require "moonpie.redux.create_slice"
it("takes a table and ... |
local tl = require("tl")
local util = require("spec.util")
describe("tl.pretty_print_ast", function()
it("returns error for <close> attribute on non 5.4 target", function()
local input = [[local x <close> = io.open("foobar", "r")]]
local result = tl.process_string(input, false, tl.init_env(false, "off",... |
function handleYARM(site)
gauge_yarm_site_amount:set(site.amount, {site.force_name, site.site_name, site.ore_type})
gauge_yarm_site_ore_per_minute:set(site.ore_per_minute, {site.force_name, site.site_name, site.ore_type})
gauge_yarm_site_remaining_permille:set(site.remaining_permille, {site.force_name, site.site_... |
-- module describing business system (company, money laundering)
local cfg = module("cfg/business")
vRP.prepare("vRP/create_business","INSERT IGNORE INTO vrp_user_business(user_id,name,description,capital,laundered,reset_timestamp) VALUES(@user_id,@name,'',@capital,0,@time)")
vRP.prepare("vRP/delete_business","DELE... |
net.Receive( "acfm_versionresponse", function( len, ply )
local response = net.ReadTable()
local inDate = response.IsLatest
local lastUpdate = response.LatestDate
if inDate == nil then return end
if not inDate then
if lastUpdate then
chat.AddText(Color(255,0,0), "A newer version of ACF Supreme is ... |
local bit = require 'bit'
local ffi = require 'ffi'
local mswin = require 'exports.mswindows'
local winstr = require 'exports.mswindows.strings'
local winfiles = require 'exports.mswindows.filesystem'
local winhandles = require 'exports.mswindows.handles'
local on_wait_object_signal = require 'radish.mswindows.on_wait... |
describe("utils", function()
local utils = require "nvim-test.utils"
it("find file by patterns", function()
assert.is.equal(
"spec/fixtures/js/name.test.js",
utils.find_file_by_patterns(
"spec/fixtures/js/name.js",
{ "{name}.spec.{ext}", "{name}.test.{ext}" }
)
)
assert... |
--[[
< CATHERINE > - A free role-playing framework for Garry's Mod.
Development and design by L7D.
Catherine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) an... |
local addonName, addon = ...
local tests = {}
--[[-------------------------------------------------------------------
-- Bootstrap code to set up the buttons
-------------------------------------------------------------------]]--
local groupheader = CreateFrame("Button", addonName .. "TestHeader", UIParent, "Secure... |
local mposx = 0;
local mposy = 0;
local hovered = nil;
local buttonWidth = 250;
local buttonHeight = 75;
local buttonBorder = 2;
local label = -1;
local gr_r, gr_g, gr_b, gr_a = game.GetSkinSetting("col_test")
gfx.GradientColors(0,127,255,255,0,128,255,0)
local gradient = gfx.LinearGradient(0,0,0,1)
local bgPattern = ... |
function Auctionator.API.v1.GetAuctionPriceByItemID(callerID, itemID)
Auctionator.API.InternalVerifyID(callerID)
if type(itemID) ~= "number" then
Auctionator.API.ComposeError(
callerID,
"Usage Auctionator.API.v1.GetAuctionPriceByItemID(string, number)"
)
end
return Auctionator.Database:Get... |
-----------------------------------
-- Area: North Gustaberg
-- NPC: <this space intentionally left blank>
-- !pos -217 97 461 106
-----------------------------------
local ID = require("scripts/zones/North_Gustaberg/IDs")
require("scripts/globals/npc_util")
-----------------------------------
function onTrade(player... |
--
-- tests/actions/vstudio/vc2010/vstudio_vs2010_rule_props.lua
-- Validate generation of custom rules
-- Author Tom van Dijck
-- Copyright (c) 2016 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vstudio_vs2010_rule_props")
local vc2010 = p.vstudio.vc2010
local m = p.vstudi... |
-- scaffold geniefile for XSadd
XSadd_script = path.getabsolute(path.getdirectory(_SCRIPT))
XSadd_root = path.join(XSadd_script, "XSadd")
XSadd_includedirs = {
path.join(XSadd_script, "config"),
XSadd_root,
}
XSadd_libdirs = {}
XSadd_links = {}
XSadd_defines = {}
----
return {
_add_includedirs = function()
inc... |
local tap = require('util/tap')
local util = require('util')
local test = tap.test
local path = require('path')
local spawn = require('child_process').spawn
local __dirname = util.dirname()
console.log(process.execPath, __dirname)
test("process execute", function()
local childPath = path.join(__dirname, "fixtures",... |
local json = require "json"
--要登录后才能用
local pingReq = {
header = {
protoid = 0x0001,
session = 1,
response = nil,
},
data = 1234,
}
print("pingReq="..json.encode(pingReq))
local registerReq = {
header = {
protoid = 0x0101,
session = 1,
response = nil,
},
data = {
account = "游客1001",
password = ... |
local ane = {}
local pce = {
name = "main",
path = "assets/spr/fx/reticle.png",
width = 128,
height = 128,
imgX = 64,
imgY = 64,
originX = 64,
originY = 64,
attachPoints = {
center = {x = 64,y=64},
},
-- connectSprite = "main",
-- connectPoint = "hand1",
-- connectMPoint = "grip1",
animations = ane
}
... |
--エーリアン・ドッグ
function c15475415.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15475415,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1... |
local event = import("libs/event")
local lust = import("libs/lust")
local describe, it, expect = lust.describe, lust.it, lust.expect
describe("event", function()
it("observe", function()
local test = nil
local cb = function()
test = true
end
local spy = lust.spy(cb)
... |
local ADDON_NAME, namespace = ...
local L = namespace.L
local LOCALE = GetLocale()
-- TODO: Just an example of how this works...
-- Will add localized strings if users provide them
if LOCALE == "deDE" then
L["BoA"] = "BoA"
L["BoE"] = "BoE"
L["Equip:"] = "Equip:"
return end
|
-- Services
local run_service = game:GetService('RunService')
local user_input_service = game:GetService('UserInputService')
-- Locals
local camera = workspace.CurrentCamera
-- Modules
local signal = require(script.Parent.Signal)
-- Main Module
local mouse = {}
return {
New = function()
local posi... |
-- Copyright (C) 2019 by davin
-- rsa1024 encrypt and decrypt
local resty_rsa = require "resty.rsa"
local resty_str = require "resty.string"
local scheme = ngx.var.scheme
if scheme ~= 'https' then
return ngx.redirect(
'https://'..ngx.var.host..ngx.var.request_uri, 301)
end
local plain = ngx.var.arg_plain... |
http = require "resty.http"
def_backend = "upstream-default-backend"
local concat = table.concat
local upstream = require "ngx.upstream"
local get_servers = upstream.get_servers
local get_upstreams = upstream.get_upstreams
local random = math.random
local us = get_upstreams()
function openURL(original_headers, status... |
-- Copied from Roselia - A Cruel Angel Thesis
-- Which is copied from Poppin' Party - Senbonzakura
RequireDEPLSVersion(02010300)
local Sen = {Event = {}}
local fft = require("luafft")
function Sen.LoadBackgroundID(id)
local t = {}
t[0] = LoadDEPLS2Image("assets/image/background/liveback_"..id..".png")
t[... |
local serpentTests=function()
local item={name="mock"}
local player=
{
name="player",
inventory={item},
activeItem=item,
Sprite=Img.player,
draw=function()
LG.print("player")
end
}
local world={
player,
item,
update=function() local a=1 end
}
local playerTest=world[1]
local itemTe... |
--((Version 2.2
--fix #CMDS
script.Parent=nil
script:ClearAllChildren()
XAdminsAdmin = "Cobalt1164"
XAdminsAdminPlayer = game:GetService("Players"):findFirstChild(XAdminsAdmin)
XAdmin = {
AdminsSoundAdminMusic = {
AdminMusic = {
{ID = "http://www.roblox.com/Asset/?id=144364636",PITCH = 1,NAME = "Hey broth... |
require 'nngraph'
require 'nn'
input = nn.Identity()()
L1 = nn.Tanh()(nn.Linear(10, 20)(input))
L2 = nn.Tanh()(nn.Linear(30, 60)(nn.JoinTable(1)({input, L1})))
L3 = nn.Tanh()(nn.Linear(80, 160)(nn.JoinTable(1)({L1, L2})))
g = nn.gModule({input}, {L3})
|
-- Conversion assistant
local file = io.open("to1bit/tmp.bin", "wb")
local fn = 1
while true do
local idata
pcall(function ()
idata = love.image.newImageData("frames/" .. fn .. ".png")
end)
if not idata then break end
local function getBit(x, y)
local r, g, b = idata:getPixel(x, y)
local luma = (r + g + b)... |
object_building_military_talus_coa_aclo_office = object_building_military_shared_talus_coa_aclo_office:new {
}
ObjectTemplates:addTemplate(object_building_military_talus_coa_aclo_office, "object/building/military/talus_coa_aclo_office.iff")
|
--- The box layout.
-- @module wonderful.layout.box
local class = require("lua-objects")
local Box = require("wonderful.geometry").Box
local Layout = require("wonderful.layout").Layout
local LayoutItem = require("wonderful.layout").LayoutItem
local Direction = {
TopToBottom = 0,
BottomToTop = 1,
LeftToRight = ... |
data:extend({
{
type = "fluid",
name = "Ammonium-tetrafluoroberyllate",
subgroup = "thorium-chain",
default_temperature = 25,
heat_capacity = "1KJ",
--42, 168, 55
--50, 199, 94
base_color = {r=0.2, g=0.67, b=0.21},
flow_color = {r=0.3, g=0.78, b=0.37},
max_temperature ... |
local car = table.deepcopy(data.raw.car.car)
car.name = "electric-vehicles-electric-car"
car.icon = "__electric-vehicles-reborn__/graphics/icons/electric-car.png"
car.minable.result = "electric-vehicles-electric-car"
car.equipment_grid = "electric-vehicles-electric-car"
car.equipment_categories = {"armor", "electric-ve... |
Config.Jobs.fueler = {
BlipInfos = {
Sprite = 436,
Color = 5
},
Vehicles = {
Truck = {
Spawner = 1,
Hash = "phantom",
Trailer = "tanker",
HasCaution = true
}
},
Zones = {
CloakRoom = {
Pos = {x = 557.93, y = -2327.90, z = 4.82},
Size = {x = 3.0, y = 3.0, z = 2.0},
Color = {r = ... |
require "XmlWriter"
require "vmath"
local function GenStringFromArray(theArray, bAsInt)
local array = {" "}
for i, vector in ipairs(theArray) do
local elements = vector;
if(bAsInt) then
elements = {};
for i, value in ipairs(vector) do
elements[#elements + 1] = string.format("%i", value);
end
end
... |
object_tangible_furniture_decorative_wod_potted_plant_08 = object_tangible_furniture_decorative_shared_wod_potted_plant_08:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_decorative_wod_potted_plant_08, "object/tangible/furniture/decorative/wod_potted_plant_08.iff")
|
local Actions = require("actions")
local Keybind = {}
Keybind.__index = Keybind
Keybind.table = {}
Keybind.table.default = {}
-- is this even used?
Keybind.table.fileSelect = {}
Keybind.table.notes = {}
Keybind.new = function(key, name, mode)
self = {}
setmetatable(self, Keybind)
self.name = name
se... |
local API_NPC = require(script:GetCustomProperty("API_NPC"))
function OnTaskStart(npc, animatedMesh)
end
function OnTaskEnd(npc, animatedMesh, interrupted)
end
API_NPC.RegisterTaskClient("dummy_heal", nil, OnTaskStart, OnTaskEnd)
|
function love.conf(t)
t.title = 'title'
t.version = '11.3'
t.console = true
t.window.width = 1200
t.window.height = 720
end
|
AddCSLuaFile()
function EFFECT:Init(data)
if DRONES_REWRITE.ClientCVars.NoMuzzleFlash:GetBool() then return end
self.Start = data:GetOrigin()
self.Forward = data:GetNormal()
self.Emitter = ParticleEmitter(self.Start)
local dlight = DynamicLight(self:EntIndex())
if dlight then
dlight.pos = self.Start
dlig... |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:NewModule('UnitFrames', 'AceTimer-3.0', 'AceEvent-3.0', 'AceHook-3.0');
local LSM = LibStub("LibSharedMedia-3.0");
UF.LSM = LSM
--Cache global variables
--Lua functions
local _G = _G
local select, pairs... |
local everestLavaBlocker = {}
everestLavaBlocker.name = "everest/lavaBlockerTrigger"
everestLavaBlocker.placements = {
name = "lava_blocker",
data = {
canReenter = false
}
}
return everestLavaBlocker |
local handy = request('!.mechs.processor.handy')
local opt = handy.opt
local word = request('^.words.word')
local expr_list = request('^.wrappers.expr_list')
local empty_statement = request('empty_statement')
return
{
name = 'return_statement',
word('return'),
opt(expr_list),
opt(empty_statement),
... |
mod_name="__ProgrammableCombinator__"
|
include "app.gameClass.trigger.Trigger"
_ENV=namespace "game"
using_namespace "luaClass"
using_namespace "container"
---@class SkillTrigger
class("SkillTrigger"){
CLASS_DEBUG(false);
super(Trigger);
}
function SkillTrigger:SkillTrigger(parent,triggerName,triggerArgvs,showLevel)
self:Trigger(triggerName,tri... |
local _M = {
addr = {
kremcoins = 0x7e08cc,
tileCollisionMathPointer = 0x7e17b2,
spriteBase = 0x7e0de2,
verticalPointer = 0xc414,
tiledataPointer = 0x7e0098,
haveBoth = 0x7e08c2,
---Height in game units for vertical levels, width for horizontal
areaLen... |
---@class UnityEngine.PlayMode : System.Enum
---@field value__ int
---@field StopSameLayer UnityEngine.PlayMode
---@field StopAll UnityEngine.PlayMode
local m = {}
UnityEngine = {}
UnityEngine.PlayMode = m
return m |
Config = {}
--
-- Video shown on screen. Default is "CASINO_DIA_PL".
--
-- CASINO_DIA_PL - Falling Diamonds
-- CASINO_HLW_PL - Falling Skulls
-- CASINO_SNWFLK_PL - Falling Snowflakes
--
Config.VideoType = 'CASINO_DIA_PL'
--
-- Enter & Exit Events
--
-- These events should be fired by your teleport script when ... |
--[[
name : global_data.lua
version: 1.0 beta
author : casanoe
creation : 16/04/2021
update : 19/06/2021
TODO : ?
--]]
return {
data = {
managedEvent = { initial = {} },
globalvars = { initial = {} },
managedContext = { initial = {} },
dzbench = { history = true, maxMinutes = 10 ... |
local defaultParams = {
name = "", text = "",
txtColor = 0, bgColor = 0,
offsetX = 0, offsetY = 0,
scaleX = 1, scaleY = 1,
}
Button = Core.class(Sprite)
-- params (table):
-- w (number): width of the button
-- h (number): height of the button
-- font (Font): font to use [optional]
-- name (string... |
-- $Id: test/cstack.lua $
-- See Copyright Notice in file all.lua
local tracegc = require"tracegc"
print"testing stack overflow detection"
-- Segmentation faults in these tests probably result from a C-stack
-- overflow. To avoid these errors, you should set a smaller limit for
-- the use of C stack by Lua, by chan... |
local LibOrb = Wheel:Set("LibOrb", 20)
if (not LibOrb) then
return
end
local LibFrame = Wheel("LibFrame")
assert(LibFrame, "LibOrb requires LibFrame to be loaded.")
-- Lua API
local _G = _G
local math_abs = math.abs
local math_max = math.max
local math_sqrt = math.sqrt
local select = select
local setmetatable = set... |
local K = unpack(select(2, ...))
local Module = K:GetModule("Skins")
local SwPlay = "Interface\\AddOns\\KkthnxUI\\Media\\Textures\\SwPlay"
local SwReset = "Interface\\AddOns\\KkthnxUI\\Media\\Textures\\SwReset"
local SwPause = "Interface\\AddOns\\KkthnxUI\\Media\\Textures\\SwPause"
local function SkinStopwatch()
Sto... |
---------------------------------------------------------------------------
--- A notification action.
--
-- A notification can have multiple actions to chose from. This module allows
-- to manage such actions. An action object can be shared by multiple
-- notifications.
--
-- @author Emmanuel Lepage Vallee <elv1313... |
local lsp = require('sh.lsp')
local lspconfig = require('lspconfig')
if not lsp.is_client_active('terraformls') then
lspconfig.terraformls.setup {on_attach = lsp.common_on_attach, capabilities = lsp.capabilities, filetypes = {'tf', 'terraform', 'hcl'}}
vim.cmd [[LspStart]]
end
|
require "EasyConfig/EasyConfig"
NS = NS or {}
NS.config = {
rainsprinters = false,
}
NS.modId = "NightSprinters"
NS.name = "Night Sprinters settings"
NS.menu = {
rainsprinters = {
type = "Tickbox",
title = "Enables Rain Sprinters",
tooltip = "",
}
}
EasyConfig.addM... |
#!/usr/bin/luajit
------------------------------------------------------------------------------
-- This converts a docker file to a shell file
--Almost guaranteed to not work with many Docker files, but hey, it works for us
------------------------------------------------------------------------------
local DM_PACKA... |
object_mobile_disappearances_psycho_boss = object_mobile_shared_disappearances_psycho_boss:new {
}
ObjectTemplates:addTemplate(object_mobile_disappearances_psycho_boss, "object/mobile/disappearances_psycho_boss.iff")
|
mymillwork.register_all(
"default_stone",
"Stone",
"default_stone.png",
{cracky = 3,not_in_creative_inventory=1},
"default:stone"
)
mymillwork.register_all(
"default_stone_brick",
"Stone Brick",
"default_stone_brick.png",
{cracky = 3,not_in_creative_inventory=1},
"default:stonebrick"
)
mymillwork.registe... |
-- p6 - last parameter does not mean vehicle handle is returned maybe a quick view in disassembly will tell us what is actually does p6 seems to check for something with the script in the disassembly
-- @module native
-- @submodule vehicle
-- @see CREATE_VEHICLE
-- @usage Vehicle CREATE_VEHICLE(Hash modelHash, fl... |
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
local condition = Condition(CONDITION_LIGHT)
condition:setParameter(CONDITION_PARAM_LIGHT_LEVEL, 6)
condition:setParameter(CONDITION_PARAM_LIGHT_COLOR, 215)
condition:setParameter(CONDI... |
local K = unpack(select(2, ...))
local _, ns = ...
local oUF = ns.oUF or K.oUF
local CanDispel = {
DRUID = {Magic = false, Curse = true, Poison = true},
MAGE = {Curse = true},
MONK = {Magic = false, Poison = true, Disease = true},
PALADIN = {Magic = false, Poison = true, Disease = true},
PRIEST = {Magic = false, ... |
local screenW, screenH = guiGetScreenSize()
local theAnimation = {}
local guiS = {}
guiS[1] = guiCreateGridList(0.35, 0.28, 0.12, 0.39, true)
guiGridListAddColumn(guiS[1], "Category", 0.8)
for k, v in ipairs(getElementsByType("animationCategory")) do
local row = guiGridListAddRow(guiS[1])
guiGridListSetItemText(guiS... |
--[[
Returns the BasePart that the mouse hit.
Works the same as `Player:GetMouse().Hit` but allows you to pass in an ignore list, instead of relying on TargetFilter.
Usage:
local mouseHit = getMouseHit()
-- Or with an ignore list:
local mouseHit = getMouseHit({ LocalPlayer.Character, workspace.Foo})
]]
lo... |
-- farmrect <length> <width>
--
-- Farm a rectangle of the given length and width
--
----------------------------
-- USAGE
----------------------------
-- TODO: positioning
-- o o o w
-- o o o i
-- o o o d
-- o o o t
-- length h
-- buildrect 3 4
--
local tArgs = {...}
local bDebug = false
local selected... |
-- 設定情報(GETで返す値)
return {
get={
version =require "version",
name ="emo",
craftman ="ekicyou",
craftmanw ="どっとステーション駅長",
homeurl ="URL",
["sakura.recommendsites"] ={["NAME1"]="URL1", ["NAME2"]="URL2",},
["sakura.portalsites"] ={["NAME1"]="URL1", ["... |
return {
listeners = {
playerEnter = function(state)
return function(self, player)
local questRef = "limbo:selfdefense101";
if state.QuestFactory:canStart(player, questRef) then
local quest = state.QuestFactory:create(state, questRef, player)
player.questTracker:start(que... |
-- liquid_stairs/init.lua
-- Load support for Minebase translation.
local S = minetest.get_translator("liquid_stairs")
stairs.register_all("liquid_stairs:obsidian", {
material = "base_liquids:obsidian",
groups = {cracky = 1, level = 2},
tiles = {"base_liquids_obsidian.png"},
stair_description = S("Obsidian Stair"... |
--
-- Created by PhpStorm.
-- User: Wu Lihua <maikekechn@gmail.com>
-- Time: 2017/1/7 下午2:19
--
--[[
--限速返回1 否则返回0
--]]
local frequency = redis.call("INCR", KEYS[1])
if frequency > tonumber(ARGV[1])
then
return 1
end
if frequency == 1
then
redis.call("PEXPIRE", KEYS[1], ARGV[2])
end
return 0 |
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author (zacharyenriquee@gmail.com).
--]]
ix.command.Add("GetFlags", {
description = "Returns a character's flags.",
adminOnly = true,
arguments = {
ix.type.character
},
OnRun = function(self, client, target)
... |
return {'sexagesima','sexappeal','sextakkoord','sextant','sextet','sexy','sexyer','sextakkoorden','sextanten','sextetten','sexyst'} |
object_tangible_tcg_series6_combine_object_hk_droids_poster = object_tangible_tcg_series6_shared_combine_object_hk_droids_poster:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series6_combine_object_hk_droids_poster, "object/tangible/tcg/series6/combine_object_hk_droids_poster.iff") |
object_draft_schematic_dance_prop_prop_ribbon_spark_r_s02 = object_draft_schematic_dance_prop_shared_prop_ribbon_spark_r_s02:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_dance_prop_prop_ribbon_spark_r_s02, "object/draft_schematic/dance_prop/prop_ribbon_spark_r_s02.iff")
|
--- "Ramsus" ---
local isUiOpen = false
local speedBuffer = {}
local velBuffer = {}
local SeatbeltON = false
local InVehicle = true
function Notify(string)
SetNotificationTextEntry("STRING")
AddTextComponentString(string)
DrawNotification(false, true)
end
AddEventHandler('seatbelt:sounds', function(soundFile,... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' 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... |
local ItemMenuScene = class("ItemMenuScene", Scene)
local ItemMenuController = require("scenes.world.menu.ItemMenuController")
function ItemMenuScene:initialize()
Scene.initialize(self)
self:add(ItemMenuController())
end
return ItemMenuScene
|
local KarmaLoot, ns = ...
-- Splits strings lol
function ns.strSplit(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t = {}
for str in string.gmatch(inputstr, "([^" .. sep .. "]+)") do
table.insert(t, str)
end
return t
end
function ns.canOpenRolls()
lo... |
local io = require('io')
local yaml = require('lyaml')
local gears = require('gears')
local config = {}
local settings = {}
local configFile = io.open(gears.filesystem.get_configuration_dir() .. '/configs/config.yml', 'r')
if configFile then
local configYaml = configFile:read('*all')
configFile:close()
settings =... |
local Class = require("lib.Class")
local Vector2 = require("lib.Vector2")
local T = Class:derive("Transform")
function T:new(x, y, sx, sy, angle, vx, vy, yoffset)
self.x = x or 0
self.y = y or 0
self.sx = sx or 1
self.sy = sy or 1
self.angle = angle or 0
-- added some velocity
self.vx = v... |
--A宝玉獣 サファイア・ペガサス
--
--Script by Trishula9
function c100290016.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
--self to grave
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SELF_TOGRAVE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:S... |
vim.api.nvim_create_autocmd("CursorHold", {
pattern = "*",
callback = function()
vim.diagnostic.open_float(nil, { source = "always", focus = false })
end,
desc = "Open diagnostics",
})
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter" }, {
pattern = "*",
callback = function()
vim.cmd([[silent! :checkti... |
function div(a, b) return math.floor(a/b) end
for line in io.lines(arg[1]) do
local v, z, w, h = line:match("Vampires: (%d+), Zombies: (%d+), Witches: (%d+), Houses: (%d+)")
print(v + z + w == 0 and 0 or div((v * 3 + z * 4 + w * 5) * h, v + z + w))
end
|
NativeEvent.callNativeEvent = function(self , keyParm , data)
if data then
dict_set_string(keyParm,keyParm..kparmPostfix,data);
end
dict_set_string(NativeEvent.s_luaCallEvent,NativeEvent.s_luaCallEvent,keyParm);
call_native(NativeEvent.s_luaCallNavite);
end
NativeEvent.getWriteLogPath =... |
local utils = require('util')
local fs = require('fs')
local path = require('path')
local assert = require('assert')
local tap = require('util/tap')
local lmedia = require("lmedia")
local lreader = require("lmedia.ts.reader")
local basePath = utils.dirname()
local test = tap.test
-- 这个测试将从 TS 流中分离出单纯的 ES ... |
require 'rockspec'
package('wonderland','1.0')
Lua.module.wonderland.alice()
Lua.module.wonderland.caterpillar()
rockspec.write() |
----------------------------------------------------------------------------------------------
-- -- -- PATHS
----------------------------------------------------------------------------------------------
-- -- GENERIC PATHS
path_mod = "__water-belts__/"
-- Libraries
path_public_lib ... |
--Cat Rain
function c600019.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c600019.condition)
e1:SetTarget(c600019.sptg)
e1:SetOperation(c600019.sumop)
c:RegisterE... |
local Gui = require("api.Gui")
local Ui = require("api.Ui")
local Draw = require("api.Draw")
local IUiLayer = require("api.gui.IUiLayer")
local IInput = require("api.gui.IInput")
local InputHandler = require("api.gui.InputHandler")
local Treemap = require("mod.treemap.api.gui.Treemap")
local TreemapViewer = class.cla... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.