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
amirhoseinkarimi2233/uzzbot
plugins/rae.lua
616
1312
do function getDulcinea( text ) -- Powered by https://github.com/javierhonduco/dulcinea local api = "http://dulcinea.herokuapp.com/api/?query=" local query_url = api..text local b, code = http.request(query_url) if code ~= 200 then return "Error: HTTP Connection" end dulcinea = json:decode(b) ...
gpl-2.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/loot/items/armor/padded_armor_bracer_r.lua
4
1756
padded_armor_bracer_r = { minimumLevel = 0, maximumLevel = -1, customObjectName = "a Padded Armor Right Bracer", directObjectTemplate = "object/tangible/wearables/armor/padded/armor_padded_s01_bracer_r.iff", craftingValues = { {"armor_rating",1,1,0}, {"blasteffectiveness",10,45,10}, {"armor_effectiveness",8,...
agpl-3.0
moonlight/cave-adventure
data/scripts/Animation.lua
2
5914
-- -- All animation schemes should inherit from this basic structure, exposing -- start, stop and update features and making the bitmap accesible through -- a bitmap member variable. -- -- By Bjorn Lindeijer import("Object.lua") Animation = Object:subclass { name = "Animation"; init = function(self,...
gpl-2.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/csSearchKnowledgeBase.lua
4
2156
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/corellia/meatlump_fool.lua
2
1920
meatlump_fool = Creature:new { objectName = "@mob/creature_names:meatlump_fool", randomNameType = NAME_GENERIC_TAG, socialGroup = "meatlump", faction = "meatlump", level = 6, chanceHit = 0.250000, damageMin = 50, damageMax = 55, baseXp = 113, baseHAM = 180, baseHAMmax = 220, armor = 0, resists = {0,0,0,0,0...
agpl-3.0
amin1717/Dark-Wolfs-bot
plugins/stats.lua
866
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
LeMagnesium/minetest-minetestforfun-server
mods/bones/init.lua
2
5885
-- Minetest 0.5 mod: bones -- See README.txt for licensing and other information. --REVISED 20151117 by maikerumine for adding bones to inventory after punch bones = {} local share_bones_time = (tonumber(minetest.setting_get("share_bones_time")) or 1800) bones.bones_formspec = "size[14,9]".. default.gui_bg.. defa...
unlicense
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/listGuilds.lua
4
2123
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/lair/npc_theater/endor_donkuwah_spooky_shaman_neutral_medium_theater.lua
3
1113
endor_donkuwah_spooky_shaman_neutral_medium_theater = Lair:new { mobiles = { {"spooky_donkuwah_spiritmaster",1}, {"donkuwah_shaman",1} }, spawnLimit = 12, buildingsVeryEasy = {"object/building/poi/endor_ewok_medium.iff","object/building/poi/endor_ewok_medium3.iff","object/building/poi/endor_ewok_medium4.iff"}, ...
agpl-3.0
bokonshakh/NOVA2-BOT
plugins/moderation.lua
336
9979
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 local username = v.username data[tostring(m...
gpl-2.0
peymankhanas/khanas-bot
plugins/moderation.lua
336
9979
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 local username = v.username data[tostring(m...
gpl-2.0
lin-zhang/ubx_arduino
tests/test_data_init.lua
4
3268
ffi=require"ffi" lunit=require"lunit" ubx=require"ubx" module("data_init_test", lunit.testcase, package.seeall) local ni=ubx.node_create("data_init_test") ubx.load_module(ni, "std_types/stdtypes/stdtypes.so") ubx.load_module(ni, "std_types/testtypes/testtypes.so") ubx.load_module(ni, "std_types/kdl/kdl_types.so") f...
gpl-2.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/grantTitle.lua
4
2123
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
yimogod/boom
trunk/t-engine4/game/engines/engine/interface/PlayerRun.lua
1
16935
-- TE4 - T-Engine 4 -- Copyright (C) 2009 - 2015 Nicolas Casalini -- -- 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 3 of the License, or -- (at your option) any later version....
apache-2.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/corellia/corsec_sergeant.lua
2
1181
corsec_sergeant = Creature:new { objectName = "@mob/creature_names:corsec_sergeant", randomNameType = NAME_GENERIC_TAG, socialGroup = "corsec", faction = "corsec", level = 16, chanceHit = 0.31, damageMin = 170, damageMax = 180, baseXp = 960, baseHAM = 2900, baseHAMmax = 3500, armor = 0, resists = {0,0,0,0,...
agpl-3.0
mahdibagheri/mmmmb1
plugins/id.lua
226
4260
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..' ' end if user.lastname then text = text..user.last_name end return text end local function returnids(cb_extra, success, result) local re...
gpl-2.0
arvindr21/esp8266-devkit
Espressif/examples/nodemcu-firmware/lua_examples/u8glib/u8g_graphics_test.lua
43
4007
-- setup I2c and connect display function init_i2c_display() -- SDA and SCL can be assigned freely to available GPIOs local sda = 5 -- GPIO14 local scl = 6 -- GPIO12 local sla = 0x3c i2c.setup(0, sda, scl, i2c.SLOW) disp = u8g.ssd1306_128x64_i2c(sla) end -- setup SPI and connect display ...
gpl-3.0
Capster/MonsterViz
MonsterViz/lua/monsterviz/parts/space.lua
1
1489
local floor = math.floor local insert = table.insert local rand = math.Rand local SetDrawColor = surface.SetDrawColor local DrawRect = surface.DrawRect local DrawPoly = surface.DrawPoly local TexRect = surface.DrawTexturedRect local pairs = pairs local Color = Color local ScrW = ScrW local ScrH...
apache-2.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/saberPolearmHit3.lua
2
2582
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
Maxsteam/test-2
plugins/cpu.lua
244
1893
function run_sh(msg) name = get_name(msg) text = '' -- if config.sh_enabled == false then -- text = '!sh command is disabled' -- else -- if is_sudo(msg) then -- bash = msg.text:sub(4,-1) -- text = run_bash(bash) -- else -- text = name .. ' you...
gpl-2.0
yimogod/boom
trunk/t-engine4/game/engines/engine/Key.lua
1
5812
-- TE4 - T-Engine 4 -- Copyright (C) 2009 - 2015 Nicolas Casalini -- -- 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 3 of the License, or -- (at your option) any later version....
apache-2.0
DBarney/luvit
examples/tcp-uv-proxy.lua
14
1698
local uv = require("uv") -- Create listening socket and bind to 127.0.0.1:8080 local server = uv.new_tcp() server:bind("127.0.0.1", 8080) -- Setup listener server:listen(128, function(error) -- This function is executed for each new client print("New connection") -- Create handles for client and upstream loc...
apache-2.0
braydondavis/Nerd-Gaming-Public
resources/[no_ng_tag]/bone_attach/attach_func.lua
7
3754
attached_ped = {} attached_bone = {} attached_x = {} attached_y = {} attached_z = {} attached_rx = {} attached_ry = {} attached_rz = {} function attachElementToBone(element,ped,bone,x,y,z,rx,ry,rz) if not (isElement(element) and isElement(ped)) then return false end if getElementType(ped) ~= "ped" and getElementType...
mit
yimogod/boom
trunk/t-engine4/game/engines/engine/Map.lua
1
51255
-- TE4 - T-Engine 4 -- Copyright (C) 2009 - 2015 Nicolas Casalini -- -- 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 3 of the License, or -- (at your option) any later version....
apache-2.0
Cochitect/eyescream
cifar/train/adversarial.lua
2
7009
require 'torch' require 'nn' require 'cunn' require 'optim' require 'pl' local adversarial = {} -- training function function adversarial.train(dataset, N) epoch = epoch or 1 local N = N or dataset:size() local dataBatchSize = opt.batchSize / 2 local time = sys.clock() -- do one epoch print('\n<trainer> ...
bsd-3-clause
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/setFirstName.lua
4
2129
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
ClearTables/ClearTables
transportation.lua
2
6694
--[[ This file is part of ClearTables @author Paul Norman <penorman@mac.com> @copyright 2015-2016 Paul Norman, MIT license ]]-- --[[ Code for the transportation layers. These are some of the most complex. There's a few principles - Separate tables are needed for roads and rail - A way might appear in both if it's ...
mit
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/dungeon/warren/warren_agro_droid.lua
2
1100
warren_agro_droid = Creature:new { objectName = "@mob/creature_names:warren_agro_droid_s01", socialGroup = "warren_imperial", faction = "", level = 46, chanceHit = 0.36, damageMin = 400, damageMax = 600, baseXp = 4000, baseHAM = 12000, baseHAMmax = 15000, armor = 0, resists = {30,30,40,40,-1,40,-1,-1,-1}, ...
agpl-3.0
Blizzard/premake-core
tests/tools/test_msc.lua
2
9664
-- -- tests/test_msc.lua -- Automated test suite for the Microsoft C toolset interface. -- Copyright (c) 2012-2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("tools_msc") local msc = p.tools.msc -- -- Setup/teardown -- local wks, prj, cfg function suite.setup() wk...
bsd-3-clause
szczukot/domoticz
dzVents/runtime/integration-tests/scriptDelayedVariableScene.lua
10
1595
local testLastUpdate = function(dz, trigger, expectedDifference) local now = dz.time.secondsSinceMidnight local lastUpdate = trigger.lastUpdate.secondsSinceMidnight local diff = (now - lastUpdate) print('current: ' .. now .. ', lastUpdate: ' .. lastUpdate .. ', diff: ' .. diff .. ', expected: ' .. expectedDifferenc...
gpl-3.0
LuaDist2/turbo
examples/httpserver.lua
12
1544
--- Turbo.lua Hello world using HTTPServer -- -- Using the HTTPServer offers more control for the user, but less convenience. -- In almost all cases you want to use turbo.web.RequestHandler. -- -- Copyright 2013 John Abrahamsen -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use thi...
apache-2.0
LeMagnesium/minetest-minetestforfun-server
mods/colormachine/paint_roller.lua
9
1870
-- This is based upon the paint_roller mod by Krock. minetest.register_tool("colormachine:paint_roller", { description = "Paint roller", inventory_image = "paint_roller.png", on_use = function(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then return end local idx = placer:get_wield_ind...
unlicense
fantajeon/TripletNet
splitdata_properties.lua
1
2862
require "csvigo" require 'image' require 'math' require 'preprocess' local opt = opt or {} local DataPath = opt.datapath or '/data1/fantajeon/torch/TripletNet/properties/' local imagePath = opt.imagepath or '/data2/freebee/Images/' local properties_filename = 'excel_1459334593242.shoes.csv' local properties_train_fil...
mit
HorrorClown/MTAGoJump
server/classes/CGoJump/CGoJump.lua
1
2678
-- -- PewX (HorrorClown) -- Using: IntelliJ IDEA 14 Ultimate -- Date: 10.11.2015 - Time: 19:12 -- pewx.de // iGaming-mta.de // iRace-mta.de // iSurvival.de // mtasa.de -- CGoJump = {} function CGoJump:constructor() Event:addRemote(self, "sendHighscore", "receiveHighscore") Event:addRemote(self, "requestStats",...
gpl-2.0
javachengwc/skynet
service/bootstrap.lua
29
1191
local skynet = require "skynet" local harbor = require "skynet.harbor" require "skynet.manager" -- import skynet.launch, ... local memory = require "memory" skynet.start(function() local sharestring = tonumber(skynet.getenv "sharestring") memory.ssexpand(sharestring or 4096) local standalone = skynet.getenv "stand...
mit
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/corellia/drall_patriot_legionnaire.lua
2
1117
drall_patriot_legionnaire = Creature:new { objectName = "@mob/creature_names:drall_patriot_legionnare", randomNameType = NAME_GENERIC_TAG, socialGroup = "drall", faction = "drall", level = 14, chanceHit = 0.3, damageMin = 150, damageMax = 160, baseXp = 831, baseHAM = 2000, baseHAMmax = 2400, armor = 0, res...
agpl-3.0
gilzoide/tuirm
src/color.lua
1
1727
--[[ -- Copyright (C) 2016 Gil Barbosa Reis -- This file is part of Tuirm. -- -- Tuirm 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 3 of the License, or -- (at your option) any later versio...
gpl-3.0
SonnyJim/snesbot
lua/lsnes_dump.lua
2
3340
--[[ polldump.lua Converts lsnes movie files to SNESBot compatible files MAKE SURE YOU USE A COMPATIBLE VERSION OF LSNES, ie one that supports on_latch Currently only supports one controller, because, well my hardware only supports one controller ;) Usage: In the File menu, load ROM in lsnes In the File me...
gpl-2.0
yimogod/boom
trunk/t-engine4/game/modules/example_realtime/load.lua
1
2683
-- ToME - Tales of Middle-Earth -- Copyright (C) 2009 - 2015 Nicolas Casalini -- -- 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 3 of the License, or -- (at your option) any la...
apache-2.0
ycaihua/QSanguosha
lua/ai/standard-qun-ai.lua
5
37108
--[[******************************************************************** 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
motangish/OCUI
lib/SYSTEM.lua
1
5499
local cmp = require("component") local fs = require("filesystem") local event = require("event") local image = require("IMAGE") local buffer = require("IBUFFER") local color = require("COLOR") local ui = require("UI") local gpu = cmp.gpu local system = {} function system.initi...
mit
braydondavis/Nerd-Gaming-Public
resources/[no_ng_tag]/customblips/imagelib.lua
7
3497
dxImage = {} dxImage_mt = { __index = dxImage } local g_screenX,g_screenY = guiGetScreenSize() local visibleImages = {} local idImages = {} local idCounter = 0 ------ local defaults = { fX = 0.5, fY = 0.5, fWidth = 0, fHeight = 0, bRelativePosition = true, bRelativeSize = true, fRot ...
mit
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/confusionShot.lua
2
2703
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
githabbot/Quick-V2.7
plugins/lock_fwd.lua
1
1240
do local function pre_process(msg) local hash = 'mate:'..msg.to.id if redis:get(hash) and msg.fwd_from and not is_momod(msg) then chat_del_user('chat#id'..msg.to.id,'user#id'..msg.from.id, ok_cb, false) return "fwd was locked" end return msg end local functi...
gpl-2.0
Blizzard/premake-core
modules/vstudio/vs2005_fsproj_user.lua
14
1945
-- -- vs2005_fsproj_user.lua -- Generate a Visual Studio 2005+ F# .user file. -- Copyright (c) Jason Perkins and the Premake project -- local p = premake local m = p.vstudio.fs2005 local dn = p.vstudio.dotnetbase -- -- Generate a Visual Studio 200x C# user file. -- m.elements.userProjectPropertyGroup = function...
bsd-3-clause
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/corellia/selonian_healer.lua
2
1638
selonian_healer = Creature:new { objectName = "@mob/creature_names:selonian_healer", randomNameType = NAME_GENERIC_TAG, socialGroup = "selonian", faction = "", level = 7, chanceHit = 0.26, damageMin = 55, damageMax = 65, baseXp = 187, baseHAM = 405, baseHAMmax = 495, armor = 0, resists = {0,0,0,0,0,0,0,-1,...
agpl-3.0
StephenZhuang/qdkpv2
QDKP_V2/QDKP_V2/Code/Core/Sessions.lua
1
6511
-- Copyright 2012 Akhaan & Honesty Hyj (www.quickdkp.com) -- This file is a part of QDKP_V2 (see about.txt in the Addon's root folder) -- ## CORE FUNCTIONS ## -- Session management -- -- Functions that start, stop and modify locally created sessions. -- Includes functions to c...
gpl-3.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/legShot2.lua
2
2571
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
Blizzard/premake-core
src/base/container.lua
23
8189
--- -- container.lua -- Implementation of configuration containers. -- Copyright (c) 2014 Jason Perkins and the Premake project --- local p = premake p.container = {} local container = p.container --- -- Keep a master dictionary of container class, so they can be easily looked -- up by name (technically you cou...
bsd-3-clause
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/firejet.lua
4
2114
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
aqasaeed/spartatg
plugins/dic.lua
31
1662
--[[ -- Translate text using Google Translate. -- http://translate.google.com/translate_a/single?client=t&ie=UTF-8&oe=UTF-8&hl=en&dt=t&tl=en&sl=auto&text=hello --]] do function translate(source_lang, target_lang, text) local path = "http://translate.google.com/translate_a/single" -- URL query parameters local pa...
gpl-2.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/endor/seasoned_panshee_warrior.lua
2
1030
seasoned_panshee_warrior = Creature:new { objectName = "@mob/creature_names:seasoned_panshee_warrior", randomNameType = NAME_GENERIC_TAG, socialGroup = "panshee_tribe", faction = "panshee_tribe", level = 42, chanceHit = 0.440000, damageMin = 345, damageMax = 400, baseXp = 4097, baseHAM = 9300, baseHAMmax = 1...
agpl-3.0
LeMagnesium/minetest-minetestforfun-server
mods/homedecor_modpack/homedecor/roofing.lua
7
8359
local S = homedecor.gettext minetest.register_node("homedecor:skylight", { description = S("Glass Skylight"), drawtype = "raillike", tiles = { "default_glass.png" }, wield_image = "default_glass.png", inventory_image = "homedecor_skylight_inv.png", groups = { snappy = 3 }, paramtype = "light", sounds = default...
unlicense
MikeMcShaffry/gamecode3
Dev/Source/3rdParty/LuaPlus/Test/form.lua
3
1409
import "dotnet" load_assembly("System.Windows.Forms") load_assembly("System") --[[ --Convert = import_type("System.Convert") Convert = dotnet["System.Convert"] --AnchorStyles = import_type("System.Windows.Forms.AnchorStyles") AnchorStyles = dotnet["System.Windows.Forms.AnchorStyles"] print(Convert:ToInt32(AnchorStyles...
lgpl-2.1
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/channelForce.lua
4
2129
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
lin-zhang/ubx_arduino
std_blocks/logging/file_logger.lua
2
6037
-- -- Microblx generic logger -- -- SPDX-License-Identifier: BSD-3-Clause -- local ubx=require("ubx") local utils = require("utils") local cdata = require("cdata") local ffi = require("ffi") local time = require("time") local ts = tostring -- color handling via ubx red=ubx.red; blue=ubx.blue; cyan=ubx.cyan; white=ubx...
gpl-2.0
mafiesto4/Game1
MyGame/MyGame/cocos2d/external/lua/luasocket/script/ltn12.lua
71
8331
----------------------------------------------------------------------------- -- LTN12 - Filters, sources, sinks and pumps. -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ------------------------------------------------------------------------...
gpl-2.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/dantooine/mokk_clan_leader.lua
2
1167
mokk_clan_leader = Creature:new { objectName = "@mob/creature_names:mokk_clan_leader", randomNameType = NAME_GENERIC_TAG, socialGroup = "mokk_tribe", faction = "mokk_tribe", level = 75, chanceHit = 0.75, damageMin = 520, damageMax = 750, baseXp = 7207, baseHAM = 12000, baseHAMmax = 15000, armor = 0, resist...
agpl-3.0
raydtang/ESPLogger
src/bh1750/bh1750.lua
8
1363
-- *************************************************************************** -- BH1750 module for ESP8266 with nodeMCU -- BH1750 compatible tested 2015-1-22 -- -- Written by xiaohu -- -- MIT license, http://opensource.org/licenses/MIT -- *************************************************************************** -- ...
mit
braydondavis/Nerd-Gaming-Public
resources/NGPolice/jail_c.lua
2
1646
local remainingTime = nil local sx, sy = guiGetScreenSize ( ) addEvent ( "onPlayerArrested", true ) addEventHandler ( "onPlayerArrested", root, function ( dur ) if dur then remainingTime = dur l_tick = getTickCount ( ) addEventHandler ( 'onClientRender', root, dxDrawRemainingJailTime ) end end ) function dxDr...
mit
DBarney/luvit
deps/dns.lua
1
16460
--[[ Copyright 2014 The Luvit Authors. All Rights Reserved. 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 ...
apache-2.0
alzaen/al-zaen
plugins/all.lua
41
4395
do local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print_name(user)..' ['..user_id..']' return u...
gpl-2.0
insionng/gopher-lua
_lua5.1-tests/sort.lua
10
1665
print"testing sort" function check (a, f) f = f or function (x,y) return x<y end; for n=table.getn(a),2,-1 do assert(not f(a[n], a[n-1])) end end a = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"} table.sort(a) check(a) limit = 30000 if rawget(_G, "_soft") then ...
mit
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/requestResourceWeights.lua
4
2159
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
szagoruyko/nn
Copy.lua
18
1142
local Copy, parent = torch.class('nn.Copy', 'nn.Module') function Copy:__init(intype, outtype, forceCopy, dontCast) intype = intype or torch.Tensor.__typename outtype = outtype or torch.Tensor.__typename self.dontCast = dontCast parent.__init(self) self.gradInput = torch.getmetatable(intype).new() ...
bsd-3-clause
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/tumbleToProne.lua
4
2132
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/faction/rebel/alliance_intelligence_case_officer.lua
2
1483
alliance_intelligence_case_officer = Creature:new { objectName = "@mob/creature_names:alliance_intelligence_case_officer", randomNameType = NAME_GENERIC_TAG, socialGroup = "rebel", faction = "rebel", level = 22, chanceHit = 0.35, damageMin = 210, damageMax = 220, baseXp = 2219, baseHAM = 5900, baseHAMmax = 7...
agpl-3.0
LeMagnesium/minetest-minetestforfun-server
mods/unified_inventory/init.lua
8
1794
-- Unified Inventory for Minetest 0.4.8+ local modpath = minetest.get_modpath(minetest.get_current_modname()) local worldpath = minetest.get_worldpath() local mygettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end -- Data tables definitions unified_inventory = { activefilter = {}, active...
unlicense
javachengwc/skynet
lualib/skynet/manager.lua
72
1923
local skynet = require "skynet" local c = require "skynet.core" function skynet.launch(...) local addr = c.command("LAUNCH", table.concat({...}," ")) if addr then return tonumber("0x" .. string.sub(addr , 2)) end end function skynet.kill(name) if type(name) == "number" then skynet.send(".launcher","lua","REMO...
mit
TheLazar42/Reign-of-Darkness
games/MechCraft/mods/inventoryplus/inventory_plus/init.lua
2
4100
--[[ Inventory Plus+ for Minetest Copyright (c) 2012 cornernote, Brett O'Donnell <cornernote@gmail.com> Copyright (c) 2013 Zeg9 <dazeg9@gmail.com> Source Code: https://github.com/Zeg9/minetest-inventory_plus License: GPLv3 ]]-- --[[ TODO: * Include a few button textures, especially for "abandoned" mods -> Done:...
lgpl-2.1
arvindr21/esp8266-devkit
Espressif/examples/nodemcu-firmware/tools/utils.lua
48
11997
-- Generic utility functions module( ..., package.seeall ) local lfs = require "lfs" local sf = string.format -- Taken from Lake dir_sep = package.config:sub( 1, 1 ) is_os_windows = dir_sep == '\\' -- Converts a string with items separated by 'sep' into a table string_to_table = function( s, sep ) if type( s ) ~= ...
gpl-3.0
DBarney/luvit
tests/to-convert/test-tls-junk-closes-server.lua
6
1189
--[[ Copyright 2012 The Luvit Authors. All Rights Reserved. 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 agre...
apache-2.0
TheLazar42/Reign-of-Darkness
builtin/mm_menubar.lua
1
2459
--Minetest --Copyright (C) 2013 sapier -- --This program is free software; you can redistribute it and/or modify --it under the terms of the GNU Lesser General Public License as published by --the Free Software Foundation; either version 2.1 of the License, or --(at your option) any later version. -- --This program is ...
lgpl-2.1
xztraz/domoticz
dzVents/runtime/device-adapters/generic_device.lua
6
3542
local Time = require('Time') local TimedCommand = require('TimedCommand') -- some states will be 'booleanized' local function stateToBool(state, _states) state = string.lower(state) local info = _states[state] local b if (info) then b = _states[state]['b'] end if (b == nil) then b = false end return b end l...
gpl-3.0
szczukot/domoticz
scripts/lua/script_time_demo.lua
55
1932
-- demo time script -- script names have three name components: script_trigger_name.lua -- trigger can be 'time' or 'device', name can be any string -- domoticz will execute all time and device triggers when the relevant trigger occurs -- -- copy this script and change the "name" part, all scripts named "demo" are ign...
gpl-3.0
xztraz/domoticz
scripts/lua/script_time_demo.lua
55
1932
-- demo time script -- script names have three name components: script_trigger_name.lua -- trigger can be 'time' or 'device', name can be any string -- domoticz will execute all time and device triggers when the relevant trigger occurs -- -- copy this script and change the "name" part, all scripts named "demo" are ign...
gpl-3.0
LegendsOfDota/LegendsOfDota
src/scripts/vscripts/dedicated.lua
1
9903
print('Loaded LoD dedicated file!') -- How long to wait after the match ends before killing the server local endGameDelay = 15 -- If we have started or not local hasStarted = false -- Load bans local bans function loadBans() -- Reload steamID64s bans = LoadKeyValues('scripts/kv/banned.kv'); end loadBans() -...
gpl-3.0
LeMagnesium/minetest-minetestforfun-server
mods/meru/init.lua
8
5621
-- Parameters local COORD = false -- Print tower co-ordinates to terminal (cheat) local XMIN = 1000 -- Area for the meru mountain spawn local XMAX = 1000 local ZMIN = 14000 local ZMAX = 14000 local BASRAD = 64 -- Average radius at y = -32 local HEIGHT = 2048 -- Approximate height measured from y = -32 local CONVEX =...
unlicense
lidaohang/luajson
tests/test.lua
8
2294
-- Additional path that may be required require("json") local testStrings = { [[{1:[1213.3e12, 123 , 123, "hello", [12, 2], {1:true /*test*/}]}]], [[{"username":"demo1","message":null,"password":""}]], [[{"challenge":"b64d-fnNQ6bRZ7CYiNIKwmdHoNgl9JR9MIYtzjBhpQzYXCFrgARt9mNmgUuO7FoODGr1NieT9yTeB2SLztGkvIA4NXmN9Bi27h...
mit
LeMagnesium/minetest-minetestforfun-server
mods/mff/mff_quests/init.lua
5
7545
mff.quests = {} mff.QPREFIX = "mff_quests:" mff.QNOPREFIX = function(s) return s:sub(mff.QPREFIX:len()+1) end quests.set_hud_position(1, 0.31) quests.set_hud_offset(-200, 0) mff.quests.quests = { still_testing_quests = { title = "Stone digger", description = "DAILY QUEST!\nGet five Super Apple at the end!", re...
unlicense
Chilastra-Reborn/Chilastra-source-code
bin/scripts/commands/guild.lua
4
2108
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
agpl-3.0
szagoruyko/nn
Parallel.lua
39
3780
local Parallel, parent = torch.class('nn.Parallel', 'nn.Container') function Parallel:__init(inputDimension,outputDimension) parent.__init(self) self.modules = {} self.size = torch.LongStorage() self.inputDimension = inputDimension self.outputDimension = outputDimension end function Parallel:updateOut...
bsd-3-clause
Chilastra-Reborn/Chilastra-source-code
bin/scripts/mobile/dungeon/corellian_corvette/rebel/elite_novatrooper_commander.lua
2
1551
elite_novatrooper_commander = Creature:new { objectName = "@mob/creature_names:stormtrooper_novatrooper_elite_commander", randomNameType = NAME_STORMTROOPER_TAG, socialGroup = "imperial", faction = "imperial", level = 201, chanceHit = 16, damageMin = 1145, damageMax = 2000, baseXp = 19104, baseHAM = 160000, ...
agpl-3.0
moonlight/cave-adventure
data/scripts/CameraTarget.lua
2
1121
import("Object.lua") CameraTarget = Object:subclass { name = "CameraTarget"; setTarget = function(self, target, tween) if (tween == nil) then tween = true end if (not self.target or self.target.map ~= target.map or not tween) then self.fromX = target.x self.fromY = target.y self.x = ta...
gpl-2.0
Colettechan/darkstar
scripts/zones/Nashmau/npcs/Nanaroon.lua
13
1053
---------------------------------- -- Area: Nashmau -- NPC: Nanaroon -- Type: Item Deliverer -- @pos -2.404 -6 37.141 53 ----------------------------------- package.loaded["scripts/zones/Nashmau/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Nashmau/TextIDs"); -----------------...
gpl-3.0
zynjec/darkstar
scripts/zones/Vunkerl_Inlet_[S]/npcs/Leadavox.lua
9
1437
----------------------------------- -- Area: Vunkerl Inlet (S) (I-6) -- NPC: Leadavox -- Involved in Quests -- !pos 206 -32 316 ----------------------------------- local ID = require("scripts/zones/Vunkerl_Inlet_[S]/IDs"); require("scripts/globals/quests"); ----------------------------------- function onTrade(player,...
gpl-3.0
Vadavim/jsr-darkstar
scripts/zones/North_Gustaberg/npcs/qm2.lua
14
1694
----------------------------------- -- Area: North Gustaberg -- NPC: qm2 (???) -- Involved in Quest "As Thick As Thieves" -- @pos -232.924 99.107 442.990 106 ----------------------------------- package.loaded["scripts/zones/North_Gustaberg/TextIDs"] = nil; ----------------------------------- require("scripts/globals/s...
gpl-3.0
Vadavim/jsr-darkstar
scripts/zones/Mount_Zhayolm/Zone.lua
4
1717
----------------------------------- -- -- Zone: Mount_Zhayolm (61) -- ----------------------------------- package.loaded["scripts/zones/Mount_Zhayolm/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/zones/Mount_Zhayolm/TextIDs"); ------------------------------...
gpl-3.0
Colettechan/darkstar
scripts/zones/Dynamis-San_dOria/mobs/Wyrmgnasher_Bjakdek.lua
4
1086
----------------------------------- -- Area: Dynamis San d'Oria -- NPC: Wyrmgnasher Bjakdek -- Boss Trigger for Overlord's Tombstone ----------------------------------- ----------------------------------- -- onMobSpawn Action ----------------------------------- function onMobSpawn(mob) end; ------------------------...
gpl-3.0
Akamaru/Mikubot
plugins/reminder.lua
1
1279
function remindme(data) print('Cron: remindme') local receiver = data[1] local text = data[2] send_msg(receiver, text, ok_cb, false) end function run(msg, matches) if matches[2] == 's' then minutes = 1 seconds = tonumber(matches[1]) if seconds > 3600 then return 'Bitte nicht länger als eine Stunde!...
gpl-2.0
Vadavim/jsr-darkstar
scripts/commands/togglegm.lua
50
1876
--------------------------------------------------------------------------------------------------- -- func: togglegm -- desc: Toggles a GMs nameflags/icon. --------------------------------------------------------------------------------------------------- cmdprops = { permission = 1, parameters = "" }; funct...
gpl-3.0
zynjec/darkstar
scripts/commands/togglegm.lua
50
1876
--------------------------------------------------------------------------------------------------- -- func: togglegm -- desc: Toggles a GMs nameflags/icon. --------------------------------------------------------------------------------------------------- cmdprops = { permission = 1, parameters = "" }; funct...
gpl-3.0
Vadavim/jsr-darkstar
scripts/globals/mobskills/Vorpal_Wheel.lua
37
1063
--------------------------------------------- -- Vorpal Wheel -- -- Description: Throws a slicing wheel at a single target. -- Type: Physical -- Utsusemi/Blink absorb: No -- Range: Unknown -- Notes: Only used by Gulool Ja Ja, and will use it as a counterattack to any spells cast on him. Damage increases as his he...
gpl-3.0
lcf8858/Sample_Lua
frameworks/cocos2d-x/tests/lua-tests/src/NodeTest/NodeTest.lua
10
21008
local kTagSprite1 = 1 local kTagSprite2 = 2 local kTagSprite3 = 3 local kTagSlider = 4 local s = cc.Director:getInstance():getWinSize() local scheduler = cc.Director:getInstance():getScheduler() local function getBaseLayer() local layer = cc.Layer:create() Helper.initWithLayer(layer) return layer end ------...
mit
Vadavim/jsr-darkstar
scripts/zones/Western_Adoulin/npcs/Ishvad.lua
14
1796
----------------------------------- -- Area: Western Adoulin -- NPC: Ishvad -- Type: Shop NPC -- @zone 256 -- @pos 44 32 125 256 ----------------------------------- package.loaded["scripts/zones/Western_Adoulin/TextIDs"] = nil; ----------------------------------- require("scripts/globals/shop"); require("scripts/z...
gpl-3.0
Colettechan/darkstar
scripts/globals/items/serving_of_menemen.lua
18
1528
----------------------------------------- -- ID: 5586 -- Item: serving_of_menemen -- Food Effect: 3Hrs, All Races ----------------------------------------- -- HP 30 -- MP 30 -- Agility 1 -- Intelligence -1 -- HP recovered while healing 1 -- MP recovered while healing 1 ----------------------------------------- require...
gpl-3.0
zynjec/darkstar
scripts/globals/mobskills/seismostomp.lua
11
1209
--------------------------------------------- -- Seismostomp -- -- Description: Damage varies with TP. Additional effect: "Stun." -- Type: Physical (Blunt) -- -- --------------------------------------------- require("scripts/globals/settings") require("scripts/globals/status") require("scripts/globals/monstertpmoves...
gpl-3.0
Vadavim/jsr-darkstar
scripts/globals/weaponskills/cyclone.lua
1
1485
----------------------------------- -- Cyclone -- Dagger weapon skill -- Skill level: 125 -- Delivers an area attack that deals wind elemental damage. Damage varies with TP. -- This weapon skill is ranged and can be used from a distance (Up to 15'). -- Directly affected by Magic Attack Bonus. -- Aligned with the Breeze...
gpl-3.0
dkogan/notion-scripts
styles/look_outback.lua
2
3681
-- look_outback.lua : Mark Tran <mark@nirv.net> -- This style looks best when the alternative style is applied to "full" -- workspace frames. You can enable it by applying: _:set_mode('tiled-alt') -- as Lua code. -- -- View http://modeemi.fi/~tuomov/ion/faq/entries/Hiding_the_tab-bar.html -- for further details. if n...
gpl-3.0
Vadavim/jsr-darkstar
scripts/globals/items/cherry_macaron.lua
15
1273
----------------------------------------- -- ID: 5779 -- Item: cherry_macaron -- Food Effect: 30Min, All Races ----------------------------------------- -- Increases rate of synthesis success +3% -- Increases synthesis skill gain rate +3% ----------------------------------------- require("scripts/globals/status"); -...
gpl-3.0