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 |
|---|---|---|---|---|---|
Mleaf/mleaf_luci | modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua | 27 | 33913 | --[[
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 |
ASHRAF97/ASHRAFKASPERV3 | plugins/plugins.lua | 2 | 6457 | --[[
$ :)
-- - ( #MASCO_ماسكو ) - --
$ :)
-- - ( @IQ_ABS ) - --
$ :)
--Channel-( @DEV_PROX )--
$ :)
]]--
do
-- Returns the key (index) in the config.enabled_plugins table
local function plugin_enabled( name )
for k,v in pairs(_config.enabled_plugins) do
if name == v then
return k
end
... | gpl-2.0 |
aa65535/luci | applications/luci-app-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_config_mini.lua | 61 | 1063 | -- Copyright 2009 Daniel Dickinson
-- Licensed to the public under the Apache License 2.0.
require("luci.controller.luci_diag.devinfo_common")
m = Map("luci_devinfo", translate("Phone Scanning Configuration"), translate("Configure scanning for supported SIP devices on specified networks. Decreasing \'Timeout\', \'Rep... | apache-2.0 |
tanema/light_world.lua | lib/util.lua | 1 | 3183 | local util = {}
local tempCanvas
--TODO: the whole stencil/canvas system should be reviewed since it has been changed in a naive way
function util.process(canvas, options)
--TODO: now you cannot draw a canvas to itself
if not tempCanvas then
tempCanvas = love.graphics.newCanvas()
end
util.drawCanvasToCanva... | mit |
kinzhang/cocos2d-js-v3.2 | frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua | 10 | 1440 |
--------------------------------
-- @module PhysicsJointGroove
-- @extend PhysicsJoint
-- @parent_module cc
--------------------------------
--
-- @function [parent=#PhysicsJointGroove] setAnchr2
-- @param self
-- @param #vec2_table anchr2
--------------------------------
--
-- @function [parent=#PhysicsJ... | mit |
kinzhang/cocos2d-js-v3.2 | frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/EventController.lua | 10 | 1343 |
--------------------------------
-- @module EventController
-- @extend Event
-- @parent_module cc
--------------------------------
--
-- @function [parent=#EventController] getControllerEventType
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
--
-- @function [pa... | mit |
Kthulupwns/darkstar | scripts/zones/The_Garden_of_RuHmet/npcs/_0zu.lua | 19 | 1067 | -----------------------------------
-- Area: The Garden of Ru'Hmet
-- NPC: particle gate
-----------------------------------
require("scripts/globals/keyitems");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
---------------------... | gpl-3.0 |
Kthulupwns/darkstar | scripts/globals/items/timbre_timbers_taco.lua | 35 | 1566 | -----------------------------------------
-- ID: 5173
-- Item: timbre_timbers_taco
-- Food Effect: 1hour, All Races
-----------------------------------------
-- MP 20
-- Vitality -1
-- Agility 5
-- MP Recovered While Healing 3
-- Ranged Accuracy % 8 (cap 15)
-----------------------------------------
requir... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Den_of_Rancor/npcs/Grounds_Tome.lua | 34 | 1136 | -----------------------------------
-- Area: Den of Rancor
-- NPC: Grounds Tome
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/groundsofvalor");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(p... | gpl-3.0 |
dios-game/dios-cocos-samples | src/lua-coin-tree/Resources/src/app/views/reward_history_ui.lua | 4 | 1205 | --region *.lua
--Date
--此文件由[BabeLua]插件自动生成
require "app.views.reward_history_cell_ui"
game.CRewardHistoryUI = class("game.CRewardHistoryUI", dxm.CDialogUI)
local CRewardHistoryUI = game.CRewardHistoryUI
function CRewardHistoryUI:ctor()
CRewardHistoryUI.super.ctor(self)
end
function CRewardHistoryUI:Init()
... | mit |
Mleaf/mleaf_luci | applications/luci-radvd/luasrc/model/cbi/radvd/route.lua | 74 | 2503 | --[[
LuCI - Lua Configuration Interface
Copyright 2010 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
lo... | apache-2.0 |
Kthulupwns/darkstar | scripts/zones/RuAun_Gardens/TextIDs.lua | 5 | 1721 | -- Variable TextID Description text
-- General Texts
ITEM_CANNOT_BE_OBTAINED = 6379; -- You cannot obtain the item <item>. Come back after sorting your inventory.
FULL_INVENTORY_AFTER_TRADE = 6381; -- You cannot obtain the <item>. Try trading again after sorting your inventory.
ITEM_OBTAINED = 6382; ... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Al_Zahbi/npcs/Najelith.lua | 38 | 1028 | -----------------------------------
-- Area: Al Zahbi
-- NPC: Najelith
-- Type: Galeserpent General
-- @zone: 48
-- @pos -64.526 -8 39.372
--
-- Auto-Script: Requires Verification (Verified by Brawndo)
-----------------------------------
package.loaded["scripts/zones/Al_Zahbi/TextIDs"] = nil;
---------------------... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Crawlers_Nest_[S]/npcs/Chodopopo.lua | 38 | 1047 | ----------------------------------
-- Area: Crawlers' Nest [S]
-- NPC: Chodopopo
-- Type: Item Deliverer
-- @zone: 171
-- @pos 100.528 -32.272 -58.739
--
-----------------------------------
package.loaded["scripts/zones/Crawlers_Nest_[S]/TextIDs"] = nil;
require("scripts/zones/Crawlers_Nest_[S]/TextIDs");
-----... | gpl-3.0 |
LubyRuffy/haka | lib/haka/lua/lua/parse_result.lua | 5 | 1216 | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
local class = require('class')
local result = {}
result.Result = class.class('Result')
result.ArrayResult = class.... | mpl-2.0 |
Kthulupwns/darkstar | scripts/zones/Southern_San_dOria/npcs/Ophelia.lua | 36 | 1433 | -----------------------------------
-- Area: Southern San d'Oria
-- NPC: Ophelia
-- General Info NPC
-------------------------------------
package.loaded["scripts/zones/Southern_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/quests... | gpl-3.0 |
ToxicFrog/luautil | test/string.lua | 2 | 3042 | package.loaded.string = nil; require 'string'
TestString = {}
function TestString:test_tonumber()
lu.assertEquals(('asdf'):tonumber(), nil)
lu.assertEquals(('10'):tonumber(), 10)
lu.assertEquals(('10'):tonumber(16), 16)
end
function TestString:test_format_operator()
lu.assertEquals('%d %d %d' % 1 % 2, '1 2 %... | mit |
himamm/uzzbot | plugins/weather.lua | 351 | 1443 | do
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
local function get_weather(location)
print("Finding weather in ", location)
local url = BASE_URL
url = url..'?q='..location
url = url..'&units=metric'
local b, c, h = http.request(url)
if c ~= 200 then return nil end
local weather = ... | gpl-2.0 |
Kthulupwns/darkstar | scripts/zones/Kazham/npcs/Rauteinot.lua | 19 | 3016 | -----------------------------------
-- Area: Kazham
-- NPC: Rauteinot
-- Starts and Finishes Quest: Missionary Man
-- @zone 250
-- @pos -42 -10 -89
-----------------------------------
package.loaded["scripts/zones/Kazham/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings"... | gpl-3.0 |
Kthulupwns/darkstar | scripts/globals/items/meatloaf_+1.lua | 39 | 1388 | -----------------------------------------
-- ID: 5690
-- Item: Meatloaf +1
-- Food Effect: 3 Hrs, All Races
-----------------------------------------
-- TODO: Needs verification
-- Strength 6
-- Agility 2
-- Intelligence -2
-- Attack 25% Cap 85
-----------------------------------------
require("scripts/globals/status"... | gpl-3.0 |
Velkon/DarkRP | gamemode/modules/base/sv_interface.lua | 3 | 28835 | DarkRP.initDatabase = DarkRP.stub{
name = "initDatabase",
description = "Initialize the DarkRP database.",
parameters = {
},
returns = {
},
metatable = DarkRP
}
DarkRP.storeRPName = DarkRP.stub{
name = "storeRPName",
description = "Store an RP name in the database.",
parameters ... | mit |
Kthulupwns/darkstar | scripts/zones/Apollyon/mobs/Carnagechief_Jackbodokk.lua | 17 | 2425 | -----------------------------------
-- Area: Apollyon CS
-- NPC: Carnagechief_Jackbodokk
-----------------------------------
package.loaded["scripts/zones/Apollyon/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/limbus");
require("scripts/zones/Apollyon/TextIDs");
------------... | gpl-3.0 |
himamm/uzzbot | plugins/tweet.lua | 634 | 7120 | local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local twitter_url = "https://api.twitter.com/1.1/statuses/user_timeline.json"
local client = OAuth.new(consumer_key,
consumer_secret,
... | gpl-2.0 |
punisherbot/punisherbot | plugins/tweet.lua | 634 | 7120 | local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local twitter_url = "https://api.twitter.com/1.1/statuses/user_timeline.json"
local client = OAuth.new(consumer_key,
consumer_secret,
... | gpl-2.0 |
AGTMADCAT/naev | dat/events/tutorial/tutorial-heat.lua | 10 | 8757 | -- This is the tutorial: heat.
include("dat/events/tutorial/tutorial-common.lua")
include("enum.lua")
-- localization stuff, translators would work here
lang = naev.lang()
if lang == "es" then
else -- default english
title1 = "Tutorial: Heat"
message1 = [[Welcome to the heat tutorial.
In this tutorial we wil... | gpl-3.0 |
jlopenwrtluci/luci | modules/luci-base/luasrc/dispatcher.lua | 13 | 20582 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008-2015 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local nixio = require "nixi... | apache-2.0 |
amenophis1er/prosody-modules | mod_watchuntrusted/mod_watchuntrusted.lua | 20 | 2595 | local jid_prep = require "util.jid".prep;
local secure_auth = module:get_option_boolean("s2s_secure_auth", false);
local secure_domains, insecure_domains =
module:get_option_set("s2s_secure_domains", {})._items, module:get_option_set("s2s_insecure_domains", {})._items;
local untrusted_fail_watchers = module:get_opti... | mit |
Kthulupwns/darkstar | scripts/zones/AlTaieu/npcs/qm4.lua | 4 | 1553 | -----------------------------------
-- Area: Al'Taieu
-- NPC: ??? (Jailer of Love and Absolute Virtue Spawn)
-- Allows players to spawn the Jailer of Love by trading the Fourth Virtue, Fifth Virtue and Sixth Virtue to a ???.
-- Allows players to spawn Absolute Virtue by killing Jailer of Love.
-- @pos , 431 -0 -603
-... | gpl-3.0 |
Mleaf/mleaf_luci | libs/nixio/docsrc/nixio.fs.lua | 156 | 7907 | --- Low-level and high-level filesystem manipulation library.
module "nixio.fs"
--- Check user's permission on a file.
-- @class function
-- @name nixio.fs.access
-- @param path Path
-- @param mode1 First Mode to check ["f", "r", "w", "x"]
-- @param ... More Modes to check [-"-]
-- @return true
--- Strip the dire... | apache-2.0 |
Kthulupwns/darkstar | scripts/zones/Bhaflau_Thickets/npcs/_1g2.lua | 32 | 3570 | -----------------------------------
-- Area: Bhaflau Thickets
-- Door: Runic Seal
-- @pos -180 -6.8 -833 52
-----------------------------------
package.loaded["scripts/zones/Bhaflau_Thickets/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/keyitems");
require("scripts/globals/missions");
... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Lower_Jeuno/npcs/Zauko.lua | 17 | 5098 | -----------------------------------
-- Area: Lower Jeuno
-- NPC: Zauko
-- Involved in Quests: Save the Clock Tower, Community Service
-- @zone 245
-- @pos -3 0 11
-----------------------------------
package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil;
package.loaded["scripts/globals/settings"] = nil;
--... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Horlais_Peak/npcs/relic.lua | 42 | 1839 | -----------------------------------
-- Area: Horlais Peak
-- NPC: <this space intentionally left blank>
-- @pos 450 -40 -31 139
-----------------------------------
package.loaded["scripts/zones/Horlais_Peak/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Horlais_Peak/TextIDs");
-----------... | gpl-3.0 |
Kthulupwns/darkstar | scripts/globals/spells/advancing_march.lua | 13 | 1472 | -----------------------------------------
-- Spell: Advancing March
-- Gives party members Haste
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function onMagicCastingCheck(cast... | gpl-3.0 |
aa65535/luci | modules/luci-mod-admin-full/luasrc/controller/admin/network.lua | 6 | 10746 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2011-2015 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.admin.network", package.seeall)
function index()
local uci = require("luci.model.uci").cursor()
local page
page = node("admin... | apache-2.0 |
fegimanam/phw | plugins/invite.lua | 18 | 1191 | do
local function callbackres(extra, success, result) -- Callback for res_user in line 27
local user = 'user#id'..result.id
local chat = 'chat#id'..extra.chatid
if is_banned(result.id, extra.chatid) then -- Ignore bans
send_large_msg(chat, 'User is banned.')
elseif is_gbanned(result.id) then -- I... | gpl-2.0 |
Kthulupwns/darkstar | scripts/zones/Windurst_Waters/npcs/Angelica.lua | 36 | 5295 | -----------------------------------
-- Area: Windurst Waters
-- NPC: Angelica
-- Starts and Finished Quest: A Pose By Any Other Name
-- Working 100%
-- @zone = 238
-- @pos = -70 -10 -6
-----------------------------------
package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil;
-------------------------... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Lower_Jeuno/npcs/Taza.lua | 36 | 1722 | -----------------------------------
-- Area: Lower Jeuno
-- NPC: Taza
-- Standard Merchant NPC
-----------------------------------
require("scripts/globals/shop");
package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil;
require("scripts/zones/Lower_Jeuno/TextIDs");
-----------------------------------
--... | gpl-3.0 |
Kthulupwns/darkstar | scripts/globals/items/serving_of_frog_flambe.lua | 35 | 1741 | -----------------------------------------
-- ID: 4326
-- Item: serving_of_frog_flambe
-- Food Effect: 60Min, All Races
-----------------------------------------
-- Dexterity 3
-- Agility 2
-- Mind -2
-- Attack % 14
-- Attack Cap 65
-- Evasion 5
-- Ranged ATT % 14
-- Ranged ATT Cap 65
----------------------... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Aht_Urhgan_Whitegate/npcs/Sashosho.lua | 34 | 1033 | -----------------------------------
-- Area: Aht Urhgan Whitegate
-- NPC: Sashosho
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs");
---------... | gpl-3.0 |
dpino/snabb | src/lib/protocol/ethernet.lua | 12 | 3198 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local ffi = require("ffi")
local C = ffi.C
local lib = require("core.lib")
local header = require("lib.protocol.header")
local ipv6 = require("lib.protocol.ipv6")
local band = require("bit").band
local ntohs, hto... | apache-2.0 |
Kthulupwns/darkstar | scripts/globals/mobskills/Decussate.lua | 6 | 1029 | ---------------------------------------------
-- Decussate
--
-- Description: Performs a cross attack on nearby targets.
-- Type: Magical
-- Utsusemi/Blink absorb: 2-3 shadows?
-- Range: Less than or equal to 10.0
-- Notes: Only used by Gulool Ja Ja when below 35% health.
---------------------------------... | gpl-3.0 |
ark120202/aabs | game/scripts/vscripts/modules/chat/commands.lua | 1 | 6215 | CUSTOMCHAT_COMMAND_LEVEL_PUBLIC = 0
CUSTOMCHAT_COMMAND_LEVEL_CHEAT = 1
CUSTOMCHAT_COMMAND_LEVEL_DEVELOPER = 2
CUSTOMCHAT_COMMAND_LEVEL_CHEAT_DEVELOPER = 3
return {
["gold"] = {
level = CUSTOMCHAT_COMMAND_LEVEL_CHEAT,
f = function(args, hero)
Gold:ModifyGold(hero, tonumber(args[1]))
end
},
["spawnrune"] = {... | mit |
dpino/snabb | src/program/l2vpn/tunnels/l2tpv3.lua | 9 | 2360 | local l2tpv3 = require("lib.protocol.keyed_ipv6_tunnel")
local tobit = require("bit").tobit
local tunnel = subClass(nil)
tunnel.proto = 115
tunnel.class = l2tpv3
function tunnel:new (conf, use_cc, logger)
local o = tunnel:superClass().new(self)
o.conf = conf
-- The spec for L2TPv3 over IPv6 recommends to set... | apache-2.0 |
ningg/Atlas | examples/tutorial-warnings.lua | 40 | 2248 | --[[ $%BEGINLICENSE%$
Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
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; version 2 of the
License.
This program is dis... | gpl-2.0 |
Kthulupwns/darkstar | scripts/globals/items/nosteau_herring.lua | 17 | 1324 | -----------------------------------------
-- ID: 4482
-- Item: nosteau_herring
-- Food Effect: 5Min, Mithra only
-----------------------------------------
-- Dexterity 2
-- Mind -4
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnI... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Maquette_Abdhaljs-Legion/Zone.lua | 32 | 1184 | -----------------------------------
--
-- Zone: Maquette Abdhaljs-Legion
--
-----------------------------------
package.loaded["scripts/zones/Maquette_Abdhaljs-Legion/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/zones/Maquette_Abdhaljs-Legion/TextI... | gpl-3.0 |
aa65535/luci | applications/luci-app-multiwan/luasrc/model/cbi/multiwan/multiwanmini.lua | 148 | 2171 | require("luci.tools.webadmin")
m = Map("multiwan", translate("Multi-WAN"),
translate("Multi-WAN allows for the use of multiple uplinks for load balancing and failover."))
s = m:section(NamedSection, "config", "multiwan", "")
e = s:option(Flag, "enabled", translate("Enable"))
e.rmempty = false
e.default = "1"
funct... | apache-2.0 |
jlopenwrtluci/luci | applications/luci-app-ocserv/luasrc/model/cbi/ocserv/users.lua | 40 | 2110 | -- Copyright 2014 Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
-- Licensed to the public under the Apache License 2.0.
local dsp = require "luci.dispatcher"
local nixio = require "nixio"
m = Map("ocserv", translate("OpenConnect VPN"))
if m.uci:get("ocserv", "config", "auth") == "plain" then
--[[Users]]-... | apache-2.0 |
davegoopot/mcrcd-minetest-game | games/mcr_coderdojo/mods/screwdriver/init.lua | 3 | 4463 |
local mode_text = {
{"Change rotation, Don't change axisdir."},
{"Keep choosen face in front then rotate it."},
{"Change axis dir, Reset rotation."},
{"Bring top in front then rotate it."},
}
local opposite_faces = {
[0] = 5,
[1] = 2,
[2] = 1,
[3] = 4,
[4] = 3,
[5] = 0,
}
local function screwdriver_setmode... | lgpl-3.0 |
Sponk/neotris | scripts/SDK/OLight.lua | 1 | 4506 | ---The OLight class
--An 'OLight' instance is an light object in a scene which can be
--manipulated. The 'OLight' class is mostly used to manage lights in your
--3D scene.
--
--See also: <a href="Object3d.lua.html">Widget</a>
dofile("class.lua")
dofile("Object3d.lua")
---OLight(object3d)
--Create a new OLight object ... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/La_Theine_Plateau/TextIDs.lua | 3 | 2029 | -- Variable TextID Description text
-- General Texts
ITEM_CANNOT_BE_OBTAINED = 6379; -- You cannot obtain the item <item>. Come back after sorting your inventory.
ITEM_OBTAINED = 6382; -- Obtained: <item>.
GIL_OBTAINED = 6383; -- Obtained <number> gil.
KEYITEM_OBTAINED = 6385; -- Obtained... | gpl-3.0 |
Kthulupwns/darkstar | scripts/globals/magiantrials.lua | 33 | 9671 | -------------------------------------------
-- Magian trial functions, vars, tables
-------------------------------------------
-----------------------------------
-- getTrialInfo
-----------------------------------
-- once fully filled out, these info tables might get large enough to need their own file, we'll... | gpl-3.0 |
AGTMADCAT/naev | dat/ai/include/attack_profiles.lua | 11 | 2517 | --[[This file contains the attack profiles by ship type.
--commonly used range and condition-based attack patterns are found in another file
--Think functions for determining who to attack are found in another file
--]]
--[[
-- Main control function for bomber behavior.
-- Bombers are expected to have heavy weapons a... | gpl-3.0 |
Kthulupwns/darkstar | scripts/globals/utils.lua | 17 | 3118 |
utils = {};
function utils.clamp(input, min_val, max_val)
if input < min_val then
input = min_val;
elseif input > max_val then
input = max_val;
end
return input;
end;
function utils.stoneskin(target, dmg)
--handling stoneskin
if (dmg > 0) then
skin = target:getMod(MOD_... | gpl-3.0 |
kuoruan/luci | applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua | 30 | 1763 | -- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.rrdtool.definitions.openvpn", package.seeall)
function rrdargs( graph, plugin, plugin_instance )
local inst = plugin_instance:gsub("^openvpn%.(.+)%.status$", "%1")
return {
{
tit... | apache-2.0 |
Kthulupwns/darkstar | scripts/zones/Outer_Horutoto_Ruins/npcs/_5ef.lua | 19 | 3309 | -----------------------------------
-- Area: Inner Horutoto Ruins
-- NPC: Ancient Magical Gizmo #2 (F 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 |
czlc/ejoy2d | ejoy2d/richtext.lua | 5 | 8213 |
--------------------helpers--------------------
function string.char_len(str)
local _, len = string.gsub(str, "[^\128-\193]", "")
return len
end
function string.plain_format(str)
return string.gsub(str, "(#%[%w+%])", "")
end
local function is_ASCII_DBC_punct(unicode)
if not unicode then return false end
-- ... | mit |
Nehmulos/knight-game | cocos2d/cocos/scripting/lua/script/Deprecated.lua | 15 | 45720 | require "Cocos2d.lua"
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--functions of CCDirector will be deprecated,begin
local CCDirectorDeprecated = { }
function CCDirectorDeprecated.sharedDirector()... | gpl-3.0 |
wang-bin/mpv | player/lua/assdraw.lua | 33 | 2378 | local ass_mt = {}
ass_mt.__index = ass_mt
local function ass_new()
return setmetatable({ scale = 4, text = "" }, ass_mt)
end
function ass_mt.new_event(ass)
-- osd_libass.c adds an event per line
if #ass.text > 0 then
ass.text = ass.text .. "\n"
end
end
function ass_mt.draw_start(ass)
ass.... | gpl-2.0 |
AttacqueSuperior/Engine | mods/cnc/maps/nod06b/nod06b.lua | 2 | 7240 | --[[
Copyright 2007-2021 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you 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 vers... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Alzadaal_Undersea_Ruins/npcs/Runic_Portal.lua | 17 | 2017 | -----------------------------------
-- Area: Alzadaal Undersea Ruins
-- NPC: Runic Portal
-- Arrapago Reef Teleporter Back to Aht Urgan Whitegate
-- @pos 206.500 -1.220 33.500 72
-- @pos 206.500 -1.220 6.500 72
-----------------------------------
package.loaded["scripts/zones/Alzadaal_Undersea_Ruins/TextIDs"] =... | gpl-3.0 |
jlopenwrtluci/luci | applications/luci-app-samba/luasrc/model/cbi/samba.lua | 56 | 2389 | -- 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.
m = Map("samba", translate("Network Shares"))
s = m:section(TypedSection, "samba", "Samba")
s.anonymous = true
s:tab("general", translate("General Settings"... | apache-2.0 |
jlopenwrtluci/luci | modules/luci-base/luasrc/http/protocol/conditionals.lua | 68 | 3024 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
-- This class provides basic ETag handling and implements most of the
-- conditional HTTP/1.1 headers specified in RFC2616 Sct. 14.24 - 14.28 .
module("luci.http.protocol.conditionals", packag... | apache-2.0 |
aa65535/luci | modules/luci-base/luasrc/http/protocol/conditionals.lua | 68 | 3024 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
-- This class provides basic ETag handling and implements most of the
-- conditional HTTP/1.1 headers specified in RFC2616 Sct. 14.24 - 14.28 .
module("luci.http.protocol.conditionals", packag... | apache-2.0 |
kayru/tundra | scripts/tundra/util.lua | 28 | 6568 | local _tostring = tostring
module(..., package.seeall)
function tostring(value, stack)
local str = ''
stack = stack or {}
if type(value) ~= 'table' then
if type(value) == 'string' then
str = string.format("%q", value)
else
str = _tostring(value)
end
elseif stack[value] then
return ... | gpl-3.0 |
jlopenwrtluci/luci | modules/luci-mod-admin-mini/luasrc/controller/mini/system.lua | 74 | 6456 | -- 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.
module("luci.controller.mini.system", package.seeall)
function index()
entry({"mini", "system"}, alias("mini", "system", "index"), _("System"), 40).index = t... | apache-2.0 |
Kthulupwns/darkstar | scripts/zones/Bastok_Mines/npcs/Elki.lua | 36 | 2490 | -----------------------------------
-- Area: Bastok Mines
-- NPC: Elki
-- Starts Quests: Hearts of Mythril, The Eleventh's Hour
-----------------------------------
package.loaded["scripts/zones/Bastok_Mines/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/quests");
require("script... | gpl-3.0 |
punisherbot/punisherbot | plugins/twitter.lua | 632 | 2555 | local OAuth = require "OAuth"
-- EDIT data/twitter.lua with the API keys
local twitter_config = load_from_file('data/twitter.lua', {
-- DON'T EDIT HERE.
consumer_key = "", consumer_secret = "",
access_token = "", access_token_secret = ""
})
local client = OAuth.new(twitter_config.consumer_key, twitter_c... | gpl-2.0 |
dpino/snabb | src/apps/ipfix/template.lua | 7 | 13917 | -- This module implements the flow metering app, which records
-- IP flows as part of an IP flow export program.
module(..., package.seeall)
local bit = require("bit")
local ffi = require("ffi")
local pf = require("pf")
local consts = require("apps.lwaftr.constants")
local lib = require("core.lib")
loca... | apache-2.0 |
ark120202/aabs | game/scripts/vscripts/heroes/rewrites/gyrocopter_flak_cannon_arena.lua | 1 | 3233 | local fireSplitshotProjectilesFactory = require("items/helper_splitshot")
gyrocopter_flak_cannon_arena = {
GetIntrinsicModifierName = function() return "modifier_gyrocopter_flak_cannon_arena_scepter" end
}
if IsServer() then
function gyrocopter_flak_cannon_arena:OnSpellStart()
local caster = self:GetCaster()
l... | mit |
Kthulupwns/darkstar | scripts/globals/weaponskills/blade_shun.lua | 30 | 1790 | -----------------------------------
-- Blade Shun
-- Katana weapon skill
-- Skill level: N/A
-- Description: Delivers a fivefold attack. Attack power varies with TP.
-- In order to obtain Blade: Shun the quest Martial Mastery must be completed.
-- This Weapon Skill's first hit params.ftp is duplicated for all add... | gpl-3.0 |
aa65535/luci | protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_aiccu.lua | 20 | 4410 | -- Copyright 2015 Paul Oranje <por@xs4all.nl>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
-- config read by /lib/netifd/proto/aiccu.sh
local username, password, protocol, server, tunnelid, ip6prefix, requiretls, nat, heartbeat,
verbose, ntpsynctimeout, ip6addr, sourcerouting... | apache-2.0 |
mlody1039/ModernOts | data/npc/scripts/Pythius The Rotten - Copy.lua | 1 | 2209 | 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 onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid)... | gpl-3.0 |
kinzhang/cocos2d-js-v3.2 | frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua | 10 | 2339 |
--------------------------------
-- @module ComAttribute
-- @extend Component
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#ComAttribute] getFloat
-- @param self
-- @param #string key
-- @param #float def
-- @return float#float ret (return value: float)
-------------------... | mit |
Kthulupwns/darkstar | scripts/zones/Northern_San_dOria/npcs/Arnau.lua | 12 | 1723 | -----------------------------------
-- Area: Northern San d'Oria
-- NPC: Arnau
-- Involved in Mission: Save the Children
-- @pos 148 0 139 231
-----------------------------------
package.loaded["scripts/zones/Northern_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/missions... | gpl-3.0 |
Omar-Real/RealBot | plugins/owners.lua | 194 | 23755 | 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)]['settings'... | gpl-2.0 |
Kthulupwns/darkstar | scripts/zones/Cloister_of_Storms/bcnms/sugar-coated_directive.lua | 13 | 1707 | ----------------------------------------
-- Area: Cloister of Storms
-- BCNM: Sugar Coated Directive (ASA-4)
----------------------------------------
package.loaded["scripts/zones/Cloister_of_Storms/TextIDs"] = nil;
----------------------------------------
require("scripts/globals/keyitems");
require("scripts/globals/... | gpl-3.0 |
Kthulupwns/darkstar | scripts/globals/abilities/curing_waltz_iii.lua | 3 | 1806 | -----------------------------------
-- Ability: Curing Waltz III
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/status");
-----------------------------------
-- onUseAbility
-----------------------------------
function onAbilityCheck(player,target,abilit... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Yuhtunga_Jungle/npcs/Mahol_IM.lua | 30 | 3044 | -----------------------------------
-- Area: Yuhtunga Jungle
-- NPC: Mahol, I.M.
-- Outpost Conquest Guards
-- @pos -242.487 -1 -402.772 123
-----------------------------------
package.loaded["scripts/zones/Yuhtunga_Jungle/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/conquest");
requi... | gpl-3.0 |
czlc/ejoy2d | examples/ex01.lua | 1 | 1057 | local ej = require "ejoy2d"
local fw = require "ejoy2d.framework"
local pack = require "ejoy2d.simplepackage"
pack.load {
pattern = fw.WorkDir..[[examples/asset/?]],
"sample",
}
local obj = ej.sprite("sample","cannon")
local turret = obj.turret
-- set position (-100,0) scale (0.5)
obj:ps(-100,0,0.5)
local obj2 = ... | mit |
Velkon/DarkRP | gamemode/modules/hitmenu/sv_interface.lua | 3 | 3498 | DarkRP.PLAYER.requestHit = DarkRP.stub{
name = "requestHit",
description = "Request a hit to a hitman.",
parameters = {
{
name = "customer",
description = "The customer who paid for the hit.",
type = "Player",
optional = false
},
{
... | mit |
amenophis1er/prosody-modules | mod_addressing/mod_addressing.lua | 32 | 1825 | -- TODO Querying other servers for support, needs to keep track of remote
-- server disco features
local xmlns_address = 'http://jabber.org/protocol/address';
local function handle_extended_addressing(data)
local stanza = data.stanza;
if stanza.attr.type == "error" then
return -- so we don't process bounces
end
... | mit |
merlinblack/oyunum | scripts/gui/widget.lua | 1 | 2886 | require 'class'
class 'Widget'
function Widget:__init( x, y, w, h )
self.children = {}
self.left = x
self.top = y
self.width = w
self.height = h
end
-- Can be called, directly or by garbage collection
-- if garbage collection runs it, it must not error!!
function Widget:destroy()
if typ... | mit |
Kthulupwns/darkstar | scripts/zones/Port_San_dOria/npcs/Bricorsant.lua | 36 | 1376 | -----------------------------------
-- Area: Port San d'Oria
-- NPC: Bricorsant
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/quests");
require("scripts/zones/Port_San_dOria/Te... | gpl-3.0 |
ma137292/mostafa-Bot | plugins/anti_spam.lua | 923 | 3750 |
--An empty table for solving multiple kicking problem(thanks to @topkecleon )
kicktable = {}
do
local TIME_CHECK = 2 -- seconds
local data = load_data(_config.moderation.data)
-- Save stats, ban user
local function pre_process(msg)
-- Ignore service msg
if msg.service then
return msg
end
if msg.from.id =... | gpl-2.0 |
Kthulupwns/darkstar | scripts/zones/Aht_Urhgan_Whitegate/npcs/Hishahma.lua | 34 | 1033 | -----------------------------------
-- Area: Aht Urhgan Whitegate
-- NPC: Hishahma
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs");
---------... | gpl-3.0 |
kuoruan/luci | applications/luci-app-asterisk/luasrc/model/cbi/asterisk-mod-res.lua | 68 | 2884 | -- 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
res_config_mysql = module:opt... | apache-2.0 |
mlody1039/ModernOts | data/npc/scripts/Captain Seahorse.lua | 1 | 6160 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, ... | gpl-3.0 |
mlody1039/ModernOts | data/npc/scripts/items_shop.lua | 1 | 3071 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Castle_Oztroja_[S]/Zone.lua | 28 | 1334 | -----------------------------------
--
-- Zone: Castle_Oztroja_[S] (99)
--
-----------------------------------
package.loaded["scripts/zones/Castle_Oztroja_[S]/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/zones/Castle_Oztroja_[S]/TextIDs");
----... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/FeiYin/npcs/HomePoint#1.lua | 12 | 1228 | -----------------------------------
-- Area: FeiYin
-- NPC: HomePoint#1
-- @pos 243 -24.5 62 204
-----------------------------------
package.loaded["scripts/zones/FeiYin/TextIDs"] = nil;
require("scripts/globals/settings");
require("scripts/zones/FeiYin/TextIDs");
require("scripts/globals/homepoint");
-... | gpl-3.0 |
Kthulupwns/darkstar | scripts/globals/mobskills/Geotic_Breath.lua | 6 | 1275 | ---------------------------------------------
-- Geotic Breath
--
-- Description: Deals Earth damage to enemies within a fan-shaped area.
-- Type: Breath
-- Utsusemi/Blink absorb: Ignores shadows
-- Range: Unknown cone
-- Notes: Used only by Ouryu
---------------------------------------------
require("/s... | gpl-3.0 |
Velkon/DarkRP | gamemode/modules/police/sv_init.lua | 1 | 11164 | local plyMeta = FindMetaTable("Player")
local finishWarrantRequest
local arrestedPlayers = {}
/*---------------------------------------------------------------------------
Interface functions
---------------------------------------------------------------------------*/
function plyMeta:warrant(warranter, reason)
i... | mit |
Kthulupwns/darkstar | scripts/globals/weaponskills/hard_slash.lua | 5 | 1566 | -----------------------------------
-- Hard Slash
-- Great Sword weapon skill
-- Skill level: 5
-- Delivers a single-hit attack. Damage varies with TP.
-- Modifiers: STR:30%
-- 100%TP 200%TP 300%TP
-- 1.5 1.75 2.0
-----------------------------------
require("/scripts/globals/settings");
require("/scripts... | gpl-3.0 |
Kthulupwns/darkstar | scripts/globals/items/moogle_pie.lua | 36 | 1626 | -----------------------------------------
-- ID: 5561
-- Item: Moogle Pie
-- Food Effect: 3 Hrs, All Races
-----------------------------------------
-- HP 20
-- MP 20
-- Strength 1
-- Dexterity 1
-- Vitality 1
-- Agility 1
-- Intelligence 1
-- Mind 1
-- Charisma 1
-----------------------------------------
require("scr... | gpl-3.0 |
amenophis1er/prosody-modules | mod_tls_policy/mod_tls_policy.lua | 31 | 1271 |
assert(require"ssl.core".info, "Incompatible LuaSec version");
local function hook(event_name, typ, policy)
if not policy then return end
if policy == "FS" then
policy = { key = "DH$" };
elseif type(policy) == "string" then
policy = { cipher = policy };
end
module:hook(event_name, function (event)
local o... | mit |
aa65535/luci | applications/luci-app-watchcat/luasrc/model/cbi/watchcat/watchcat.lua | 30 | 1901 | -- Copyright 2012 Christian Gagneraud <chris@techworks.ie>
-- Licensed to the public under the Apache License 2.0.
m = Map("system",
translate("Watchcat"),
translate("Watchcat allows configuring a periodic reboot when the " ..
"Internet connection has been lost for a certain period of time."
))
s = m:secti... | apache-2.0 |
Kthulupwns/darkstar | scripts/zones/The_Sanctuary_of_ZiTah/npcs/qm3.lua | 11 | 1748 | -----------------------------------
-- Area: The Sanctuary of Zitah
-- NPC: ???
-- Involved In Quest: The Sacred Katana
-- @zone 121
-- @pos -416 0 46
-----------------------------------
package.loaded["scripts/zones/The_Sanctuary_of_ZiTah/TextIDs"] = nil;
-----------------------------------
require("script... | gpl-3.0 |
Kthulupwns/darkstar | scripts/zones/Port_Jeuno/npcs/Leyla.lua | 37 | 1442 | -----------------------------------
-- Area: Port Jeuno
-- NPC: Leyla
-- Standard Merchant NPC
-----------------------------------
require("scripts/globals/shop");
package.loaded["scripts/zones/Port_Jeuno/TextIDs"] = nil;
require("scripts/zones/Port_Jeuno/TextIDs");
-----------------------------------
-- o... | gpl-3.0 |
kinzhang/cocos2d-js-v3.2 | frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Director.lua | 6 | 14021 |
--------------------------------
-- @module Director
-- @parent_module cc
--------------------------------
-- Pauses the running scene.<br>
-- The running scene will be _drawed_ but all scheduled timers will be paused<br>
-- While paused, the draw rate will be 4 FPS to reduce CPU consumption
-- @function [parent=#Di... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.