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
dpino/snabb
lib/ljsyscall/syscall/linux/arm/ffi.lua
25
1602
-- arm specific definitions return { ucontext = [[ typedef int greg_t, gregset_t[18]; typedef struct sigcontext { unsigned long trap_no, error_code, oldmask; unsigned long arm_r0, arm_r1, arm_r2, arm_r3; unsigned long arm_r4, arm_r5, arm_r6, arm_r7; unsigned long arm_r8, arm_r9, arm_r10, arm_fp; unsigned l...
apache-2.0
Kthulupwns/darkstar
scripts/globals/spells/bluemagic/metallic_body.lua
3
1095
----------------------------------- -- Spell: Metallic Body ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); require("scripts/globals/bluemagic"); ----------------------------------- -- onSpellcast ----------------------------------- function onMagicCastingC...
gpl-3.0
Moe-/RunAway
button.lua
1
1146
class "Button" { x = 0, y = 0, width = 0; height = 0; image = nil; text = "Test"; hover = false; } function Button:__init(x, y, width, height, text, path) self.x = x self.y = y self.width = width self.height = height self.image = love.graphics.newImage(path); self.image:setFilter("nearest", "nearest") se...
mit
ZeroNoFun/The-Aperture
lua/entities/env_portal_paint.lua
2
4458
AddCSLuaFile( ) ENT.Type = "anim" ENT.Base = "base_entity" function ENT:SetupDataTables() self:NetworkVar( "Int", 0, "GelType" ) self:NetworkVar( "Bool", 1, "PLeft" ) self:NetworkVar( "Bool", 2, "PRight" ) self:NetworkVar( "Bool", 3, "PForward" ) self:NetworkVar( "Bool", 4, "PBack" ) self:NetworkVar( "In...
mit
Kthulupwns/darkstar
scripts/zones/LaLoff_Amphitheater/bcnms/ark_angels_2.lua
13
3037
----------------------------------- -- Area: LaLoff Amphitheater -- Name: Ark Angels 2 (Tarutaru) ----------------------------------- package.loaded["scripts/zones/LaLoff_Amphitheater/TextIDs"] = nil; ----------------------------------- require("scripts/zones/LaLoff_Amphitheater/TextIDs"); require("scripts/globals/mis...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Northern_San_dOria/npcs/Calovour.lua
36
1427
----------------------------------- -- Area: Northern San d'Oria -- NPC: Calovour -- Standard Info NPC ----------------------------------- package.loaded["scripts/zones/Northern_San_dOria/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/quests...
gpl-3.0
dios-game/dios-cocos-samples
src/lua-earth-warrior-3d/src/custom/api/Sequence3D.lua
9
2113
-------------------------------- -- @module Sequence3D -- @extend ActionInterval -- @parent_module cc -------------------------------- -- initializes the action -- @function [parent=#Sequence3D] initWithActions -- @param self -- @param #array_table arrayOfActions -- @return bool#bool ret (return value: bool) ...
mit
amin041/tele-dam-
plugins/weather.lua
1
1890
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finding weather in ", location) local url = BASE_URL url = url..'?q='..location..'&APPID=eedbc05ba060c787ab0614cad1f2e12b' url = url..'&units=metric' local b, c, h = http.request(url) if c ~= 200...
gpl-2.0
Kthulupwns/darkstar
scripts/zones/LaLoff_Amphitheater/npcs/qm0_5.lua
35
1154
----------------------------------- -- Area: LaLoff_Amphitheater -- NPC: qm0 (warp player outside after they win fight) ------------------------------------- package.loaded["scripts/zones/LaLoff_Amphitheater/TextIDs"] = nil; ------------------------------------- require("scripts/zones/LaLoff_Amphitheater/TextIDs"); ...
gpl-3.0
dreamsxin/otclient
modules/game_textmessage/textmessage.lua
8
5041
MessageSettings = { none = {}, consoleRed = { color = TextColors.red, consoleTab='Default' }, consoleOrange = { color = TextColors.orange, consoleTab='Default' }, consoleBlue = { color = TextColors.blue, consoleTab='Default' }, centerRed = { color = TextColors.red, consoleT...
mit
Alig96/nzombies
nzombies3/gamemode/door_system/sv_gameplay.lua
1
1581
function nz.Doors.Functions.OpenDoor( ent ) //Open the door and any other door with the same link ent:DoorUnlock() //Sync if ent.link != nil then nz.Doors.Data.OpenedLinks[ent.link] = true nz.Doors.Functions.SendSync() end end function nz.Doors.Functions.OpenLinkedDoors( link ) //Go through all the doors ...
gpl-3.0
Kthulupwns/darkstar
scripts/globals/spells/bio_iii.lua
5
2537
----------------------------------------- -- Spell: Bio III -- Deals dark damage that weakens an enemy's attacks and gruadually reduces its HP. -- caster:getMerit() returns a value which is equal to the number of merit points TIMES the value of each point -- Bio III value per point is '30' This is a constant set in...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Upper_Delkfutts_Tower/TextIDs.lua
5
1129
-- Variable TextID Description text -- General Texts ITEM_CANNOT_BE_OBTAINED = 6414; -- You cannot obtain the item <item>. Come back after sorting your inventory. ITEM_OBTAINED = 6417; -- Obtained: <item>. GIL_OBTAINED = 6418; -- Obtained <number> gil. KEYITEM_OBTAINED = 6420; -- Obtained...
gpl-3.0
Omar-Real/RealBot
plugins/set.lua
4
1437
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY OmarRea; ▀▄ ▄▀ ▀▄ ▄▀ BY OmarReal (Omar_Real7) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY OmarReal ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄▀▀...
gpl-2.0
Kthulupwns/darkstar
scripts/zones/Chateau_dOraguille/npcs/Perfaumand.lua
19
1642
----------------------------------- -- Area: Chateau d'Oraguille -- NPC: Perfaumand -- Involved in Quest: Lure of the Wildcat (San d'Oria) -- @pos -39 -3 69 233 ----------------------------------- package.loaded["scripts/zones/Chateau_dOraguille/TextIDs"] = nil; ----------------------------------- require("scripts/gl...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Port_Windurst/npcs/_6o7.lua
37
1091
----------------------------------- -- Area: Port Windurst -- NPC: Door: Arrivals Entrance -- @zone 240 -- @pos 212 -6 96 ----------------------------------- package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("script...
gpl-3.0
Velkon/DarkRP
entities/weapons/unarrest_stick/shared.lua
3
2991
AddCSLuaFile() if CLIENT then SWEP.PrintName = "Unarrest Baton" SWEP.Slot = 1 SWEP.SlotPos = 3 end DEFINE_BASECLASS("stick_base") SWEP.Instructions = "Left click to unarrest\nRight click to switch batons" SWEP.Spawnable = true SWEP.Category = "DarkRP (Utility)" SWEP.StickColor = Color(0, 255, 0) DarkR...
mit
Kthulupwns/darkstar
scripts/zones/Qulun_Dome/npcs/_441.lua
18
1528
----------------------------------- -- Area: Qulun Dome -- NPC: Door -- Involved in Mission: Limit Break 3 -- @pos 299.999 37.864 47.067 148 ----------------------------------- package.loaded["scripts/zones/Qulun_Dome/TextIDs"] = nil; ----------------------------------- require("scripts/globals/keyitems"); require("s...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Cape_Teriggan/npcs/HomePoint#1.lua
12
1195
----------------------------------- -- Area: Cape Teriggan -- NPC: HomePoint#1 -- @pos -303 -8 526 113 ----------------------------------- package.loaded["scripts/zones/Cape_Teriggan/TextIDs"] = nil; require("scripts/globals/settings"); require("scripts/zones/Cape_Teriggan/TextIDs"); require("scripts/globals/homepo...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Port_Bastok/npcs/Powhatan.lua
36
3269
----------------------------------- -- Area: Port Bastok -- NPC: Powhatan -- Starts & Ends Quest: Welcome to Bastok, Guest of Hauteur ----------------------------------- package.loaded["scripts/zones/Port_Bastok/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require...
gpl-3.0
aidansmyth/corona_game_template
overlay_template.lua
1
4149
--[[---------------------------------------------------------------------------- SCENE NAME: overlay_template.lua DATE: AUTHOR: SCENE NOTES: ------------------------------------------------------------------------------]] -------------------------------------------------------------------------------- -- ...
mit
Kthulupwns/darkstar
scripts/zones/Phomiuna_Aqueducts/npcs/_0rr.lua
17
1455
----------------------------------- -- Area: Phomiuna_Aqueducts -- NPC: Oil lamp -- @pos -60 -23 60 27 ----------------------------------- package.loaded["scripts/zones/Phomiuna_Aqueducts/TextIDs"] = nil; ----------------------------------- require("scripts/globals/missions"); require("scripts/zones/Phomiuna...
gpl-3.0
aa65535/luci
applications/luci-app-asterisk/luasrc/model/cbi/asterisk-mod-res-feature.lua
22
3988
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. cbimap = Map("asterisk", "asterisk", "") featuremap = cbimap:section(TypedSection, "featuremap", "Feature Key maps", "") featuremap.anonymous = true featurema...
apache-2.0
jlopenwrtluci/luci
applications/luci-app-asterisk/luasrc/model/cbi/asterisk-mod-pbx.lua
68
1923
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. cbimap = Map("asterisk", "asterisk", "") module = cbimap:section(TypedSection, "module", "Modules", "") module.anonymous = true pbx_ael = module:option(ListV...
apache-2.0
Kthulupwns/darkstar
scripts/zones/Upper_Jeuno/npcs/Ilumida.lua
17
5044
----------------------------------- -- Area: Upper Jeuno -- NPC: Ilumida -- Starts and Finishes Quest: A Candlelight Vigil -- @pos -75 -1 58 244 ----------------------------------- package.loaded["scripts/zones/Upper_Jeuno/TextIDs"] = nil; package.loaded["scripts/globals/settings"] = nil; ----------------------...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Oldton_Movalpolos/npcs/Treasure_Chest.lua
12
3003
----------------------------------- -- Area: Oldton Movalpolos -- NPC: Treasure Chest -- @zone 11 ----------------------------------- package.loaded["scripts/zones/Oldton_Movalpolos/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/keyitems"); require("...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Bibiki_Bay/npcs/Toh_Zonikki.lua
11
4705
----------------------------------- -- Area: Bibiki Bay -- NPC: Toh Zonikki -- Type: Clamming NPC -- @pos -371 -1 -421 4 ----------------------------------- package.loaded["scripts/zones/Bibiki_Bay/TextIDs"] = nil; require("scripts/zones/Bibiki_Bay/TextIDs"); require("scripts/globals/keyitems"); -------------------...
gpl-3.0
kuoruan/luci
applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua
4
6474
-- Copyright 2017 Yousong Zhou <yszhou4tech@gmail.com> -- Licensed to the public under the Apache License 2.0. local _up = getfenv(3) local ut = require("luci.util") local sys = require("luci.sys") local ds = require("luci.dispatcher") local nw = require("luci.model.network") nw.init() module("luci.model.shadowsocks-l...
apache-2.0
mlody1039/ModernOts
data/npc/scripts/TP/boat_yalahar.lua
2
5444
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function ...
gpl-3.0
SharpWoW/Spamalicious
main.lua
1
3802
--[[ ~ Copyright (c) 2014 by Adam Hellberg <sharparam@sharparam.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 restriction, including without limitation the rights ~ to...
mit
shkan/telebot
plugins/add_bot.lua
189
1492
--[[ Bot can join into a group by replying a message contain an invite link or by typing !add [invite link]. URL.parse cannot parsing complicated message. So, this plugin only works for single [invite link] in a post. [invite link] may be preceeded but must not followed by another characters. --]] do local function...
gpl-2.0
Kthulupwns/darkstar
scripts/globals/spells/bluemagic/refueling.lua
3
1074
----------------------------------------- -- Spell: Refueling -- Overwrites Intimidate (Pugil), Sticky Thread (Crawler), and Horror Cloud (Skeleton) -- Cannot be overwriten by Intimidate or Horror Cloud -- Overwriten by, and cannot overwrite, Slow, Slowga, Haste, Hastega, and Spider Web ---------------------------...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/The_Shrine_of_RuAvitau/npcs/qm2.lua
5
1640
----------------------------------- -- Area: The Shrine of Ru'Avitau -- NPC: ??? (Spawn Kirin) -- @pos -81 32 2 178 ----------------------------------- package.loaded["scripts/zones/The_Shrine_of_RuAvitau/TextIDs"] = nil; ----------------------------------- require("scripts/zones/The_Shrine_of_RuAvitau/TextID...
gpl-3.0
telbbs/luci-0.12
libs/nixio/axTLS/www/lua/download.lua
180
1550
#!/usr/local/bin/lua require"luasocket" function receive (connection) connection:settimeout(0) local s, status = connection:receive (2^10) if status == "timeout" then coroutine.yield (connection) end return s, status end function download (host, file, outfile) --local f = assert (io.open (outfile, "w")) loc...
apache-2.0
LuaDist2/lj2procfs
testy/test_procfs_procs.lua
3
1731
--test_procfs_procids.lua package.path = "../?.lua;"..package.path; local procfs = require("lj2procfs.procfs") local fun = require("lj2procfs.fun") local Decoders = require("lj2procfs.Decoders") local putil = require("lj2procfs.print-util") local function printTable(name, tbl, indent) indent = indent or "" --prin...
mit
Kthulupwns/darkstar
scripts/globals/items/slice_of_diatryma_meat.lua
18
1290
----------------------------------------- -- ID: 5290 -- Item: Slice of Diatryma Meat -- Effect: 5 Minutes, food effect, Galka Only ----------------------------------------- -- Strength +3 -- Intelligence -5 ----------------------------------------- require("scripts/globals/status"); ---------------------------------...
gpl-3.0
rohanp/Algorithm-Implementations
Euclidean_algorithm/Lua/Yonaba/euclidian.lua
27
1312
-- Checks if a is an integer value local function isInt(a) return math.floor(a) == a end -- Performs checks and provides early exit -- a, b must be positive integers -- handles GCD(a,0) = a, GCD(0,b) = b -- GCD(0,0) do not exist -- See: http://en.wikipedia.org/wiki/Binary_GCD_algorithm#Algorithm local function checkA...
mit
punisherbot/punisherbot
plugins/get.lua
613
1067
local function get_variables_hash(msg) if msg.to.type == 'chat' then return 'chat:'..msg.to.id..':variables' end if msg.to.type == 'user' then return 'user:'..msg.from.id..':variables' end end local function list_variables(msg) local hash = get_variables_hash(msg) if hash then local names =...
gpl-2.0
xvaara/kong
spec/unit/core/resolver_spec.lua
2
13023
-- Stubs require "kong.tools.ngx_stub" local resolver = require "kong.core.resolver" local APIS_FIXTURES = { -- request_host {name = "mockbin", request_host = "mockbin.com", upstream_url = "http://mockbin.com"}, {name = "mockbin", request_host = "mockbin-auth.com", upstream_url = "http://mockbin.com"}, {name ...
apache-2.0
jarsy/sipml5
asterisk/etc/extensions.lua
317
5827
CONSOLE = "Console/dsp" -- Console interface for demo --CONSOLE = "DAHDI/1" --CONSOLE = "Phone/phone0" IAXINFO = "guest" -- IAXtel username/password --IAXINFO = "myuser:mypass" TRUNK = "DAHDI/G2" TRUNKMSD = 1 -- TRUNK = "IAX2/user:pass@provider" -- -- Extensions are expected to be defined in a global table ...
bsd-3-clause
ArcadiaGamingNetwork/AGC-DarkRP-Configuration
lua/darkrp_modules/tcb_hud_2/cl_main.lua
1
18072
/*--------------------------------------------------------------------------- Creator: TheCodingBeast - TheCodingBeast.com This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-n...
mit
kuoruan/luci
modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/backupfiles.lua
75
2451
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. if luci.http.formvalue("cbid.luci.1._list") then luci.http.redirect(luci.dispatcher.build_url("admin/system/flashops/backupfiles") .. "?display=list") elseif ...
apache-2.0
FlightControl-Master/DCS-API
DCSStaticObject.lua
1
1398
------------------------------------------------------------------------------- -- @module DCSStaticObject ------------------------------------------------------------------------------- -- @module StaticObject -- @extends CoalitionWrapper.Object#CoalitionObject --- Represents static object added in the Miss...
gpl-3.0
kevin-ye/CCsemitree
tree.lua
1
1580
local waittime = 5 ---- pos_fix function pos_fix() turtle.select(1) while (not turtle.detectDown()) do turtle.down() end end ---- tree_grown function wait_tree_grown() pos_fix() print("Waiting for new tree to grow...") turtle.up() while (not turtle.detect()) do sleep(waittime) end print("New tree grew."...
mit
Kthulupwns/darkstar
scripts/zones/Throne_Room/Zone.lua
32
1638
----------------------------------- -- -- Zone: Throne_Room (165) -- ----------------------------------- package.loaded["scripts/zones/Throne_Room/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/zones/Throne_Room/TextIDs"); ------------------------...
gpl-3.0
mafi-hamyarbott/hamyargroup
plugins/bot_manager.lua
89
6427
local function set_bot_photo(msg, success, result) local receiver = get_receiver(msg) if success then local file = 'data/photos/bot.jpg' print('File downloaded to:', result) os.rename(result, file) print('File moved to:', file) set_profile_photo(file, ok_cb, false) send_large_msg(receiver, '...
gpl-2.0
scottcs/wyx
wyx/util.lua
1
11253
local select, type, tostring = select, type, tostring local pairs, error, setmetatable = pairs, error, setmetatable local format, io_stderr = string.format, io.stderr local string_len, string_byte = string.len, string.byte local sqrt, tonumber = math.sqrt, tonumber local floor = math.floor local collectgarbage = collec...
mit
mafi-hamyarbott/hamyargroup
plugins/inpm.lua
59
3138
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
Kthulupwns/darkstar
scripts/zones/Yuhtunga_Jungle/npcs/Zorchorevi_RK.lua
30
3059
----------------------------------- -- Area: Yuhtunga Jungle -- NPC: Zorchorevi, R.K. -- Outpost Conquest Guards -- @pos -242.487 -1 -402.772 123 ----------------------------------- package.loaded["scripts/zones/Yuhtunga_Jungle/TextIDs"] = nil; ----------------------------------- require("scripts/globals/conquest"); ...
gpl-3.0
dpino/snabb
src/lib/tsc.lua
3
3162
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. -- Provide a time stamp counter suitable for measuring time intervals. module(...,package.seeall) local lib = require("core.lib") local C = require("ffi").C require("core.lib_h") default_source = 'rdtsc' local calibration_interval = 5e...
apache-2.0
VanessaE/minetest_game
mods/beds/api.lua
7
4902
local reverse = true local function destruct_bed(pos, n) local node = minetest.get_node(pos) local other if n == 2 then local dir = minetest.facedir_to_dir(node.param2) other = vector.subtract(pos, dir) elseif n == 1 then local dir = minetest.facedir_to_dir(node.param2) other = vector.add(pos, dir) end ...
lgpl-2.1
Kthulupwns/darkstar
scripts/zones/Toraimarai_Canal/npcs/qm9.lua
23
1404
----------------------------------- -- Area: Toraimarai Canal -- NPC: ??? -- Involved In Quest: Wild Card -- @zone 169 // not accurate -- @pos 220 16 -50 // not accurate ----------------------------------- package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; ----------------------------------- require("scr...
gpl-3.0
mightymadTV/gmod_deathmatch
teamdeathmatch/entities/entities/base_ai/tasks.lua
3
2113
--[[--------------------------------------------------------- Task: PlaySequence Accepts: data.ID - sequence id data.Name - sequence name (Must provide either id or name) data.Wait - Optional. Should we wait for sequence to finish data.Speed - Optional. Playback speed of sequence data.Loop - O...
gpl-2.0
ark120202/aabs
game/scripts/vscripts/heroes/hero_apocalypse/modifier_apocalypse_apocalypse.lua
1
2277
modifier_apocalypse_apocalypse = class({}) function modifier_apocalypse_apocalypse:OnCreated(t) if IsServer() then self:StartIntervalThink(0.03) end local ability = self:GetAbility() self.magic_resistance_per_second_pct = ability:GetSpecialValueFor("magic_resistance_per_second_pct") self.damage_per_second_pct =...
mit
Kthulupwns/darkstar
scripts/globals/weaponskills/wasp_sting.lua
12
1538
----------------------------------- -- Wasp Sting -- Dagger weapon skill -- Skill level: 5 -- Poisons target. Duration of effect varies with TP. -- Will stack with Sneak Attack. -- Aligned with the Soil Gorget. -- Aligned with the Soil Belt. -- Element: None -- Modifiers: : DEX:100% -- 100%TP 200%TP 300...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Port_San_dOria/npcs/_6g7.lua
20
1144
----------------------------------- -- Area: Port San d'Oria -- NPC: Door: Arrivals Entrance -- @zone 232 -- @pos -24 -8 15 ----------------------------------- package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scri...
gpl-3.0
rohanp/Algorithm-Implementations
Heap_Sort/Lua/Yonaba/heapsort.lua
27
2212
-- Heap sort implementation -- See: http://en.wikipedia.org/wiki/Heapsort -- Binary heap data structure implementation -- Based on http://github.com/Yonaba/Binary-Heaps -- Percolates up local function sift_up(heap, index) if index == 1 then return end local pIndex if index <= 1 then return end if index % 2 ==...
mit
wang-bin/mpv
player/lua/defaults.lua
4
15599
-- Compatibility shim for lua 5.2/5.3 unpack = unpack or table.unpack -- these are used internally by lua.c mp.UNKNOWN_TYPE.info = "this value is inserted if the C type is not supported" mp.UNKNOWN_TYPE.type = "UNKNOWN_TYPE" mp.ARRAY.info = "native array" mp.ARRAY.type = "ARRAY" mp.MAP.info = "native map" mp.MAP.typ...
gpl-2.0
dreamsxin/otclient
modules/corelib/table.lua
9
3512
-- @docclass table function table.dump(t, depth) if not depth then depth = 0 end for k,v in pairs(t) do str = (' '):rep(depth * 2) .. k .. ': ' if type(v) ~= "table" then print(str .. tostring(v)) else print(str) table.dump(v, depth+1) end end end function table.clear(t) for ...
mit
Kthulupwns/darkstar
scripts/zones/Outer_Horutoto_Ruins/npcs/_5ee.lua
19
3311
----------------------------------- -- Area: Inner Horutoto Ruins -- NPC: Ancient Magical Gizmo #1 (E out of E, F, G, H, I, J) -- Involved In Mission: The Heart of the Matter ----------------------------------- package.loaded["scripts/zones/Outer_Horutoto_Ruins/TextIDs"] = nil; ---------------------------------...
gpl-3.0
FPtje/DarkRP
gamemode/modules/fadmin/sh_fadmin_darkrp.lua
1
2555
FAdmin = FAdmin or {} FAdmin.PlayerActions = FAdmin.PlayerActions or {} FAdmin.StartHooks = FAdmin.StartHooks or {} --[[ Utilities! ]] function FAdmin.FindPlayer(info) if not info then return nil end local pls = player.GetAll() local found = {} if string.lower(info) == "*" or string.lower(info) == ...
mit
Kthulupwns/darkstar
scripts/zones/The_Boyahda_Tree/npcs/Grounds_Tome.lua
34
1137
----------------------------------- -- Area: The Boyahda Tree -- NPC: Grounds Tome ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/groundsofvalor"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrad...
gpl-3.0
dpino/snabb
lib/ljsyscall/syscall/linux/constants.lua
8
76404
-- tables of constants local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string local abi = require "syscall.abi" loc...
apache-2.0
Godfather021/tg
plugins/img_google.lua
660
3196
do local mime = require("mime") local google_config = load_from_file('data/google.lua') local cache = {} --[[ local function send_request(url) local t = {} local options = { url = url, sink = ltn12.sink.table(t), method = "GET" } local a, code, headers, status = http.request(options) return tabl...
gpl-2.0
hamed9898/uzzbott
plugins/img_google.lua
660
3196
do local mime = require("mime") local google_config = load_from_file('data/google.lua') local cache = {} --[[ local function send_request(url) local t = {} local options = { url = url, sink = ltn12.sink.table(t), method = "GET" } local a, code, headers, status = http.request(options) return tabl...
gpl-2.0
punisherbot/punisherbot
plugins/img_google.lua
660
3196
do local mime = require("mime") local google_config = load_from_file('data/google.lua') local cache = {} --[[ local function send_request(url) local t = {} local options = { url = url, sink = ltn12.sink.table(t), method = "GET" } local a, code, headers, status = http.request(options) return tabl...
gpl-2.0
Kthulupwns/darkstar
scripts/zones/Garlaige_Citadel/npcs/qm19.lua
57
2137
----------------------------------- -- Area: Garlaige Citadel -- NPC: qm19 (??? - Bomb Coal Fragments) -- Involved in Quest: In Defiant Challenge -- @pos -50.175 6.264 251.669 200 ----------------------------------- package.loaded["scripts/zones/Garlaige_Citadel/TextIDs"] = nil; ----------------------------------- re...
gpl-3.0
Kthulupwns/darkstar
scripts/globals/items/shogun_rice_ball.lua
14
1764
----------------------------------------- -- ID: 4278 -- Item: shogun_rice_ball -- Food Effect: 60Min, All Races ----------------------------------------- -- HP +20, Dex +4, Vit +4, Chr +4. (Atk +50, Def +30, DA% +5) * number of enhancing gear ----------------------------------------- require("scripts/globals...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Metalworks/npcs/Mythily.lua
17
2002
----------------------------------- -- Area: Metalworks -- NPC: Mythily -- Type: Immigration NPC -- @pos 94 -20 -8 237 ----------------------------------- require("scripts/globals/conquest"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(play...
gpl-3.0
Kthulupwns/darkstar
scripts/globals/items/plate_of_homemade_risotto.lua
35
1131
----------------------------------------- -- ID: 5229 -- Item: plate_of_homemade_risotto -- Food Effect: 30Min, All Races ----------------------------------------- -- Mind 1 ----------------------------------------- require("scripts/globals/status"); ----------------------------------------- -- OnItemCheck...
gpl-3.0
telergybot/telergybot
plugins/domaintools.lua
359
1494
local ltn12 = require "ltn12" local https = require "ssl.https" -- 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 check(name) local api = "https://domainsearch.p.mashape.com/index.php?"...
gpl-2.0
hamed9898/uzzbott
plugins/domaintools.lua
359
1494
local ltn12 = require "ltn12" local https = require "ssl.https" -- 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 check(name) local api = "https://domainsearch.p.mashape.com/index.php?"...
gpl-2.0
Kthulupwns/darkstar
scripts/globals/items/piscators_skewer.lua
36
1339
----------------------------------------- -- ID: 5983 -- Item: Piscator's Skewer -- Food Effect: 60 Mins, All Races ----------------------------------------- -- Dexterity 3 -- Vitality 4 -- Defense % 26 Cap 155 ----------------------------------------- require("scripts/globals/status"); ------------------------------...
gpl-3.0
fegimanam/kurdbot
plugins/webshot.lua
919
1473
local helpers = require "OAuth.helpers" local base = 'https://screenshotmachine.com/' local url = base .. 'processor.php' local function get_webshot_url(param) local response_body = {} local request_constructor = { url = url, method = "GET", sink = ltn12.sink.table(response_body), header...
gpl-2.0
punisherbot/punisherbot
plugins/webshot.lua
919
1473
local helpers = require "OAuth.helpers" local base = 'https://screenshotmachine.com/' local url = base .. 'processor.php' local function get_webshot_url(param) local response_body = {} local request_constructor = { url = url, method = "GET", sink = ltn12.sink.table(response_body), header...
gpl-2.0
aa65535/luci
applications/luci-app-wol/luasrc/model/cbi/wol.lua
7
2604
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local sys = require "luci.sys" local fs = require "nixio.fs" m = SimpleForm("wol", translate("Wake on LAN"), translate("Wake on LAN is a mechanism to remotely boot computers in the local network.")) m.submit...
apache-2.0
Kthulupwns/darkstar
scripts/zones/Al_Zahbi/npcs/Bjibar.lua
38
1024
----------------------------------- -- Area: Al Zahbi -- NPC: Bjibar -- Type: Standard NPC -- @zone: 48 -- @pos -105.178 0.999 60.115 -- -- Auto-Script: Requires Verification (Verified by Brawndo) ----------------------------------- package.loaded["scripts/zones/Al_Zahbi/TextIDs"] = nil; -------------------------...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Windurst_Woods/npcs/Anillah.lua
12
1765
----------------------------------- -- Area: Windurst Woods -- NPC: Anillah -- Type: Clothcraft Image Support -- @pos -34.800 -2.25 -119.950 241 ----------------------------------- package.loaded["scripts/zones/Windurst_Woods/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Windurst_Woo...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Sauromugue_Champaign/npcs/Stone_Monument.lua
32
1305
----------------------------------- -- Area: Sauromugue Champaign -- NPC: Stone Monument -- Involved in quest "An Explorer's Footsteps" -- @pos 77.544 -2.746 -184.803 120 ----------------------------------- package.loaded["scripts/zones/Sauromugue_Champaign/TextIDs"] = nil; ---------------------------------...
gpl-3.0
JamesWilko/Payday-2-BLT-Lua
mods/base/req/ui/BLTModsGui.lua
1
8258
BLT:Require("req/ui/BLTUIControls") BLT:Require("req/ui/BLTModItem") BLT:Require("req/ui/BLTViewModGui") BLTModsGui = BLTModsGui or blt_class( MenuGuiComponentGeneric ) BLTModsGui.last_y_position = 0 local padding = 10 local massive_font = tweak_data.menu.pd2_massive_font local large_font = tweak_data.menu.pd2_larg...
mit
telergybot/telergybot
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
hamed9898/uzzbott
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
Wiladams/LJIT2Win32
WinSock_Utils.lua
1
14532
local ffi = require "ffi" local wsock = require "win_socket" local SocketType = wsock.SocketType local Protocol = wsock.Protocol local Family = wsock.Family -- Startup windows sockets local SocketLib = ffi.load("ws2_32") --[[ Casual Macros --]] function IN4_CLASSA(i) return (band(i, 0x00000080) == 0) end functi...
mit
dios-game/dios-cocos-samples
src/lua-coin-tree/Resources/src/dxm/ui/ui_manager.lua
3
5463
-- region NewFile_1.lua -- Author : IBM -- Date : 2015/4/28 -- 此文件由[BabeLua]插件自动生成 require("dxm/common/singleton") require("dxm/ui/layer_ui") require "dxm/ui/top_touch_mask_ui" dxm = dxm or { } dxm.CUIManager = class("CUIManager") dxm.UIOrder = { kUIOrderBackground = 1, kUIOrderStack = 2, kUIOrderShortcut = 3, ...
mit
Kthulupwns/darkstar
scripts/zones/Port_San_dOria/npcs/Eddy.lua
38
1038
----------------------------------- -- Area: Port San d'Oria -- NPC: Eddy -- Type: NPC Quest Giver -- @zone: 232 -- @pos -5.209 -8.999 39.833 -- -- Auto-Script: Requires Verification (Verified by Brawndo) ----------------------------------- package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil; -----------...
gpl-3.0
kuoruan/luci
protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6to4.lua
72
1073
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local ipaddr, defaultroute, metric, ttl, mtu ipaddr = section:taboption("general", Value, "ipaddr", translate("Local IPv4 address"), translate("Leave empty to use the current W...
apache-2.0
matinbot/antispamgram
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
Mahyar0098/Cj-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
dreamsxin/otclient
modules/corelib/ui/uiminiwindow.lua
6
10415
-- @docclass UIMiniWindow = extends(UIWindow, "UIMiniWindow") function UIMiniWindow.create() local miniwindow = UIMiniWindow.internalCreate() return miniwindow end function UIMiniWindow:open(dontSave) self:setVisible(true) if not dontSave then self:setSettings({closed = false}) end signalcall(self.o...
mit
BYU-MarsRover/Prime-Resources
RoverLink/roverlink.lua
2
1362
p_roverlink = Proto ("roverlink","BYU RoverLink") local f_command = ProtoField.uint16("roverlink.command", "Command", base.HEX) local f_data = ProtoField.string("roverlink.data", "Data", FT_STRING) p_roverlink.fields = {f_command} -- roverlink dissector function function p_roverlink.dissector (buf, pkt, root...
gpl-2.0
dpino/snabb
src/lib/lpm/lpm4_poptrie.lua
9
6227
module(..., package.seeall) local ffi = require("ffi") local C = ffi.C local bit = require("bit") local lpm4_trie = require("lib.lpm.lpm4_trie").LPM4_trie local bor, band, lshift, rshift, bnot = bit.bor, bit.band, bit.lshift, bit.rshift, bit.bnot local tohex = bit.tohex local ip4 = require("lib.lpm.ip4") local masked ...
apache-2.0
alioshii/KASBAR
plugins/ar-banhammer.lua
6
13808
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY jOker ▀▄ ▄▀ ▀▄ ▄▀ BY joker (@fuck_8_you) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY joker ▀▄ ▄▀ ▀▄ ▄▀ broadcast : طرد و الحظر ▀▄ ▄▀ ▀▄...
gpl-2.0
shkan/telebot
plugins/location.lua
185
1565
-- 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
junrw/ember-gsoc2012
src/components/ogre/widgets/EntityPicker.lua
1
16807
----------------------------------------- --Widget which is shown when an entity is picked. Basically it's a menu which allows the user to perform actions on the entity. --TODO: -- * perhaps implement it as a pie menu with some nice icons? ----------------------------------------- EntityPicker = {} function Entit...
gpl-3.0
telergybot/telergybot
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
telbbs/luci-0.12
applications/luci-qos/luasrc/model/cbi/qos/qos.lua
41
2689
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- loc...
apache-2.0
Kthulupwns/darkstar
scripts/zones/Bastok_Markets/npcs/Oggodett.lua
36
1630
----------------------------------- -- Area: Bastok Markets -- NPC: Oggodett -- Only sells when Bastok controlls Aragoneu Region -- -- Updated Aug-09-2013 by Zerahn, based on bgwiki and gamerescape ----------------------------------- require("scripts/globals/shop"); require("scripts/globals/conquest"); packa...
gpl-3.0
telergybot/telergybot
plugins/id.lua
355
2795
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, resu...
gpl-2.0
Kthulupwns/darkstar
scripts/globals/abilities/thunder_maneuver.lua
2
1375
----------------------------------- -- Ability: Thunder Maneuver ----------------------------------- require("scripts/globals/status"); require("scripts/globals/magic"); ----------------------------------- -- onUseAbility ----------------------------------- function onAbilityCheck(player,target,ability) if (play...
gpl-3.0
Kthulupwns/darkstar
scripts/zones/Dynamis-Xarcabard/mobs/Animated_Spear.lua
17
1476
----------------------------------- -- Area: Dynamis Xarcabard -- NPC: Animated Spear ----------------------------------- require("scripts/globals/status"); require("scripts/zones/Dynamis-Xarcabard/TextIDs"); ----------------------------------- -- onMobEngaged ----------------------------------- functio...
gpl-3.0