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
mamaddeveloper/sattupnew
plugins/inpm.lua
1
3597
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
ldurniat/My-Pong-Game
preference.lua
2
1391
-- -- Moduł do zapisu/odczytu danych w formacie json. -- -- Wymagane moduły local loadsave = require( 'lib.loadsave' ) local app = require( 'lib.app' ) local colors = require( 'lib.colors' ) -- Deklaracja modułu local M = {} -- Tablica przechowująca wszelkie ustawienia dotyczące gry -- w tym wynik użytkownik...
mit
teleblue/telele
plugins/sticker2photo.lua
17
1060
local function tosticker(msg, success, result) local receiver = get_receiver(msg) if success then local file = 'data/stickers/'..msg.from.id..'.jpg' print('File downloaded to:', result) os.rename(result, file) print('File moved to:', file) send_photo(get_receiver(msg), file, ok_cb, false) re...
gpl-2.0
Whit3Tig3R/SpammBot
plugins/anti-flood.lua
281
2422
local NUM_MSG_MAX = 5 -- Max number of messages per TIME_CHECK seconds local TIME_CHECK = 5 local function kick_user(user_id, chat_id) local chat = 'chat#id'..chat_id local user = 'user#id'..user_id chat_del_user(chat, user, function (data, success, result) if success ~= 1 then local text = 'I can\'t k...
gpl-2.0
akh00/kong
kong/plugins/ip-restriction/schema.lua
6
1055
local iputils = require "resty.iputils" local Errors = require "kong.dao.errors" local function validate_ips(v, t, column) if v and type(v) == "table" then for _, ip in ipairs(v) do local _, err = iputils.parse_cidr(ip) if type(err) == "string" then -- It's an error only if the second variable is a s...
apache-2.0
BlubBlab/rom-bot
classes/bank.lua
1
2574
include("memorytable.lua"); include("bankitem.lua"); CBank = class( function (self) self.MaxSlots = 300; self.BagSlot = {}; local timeStart = getTime(); for slotNumber = 1, self.MaxSlots, 1 do self.BagSlot[slotNumber] = CBankItem( slotNumber ); end if( settings.profile.options.DEBU...
mit
eldesperado/.dotfiles
setup/hammerspoon/modules/misc/weather.lua
1
7908
-- Weather -- Current conditions for your location -- Largely based on <https://github.com/skamsie/hs-weather> ------------------------------------------------------------- local m = {} local hsDir = hs.fs.currentDir() local alert = require("hs.alert").show local settings = require("hs.settings") local iconsDir = ...
mit
UnluckyNinja/PathOfBuilding
Classes/SharedItemListControl.lua
1
2812
-- Path of Building -- -- Class: Item list -- Shared item list control. -- local launch, main = ... local pairs = pairs local t_insert = table.insert local t_remove = table.remove local SharedItemListClass = common.NewClass("SharedItemList", "ListControl", function(self, anchor, x, y, width, height, itemsTab) self.L...
mit
devlaith/DEVLAITH
plugins/all.lua
2
4370
do local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print_name(user)..' ['..user_id..']' return u...
gpl-2.0
pddthinh/android-vlc
vlc/share/lua/intf/dumpmeta.lua
98
2125
--[==========================================================================[ dumpmeta.lua: dump a file's meta data on stdout/stderr --[==========================================================================[ Copyright (C) 2010 the VideoLAN team $Id$ Authors: Antoine Cellerier <dionoea at videolan dot org> Th...
gpl-2.0
mymedia2/it_cat_butler
plugins/pin.lua
5
2282
local config = require 'config' local u = require 'utilities' local api = require 'methods' local plugin = {} function plugin.onTextMessage(msg, blocks) if msg.chat.type == 'private' then return end if u.is_allowed('texts', msg.chat.id, msg.from) then if not blocks[2] then local pin_id = db:get('chat:'..msg....
gpl-2.0
BinChengfei/scratchbox2
lua_scripts/pathmaps/nomap/00_default.lua
4
1924
-- Copyright (C) 2007 Lauri Leukkunen <lle@rahina.org> -- Copyright (C) 2007 Nokia Corporation. -- Licensed under MIT license. -- "nomap" mapping mode: Does not map any paths anywhere, but still pushes -- all paths thru SB2's path mapping logic, handles execs, etc. -- -- This is useful for benchmarking, debugging (SB2...
lgpl-2.1
olostan/Mudlet-vadi2
src/mudlet-lua/lua/TableUtils.lua
1
8440
---------------------------------------------------------------------------------- --- Mudlet Table Utils ---------------------------------------------------------------------------------- --- Tests if a table is empty: this is useful in situations where you find --- yourself wanting to do 'if my_table == {}' and suc...
gpl-2.0
pchote/OpenRA
mods/ra/maps/soviet-04b/soviet04b-reinforcements_teams.lua
2
3094
--[[ Copyright 2007-2021 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
pchote/OpenRA
mods/ra/scripts/campaign.lua
2
2229
--[[ Copyright 2007-2021 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
dxmgame/dxm-cocos-demo
src/lua-fantasy-warrior-3d/src/custom/api/ShadowSprite.lua
9
1047
-------------------------------- -- @module ShadowSprite -- @extend Sprite -- @parent_module cc -------------------------------- -- -- @function [parent=#ShadowSprite] create -- @param self -- @param #string filename -- @return ShadowSprite#ShadowSprite ret (return value: cc.ShadowSprite) -----------------...
mit
Daniex0r/project-roleplay-rp
resources/system-kontaktow/g_friends.lua
1
1529
function formatTimeString( time, unit ) if time == 0 then return "" end return time .. " " .. unit .. ( time ~= 1 and "s" or "" ) end function formatTimeInterval( seconds ) if type( seconds ) ~= "number" then return seconds end seconds = now( ) - seconds if seconds < 0 then return seconds end if seco...
gpl-2.0
urzq/SpaceFighter
src/cocos2d/plugin/luabindings/auto/api/lua_cocos2dx_pluginx_auto_api.lua
146
1793
-------------------------------- -- @module plugin -------------------------------------------------------- -- the plugin PluginProtocol -- @field [parent=#plugin] PluginProtocol#PluginProtocol PluginProtocol preloaded module -------------------------------------------------------- -- the plugin PluginManager -- @fi...
mit
hhsaez/crimild
examples/ParticleShowcase/assets/prefabs/explosion.lua
1
1636
function explosion( x, y, z ) local MAX_PARTICLES = 500 return { type = 'crimild::Group', components = { { type = 'crimild::ParticleSystemComponent', particles = { type = 'crimild::ParticleData', maxParticles = MAX_PARTICLES, }, emitRate = MAX_PARTICLES, burst = true, gene...
bsd-3-clause
akh00/kong
kong/plugins/runscope/handler.lua
1
1798
local runscope_serializer = require "kong.plugins.log-serializers.runscope" local BasePlugin = require "kong.plugins.base_plugin" local log = require "kong.plugins.runscope.log" local public_utils = require "kong.tools.public" local string_find = string.find local req_read_body = ngx.req.read_body local req_get_header...
apache-2.0
pins-ocs/OCP-tests
test-HangGlider/data/HangGlider_Data.lua
1
5350
--[[ /*-----------------------------------------------------------------------*\ | file: HangGlider_Data.lua | | | | version: 1.0 date 28/3/2020 | | ...
gpl-2.0
mc-server/Coiny
Info.lua
2
3512
-- Info.lua -- Implements the g_PluginInfo standard plugin description g_PluginInfo = { Name = "Coiny", Date = "2014-10-04", Description = [[ Provides the base for all economy plugins by implementing accounts for player's currency, and transactions over those accounts. Other plugins use this to implement mon...
unlicense
stephank/luci
libs/web/luasrc/template.lua
10
3134
--[[ LuCI - Template Parser Description: A template parser supporting includes, translations, Lua code blocks and more. It can be used either as a compiler or as an interpreter. FileId: $Id$ License: Copyright 2008 Steven Barth <steven@midlink.org> Licensed under the Apache License, Version 2.0 (the "License"); you...
apache-2.0
theonlywild/erfaan
plugins/face.lua
641
3073
local https = require("ssl.https") local ltn12 = require "ltn12" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function request(imageUrl) local api_key = mashape.api_key if api_key:isempt...
gpl-2.0
Dadido3/D3mc
Lua/Physic/Redstone/Torch.lua
1
1432
function Physic_Redstone_Torch_On(World_ID, X, Y, Z, Type, Metadata, Current_Trigger_Time) local Direction if Metadata == 1 then Direction = 3 elseif Metadata == 2 then Direction = 1 elseif Metadata == 3 then Direction = 0 elseif Metadata == 4 then Direction = 2 else Direction = 5 end --Message_Se...
mit
doyousketch2/theTemplate
libs/state_manager.lua
1
1098
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Clear callbacks - https://love2d.org/wiki/love -- This is so that when you switch gamestate, -- it won't try to use code from a previously loaded state. -- Do the same w/ any callbacks you use, that aren't redefined. function clearCallbacks() Lo .keypr...
gpl-3.0
gitTerebi/OpenRA
mods/ra/maps/soviet-04b/AI.lua
19
2829
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end IdlingUnits = function() local lazyUnits = Greece.GetGroundAttackers() Utils.Do(lazyUnits, function(unit) Trigger.OnDamaged(unit, function() Trigger.ClearAll(unit) Trigger.AfterDelay(0, function() IdleHunt(unit) end) ...
gpl-3.0
zmox/ProjectPorcupine
Assets/StreamingAssets/LUA/RoomBehavior.lua
36
3668
------------------------------------------------------- -- Project Porcupine Copyright(C) 2016 Team Porcupine -- This program comes with ABSOLUTELY NO WARRANTY; This is free software, -- and you are welcome to redistribute it under certain conditions; See -- file LICENSE, which is part of this source code package, for ...
gpl-3.0
pchote/OpenRA
mods/d2k/maps/harkonnen-06a/harkonnen06a.lua
2
10557
--[[ Copyright 2007-2021 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
ondravondra/vlc
share/lua/playlist/anevia_streams.lua
112
3664
--[[ $Id$ Parse list of available streams on Anevia Toucan servers. The URI http://ipaddress:554/list_streams.idp describes a list of available streams on the server. Copyright © 2009 M2X BV Authors: Jean-Paul Saman <jpsaman@videolan.org> This program is free software; you can redistribute it and/or modify ...
gpl-2.0
artynet/luci
applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua
7
1085
-- Copyright 2017-2018 Dirk Brenken (dev@brenken.org) -- This is free software, licensed under the Apache License, Version 2.0 local fs = require("nixio.fs") local util = require("luci.util") local input = "/etc/config/travelmate" if not fs.access(input) then m = SimpleForm("error", nil, translate("Input file no...
apache-2.0
stephank/luci
applications/luci-ahcp/luasrc/controller/ahcp.lua
13
1547
--[[ LuCI - Lua Configuration Interface Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> 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 $Id: init.lua...
apache-2.0
Daniex0r/project-roleplay-rp
resources/system-licencji/tempomat_c.lua
1
3805
local wybraneOgraniczenie=1 local ograniczenia={nil, 90, 50, 20} local ograniczeniaModeli={ -- rowery [509]=30, [510]=35, [481]=35, [589]=40, -- elka [448]=50, -- pizzaboy -- [431]=80, -- bus } local ograniczeniaWsteczneModeli={ [531]=5, -- tractor [530]=5, -- wozek widlowy [572]=5, -- kosiarka } fu...
gpl-2.0
Wiladams/LJIT2perfmon
pfmlib_ffi.lua
1
18984
--[[ /* * Copyright (c) 2015 William A Adams * * Based on: * Copyright (c) 2009 Google, Inc * Contributed by Stephane Eranian <eranian@gmail.com> * * Based on: * Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P. * Contributed by Stephane Eranian <eranian@hpl.hp.com> * * Permission is hereby g...
mit
Whit3Tig3R/SpammBot
plugins/qr.lua
637
1730
--[[ * qr plugin uses: * - http://goqr.me/api/doc/create-qr-code/ * psykomantis ]] local function get_hex(str) local colors = { red = "f00", blue = "00f", green = "0f0", yellow = "ff0", purple = "f0f", white = "fff", black = "000", gray = "ccc" } for color, value in pairs(colors)...
gpl-2.0
alikineh/spammer-bot
plugins/admin.lua
1
7488
local function set_bot_photo(msg, success, result) local receiver = get_receiver(msg) if success then local file = 'data/photos/bot.jpg' print('File downloaded to:', result) os.rename(result, file) print('File moved to:', file) set_profile_photo(file, ok_cb, false) send_large_msg(rec...
gpl-2.0
Daniex0r/project-roleplay-rp
resources/system-kont/c_create_character.lua
1
13047
local gui = {} local curskin = 1 local dummyPed = nil local languageselected = 1 function newCharacter_init() guiSetInputEnabled(true) setCameraInterior(14) setCameraMatrix(254.7190, -41.1370, 1002, 256.7190, -41.1370, 1002 ) dummyPed = createPed(217, 258, -42, 1002) setElementInterior(dummyPed, 14) setEle...
gpl-2.0
Daniex0r/project-roleplay-rp
resources/synchronizacja/vehicles.lua
1
2671
local element = "vehicle" local enabled = true local streamdistance = 60 local root = getRootElement() local localPlayer = getLocalPlayer() local function checkStreamIn() if ( enabled ) then local x, y, z = getElementPosition(localPlayer) local playerdimension = getElementDimension (localPlayer) for key, va...
gpl-2.0
Erfanh/Erfanh_bot
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
teleblue/telele
plugins/welcome.lua
1
3505
local add_user_cfg = load_from_file('data/add_user_cfg.lua') local function template_add_user(base, to_username, from_username, chat_name, chat_id) base = base or '' to_username = '@' .. (to_username or '') from_username = '@' .. (from_username or '') chat_name = string.gsub(chat_name, '_', ' ') or '' ch...
gpl-2.0
codeacula/achaea-harmony
ui/styles.lua
1
9528
Harmony.ui.styles = {} -- Eleusis: ForestGreen -- Cyrene: dodger_blue -- Mhaldor: firebrick -- Ashtan: blue_violet -- Hashan: a_darkmagenta -- Targossas: gold Harmony.ui.styles.blackConsole = [[ background-color: #000000; ]] Harmony.ui.styles.buttonActive = [[ background-color: #00654b; border-left: 1px ...
mit
pchote/OpenRA
mods/d2k/maps/harkonnen-03a/harkonnen03a.lua
2
6239
--[[ Copyright 2007-2021 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
tudelft/chdkptp
lua/fsutil.lua
4
13394
--[[ Copyright (C) 2010-2014 <reyalp (at) gmail dot com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITH...
gpl-2.0
vosmont/Vera-Plugin-RulesEngine
test/test_RulesEngine.lua
1
31855
-- Unit tests local _verbosity = 4 local t = require( "tests.luaunit" ) local RulesEngine = require( "L_RulesEngine1" ) local json = require( "dkjson" ) luup.variable_set( "urn:upnp-org:serviceId:RulesEngine1", "NoLoadIfDisabled", "1", RulesEngine.getDeviceIdByName( "RulesEngine" ) ) RulesEngine.setVerbosity( 4 ) t....
mit
BinChengfei/scratchbox2
lua_scripts/pathmaps/install/00_default.lua
5
3263
-- Copyright (C) 2007 Lauri Leukkunen <lle@rahina.org> -- Copyright (C) 2008 Movial -- Licensed under MIT license. -- Rule file interface version, mandatory. -- rule_file_interface_version = "22" ---------------------------------- if (tools_root and tools_root ~= "/") then tools_source = tools_root tools_target = t...
lgpl-2.1
artynet/luci
libs/luci-lib-httpprotoutils/luasrc/http/conditionals.lua
16
3006
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. -- This class provides basic ETag handling and implements most of the -- conditional HTTP/1.1 headers specified in RFC2616 Sct. 14.24 - 14.28 . module("luci.http.conditionals", package.seeall)...
apache-2.0
Daniex0r/project-roleplay-rp
resources/prp_achi/c_achievement_base.lua
1
1599
wAchievement, imgAchievement, lTitle, lDesc = nil function displayAchievement(id) local name, description, points = unpack(getAchievementInfo(id)) local width, height = 600, 100 local scrWidth, scrHeight = guiGetScreenSize() local x = scrWidth/2 - (width/2) local y = scrHeight - (scrHeight/6 - (height/6)) wA...
gpl-2.0
dxmgame/dxm-cocos-demo
src/lua-coin-tree/Resources/src/cocos/cocos2d/DeprecatedOpenglEnum.lua
148
11934
-- This is the DeprecatedEnum DeprecatedClass = {} or DeprecatedClass _G.GL_RENDERBUFFER_INTERNAL_FORMAT = gl.RENDERBUFFER_INTERNAL_FORMAT _G.GL_LINE_WIDTH = gl.LINE_WIDTH _G.GL_CONSTANT_ALPHA = gl.CONSTANT_ALPHA _G.GL_BLEND_SRC_ALPHA = gl.BLEND_SRC_ALPHA _G.GL_GREEN_BITS = gl.GREEN_BITS _G.GL_STENCIL_REF = gl.STENCI...
mit
cristicbz/ld48
src/Effect.lua
1
2696
------------------------------------------------------------------------------- -- File: Effect.lua -- Project: RatOut -- Author: Cristian Cobzarenco -- Description: Effect rig, manages a temporary effect on an entity at an -- abstract level. -- -- All rights reserved. Copyright (c) 2011-20...
apache-2.0
bahmrockk/configs
dotfiles/vim/bundle/vim-lua-ftplugin/misc/lua-ftplugin/omnicomplete.lua
2
3227
#!/usr/bin/env lua --[[ Author: Peter Odding <peter@peterodding.com> Last Change: July 12, 2014 URL: http://peterodding.com/code/vim/lua-ftplugin This Lua script is executed by the Lua file type plug-in for Vim to provide dynamic completion of function names defined by installed Lua modules. This works by expanding ...
gpl-2.0
mymedia2/it_cat_butler
plugins/moderators.lua
6
10496
local config = require 'config' local u = require 'utilities' local api = require 'methods' local plugin = {} local mod = { promote = function(chat_id, user) assert(user.id, "mod.promote: user.id missing") db:hmset(('chat:%d:mod:%d'):format(chat_id, tonumber(user.id)), user) loca...
gpl-2.0
teleblue/telele
plugins/me2.lua
15
11247
local function checktodaygr(cb_extra, success, result) local hash = '' local thash='' for k,user in pairs(result.members) do thash = 'today:'..user.peer_id if redis:get(thash) then if redis:get(thash) < os.date("%x",os.time() + 16200) then hash = 'utmsgst:'..user.peer_id..':'..cb_extra redis:set(hash,0) ...
gpl-2.0
UnluckyNinja/PathOfBuilding
Classes/PopupDialog.lua
1
2304
-- Path of Building -- -- Class: Popup Dialog -- Popup Dialog Box with a configurable list of controls -- local launch, main = ... local m_floor = math.floor local PopupDialogClass = common.NewClass("PopupDialog", "ControlHost", "Control", function(self, width, height, title, controls, enterControl, defaultControl, e...
mit
Sponk/NeoEditor
SDK/LuaApi/Widget.lua
1
3749
dofile("class.lua") --- The widget class -- The widget class represents the base class for every widget. -- It contains the most basic functionality shared by every widget type like -- translating the position or changing the rotation. -- -- Keep in mind that a Widget object does not refer to an existing C++ widget a...
gpl-2.0
c4augustus/Urho3D
Source/ThirdParty/LuaJIT/src/jit/bcsave.lua
41
18267
---------------------------------------------------------------------------- -- LuaJIT module to save/list bytecode. -- -- Copyright (C) 2005-2016 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h -------------------------------------------------------------------------...
mit
5620g/pp
plugins/ti3me.lua
4
2841
-- Implement a command !time [area] which uses -- 2 Google APIs to get the desired result: -- 1. Geocoding to get from area to a lat/long pair -- 2. Timezone to get the local time in that lat/long location -- Globals -- If you have a google api key for the geocoding/timezone api api_key = nil base_api = "https://m...
gpl-2.0
pchote/OpenRA
mods/d2k/maps/atreides-03b/atreides03b-AI.lua
2
1514
--[[ Copyright 2007-2021 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
sleexyz/mal
lua/env.lua
61
1274
local rex = require('rex_pcre') local string = require('string') local table = require('table') local utils = require('utils') local types = require('types') local Env = {} function Env:new(outer, binds, exprs) local data = {} local newObj = {outer = outer, data = data} self.__index = self if binds th...
mpl-2.0
shuttler67/SpaceShip
inventory/Slot.lua
1
2664
Slot = Class("Slot") function Slot:init(x, y, itemStack) self.itemStack = itemStack self.x = x or 0 self.y = y or 0 self.is_active = true self.drawSlot = true end function Slot:exchange(to) --to = slot if to.itemStack and self.itemStack then if to.itemStack:getItem() == self.itemStack:...
mit
Whit3Tig3R/SpammBot
bot/utils.lua
239
13499
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() http.TIMEOUT = 10 funct...
gpl-2.0
aqasaeed/mamad
bot/utils.lua
239
13499
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() http.TIMEOUT = 10 funct...
gpl-2.0
master041/tele-master
plugins/inpm.lua
1114
3008
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
roboplus12/robohe
plugins/inpm.lua
1114
3008
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
UnluckyNinja/PathOfBuilding
Export/masters.lua
1
1809
loadStatFile("stat_descriptions.txt") local itemClassMap = { [4] = "Amulet", [5] = "Ring", [6] = "Claw", [7] = "Dagger", [8] = "Wand", [9] = "One Handed Sword", [10] = "Thrusting One Handed Sword", [11] = "One Handed Axe", [12] = "One Handed Mace", [13] = "Bow", [14] = "Staff", [15] = "Two Handed Sword", ...
mit
dmccuskey/dmc-wamp
examples/dmc-wamp-authentication/dmc_corona/lib/dmc_lua/lib/bit/numberlua.lua
115
13399
--[[ LUA MODULE bit.numberlua - Bitwise operations implemented in pure Lua as numbers, with Lua 5.2 'bit32' and (LuaJIT) LuaBitOp 'bit' compatibility interfaces. SYNOPSIS local bit = require 'bit.numberlua' print(bit.band(0xff00ff00, 0x00ff00ff)) --> 0xffffffff -- Interface providing strong Lua 5.2 '...
mit
DevMoataz/Maestro
plugins/plugins-ar.lua
1
7183
--[[ _ _ _ _____ _____ ____ ____ / \ / \ / \ | ____|___|_ _| /_\ \ / __ \ Đєⱴ 💀: @MaEsTrO_0 / / \/ / \ / _ \ | _| / __| | | | |_\_/| | | | Đєⱴ 💀: @devmaestr0 / / \ \/ \ \ / ___ \| |___\__ \ | | | | \ \| |__| | Đєⱴ ฿๏ͳ💀: @iqMaestroBot /_/ \/ ...
gpl-2.0
UnluckyNinja/PathOfBuilding
Export/browse.lua
1
2869
#@ dofile("_common.lua") loadDat("SkillGems") loadDat("ActiveSkills") loadDat("GemTags") loadDat("Stats") loadDat("Mods") loadDat("GrantedEffects") loadDat("GrantedEffectsPerLevel") loadDat("MonsterVarieties") loadDat("MonsterTypes") loadDat("MonsterResistances") loadDat("ItemClasses") function actWithType(skillType...
mit
Whit3Tig3R/SpammBot
bot/bot.lua
1
6651
package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua' ..';.luarocks/share/lua/5.2/?/init.lua' package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so' require("./bot/utils") local f = assert(io.popen('/usr/bin/git describe --tags', 'r')) VERSION = assert(f:read('*a')) f:close() -- This function is ...
gpl-2.0
pins-ocs/OCP-tests
test-BangBangFwork/data/BangBangFwork_Data.lua
1
4619
--[[ /*-----------------------------------------------------------------------*\ | file: BangBangFwork_Data.lua | | | | version: 1.0 date 28/3/2020 | | ...
gpl-2.0
pchote/OpenRA
mods/ra/maps/soviet-08b/soviet08b-AI.lua
2
4471
--[[ Copyright 2007-2021 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
poor01/rootbot
plugins/groupmanager.lua
1
108949
local function modadd(msg) local hash = "gp_lang:"..msg.chat_id_ local lang = redis:get(hash) if not is_admin(msg) then if not lang then return '_You are not bot admin_' else return 'شما مدیر ربات نمیباشید' end end local data = load_data(_config.moderation.data) if data[tostring(msg.chat_...
gpl-3.0
soheil22222222/ub
plugins/password.lua
4
2252
do local function set_pass(msg, pass, id) local hash = nil if msg.to.type == "channel" then hash = 'setpass:' end local name = string.gsub(msg.to.print_name, '_', '') if hash then redis:hset(hash, pass, id) return send_large_msg("channel#id"..msg.to.id, "Password Of SuperGroup/Group : ["..name....
gpl-2.0
emadni/telelord-bot
plugins/ingroup.lua
14
27651
do local function check_member(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostring(msg.to.id)] = { ...
gpl-2.0
mrfoxirani/teleseed-2
plugins/ingroup.lua
14
27651
do local function check_member(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostring(msg.to.id)] = { ...
gpl-2.0
LucentW/s-uzzbot
plugins/img_google.lua
2
3881
do local mime = require("mime") local google_config = load_from_file('data/google.lua') local cache = {} --[[ local function send_request(url) local t = {} local options = { url = url, sink = ltn12.sink.table(t), method = "GET" } local a, code, headers, status = http.reques...
gpl-2.0
artynet/luci
applications/luci-app-adblock/luasrc/controller/adblock.lua
3
6018
-- Copyright 2017-2019 Dirk Brenken (dev@brenken.org) -- This is free software, licensed under the Apache License, Version 2.0 module("luci.controller.adblock", package.seeall) local sys = require("luci.sys") local util = require("luci.util") local http = require("luci.http") local i18n = require("luci.i18n") lo...
apache-2.0
artynet/luci
protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua
9
1714
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Copyright 2013 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. local netmod = luci.model.network local _, p for _, p in ipairs({"dslite", "map", "464xlat"}) do local proto = netmod:register_protocol(p) function proto....
apache-2.0
pchote/OpenRA
mods/ra/maps/allies-04/allies04.lua
2
4365
--[[ Copyright 2007-2021 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
Sponk/NeoEditor
SDK/LuaApi/OSound.lua
1
1603
--- The OSound class -- An 'OSound' instance is a sound object in a scene which can be -- used to play 3D and 2D sounds and music during runtime. -- -- See also: <a href="Object3d.lua.html">Widget</a> dofile("class.lua") dofile("Object3d.lua") --- OSound(file) -- Creates a new sound object and loads the specified fi...
gpl-2.0
Dadido3/D3mc
Lua/Standart/Block_Events.lua
1
4070
function Block_Rightclick_Noteblock(Network_Client_ID, World_ID, X, Y, Z, Direction, Cursor_X, Cursor_Y, Cursor_Z, Type, Metadata) Metadata = Cursor_X --Message_Send_2_All("§cNoteblock clicked at: X="..tostring(Cursor_X).." Y="..tostring(Cursor_Y).." Z="..tostring(Cursor_Z).." Metadata="..tostring(Metadata)) --W...
mit
Whit3Tig3R/SpammBot
plugins/wiki.lua
735
4364
-- http://git.io/vUA4M local socket = require "socket" local JSON = require "cjson" local wikiusage = { "!wiki [text]: Read extract from default Wikipedia (EN)", "!wiki(lang) [text]: Read extract from 'lang' Wikipedia. Example: !wikies hola", "!wiki search [text]: Search articles on default Wikipedia (EN)", "!...
gpl-2.0
korialuo/xServer
common/xgate_tcp.lua
1
3749
local skynet = require "skynet" local gateserver = require "snax.gateserver" local socketdriver = require "skynet.socketdriver" local netpack = require "skynet.netpack" local crypt = require "skynet.crypt" local mainsvr = assert(tonumber(...)) local sessions = {} local handler = {} local CMD = {} skynet.register_prot...
mit
c4augustus/Urho3D
Source/Urho3D/LuaScript/pkgs/ToDoxHook.lua
9
19864
-- -- Copyright (c) 2008-2017 the Urho3D project. -- -- 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...
mit
ahmedcharles/Mudlet
src/mudlet-lua/lua/geyser/GeyserGeyser.lua
16
2423
-------------------------------------- -- -- -- The Geyser Layout Manager by guy -- -- -- -------------------------------------- --================================================== -- Create the Geyser Root Container --=================================...
gpl-2.0
dani-sj/danibot
plugins/stats.lua
168
4001
do -- Returns a table with `name` and `msgs` local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_prin...
gpl-2.0
UnluckyNinja/PathOfBuilding
Data/Uniques/bow.lua
1
9132
-- Item data (c) Grinding Gear Games return { -- Weapon: Bow [[ Chin Sol Assassin Bow Variant: Pre 1.2.0 Variant: Pre 2.0.0 Variant: Current Requires Level 62, 212 Dex {variant:1,2}(6-12)% increased Elemental Damage with Weapons {variant:1}(75-100)% increased Physical Damage {variant:2,3}(150-180)% increased Physical ...
mit
emadni/telelord-bot
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
stephank/luci
applications/luci-asterisk/luasrc/controller/asterisk.lua
11
7516
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.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 h...
apache-2.0
Daniex0r/project-roleplay-rp
resources/salony/c_shop.lua
1
2922
function carshop_showInfo(carPrice, taxPrice) outputChatBox("") outputChatBox("Idąc koło auta możesz zobaczyć specjalne karty na szybach:") --outputChatBox(" --------------------------------------") outputChatBox("| "..getVehicleNameFromModel( getElementModel( source ) ) ) outputChatBox("| Koszt $"..exports.globa...
gpl-2.0
Whit3Tig3R/SpammBot
plugins/weather.lua
274
1531
do local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finding weather in ", location) location = string.gsub(location," ","+") local url = BASE_URL url = url..'?q='..location url = url..'&units=metric' url = url..'&appid=bd82977b86bf27fb59a04b61b6...
gpl-2.0
Sponk/NeoEditor
SDK/LuaApi/OCamera.lua
1
3287
--- The OCamera class -- An 'OCamera' instance is an camera object in a scene which can be -- manipulated. -- -- See also: <a href="Object3d.lua.html">Widget</a> dofile("class.lua") dofile("Object3d.lua") --- OCamera(object3d) -- Create a new OCamera object with the given Object3d -- as the base. Will return 'nil' i...
gpl-2.0
pins-ocs/OCP-tests
test-TwoStageCSTR/data/TwoStageCSTR_Data.lua
1
4643
--[[ /*-----------------------------------------------------------------------*\ | file: TwoStageCSTR_Data.lua | | | | version: 1.0 date 28/3/2020 | | ...
gpl-2.0
jsphweid/finale-macros
lua/staff-names_make-all-uppercase.lua
2
1465
function plugindef() finaleplugin.Author = "Joseph Weidinger" finaleplugin.Version = "1.0" finaleplugin.Date = "July 02, 2015" finaleplugin.RequireSelection = false finaleplugin.CategoryTags = "staff names uppercase" return "Staff Names - Make all uppercase", "Staff Names - Make all uppercase",...
mit
tudelft/chdkptp
lua/exposure.lua
7
2839
--[[ Copyright (C) 2010-2012 <reyalp (at) gmail dot com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHO...
gpl-2.0
UnluckyNinja/PathOfBuilding
Data/Uniques/jewel.lua
1
22084
-- Item data (c) Grinding Gear Games return { -- Jewel: Drop [[ Anatomical Knowledge Cobalt Jewel Radius: Large (6-8)% increased maximum Life Adds 1 to Maximum Life per 3 Intelligence Allocated in Radius ]],[[ The Anima Stone Prismatic Jewel Limited to: 1 Implicits: 0 Can Summon up to 1 additional Golem at a time If ...
mit
stephank/luci
modules/admin-core/luasrc/tools/status.lua
8
3115
--[[ LuCI - Lua Configuration Interface Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> 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 $Id$ ]]-- mo...
apache-2.0
artynet/luci
applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua
3
6692
-- Copyright 2017 Yousong Zhou <yszhou4tech@gmail.com> -- Licensed to the public under the Apache License 2.0. local _up = getfenv(3) local ut = require("luci.util") local sys = require("luci.sys") local ds = require("luci.dispatcher") local nw = require("luci.model.network") nw.init() module("luci.model.shadowsocks-l...
apache-2.0
eyesnears/ardupilot
Tools/CHDK-Scripts/kap_uav.lua
183
28512
--[[ KAP UAV Exposure Control Script v3.1 -- Released under GPL by waterwingz and wayback/peabody http://chdk.wikia.com/wiki/KAP_%26_UAV_Exposure_Control_Script @title KAP UAV 3.1 @param i Shot Interval (sec) @default i 15 @range i 2 120 @param s Total Shots (0=infinite) @default s 0 @range ...
gpl-3.0
lymacasm/ardupilot
Tools/CHDK-Scripts/kap_uav.lua
183
28512
--[[ KAP UAV Exposure Control Script v3.1 -- Released under GPL by waterwingz and wayback/peabody http://chdk.wikia.com/wiki/KAP_%26_UAV_Exposure_Control_Script @title KAP UAV 3.1 @param i Shot Interval (sec) @default i 15 @range i 2 120 @param s Total Shots (0=infinite) @default s 0 @range ...
gpl-3.0
theonlywild/erfaan
bot/utils.lua
356
14963
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() JSON = (loadfile "./libs/...
gpl-2.0