content stringlengths 5 1.05M |
|---|
--
-- SERVO TORQUE CONTROL MODULE
--
-- Setup servo_inv, servo_ident and aggregator_real.
--
-- It's second stage control schema.
--
-- dynamics_inv component provides desired torque, position, velocity and acceleration fo servos
-- servo_inv (ServoInv7Param) uses 7-parameter servo model (inertia, viscous friction, c... |
--- Serve a SVG image
content("image/svg+xml")
print[[<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="tiny" viewBox="0 0 128 64">
<desc>Hello SVG</desc... |
-- In place counting sort implementation
-- See : http://en.wikipedia.org/wiki/Counting_sort
-- Returns the maximum value of the given array
local function find_max_val(array)
local m = array[1]
for i = 2, #array do
if array[i] > m then
m = array[i]
end
end
return m
end
-- Returns an array of le... |
local style = data.raw['gui-style'].default
--[Smaller gui borders] --
--Tweak by "Ion's UI Tweaks: Smaller Borders", by "KingIonTrueLove"
-- TODO Fix and re-enable for .17
if settings.startup['picker-smaller-gui-borders'].value and false then
local quickbar = style.switch_quickbar_button
quickbar.default_grap... |
--Constants used to dynamically create new background options
cOptionSpacing = 1.2
cOptionHeight = 250
cOptionWidth = 1080
cFirstOptionPosition = {0,0.1,0}
cOptionRotation = {0,90,0}
cMaxOptionsPerMenu = 10
--Global variable that stores all background options.
gAllOptions = {}
gGenericBackgrounds = {Label = '|-> Gene... |
local zombie = {}
zombie.Name = "zombie"
zombie.DisplayName = "Zombie"
zombie.Model = Model("models/Zombie/Classic.mdl")
zombie.MoveSpeed = 60
zombie.Currency = 12
zombie.Skin = {0, 1}
zombie.Health = 75 -- Health
zombie.JumpDown = 10 -- Allows the NPC to "jumpdown" from said areas
zombie.JumpUp = 0 -- Al... |
for line in io.lines(arg[1]) do
local r = {}
for i in line:gmatch("%a+") do
r[#r+1] = i:gsub("%u", string.lower)
end
print(table.concat(r, " "))
end
|
-- msg.lua
-- Copyright (C) 2017 josephzeng <josephzeng36@gmail.com>
--
-- Distributed under terms of the MIT license.
--
local config = require "config"
local M = {}
function M:conversion(msg)
if msg == nil then
return ""
end
if config.environment == 0 and msg.msgtype ~= nil then
msg.msg... |
--[[
The MIT License (MIT)
Copyright (c) 2015 Matthias Richter
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, m... |
ENT.Type = "anim"
if WireLib then
ENT.Base = "base_wire_entity"
else
ENT.Base = "base_entity"
end
ENT.PrintName = "Combine Lock"
ENT.Author = "Cherser"
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
ENT.Editable = true
ENT.Category = "Other"
ENT.Spawnable = true
ENT.AdminOnly = false
function... |
trigger = script.parent
local Dest = script:GetCustomProperty("Destination"):WaitForObject()
DestPos = Dest:GetWorldPosition()
DestRot = Dest:GetWorldRotation()
function Interacted(trigger, person)
if person:IsA("Player") then
person:SetWorldPosition(DestPos)
person:SetWorldRotation(DestRot)
Events.BroadcastToP... |
--[[
Sprint mod for Minetest by GunshipPenguin
To the extent possible under law, the author(s)
have dedicated all copyright and related and neighboring rights
to this software to the public domain worldwide. This software is
distributed without any warranty.
]]
--Configuration variables, these are all explained in ... |
-- test mathx library
------------------------------------------------------------------------------
local math=require"mathx"
print(math.version)
print""
function f(x)
print(x,math.isfinite(x),math.isnan(x),math.isnormal(x))
end
print("x","finite","nan","normal")
f(0)
f(1/-math.inf)
f(1/0)
f(-1/0)
f(0/0)
f(math.i... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('XTemplate', {
__is_kind_of = "XDialog",
group = "PreGame",
id = "Credits",
PlaceObj('XTemplateWindow', {
'__class', "XDialog",
'HandleMouse', true,
}, {
PlaceObj('XTemplateLayer', {
'layer', "Version",
}),
PlaceObj('XTemplate... |
local looks = require("looks")
local theme = {}
theme.is_set = false
local function solarized()
vim.g.solarized_italic_comments = true
vim.g.solarized_italic_keywords = true
vim.g.solarized_italic_functions = true
vim.g.solarized_italic_variables = false
vim.g.solarized_contrast = true
vim.g.solarized_borders =... |
-- Copyright (C) 2017-2020 DBotThePony
-- 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... |
-- streams
-- Simple buffered streams.
-- Rather thin library. Uses a linked list to preserve order.
-- Can be used without piper, no problems.
local _M = {}
-- Localize some funcs.
local setmetatable = setmetatable
local rawget, rawset = rawget, rawset
-- Helper functions
local function getfirst(self)
if self.len ... |
-- http://httpd.apache.org/docs/current/mod/mod_lua.html#writingauthzproviders
-- The following authz provider function takes two arguments, one
-- ip address and one user name. It will allow access from the given
-- ip address without authentication, or if the authenticated user
-- matches the second argument.
requ... |
-- local nvim = require'nvim'
-- local has_attrs = require'tools'.tables.has_attrs
local load_module = require'tools'.helpers.load_module
local get_icon = require'tools'.helpers.get_icon
local get_separators = require'tools'.helpers.get_separators
local galaxyline = load_module'galaxyline'
if not galaxyline ... |
-- Math based motion.
local M = {}
local pow, sin, cos, pi, sqrt, abs, asin = math.pow, math.sin, math.cos, math.pi, math.sqrt, math.abs, math.asin
function M.linear(time_current, beginning_value, change, duration_total)
return change * time_current / duration_total + beginning_value
end
-- time_current^2
functi... |
local gl = require'gl'
local buffer=require'lib.buffer'.newBuffer
local ffi
if pcall(require,'ffi') then
ffi=require'ffi'
end
local function validate(shader)
local int = buffer('int',1,{0})
gl.glGetShaderiv( shader, gl.GL_COMPILE_STATUS, int )
if int[0] == gl.GL_TRUE then
return true
else
... |
--[[
Пример использования:
local event = DelayedEvent( 2000, "onClientRender" )
event:onStart( function( event ) ... end )
event:onProcess( function( event ) ... end )
event:onStop( function( event, isSuccess ) ... end )
event:start()
Debug.info( "Событие началось" )
! Внимание !
Не забываем, что событие дол... |
local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
describe(':qa', function()
before_each(function()
clear('--cmd', 'qa')
end)
it('verify #3334', function()
-- just testing if 'qa' passed as a program argument wont result in memory
-- errors
end)
end)
|
-- © 2008 David Given.
-- WordGrinder is licensed under the MIT open source license. See the COPYING
-- file in this distribution for the full text.
local GetBytesOfCharacter = wg.getbytesofcharacter
local ReadU8 = wg.readu8
local WriteU8 = wg.writeu8
local string_byte = string.byte
local string_format = string.format... |
return {
name = 'logger',
version = '0.0.1',
description = 'Simple Logger',
author = 'Gamaliel Sick <gamaliel.sick AT yahoo DOT fr>',
main = 'lib/init.lua',
dependencies = {
['clocktime'] = "https://github.com/gsick/luvit-clocktime/zipball/master",
['redis'] = "https:... |
--[================================[
@Language.ko-KR
@Summary
[Index]의 [DatType]의 값이 [Comparison] [Value]인지 판단합니다.
@Group
DatFile
@param.DatType.UnitsDat
비교할 파라미터입니다.
@param.Index.TrgUnit
비교경할 오브젝트입니다.
@param.Value.Number
값입니다.
@param.Comparison.TrgComparison
비교 방식입니다.
@Language.en-US
@Summary
[Index]의 [DatType]의 값이 ... |
object_mobile_azure_cabal_sb_penitent_03 = object_mobile_shared_azure_cabal_sb_penitent_03:new {
}
ObjectTemplates:addTemplate(object_mobile_azure_cabal_sb_penitent_03, "object/mobile/azure_cabal_sb_penitent_03.iff")
|
require "lib.classes.class"
local UIObject = require("lib.ui.ui_objects.UIObject")
local RectangleUIComponent = require("lib.ui.love_ui_components.RectangleUIComponent")
--------------------------------------------------------------------------------------------------------
-- class: UIFrame
-- param: x:num -> the x c... |
local audio_file = "serenity in ruin.ogg"
return THEME:GetPathS("", audio_file) |
local PLUGIN = PLUGIN;
-- Called when Clockwork has loaded all of the entities.
function PLUGIN:ClockworkInitPostEntity()
self:LoadUnionLocks();
end;
-- Called just after data should be saved.
function PLUGIN:PostSaveData()
self:SaveUnionLocks();
end;
-- Called when a player attempts to lock an entity.
function PL... |
local awful = require("awful")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = require('beautiful').xresources.apply_dpi
-- Client's shape
local round_corner_client = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, beautiful.corner_radius)
end
-- Catch the S... |
-- Copyright (C) Dejiang Zhu (doujiang24)
local ipairs = ipairs
local _M = { _VERSION = '0.01' }
function _M.merge(arr1, arr2)
local start = #arr1
for i, v in ipairs(arr2) do
arr1[start + i] = v
end
return arr1
end
function _M.in_array(needle, arr)
for i = 1, #arr do
if a... |
-- Simple helpers to make interactive work more convenient
_ = { }
_.maxlevel=5
_.p = print
function _.pt(tbl)
local level=0
local function doprint(t)
for k,v in pairs(t) do
print(string.rep(" ",level) ..string.format("%s = %s",k,tostring(v)))
if type(v)=="table"or type(v)=="romtable" and level<... |
Multishot = LibStub("AceAddon-3.0"):NewAddon("Multishot", "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Multishot")
MultishotConfig = {}
Multishot.BossID = LibStub("LibBossIDs-1.0").BossIDs
Multishot.RareID = LibStub("LibRareIds-1.0").Data
local isEnabled, isDe... |
-- Адаптивная загрузка необходимых библиотек и компонентов
local libraries = {
["component"] = "component",
["unicode"] = "unicode",
["image"] = "image",
["colorlib"] = "colorlib",
}
local components = {
["gpu"] = "gpu",
}
for library in pairs(libraries) do if not _G[library] then _G[library] = require(librarie... |
print("CTEST_FULL_OUTPUT")
function doTest3(vectype)
local a = vectype(1, 1, 1)
doTest(a)
end
function doTest4(vectype)
local a = vectype(1, 1, 1, 1)
doTest(a)
end
function doTest(a)
local mat = osg.Matrixf()
local c = mat * a
print(c)
end
doTest3(osg.Vec3)
doTest3(osg.Vec3d)
doTest3(osg.Vec3f)
doTest4(os... |
local PLUGIN = PLUGIN
local SH_SZ = SH_SZ
-- PlayerExitSafeZone -- realm @server
-- PlayerEnterSafeZone -- realm @server
-- CanPlayerEnterSafeZone -- realm @server
function PLUGIN:PlayerDeath(victim, _, attacker)
if (IsValid(attacker) and attacker:IsPlayer() and attacker != victim) then
local reputation, level = v... |
Script.ReloadScript("Scripts/Entities/Vehicles/VehicleBase.lua");
Script.ReloadScript("Scripts/Entities/Vehicles/VehicleBaseAI.lua")
VEHICLE_SCRIPT_TIMER = 100;
-- Define constant timer id
AISOUND_TIMER = VEHICLE_SCRIPT_TIMER + 2
-- Define timeout for ai sound
AISOUND_TIMEOUT = 250
-- Create table for each vehicle i... |
local DeskManager = class("DeskManager")
local Desk = require "desk"
local MemPkValues = require "mempkvalues"
local DeskPlayer = require "deskplayer"
local DeskDataManager = require "deskdatamanager"
local print_r = require "print_r"
function DeskManager:ctor()
self._dpk = MemPkValues.new("tb_desk_all_ids", "number"... |
local _M = {}
local mt = { __index = _M }
_M._VERSION = "0.1"
local ip_parser = require "apps.lib.ip_parser"
local tonumber = tonumber
_M.new = function(self,policy)
self.policy = policy
return setmetatable(self, mt)
end
local isNULL = function(v)
return v and v ~= ngx.null
end
_M.check = function... |
local Container = {
Id = nil,
Opened = false,
MaxSlots = 0,
Create = function (self, id)
local ct = {}
setmetatable(ct, self)
ct.Id = id
ct.Opened = false
ct.MaxSlots = 0
return ct
end,
Open = function (self)
if self.Opened then
return
end
RegisterWindowData(Win... |
local curl = require "lcurl.safe"
local json = require "cjson.safe"
script_info = {
["title"] = "蓝奏云",
["version"] = "0.0.1",
["description"] = "解析蓝奏云分享链接获取下载直链并下载",
}
function easyRequest(url,header)
local r = ""
local c = curl.easy{
url = url,
httpheader = header or {"User-Agent: Mozilla/5.0 (Windows NT 1... |
local rb = require "rabbitmq"
local os = require "os"
local JSON = require "luvit.json"
local seperator = ("").char(0)
local QUEUE = {
GENERAL_PROCESSING = "GeneralProcessing",
MOJANG_API = "MojangRequestAPI",
AMAZON_S3_API = "AmazonS3API",
IMAGE_PROCESSING = "ImageProcessing",
DATABASE_UPDATER = ... |
local S = farming.intllib
-- sunflower
minetest.register_craftitem("hades_extrafarming:sunflower", {
description = S("Sunflower"),
inventory_image = "farming_sunflower.png",
groups = {flammable = 2}
})
-- sunflower seeds
minetest.register_craftitem("hades_extrafarming:seed_sunflower", {
description = S("Sunflower... |
-- Debug with VSC
--[[ if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
require("lldebugger").start()
end ]]
-- LIBRARIES
Gamestate = require 'libs.gamestate' -- https://hump.readthedocs.io/en/latest/gamestate.html
sti = require "libs.sti" -- https://github.com/karai17/Simple-Tiled-Implement... |
--[[
Copyright 2015 Nicolás Echániz <nicoechaniz@altermundi.net>
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
]]--
local json = require "luci.json"
... |
return {
id = "material_rainbow",
price = 15000,
onSale = true,
} |
require('coroutines')
local function SayWhen()
i = 0
while i < 10 do
coroutine.yield()
i = i + 1
end
end
CreateCoroutine(SayWhen)
|
function main(t)
if is_host("macosx") then
t:build({iphoneos = true})
else
return t:skip("wrong host platform")
end
end
|
scroll_collector_triple_shadow_bolt = class({})
function scroll_collector_triple_shadow_bolt:OnSpellStart()
local victim = GetRandomHeroEntities(1)
if not victim then return end
victim = victim[1]
local victim_loc = victim:GetAbsOrigin()
--- Get Caster, Victim, Player, Point ---
local caster = self:GetCas... |
/*
@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... |
ENT.Type = 'anim'
ENT.Base = 'base_gmodentity'
ENT.Author = 'n00bmobile'
ENT.UsesPower = true
ENT.IsStatus2D = true
function ENT:IsPowered()
return self:GetTurnedOn() and self:GetPowerStored() > 0
end
function ENT:GetEfficiency()
return self:GetPowerStored() /self.MaxPower
end
function ENT:SetupDataTables()
self... |
local skynet = require "skynet.manager"
local codecache = require "skynet.codecache"
local cluster = require "skynet.cluster"
local clusterMonitor = require "utils/clusterMonitor"
local json = require("cjson")
local TAG = "HallServiceMgr"
local HallServiceMgr = {}
function HallServiceMgr:init(pGameCode, pIdentify)
... |
print("Please enter your turtles name:")
local tName=io.read()
-- Install github using Eric-wieser's bootstrap method
shell.run("pastebin run p8PJVxC4")
-- Build github command to clone Repository
cont=true
while cont do
if shell.run("github clone ejayjock/turtle-"..tName) then
if fs.exists("/startup.lua") then... |
---------------------------------------------------------------------------------------------------
-- User story: Smoke
-- Use case: GetDTCs
-- Item: Happy path
--
-- Requirement summary:
-- [GetDTCs] SUCCESS on VehicleInfo.GetDTCs
--
-- Description:
-- Mobile application sends GetDTCs request with valid parameters to... |
--[[
Author: tochonement
Email: tochonement@gmail.com
12.03.2021
--]]
gfconsole.filter = {}
local name = "gfconsole_filter_%s"
local filter = gfconsole.filter
local storage = {}
local function get(id)
return GetConVar(name:format(id))
end
function filter.add(id)
id = string.lower(id)
CreateClientCon... |
--- === hs.pasteboard ===
---
--- Inspect/manipulate pasteboards (more commonly called clipboards). Both the system default pasteboard and custom named pasteboards can be interacted with.
---
--- This module is based partially on code from the previous incarnation of Mjolnir by [Steven Degutis](https://github.com/sdegu... |
-- pastebin run -f Uv3Cj0Yp
-- from Asher9
-- https://github.com/Asher9/Asher9-s-Programms
--[[
loadfile("/bin/wget.lua")("-f", "https://raw.githubusercontent.com/Asher9/Asher9-s-Programms/master/GitHub-Downloader/github.lua", "/bin/github.lua")
loadfile("/bin/github.lua")("MightyPirates", "OpenComputers", "master-MC1... |
print("Benchmarking Test: Low-Level AIN voltage reading. ..unimplemented")
--If you need this benchmarking test, let us know. support@labjack.com
--Modbus reads of AIN values are pretty fast if you set the resolution index to 1
--i.e.
--MB.W(41500, 0, 1) --sets resolution index of AIN0 to 1 (fastest)
--Voltage = MB.R... |
object_building_heroic_cloud_platform = object_building_heroic_shared_cloud_platform:new {
}
ObjectTemplates:addTemplate(object_building_heroic_cloud_platform, "object/building/heroic/cloud_platform.iff")
|
local item_eat = minetest.item_eat -- TODO support for hunger mods
minetest.register_node("default:apple", {
description = "Apple",
drawtype = "plantlike",
tiles = {
"default_apple.png"
},
inventory_image = "default_apple.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {fle... |
function toggle(settings, box, guiForm)
local x = forms.getMouseX(box)
local y = forms.getMouseY(box)
if x > 12 and x < 36 and y > 6 and y < 19 then
if settings.trackAllRelics == true then
settings.trackAllRelics = false
forms.drawString(guiForm.relicBox, 35, 4, "progress", ... |
mt_irc_admin.users = {
-- admin = "1234";
kaeza = "1234";
};
|
print((string.gsub("one, and two; and three", "%a+", "word")))
|
--[[
Name: "sh_core.lua".
Product: "nexus".
--]]
NEXUS.Timers = {};
NEXUS.DataStreamHooks = {};
NEXUS.GlobalSharedVars = {};
function ScaleToWideScreen(size)
return math.min(math.max( ScreenScale(size / 2.62467192), math.min(size, 14) ), size);
end;
-- A function to hook a data stream.
function NEXUS:HookDataStream... |
--------------------------------------------------------------------------------------
--
-- 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
--
--
--
----------... |
require(5672807068).VaporVisualizer(owner.Name)
|
-- Exposing globals may not be the best practise but seems ok for now.
api = vim.api
cmd = vim.cmd
opt = vim.opt
fn = vim.fn
g = vim.g
lsp = vim.lsp
setmap = api.nvim_set_keymap
generic_opts = { noremap = true, silent = true }
-- Avoid writing print(vim.inspect(...))
-- Source https://github.com/nanotee/nvim-lua-guide... |
local List = script.Parent
local Llama = List.Parent
local t = require(Llama.t)
local validate = t.tuple(t.table, t.callback)
local function reduce(list, reducer, initialReduction)
assert(validate(list, reducer))
local reduction = initialReduction
local start = 1
if reduction == nil then
reduction = list[1]
... |
object_mobile_selonian_female_10 = object_mobile_shared_selonian_female_10:new {
}
ObjectTemplates:addTemplate(object_mobile_selonian_female_10, "object/mobile/selonian_female_10.iff")
|
local home = os.getenv("HOME")
package.path = home .. "/.luarocks/share/lua/5.1/?.lua;" .. package.path
package.cpath = home .. "/.luarocks/lib/lua/5.1/?.so;" .. package.cpath
local has_lunamark, lunamark = pcall(require, "lunamark")
if not has_lunamark then
local msg = [[
This plugin requires http://jgm.github.i... |
local m = {}
local ok, bit = pcall(require, "bit32")
assert(ok, "The Bit32 library must be installed")
assert(pcall(require, "compat53"), "The Compat 5.3 library must be installed")
m.GetAlignSize = function(k, size)
return bit.band(bit.bnot(k) + 1,(size - 1))
end
if not table.unpack then
table.unpack = unpac... |
-- Generated by CSharp.lua Compiler
local System = System
System.namespace("Slipe.Shared.Peds", function (namespace)
-- <summary>
-- Represents different HUD components
-- </summary>
namespace.enum("HudComponent", function ()
return {
all = 0,
ammo = 1,
area_name = 2,
armour = 3,
... |
-- Use socket.gettime() for benchmark measurements
-- since it has millisecond precision on most systems
local socket = require("socket")
n = 10000000 -- number of tasks added (10^7)
m = 1000 -- number different priorities
local pq = PriorityQueue()
print(string.format("Adding %d tasks with random priority 1-%d ... |
module(..., package.seeall)
require('constants')
-- Function that fires when a creature moves into a new tile. These are
-- fired automatically and don't count have any effect on a creature's
-- action points, etc.
enter_tile_fns = {}
function set_enter_tile_fn(creature_id, fn)
enter_tile_fns[creature_id]... |
local anims_list = {
--index = src, replacable
['watchdogs'] = {'custom/watchdogs.ifp', true, price = 10, name = "Watch Dogs Animasyon Fiziği", engine = 1, disabled = 0},
['gta4'] = {'custom/gta4.ifp', true, price = 5, name = "GTA IV Animasyon Fiziği", engine = 1, disabled = 0},
['gta5'] = {'custom/gta5.ifp', true,... |
local Source = require 'Source'
local Target = require 'Target'
local System = require 'System'
local P = {}
P.__index = P
local find_module = (function ()
local package = package
return function (name)
assert(name)
local names, common_name = {}, name:match('([%w%p]+)~.*')
if common_na... |
local cutil = require "cutil"
function filter_spec_chars(s)
local ss = {}
local k = 1
while true do
if k > #s then break end
local c = string.byte(s,k)
if not c then break end
if c<192 then
if (c>=48 and c<=57) or (c>= 65 and c<=90) or (c>=97 and c<=122) then
table.insert(ss, string.char(c... |
--[[
Copyright (C) 2014 HarpyWar (harpywar@gmail.com)
This file is a part of the PvPGN Project http://pvpgn.pro
Licensed under the same terms as Lua itself.
]]--
-- Global table with timers
__timers = {}
function timer_add(id, interval, callback)
timer_object = timer:new(id, interval, callback)
table.insert(_... |
stats = {
hp = 0,
attack = 1,
defense = 2,
specialAttack = 3,
specialDefense = 4,
speed = 5,
accuracy = 6,
evasion = 7
}
playerTeam = {}
opponentTeam = {}
user = {}
target = {}
move = {}
function Struggle_onUse()
damageWithFixedRecoil((user.hp + 3) / 4)
end
function TailWhip_onUse... |
vRP = Proxy.getInterface("vRP")
vRPg = Proxy.getInterface("vRP_garages")
function deleteVehiclePedIsIn()
local v = GetVehiclePedIsIn(GetPlayerPed(-1),false)
SetVehicleHasBeenOwnedByPlayer(v,false)
Citizen.InvokeNative(0xAD738C3085FE7E11, v, false, true) -- set not as mission entity
SetVehicleAsNoLongerNeeded(... |
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0236-TireStatus-Mismatch.md
---------------------------------------------------------------------------------------------------
-- Descr... |
HedgewarsScriptLoad("/Scripts/SpeedShoppa.lua")
local params = {}
params.missionTitle = loc("Shoppa Love")
params.crateType = "health"
params.faceLeft = true
params.time = 45000
params.map = "Hedgelove"
params.theme = "Nature"
params.hog_x = 410
params.hog_y = 983
params.crates = {
{ x = 183, y = 710 ... |
modifier_hero_lina_arcane_armor = class({})
function modifier_hero_lina_arcane_armor:IsHidden()
return false
end
function modifier_hero_lina_arcane_armor:IsPurgable()
return false
end
function modifier_hero_lina_arcane_armor:OnCreated( kv )
self.arcane_armor_armor = self:GetAbility():GetSpecialValueFor( "armor" )... |
local assets =
{
Asset("ANIM", "anim/dummy_books.zip"),
Asset("ANIM", "anim/swap_book_harvest.zip"),
Asset("ANIM", "anim/swap_book_toggledownfall.zip"),
}
local prefabs =
{
"splash_ocean",
"book_fx",
}
local UpvalueHacker = require("upvaluehacker")
local book_defs =
{
{
name = "book_... |
loop = {}
loop.sendData = function()
tmr.alarm(0, 10000, 1, function()
IV = p_crypto.generate_iv()
encryptedData = p_crypto.p_encrypt("{\"device\": {\"blood_sugars\": [{\"level\": "..math.random(3, 32).."}], \"counter\": "..p_crypto.get_counter().."}}", IV)
commun.put(encrypte... |
local BodyTypes = {}
BodyTypes.WALL = "body_wall"
BodyTypes.TILE = "body_tile"
BodyTypes.PLAYER = "body_player"
BodyTypes.PLAYER_WEAPON = "body_playerweapon"
BodyTypes.ENEMY = "body_enemy"
BodyTypes.ENEMY_WEAPON = "body_enemyweapon"
return BodyTypes |
-----------------------------------
-- Area: Meriphataud Mountains
-- NPC: qm1 (???)
-- Involved in Quest: The Holy Crest
-- !pos 641 -15 7 119
-----------------------------------
local ID = require("scripts/zones/Meriphataud_Mountains/IDs")
require("scripts/globals/npc_util")
-----------------------------------
func... |
print("|\\_/|")
print("|q p| /}")
print("( 0 )\"\"\"\\")
print("|\"^\"` |")
print("||_/=\\\\__|")
|
local ffi = require("ffi")
local bit = require("bit")
local band, bnot, rshift = bit.band, bit.bnot, bit.rshift
local engine = engine
local Package = SDKGen.Package
local GeneratedClasses = {}
local DefaultClass = engine.FindObject("Class Core.Default__Class", engine.Classes.UClass)
local CLASS_ALIGN = 4
local PackageO... |
character_2:UseSkill(2)
character_1:OnPartyMembers2(2, 5):UseSkill(4)
Wait(500)
character_1:UseSkill(1)
character_1:UseSkill(2)
character_1:UseSkill(3)
character_2:UseSkill(2)
character_3:UseSkill(3)
Summon(1)
EnableChargeAttack() |
local K, C, L = unpack(select(2, ...))
local Module = K:NewModule("VignetteAlert", "AceEvent-3.0")
if not Module then
return
end
local _G = _G
local string_format = string.format
local select = select
local print = print
local table_wipe = table.wipe
local PlaySound = _G.PlaySound
local GetAtlasInfo = _G.GetAtlasIn... |
ITEM.name = "RPG Missile"
ITEM.model = "models/weapons/w_missile_closed.mdl"
ITEM.ammo = "rpg_round" -- type of the ammo
ITEM.ammoAmount = 1 -- amount of the ammo
ITEM.width = 2
ITEM.description = "A Package of %s Rockets"
ITEM.iconCam = {
ang = Angle(-0.70499622821808, 268.25439453125, 0),
fov = 12.085652091... |
if not nn then require 'nn' end
if not dpnn then require 'dpnn' end
nnname = {
version = 1,
}
-- find a module by its name
function nn.Module:find(name, last)
local modules = self:findAll(name)
return last and modules[#modules] or modules[1]
end
-- find all module by its name
function nn.Module:findAll(nam... |
require("mod.oo_en.data.scene.init")
|
--[[
This module currently works by adding a new property to each client that is tabbed.
That new property is called bling_tabbed.
So each client in a tabbed state has the property "bling_tabbed" which is a table.
Each client that is not tabbed doesn't have that property.
In the function themselves, the same object i... |
data:extend({
-- Hide Recipes, for use with Hotkey
{
type = "bool-setting",
name = "GDIW-hide-recipes",
setting_type = "startup",
default_value = false,
order = "GDIW-a"
},
-- global Debug flag
-- Debug mode, for logging
{
type = "bool-setting",
name = "GDIW-d... |
local guide = require 'parser.guide'
local vm = require 'vm.vm'
local function ofTabel(value, callback)
for _, field in ipairs(value) do
if field.type == 'tablefield'
or field.type == 'tableindex' then
callback {
source = field,
key = guide.getK... |
object_tangible_loot_loot_schematic_invisible_bounty_hunter_helmet = object_tangible_loot_loot_schematic_shared_invisible_bounty_hunter_helmet:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_loot_schematic_invisible_bounty_hunter_helmet, "object/tangible/loot/loot_schematic/invisible_bounty_hunter_helmet.iff")... |
require "nvim-tree".setup() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.