repo_name
stringlengths
6
78
path
stringlengths
4
206
copies
stringclasses
281 values
size
stringlengths
4
7
content
stringlengths
625
1.05M
license
stringclasses
15 values
CrazyEddieTK/Zero-K
LuaUI/Utilities/engine_range_circles.lua
4
3082
-- emulates engine range circles. By very_bad_soldier and versus666 local max = math.max local abs = math.abs local cos = math.cos local sin = math.sin local sqrt = math.sqrt local pi = math.pi local spGetGroundHeight = Spring.GetGroundHeight local function GetRange2DWeapon(range, yDiff) local root1 = r...
gpl-2.0
czfshine/Don-t-Starve
data/scripts/components/sanity.lua
1
6250
local easing = require("easing") local Sanity = Class(function(self, inst) self.inst = inst self.max = 100 self.current = self.max self.rate = 0 self.sane = true self.fxtime = 0 self.dapperness = 0 self.inducedinsanity = nil self.night_drain_mult = 1 self.neg_aura_mult = 1 self.penalty = 0 sel...
gpl-2.0
timroes/awesome
tests/test-awful-client.lua
2
9884
local awful = require("awful") local test_client = require("_client") awful.util.deprecate = function() end local has_spawned = false local steps = { function(count) if count <= 1 and not has_spawned and #client.get() < 2 then awful.spawn("xterm") awful.spawn("xterm") ...
gpl-2.0
czfshine/Don-t-Starve
data/scripts/map/static_layouts/hound_rocks.lua
1
16696
return { version = "1.1", luaversion = "5.1", orientation = "orthogonal", width = 32, height = 32, tilewidth = 16, tileheight = 16, properties = {}, tilesets = { { name = "tiles", firstgid = 1, tilewidth = 64, tileheight = 64, spacing = 0, margin = 0, imag...
gpl-2.0
ForgedAddons/Broker_Threat
libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
12
8740
--[[ $Id: CallbackHandler-1.0.lua 3 2008-09-29 16:54:20Z nevcairiel $ ]] local MAJOR, MINOR = "CallbackHandler-1.0", 3 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) if not CallbackHandler then return end -- No upgrade needed local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} loc...
apache-2.0
omidtarh/fire
plugins/danbooru.lua
616
1750
do local URL = "http://danbooru.donmai.us" local URL_NEW = "/posts.json" local URL_POP = "/explore/posts/popular.json" local scale_day = "?scale=day" local scale_week = "?scale=week" local scale_month = "?scale=month" local function get_post(url) local b, c, h = http.request(url) if c ~= 200 then return nil end ...
gpl-2.0
minetest-games/Minetest_TNG
mods/cme/creatures/items.lua
2
1418
--= Creatures MOB-Engine (cme) =-- -- Copyright (c) 2015-2016 BlockMen <blockmen2015@gmail.com> -- -- items.lua -- -- This software is provided 'as-is', without any express or implied warranty. In no -- event will the authors be held liable for any damages arising from the use of -- this software. -- -- Permission is g...
gpl-3.0
Teino1978-Corp/Teino1978-Corp-texlive.js
texlive/texmf-dist/scripts/oberdiek/oberdiek.luacolor.lua
6
5493
-- -- This is file `oberdiek.luacolor.lua', -- generated with the docstrip utility. -- -- The original source files were: -- -- luacolor.dtx (with options: `lua') -- -- This is a generated file. -- -- Project: luacolor -- Version: 2011/11/01 v1.8 -- -- Copyright (C) 2007, 2009-2011 by -- Heiko Obe...
gpl-2.0
kasperlewau/casketUI
sArena/tekKonfig/tekKonfigTopTab.lua
5
2296
local lib, oldminor = LibStub:NewLibrary("tekKonfig-TopTab", 1) if not lib then return end oldminor = oldminor or 0 function lib:activatetab() self.left:ClearAllPoints() self.left:SetPoint("TOPLEFT") self.left:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab") self.middle:SetTexture("Interface\\Opt...
mit
unusualcrow/redead_reloaded
entities/entities/sent_fuel_gas/init.lua
1
1973
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") ENT.HitSound = Sound("Metal_Box.ImpactHard") ENT.DieSound = Sound("ambient/fire/ignite.wav") ENT.Model = Model("models/props_junk/gascan001a.mdl") ENT.Damage = 50 ENT.Radius = 350 function ENT:Initialize() self:SetModel(self.Model) self:Phy...
mit
zhujunsan/nodemcu-firmware
app/cjson/tests/bench.lua
145
3247
#!/usr/bin/env lua -- This benchmark script measures wall clock time and should be -- run on an unloaded system. -- -- Your Mileage May Vary. -- -- Mark Pulford <mark@kyne.com.au> local json_module = os.getenv("JSON_MODULE") or "cjson" require "socket" local json = require(json_module) local util = require "cjson.ut...
mit
czfshine/Don-t-Starve
data/scripts/prefabs/sapling.lua
1
2104
local assets= { Asset("ANIM", "anim/sapling.zip"), Asset("SOUND", "sound/common.fsb"), } local prefabs = { "twigs", "dug_sapling", } local function ontransplantfn(inst) inst.components.pickable:MakeEmpty() end local function dig_up(inst, chopper) if inst.components.pickable and inst.components.pick...
gpl-2.0
takaaptech/knife
knife/event.lua
2
1949
-- Event module local Event = {} -- Event handler registry Event.handlers = {} -- Remove an event handler from the registry local function removeHandler (self) if self.prevHandler then self.prevHandler.nextHandler = self.nextHandler end if self.nextHandler then self.nextHandler.prevHandler...
mit
freebaser/ikons
LibStub.lua
184
1367
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info -- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVI...
mit
ForgedAddons/Broker_Threat
libs/LibStub/LibStub.lua
184
1367
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info -- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVI...
apache-2.0
czfshine/Don-t-Starve
data/scripts/map/rooms/blockers.lua
1
9473
require ("map/room_functions") ------------------------------------------------------------------------------------ -- BLOCKERS ------------------------------------------------------------------------ ------------------------------------------------------------------------------------ AddRoom("Deerclopsfield", { ...
gpl-2.0
matthewhesketh/mattata
plugins/coronavirus.lua
2
3554
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local coronavirus = {} local mattata = require('mattata') local https = require('ssl.https') local json = require('dkjson') function coronavirus:init() coronavirus.c...
mit
CrazyEddieTK/Zero-K
LuaRules/Gadgets/unit_prevent_lab_hax.lua
2
13244
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- if not gadgetHandler:IsSyncedCode() then return end -------------------------------------------------------------------------------- ------------------------...
gpl-2.0
victorperin/tibia-server
data/movements/scripts/svargrond arena quest/arena_enter.lua
1
1189
function onStepIn(cid, item, position, fromPosition) local player = Player(cid) if not player then return true end local pitId = player:getStorageValue(Storage.SvargrondArena.Pit) if pitId < 1 or pitId > 10 then player:sendTextMessage(MESSAGE_INFO_DESCR, 'You cannot enter without Halvar\'s permission.') pla...
apache-2.0
victorperin/tibia-server
data/npc/scripts/Gnomission.lua
1
3642
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
apache-2.0
CrazyEddieTK/Zero-K
LuaUI/Widgets/gui_lups_stats.lua
19
4434
-- $Id: gui_lups_stats.lua 3171 2008-11-06 09:06:29Z det $ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- -- orig-file: gui_clock.lua -- orig-file: gui_lups_stats.lua -- brief: displays the c...
gpl-2.0
czfshine/Don-t-Starve
data/DLC0001/scripts/prefabs/lightninggoat.lua
1
8058
require("brains/lightninggoatbrain") require "stategraphs/SGlightninggoat" local assets = { Asset("ANIM", "anim/lightning_goat_build.zip"), Asset("ANIM", "anim/lightning_goat_shocked_build.zip"), Asset("ANIM", "anim/lightning_goat_basic.zip"), Asset("ANIM", "anim/lightning_goat_actions.zip"), Asset...
gpl-2.0
CrazyEddieTK/Zero-K
LuaUI/Widgets/gui_chili_highlight.lua
4
7295
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Chili Highlight", desc = "Draws colored circles around specified Chili elements", author ...
gpl-2.0
blueyed/awesome
lib/wibox/container/background.lua
5
8731
--------------------------------------------------------------------------- -- A container capable of changing the background color, foreground color -- widget shape. -- --@DOC_wibox_container_defaults_background_EXAMPLE@ -- @author Uli Schlachter -- @copyright 2010 Uli Schlachter -- @classmod wibox.container.backgroun...
gpl-2.0
szagoruyko/clnn
test/test-mnist2.lua
2
3948
-- as you can see, you will need to 'luarocks install mnist' first require 'nn' require 'sys' local mnist = require 'mnist' api = os.getenv('API') local batchSize = 128 local numBatches = 40 learningRate = 0.1 maxIteration = 7 netchoice = os.getenv('MODEL') if netchoice == nil then netchoice = 'conv1' end if api ...
bsd-2-clause
Jordach/Vox
mods/tnt/init.lua
1
8879
-- Default to enabled in singleplayer and disabled in multiplayer local singleplayer = minetest.is_singleplayer() local setting = minetest.setting_getbool("enable_tnt") if (not singleplayer and setting ~= true) or (singleplayer and setting == false) then return end -- loss probabilities array (one in X will be los...
lgpl-2.1
TimSimpson/Macaroni
Main/Generators/VCpp/VCpp9.lua
2
11499
require "Macaroni.IO.GeneratedFileWriter" require "Macaroni.Model.Library"; require "Macaroni.IO.Path" Path = Macaroni.IO.Path function checkArgs(args, name, description) if args[name] == nil then msg = 'Missing argument "' .. name; if description ~= nil then msg = msg .. " Descriptio...
apache-2.0
zer0main/hamster_ball
main.lua
1
3721
-- hamster_ball, video game -- Copyright (C) 2014-2015 Pavel Dolgov -- -- See the LICENSE file for terms of use. local x, y, enemies, shots, speed, dt1, dt2, bg, ball local is_winner = false local is_loser = false local group_number = 0 local tableLength = function(T) local count = 0 for _ in pairs(T) do coun...
mit
mamadtnt/erfan
plugins/Gp_Moderator.lua
4
11328
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if not is_admin(msg) then return "Only Global admins can use it!" end local group_creator = msg.from.print_name create_group_c...
gpl-2.0
matthewhesketh/mattata
plugins/administration/antispam.lua
2
17960
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local antispam = {} local mattata = require('mattata') local redis = require('libs.redis') function antispam:init(configuration) antispam.commands = mattata.commands(self.info....
mit
rzh/mongocraft
world/Plugins/MagicCarpet/objects.lua
8
2541
-- Location object cLocation = {} function cLocation:new( x, y, z ) local object = { x = x, y = y, z = z } setmetatable(object, { __index = cLocation }) return object end -- Offsets cFibers = { } function cFibers:new() local object = { cLocation:new( 2, -1, 2 ), cLocation:new( 2, -1, 1 ), cLocati...
apache-2.0
AmirFieBeR/Amir_FieBeR
plugins/stats.lua
458
4098
-- Saves the number of messages from a user -- Can check the number of messages with !stats do local NUM_MSG_MAX = 5 local TIME_CHECK = 4 -- seconds local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name....
gpl-2.0
andywingo/snabbswitch
src/core/main.lua
7
4653
module(...,package.seeall) -- Default to not using any Lua code on the filesystem. -- (Can be overridden with -P argument: see below.) package.path = '' local STP = require("lib.lua.StackTracePlus") local ffi = require("ffi") local zone = require("jit.zone") local lib = require("core.lib") local C = ffi.C -- Load l...
apache-2.0
CrazyEddieTK/Zero-K
LuaRules/Configs/MetalSpots/Quoth_v1.lua
17
1521
return { spots = { {x = 2808, z = 6056, metal = 2.0400002002716}, {x = 5384, z = 5800, metal = 2.0400002002716}, {x = 6056, z = 1640, metal = 2.0400002002716}, {x = 136, z = 3144, metal = 2.0400002002716}, {x = 856, z = 1688, metal = 2.0400002002716}, {x = 712, z = 5896, metal = 2.0400002002716}, {x = 2104, z =...
gpl-2.0
blueyed/awesome
spec/wibox/widget/base_spec.lua
14
3351
--------------------------------------------------------------------------- -- @author Uli Schlachter -- @copyright 2016 Uli Schlachter --------------------------------------------------------------------------- local base = require("wibox.widget.base") local no_parent = base.no_parent_I_know_what_I_am_doing describe...
gpl-2.0
minetest-games/Minetest_TNG
mods/farming/misc.lua
2
1481
default.register_node("farming:straw", { register = {stair = true, slab = true}, description = "Straw", tiles = {"farming_straw.png"}, is_ground_content = false, groups = {snappy = 3, flammable = 4, fuel = 10, fall_damage_add_percent = -30}, sounds = default.node_sound_leaves_defaults(), stair = {legacy_alias = ...
gpl-3.0
czfshine/Don-t-Starve
mods/Cretaceous/wicker/kernel_extensions/dst_abstraction/replicas.lua
6
1601
local Lambda = wickerrequire "paradigms.functional" if IsWorldgen() then init = Lambda.Nil return _M end --- local AddReplicatableComponent local get_replica if IsDST() then local get_repcmps_table = memoize_0ary(function() local Reflection = wickerrequire "game.reflection" require "entityscript" require "...
gpl-2.0
alexgrist/NutScript
gamemode/core/libs/sh_currency.lua
1
2979
--- A library representing the server's currency system. -- @module ix.currency ix.currency = ix.currency or {} ix.currency.symbol = ix.currency.symbol or "$" ix.currency.singular = ix.currency.singular or "dollar" ix.currency.plural = ix.currency.plural or "dollars" ix.currency.model = ix.currency.model or "...
mit
nonconforme/Urho3DEditor
Prime/Data/Data/LuaScripts/01_HelloWorld.lua
2
1388
-- This first example, maintaining tradition, prints a "Hello World" message. -- Furthermore it shows: -- - Using the Sample utility functions as a base for the application -- - Adding a Text element to the graphical user interface -- - Subscribing to and handling of update events require "LuaScripts/Utili...
mit
czfshine/Don-t-Starve
ZeroBraneStudio/cfg/i18n/ru.lua
1
35372
return { [0] = function(c) c = (c-9)%100 < 9 and 9 or (c-1)%10 return c == 0 and 1 or c < 4 and 2 or 3 end, -- plural ["%d instance"] = {"%d совпадение", "%d совпадения", "%d совпадений"}, -- src\editor\findreplace.lua ["%s event failed: %s"] = "%s обработчик события вернул ошибку: %s", -- src\editor\package.lua ...
gpl-2.0
imfoollink/NPLRuntime
Server/trunk/LuaJIT-2.1/src/jit/dis_ppc.lua
59
20301
---------------------------------------------------------------------------- -- LuaJIT PPC disassembler module. -- -- Copyright (C) 2005-2017 Mike Pall. All rights reserved. -- Released under the MIT/X license. See Copyright Notice in luajit.h ----------------------------------------------------------------------------...
gpl-2.0
victorperin/tibia-server
data/npc/scripts/Zoltan.lua
2
2221
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
apache-2.0
andywingo/snabbswitch
lib/ljsyscall/syscall/linux/mips/ioctl.lua
24
2047
-- MIPS ioctl differences local arch = { IOC = { SIZEBITS = 13, DIRBITS = 3, NONE = 1, READ = 2, WRITE = 4, }, ioctl = function(_IO, _IOR, _IOW, _IORW) return { FIONREAD = 0x467f, TCSBRK = 0x5405, TCXONC = 0x5406, TCFLSH = 0x5407, TCGETS ...
apache-2.0
CrazyEddieTK/Zero-K
scripts/planeheavyfighter.lua
4
3748
include "constants.lua" --pieces local base = piece "base" local wingR, wingL, wingtipR, wingtipL = piece("wingr", "wingl", "wingtip1", "wingtip2") local engineR, engineL, thrust1, thrust2, thrust3 = piece("jetr", "jetl", "thrust1", "thrust2", "thrust3") local missR, missL = piece("m1", "m2") local smokePiece = {base...
gpl-2.0
v3n/altertum
genie/assimp.lua
2
1593
-- -- Copyright (c) 2015 Jonathan Howard -- MIT License -- function assimp_library() project "assimp" -- location (build_dir) -- targetdir (lib_dir) targetname "assimp" language "C++" kind "StaticLib" removeflags { "NoExceptions", "NoRTTI" } includedirs { ASSIMP_DIR .. "includ...
mit
dckc/ponyc
premake5.lua
5
6343
local force_cpp = { } function cppforce(inFiles) for _, val in ipairs(inFiles) do for _, fname in ipairs(os.matchfiles(val)) do table.insert(force_cpp, path.getabsolute(fname)) end end end -- gmake premake.override(path, "iscfile", function(base, fname) if table.cont...
bsd-2-clause
hacker44-h44/megasatan
plugins/plugins.lua
72
6113
do -- Returns the key (index) in the config.enabled_plugins table local function plugin_enabled( name ) for k,v in pairs(_config.enabled_plugins) do if name == v then return k end end -- If not found return false end -- Returns true if file exists in plugins folder local function plugin_exists( ...
gpl-2.0
andywingo/snabbswitch
lib/pflua/src/pf/match.lua
15
11796
module(...,package.seeall) --- --- Program := 'match' Cond --- Cond := '{' Clause... '}' --- Clause := Test '=>' Dispatch [ClauseTerminator] -- Test := 'otherwise' | LogicalExpression --- ClauseTerminator := ',' | ';' --- Dispatch := Call | Cond --- Call := Identifier Args? --- Args := '(' [ ArithmeticExpression [ ',...
apache-2.0
czfshine/Don-t-Starve
data/scripts/prefabs/evergreens.lua
1
19046
local assets = { Asset("ANIM", "anim/evergreen_new.zip"), --build Asset("ANIM", "anim/evergreen_new_2.zip"), --build Asset("ANIM", "anim/evergreen_tall_old.zip"), Asset("ANIM", "anim/evergreen_short_normal.zip"), Asset("ANIM", "anim/dust_fx.zip"), Asset("SOUND", "sound/forest.fsb"), } local pre...
gpl-2.0
credosemi/smartsnmp
mibs/udp.lua
2
4883
-- -- This file is part of SmartSNMP -- Copyright (C) 2014, Credo Semiconductor Inc. -- -- This program 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 2 of the License, or -- (at your optio...
gpl-2.0
CrazyEddieTK/Zero-K
LuaRules/Gadgets/mex_placement.lua
2
6483
function gadget:GetInfo() return { name = "Mex Placement", desc = "Controls mex placement and income", author = "Google Frog", -- date = "21 April 2012", license = "GNU GPL, v2 or later", layer = -10, enabled = true -- loaded by default? } end -------------...
gpl-2.0
czfshine/Don-t-Starve
data/scripts/screens/consolescreen.lua
1
7416
require "util" local Screen = require "widgets/screen" local Button = require "widgets/button" local AnimButton = require "widgets/animbutton" local Image = require "widgets/image" local UIAnim = require "widgets/uianim" local NumericSpinner = require "widgets/numericspinner" local TextEdit = require "widgets/textedit"...
gpl-2.0
victorperin/tibia-server
data/talkactions/scripts/alladdons.lua
3
1555
function onSay(cid, words, param, channel) local player = Player(cid) if not player:getGroup():getAccess() then return true end local looktypes = {128, 136, 129, 137, 130, 138, 131, 139, 132, 140, 133, 141, 134, 142, 143, 147, 144, 148, 145, 149, 146, 150, 151, 155, 152, 156, 153, 157, 154, 158, 251, 252, 268, 26...
apache-2.0
ranisalt/forgottenserver
data/scripts/actions/others/windows.lua
5
4521
local windows = { --[itemid] = {toItemid} [5303] = {6448}, -- white stone wall window [5304] = {6449}, -- white stone wall window [6438] = {6436}, -- framework window [6436] = {6438}, -- framework window [6439] = {6437}, -- framework window [6437] = {6439}, -- framework window [6442] = {6440}, -- brick window ...
gpl-2.0
starkos/premake-core
tests/api/test_register.lua
16
1711
-- -- tests/api/test_register.lua -- Tests the new API registration function. -- Copyright (c) 2012 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("api_register") local api = p.api -- -- Setup and teardown -- function suite.teardown() testapi = nil end -- -- Verify t...
bsd-3-clause
CrazyEddieTK/Zero-K
LuaUI/Widgets/unit_terraform_draw.lua
6
3484
function widget:GetInfo() return { name = "Terraform Icon Draw", desc = "Draws terraform unit icon", author = "ivand", date = "2017", license = "GNU GPL, v2 or later", layer = -10, enabled = true, alwaysStart = true, } end ----------------------------------...
gpl-2.0
CrazyEddieTK/Zero-K
effects/plasma.lua
25
5768
-- plasma_hit_32 -- plasma_hit_96 return { ["plasma_hit_32"] = { usedefaultexplosions = false, groundflash = { circlealpha = 0.25, circlegrowth = 4, flashalpha = 0.5, flashsize = 32, ttl = 8, color = { [1] = 1, ...
gpl-2.0
victorperin/tibia-server
data/npc/scripts/Jean Pierre.lua
3
35501
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHa...
apache-2.0
CrazyEddieTK/Zero-K
LuaRules/Gadgets/unit_self_destruct.lua
4
2838
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- if not gadgetHandler:IsSyncedCode() then return end -------------------------------------------------------------------------------- ------------------------...
gpl-2.0
alobaidy98/ahmed.Dev
plugins/banhammer.lua
5
12519
local function pre_process(msg) local data = load_data(_config.moderation.data) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Che...
gpl-3.0
czfshine/Don-t-Starve
data/scripts/map/static_layouts/rooms/hallway/long.lua
1
4472
return { version = "1.1", luaversion = "5.1", orientation = "orthogonal", width = 32, height = 32, tilewidth = 16, tileheight = 16, properties = {}, tilesets = { { name = "tiles", firstgid = 1, tilewidth = 64, tileheight = 64, spacing = 0, margin = 0, imag...
gpl-2.0
victorperin/tibia-server
data/npc/scripts/Harlow Vengoth.lua
1
1281
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
apache-2.0
minetest-games/Minetest_TNG
mods/default/lua/mapgen/mapgenv6.lua
2
2087
-- mods/default/lua/mapgenv6.lua -- -- Register decorations -- -- y? core.clear_registered_decorations() -- Papyrus core.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass"}, sidelen = 8, noise_params = { offset = -0.3, scale = 0.7, spread = {x = 100, y = 100, z = 100}, seed...
gpl-3.0
alexgrist/NutScript
gamemode/core/libs/sv_database.lua
1
5452
ix.db = ix.db or { schema = {}, schemaQueue = {}, type = { -- TODO: more specific types, lengths, and defaults -- i.e INT(11) UNSIGNED, SMALLINT(4), LONGTEXT, VARCHAR(350), NOT NULL, DEFAULT NULL, etc [ix.type.string] = "VARCHAR(255)", [ix.type.text] = "TEXT", [ix.type.number] = "INT(11)", [ix.type.stea...
mit
czfshine/Don-t-Starve
data/DLC0001/scripts/components/stackable.lua
1
4123
local Stackable = Class(function(self, inst) self.inst = inst self.stacksize = 1 -- Its a stack of one (ie the first item) self.maxsize = TUNING.STACK_SIZE_MEDITEM end) function Stackable:IsStack() return self.stacksize >1 end function Stackable:StackSize() return self.stacksize end function Stackable:...
gpl-2.0
Ameeralasdee/FROLA
plugins/msg-checks.lua
2
10497
--Begin msg_checks.lua By @TH3BOSS local TIME_CHECK = 2 local function pre_process(msg) local data = load_data(_config.moderation.data) local chat = msg.chat_id_ local user = msg.sender_user_id_ local is_channel = gp_type(chat) == "channel" local is_chat = gp_type(chat) == "chat" local auto_leave = 'auto_leave_bot' loc...
gpl-3.0
blueyed/awesome
lib/menubar/utils.lua
1
12383
--------------------------------------------------------------------------- --- Utility module for menubar -- -- @author Antonio Terceiro -- @copyright 2009, 2011-2012 Antonio Terceiro, Alexander Yakushev -- @module menubar.utils --------------------------------------------------------------------------- -- Grab envir...
gpl-2.0
czfshine/Don-t-Starve
data/scripts/components/mood.lua
1
1894
local Mood = Class(function(self, inst) self.inst = inst self.moodtimeindays = {length = nil, wait = nil} self.isinmood = false self.daystomoodchange = nil self.onentermood = nil self.onleavemood = nil inst:ListenForEvent("daycomplete", function(inst, data) if self.daystomoodchange ...
gpl-2.0
emadni/emadwolf
plugins/banhammer.lua
214
11956
local function pre_process(msg) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Checking invited user '..user_id) local banned ...
gpl-2.0
czfshine/Don-t-Starve
data/scripts/map/static_layouts/pigguards_b.lua
1
18099
return { version = "1.1", luaversion = "5.1", orientation = "orthogonal", width = 40, height = 40, tilewidth = 16, tileheight = 16, properties = {}, tilesets = { { name = "tiles", firstgid = 1, tilewidth = 64, tileheight = 64, spacing = 0, margin = 0, imag...
gpl-2.0
ranisalt/forgottenserver
data/scripts/lib/helper_constructors.lua
7
1361
local classes = {Action, CreatureEvent, Spell, TalkAction, MoveEvent, GlobalEvent, Weapon} for _, class in ipairs(classes) do local MT = getmetatable(class) local DefaultConstructor = MT.__call MT.__call = function(self, def, ...) -- Backwards compatibility for default obj() constructor if type(def) ~= "table"...
gpl-2.0
czfshine/Don-t-Starve
data/scripts/stategraphs/SGeyeplant.lua
1
6044
require("stategraphs/commonstates") local actionhandlers = { ActionHandler(ACTIONS.HARVEST, "eat_enter"), ActionHandler(ACTIONS.PICK, "eat_enter"), ActionHandler(ACTIONS.PICKUP, "eat_enter"), ActionHandler(ACTIONS.MURDER, "action"), } local events= { CommonHandlers.OnLocomote(false, true), C...
gpl-2.0
czfshine/Don-t-Starve
data/DLC0001/scripts/prefabs/telebase.lua
1
4086
local assets = { Asset("ANIM", "anim/staff_purple_base_ground.zip"), } local prefabs = { "gemsocket", "collapse_small", } local function teleport_target(inst) for k,v in pairs(inst.components.objectspawner.objects) do if v.DestroyGemFn then v.DestroyGemFn(v) end end end local function validteleporttarget...
gpl-2.0
czfshine/Don-t-Starve
data/DLC0001/scripts/components/clock.lua
1
16884
local Clock = Class(function(self, inst) self.daysegs = TUNING.DAY_SEGS_DEFAULT self.nightsegs = TUNING.NIGHT_SEGS_DEFAULT self.dusksegs = TUNING.DUSK_SEGS_DEFAULT self.inst = inst self.task = nil self.numcycles = 0 self.lmax = 1 self.dayColour = Point(255/255, 230/255, 158/255) -- Th...
gpl-2.0
RElesgoe/pvpgn
lua/handle_command.lua
7
3050
--[[ 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. ]]-- -- List of available lua commands -- (To create a new command - create a new file in directory "commands") local lua_command_table = { [1] = { ["/w...
gpl-2.0
czfshine/Don-t-Starve
data/DLC0001/scripts/stategraphs/SGmole.lua
1
21095
local WALK_SPEED = 4 local RUN_SPEED = 7 local MOLE_PEEK_INTERVAL = 20 local MOLE_PEEK_VARIANCE = 5 require("stategraphs/commonstates") local actionhandlers = { ActionHandler(ACTIONS.GOHOME, "gohome"), ActionHandler(ACTIONS.STEALMOLEBAIT, "steal_pre"), ActionHandler(ACTIONS.MAKEMOLEHILL, "make_molehill"...
gpl-2.0
IRO-TEAM/iro-antispam
plugins/inrealm.lua
850
25085
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
Mossop/500pxPublisher.lrplugin
500pxExportServiceProvider.lua
1
32050
-- Lightroom SDK local LrApplication = import "LrApplication" local LrBinding = import "LrBinding" local LrColor = import "LrColor" local LrDialogs = import "LrDialogs" local LrErrors = import "LrErrors" local LrFileUtils = import "LrFileUtils" local LrFunctionContext = import "LrFunctionContext" local LrHttp = import ...
gpl-3.0
andywingo/snabbswitch
lib/ljsyscall/syscall/openbsd/c.lua
24
1625
-- This sets up the table of C functions local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string local abi = require ...
apache-2.0
CrazyEddieTK/Zero-K
LuaRules/Gadgets/unit_solar_force_closed.lua
5
1427
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- if not gadgetHandler:IsSyncedCode() then return end -------------------------------------------------------------------------------- ------------------------...
gpl-2.0
czfshine/Don-t-Starve
data/scripts/prefabs/walls.lua
1
9193
require "prefabutil" function MakeWallType(data) local assets = { Asset("ANIM", "anim/wall.zip"), Asset("ANIM", "anim/wall_".. data.name..".zip"), } local function ondeploywall(inst, pt, deployer) --inst.SoundEmitter:PlaySound("dontstarve/creatures/spider/spider_egg_sack") local wall = SpawnPrefab("wall_...
gpl-2.0
victorperin/tibia-server
data/actions/scripts/bigfoot burden quest/bigfootBurdenQuestRewards.lua
1
2795
local reward = { [3148] = { {18501, 1}, {18502, 1}, {18503, 1}, {18402, 1}, {18396, 1}, {2160, 3}, {18415, 7}, {18423, 2}, }, [3149] = { {18407, 1}, {18505, 1}, {18506, 1}, {18507, 1}, {18396, 1}, {2160, 4}, {18413, 10}, {18423, 2}, }, [3150] = { {18500, 1}, {18501, 1}, {18502...
apache-2.0
blueyed/awesome
lib/menubar/init.lua
1
16746
--------------------------------------------------------------------------- --- Menubar module, which aims to provide a freedesktop menu alternative -- -- List of menubar keybindings: -- --- -- -- * "Left" | "C-j" select an item on the left -- * "Right" | "C-k" select an item on the right -- * "Backspace" ex...
gpl-2.0
czfshine/Don-t-Starve
ZeroBraneStudio/spec/opencl.lua
2
7231
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch) --------------------------------------------------------- local convtypes = [[bool char uchar short ushort int uint long ulong float double]] local convout = {} for i in convtypes:gmatch("([%w_]+)") do local suffix = {"","_rte","_rtz","_rtp","_rtn"} for k,t...
gpl-2.0
omidtarh/fire
plugins/media.lua
376
1679
do local function run(msg, matches) local receiver = get_receiver(msg) local url = matches[1] local ext = matches[2] local file = download_to_file(url) local cb_extra = {file_path=file} local mime_type = mimetype.get_content_type_no_sub(ext) if ext == 'gif' then print('send_file') send_docum...
gpl-2.0
rzh/mongocraft
world/Plugins/NetworkTest/NetworkTest.lua
7
17057
-- NetworkTest.lua -- Implements a few tests for the cNetwork API --- Map of all servers currently open -- g_Servers[PortNum] = cServerHandle local g_Servers = {} --- Map of all UDP endpoints currently open -- g_UDPEndpoints[PortNum] = cUDPEndpoint local g_UDPEndpoints = {} --- List of fortune messages for the...
apache-2.0
czfshine/Don-t-Starve
data/DLC0001/scripts/prefabs/rock_ice.lua
1
8728
local rock_ice_assets = { Asset("ANIM", "anim/ice_boulder.zip"), } local prefabs = { "ice", "rocks", "flint", "ice_puddle", "ice_splash", } SetSharedLootTable( 'rock_ice_tall', { {'ice', 1.00}, {'ice', 1.00}, {'ice', 1.00}, {'ice', 1.00}, {'rocks', 1.00}, --or flint? ...
gpl-2.0
andywingo/snabbswitch
lib/pflua/tests/pfquickcheck/pflua_ir.lua
25
1989
#!/usr/bin/env luajit -- -*- lua -*- -- This module generates (a subset of) pflua's IR, -- for property-based tests of pflua internals. module(..., package.seeall) local choose = require("pf.utils").choose local True, False, Fail, ComparisonOp, BinaryOp, Number, Len local Binary, Arithmetic, Comparison, Conditional -...
apache-2.0
shawnye/LuaBinaries4Windows
Lua 5.3/lcurl/cURL/impl/cURL.lua
2
15643
-- -- Author: Alexey Melnichuk <mimir@newmail.ru> -- -- Copyright (C) 2014 Alexey Melnichuk <mimir@newmail.ru> -- -- Licensed according to the included 'LICENSE' document -- -- This file is part of Lua-cURL library. -- local function clone(t, o) o = o or {} for k,v in pairs(t) do o[k]=v end return o end loc...
mit
czfshine/Don-t-Starve
data/scripts/stategraphs/SGbunnyman.lua
1
7497
require("stategraphs/commonstates") local actionhandlers = { ActionHandler(ACTIONS.GOHOME, "gohome"), ActionHandler(ACTIONS.EAT, "eat"), ActionHandler(ACTIONS.PICKUP, "pickup"), ActionHandler(ACTIONS.EQUIP, "pickup"), ActionHandler(ACTIONS.ADDFUEL, "pickup"), } local events= { CommonHandlers...
gpl-2.0
czfshine/Don-t-Starve
data/DLC0001/scripts/map/network.lua
1
26506
require "class" require "map/graphedge" require "map/graphnode" require "map/extents" require "map/terrain" Graph = Class(function(self, id, args) self.id = id --print("Graph",id, args.parent, args.data, args.nodes, args.edges, args.exit_nodes, args.exit_edges, args.default_bg) -- Is this graph inside a...
gpl-2.0
matthewhesketh/mattata
configuration.example.lua
2
16702
--[[ _ _ _ _ __ ___ __ _| |_| |_ __ _| |_ __ _ | '_ ` _ \ / _` | __| __/ _` | __/ _` | | | | | | | (_| | |_| || (_| | || (_| | |_| |_| |_|\__,_|\__|\__\__,_|\__\__,_| Configuration file for mattata v1.5 Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com...
mit
CrazyEddieTK/Zero-K
units/shieldcon.lua
5
2824
unitDef = { unitname = [[shieldcon]], name = [[Convict]], description = [[Shielded Construction Bot, Builds at 5 m/s]], acceleration = 0.5, activateWhenBuilt = true, brakeRate = 0.3, buildCostMetal = 140, buildDistance = 128, builder ...
gpl-2.0
acinonyx/openwrt-packages
net/smartsnmpd/files/mibs/interfaces.lua
158
4833
-- -- This file is part of SmartSNMP -- Copyright (C) 2014, Credo Semiconductor Inc. -- -- This program 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 2 of the License, or -- (at your optio...
gpl-2.0
mcdooda/The-Global-Scourge
mods/tutorial4/scripts/game.lua
1
1518
local MrMoustache = require 'data/game/scripts/mrmoustache' local DefenseTower = unpack(require 'data/game/scripts/defensetower') local TumorCreep = unpack(require 'data/game/scripts/tumorcreep') local Money = require 'data/game/scripts/money' local Windows = require 'data/game/scripts/windows' local buildings = requir...
gpl-2.0
danielmunro/luamud
mob.lua
1
3165
local attributes = require "attributes" local race = require "race" local skill = require "skill" local class = require "class" local item = require "item" local mob = { list = {} } local position = { DEAD = "dead", MORTAL = "mortal", INCAP = "incapacitated", STUNNED = "stunned", SLEEPING = "sleeping", ...
mit
victorperin/tibia-server
data/npc/scripts/Ubaid.lua
1
2683
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
apache-2.0
timroes/awesome
lib/wibox/container/constraint.lua
7
4855
--------------------------------------------------------------------------- -- --@DOC_wibox_container_defaults_constraint_EXAMPLE@ -- @author Lukáš Hrázký -- @copyright 2012 Lukáš Hrázký -- @classmod wibox.container.constraint --------------------------------------------------------------------------- local setmetatab...
gpl-2.0
czfshine/Don-t-Starve
data/scripts/map/static_layouts/default_pigking.lua
1
6376
return { version = "1.1", luaversion = "5.1", orientation = "orthogonal", width = 32, height = 32, tilewidth = 16, tileheight = 16, properties = {}, tilesets = { { name = "tiles", firstgid = 1, tilewidth = 64, tileheight = 64, spacing = 0, margin = 0, imag...
gpl-2.0
project-asap/IReS-Platform
asap-platform/asap-server/asapLibrary/operators/lr_classify_spark/lr_classify_spark.lua
1
1374
CP = "/opt/hadoop-2.7.0/etc/hadoop:/opt/hadoop-2.7.0/etc/hadoop:/opt/hadoop-2.7.0/etc/hadoop:/opt/hadoop-2.7.0/share/hadoop/common/lib/*:/opt/hadoop-2.7.0/share/hadoop/common/*:/opt/hadoop-2.7.0/share/hadoop/hdfs:/opt/hadoop-2.7.0/share/hadoop/hdfs/lib/*:/opt/hadoop-2.7.0/share/hadoop/hdfs/*:/opt/hadoop-2.7.0/share/had...
apache-2.0