repo_name stringlengths 6 69 | path stringlengths 6 178 | copies stringclasses 278
values | size stringlengths 4 7 | content stringlengths 671 917k | license stringclasses 15
values |
|---|---|---|---|---|---|
vietlq/luasocket | src/http.lua | 121 | 12193 | -----------------------------------------------------------------------------
-- HTTP/1.1 client support for the Lua language.
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: http.lua,v 1.71 2007/10/13 23:55:20 diego Exp $
-----------------------------------------------------------------------------
-----... | mit |
FFXIOrgins/FFXIOrgins | scripts/globals/items/plate_of_patlican_salata.lua | 35 | 1211 | -----------------------------------------
-- ID: 5582
-- Item: plate_of_patlican_salata
-- Food Effect: 180Min, All Races
-----------------------------------------
-- Agility 4
-- Vitality -1
-----------------------------------------
require("scripts/globals/status");
--------------------------------------... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Port_Windurst/npcs/Kohlo-Lakolo.lua | 36 | 10182 | -----------------------------------
-- Area: Port Windurst
-- NPC: Kohlo-Lakolo
-- Invloved In Quests: Truth, Justice, and the Onion Way!,
-- Know One's Onions,
-- Inspector's Gadget,
-- Onion Rings,
-- Crying Over Onions,
-- Wild Card,
-- ... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Upper_Jeuno/npcs/Souren.lua | 20 | 2050 | -----------------------------------
-- Area: Upper Jeuno
-- NPC: Souren
-- Involved in Quests: Save the Clock Tower
-- @zone 244
-- @pos -51 0 4
-----------------------------------
package.loaded["scripts/zones/Upper_Jeuno/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings... | gpl-3.0 |
hb9cwp/snabbswitch | src/lib/ipc/shmem/mib.lua | 14 | 8133 | -- Subclass of ipc.shmem.shmem that handles data types from the SMIv2
-- specification.
--
-- It defines the name space "MIB", which uses the default index
-- format. By definition, the object names must be literal OIDs or
-- textual object identifiers that can be directly translated into
-- OIDs through a MIB (e.g. "... | apache-2.0 |
CAAP/ferre | ferre/updates.lua | 2 | 1580 | #!/usr/local/bin/lua
local sql = require'carlos.sqlite'
local fd = require'carlos.fold'
local aux = require'ferre.aux'
local hd = require'ferre.header'
local ex = require'ferre.extras'
local week = ex.week()
local ups = {store='VERS', week='', vers=0}
local QRY = 'SELECT * FROM updates %s'
local function push(ret... | bsd-2-clause |
FFXIOrgins/FFXIOrgins | scripts/globals/abilities/samurai_roll.lua | 6 | 1417 | -----------------------------------
-- Ability: Choral Roll
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/status");
-----------------------------------
-- OnUseAbility
-----------------------------------
function OnAbilityCheck(player,target,ability)
lo... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/magic_maps.lua | 8 | 4371 | ---------------------------------------------
--
-- Function that all map NPCS use.
-- SE updated the map NPCs to sell maps from the normal areas, RoZ, and CoP areas (Update was in Nov 5, 2013)
---------------------------------------------
require("scripts/globals/keyitems");
local Maps = {MAP_OF_THE_SAN_DORIA_AREA, ... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Abyssea-Misareaux/Zone.lua | 32 | 1543 | -----------------------------------
--
-- Zone: Abyssea - Misareaux
--
-----------------------------------
package.loaded["scripts/zones/Abyssea-Misareaux/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/quests");
require("scripts/zones/Abysse... | gpl-3.0 |
PioneerMakeTeam/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 "... | mit |
FFXIOrgins/FFXIOrgins | scripts/globals/spells/mages_ballad.lua | 4 | 1183 | -----------------------------------------
-- Spell: Mage's Ballad
-- Gradually restores target's MP.
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function OnMagicCastingCheck(... | gpl-3.0 |
moj69/m | plugins/chats.lua | 1 | 2087 | local function run(msg)
if msg.text == "hi" then
return "Hello bb"
end
if msg.text == "Hi" then
return "Hello honey"
end
if msg.text == "Hello" then
return "Hi bb"
end
if msg.text == "hello" then
return "Hi honey"
end
if msg.text == "مجتبی" then
return "با باباییم چیکار داری؟"
end
if msg.text == "سلام" then
retur... | agpl-3.0 |
MAXtgBOT/Telemax-TG | plugins/anti_fosh.lua | 14 | 1450 | local function run(msg, matches)
if is_owner(msg) then
return
end
local data = load_data(_config.moderation.data)
if data[tostring(msg.to.id)] then
if data[tostring(msg.to.id)]['settings'] then
if data[tostring(msg.to.id)]['settings']['antifosh'] then
lock_fos... | gpl-2.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Port_San_dOria/npcs/Apstaule.lua | 36 | 1764 | -----------------------------------
-- Area: Port San d'Oria
-- NPC: Apstaule
-- Not used cutscenes: 541
-----------------------------------
package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/shop");
require("scripts/globals/quests");
r... | gpl-3.0 |
JulianVolodia/awesome | themes/xresources/theme.lua | 4 | 3298 | ---------------------------------------------
-- Awesome theme which follows xrdb config --
-- by Yauhen Kirylau --
---------------------------------------------
local xresources = require("beautiful").xresources
local xrdb = xresources.get_current_theme()
local dpi = xresources.apply_dpi
-- inhe... | gpl-2.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Bastok_Mines/npcs/Phara.lua | 20 | 2542 | -----------------------------------
-- Area: Bastok Mines
-- NPC: Phara
-- Starts and Finishes Quest: The doorman (start)
-- Involved in Quest: The Talekeeper's Truth
-- @zone 234
-- @pos 75 0 -80
-----------------------------------
package.loaded["scripts/zones/Bastok_Mines/TextIDs"] = nil;
-----------------... | gpl-3.0 |
subzrk/BadRotations | System/engines/HealingEngine.lua | 3 | 21447 | --[[---------------------------------------------------------------------------------------------------
-----------------------------------------Bubba's Healing Engine--------------------------------------]]
if not metaTable1 then
-- localizing the commonly used functions while inside loops
local getDistance,tinse... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Temenos/mobs/Cryptonberry_Skulker.lua | 17 | 1139 | -----------------------------------
-- Area: Temenos N T
-- NPC: Cryptonberry_Skulker
-----------------------------------
package.loaded["scripts/zones/Temenos/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/limbus");
require("scripts/zones/Temenos/TextIDs");
-----------------... | gpl-3.0 |
cjtallman/lua_sysenv | spec/setenv_spec.lua | 1 | 1717 |
describe(".setenv", function()
local sysenv = require("lua_sysenv")
local setenv = sysenv.setenv
it("is a valid type", function()
assert.is_function(setenv)
end)
it("sets new variable", function()
local var = "FOO"
local val = "BAR"
assert.is_nil(os.getenv(var))
... | mit |
fartoverflow/naev | dat/missions/neutral/dts_02.lua | 6 | 13600 | --[[
MISSION: Defend the System 3
DESCRIPTION: A mission to defend the system against swarm of pirate ships.
This will be the third in a series of random encounters.
After the mission, perhaps there'll be a regular diet of similar missions
Perhaps the random missio... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/items/bowl_of_ambrosia.lua | 35 | 2277 | -----------------------------------------
-- ID: 4511
-- Item: Bowl of Ambrosia
-- Food Effect: 240Min, All Races
-----------------------------------------
-- Health 7
-- Magic 7
-- Strength 7
-- Dexterity 7
-- Agility 7
-- Vitality 7
-- Intelligence 7
-- Mind 7
-- Charisma 7
-- Health Regen While Healing... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/spells/armys_paeon_vi.lua | 4 | 1390 | -----------------------------------------
-- Spell: Army's Paeon VI
-- Gradually restores target's HP.
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function OnMagicCastingChec... | gpl-3.0 |
teahouse/FWServer | script/util/luajson.lua | 1 | 15456 | -----------------------------------------------------------------------------
-- JSON4Lua: JSON encoding / decoding support for the Lua language.
-- json Module.
-- Author: Craig Mason-Jones
-- Homepage: http://json.luaforge.net/
-- Version: 0.9.40
-- This module is released under the MIT License (MIT).
-- Please see L... | mit |
FFXIOrgins/FFXIOrgins | scripts/zones/Valkurm_Dunes/npcs/qm4.lua | 37 | 1033 | -----------------------------------
-- Area: Valkurm Dunes
-- NPC: qm4 (???)
-- Involved in quest: Pirate's Chart
-- @pos -160 4 -131 103
-----------------------------------
package.loaded["scripts/zones/Valkurm_Dunes/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Valkurm_Dunes/TextIDs");... | gpl-3.0 |
Gael-de-Sailly/minetest-minetestforfun-server | mods/profnsched/queue.lua | 7 | 2496 | scheduler = {}
-- scheduler.queue = {[1]={first=1, last=2, groups={[1]={}, [2]={}}}}
scheduler.queue = {[1]={cur={}, nxt={}, ncur=1, nnxt=1}}
function scheduler.add(priority, job)
-- get asked class
local class = scheduler.queue[priority]
local p = priority
while not class do -- create all classes under 'priority'... | unlicense |
gitfancode/skynet | lualib/socketchannel.lua | 3 | 9639 | local skynet = require "skynet"
local socket = require "socket"
local socketdriver = require "socketdriver"
-- channel support auto reconnect , and capture socket error in request/response transaction
-- { host = "", port = , auth = function(so) , response = function(so) session, data }
local socket_channel = {}
loca... | mit |
hacker44-h44/1104 | vir/Get.lua | 15 | 1052 | local function get_variables_hash(msg)
if msg.to.type == 'chat' then
return 'chat:'..msg.to.id..':variables'
end
if msg.to.type == 'user' then
return 'user:'..msg.from.id..':variables'
end
end
local function list_variables(msg)
local hash = get_variables_hash(msg)
if hash then
local names =... | gpl-2.0 |
mahdikord/mahdihop | plugins/banhammer.lua | 13 | 11897 |
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 |
FFXIOrgins/FFXIOrgins | scripts/zones/Lower_Jeuno/npcs/_l02.lua | 36 | 1562 | -----------------------------------
-- Area: Lower Jeuno
-- NPC: Streetlamp
-- Involved in Quests: Community Service
-- @zone 245
-- @pos -89.022 -0 -123.317
-----------------------------------
package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil;
-----------------------------------
require("scripts/gl... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Norg/npcs/Heizo.lua | 19 | 3109 | -----------------------------------
-- Area: Norg
-- NPC: Heizo
-- Starts and Ends Quest: Like Shining Leggings
-- @pos -1 -5 25 252
-----------------------------------
package.loaded["scripts/zones/Norg/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scrip... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Nashmau/npcs/Yoyoroon.lua | 34 | 1613 | -----------------------------------
-- Area: Nashmau
-- NPC: Yoyoroon
-- Standard Merchant NPC
-----------------------------------
package.loaded["scripts/zones/Nashmau/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Nashmau/TextIDs");
require("scripts/globals/shop");
----------... | gpl-3.0 |
sjznxd/lc-20130127 | applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-codec.lua | 80 | 2172 | --[[
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 |
subzrk/BadRotations | Libs/LibRangeCheck-2.0/LibRangeCheck-2.0.lua | 6 | 32636 | --[[
Name: LibRangeCheck-2.0
Revision: $Revision: 168 $
Author(s): mitch0
Website: http://www.wowace.com/projects/librangecheck-2-0/
Description: A range checking library based on interact distances and spell ranges
Dependencies: LibStub
License: Public Domain
]]
--- LibRangeCheck-2.0 provides an easy way to check for... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Altar_Room/npcs/Magicite.lua | 23 | 1573 | -----------------------------------
-- Area: Altar Room
-- NPC: Magicite
-- Involved in Mission: Magicite
-- @zone 152
-- @pos -344 25 43
-----------------------------------
package.loaded["scripts/zones/Altar_Room/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/keyitems");
require("scri... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/items/dish_of_salsa.lua | 35 | 1591 | -----------------------------------------
-- ID: 5299
-- Item: dish_of_salsa
-- Food Effect: 3Min, All Races
-----------------------------------------
-- Strength -1
-- Dexterity -1
-- Agility -1
-- Vitality -1
-- Intelligence -1
-- Mind -1
-- Sleep Resist 5
-----------------------------------------
requ... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/harvesting.lua | 2 | 5627 | -------------------------------------------------
-- Author: Ezekyel
-- Harvesting functions
-- Info from:
-- http://wiki.ffxiclopedia.org/wiki/Harvesting
-------------------------------------------------
require("scripts/globals/keyitems");
require("scripts/globals/settings");
require("scripts/globals... | gpl-3.0 |
sjznxd/luci-0.11-aa | applications/luci-asterisk/luasrc/model/cbi/asterisk/voicemail.lua | 11 | 1730 | --[[
LuCI - Lua Configuration Interface
Copyright 2009 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: voicemai... | apache-2.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/weaponskills/garland_of_bliss.lua | 4 | 4733 | -----------------------------------
-- Garland Of Bliss
-- Staff weapon skill
-- Skill level: N/A
-- Lowers target's defense. Duration of effect varies with TP. Nirvana: Aftermath effect varies with TP.
-- Reduces enemy's defense by 12.5%.
-- Available only after completing the Unlocking a Myth (Summoner) q... | gpl-3.0 |
mkacik/bcc | src/lua/bpf/builtins.lua | 2 | 16003 | --[[
Copyright 2016 Marek Vavrusa <mvavrusa@cloudflare.com>
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
Unless required by applicable law or agreed t... | apache-2.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Port_Windurst/npcs/Kunchichi.lua | 38 | 1409 | -----------------------------------
-- Area: Port Windurst
-- NPC: Kunchichi
-- Type: Standard NPC
-- @pos -115.933 -4.25 109.533 240
-----------------------------------
package.loaded["scripts/zones/Port_Windurst/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/quests");
require("scr... | gpl-3.0 |
togolwb/skynet | lualib/http/internal.lua | 95 | 2613 | local table = table
local type = type
local M = {}
local LIMIT = 8192
local function chunksize(readbytes, body)
while true do
local f,e = body:find("\r\n",1,true)
if f then
return tonumber(body:sub(1,f-1),16), body:sub(e+1)
end
if #body > 128 then
-- pervent the attacker send very long stream without ... | mit |
fartoverflow/naev | dat/events/neutral/shipwreck.lua | 11 | 2074 | --[[
-- Shipwreck Event
--
-- Creates a wrecked ship that asks for help. If the player boards it, the event switches to the Space Family mission.
-- See dat/missions/neutral/spacefamily.lua
--
-- 12/02/2010 - Added visibility/highlight options for use in bigsystems (Anatolis)
--]]
lang = naev.lang()
if lang == "es" ... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/items/bowl_of_mushroom_soup.lua | 35 | 1384 | -----------------------------------------
-- ID: 4419
-- Item: mushroom_soup
-- Food Effect: 3hours, All Races
-----------------------------------------
-- Magic Points 20
-- Strength -1
-- Mind 2
-- MP Recovered While Healing 1
-----------------------------------------
require("scripts/globals/status");
... | gpl-3.0 |
MOSAVI17/Gbot | 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 |
punisherbot/test | 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 |
sjznxd/lc-20130127 | modules/niu/luasrc/model/cbi/niu/network/etherwan.lua | 50 | 5482 | --[[
LuCI - Lua Configuration Interface
Copyright 2009 Steven Barth <steven@midlink.org>
Copyright 2009 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://w... | apache-2.0 |
sjznxd/luci-0.11-aa | modules/niu/luasrc/model/cbi/niu/network/etherwan.lua | 50 | 5482 | --[[
LuCI - Lua Configuration Interface
Copyright 2009 Steven Barth <steven@midlink.org>
Copyright 2009 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://w... | apache-2.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Windurst_Waters/npcs/Paku-Nakku.lua | 36 | 1422 | -----------------------------------
-- Area: Windurst Waters
-- NPC: Paku-Nakku
-- Involved in Quest: Making the Grade
-- Working 100%
-- @zone = 238
-- @pos = 127 -6 165
-----------------------------------
package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil;
-----------------------------------
... | gpl-3.0 |
JulianVolodia/awesome | lib/awful/remote.lua | 11 | 1687 | ---------------------------------------------------------------------------
--- Remote control module allowing usage of awesome-client.
--
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2009 Julien Danjou
-- @release @AWESOME_VERSION@
-- @module awful.remote
------------------------------------------... | gpl-2.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Toraimarai_Canal/npcs/Treasure_Coffer.lua | 3 | 3884 | -----------------------------------
-- Area: Toraimarai Canal
-- NPC: Treasure Coffer
-- Involved In Quest: Wild Card
-- @zone 169
-- @pos 220 16 -50
-----------------------------------
package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil;
-----------------------------------
require("scripts/globa... | gpl-3.0 |
msburgess3200/PERP | gamemodes/perp/gamemode/vgui/bank.lua | 1 | 1517 |
local PANEL = {};
function PANEL:Init ( )
self.BankPlayerInventory = vgui.Create("perp_bank_", self);
self.BankPlayerInventory = vgui.Create("perp_bank_inv", self);
//self.ShopDescription = vgui.Create("perp2_shop_desc", self);
//self.ShopStoreInventory = vgui.Create("perp2_shop_store", self);
//self.ShopTitle... | mit |
sjznxd/luci-0.11-aa | applications/luci-diag-devinfo/luasrc/controller/luci_diag/devinfo_common.lua | 76 | 5638 | --[[
Luci diag - Diagnostics controller module
(c) 2009 Daniel Dickinson
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
]]--
module("luci.cont... | apache-2.0 |
loic-fejoz/loic-fejoz-fabmoments | icesl-gallery/pythagoras-tree.lua | 1 | 2790 | --[[
The MIT License (MIT)
Copyright (c) 2015 Loïc Fejoz
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, ... | mit |
adamsumm/SMBRNN | Torch/sample.lua | 2 | 5737 |
--[[
This file samples characters from a trained model
Code is based on implementation in
https://github.com/oxford-cs-ml-2015/practical6
]]--
require 'torch'
require 'nn'
require 'nngraph'
require 'optim'
require 'lfs'
require 'util.OneHot'
require 'util.misc'
cmd = torch.CmdLine()
cmd:text()
cmd:text('Sample ... | mit |
sadegh1996/sword_antispam | plugins/weather.lua | 8 | 1444 | do
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
local function get_weather(location)
print("Finding weather in ", location)
local url = BASE_URL
url = url..'?q='..location
url = url..'&units=metric'
local b, c, h = http.request(url)
if c ~= 200 then return nil end
local weather = ... | gpl-2.0 |
joshimoo/Algorithm-Implementations | Caesar_Cipher/Lua/Yonaba/caesar_cipher_test.lua | 26 | 1202 | -- Tests for caesar_cipher.lua
local caesar = require 'caesar_cipher'
local total, pass = 0, 0
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
local function run(message, f)
total = total + 1
local ok, err = pcall(f)
if ok then pass = pass + 1 ... | mit |
sadegh1996/sword_antispam | libs/JSON.lua | 13 | 36868 | -- -*- 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 |
sjznxd/lc-20130127 | applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua | 78 | 1934 | --[[
Luci configuration model for statistics - collectd email plugin configuration
(c) 2008 Freifunk Leipzig / 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... | apache-2.0 |
Gael-de-Sailly/minetest-minetestforfun-server | mods/pipeworks/init.lua | 8 | 3709 | -- Pipeworks mod by Vanessa Ezekowitz - 2013-07-13
--
-- This mod supplies various steel pipes and plastic pneumatic tubes
-- and devices that they can connect to.
--
-- License: WTFPL
--
pipeworks = {}
local DEBUG = false
pipeworks.worldpath = minetest.get_worldpath()
pipeworks.modpath = minetest.get_modpath("pipew... | unlicense |
FFXIOrgins/FFXIOrgins | scripts/globals/mobskills/Chains_of_Arrogance.lua | 5 | 1180 | ---------------------------------------------
-- Chains of Apathy
--
---------------------------------------------
require("/scripts/globals/settings");
require("/scripts/globals/status");
require("/scripts/globals/monstertpmoves");
require("/scripts/globals/keyitems");
require("/scripts/zones/Empyreal_Paradox/TextIDs... | gpl-3.0 |
LuaDist2/hotswap-ev | bench/bench-http.lua | 8 | 1194 | local gettime = require "socket".gettime
local n = require "n"
local hotswap = require "hotswap.http" {
encode = function (t)
if next (t) == nil
or next (t, next (t)) ~= nil then
return
end
local k, v = next (t)
return {
url = "http://127.0.0.1:8080/lua/" .. k,
method ... | mit |
sjznxd/lc-20130127 | libs/httpclient/luasrc/httpclient.lua | 41 | 9111 | --[[
LuCI - Lua Development Framework
Copyright 2009 Steven Barth <steven@midlink.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$
]]--
requi... | apache-2.0 |
Gael-de-Sailly/minetest-minetestforfun-server | minetestforfun_game/mods/screwdriver/init.lua | 6 | 4233 | screwdriver = {}
local function nextrange(x, max)
x = x + 1
if x > max then
x = 0
end
return x
end
screwdriver.ROTATE_FACE = 1
screwdriver.ROTATE_AXIS = 2
screwdriver.disallow = function(pos, node, user, mode, new_param2)
return false
end
screwdriver.rotate_simple = function(pos, node, user, mode, new_param2)
... | unlicense |
FFXIOrgins/FFXIOrgins | scripts/zones/Aht_Urhgan_Whitegate/npcs/Tafeesa.lua | 34 | 1032 | -----------------------------------
-- Area: Aht Urhgan Whitegate
-- NPC: Tafeesa
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs");
----------... | gpl-3.0 |
xToken/CompMod | lua/CompMod/TechData/NewTechData.lua | 1 | 29608 | -- Natural Selection 2 Competitive Mod
-- Source located at - https://github.com/xToken/CompMod
-- lua\CompMod\TechData\NewTechData.lua
-- - Dragon
-- This file contains all the updated tech data. In mostly one place to make my life easier!
function BuildCompModTechDataUpdates()
local newTechTable = { }
local techI... | mit |
sajadaltaiee/Raobot | 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 |
Messael/Firewolf | old/firewolf 2.4 concept.lua | 5 | 3960 |
-- Variables
local event_exitWebsite = "test_exitWebsiteEvent"
local event_waitForLoad = "test_waitForLoadEvent"
local noQuitPrefix = ":fn2:"
-- -------- Override os.pullEvent
local oldpullevent = os.pullEvent
local oldEnv = {}
local env = {}
local api = {}
local pullevent = function(data)
while true do
-- P... | mit |
togolwb/skynet | service/launcher.lua | 51 | 3199 | local skynet = require "skynet"
local core = require "skynet.core"
require "skynet.manager" -- import manager apis
local string = string
local services = {}
local command = {}
local instance = {} -- for confirm (function command.LAUNCH / command.ERROR / command.LAUNCHOK)
local function handle_to_address(handle)
retu... | mit |
FFXIOrgins/FFXIOrgins | scripts/zones/Alzadaal_Undersea_Ruins/npcs/qm3.lua | 15 | 1199 | -----------------------------------
-- Area: Alzadaal Undersea Ruins
-- NPC: ??? (Spawn Armed Gears(ZNM T3))
-- @pos -42 -4 -169 72
-----------------------------------
package.loaded["scripts/zones/Alzadaal_Undersea_Ruins/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Alzadaal_Undersea_Ru... | gpl-3.0 |
msburgess3200/PERP | gamemodes/perp/entities/weapons/weapon_perp_binoculars/shared.lua | 1 | 2586 |
if SERVER then
AddCSLuaFile("shared.lua")
end
if CLIENT then
SWEP.PrintName = "Binoculars"
SWEP.Slot = 2
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
end
SWEP.Author = "RedMist"
SWEP.Instructions = "Left Click: Zoom"
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.ViewModelFlip = false
SWEP.Spa... | mit |
nehz/busted | busted/init.lua | 1 | 2784 | local function init(busted)
local block = require 'busted.block'(busted)
local file = function(file)
busted.wrap(file.run)
busted.publish({ 'file', 'start' }, file.name)
block.execute('file', file)
busted.publish({ 'file', 'end' }, file.name)
end
local describe = function(describe)
local p... | mit |
sajadaltaiee/Raobot | plugins/supergroup.lua | 1 | 78795 | --Begin supergrpup.lua
--Check members #Add supergroup
local function check_member_super(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
if success == 0 then
send_large_msg(receiver, "Promote me to admin first!")
end
for k,v in pairs(result)... | gpl-2.0 |
zhouxiaoxiaoxujian/skynet | lualib/skynet/datasheet/dump.lua | 20 | 6547 | --[[ file format
document :
int32 strtbloffset
int32 n
int32*n index table
table*n
strings
table:
int32 array
int32 dict
int8*(array+dict) type (align 4)
value*array
kvpair*dict
kvpair:
string k
value v
value: (union)
int32 integer
float real
int32 boolean
int32 table index
int32 st... | mit |
FFXIOrgins/FFXIOrgins | scripts/zones/Inner_Horutoto_Ruins/npcs/_5c0_.lua | 36 | 1765 | -----------------------------------
-- Area: Inner Horutoto Ruins
-- NPC: Mahogany Door
-- Involved In Quest: Making Headlines
-- Working 100%
-- Unable to find EventID for Making Headlines quest. Used dialog ID instead.
-----------------------------------
package.loaded["scripts/zones/Inner_Horutoto_Ruins/Te... | gpl-3.0 |
msburgess3200/PERP | gamemodes/perp/gamemode/sv_modules/job_medic.lua | 1 | 3760 |
GM.JobPaydayInfo[TEAM_MEDIC] = {"as a paycheck for being a paramedic.", 100};
GM.JobEquips[TEAM_MEDIC] = function ( Player )
Player:Give("weapon_perp_paramedic_defib");
Player:Give("weapon_perp_paramedic_health");
end
function GM.Medic_Join ( Player )
if (Player:HasBlacklist(GAMEMODE.teamToBlacklist[TEAM_MEDIC]... | mit |
daofeng2015/luci | libs/luci-lib-nixio/docsrc/nixio.File.lua | 173 | 4457 | --- Large File Object.
-- Large file operations are supported up to 52 bits if the Lua number type is
-- double (default).
-- @cstyle instance
module "nixio.File"
--- Write to the file descriptor.
-- @class function
-- @name File.write
-- @usage <strong>Warning:</strong> It is not guaranteed that all data
-- in the bu... | apache-2.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Port_San_dOria/npcs/Dabbio.lua | 38 | 1036 | -----------------------------------
-- Area: Port San d'Oria
-- NPC: Dabbio
-- Type: Standard NPC
-- @zone: 232
-- @pos -7.819 -15 -106.990
--
-- Auto-Script: Requires Verification (Verified by Brawndo)
-----------------------------------
package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil;
-------------... | gpl-3.0 |
hb9cwp/snabbswitch | lib/ljsyscall/syscall/linux/c.lua | 10 | 40227 | -- This sets up the table of C functions
-- this should be generated ideally, as it is the ABI spec
--[[
Note a fair number are being deprecated, see include/uapi/asm-generic/unistd.h under __ARCH_WANT_SYSCALL_NO_AT, __ARCH_WANT_SYSCALL_NO_FLAGS, and __ARCH_WANT_SYSCALL_DEPRECATED
Some of these we already don't use, ... | apache-2.0 |
xToken/CompMod | lua/CompMod/Weapons/Marine/FlameCloud/shared.lua | 1 | 8800 | -- Natural Selection 2 Competitive Mod
-- Source located at - https://github.com/xToken/CompMod
-- lua\CompMod\Weapons\Marine\FlameCloud\shared.lua
-- - Dragon
Script.Load("lua/TeamMixin.lua")
Script.Load("lua/OwnerMixin.lua")
Script.Load("lua/DamageMixin.lua")
Script.Load("lua/EffectsMixin.lua")
Script.Load("lua/Enti... | mit |
FFXIOrgins/FFXIOrgins | scripts/zones/Cloister_of_Flames/Zone.lua | 32 | 1663 | -----------------------------------
--
-- Zone: Cloister_of_Flames (207)
--
-----------------------------------
package.loaded["scripts/zones/Cloister_of_Flames/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/zones/Cloister_of_Flames/TextIDs");
---... | gpl-3.0 |
lordporya1/lord | plugins/banhammer.lua | 23 | 11188 | -- data saved to moderation.json
do
-- make sure to set with value that not higher than stats.lua
local NUM_MSG_MAX = 5 -- Max number of messages per TIME_CHECK seconds
local TIME_CHECK = 5
local function is_user_whitelisted(id)
local hash = 'whitelist:user#id'..id
local white = redis:get(hash) or false
return... | gpl-2.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/spells/valor_minuet_ii.lua | 4 | 1590 | -----------------------------------------
-- Spell: Valor Minuet II
-- Grants Attack bonus to all allies.
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function OnMagicCastingC... | gpl-3.0 |
tobiebooth/nodemcu-firmware | lua_modules/ds3231/ds3231-web.lua | 84 | 1338 | require('ds3231')
port = 80
-- ESP-01 GPIO Mapping
gpio0, gpio2 = 3, 4
days = {
[1] = "Sunday",
[2] = "Monday",
[3] = "Tuesday",
[4] = "Wednesday",
[5] = "Thursday",
[6] = "Friday",
[7] = "Saturday"
}
months = {
[1] = "January",
[2] = "Febuary",
[3] = "March",
[4] = "Apri... | mit |
elt11bot/seed-sup | plugins/MemberManager.lua | 44 | 9652 | local function is_user_whitelisted(id)
local hash = 'whitelist:user#id'..id
local white = redis:get(hash) or false
return white
end
local function is_chat_whitelisted(id)
local hash = 'whitelist:chat#id'..id
local white = redis:get(hash) or false
return white
end
local function kick_user(user_id, chat_id)... | gpl-2.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Cape_Teriggan/npcs/Voranbo-Natanbo_WW.lua | 6 | 3025 | -----------------------------------
-- Area: Cape Teriggan
-- NPC: Voranbo-Natanbo, W.W.
-- Type: Outpost Conquest Guards
-- @pos -185 7 -63 113
-----------------------------------
package.loaded["scripts/zones/Cape_Teriggan/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/conque... | gpl-3.0 |
TRIEXTEAM/TaylortTG | plugins/info.lua | 2 | 9024 | do
local ali_ghoghnoos = 100577715 --put your id here(BOT OWNER ID)
local function setrank(msg, name, value) -- setrank function
local hash = nil
if msg.to.type == 'chat' then
hash = 'rank:'..msg.to.id..':variables'
end
if hash then
redis:hset(hash, name, value)
return send_msg('chat#id'..msg.to.id, '... | gpl-2.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Yuhtunga_Jungle/npcs/Mupia_RK.lua | 8 | 2940 | -----------------------------------
-- Area: Yuhtunga Jungle
-- NPC: Mupia, R.K.
-- Border Conquest Guards
-- @pos -241.334 -1 478.602 123
-----------------------------------
package.loaded["scripts/zones/Yuhtunga_Jungle/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/conquest");
require... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/items/plate_of_tuna_sushi.lua | 35 | 1526 | -----------------------------------------
-- ID: 5150
-- Item: plate_of_tuna_sushi
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Health 20
-- Dexterity 3
-- Charisma 5
-- Accuracy % 15
-- Ranged ACC % 15
-- Sleep Resist 5
-----------------------------------------
require("s... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/weaponskills/herculean_slash.lua | 6 | 1565 | -----------------------------------
-- Herculean Slash
-- Great Sword weapon skill
-- Skill Level: 290
-- Paralyzes target. Duration of effect varies with TP.
-- Aligned with the Snow Gorget, Thunder Gorget & Breeze Gorget.
-- Aligned with the Snow Belt, Thunder Belt & Breeze Belt.
-- Element: Ice
-- Mo... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Mhaura/npcs/Pikini-Mikini.lua | 36 | 1448 | -----------------------------------
-- Area: Mhaura
-- NPC: Pikini-Mikini
-- Standard Merchant NPC
-- @pos -48 -4 30 249
-----------------------------------
package.loaded["scripts/zones/Mhaura/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/shop");
require("scripts/zones/Mhaur... | gpl-3.0 |
groupforspeed/TeleSniper | plugins/chat_bot.lua | 2 | 2038 |
local function run(msg)
if msg.text == "Mohammad" then
return "کی اسم سازندمو صدا زد؟"
end
if msg.text == "Umbrella" then
return "کیر tele sniper هم نیس"
end
if msg.text == "umbrella" then
return "کیر tele sniper هم نیس"
end
if msg.text == "Telesniper" then
return "hum?"
end
if msg.text == "اسپم" then
return "کس ... | gpl-2.0 |
vietlq/luasocket | etc/dict.lua | 59 | 4652 | -----------------------------------------------------------------------------
-- Little program to download DICT word definitions
-- LuaSocket sample files
-- Author: Diego Nehab
-- RCS ID: $Id: dict.lua,v 1.22 2005/11/22 08:33:29 diego Exp $
-----------------------------------------------------------------------------... | mit |
velukh/MplusLedger | Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua | 15 | 1959 | --[[-----------------------------------------------------------------------------
SimpleGroup Container
Simple container widget that just groups widgets.
-------------------------------------------------------------------------------]]
local Type, Version = "SimpleGroup", 20
local AceGUI = LibStub and LibStub("Ace... | mit |
FFXIOrgins/FFXIOrgins | scripts/zones/Yhoator_Jungle/npcs/Ilieumort_RK.lua | 8 | 2940 | -----------------------------------
-- Area: Yhoator Jungle
-- NPC: Ilieumort, R.K.
-- Outpost Conquest Guards
-- @pos 200.254 -1 -80.324 124
-----------------------------------
package.loaded["scripts/zones/Yhoator_Jungle/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/conquest");
requi... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/globals/mobskills/Glacier_Splitter.lua | 6 | 1085 | ---------------------------------------------
-- Glacier Splitter
--
-- Description: Cleaves into targets in a fan-shaped area. Additional effect: Paralyze
-- Type: Physical
-- Utsusemi/Blink absorb: 1-3 shadows
-- Range: Unknown cone
-- Notes: Only used the Aern wielding a sword (RDM, DRK, and PLD).
----... | gpl-3.0 |
FFXIOrgins/FFXIOrgins | scripts/zones/Port_San_dOria/npcs/Nogelle.lua | 36 | 2293 | -----------------------------------
-- Area: Port San d'Oria
-- NPC: Nogelle
-- Starts Lufet's Lake Salt
-----------------------------------
package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/quests");
require("scripts/globals/titles");
... | gpl-3.0 |
Mogara/QSanguosha | lua/ai/standard_cards-ai.lua | 5 | 119172 | --[[********************************************************************
Copyright (c) 2013-2014 - QSanguosha-Rara
This file is part of QSanguosha-Hegemony.
This game 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... | gpl-3.0 |
teahouse/FWServer | skynet/examples/login/client.lua | 67 | 3950 | package.cpath = "luaclib/?.so"
local socket = require "clientsocket"
local crypt = require "crypt"
if _VERSION ~= "Lua 5.3" then
error "Use lua 5.3"
end
local fd = assert(socket.connect("127.0.0.1", 8001))
local function writeline(fd, text)
socket.send(fd, text .. "\n")
end
local function unpack_line(text)
loca... | mit |
SegFault22/res | core/material.lua | 1 | 1260 | -- Code handling materials is found here
res_material_types = {}
res_materials = {}
function res.add_material_type(id,name)
table.insert(res_material_types,{id,name})
res.log("verbose","Added material class \""..name.."\" with id: "..id)
end
function res.add_material(type,id,name,strength,weight)
if res.list_fin... | gpl-2.0 |
hb9cwp/snabbswitch | lib/ljsyscall/test/linux-constants.lua | 18 | 9330 | -- test against clean set of kernel headers, standard set so cross platform.
--[[
luajit test/linux-constants.lua x64 > ./obj/c.c && cc -U__i386__ -DBITS_PER_LONG=64 -I./include/linux-kernel-headers/x86_64/include -o ./obj/c ./obj/c.c && ./obj/c
luajit test/linux-constants.lua x86 > ./obj/c.c && cc -D__i386__ -DBITS_P... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.