content stringlengths 5 1.05M |
|---|
local log = require('log')
local bit = require('bit')
local json = require('json')
local VERSION_ID
-- Guest user id - the default user
local GUEST = 0
-- Super User ID
local ADMIN = 1
-- role 'PUBLIC' is special, it's automatically granted to every user
local PUBLIC = 2
--------------------------------------------... |
local lastPushKey = KEYS[1]
local debounceKey = KEYS[2]
local now = ARGV[1]
local secondsToDelay = ARGV[2]
local debounceSeconds = ARGV[3]
redis.call('set', lastPushKey, now + secondsToDelay, 'PX', 2 * debounceSeconds * 1000)
redis.call('set', debounceKey, '_', 'PX', debounceSeconds * 1000)
|
--[[
# Element: HappinessIndicator
Handles the visibility and updating of player pet happiness.
## Widget
HappinessIndicator - A `Texture` used to display the current happiness level.
The element works by changing the texture's vertex color.
## Notes
A default texture will be applied if the widget is a Texture and... |
hp = 2000
attack = 400
defense = 400
speed = 70
mdefense = 300
luck = 70
float = 0
strength = ELEMENT_FIRE
weakness = ELEMENT_ICE
function initId(id)
myId = id
end
function start()
end
function get_action(step)
return COMBAT_ATTACKING, 1, getRandomPlayer()
end
function die()
end
|
--I have a table for this specific font I use in my progress bar addon. This will keep me from making duplicate fonts
--I may make the functions themself global, but for now I'll have it like this
CryotheumDynamicFontData = CryotheumDynamicFontData or {}
--this one is for more
CryotheumDynamicNZLSFontData = CryotheumD... |
local window = require 'window'
local Particle = {}
Particle.__index = Particle
function Particle:new()
new = {}
setmetatable(new, Particle)
local winWidth = window.width
new.size = math.random(3)
new.pos = { x = math.random(winWidth), y = math.random(window.height) }
local ratio = 1.0 - math.cos(math.... |
#!/usr/bin/lua
function sleep(n)
os.execute("sleep " .. tonumber(n))
end
lib = require("rolibsensor")
sensor = lib.new("Range#1","HC-SR04",18,24)
while (true) do
sleep(0.05)
print(sensor:read())
end
|
slot0 = class("ShipGroup", import(".BaseVO"))
slot0.REQ_INTERVAL = 60
slot0.GetGroupConfig = function (slot0)
for slot4, slot5 in pairs(pg.ship_data_group) do
if slot5.group_type == slot0 then
return slot5
end
end
end
slot0.getDefaultShipConfig = function (slot0)
slot1 = nil
for slot5 = 4, 1, -1 do
if p... |
--This provides wrappers to prevent themes that used functions that are now unavailable from crashing.
Scoring = {}
setmetatable(
Scoring,
{
__index = function()
return function()
lua.ReportScriptError("Lua scoring unimplemented")
end
end
}
)
|
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("game.ui.create_character.equip", function()
local Equip = require "game.ui.create_character.equip"
it("renders a component", function()
assert.is_table(Equip())... |
pg = pg or {}
pg.enemy_data_statistics_127 = {
[10044063] = {
cannon = 140,
reload = 150,
speed_growth = 0,
cannon_growth = 1880,
pilot_ai_template_id = 30003,
air = 0,
rarity = 2,
dodge = 6,
torpedo = 60,
durability_growth = 86000,
antiaircraft = 140,
reload_growth = 0,
dodge_growth = 96,
... |
--[[
Retries a failed job by moving it back to the wait queue.
Input:
KEYS[1] 'active',
KEYS[2] 'wait'
KEYS[3] jobId
KEYS[4] events stream
ARGV[1] pushCmd
ARGV[2] jobId
ARGV[3] token
Events:
'prefix:added'
Output:
0 - OK
-1 - Missing key
]]... |
workspace "CherriesSTL"
architecture "x64"
startproject "CherriesSTL"
configurations
{
"Debug",
"Release",
"Distribution"
}
project "CherriesSTL"
kind "ConsoleApp"
language "C++"
cppdialect "C++20"
targetdir ("%{wks.location}/bin/%{cfg.buildcfg}-%{cfg.syste... |
do
NewBadgeInterface = Interface.new(340, 130, 120, 140, true)
:loadTemplate(WindowBackground)
:setShowCheck(function(self, player, group, badge)
if self.open[player] then
self:update(player, group, badge)
return false
end
return true
end)
:addImage({
image = function(self, player, group,... |
local api = vim.api
local float_win = require('dirdiff/float_win')
local dir_diff = require('dirdiff/diff')
local diff_win = require('dirdiff/diff_win')
local plat = require('dirdiff/plat')
local M = {
float_buf_id = 0,
select_offset = 0,
showed_diff = "",
diff_info = {},
}
function M:create_diff_view(fname)
loc... |
--[[
README:
Put some explanation about your macro at the top! People should know what it does and how to use it.
]]
script_name="C Centralize Drawing"
script_description="Centralize Drawing"
script_author="chaaaaang"
script_version="1.0"
--This is the main processing function that modifies the subtitles
function C... |
plugin =
{
type = "piglet",
name = "piglet::cursor",
test = function()
dofile(SCRIPT_DIR .. "/../common.lua")
return run_tests(tests)
end
}
tests =
{
init_default = function()
local cur = Cursor.new()
assert(cur)
end,
init_from_string = function()
lo... |
Locales['fr'] = {
['mechanic'] = 'mecano',
['drive_to_indicated'] = '~y~Conduisez~s~ jusqu\'à l\'endroit indiqué',
['mission_canceled'] = 'Mission ~r~annulée~s~',
['vehicle_list'] = 'sortir Véhicule',
['work_wear'] = 'tenue de travail',
['civ_wea... |
--[[
HarvestUI Script
This file describes the behavior of the UI HUD, which
displays the current health of whatever item is being aimed at.
]]
local prop_HarvestManager = script:GetCustomProperty("_HarvestManager")
local prop_HarvestHPTracker = script:GetCustomProperty("_HarvestHPTracker")
local propTargetDisplayPane... |
local component = require("component")
local event = require("event")
local sides = require("sides")
local term = require("term")
local inv = component.transposer
local gpu = component.gpu
-- table with the info about the storage. Should contain numerical keys (the slot number)
-- and table values, these tables shoul... |
--[[
Addon: Lib
For: G-Core
By: SlownLS ( www.g-core.fr )
]]
local blur = Material("pp/blurscreen")
function GCore.Lib:DrawBlur( p, a, d )
local x, y = p:LocalToScreen( 0, 0 )
surface.SetDrawColor( 255, 255, 255 )
surface.SetMaterial( blur )
for i = 1, d do
blur:SetFloat( "$blur", (... |
local PLUGIN = PLUGIN;
local Clockwork = Clockwork;
local COMMAND = Clockwork.command:New("ItemSpawnerInfo");
COMMAND.tip = "Prints all the item spawner info in the chat.";
COMMAND.flags = CMD_DEFAULT;
COMMAND.access = "s";
COMMAND.arguments = 0;
-- Called when the command has been run.
function COMMAND:OnRun(player... |
-- long chained method call
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss.w(wwwwwwwww, ddq, q.w(qqqqqq, wsssssssw), q.w(qqqqqq, wsssssssw),q.w(qqqqqq, wsssssssw), q.w(qqqqqq, wsssssssw))
local x = function()
ddd.www:map(function(it)
it.aaa(wwww)(wwww)(wwww)(wwww)-- comment
.wwwww(www... |
local train = scene:getObjects("train0")[1];
local trainDoor = nil;
local train0data = {
cur = 1,
expanded = true,
lower = 1,
upper = 3,
center = scene:getObjects("arena0")[1].pos,
points = {
[1] = {
[1] = scene:getObjects("train_dest1a")[1].pos,
[2] = scene:getOb... |
solution "jeff"
configurations { "Debug", "Release" }
-- A project defines one build target
project "jeffbinary"
kind "SharedLib"
language "C"
includedirs {"/Library/Java/Home/include"}
files { "**.h", "**.c" }
configuration "Debug"
defines { "DEBUG" }
flags {... |
-- autocmd BufWritePost set in init.vim
local keymap = require("gb.utils").map
local prettierCmd = "./node_modules/.bin/prettier --config .prettierrc --write"
local tempfile_dir = vim.fn.expand("~/.formatter-nvim-tmp-files")
local onlyPrettierCmdOpts = {
{
cmd = {
prettierCmd
},
tempfile_dir = tem... |
-- file created: 2008-12-18
local dialog = require "far2.dialog"
local M = require "lf4ed_message"
local function ExecuteDialog (aData)
local D = dialog.NewDialog()
D._ = {"DI_DOUBLEBOX",3,1,42, 9, 0, 0, 0, 0, M.MPluginSettings}
D.ReloadDefaultScript = {"DI_CHECKBOX", 6, 2,0,0, 0, 0, 0, 0, M.... |
return PlaceObj("ModDef", {
"dependencies", {
PlaceObj("ModDependency", {
"id", "ChoGGi_Library",
"title", "ChoGGi's Library",
"version_major", 10,
"version_minor", 3,
}),
},
"title", "Dust Geyser Info",
"id", "ChoGGi_DustGeyserInfo",
"steam_id", "2522466305",
"pops_any_uuid", "b49b376f-7947-4b6b-... |
print("Project04: Accelerometer to Blynk")
dofile("{token}.lua")
dofile ( 'lib-BLYNK.lua' )
b=blynk.new (token, false):connect() -- no autogpio
dofile("lib-OLED.lua") -- implicitly starts i2c and sets sda scl
-- some "builds" of nodemcu lua image use "old" init(), some use new setup() syntax:
if adxl345.setup the... |
#!/usr/bin/env lua
local M = {}
function M.list_files(dir)
local files = {}
for filename in lfs.dir(dir) do
if filename and (filename ~= ".") and (filename ~= "..") then
f = dir..filename
local attrs = lfs.attributes(f)
if attrs["mode"] == "directory" then
table.insert(files, filena... |
-- Tests for 'undolevel' setting being global-local
local helpers = require('test.functional.helpers')
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
describe('undolevel', function()
setup(clear)
it('is worki... |
pudge_flesh_heap_lua = class({})
LinkLuaModifier( "modifier_pudge_flesh_heap_lua", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function pudge_flesh_heap_lua:GetIntrinsicModifierName()
return "modifier_pudge_flesh_heap_lua"
end
-------------------------... |
resource.AddFile( "materials/stalker/vision.vmt" )
resource.AddFile( "materials/stalker/regen.vmt" )
resource.AddFile( "materials/stalker/psycho.vmt" )
resource.AddFile( "materials/stalker/flay.vmt" )
resource.AddFile( "materials/stalker/scream.vmt" )
resource.AddFile( "materials/stalker/heart.vmt" )
resource.AddFile(... |
--[[ The environment: Handles interactions and contains the state of the environment]] --
function CatchEnvironment(gridSize)
local env = {}
local state
-- Returns the state of the environment.
function env.observe()
local canvas = env.drawState()
canvas = canvas:view(-1)
return ... |
--Tetris theme licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
--https://commons.wikimedia.org/wiki/File:Tetris_theme.ogg
--8Bit songs
--https://www.fesliyanstudios.com/policy
--Example code used
--https://github.com/OneLoneCoder/videos/blob/master/OneLoneCoder_Tetris.cpp
-... |
-- Modification loader.
-- Dependencies:
-- - fn
-- - simplerr
--[[---------------------------------------------------------------------------
Disabled defaults
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults = {}
DarkRP.disabledDefaults["modules"] = {
... |
RELEASE = (arg[2] == nil)
DEBUG = not RELEASE
SCALE = 2
SCREEN_WIDTH = love.graphics.getWidth()
SCREEN_HEIGHT = love.graphics.getHeight()
WIDTH = love.graphics.getWidth() / SCALE
HEIGHT = love.graphics.getHeight() / SCALE
MUSIC = 1
SOUNDS = 1
libs = require "l2.libs"
for i, m in ipairs(require "require") do
local s... |
local Class = require 'lib.hump.class'
local Expression = getClass 'wyx.component.Expression'
local property = require 'wyx.component.property'
local message = require 'wyx.component.message'
local floor = math.floor
-- Component
--
local Component = Class{name='Component',
function(self, newProperties)
self._prop... |
require "Assets.LuaScripts.Modulus.ECS.LSystem.Factory.LModelSystem"
require "Assets.LuaScripts.Modulus.ECS.LSystem.Factory.LCCSystem"
require "Assets.LuaScripts.Modulus.ECS.LSystem.Factory.LRotationSystem"
require "Assets.LuaScripts.Modulus.ECS.LSystem.Factory.LSpeedSystem"
require "Assets.LuaScripts.Modulus.ECS.LSyst... |
local status_ok, npairs = pcall(require, "nvim-autopairs")
if not status_ok then
return
end
npairs.setup {
check_ts = true, -- You can use treesitter to check for a pair.
fast_wrap = {
map = '<M-e>', -- insert mode
chars = { '{', '[', '(', '"', "'" },
pattern = string.gsub([[ [%'%"%... |
-- this code is for the esp client to send data to the server
-- by raoul and wadleo
--wifi.setmode(wifi.STATIONAP)
wifi.setmode(wifi.STATION)
if (wifi.sta.getip() == nil) then
wifi.sta.config("gear_up","gear_up2016")
end
-- setup baudrate
uart.setup(0,9600,8,0,1)
-- the address of the server is set here
HOST = "19... |
--Copyright (c) 2010 Sakarias Johansson
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')
ENT.PutItOnPlace = 0
ENT.ToolDelay = CurTime()
ENT.ToolList = {}
ENT.nrOfTools = 0
------------------------------------VARIABLES END
function ENT:SpawnFunction( ply, tr )
if ( !tr.Hit ) then re... |
C_Spell = {}
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_Spell.DoesSpellExist)
---@param spellID number
---@return boolean spellExists
function C_Spell.DoesSpellExist(spellID) end
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_Spell.GetMawPowerBorderAtlasBySpellID)
---@param spellID number
--... |
----------------------------------------------------------------
-- Copyright (c) 2012 Klei Entertainment Inc.
-- All Rights Reserved.
-- SPY SOCIETY.
----------------------------------------------------------------
local util = include( "client_util" )
local cdefs = include( "client_defs" )
local mathutil = include( ... |
fx_version 'adamant'
game 'gta5'
description 'Lucky Wheel'
version '1.5.3'
server_script 'server.lua'
client_script 'client.lua'
shared_scripts {
'config.lua',
}
|
--[[----------------------------------------------------------------------------
DisplayMetadata.lua
Summary information for custom metadata dialog sample plugin
--------------------------------------------------------------------------------
ADOBE SYSTEMS INCORPORATED
Copyright 2008 Adobe Systems Incorporated
All... |
function printScalar(pad, k, v)
if type(v) == 'function' then
env.info((string.format("%s'%s' = function'", pad, k)))
elseif type(v) == 'nil' then
env.info((string.format("%s'%s' = nil", k, pad)))
elseif type(v) == 'boolean' then
local bool = 'false'
if v then bool = 'true' end
env.info((string.for... |
local x
if a then
if not x then
x = f()
end
end
|
local U = require("lib.Utils")
local Class = require("lib.Class")
local Vector2 = require("lib.Vector2")
local B = Class:derive("Bar")
local border_thickness = 2
function B:new(id, x, y, w, h, text)
self.id = id
self.pos = Vector2(x or 0, y or 0)
self.w = w
self.h = h
self.text = text
self.pe... |
--- Octree implementation
-- @module OctreeRegionUtils
local EPSILON = 1e-6
local SQRT_3_OVER_2 = math.sqrt(3) / 2
local SUB_REGION_POSITION_OFFSET = {
{0.25, 0.25, -0.25};
{-0.25, 0.25, -0.25};
{0.25, 0.25, 0.25};
{-0.25, 0.25, 0.25};
{0.25, -0.25, -0.25};
{-0.25, -0.25, -0.25};
{0.25, -0.25, 0.25};
{-0.25, -... |
object_mobile_outbreak_undead_boss_f_nightsister_03 = object_mobile_shared_outbreak_undead_boss_f_nightsister_03:new {
}
ObjectTemplates:addTemplate(object_mobile_outbreak_undead_boss_f_nightsister_03, "object/mobile/outbreak_undead_boss_f_nightsister_03.iff")
|
local lu = require('luaunit')
local input = require('core/input')
-- selene: allow(unused_variable)
function testQueuedInputs()
input:reset()
input:setPlayer(5)
input:up(1)
input:left(2)
input:right(3)
input:down(4)
input:select(5)
input:start(6)
input:triangle(7)
input:square(8... |
function Game.UpdateEvent()
maingame.HazardUpdate()
--timekeeping
maingame.gametime=maingame.gametime+1
-- helps with mouse referencing; gives block indices for mouse
mouse_x = math.floor(love.mouse.getX()/16)
mouse_y = math.floor(love.mouse.getY()/16)
--LOOP THAT APPLIES TO ALL PLAYERS
for i = 1, Player... |
----------------------------------------------------------------------------------------------------
--
-- Copyright (c) Contributors to the Open 3D Engine Project.
-- For complete copyright and license terms please see the LICENSE at the root of this distribution.
--
-- SPDX-License-Identifier: Apache-2.0 OR MIT
--
--... |
--[[Author: Pizzalol
Date: 14.03.2015.
Checks the latest attack state and target to determine if a bash should be applied]]
function BerserkersRageBash( keys )
local caster = keys.caster
local target = keys.target
local ability = keys.ability
local ability_level = ability:GetLevel() - 1
-- Ability variables
lo... |
function SCHEMA:PlayerFootstep(client, position, foot, soundName, volume)
if (client:isRunning()) then
if (client:Team() == FACTION_CP) then
client:EmitSound("npc/metropolice/gear"..math.random(1, 6)..".wav", volume * 130)
return true
elseif (client:Team() == FACTION_OW) then
client:EmitSound("npc/combin... |
local sub
do
local _table_0 = require('string')
sub = _table_0.sub
end
local urldecode
do
local _table_0 = require('querystring')
urldecode = _table_0.urldecode
end
local JSON = require('json')
return function(mount, options)
if mount == nil then
mount = '/rpc/'
end
if options == nil then
options ... |
function Tile.isCreature(self)
return false
end
function Tile.isHouse(self)
local house = self:getHouse()
return not not house
end
function Tile.isItem(self)
return false
end
function Tile.isPz(self)
return self:hasFlag(TILESTATE_PROTECTIONZONE)
end
function Tile.isTile(self)
return true
end
function Tile.re... |
-- Copyright 2012 Gabor Varga <vargagab@gmail.com>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.transmission", package.seeall)
function index()
if not nixio.fs.access("/etc/config/transmission") then
return
end
local page = entry({"admin", "nas", "transmission"}, cbi("transmis... |
TerrainSmoothCommand = AbstractTerrainModifyCommand:extends{}
TerrainSmoothCommand.className = "TerrainSmoothCommand"
function TerrainSmoothCommand:init(opts)
self:__init(opts)
end
local function generateKernel(sigma)
local size = math.ceil(sigma * 6)
if size % 2 ~= 1 then
size = size + 1
end
... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:29' 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... |
do
local _ = {
['acid-splash-fire-worm-behemoth'] = {
secondary_picture_fade_out_duration = 60,
spread_delay_deviation = 180,
localised_name = {'entity-name.acid-splash'},
damage_multiplier_increase_per_added_fuel = 1,
name = 'acid-splash-fire-worm... |
local playerX = 0
local playerY = 0
local playerSpeed = 80
-- Handling input in the TGF is very straight forward:
-- The API provides a bunch of useful functions for that.
function update(dt)
if Fx:buttonDown("left") then
playerX = playerX - dt * playerSpeed
elseif Fx:buttonDown("right") then
playerX = playerX +... |
-- 令牌桶在redis中的key值
local tokens_key = KEYS[1]
-- 该令牌桶上一次刷新的时间对应的key的值
local timestamp_key = KEYS[2]
-- 令牌单位时间填充速率
local rate = tonumber(ARGV[1])
-- 令牌桶容量
local capacity = tonumber(ARGV[2])
-- 当前时间
local now = tonumber(ARGV[3])
-- 请求需要的令牌数
local requested = tonumber(ARGV[4])
-- 令牌桶容量/令牌填充速率=令牌桶填满所需的时间
local fill_time = ... |
wardrobe.skins = {}
wardrobe.skinNames = {}
wardrobe.skin_count = 0
local function removePrefix(str, prefix)
local n = #prefix
if #str >= n and string.sub(str, 1, n) == prefix then
return string.sub(str, n+1)
else
return str
end
end
local function removeSuffix(str, suffix)
local n = #suffix
if #str >= n a... |
--= Pumpkin (Big thanks to the PainterlyPack.net for Minecraft for allowing me to use these textures)
minetest.register_node("farming:pumpkin", {
description = "Pumpkin",
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
groups = {choppy=3,flammable=2,plant=1},
drop = {
... |
-- Copyright (C) 2012 Nicholas Carlson
--
-- 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, publi... |
------------------------------
local a = 0; for i = 1, 100, 5 do a = a + i end;
------------------------------
success compiling learn.lua
; source chunk: learn.lua
; x86 standard (32-bit, little endian, doubles)
; function [0] definition (level 1) 0
; 0 upvalues, 0 params, is_vararg = 2, 5 stacks
.function 0 0 2 5
.... |
local Prop = {}
Prop.Name = "Murder King"
Prop.Cat = "Stores"
Prop.Price = 2000
Prop.Doors = {
Vector( -11670, -14032, 348 ),
Vector( -11670, -13968, 348 ),
Vector( -11733, -14224.900390625, 343 ),
Vector( -11839, -14677, 352 ),
Vector( -12385, -14245, 343 ),
Vector( -12385, -13845, 343 ),
Vector( -12384.9003906... |
---
-- Implementation of the Conjugate Gradient algorithm
-- @classmod CG
-- An implementation of the conjugate gradient optimization
-- algorithm.
-- This class implements 4 different variations of CG defined
-- by the _so-called_ beta-parameter:
--
-- 1. Polak-Ribiere
-- 2. Fletcher-Reeves
-- 3. Hestenes-Stiefel
-... |
local C, GUI, Sounds = Ambi.General.Global.Colors, Ambi.UI.GUI, Ambi.UI.Sounds
local Notify = Ambi.UI.Notify
local w = ScrW()
local h = ScrH()
local now_notify = {}
Notify.Add( 2, 'Minimalistic Notify', 'Ambi', function( tVars )
now_notify[ #now_notify+1 ] = 0
local ID = #now_notify
local time ... |
activate = true
minetest.register_chatcommand(
"death",
{
description = "Enable or disable death coordinates",
params = "<true> | <false>",
privs = {ban = true},
func = function(name, param)
if param == "true" then
activate = true
mine... |
object_intangible_beast_bm_vir_vur = object_intangible_beast_shared_bm_vir_vur:new {
}
ObjectTemplates:addTemplate(object_intangible_beast_bm_vir_vur, "object/intangible/beast/bm_vir_vur.iff")
|
return {
0,0,0,0,221,45,0,0,210,45,0,0,210,221,0,0,221,221,0,0,210,221,0,0,0,0,0,0,0,0,0,0,0,147,0,0,0,164,0,0,0,0,0,0,0,0,0,0,0,82,0,0,128,0,0,0,221,170,170,221,16,17,17,1,0,0,0,0,221,2,0,0,32,2,0,0,32,221,0,0,221,221,0,0,32,221,0,0,0,0,0,0,0,0,0,0,0,164,0,0,0,147,0,0,211,221,13,0,208,221,77,0,32,98,13,0,112,221,13,0,... |
local skynet = require "skynet"
local autoid = require "bw.share.autoid"
local bewater = require "bw.bewater"
local agents = {}
local id2agent = {} -- battle_id -> agent
local balance = 1
local CMD = {}
function CMD.init(battle_path, preload)
preload = preload or 10
for i = 1, preload do
agent... |
object_intangible_vehicle_air2_swoop_speeder_pcd = object_intangible_vehicle_shared_air2_swoop_speeder_pcd:new {
}
ObjectTemplates:addTemplate(object_intangible_vehicle_air2_swoop_speeder_pcd, "object/intangible/vehicle/air2_swoop_speeder_pcd.iff") |
Locales['br'] = {
-- Cloackroom
['cloakroom'] = 'Vestiário',
['citizen_wear'] = 'Roupa casual',
['police_wear'] = 'Uniforme da Polícia',
['sheriff_wear'] = 'sheriff Outfit',
['lieutenant_wear'] = 'Swatt outfit ',
['gilet_wear'] = 'orange reflective jacket',
['bullet_wear'] = 'bulletproof vest',
['no_o... |
-- credit to atom0s for help with decompiling
-- Decompiled using luadec 2.2 rev: for Lua 5.1 from https://github.com/viruscamp/luadec
return {
{
StageCfg = {
{
FirstReward = {
{ 1001001, 5000 },
{ 1025001, 1 },
{ 10210... |
return {
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
desc_get = "",
name = "",
init_effect = "",
time = 0,
color = "red",
picture = "",
desc = "",
stack = 1,
id = 13130,
icon = 13130,
last_effect = "",
effect_list = {
{
type = "BattleBuffCastSkill",
trigger = {
"onUpdate"
},
arg_list... |
local FIND_MESSAGES_LIMIT = 20
local CONSOLE_PREFIX = "ADMINSAY: "
mAdmChat = {}
function mAdmChat.init()
cDB.exec([[
CREATE TABLE IF NOT EXISTS admchat_messages (
id INTEGER PRIMARY KEY AUTOINCREMENT,
timestamp INTEGER NOT NULL,
account TEXT,
name TEXT NO... |
local M = {
OK = 0, --成功
TIMEOUT = 1, --超时
TOKEN = 4, --TOKEN失败
SYSTEM = 5, --系统出错
ARGS = 6, --参数错误
}
return M
|
#!/usr/bin/env lua
config = require("config")
json = require("cjson")
require("utils")
math.randomseed(os.time())
posts = json.decode(readFile(config.posts_path))
addPost{
title = randString(12),
content = randString(math.random(128, 512)),
tags = {randString(6), randString(5)}
}
syncPostsRefs()
dump(dum... |
local log = {}
log.debug = true
log.log = function(...) if log.debug then print('lua_html:', ...) end end
return log
|
local httprequest = require('httpclient').httprequest
local data = {}
data[escape_uri(' + key')] = 'value 中文'
local a = 'http://localhost:19827/example/form'
local s = ''
for i=1,4096 do
s = s .. a
end
data['big value'] = s
local res,err = httprequest('http://localhost:19827/example/form', {data=data})
if not er... |
local Config = require'compe.config'
local Pattern = {}
Pattern._filetypes = {}
Pattern._regexes = {}
--- set
Pattern.set_filetype_config = function(filetype, config)
Pattern._filetypes[filetype] = config
end
--- get_default_pattern
Pattern.get_default_pattern = function()
return Config.get().default_pattern
en... |
local page = 1
local pages = {
{
header="here in the darkness",
body="here in the darkness is a collection of essays, poems, songs, and feelings I worked on in 2018 and 2019 following a hospital stay.\n\nYou can think of it as creative nonfiction. Specific and identifying details were obscured, but I consider it ... |
-- Base16 Equilibrium Gray Light color
-- Author: Carlo Abelli
-- to be use in your theme.lua
-- symlink or copy to config folder `local color = require('color')`
local M = {}
M.base00 = "#f1f1f1" -- ----
M.base01 = "#e2e2e2" -- ---
M.base02 = "#d4d4d4" -- --
M.base03 = "#777777" -- -
M.base04 = "#5e5e5e" -- +
M.bas... |
local colors = {
head = Color(192, 57, 43, 255),
back = Color(236, 240, 241, 255),
text = Color(255, 255, 255, 255),
text_blue = Color(52, 152, 219, 255),
btn = Color(52, 73, 94, 255),
btn_hover = Color(44, 62, 80, 255),
btn_disabled = Color(52, 73, 94, 150),
open = Color(46, 204, 113, 255),
open_hover = Color... |
local k = "foo"
function some_f(s) return string.byte(s) end
k = tonumber(k) or some_f(k) or k
print("K", k)
|
require 'api.config'
function love.conf(t)
local config = loadConfig()
t.console = (config['debug'] == 'true')
t.identity = "CelLuAPI"
t.window.width = 800
t.window.height = 600
t.window.resizable = true
t.window.icon = "icon.png"
t.window.title = "CelLuAPI Machine"
t.modules.physics = false
t.modules.video ... |
local targetDir = ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
local objDir = ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")
project "Sandbox"
kind "ConsoleApp"
language "C++"
cppdialect "C++20"
staticruntime "on"
warnings "extra"
targetdir(targetDir)
objdir(objDir)... |
local sx, sy = guiGetScreenSize()
local sx = sx/1366
local sy = sy/768
local choice = 1
local isBankingShowing = false
local isPinShowing = false
local GUIEditor = {}
local tab = {}
local balance
local antiSpam
local playerPin
function refreshTransactionGrid()
guiGridListClear(GUIEditor[1])
for k, v in ipairs(tab) d... |
return {
["comment"]="lua 5.1 hashing",
["datetime"]=1393675147,
["samples"]={
{
["center"]=1.11,
["edges"]=1.625,
["left"]=1.094,
["none"]=0,
["right"]=1.157,
["text"]="a",
},
{
["center"]=1.133,
["edges"]=1.659,
["left"]=1.111,
["none"]=0,
["right"]=1.125,
["text"]="ab",
... |
setenv("PYTHON_VERSION", myModuleVersion())
setenv("LEVEL","Compiler")
|
object_mobile_mining_droid = object_mobile_shared_mining_droid:new {
}
ObjectTemplates:addTemplate(object_mobile_mining_droid, "object/mobile/mining_droid.iff")
|
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
ESX.RegisterUsableItem('turtlebait', function(source)
local _source = source
xPlayer = ESX.GetPlayerFromId(_source)
if xPlayer.getInventoryItem('fishingrod').count > 0 then
TriggerClientEvent('fishing:setbait', _source, "turtle")
xP... |
require("util")
require("map")
MapBuilder = {}
function createPeople(param, map)
local window_w = love.graphics.getWidth()
local window_h = love.graphics.getHeight()
local people = {}
local index = 1
while (index <= param.person.quantity) do
local x = love.math.random(window_w - Person.width)
... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {},
Effects = {
PlaceObj('ModifyConst', {
'Const', "ExportPricePreciousMetals",
'Percent', "<price_increase>",
'ModifyId', "Colony_Investment",
}),
},
Prerequisites = {
PlaceObj('CheckResourc... |
if not modules then modules = { } end modules ['cldf-stp'] = {
version = 1.001,
comment = "companion to cldf-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
-- limitation: input le... |
local BowLandState = class('BowLandState', PlayerActState)
function BowLandState:initialize(_controller, _stateName)
PlayerActState.initialize(self, _controller, _stateName)
PlayerAnimMgr:CreateSingleClipNode('anim_man_jumptoidle_01', 1, _stateName .. 1, 1)
PlayerAnimMgr:CreateSingleClipNode('anim_woman_ju... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.