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 |
|---|---|---|---|---|---|
mattyx14/otxserver | data/monster/event_creatures/memory_creatures/memory_of_a_hero.lua | 2 | 3022 | local mType = Game.createMonsterType("Memory Of A Hero")
local monster = {}
monster.description = "a memory of a hero"
monster.experience = 1750
monster.outfit = {
lookType = 73,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.health = 3850
monster.maxHealth = 38... | gpl-2.0 |
mattyx14/otxserver | data/monster/vermins/sacred_spider.lua | 2 | 2641 | local mType = Game.createMonsterType("Sacred Spider")
local monster = {}
monster.description = "a sacred spider"
monster.experience = 330
monster.outfit = {
lookType = 219,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.raceId = 709
monster.Bestiary = {
class =... | gpl-2.0 |
rainfiel/skynet | lualib/skynet/coroutine.lua | 24 | 3131 | -- You should use this module (skynet.coroutine) instead of origin lua coroutine in skynet framework
local coroutine = coroutine
-- origin lua coroutine module
local coroutine_resume = coroutine.resume
local coroutine_yield = coroutine.yield
local coroutine_status = coroutine.status
local coroutine_running = coroutine... | mit |
CarabusX/Zero-K | units/hoverarty.lua | 3 | 4053 | return { hoverarty = {
unitname = [[hoverarty]],
name = [[Lance]],
description = [[Anti-Heavy Artillery Hovercraft]],
acceleration = 0.096,
activateWhenBuilt = true,
brakeRate = 1.776,
buildCostMetal = 1000,
builder = false,
buildPi... | gpl-2.0 |
MattMS/my_awesome_config | rc.lua | 1 | 1092 | local awful = require("awful")
--EDITOR = os.getenv("EDITOR") or "vi"
KEY = {
CONTROL = "Control",
LEFT = "Left",
RETURN = "Return",
RIGHT = "Right",
SHIFT = "Shift",
MOD = "Mod4"
}
SCREEN_COUNT = screen.count()
TAG_COUNT = 9
TERMINAL = "xterm"
global_keys = {}
local layouts = {
awful.layout.suit.max
}
... | mit |
mattyx14/otxserver | data/monster/quests/forgotten_knowledge/time_keeper.lua | 2 | 2156 | local mType = Game.createMonsterType("Time Keeper")
local monster = {}
monster.description = "a time keeper"
monster.experience = 0
monster.outfit = {
lookType = 560,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.health = 1000
monster.maxHealth = 1000
monster.r... | gpl-2.0 |
abgoyal/nodemcu-firmware | lua_examples/mcp23008/mcp23008_buttons.lua | 82 | 1801 | ---
-- @description Shows how to read 8 GPIO pins/buttons via I2C with the MCP23008 I/O expander.
-- Tested on NodeMCU 0.9.5 build 20150213.
-- @circuit
-- Connect GPIO0 of the ESP8266-01 module to the SCL pin of the MCP23008.
-- Connect GPIO2 of the ESP8266-01 module to the SDA pin of the MCP23008.
-- Use 3.3V fo... | mit |
CarabusX/Zero-K | LuaRules/Configs/bait_prevention_defs.lua | 6 | 1374 |
local baitLevelDefaults = {}
local targetBaitLevelDefs = {}
local targetBaitLevelArmorDefs = {}
local targetCostDefs = {}
local baitLevelCosts = {
10,
90 - 0.1,
240 - 0.1,
420 - 0.1,
}
-- Bait level one stops nanobaiting to a cost of 60.
-- Higher bait levels try to kill their low-threshold targets before comple... | gpl-2.0 |
mattyx14/otxserver | data/npc/Dan.lua | 2 | 2695 | local internalNpcName = "Dan"
local npcType = Game.createNpcType(internalNpcName)
local npcConfig = {}
npcConfig.name = internalNpcName
npcConfig.description = internalNpcName
npcConfig.health = 100
npcConfig.maxHealth = npcConfig.health
npcConfig.walkInterval = 2000
npcConfig.walkRadius = 2
npcConfig.outfit = {
lo... | gpl-2.0 |
mattyx14/otxserver | data/scripts/creaturescripts/others/offline_training.lua | 2 | 2552 | local offlineTraining = CreatureEvent("OfflineTraining")
function offlineTraining.onLogin(player)
local lastLogout = player:getLastLogout()
local offlineTime = lastLogout ~= 0 and math.min(os.time() - lastLogout, 86400 * 21) or 0
local offlineTrainingSkill = player:getOfflineTrainingSkill()
if offlineTrainingSkill ... | gpl-2.0 |
garrysmodlua/wire | lua/entities/gmod_wire_digitalscreen/init.lua | 1 | 8139 | AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
ENT.WireDebugName = "DigitalScreen"
function ENT:Initialize()
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self.Inputs = Wire_CreateInputs(self, { "PixelX", "PixelY", "PixelG", ... | apache-2.0 |
CarabusX/Zero-K | LuaUI/Widgets/gui_chili_nuke_warning.lua | 6 | 4748 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Chili Nuke Warning",
desc = "Displays a warning to players whenever a nuke is launched.",
... | gpl-2.0 |
CarabusX/Zero-K | effects/scanner.lua | 8 | 1436 | return {
["scanner_ping"] = {
usedefaultexplosions = false,
groundflash = {
alwaysvisible = false,
circlealpha = 0.1,
circlegrowth = 3.6,
flashalpha = 0.1,
flashsize = 600,
ttl = 90,
color = {
[1] = 0,
... | gpl-2.0 |
PeqNP/GameKit | specs/mediation.service_spec.lua | 1 | 2611 |
require "lang.Signal"
require "specs.Cocos2d-x"
require "json"
require "Logger"
Log.setLevel(LogLevel.Error)
require("HTTPResponseType")
local HTTP = require("shim.HTTP")
local Promise = require("Promise")
local MediationConfig = require("mediation.Config")
local MediationService = require("mediation.Service")
loca... | mit |
CarabusX/Zero-K | units/spiderassault.lua | 4 | 3323 | return { spiderassault = {
unitname = [[spiderassault]],
name = [[Hermit]],
description = [[All Terrain Assault Bot]],
acceleration = 0.54,
brakeRate = 1.32,
buildCostMetal = 150,
buildPic = [[spiderassault.png]],
ca... | gpl-2.0 |
CarabusX/Zero-K | units/staticarty.lua | 3 | 3871 | return { staticarty = {
unitname = [[staticarty]],
name = [[Cerberus]],
description = [[Plasma Artillery Battery - Power by connecting to a 50 energy grid]],
acceleration = 0,
activateWhenBuilt = true,
brakeRate ... | gpl-2.0 |
haswne/IRAQ_BOT | plugins/stats.lua | 3 | 4023 | 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 |
junkblocker/hammerspoon | extensions/osascript/test_applescript.lua | 5 | 1613 | function testAppleScriptParseError()
local as = "2 +"
local status, object, descriptor = hs.osascript.applescript(as)
assertFalse(status)
assertIsEqual(descriptor.OSAScriptErrorBriefMessageKey, "Expected expression but found end of script.")
return success()
end
function testAppleScriptAddition()
local as ... | mit |
kbara/snabb | src/lib/protocol/ipv4.lua | 2 | 6071 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local ffi = require("ffi")
local C = ffi.C
local lib = require("core.lib")
local header = require("lib.protocol.header")
local ipsum = require("lib.checksum").ipsum
local htons, ntohs, htonl, ntohl =
lib.htons... | apache-2.0 |
garrysmodlua/wire | lua/entities/gmod_wire_soundemitter.lua | 3 | 4831 | --[[
The Wire Sound Emitter emits a sound whose parameters can be tweaked.
See http://wiki.garrysmod.com/page/Category:CSoundPatch
--]]
AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Sound Emitter"
ENT.WireDebugName = "Sound Emitter"
if CLIENT then return end
local DefaultSamples... | apache-2.0 |
kbara/snabb | src/program/snabbvmx/query/query.lua | 2 | 4291 | module(..., package.seeall)
local counter = require("core.counter")
local ffi = require("ffi")
local lib = require("core.lib")
local ipv4 = require("lib.protocol.ipv4")
local ethernet = require("lib.protocol.ethernet")
local lwtypes = require("apps.lwaftr.lwtypes")
local lwutil = require("apps.lwaftr.lwutil")
local sh... | apache-2.0 |
haswne/IRAQ_BOT | libs/fakeredis.lua | 650 | 40405 | local unpack = table.unpack or unpack
--- Bit operations
local ok,bit
if _VERSION == "Lua 5.3" then
bit = (load [[ return {
band = function(x, y) return x & y end,
bor = function(x, y) return x | y end,
bxor = function(x, y) return x ~ y end,
bnot = function(x) return ~x end,
rshift = function(x... | gpl-2.0 |
Frownigami1/cuberite | Server/Plugins/APIDump/Hooks/OnHopperPullingItem.lua | 44 | 1336 | return
{
HOOK_HOPPER_PULLING_ITEM =
{
CalledWhen = "A hopper is pulling an item from another block entity.",
DefaultFnName = "OnHopperPullingItem", -- also used as pagename
Desc = [[
This callback is called whenever a {{cHopperEntity|hopper}} transfers an {{cItem|item}} from another
block entity into its... | apache-2.0 |
rainfiel/skynet | lualib/sharedata/corelib.lua | 64 | 2453 | local core = require "sharedata.core"
local type = type
local next = next
local rawget = rawget
local conf = {}
conf.host = {
new = core.new,
delete = core.delete,
getref = core.getref,
markdirty = core.markdirty,
incref = core.incref,
decref = core.decref,
}
local meta = {}
local isdirty = core.isdirty
local... | mit |
mattyx14/otxserver | data/monster/lycanthropes/wereboar.lua | 2 | 3571 | local mType = Game.createMonsterType("Wereboar")
local monster = {}
monster.description = "a wereboar"
monster.experience = 2000
monster.outfit = {
lookType = 721,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.raceId = 1143
monster.Bestiary = {
class = "Lycant... | gpl-2.0 |
CarabusX/Zero-K | units/amphsupport.lua | 3 | 5121 | return { amphsupport = {
unitname = [[amphsupport]],
name = [[Bulkhead]],
description = [[Deployable Amphibious Fire Support (must stop to fire)]],
acceleration = 0.4,
activateWhenBuilt = true,
brakeRate = 2.4,
buildCostMetal =... | gpl-2.0 |
iggyvolz/FM-Bot | writer.lua | 1 | 1128 | local board,lfs,found=require "api",require "lfs",false
for x,i in ipairs(board.pmnums) do
found=false
for file in lfs.dir("./cache/pms") do
if tostring(i)==file then
found=true
end
end
if not found then
local r=board:readpm(i)
if r then
assert(lfs.mkdir("./cache/pms/"..i))
lo... | gpl-3.0 |
amirhosein2233/uzzbot | 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 |
mattyx14/otxserver | data/monster/quests/cults_of_tibia/bosses/malkhar_deathbringer.lua | 2 | 2100 | local mType = Game.createMonsterType("Malkhar Deathbringer")
local monster = {}
monster.description = "Malkhar Deathbringer"
monster.experience = 0
monster.outfit = {
lookType = 134,
lookHead = 19,
lookBody = 94,
lookLegs = 41,
lookFeet = 57,
lookAddons = 0,
lookMount = 0
}
monster.health = 30000
monster.maxHe... | gpl-2.0 |
Quit/jelly | lib/util.lua | 1 | 13822 | --[=============================================================================[
The MIT License (MIT)
Copyright (c) 2014 RepeatPan
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 restri... | mit |
mnemnion/loon | src/mods/peg/rule-sort.lua | 1 | 3125 | -- Rule Sorting module.
local clu = require "clu/prelude"
Set = require "set" -- todo: remove penlight dependency
-- This entire module is wrongly conceived.
-- If we track recursion properly, all values become symbols, because all values
-- are touched by the top rule, which is presumably recursive.
-- What we ne... | mit |
luciouskami/YDWE | Development/Component/plugin/w3x2lni/script/backend/sandbox.lua | 2 | 4039 | local function standard(loaded)
local r = {}
for _, s in ipairs {
--'package',
'coroutine',
'table',
--'io',
'os',
'string',
'math',
'utf8',
'debug',
} do
r[s] = _G[s]
loaded[s] = _G[s]
end
for _, s in ipairs {
... | gpl-3.0 |
mumuqz/luci | applications/luci-app-statistics/luasrc/statistics/i18n.lua | 39 | 1879 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.i18n", package.seeall)
require("luci.util")
require("luci.i18n")
Instance = luci.util.class()
function Instance.__init__( self, graph )
self.i18n = luci.i18n
se... | apache-2.0 |
mattyx14/otxserver | data/monster/quests/cults_of_tibia/bosses/summons/security_golem.lua | 2 | 2250 | local mType = Game.createMonsterType("Security Golem")
local monster = {}
monster.description = "a secutiry golem"
monster.experience = 2750
monster.outfit = {
lookType = 326,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.health = 6500
monster.maxHealth = 6500
... | gpl-2.0 |
Makanam/CycloneTG | libs/redis.lua | 566 | 1214 | local Redis = require 'redis'
local FakeRedis = require 'fakeredis'
local params = {
host = os.getenv('REDIS_HOST') or '127.0.0.1',
port = tonumber(os.getenv('REDIS_PORT') or 6379)
}
local database = os.getenv('REDIS_DB')
local password = os.getenv('REDIS_PASSWORD')
-- Overwrite HGETALL
Redis.commands.hgetall = ... | gpl-2.0 |
Turttle/darkstar | scripts/globals/items/chunk_of_goblin_chocolate.lua | 35 | 1343 | -----------------------------------------
-- ID: 4495
-- Item: chunk_of_goblin_chocolate
-- Food Effect: 3Min, All Races
-----------------------------------------
-- Charisma -5
-- Health Regen While Healing 5
-- Lizard Killer 5
-----------------------------------------
require("scripts/globals/status");
... | gpl-3.0 |
dickeyf/darkstar | scripts/zones/Bastok_Mines/npcs/Deadly_Spider.lua | 33 | 1388 | -----------------------------------
-- Area: Bastok Mines
-- NPC: Deadly Spider
-- Involved in Quest: Stamp Hunt
-----------------------------------
package.loaded["scripts/zones/Bastok_Mines/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/quests");
require("scripts/zones/Bastok_Mines/Tex... | gpl-3.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c1828513.lua | 5 | 1713 | --六武衆の影-紫炎
function c1828513.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3d),4,2)
c:EnableReviveLimit()
--attack up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(1828513,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:S... | gpl-2.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c38247752.lua | 2 | 1277 | --ダーク・アイズ・イリュージョニスト
function c38247752.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(38247752,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c38247752.target)
e1:SetOperation(c38247752.operation)
c:RegisterEf... | gpl-2.0 |
puug/kong | kong/dao/cassandra/plugins_configurations.lua | 1 | 3283 | local plugins_configurations_schema = require "kong.dao.schemas.plugins_configurations"
local constants = require "kong.constants"
local BaseDao = require "kong.dao.cassandra.base_dao"
local cjson = require "cjson"
local PluginsConfigurations = BaseDao:extend()
function PluginsConfigurations:new(properties)
self._e... | mit |
SalvationDevelopment/Salvation-Scripts-TCG | c89810518.lua | 5 | 1659 | --レプティレス・メデューサ
function c89810518.initial_effect(c)
--atk change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(89810518,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c89810518.cost)
e1:SetT... | gpl-2.0 |
dickeyf/darkstar | scripts/zones/Port_Windurst/npcs/Panja-Nanja.lua | 53 | 1909 | -----------------------------------
-- Area: Port Windurst
-- NPC: Panja-Nanja
-- Type: Fishing Adv. Image Support
-- @pos -194.499 -3 58.692 240
-----------------------------------
package.loaded["scripts/zones/Port_Windurst/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/status");
requ... | gpl-3.0 |
Turttle/darkstar | scripts/zones/Norg/npcs/Heiji.lua | 17 | 3132 | -----------------------------------
-- Area: Norg
-- NPC: Heiji
-- Starts and Ends Quest: Like a Shining Subligar
-- @pos -1 -5 25 252
-----------------------------------
package.loaded["scripts/zones/Norg/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scr... | gpl-3.0 |
Turttle/darkstar | scripts/zones/Quicksand_Caves/TextIDs.lua | 7 | 1486 | -- Variable TextID Description text
-- General Texts
ITEM_CANNOT_BE_OBTAINED = 6379; -- You cannot obtain the item <item> come back again after sorting your inventory
ITEM_OBTAINED = 6383; -- Obtained: <item>
GIL_OBTAINED = 6384; -- Obtained <number> gil
KEYITEM_OBTAINED = 6386; -- Obtain... | gpl-3.0 |
eugeneia/snabb | lib/luajit/testsuite/test/lang/meta/index.lua | 6 | 1077 | do --- table 1
local t=setmetatable({}, {__index=function(t,k)
return 100-k
end})
for i=1,100 do assert(t[i] == 100-i) end
for i=1,100 do t[i] = i end
for i=1,100 do assert(t[i] == i) end
for i=1,100 do t[i] = nil end
for i=1,100 do assert(t[i] == 100-i) end
end
do --- table 2
local x
local t2... | apache-2.0 |
Turttle/darkstar | scripts/zones/Uleguerand_Range/npcs/HomePoint#1.lua | 19 | 1189 | -----------------------------------
-- Area: Uleguerand_Range
-- NPC: HomePoint#1
-- @pos
-----------------------------------
package.loaded["scripts/zones/Uleguerand_Range/TextIDs"] = nil;
require("scripts/globals/settings");
require("scripts/zones/Uleguerand_Range/TextIDs");
require("scripts/globals/homepoint");
... | gpl-3.0 |
Turttle/darkstar | scripts/zones/Windurst_Waters/npcs/Cochal-Monchal.lua | 17 | 1589 | -----------------------------------
-- Area: Windurst Waters
-- NPC: Cochal-Monchal
-- Involved in Quest: Dark Legacy
-- @zone 238
-- @pos -52 -6 110
-----------------------------------
package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil;
-----------------------------------
require("scripts/global... | gpl-3.0 |
eugeneia/snabb | src/core/histogram.lua | 6 | 4743 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
-- histogram.lua -- a histogram with logarithmic buckets
module(...,package.seeall)
local ffi = require("ffi")
local shm = require("core.shm")
local log, floor, max, min = math.log, math.floor, math.max, math.min
type = shm.register('his... | apache-2.0 |
dickeyf/darkstar | scripts/globals/weaponskills/tachi_yukikaze.lua | 11 | 1731 | -----------------------------------
-- Tachi Yukikaze
-- Great Katana weapon skill
-- Skill Level: 200 (Samurai only.)
-- Blinds target. Damage varies with TP.
-- Blind effect duration is 60 seconds when unresisted.
-- Will stack with Sneak Attack.
-- Tachi: Yukikaze appears to have an attack bonus of 50%. http://www.b... | gpl-3.0 |
Turttle/darkstar | scripts/zones/Cloister_of_Frost/TextIDs.lua | 7 | 1042 | -- Variable TextID Description text
-- General Texts
ITEM_CANNOT_BE_OBTAINED = 6379; -- You cannot obtain the item <item> come back again after sorting your inventory
ITEM_OBTAINED = 6383; -- Obtained: <item>
GIL_OBTAINED = 6384; -- Obtained <number> gil
KEYITEM_OBTAINED = 6386; -- Obtain... | gpl-3.0 |
dickeyf/darkstar | scripts/globals/items/homemade_rice_ball.lua | 18 | 1105 | -----------------------------------------
-- ID: 5224
-- Item: homemade_rice_ball
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Dexterity 1
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnItemCheck
------------... | gpl-3.0 |
dickeyf/darkstar | scripts/globals/items/dish_of_spaghetti_melanzane.lua | 18 | 1386 | -----------------------------------------
-- ID: 5213
-- Item: dish_of_spaghetti_melanzane
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Health % 25
-- Health Cap 100
-- Vitality 2
-- Store TP 4
-----------------------------------------
require("scripts/globals/status");
--------------... | gpl-3.0 |
Turttle/darkstar | scripts/globals/items/dragon_heart.lua | 18 | 1502 | -----------------------------------------
-- ID: 4486
-- Item: Dragon Heart
-- Food Effect: 3 Hr, Galka Only
-----------------------------------------
-- Strength 7
-- Intelligence -9
-- MP -40
-- HP 40
-- Dragon Killer 10
-----------------------------------------
require("scripts/globals/status");
------------------... | gpl-3.0 |
takke/MZ3 | src_lib/lua/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | bsd-3-clause |
splitice/redis | deps/lua/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | bsd-3-clause |
SalvationDevelopment/Salvation-Scripts-TCG | c58069384.lua | 5 | 4266 | --サイバー・ドラゴン・ノヴァ
function c58069384.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),5,2)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58069384,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT... | gpl-2.0 |
szogi/packages | net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua | 82 | 4185 | -- ------ extra functions ------ --
function ruleCheck() -- determine if rule needs a protocol specified
local sourcePort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".src_port"))
local destPort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".dest_port"))
if sourcePort ~= "" or d... | gpl-2.0 |
puug/kong | kong/cli/utils/utils.lua | 1 | 4316 | --[[
Kong CLI utilities
- Logging
- Luarocks helpers
]]
local ansicolors = require "ansicolors"
local constants = require "kong.constants"
local Object = require "classic"
local lpath = require "luarocks.path"
local IO = require "kong.tools.io"
--
-- Colors
--
local colors = {}
for _, v in ipairs({"red", "green", "... | mit |
dickeyf/darkstar | scripts/zones/Southern_San_dOria/npcs/Diary.lua | 13 | 2150 | -----------------------------------
-- Area: Northern San d'Oria
-- NPC: Diary
-- Involved in Quest: To Cure a Cough
-- @zone 230
-- @pos -75 -12 65
-----------------------------------
package.loaded["scripts/zones/Southern_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settin... | gpl-3.0 |
fgenesis/Aquaria_experimental | game_scripts/scripts/entities/collectiblearnassistatue.lua | 6 | 1427 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria 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 option) any later vers... | gpl-2.0 |
dickeyf/darkstar | scripts/globals/weaponskills/heavy_swing.lua | 11 | 1335 | -----------------------------------
-- Heavy Swing
-- Staff weapon skill
-- Skill Level: 5
-- Deacription:Delivers a single-hit attack. Damage varies with TP.
-- Will stack with Sneak Attack.
-- Aligned with the Thunder Gorget.
-- Aligned with the Thunder Belt.
-- Element: None
-- Modifiers: STR:30%
-- 100%TP 200%TP... | gpl-3.0 |
dickeyf/darkstar | scripts/globals/items/serving_of_bavarois_+1.lua | 18 | 1196 | -----------------------------------------
-- ID: 5730
-- Item: Serving of Bavarois +1
-- Food Effect: 4 Hrs, All Races
-----------------------------------------
-- HP 25
-- Intelligence 4
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnItemCh... | gpl-3.0 |
dickeyf/darkstar | scripts/zones/Inner_Horutoto_Ruins/npcs/_5cu.lua | 13 | 2537 | -----------------------------------
-- Area: Inner Horutoto Ruins
-- NPC: _5cu (Magical Gizmo) #6
-- Involved In Mission: The Horutoto Ruins Experiment
-----------------------------------
package.loaded["scripts/zones/Inner_Horutoto_Ruins/TextIDs"] = nil;
-----------------------------------
require("scripts/... | gpl-3.0 |
Turttle/darkstar | scripts/zones/Tavnazian_Safehold/npcs/Pradiulot.lua | 17 | 2408 | -----------------------------------
-- Area: Tavnazian Safehold
-- NPC: Pradiulot
-- Involved in Quest: Unforgiven
-- @zone 26
-- @pos -20.814 -22 8.399
-----------------------------------
package.loaded["scripts/zones/Tavnazian_Safehold/TextIDs"] = nil;
-----------------------------------
require("scripts/zon... | gpl-3.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c43002864.lua | 7 | 1160 | --レプティレス・ガードナー
function c43002864.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43002864,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c43002864.condition)
e1:SetTarg... | gpl-2.0 |
scanon/narrative | docker/resty/url.lua | 9 | 10522 | -----------------------------------------------------------------------------
-- URI parsing, composition and relative URL resolution
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: url.lua,v 1.38 2006/04/03 04:45:42 diego Exp $
-----------------------------------------------------------------------------
... | mit |
Andrew-Collins/nodemcu-firmware | lua_examples/email/read_email_imap.lua | 82 | 4543 | ---
-- Working Example: https://www.youtube.com/watch?v=PDxTR_KJLhc
-- @author Miguel (AllAboutEE.com)
-- @description This example will read the first email in your inbox using IMAP and
-- display it through serial. The email server must provided unecrypted access. The code
-- was tested with an AOL and Time Warner c... | mit |
eugeneia/snabb | src/program/lwaftr/quickcheck/utils.lua | 10 | 3042 | module(...,package.seeall)
local S = require("syscall")
function gmtime()
local tv = S.gettimeofday()
local secs = tonumber(tv.tv_sec)
secs = secs + tonumber(tv.tv_usec) * 1e-6
return secs
end
function concat(a, b)
local ret = {}
for _, v in ipairs(a) do table.insert(ret, v) end
for _, v in ipai... | apache-2.0 |
dickeyf/darkstar | scripts/zones/La_Vaule_[S]/mobs/Lobison.lua | 12 | 1690 | -----------------------------------
-- Area: La Vaule (S)
-- NPC: Lobison
-----------------------------------
-----------------------------------
-- onMobSpawn Action
-----------------------------------
function onMobSpawn(mob)
mob:setLocalVar("transformTime", os.time())
end;
-----------------------------------
... | gpl-3.0 |
fgenesis/Aquaria_experimental | game_scripts/scripts/maps/node_kingjellyactivate.lua | 6 | 1459 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria 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 option) any later vers... | gpl-2.0 |
mika6020/powerbot | plugins/all.lua | 184 | 4452 | 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... | agpl-3.0 |
dickeyf/darkstar | scripts/zones/Davoi/npcs/Hide_Flap.lua | 13 | 2838 | -----------------------------------
-- Area: Davoi
-- NPC: Hide Flap
-- Involved in Quest: The Doorman, The First Meeting
-- @pos 293 3 -213 149 (WAR)(K-9)
-- @pos -124 3 -43 149 (MNK)(F-7)
-----------------------------------
package.loaded["scripts/zones/Davoi/TextIDs"] = nil;
-----------------------------------
re... | gpl-3.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c13361027.lua | 5 | 1614 | --ドラグニティ-ブラックスピア
function c13361027.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13361027,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:... | gpl-2.0 |
dickeyf/darkstar | scripts/zones/Ordelles_Caves/npcs/qm3.lua | 13 | 1628 | -----------------------------------
-- Area: Ordelle's Caves
-- NPC: ??? (qm3)
-- Involved in Quest: A Squire's Test II
-- @pos -139 0.1 264 193
-------------------------------------
package.loaded["scripts/zones/Ordelles_Caves/TextIDs"] = nil;
-------------------------------------
require("scripts/globals/settings")... | gpl-3.0 |
dickeyf/darkstar | scripts/zones/Al_Zahbi/npcs/Krujaal.lua | 13 | 1039 | -----------------------------------
-- Area: Al Zahbi
-- NPC: Krujaal
-- Type: Residence Renter
-- @zone: 48
-- @pos 36.522 -1 -63.198
--
-- Auto-Script: Requires Verification (Verified by Brawndo)
-----------------------------------
package.loaded["scripts/zones/Al_Zahbi/TextIDs"] = nil;
-------------------------... | gpl-3.0 |
Turttle/darkstar | scripts/globals/mobskills/Psychomancy.lua | 13 | 1127 | ---------------------------------------------------
-- Psychomancy
-- Steals MP from players in range.
-- Type: Magical
-- Utsusemi/Blink absorb: ignore shadow
---------------------------------------------------
require("scripts/globals/settings");
require("scripts/globals/status");
require("scripts/globals/monstertpm... | gpl-3.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c18027138.lua | 2 | 2220 | --カバーカーニバル
function c18027138.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c18027138.target)
e1:SetOperation(c18027138.activate)
c:RegisterEffe... | gpl-2.0 |
dickeyf/darkstar | scripts/zones/Port_San_dOria/npcs/Solgierte.lua | 13 | 1357 | -----------------------------------
-- Area: Port San d'Oria
-- NPC: Solgierte
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/quests");
require("scripts/zones/Port_San_dOria/TextIDs");
... | gpl-3.0 |
dickeyf/darkstar | scripts/globals/items/silken_siesta.lua | 18 | 1238 | -----------------------------------------
-- ID: 5626
-- Item: Silken Siesta
-- Food Effect: 4 Hrs, All Races
-----------------------------------------
-- TODO: Group Effect
-- HP Recoverd while healing 2
-- MP Recovered while healing 5
-----------------------------------------
require("scripts/globals/status");
----... | gpl-3.0 |
dickeyf/darkstar | scripts/zones/QuBia_Arena/TextIDs.lua | 15 | 1428 | -- Variable TextID Description text
-- General Texts
ITEM_CANNOT_BE_OBTAINED = 6379; -- You cannot obtain the item <item>. Come back after sorting your inventory.
ITEM_OBTAINED = 6384; -- Obtained: <item>.
GIL_OBTAINED = 6385; -- Obtained <number> gil.
KEYITEM_OBTAINED = 6387; -- Obtained... | gpl-3.0 |
Turttle/darkstar | scripts/globals/weaponskills/stardiver.lua | 30 | 1549 | -----------------------------------
-- Stardiver
-- Polearm weapon skill
-- Skill Level: MERIT
-- Delivers a fourfold attack. Damage varies with TP.
-- Will stack with Sneak Attack. reduces params.crit hit evasion by 5%
-- Element: None
-- Modifiers: STR:73~85%
-- 100%TP 200%TP 300%TP
-- 0.75 1.25 ... | gpl-3.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c25700114.lua | 2 | 2748 | --ダストンローラー
function c25700114.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c25700114.target)
e1:SetOperation(c25700114.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.Crea... | gpl-2.0 |
Turttle/darkstar | scripts/zones/North_Gustaberg_[S]/npcs/Barricade.lua | 19 | 1108 | -----------------------------------
-- Area: North Gustaberg (S) (I-6)
-- NPC: Barricade
-- Involved in Quests: The Fighting Fourth
-----------------------------------
package.loaded["scripts/zones/North_Gustaberg_[S]/TextIDs"] = nil;
package.loaded["scripts/globals/quests"] = nil;
-----------------------------------
... | gpl-3.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c100000030.lua | 2 | 1525 | --次元均衡
function c100000030.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c100000030.condition)
e1:SetTarget(c100000030.target)
e1:SetOperation(c100000030.act... | gpl-2.0 |
patrikrm13/bostg | plugins/linkpv.lua | 107 | 31031 | 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 |
Turttle/darkstar | scripts/zones/Tavnazian_Safehold/npcs/Caiphimonride.lua | 37 | 1316 | -----------------------------------
-- Area: Tavnazian Safehold
-- NPC: Caiphimonride
-- Standard Merchant NPC
-----------------------------------
require("scripts/globals/shop");
package.loaded["scripts/zones/Tavnazian_Safehold/TextIDs"] = nil;
require("scripts/zones/Tavnazian_Safehold/TextIDs");
---------... | gpl-3.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c49702428.lua | 6 | 1069 | --黒・魔・導・爆・裂・破
function c49702428.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c49702428.condition)
e1:SetTarget(c49702428.target)
e1:SetOperation(c49702428.activate)
c:RegisterEffect(e... | gpl-2.0 |
Turttle/darkstar | scripts/globals/spells/sheepfoe_mambo.lua | 18 | 1578 | -----------------------------------------
-- Spell: Sheepfoe Mambo
-- Grants evasion bonus to all members.
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function onMagicCastingCheck(caste... | gpl-3.0 |
Turttle/darkstar | scripts/globals/spells/bluemagic/enervation.lua | 18 | 2037 | -----------------------------------------
-- Spell: Enervation
-- Lowers the defense and magical defense of enemies within range
-- Spell cost: 48 MP
-- Monster Type: Beastmen
-- Spell Type: Magical (Dark)
-- Blue Magic Points: 5
-- Stat Bonus: HP-5, MP+5
-- Level: 67
-- Casting Time: 6 seconds
-- Recast Time... | gpl-3.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c36405256.lua | 2 | 2032 | --時花の魔女-フルール・ド・ソルシエール
function c36405256.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36405256,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCC... | gpl-2.0 |
Turttle/darkstar | scripts/zones/Navukgo_Execution_Chamber/Zone.lua | 28 | 1358 | -----------------------------------
--
-- Zone: Navukgo_Execution_Chamber (64)
--
-----------------------------------
package.loaded["scripts/zones/Navukgo_Execution_Chamber/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/zones/Navukgo_Execution_Chamb... | gpl-3.0 |
ctallec/bigart | utils/storagePolicy.lua | 1 | 1952 | local classic = require 'classic'
local StoragePolicy = classic.class("StoragePolicy")
function StoragePolicy:_init(opts)
self.memoryAllocation = opts.memoryAllocation
self.C = {}
self.D = {}
end
function StoragePolicy:addTimestep()
local t = #self.C + 1
self.C[t] = {}
self.D[t] = {}
self.... | mit |
erictheredsu/eric_git | MGCN/wow/WTF/Account/AAAA/Mangoscn/Good/SavedVariables/dct.lua | 1 | 20729 |
DCT_SAVE_PERCHAR = {
["DCT_SHOWHITCRIT"] = {
["show"] = {
"-#am", -- [1]
"-#am (#bt)", -- [2]
},
["per"] = 0,
["fEff"] = 2,
["color"] = {
1, -- [1]
0, -- [2]
0, -- [3]
},
["frame"] = 1,
["colorEx"] = {
{
1, -- [1]
1, -- [2]
0, -- [3]
}, -- [1]
{
1, -- [1]
1,... | gpl-3.0 |
dickeyf/darkstar | scripts/zones/Abyssea-Grauberg/npcs/qm13.lua | 17 | 1364 | -----------------------------------
-- Zone: Abyssea-Grauberg
-- NPC: ???
-- Spawns: Azdaja
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/keyitems");
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(playe... | gpl-3.0 |
dickeyf/darkstar | scripts/zones/Monarch_Linn/bcnms/ancient_vows.lua | 13 | 1921 | -----------------------------------
-- Area: Monarch Linn
-- Name: Ancient Vows
-----------------------------------
require("scripts/globals/titles");
require("scripts/globals/missions");
-- After registering the BCNM via bcnmRegister(bcnmid)
function onBcnmRegister(player,instance)
end;
-- Physically entering the ... | gpl-3.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c28553439.lua | 2 | 2224 | --ディメンション・マジック
function c28553439.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0)
e1:SetCondition(c28553439.condit... | gpl-2.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c83755611.lua | 2 | 3495 | --輝竜星-ショウフク
function c83755611.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_WYRM),1)
c:EnableReviveLimit()
--mat check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c83755611.matcheck)
c:RegisterEff... | gpl-2.0 |
lpberg/lua-gnuplot | example.lua | 1 | 1478 | #! /usr/bin/env lua
local gp = require('gnuplot')
-- gp.bin = '/usr/local/bin/mygnuplot'
local g = gp{
-- all optional, with sane defaults
width = 640,
height = 480,
xlabel = "X axis",
ylabel = "Y axis",
key = "top left",
consts = {
gamma = 2.5
},
data = {
... | mit |
SalvationDevelopment/Salvation-Scripts-TCG | c98954106.lua | 4 | 1480 | --貪欲な瓶
function c98954106.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,98954106+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c98954106.ta... | gpl-2.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c21481146.lua | 2 | 1097 | --閃光のバリア-シャイニング・フォース-
function c21481146.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c21481146.condition)
e1:SetTarget(c21481146.target)
e1:SetOperation(c21481146.activate)
c:Reg... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.