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
sundream/gamesrv
3rd/lua-cjson/tests/bench.lua
145
3247
#!/usr/bin/env lua -- This benchmark script measures wall clock time and should be -- run on an unloaded system. -- -- Your Mileage May Vary. -- -- Mark Pulford <mark@kyne.com.au> local json_module = os.getenv("JSON_MODULE") or "cjson" require "socket" local json = require(json_module) local util = require "cjson.ut...
gpl-2.0
v13inc/mal
lua/step9_try.lua
3
5828
#!/usr/bin/env lua local table = require('table') local readline = require('readline') local utils = require('utils') local types = require('types') local reader = require('reader') local printer = require('printer') local Env = require('env') local core = require('core') local List, Vector, HashMap = types.List, typ...
mpl-2.0
Sour/pfUI
env/translations_ruRU.lua
1
33032
pfUI_translation["ruRU"] = { ["40y-Range Check Interval"] = "Проверка диапазона 40 ярдов", ["Abbreviate Numbers (4200 -> 4.2k)"] = "Сокращать числа (4200 -> 4.2k)", ["Abort"] = "Прервать", ["Action Bar Border Size"] = "Размер бордюра панели действий", ["Actionbar"] = "Панель действий", ["Active Addons"] = "...
mit
Synesso/google-diff-match-patch
lua/diff_match_patch.lua
265
73869
--[[ * Diff Match and Patch * * Copyright 2006 Google Inc. * http://code.google.com/p/google-diff-match-patch/ * * Based on the JavaScript implementation by Neil Fraser. * Ported to Lua by Duncan Cross. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance ...
apache-2.0
promptcode/CoronaDatabaseManager
external/xml.lua
2
3667
module(..., package.seeall) --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -- -- xml.lua - XML parser for use with the Corona SDK. -- -- version: 1.1 -- -- CHANGELOG: -- -- 1.1 - Fixed base directory is...
bsd-3-clause
facebokiii/facebookplug
plugins/sik.lua
1
6872
local function sik_user(user_id, chat_id) local chat = 'chat#id'..chat_id local user = 'user#id'..user_id chat_del_user(chat, user, ok_cb, true) end local function siktir_user(user_id, chat_id) -- Save to redis local hash = 'siktired:'..chat_id..':'..user_id redis:set(hash, true) -- Sik from chat sik_...
gpl-2.0
davidkazlauskas/safelists
src/lua/settings.lua
1
2661
JSON = require('JSON') function JSON:onDecodeError(message,text,location,etc) -- http://replygif.net/i/828.gif end PersistentSettings = { -- saveFunction - (to call with json when saving) -- loadFunction - (called once in creation with function -- to update the object with json) new = function(sa...
gpl-2.0
jlsandell/foursquarepp
examples/premake.lua
1
3409
-- Project ---------------------------------------------------------------------------------- project.name = "examples" project.bindir = "." -- Package ---------------------------------------------------------------------------------- example_checkin = newpackage() example_checkin.name = "example_checkin" example_...
mit
Lynx3d/tinker_tools
Modules/Selections.lua
2
3136
local Dta = select(2, ...) Dta.Selections = {} Dta.Selections.saved = {} function Dta.Selections.PickupClicked() Dta.ui.showConfirmation(Dta.Locale.Text.ConfirmPickup, Dta.Selections.PickupSelection, nil, nil) end function Dta.Selections.PickupSelection() for id, details in pairs(Dta.selectedItems) do Dta.items....
bsd-3-clause
makanishere/CycloneTG
plugins/settings.lua
2
32618
-------------------------------------------------- -- ____ ____ _____ -- -- | \| _ )_ _|___ ____ __ __ -- -- | |_ ) _ \ | |/ ·__| _ \_| \/ | -- -- |____/|____/ |_|\____/\_____|_/\/\_| -- -- -- --------------...
gpl-2.0
martin-eden/lua_code_formatter
workshop/formats/lua_table/save/install_node_handlers/readable.lua
1
1794
local text_block local add = function(s) text_block:add_curline(s) end local request_clean_line = function() text_block:request_clean_line() end local inc_indent = function() text_block:inc_indent() end local dec_indent = function() text_block:dec_indent() end local node_handlers = ...
gpl-3.0
dmccuskey/dmc-websockets
examples/dmc-websockets-echo/dmc_corona/lib/dmc_lua/lua_e4x.lua
47
18011
--====================================================================-- -- lua_e4x.lua -- -- Documentation: http://docs.davidmccuskey.com/display/docs/lua_e4x.lua --====================================================================-- --[[ The MIT License (MIT) Copyright (C) 2014 David McCuskey. All Rights Reserve...
mit
Maxsteam/MMMNNN
plugins/stats.lua
458
4098
-- Saves the number of messages from a user -- Can check the number of messages with !stats do local NUM_MSG_MAX = 5 local TIME_CHECK = 4 -- seconds local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name....
gpl-2.0
letmefly/skynet
examples/login/msgagent.lua
58
1165
local skynet = require "skynet" skynet.register_protocol { name = "client", id = skynet.PTYPE_CLIENT, unpack = skynet.tostring, } local gate local userid, subid local CMD = {} function CMD.login(source, uid, sid, secret) -- you may use secret to make a encrypted data stream skynet.error(string.format("%s is lo...
mit
siggame/Joueur.lua
games/coreminer/player.lua
1
3527
-- Player: A player in this game. Every AI controls one player. -- DO NOT MODIFY THIS FILE -- Never try to directly create an instance of this class, or modify its member variables. -- Instead, you should only be reading its variables and calling its functions. local class = require("joueur.utilities.class") local Ga...
mit
sundream/gamesrv
script/card/golden/card115005.lua
1
2584
--<<card 导表开始>> local super = require "script.card.init" ccard115005 = class("ccard115005",super,{ sid = 115005, race = 1, name = "魔爆术", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_add...
gpl-2.0
siggame/Joueur.lua
games/necrowar/tJob.lua
1
2862
-- tJob: Information about a tower's job/type. -- DO NOT MODIFY THIS FILE -- Never try to directly create an instance of this class, or modify its member variables. -- Instead, you should only be reading its variables and calling its functions. local class = require("joueur.utilities.class") local GameObject = requir...
mit
ijuma/thrift
test/lua/test_basic_client.lua
57
7626
-- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file ...
apache-2.0
EvPowerTeam/EV_OP
feeds/luci/protocols/ppp/luasrc/model/cbi/admin_network/proto_l2tp.lua
59
1868
--[[ 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 ]]-- local ma...
gpl-2.0
tomm/pioneer
data/libs/Mission.lua
1
8213
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local Game = import("Game") local Serializer = import("Serializer") local Character = import("Character") local Lang = import("Lang") local Engine = import("Engine") local l = Lan...
gpl-3.0
wangchenOS/skynet
service/debug_console.lua
4
4615
local skynet = require "skynet" local codecache = require "skynet.codecache" local core = require "skynet.core" local socket = require "socket" local snax = require "snax" local port = tonumber(...) local COMMAND = {} local function format_table(t) local index = {} for k in pairs(t) do table.insert(index, k) end...
mit
dalvorsn/tests
data/spells/scripts/custom/apocalypse.lua
14
1199
local combat = createCombatObject() arr = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
gpl-2.0
libremesh/lime-packages
packages/luci-mod-status/files/usr/lib/lua/luci/controller/status/bmx6.lua
2
6303
--[[ Copyright (C) 2011 Pau Escrich <pau@dabax.net> Contributors Jo-Philipp Wich <xm@subsignal.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License...
agpl-3.0
codemon66/Urho3D
bin/Data/LuaScripts/38_SceneAndUILoad.lua
26
5306
-- Scene & UI load example. -- This sample demonstrates: -- - Loading a scene from a file and showing it -- - Loading a UI layout from a file and showing it -- - Subscribing to the UI layout's events require "LuaScripts/Utilities/Sample" function Start() -- Execute the common startup for samples ...
mit
sami2448/set
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
tbetbetbe/upb
third_party/dynasm/dynasm.lua
4
30627
------------------------------------------------------------------------------ -- DynASM. A dynamic assembler for code generation engines. -- Originally designed and implemented for LuaJIT. -- -- Copyright (C) 2005-2012 Mike Pall. All rights reserved. -- See below for full copyright notice. ----------------------------...
bsd-3-clause
retsil2/rockweed
init.lua
1
27852
math.randomseed(os.time()) rockweed = {} rockweed.config = "rockweed-config.lua" local modpath = minetest.get_modpath("rockweed") dofile(modpath.."/"..rockweed.config) --------------------------------------------------------------------- -- the best place to store settings without affecting the addon repo -- is WORLDP...
gpl-3.0
gsingh93/ipscanner
app/src/main/assets/nmap/share/nmap/nselib/iscsi.lua
2
22383
--- An iSCSI library implementing written by Patrik Karlsson <patrik@cqure.net> -- The library currently supports target discovery and login. -- -- The implementation is based on packetdumps and the iSCSI RFC -- * http://tools.ietf.org/html/rfc3720 -- -- The library contains the protocol message pairs in <code>Packet</...
mit
sundream/gamesrv
script/card/fire/card141001.lua
1
2213
--<<card 导表开始>> local super = require "script.card.init" ccard141001 = class("ccard141001",super,{ sid = 141001, race = 4, name = "暴龙王克鲁什", type = 202, magic_immune = 0, assault = 1, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_...
gpl-2.0
coordcn/miss-core
src/upload.lua
1
5179
-- Copyright © 2017 coord.cn. All rights reserved. -- @author QianYe(coordcn@163.com) -- @license MIT license -- @refer https://github.com/bungle/lua-resty-reqargs local upload = require("resty.upload") local utils = require("miss-core.src.utils") local cookie = require("miss-core.src.cookie")...
mit
DevonTheNovice/unet
lib/unet/drivers/modem.lua
1
4873
local component = require("component") local event = require("event") local serial = require("serialization") local unet = require("unet") modem_driver = {} --[[ Arp resolution, given a Unet interface, will dicover the target node interface: the unet interface to use for resolution addr: the unet address to resolve r...
mit
sundream/gamesrv
script/card/cardlib.lua
1
4535
require "script.card.carddb" ccardlib = class("ccardlib") function ccardlib:init(pid) self.pid = pid self.loadstate = "unload" self.cardid = 0 self.name_carddb = {} self:addcarddb(ccarddb.new{pid=self.pid,name="golden",}) self:addcarddb(ccarddb.new{pid=self.pid,name="wood",}) self:addcarddb(ccarddb.new{pid=sel...
gpl-2.0
harryzeng/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
LukeFarrell/incubator-openwhisk-apigateway
scripts/lua/oauth/mock.lua
1
1534
-- Copyright (c) 2016 IBM. All rights reserved. -- -- 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, mo...
apache-2.0
sundream/gamesrv
script/card/neutral/card261003.lua
1
2258
--<<card 导表开始>> local super = require "script.card.neutral.card161003" ccard261003 = class("ccard261003",super,{ sid = 261003, race = 6, name = "黑骑士", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, ...
gpl-2.0
jxskiss/orange
orange/plugins/key_auth/handler.lua
3
6224
local ipairs = ipairs local type = type local string_find = string.find local utils = require("orange.utils.utils") local orange_db = require("orange.store.orange_db") local judge_util = require("orange.utils.judge") local handle_util = require("orange.utils.handle") local BasePlugin = require("orange.plugins.base_han...
mit
ElectricPrism/stargus
scripts/terran/unit-terran-dropship.lua
1
1929
-- -- unit-terran-dropship -- DefineAnimations("animations-terran-dropship", { Still = {"frame 0", "wait 125",--[[FIXME: shift down 79A2]]}, Move = {"unbreakable begin", "frame 0", "move 3", "wait 2", "frame 0", "move 3", "wait 1", "frame 0", "move 3", "wait 2", "frame 0", "move 2", "wait 1", "frame 0", "m...
gpl-2.0
bjornswenson/RxLua
src/operators/flatMapLatest.lua
2
1352
local Observable = require 'observable' local Subscription = require 'subscription' local util = require 'util' --- Returns a new Observable that uses a callback to create Observables from the values produced by -- the source, then produces values from the most recent of these Observables. -- @arg {function=identity} ...
mit
Android-AOSP/external_skia
tools/lua/scrape_dashing.lua
160
2495
function tostr(t) local str = "" for k, v in next, t do if #str > 0 then str = str .. ", " end if type(k) == "number" then str = str .. "[" .. k .. "] = " else str = str .. tostring(k) .. " = " end if type(v) == "table" then ...
bsd-3-clause
tomm/pioneer
data/libs/ui/InfoFace.lua
1
1440
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local Engine = import("Engine") local Face = import("UI.Game.Face") local ui = Engine.ui local testCharacter = function (character) if not (character and (type(character)=='tab...
gpl-3.0
melinath/Brent
lua/centers/waterford/water_sprites.lua
1
1295
local interface = modular.require "interface" local centers = modular.require("centers", "Brent") local fetch_water_sprites = modular.require("quests/faeries/01_fetch_water_sprites", "Brent") local faeries_reward = modular.require("quests/faeries/02_faeries_reward", "Brent") local center = centers.center:init({ i...
gpl-2.0
hfjgjfg/spam1111
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
mahdikord/mahdi5
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
jxskiss/orange
orange/utils/utils.lua
1
5880
-- general utility functions. -- some functions is from [kong](getkong.org) local require = require local uuid = require("orange.lib.jit-uuid") local date = require("orange.lib.date") local type = type local pcall = pcall local pairs = pairs local tostring = tostring local string_gsub = string.gsub local string_find = ...
mit
sundream/gamesrv
script/card/neutral/card165034.lua
1
2207
--<<card 导表开始>> local super = require "script.card.init" ccard165034 = class("ccard165034",super,{ sid = 165034, race = 6, name = "霜狼步兵", type = 201, magic_immune = 0, assault = 0, sneer = 1, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_ad...
gpl-2.0
sundream/gamesrv
script/card/fire/card244002.lua
1
2282
--<<card 导表开始>> local super = require "script.card.fire.card144002" ccard244002 = class("ccard244002",super,{ sid = 244002, race = 4, name = "狙击", type = 102, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magi...
gpl-2.0
jrversteegh/softsailor
deps/swig-2.0.4/Examples/lua/arrays/runme.lua
2
1850
---- importing ---- if string.sub(_VERSION,1,7)=='Lua 5.0' then -- lua5.0 doesnt have a nice way to do this lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') assert(lib)() else -- lua 5.1 does require('example') end -- a helper to print a Lua table function print_t...
gpl-3.0
movb/Algorithm-Implementations
Average/Lua/Yonaba/average_test.lua
26
1557
-- Tests for average.lua local mean = require 'average' 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 end local st...
mit
weera00/nodemcu-firmware
lua_modules/yeelink/yeelink_lib.lua
73
3136
-- *************************************************************************** -- Yeelink Updata Libiary Version 0.1.2 r1 -- -- Written by Martin -- but based on a script of zhouxu_o from bbs.nodemcu.com -- -- MIT license, http://opensource.org/licenses/MIT -- **********************************************************...
mit
sundream/gamesrv
script/card/neutral/card166019.lua
1
2196
--<<card 导表开始>> local super = require "script.card.init" ccard166019 = class("ccard166019",super,{ sid = 166019, race = 6, name = "雏龙", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_adde...
gpl-2.0
libremesh/lime-packages
packages/ubus-lime-utils/tests/test_lime_utils_admin.lua
1
7541
local utils = require "lime.utils" local test_utils = require "tests.utils" local config = require 'lime.config' local upgrade = require 'lime.upgrade' local iwinfo = require 'iwinfo' local hotspot_wwan = require 'lime.hotspot_wwan' local test_file_name = "packages/ubus-lime-utils/files/usr/libexec/rpcd/lime-utils-adm...
agpl-3.0
EvPowerTeam/EV_OP
feeds/luci/protocols/ppp/luasrc/model/cbi/admin_network/proto_pptp.lua
59
3379
--[[ LuCI - Lua Configuration Interface Copyright 2011-2012 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 ]]-- loc...
gpl-2.0
EvPowerTeam/EV_OP
feeds/luci/modules/base/luasrc/http/protocol/mime.lua
88
2933
--[[ HTTP protocol implementation for LuCI - mime handling (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 at http://www....
gpl-2.0
digitalloggers/nodemcu-firmware
lua_modules/bmp085/bmp085.lua
69
5037
-------------------------------------------------------------------------------- -- BMP085 I2C module for NODEMCU -- NODEMCU TEAM -- LICENCE: http://opensource.org/licenses/MIT -- Christee <Christee@nodemcu.com> -------------------------------------------------------------------------------- local moduleName = ... ...
mit
gsingh93/ipscanner
app/src/main/assets/nmap/share/nmap/nselib/mssql.lua
2
96591
--- -- MSSQL Library supporting a very limited subset of operations. -- -- The library was designed and tested against Microsoft SQL Server 2005. -- However, it should work with versions 7.0, 2000, 2005 and 2008. -- Only a minimal amount of parsers have been added for tokens, column types -- and column data in order t...
mit
sundream/gamesrv
script/card/neutral/card163025.lua
1
2518
--<<card 导表开始>> local super = require "script.card.init" ccard163025 = class("ccard163025",super,{ sid = 163025, race = 6, name = "疯狂的炼金师", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, magic_hurt_...
gpl-2.0
movb/Algorithm-Implementations
Lempel_Ziv_Welch/Lua/Yonaba/lzw.lua
24
1387
-- Lempel-Ziv Welch compression data algorithm implementation -- See : http://en.wikipedia.org/wiki/LZW local function lzw_encode(str) local w = '' local result = {} local dict_size = 256 -- Builds the dictionnary local dict = {} for i = 0, dict_size-1 do dict[string.char(i)] = i end local i = di...
mit
sundream/gamesrv
3rd/behaviourtree/spec/unit/node_spec.lua
1
2459
local BehaviourTree = require 'lib/behaviour_tree' local Node = BehaviourTree.Node describe('Node', function() local subject before_each(function() subject = Node:new() end) describe(':initialize', function() it('should copy any attributes to the node', function() local node = Node:new({testfie...
gpl-2.0
tomm/pioneer
data/libs/ui/SmartTable.lua
1
2029
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local Engine = import("Engine") local utils = import("utils") local ui = Engine.ui local _DefaultSort = function (self, cmp) if not cmp then cmp = function (a,b) return a.data...
gpl-3.0
sev-/scummvm
devtools/create_ultima/files/ultima6/scripts/md/lang/en/game.lua
18
15179
return { PASS="Pass!\n", YOU_SEE="you see %s", ON="On - ", TO="To - ", NOTHING="nothing!\n", NO_EFFECT="\nNo effect\n", AARGH="Aargh!\n", BLOCKED="Blocked!\n", HOW_MANY="How many? ", YOU_ARE_CARRYING_TOO_MUCH_ALREADY="You are carrying too much already.\n", YOU_PRIED_THE_NAILS_OUT_OF_THE_CRATE="You pried the nails out o...
gpl-3.0
LukeFarrell/incubator-openwhisk-apigateway
scripts/lua/policies/mapping.lua
1
6808
-- Copyright (c) 2016 IBM. All rights reserved. -- -- 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, mod...
apache-2.0
dalvorsn/tests
data/spells/scripts/party/enchant.lua
15
1811
local combat = createCombatObject() local area = createCombatArea(AREA_CROSS5X5) setCombatArea(combat, area) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, COND...
gpl-2.0
tomm/pioneer
data/libs/autoload.lua
1
1084
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt -- this is the only library automatically loaded at startup -- its the right place to extend core Lua tables import("SpaceStation") math.clamp = function(v, min, max) return mat...
gpl-3.0
sundream/gamesrv
script/card/neutral/card264023.lua
1
2258
--<<card 导表开始>> local super = require "script.card.neutral.card164023" ccard264023 = class("ccard264023",super,{ sid = 264023, race = 6, name = "战利品贮藏者", type = 205, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 1, sneak = 0, ...
gpl-2.0
tltneon/NutScript
gamemode/languages/sh_english.lua
1
10163
NAME = "English" LANGUAGE = { loading = "Loading", dbError = "Database connection failed", unknown = "Unknown", noDesc = "No description available", create = "Create", createTip = "Create a new character to play as.", load = "Load", loadTip = "Choose a previously created character to play as.", leave = "Leav...
mit
sundream/gamesrv
script/card/neutral/card263007.lua
1
2233
--<<card 导表开始>> local super = require "script.card.neutral.card163007" ccard263007 = class("ccard263007",super,{ sid = 263007, race = 6, name = "烈日行者", type = 201, magic_immune = 0, assault = 0, sneer = 1, atkcnt = 1, shield = 1, warcry = 0, dieeffect = 0, sneak = 0, ...
gpl-2.0
sundream/gamesrv
script/card/neutral/card265003.lua
1
2221
--<<card 导表开始>> local super = require "script.card.neutral.card165003" ccard265003 = class("ccard265003",super,{ sid = 265003, race = 6, name = "石牙野猪", type = 202, magic_immune = 0, assault = 1, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ...
gpl-2.0
sundream/gamesrv
script/card/water/card234003.lua
1
2265
--<<card 导表开始>> local super = require "script.card.water.card134003" ccard234003 = class("ccard234003",super,{ sid = 234003, race = 3, name = "心灵之火", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, m...
gpl-2.0
A-N-bot/NA
plugins/owners.lua
94
12617
local function lock_group_namemod(msg, data, target) local group_name_set = data[tostring(target)]['settings']['set_name'] local group_name_lock = data[tostring(target)]['settings']['lock_name'] if group_name_lock == 'yes' then return 'Group name is already locked' else data[tostring(target)]['setting...
gpl-2.0
letmefly/skynet
service/launcher.lua
24
3372
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
sundream/gamesrv
script/card/water/card135001.lua
1
2529
--<<card 导表开始>> local super = require "script.card.init" ccard135001 = class("ccard135001",super,{ sid = 135001, race = 3, name = "精神控制", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_ad...
gpl-2.0
tomm/pioneer
data/libs/SpaceStation.lua
1
19672
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local SpaceStation = import_core("SpaceStation") local Event = import("Event") local Rand = import("Rand") local Space = import("Space") local utils = import("utils") local ShipDef...
gpl-3.0
movb/Algorithm-Implementations
Ranrot-B-Pseudo_Random_Number_Generator/Lua/Yonaba/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
rastin45/waqer12
plugins/anti-spam13.lua
7
2439
local NUM_MSG_MAX = 13 -- Max number of messages per TIME_CHECK seconds local TIME_CHECK = 13 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...
gpl-2.0
nginxsuper/gin
spec/core/response_spec.lua
4
1063
require 'spec.spec_helper' -- gin local Response = require 'gin.core.response' describe("Response", function() describe(".new", function() describe("when no options are passed in", function() it("initializes an instance with defaults", function() local response = Response.new(...
mit
tltneon/NutScript
plugins/doors/entities/weapons/nut_keys.lua
2
4737
AddCSLuaFile() if (CLIENT) then SWEP.PrintName = "Keys" SWEP.Slot = 0 SWEP.SlotPos = 2 SWEP.DrawAmmo = false SWEP.DrawCrosshair = false end SWEP.Author = "Chessnut" SWEP.Instructions = "Primary Fire: Lock\nSecondary Fire: Unlock" SWEP.Purpose = "Hitting things and knocking on doors." SWEP.Drop = false SWEP.View...
mit
alidess/aliali
plugins/spam.lua
29
1984
-------------------------------------------------- -- ____ ____ _____ -- -- | \| _ )_ _|___ ____ __ __ -- -- | |_ ) _ \ | |/ ·__| _ \_| \/ | -- -- |____/|____/ |_|\____/\_____|_/\/\_| -- -- -- --------------...
gpl-2.0
rastin45/waqer12
plugins/google.lua
722
1037
local function googlethat(query) local api = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&" local parameters = "q=".. (URL.escape(query) or "") -- Do the request local res, code = https.request(api..parameters) if code ~=200 then return nil end local data = json:decode(res) local r...
gpl-2.0
spark0511/revolt_bot
plugins/google.lua
722
1037
local function googlethat(query) local api = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&" local parameters = "q=".. (URL.escape(query) or "") -- Do the request local res, code = https.request(api..parameters) if code ~=200 then return nil end local data = json:decode(res) local r...
gpl-2.0
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua
6
3601
-------------------------------- -- @module ArmatureDataManager -- @extend Ref -------------------------------- -- @function [parent=#ArmatureDataManager] getAnimationDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- -- @function [parent=#Arma...
mit
jkhlf85/THETETOO_8
plugins/lock_join.lua
10
1121
--[[ _____ _ _ _ _____ Dev @lIMyIl |_ _|__| |__ / \ | | _| ____| Dev @li_XxX_il | |/ __| '_ \ / _ \ | |/ / _| Dev @h_k_a | |\__ \ | | |/ ___ \| <| |___ Dev @Aram_omar22 |_||___/_| |_/_/ \_\_|\_\_____| Dev @IXX_I_XXI CH > @lTSHAKEl_CH --]] l...
agpl-3.0
codemon66/Urho3D
Source/ThirdParty/toluapp/src/bin/lua/module.lua
44
1479
-- tolua: module class -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1998 -- $Id: $ -- This code is free software; you can redistribute it and/or modify it. -- The software provided hereunder is on an "as is" basis, and -- the author has no obligation to provide maintenance, support, updates, -- enhancements,...
mit
Putnam3145/SPARKING-Dwarf-Fortress-DBZ-mod
raw/init.d/sparking.lua
1
29620
local ki=dfhack.script_environment('dragonball/ki') local function unitHasCreatureClass(unit,class) for _,c_class in ipairs(df.creature_raw.find(unit.race).caste[unit.caste].creature_class) do if c_class.value == class then return true end end return false end local function getSubClassValue(unit,...
mit
dmccuskey/dmc-websockets
tests/lunatest.lua
4
32314
----------------------------------------------------------------------- -- -- Copyright (c) 2009 Scott Vokes <vokes.s@gmail.com> -- -- 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 ...
mit
Lynx3d/tinker_tools
Libraries/LibString/trim.lua
2
2168
local function f(self, fmt, chars) if(chars) then return (string.gsub(self, string.format(fmt, chars, chars), "%1")) else return (string.gsub(self, fmt, "%1")) end end --- Trim the string by removing characters on both ends. -- This optional argument string is inserted into the pattern of string.gsub and can be...
bsd-3-clause
porya0909/anti-spam
plugins/Map.lua
2
1498
-- Implement a command !loc [area] which uses -- the static map API to get a location image -- Not sure if this is the proper way -- Intent: get_latlong is in time.lua, we need it here -- loadfile "time.lua" -- Globals -- If you have a google api key for the geocoding/timezone api do local api_key = nil local base_...
gpl-2.0
ElectricPrism/stargus
scripts/buttons.lua
2
2689
-- _________ __ __ -- / _____// |_____________ _/ |______ ____ __ __ ______ -- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ -- /_______ /|__| |__| (_...
gpl-2.0
sundream/gamesrv
script/card/neutral/card265032.lua
1
2257
--<<card 导表开始>> local super = require "script.card.neutral.card165032" ccard265032 = class("ccard265032",super,{ sid = 265032, race = 6, name = "侏儒发明家", type = 205, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, ...
gpl-2.0
jkhlf85/THETETOO_8
plugins/lock_fwd.lua
5
2601
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY tetoo ▀▄ ▄▀ ▀▄ ▄▀ BY nmore (@l_l_lo) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY l_l_ll ▀▄ ▄▀ ▀▄ ▄▀ broadcast : قفل توجية بلتحذير ▀▄ ▄▀ ▀▄▀▀...
agpl-3.0
nphilipp/ardour
scripts/midigenerator.lua
4
1034
ardour { ["type"] = "dsp", name = "Midi Generator", category = "Example", -- "Utility" license = "MIT", author = "Ardour Lua Task Force", description = [[An Example Midi Generator for prototyping.]] } function dsp_ioconfig () return { { midi_out = 1, audio_in = 0, audio_out = 0}, } end lo...
gpl-2.0
NVolvozx/mamad
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-3.0
sev-/scummvm
devtools/create_ultima/files/ultima6/scripts/se/lang/en/game.lua
19
3136
return { PASS="Pass!\n", YOU_SEE="you see %s", NOTHING="nothing!\n", SEARCHING_HERE_YOU_FIND="Searching here, you find %s", SEARCHING_HERE_YOU_FIND_NOTHING="Searching here, you find nothing.\n", SEARCH_NEXT_OBJ=", %s", SEARCH_LAST_OBJ=" and %s", OUT_OF_RANGE="Out of Range!\n", BLAH="Blah", CARRY_TOO_MUCH="You are carry...
gpl-3.0
spark0511/revolt_bot
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
smasty/LunaCI
lunaci/utils.lua
1
2599
-- LunaCI utility functions -- Part of the LuaDist project - http://luadist.org -- Author: Martin Srank, hello@smasty.net -- License: MIT module("lunaci.utils", package.seeall) local log = require "lunaci.log" local pl = require "pl.import_into"() local const = require "rocksolver.constraints" -- Change working di...
mit
codemon66/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
padrinoo1/vagir2
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
SeyedKia/alpha
plugins/InRealm.lua
1
19866
-- 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_admin1(msg) then local group_creator = msg.from.print_name create_group_chat (group_creator, group_na...
agpl-3.0
wangchenOS/skynet
3rd/lpeg/re.lua
160
6286
-- $Id: re.lua,v 1.44 2013/03/26 20:11:40 roberto Exp $ -- imported functions and modules local tonumber, type, print, error = tonumber, type, print, error local setmetatable = setmetatable local m = require"lpeg" -- 'm' will be used to parse expressions, and 'mm' will be used to -- create expressions; that is, 're' ...
mit
sami2448/set
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
siggame/Joueur.lua
games/necrowar/tile.lua
1
6281
-- Tile: A Tile in the game that makes up the 2D map grid. -- DO NOT MODIFY THIS FILE -- Never try to directly create an instance of this class, or modify its member variables. -- Instead, you should only be reading its variables and calling its functions. local class = require("joueur.utilities.class") local GameObj...
mit