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 |
|---|---|---|---|---|---|
jsenellart-systran/OpenNMT | lm.lua | 7 | 2453 | require('onmt.init')
local cmd = onmt.utils.ExtendedCmdLine.new('lm.lua')
local options = {
{
'mode', 'string',
[['score' apply lm to input text, 'sample' samples output based on input text.]],
{
enum = { 'score', 'sample' }
}
},
{
'-src', '',
[[Source sequences to sample/score.]],
{
valid = onmt.utils.ExtendedCmdLine.nonEmpty
}
},
{
'-output', 'output.txt',
[[Output file depend on `<mode>`.]]
}
}
cmd:setCmdLineOptions(options, 'Data')
onmt.lm.LM.declareOpts(cmd)
onmt.utils.Cuda.declareOpts(cmd)
onmt.utils.Logger.declareOpts(cmd)
cmd:text('')
cmd:text('Other options')
cmd:text('')
cmd:option('-time', false, [[Measure average translation time.]])
local function main()
local opt = cmd:parse(arg)
_G.logger = onmt.utils.Logger.new(opt.log_file, opt.disable_logs, opt.log_level)
onmt.utils.Cuda.init(opt)
local lm = onmt.lm.LM.new(opt)
local srcReader = onmt.utils.FileReader.new(opt.src)
local srcBatch = {}
local outFile = io.open(opt.output, 'w')
local sentId = 1
local batchId = 1
local timer
if opt.time then
timer = torch.Timer()
timer:stop()
timer:reset()
end
while true do
local srcTokens = srcReader:next()
if srcTokens ~= nil then
table.insert(srcBatch, lm:buildInput(srcTokens))
elseif #srcBatch == 0 then
break
end
if srcTokens == nil or #srcBatch == opt.batch_size then
if opt.time then
timer:resume()
end
local results
if opt.mode == 'score' then
results = lm:evaluate(srcBatch)
else
results = lm:sample(srcBatch, opt.max_length, opt.temperature)
end
if opt.time then
timer:stop()
end
for b = 1, #results do
_G.logger:info('SENT %d: %s', sentId, results[b])
outFile:write(results[b] .. '\n')
sentId = sentId + 1
end
if srcTokens == nil then
break
end
batchId = batchId + 1
srcBatch = {}
collectgarbage()
end
end
if opt.time then
local time = timer:time()
local sentenceCount = sentId-1
_G.logger:info("Average sentence processing time (in seconds):\n")
_G.logger:info("avg real\t" .. time.real / sentenceCount .. "\n")
_G.logger:info("avg user\t" .. time.user / sentenceCount .. "\n")
_G.logger:info("avg sys\t" .. time.sys / sentenceCount .. "\n")
end
_G.logger:shutDown()
end
main()
| mit |
RedSnake64/openwrt-luci-packages | modules/luci-base/luasrc/model/firewall.lua | 67 | 10658 | -- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local type, pairs, ipairs, table, luci, math
= type, pairs, ipairs, table, luci, math
local tpl = require "luci.template.parser"
local utl = require "luci.util"
local uci = require "luci.model.uci"
module "luci.model.firewall"
local uci_r, uci_s
function _valid_id(x)
return (x and #x > 0 and x:match("^[a-zA-Z0-9_]+$"))
end
function _get(c, s, o)
return uci_r:get(c, s, o)
end
function _set(c, s, o, v)
if v ~= nil then
if type(v) == "boolean" then v = v and "1" or "0" end
return uci_r:set(c, s, o, v)
else
return uci_r:delete(c, s, o)
end
end
function init(cursor)
uci_r = cursor or uci_r or uci.cursor()
uci_s = uci_r:substate()
return _M
end
function save(self, ...)
uci_r:save(...)
uci_r:load(...)
end
function commit(self, ...)
uci_r:commit(...)
uci_r:load(...)
end
function get_defaults()
return defaults()
end
function new_zone(self)
local name = "newzone"
local count = 1
while self:get_zone(name) do
count = count + 1
name = "newzone%d" % count
end
return self:add_zone(name)
end
function add_zone(self, n)
if _valid_id(n) and not self:get_zone(n) then
local d = defaults()
local z = uci_r:section("firewall", "zone", nil, {
name = n,
network = " ",
input = d:input() or "DROP",
forward = d:forward() or "DROP",
output = d:output() or "DROP"
})
return z and zone(z)
end
end
function get_zone(self, n)
if uci_r:get("firewall", n) == "zone" then
return zone(n)
else
local z
uci_r:foreach("firewall", "zone",
function(s)
if n and s.name == n then
z = s['.name']
return false
end
end)
return z and zone(z)
end
end
function get_zones(self)
local zones = { }
local znl = { }
uci_r:foreach("firewall", "zone",
function(s)
if s.name then
znl[s.name] = zone(s['.name'])
end
end)
local z
for z in utl.kspairs(znl) do
zones[#zones+1] = znl[z]
end
return zones
end
function get_zone_by_network(self, net)
local z
uci_r:foreach("firewall", "zone",
function(s)
if s.name and net then
local n
for n in utl.imatch(s.network or s.name) do
if n == net then
z = s['.name']
return false
end
end
end
end)
return z and zone(z)
end
function del_zone(self, n)
local r = false
if uci_r:get("firewall", n) == "zone" then
local z = uci_r:get("firewall", n, "name")
r = uci_r:delete("firewall", n)
n = z
else
uci_r:foreach("firewall", "zone",
function(s)
if n and s.name == n then
r = uci_r:delete("firewall", s['.name'])
return false
end
end)
end
if r then
uci_r:foreach("firewall", "rule",
function(s)
if s.src == n or s.dest == n then
uci_r:delete("firewall", s['.name'])
end
end)
uci_r:foreach("firewall", "redirect",
function(s)
if s.src == n or s.dest == n then
uci_r:delete("firewall", s['.name'])
end
end)
uci_r:foreach("firewall", "forwarding",
function(s)
if s.src == n or s.dest == n then
uci_r:delete("firewall", s['.name'])
end
end)
end
return r
end
function rename_zone(self, old, new)
local r = false
if _valid_id(new) and not self:get_zone(new) then
uci_r:foreach("firewall", "zone",
function(s)
if old and s.name == old then
if not s.network then
uci_r:set("firewall", s['.name'], "network", old)
end
uci_r:set("firewall", s['.name'], "name", new)
r = true
return false
end
end)
if r then
uci_r:foreach("firewall", "rule",
function(s)
if s.src == old then
uci_r:set("firewall", s['.name'], "src", new)
end
if s.dest == old then
uci_r:set("firewall", s['.name'], "dest", new)
end
end)
uci_r:foreach("firewall", "redirect",
function(s)
if s.src == old then
uci_r:set("firewall", s['.name'], "src", new)
end
if s.dest == old then
uci_r:set("firewall", s['.name'], "dest", new)
end
end)
uci_r:foreach("firewall", "forwarding",
function(s)
if s.src == old then
uci_r:set("firewall", s['.name'], "src", new)
end
if s.dest == old then
uci_r:set("firewall", s['.name'], "dest", new)
end
end)
end
end
return r
end
function del_network(self, net)
local z
if net then
for _, z in ipairs(self:get_zones()) do
z:del_network(net)
end
end
end
defaults = utl.class()
function defaults.__init__(self)
uci_r:foreach("firewall", "defaults",
function(s)
self.sid = s['.name']
return false
end)
self.sid = self.sid or uci_r:section("firewall", "defaults", nil, { })
end
function defaults.get(self, opt)
return _get("firewall", self.sid, opt)
end
function defaults.set(self, opt, val)
return _set("firewall", self.sid, opt, val)
end
function defaults.syn_flood(self)
return (self:get("syn_flood") == "1")
end
function defaults.drop_invalid(self)
return (self:get("drop_invalid") == "1")
end
function defaults.input(self)
return self:get("input") or "DROP"
end
function defaults.forward(self)
return self:get("forward") or "DROP"
end
function defaults.output(self)
return self:get("output") or "DROP"
end
zone = utl.class()
function zone.__init__(self, z)
if uci_r:get("firewall", z) == "zone" then
self.sid = z
self.data = uci_r:get_all("firewall", z)
else
uci_r:foreach("firewall", "zone",
function(s)
if s.name == z then
self.sid = s['.name']
self.data = s
return false
end
end)
end
end
function zone.get(self, opt)
return _get("firewall", self.sid, opt)
end
function zone.set(self, opt, val)
return _set("firewall", self.sid, opt, val)
end
function zone.masq(self)
return (self:get("masq") == "1")
end
function zone.name(self)
return self:get("name")
end
function zone.network(self)
return self:get("network")
end
function zone.input(self)
return self:get("input") or defaults():input() or "DROP"
end
function zone.forward(self)
return self:get("forward") or defaults():forward() or "DROP"
end
function zone.output(self)
return self:get("output") or defaults():output() or "DROP"
end
function zone.add_network(self, net)
if uci_r:get("network", net) == "interface" then
local nets = { }
local n
for n in utl.imatch(self:get("network") or self:get("name")) do
if n ~= net then
nets[#nets+1] = n
end
end
nets[#nets+1] = net
_M:del_network(net)
self:set("network", table.concat(nets, " "))
end
end
function zone.del_network(self, net)
local nets = { }
local n
for n in utl.imatch(self:get("network") or self:get("name")) do
if n ~= net then
nets[#nets+1] = n
end
end
if #nets > 0 then
self:set("network", table.concat(nets, " "))
else
self:set("network", " ")
end
end
function zone.get_networks(self)
local nets = { }
local n
for n in utl.imatch(self:get("network") or self:get("name")) do
nets[#nets+1] = n
end
return nets
end
function zone.clear_networks(self)
self:set("network", " ")
end
function zone.get_forwardings_by(self, what)
local name = self:name()
local forwards = { }
uci_r:foreach("firewall", "forwarding",
function(s)
if s.src and s.dest and s[what] == name then
forwards[#forwards+1] = forwarding(s['.name'])
end
end)
return forwards
end
function zone.add_forwarding_to(self, dest)
local exist, forward
for _, forward in ipairs(self:get_forwardings_by('src')) do
if forward:dest() == dest then
exist = true
break
end
end
if not exist and dest ~= self:name() and _valid_id(dest) then
local s = uci_r:section("firewall", "forwarding", nil, {
src = self:name(),
dest = dest
})
return s and forwarding(s)
end
end
function zone.add_forwarding_from(self, src)
local exist, forward
for _, forward in ipairs(self:get_forwardings_by('dest')) do
if forward:src() == src then
exist = true
break
end
end
if not exist and src ~= self:name() and _valid_id(src) then
local s = uci_r:section("firewall", "forwarding", nil, {
src = src,
dest = self:name()
})
return s and forwarding(s)
end
end
function zone.del_forwardings_by(self, what)
local name = self:name()
uci_r:delete_all("firewall", "forwarding",
function(s)
return (s.src and s.dest and s[what] == name)
end)
end
function zone.add_redirect(self, options)
options = options or { }
options.src = self:name()
local s = uci_r:section("firewall", "redirect", nil, options)
return s and redirect(s)
end
function zone.add_rule(self, options)
options = options or { }
options.src = self:name()
local s = uci_r:section("firewall", "rule", nil, options)
return s and rule(s)
end
function zone.get_color(self)
if self and self:name() == "lan" then
return "#90f090"
elseif self and self:name() == "wan" then
return "#f09090"
elseif self then
math.randomseed(tpl.hash(self:name()))
local r = math.random(128)
local g = math.random(128)
local min = 0
local max = 128
if ( r + g ) < 128 then
min = 128 - r - g
else
max = 255 - r - g
end
local b = min + math.floor( math.random() * ( max - min ) )
return "#%02x%02x%02x" % { 0xFF - r, 0xFF - g, 0xFF - b }
else
return "#eeeeee"
end
end
forwarding = utl.class()
function forwarding.__init__(self, f)
self.sid = f
end
function forwarding.src(self)
return uci_r:get("firewall", self.sid, "src")
end
function forwarding.dest(self)
return uci_r:get("firewall", self.sid, "dest")
end
function forwarding.src_zone(self)
return zone(self:src())
end
function forwarding.dest_zone(self)
return zone(self:dest())
end
rule = utl.class()
function rule.__init__(self, f)
self.sid = f
end
function rule.get(self, opt)
return _get("firewall", self.sid, opt)
end
function rule.set(self, opt, val)
return _set("firewall", self.sid, opt, val)
end
function rule.src(self)
return uci_r:get("firewall", self.sid, "src")
end
function rule.dest(self)
return uci_r:get("firewall", self.sid, "dest")
end
function rule.src_zone(self)
return zone(self:src())
end
function rule.dest_zone(self)
return zone(self:dest())
end
redirect = utl.class()
function redirect.__init__(self, f)
self.sid = f
end
function redirect.get(self, opt)
return _get("firewall", self.sid, opt)
end
function redirect.set(self, opt, val)
return _set("firewall", self.sid, opt, val)
end
function redirect.src(self)
return uci_r:get("firewall", self.sid, "src")
end
function redirect.dest(self)
return uci_r:get("firewall", self.sid, "dest")
end
function redirect.src_zone(self)
return zone(self:src())
end
function redirect.dest_zone(self)
return zone(self:dest())
end
| apache-2.0 |
torque/mpv | player/lua/options.lua | 25 | 3450 | local msg = require 'mp.msg'
local function val2str(val)
if type(val) == "boolean" then
if val then val = "yes" else val = "no" end
end
return val
end
-- converts val to type of desttypeval
local function typeconv(desttypeval, val)
if type(desttypeval) == "boolean" then
if val == "yes" then
val = true
elseif val == "no" then
val = false
else
msg.error("Error: Can't convert " .. val .. " to boolean!")
val = nil
end
elseif type(desttypeval) == "number" then
if not (tonumber(val) == nil) then
val = tonumber(val)
else
msg.error("Error: Can't convert " .. val .. " to number!")
val = nil
end
end
return val
end
local function read_options(options, identifier)
if identifier == nil then
identifier = mp.get_script_name()
end
msg.debug("reading options for " .. identifier)
-- read config file
local conffilename = "lua-settings/" .. identifier .. ".conf"
local conffile = mp.find_config_file(conffilename)
local f = conffile and io.open(conffile,"r")
if f == nil then
-- config not found
msg.verbose(conffilename .. " not found.")
else
-- config exists, read values
local linecounter = 1
for line in f:lines() do
if string.find(line, "#") == 1 then
else
local eqpos = string.find(line, "=")
if eqpos == nil then
else
local key = string.sub(line, 1, eqpos-1)
local val = string.sub(line, eqpos+1)
-- match found values with defaults
if options[key] == nil then
msg.warn(conffilename..":"..linecounter..
" unknown key " .. key .. ", ignoring")
else
local convval = typeconv(options[key], val)
if convval == nil then
msg.error(conffilename..":"..linecounter..
" error converting value '" .. val ..
"' for key '" .. key .. "'")
else
options[key] = convval
end
end
end
end
linecounter = linecounter + 1
end
io.close(f)
end
--parse command-line options
for key, val in pairs(mp.get_property_native("options/script-opts")) do
local prefix = identifier.."-"
if not (string.find(key, prefix, 1, true) == nil) then
key = string.sub(key, string.len(prefix)+1)
-- match found values with defaults
if options[key] == nil then
msg.warn("script-opts: unknown key " .. key .. ", ignoring")
else
local convval = typeconv(options[key], val)
if convval == nil then
msg.error("script-opts: error converting value '" .. val ..
"' for key '" .. key .. "'")
else
options[key] = convval
end
end
end
end
end
-- backwards compatibility with broken read_options export
_G.read_options = read_options
return {
read_options = read_options,
}
| gpl-2.0 |
typechaos/ultra-compact-image | TestUCI.lua | 3 | 1385 | -- for LuaJIT 2.0-beta6 or later
local ffi = require("ffi")
ffi.cdef[[
int __stdcall UCIDecode(const void* src, int srclen, void** dst, int* stride, int* width, int* height, int* bit);
void __stdcall UCIFree(void* p);
void __stdcall UCIDebug(int level);
]]
local ucidec = ffi.load("ucidec")
if not ucidec then
print "ERROR: can not load ucidec.dll"
return -1
end
local fsrc = io.open("test.uci", "rb")
if not fsrc then
print "ERROR: can not open test.uci"
return -2
end
local src = fsrc:read("*a")
fsrc:close()
if not src then
print "ERROR: can not read test.uci"
return -3
end
local dst = ffi.new("void*[1]")
local stride = ffi.new("int[1]")
local w = ffi.new("int[1]")
local h = ffi.new("int[1]")
local b = ffi.new("int[1]")
ucidec.UCIDebug(0x7fffffff)
local r = ucidec.UCIDecode(src, #src, dst, stride, w, h, b)
if r < 0 then
print(string.format("ERROR: DecodeUCI failed (return %d)", r))
return -4
end
print(string.format("INFO: width x height x bit : %d x %d x %d", w[0], h[0], b[0]))
local fdst = io.open("test.rgb", "wb")
if not fdst then
print "ERROR: can not create test.rgb"
return -5
end
local dstbase = ffi.cast("char*", dst[0])
local linesize = w[0] * (b[0] / 8)
for i = 1, h[0] do
fdst:write(ffi.string(dstbase + i * stride[0], linesize))
end
fdst:close()
ucidec.UCIFree(dst[0])
return 0
| lgpl-3.0 |
snabbnfv-goodies/snabbswitch | lib/ljsyscall/syscall/lfs.lua | 24 | 3075 | -- this is intended to be compatible with luafilesystem https://github.com/keplerproject/luafilesystem
-- currently does not implement locks
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
-- TODO allow use eg with rump kernel, needs an initialisation option
-- maybe return a table with a metatable that allows init or uses default if no init?
local S = require "syscall"
-- TODO not implemented
-- lfs.lock_dir
-- lfs.lock
-- unlock
local function lfswrap(f)
return function(...)
local ret, err = f(...)
if not ret then return nil, tostring(err) end
return ret
end
end
local lfs = {}
lfs._VERSION = "ljsyscall lfs 1"
local attributes = {
dev = "dev",
ino = "ino",
mode = "typename", -- not sure why lfs insists on calling this mode
nlink = "nlink",
uid = "uid",
gid = "gid",
rdev = "rdev",
access = "access",
modification = "modification",
change = "change",
size = "size",
blocks = "blocks",
blksize = "blksize",
}
local function attr(st, aname)
if aname then
aname = attributes[aname]
return st[aname]
end
local ret = {}
for k, v in pairs(attributes) do ret[k] = st[v] end
return ret
end
function lfs.attributes(filepath, aname)
local st, err = S.stat(filepath)
if not st then return nil, tostring(err) end
return attr(st, aname)
end
function lfs.symlinkattributes(filepath, aname)
local st, err = S.lstat(filepath)
if not st then return nil, tostring(err) end
return attr(st, aname)
end
lfs.chdir = lfswrap(S.chdir)
lfs.currentdir = lfswrap(S.getcwd)
lfs.rmdir = lfswrap(S.rmdir)
lfs.touch = lfswrap(S.utime)
function lfs.mkdir(path)
local ret, err = S.mkdir(path, "0777")
if not ret then return nil, tostring(err) end
return ret
end
local function dir_close(dir)
dir.fd:close()
dir.fd = nil
end
local function dir_next(dir)
if not dir.fd then error "dir ended" end
local d
repeat
if not dir.di then
local err
dir.di, err = dir.fd:getdents(dir.buf, dir.size)
if not dir.di then
dir_close(dir)
error(tostring(err)) -- not sure how we are suppose to handle errors
end
dir.first = true
end
d = dir.di()
if not d then
dir.di = nil
if dir.first then
dir_close(dir)
return nil
end
end
dir.first = false
until d
return d.name
end
function lfs.dir(path)
local size = 4096
local buf = S.t.buffer(size)
local fd, err = S.open(path, "directory, rdonly")
if err then return nil, tostring(err) end
return dir_next, {size = size, buf = buf, fd = fd, next = dir_next, close = dir_close}
end
local flink, fsymlink = lfswrap(S.link), lfswrap(S.symlink)
function lfs.link(old, new, symlink)
if symlink then
return fsymlink(old, new)
else
return flink(old, new)
end
end
function lfs.setmode(file, mode) return true, "binary" end
return lfs
| apache-2.0 |
Nexela/autofill | stdlib/core.lua | 1 | 3186 | --- The Core module loads some helper functions useful in all stages
-- of a mods life cycle. All modules have an __index method into core.
-- @module Core
-- @usage local Core = require('stdlib/core')
--Global mutates
require('stdlib/utils/globals')
local Is = require('stdlib/utils/is')
local Core = {
_VERSION = '1.0.0',
_DESCRIPTION = 'Factorio Lua Standard Library Project',
_URL = 'https://github.com/Afforess/Factorio-Stdlib',
_LICENSE = [[
MIT LICENSE
Copyright (c) 2016, Afforess
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
]],
_module = 'Core',
_concat = function(lhs, rhs)
--Sanitize to remove address
return tostring(lhs):gsub('(%w+)%: %x+', '%1: (ADDR)') .. tostring(rhs):gsub('(%w+)%: %x+', '%1: (ADDR)')
end,
__call = function(t, ...)
return t:_caller(...)
end,
}
Core.__index = Core
function Core.log_and_print(msg)
if game and #game.connected_players > 0 then
log(msg)
game.print(msg)
return true
end
end
function Core.VALID_FILTER(v)
return v and v.valid
end
--- load the stdlib into globals, by default it loads everything into an ALLCAPS name.
-- Alternatively you can pass a dictionary of `[global names] -> [require path]`.
-- @tparam[opt] table files
-- @treturn Core
-- @usage
-- require('stdlib/core).create_stdlib_globals()
function Core.create_stdlib_globals(files)
files =
files or
{
GAME = 'stdlib/game',
AREA = 'stdlib/area/area',
POSITION = 'stdlib/area/position',
TILE = 'stdlib/area/tile',
SURFACE = 'stdlib/area/surface',
CHUNK = 'stdlib/area/chunk',
COLOR = 'stdlib/color/color',
ENTITY = 'stdlib/entity/entity',
INVENTORY = 'stdlib/entity/inventory',
RESOURCE = 'stdlib/entity/resource',
CONFIG = 'stdlib/config/config',
LOGGER = 'stdlib/log/logger',
QUEUE = 'stdlib/lists/queue',
EVENT = 'stdlib/event/event',
GUI = 'stdlib/event/gui',
PLAYER = 'stdlib/event/player',
FORCE = 'stdlib/event/force'
}
Is.Assert.Table(files, 'files must be a dictionary of global names -> file paths')
for glob, path in pairs(files) do
_G[glob] = prequire((path:gsub('%.', '/'))) -- extra () required to emulate select(1)
end
return Core
end
return Core
| mit |
adminomega/exterme-orginal | plugins/isup.lua | 741 | 3095 | do
local socket = require("socket")
local cronned = load_from_file('data/isup.lua')
local function save_cron(msg, url, delete)
local origin = get_receiver(msg)
if not cronned[origin] then
cronned[origin] = {}
end
if not delete then
table.insert(cronned[origin], url)
else
for k,v in pairs(cronned[origin]) do
if v == url then
table.remove(cronned[origin], k)
end
end
end
serialize_to_file(cronned, 'data/isup.lua')
return 'Saved!'
end
local function is_up_socket(ip, port)
print('Connect to', ip, port)
local c = socket.try(socket.tcp())
c:settimeout(3)
local conn = c:connect(ip, port)
if not conn then
return false
else
c:close()
return true
end
end
local function is_up_http(url)
-- Parse URL from input, default to http
local parsed_url = URL.parse(url, { scheme = 'http', authority = '' })
-- Fix URLs without subdomain not parsed properly
if not parsed_url.host and parsed_url.path then
parsed_url.host = parsed_url.path
parsed_url.path = ""
end
-- Re-build URL
local url = URL.build(parsed_url)
local protocols = {
["https"] = https,
["http"] = http
}
local options = {
url = url,
redirect = false,
method = "GET"
}
local response = { protocols[parsed_url.scheme].request(options) }
local code = tonumber(response[2])
if code == nil or code >= 400 then
return false
end
return true
end
local function isup(url)
local pattern = '^(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?):?(%d?%d?%d?%d?%d?)$'
local ip,port = string.match(url, pattern)
local result = nil
-- !isup 8.8.8.8:53
if ip then
port = port or '80'
result = is_up_socket(ip, port)
else
result = is_up_http(url)
end
return result
end
local function cron()
for chan, urls in pairs(cronned) do
for k,url in pairs(urls) do
print('Checking', url)
if not isup(url) then
local text = url..' looks DOWN from here. 😱'
send_msg(chan, text, ok_cb, false)
end
end
end
end
local function run(msg, matches)
if matches[1] == 'cron delete' then
if not is_sudo(msg) then
return 'This command requires privileged user'
end
return save_cron(msg, matches[2], true)
elseif matches[1] == 'cron' then
if not is_sudo(msg) then
return 'This command requires privileged user'
end
return save_cron(msg, matches[2])
elseif isup(matches[1]) then
return matches[1]..' looks UP from here. 😃'
else
return matches[1]..' looks DOWN from here. 😱'
end
end
return {
description = "Check if a website or server is up.",
usage = {
"!isup [host]: Performs a HTTP request or Socket (ip:port) connection",
"!isup cron [host]: Every 5mins check if host is up. (Requires privileged user)",
"!isup cron delete [host]: Disable checking that host."
},
patterns = {
"^!isup (cron delete) (.*)$",
"^!isup (cron) (.*)$",
"^!isup (.*)$",
"^!ping (.*)$",
"^!ping (cron delete) (.*)$",
"^!ping (cron) (.*)$"
},
run = run,
cron = cron
}
end
| gpl-2.0 |
facebokiii/arman | plugins/block.lua | 1 | 1115 | do
local function res_user_callback(cb_extra, success, result)
local receiver = cb_extra.receiver
local user = 'user#id'..result.id
local chat = 'chat#id'..cb_extra.chat_id
if success == 0 then
return send_large_msg(receiver, "I cant block user.")
end
block_user(user, cb_ok, false)
end
local function run(msg, matches)
local user = matches[2]
if msg.to.type == 'chat' then
local chat = 'chat#id'..msg.to.id
if matches[1] == "name" then
user = string.gsub(user," ","_")
block_user(user, callback, false)
end
— user name
if matches[1] == "username" then
username = string.gsub(user,"@","")
msgr = res_user(username, res_user_callback, {receiver=receiver, chat_id=msg.to.id})
end
— id
if matches[1] == "id" then
user = 'user#id'..user
block_user(user, callback, false)
end
return "User Has Been Blocked"
end
end
return {
description = "test",
usage = { "...",
},
patterns = {
"^!block (name) (.*)$",
"^!block (username) (.*)$",
"^!block (id) (%d+)$"
},
run = run,
privileged = true
}
end
| gpl-2.0 |
RedSnake64/openwrt-luci-packages | libs/luci-lib-nixio/docsrc/nixio.TLSContext.lua | 173 | 1393 | --- Transport Layer Security Context Object.
-- @cstyle instance
module "nixio.TLSContext"
--- Create a TLS Socket from a socket descriptor.
-- @class function
-- @name TLSContext.create
-- @param socket Socket Object
-- @return TLSSocket Object
--- Assign a PEM certificate to this context.
-- @class function
-- @name TLSContext.set_cert
-- @usage This function calls SSL_CTX_use_certificate_chain_file().
-- @param path Certificate File path
-- @return true
--- Assign a PEM private key to this context.
-- @class function
-- @name TLSContext.set_key
-- @usage This function calls SSL_CTX_use_PrivateKey_file().
-- @param path Private Key File path
-- @return true
--- Set the available ciphers for this context.
-- @class function
-- @name TLSContext.set_ciphers
-- @usage This function calls SSL_CTX_set_cipher_list().
-- @param cipherlist String containing a list of ciphers
-- @return true
--- Set the verification depth of this context.
-- @class function
-- @name TLSContext.set_verify_depth
-- @usage This function calls SSL_CTX_set_verify_depth().
-- @param depth Depth
-- @return true
--- Set the verification flags of this context.
-- @class function
-- @name TLSContext.set_verify
-- @usage This function calls SSL_CTX_set_verify().
-- @param flag1 First Flag ["none", "peer", "verify_fail_if_no_peer_cert",
-- "client_once"]
-- @param ... More Flags [-"-]
-- @return true | apache-2.0 |
hnyman/luci | libs/luci-lib-nixio/docsrc/nixio.TLSContext.lua | 173 | 1393 | --- Transport Layer Security Context Object.
-- @cstyle instance
module "nixio.TLSContext"
--- Create a TLS Socket from a socket descriptor.
-- @class function
-- @name TLSContext.create
-- @param socket Socket Object
-- @return TLSSocket Object
--- Assign a PEM certificate to this context.
-- @class function
-- @name TLSContext.set_cert
-- @usage This function calls SSL_CTX_use_certificate_chain_file().
-- @param path Certificate File path
-- @return true
--- Assign a PEM private key to this context.
-- @class function
-- @name TLSContext.set_key
-- @usage This function calls SSL_CTX_use_PrivateKey_file().
-- @param path Private Key File path
-- @return true
--- Set the available ciphers for this context.
-- @class function
-- @name TLSContext.set_ciphers
-- @usage This function calls SSL_CTX_set_cipher_list().
-- @param cipherlist String containing a list of ciphers
-- @return true
--- Set the verification depth of this context.
-- @class function
-- @name TLSContext.set_verify_depth
-- @usage This function calls SSL_CTX_set_verify_depth().
-- @param depth Depth
-- @return true
--- Set the verification flags of this context.
-- @class function
-- @name TLSContext.set_verify
-- @usage This function calls SSL_CTX_set_verify().
-- @param flag1 First Flag ["none", "peer", "verify_fail_if_no_peer_cert",
-- "client_once"]
-- @param ... More Flags [-"-]
-- @return true | apache-2.0 |
dismantl/luci-0.12 | libs/nixio/docsrc/nixio.TLSContext.lua | 173 | 1393 | --- Transport Layer Security Context Object.
-- @cstyle instance
module "nixio.TLSContext"
--- Create a TLS Socket from a socket descriptor.
-- @class function
-- @name TLSContext.create
-- @param socket Socket Object
-- @return TLSSocket Object
--- Assign a PEM certificate to this context.
-- @class function
-- @name TLSContext.set_cert
-- @usage This function calls SSL_CTX_use_certificate_chain_file().
-- @param path Certificate File path
-- @return true
--- Assign a PEM private key to this context.
-- @class function
-- @name TLSContext.set_key
-- @usage This function calls SSL_CTX_use_PrivateKey_file().
-- @param path Private Key File path
-- @return true
--- Set the available ciphers for this context.
-- @class function
-- @name TLSContext.set_ciphers
-- @usage This function calls SSL_CTX_set_cipher_list().
-- @param cipherlist String containing a list of ciphers
-- @return true
--- Set the verification depth of this context.
-- @class function
-- @name TLSContext.set_verify_depth
-- @usage This function calls SSL_CTX_set_verify_depth().
-- @param depth Depth
-- @return true
--- Set the verification flags of this context.
-- @class function
-- @name TLSContext.set_verify
-- @usage This function calls SSL_CTX_set_verify().
-- @param flag1 First Flag ["none", "peer", "verify_fail_if_no_peer_cert",
-- "client_once"]
-- @param ... More Flags [-"-]
-- @return true | apache-2.0 |
eagle14/Snippy | plugins/channels.lua | 356 | 1732 | -- Checks if bot was disabled on specific chat
local function is_channel_disabled( receiver )
if not _config.disabled_channels then
return false
end
if _config.disabled_channels[receiver] == nil then
return false
end
return _config.disabled_channels[receiver]
end
local function enable_channel(receiver)
if not _config.disabled_channels then
_config.disabled_channels = {}
end
if _config.disabled_channels[receiver] == nil then
return 'Channel isn\'t disabled'
end
_config.disabled_channels[receiver] = false
save_config()
return "Channel re-enabled"
end
local function disable_channel( receiver )
if not _config.disabled_channels then
_config.disabled_channels = {}
end
_config.disabled_channels[receiver] = true
save_config()
return "Channel disabled"
end
local function pre_process(msg)
local receiver = get_receiver(msg)
-- If sender is moderator then re-enable the channel
--if is_sudo(msg) then
if is_momod(msg) then
if msg.text == "!channel enable" then
enable_channel(receiver)
end
end
if is_channel_disabled(receiver) then
msg.text = ""
end
return msg
end
local function run(msg, matches)
local receiver = get_receiver(msg)
-- Enable a channel
if matches[1] == 'enable' then
return enable_channel(receiver)
end
-- Disable a channel
if matches[1] == 'disable' then
return disable_channel(receiver)
end
end
return {
description = "Plugin to manage channels. Enable or disable channel.",
usage = {
"!channel enable: enable current channel",
"!channel disable: disable current channel" },
patterns = {
"^!channel? (enable)",
"^!channel? (disable)" },
run = run,
--privileged = true,
moderated = true,
pre_process = pre_process
}
| gpl-2.0 |
astrofra/amiga-experiments | game-shop-shop-galaxy/python-version/pkg.core/lua/sky_scatter.lua | 1 | 2820 | execution_context = gs.ScriptContextAll
--------------------------------------------------------------------------------
latitude = 0.0 --> float
longitude = 0.3 --> float
rayleigh_strength = 0.3 --> float
rayleigh_brightness = 2.5 --> float
rayleigh_collection_power = 0.20 --> float
mie_strength = 0.01 --> float
mie_brightness = 0.1 --> float
mie_collection_power = 0.6 --> float
mie_distribution = 0.13 --> float
spot_brightness = 30.0 --> float
scatter_strength = 0.05 --> float
step_count = 6 --> int
intensity = 1.0 --> float
surface_height = 0.994 --> float
--------------------------------------------------------------------------------
function ClearFrame()
-- only clear the depth buffer
renderer:Clear(gs.Color.Black, 1.0, gs.GpuRenderer.ClearDepth)
-- notify the engine that clearing has been handled
return true
end
-- load the rayleigh shader (RenderScript is run from the rendering thread)
shader = renderer:LoadShader("@core/shaders/sky_scatter.isl")
-- hook the end of opaque render pass to draw the skybox
function EndRenderPass(pass)
if not shader:IsReady() then
return -- shader is not ready yet
end
if pass ~= gs.RenderPass.Opaque then
return -- we're only interested in the opaque primitive pass
end
-- backup current view state
local view_state = render_system:GetViewState()
renderer:SetIdentityMatrices()
-- configure the rayleigh shader
renderer:SetShader(shader)
local view_rotation = render_system:GetView().transform:GetCurrent().rotation
renderer:SetShaderMatrix3("view_rotation", view_rotation)
renderer:SetShaderFloat("rayleigh_strength", rayleigh_strength)
renderer:SetShaderFloat("rayleigh_brightness", rayleigh_brightness)
renderer:SetShaderFloat("rayleigh_collection_power", rayleigh_collection_power)
renderer:SetShaderFloat("mie_strength", mie_strength)
renderer:SetShaderFloat("mie_brightness", mie_brightness)
renderer:SetShaderFloat("mie_collection_power", mie_collection_power)
renderer:SetShaderFloat("mie_distribution", mie_distribution)
renderer:SetShaderFloat("spot_brightness", spot_brightness)
renderer:SetShaderFloat("scatter_strength", scatter_strength)
renderer:SetShaderFloat("step_count", step_count)
renderer:SetShaderFloat("intensity", intensity)
renderer:SetShaderFloat("surface_height", surface_height)
renderer:SetShaderFloat("latitude", latitude)
renderer:SetShaderFloat("longitude", longitude)
-- configure the frame buffer so that only background pixels are drawn to
renderer:EnableDepthTest(true)
renderer:EnableDepthWrite(false)
renderer:SetDepthFunc(gs.GpuRenderer.DepthLessEqual)
render_system:DrawFullscreenQuad(renderer:GetViewportToInternalResolutionRatio())
renderer:EnableDepthWrite(true)
renderer:EnableDepthTest(true)
-- restore view state
render_system:SetViewState(view_state)
end
| mit |
LaFamiglia/Illarion-Content | quest/cormac_74_galmair.lua | 1 | 2555 | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.
You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
]]
-- INSERT INTO "quests" ("qst_id", "qst_script") VALUES (74, 'quest.cormac_74_galmair');
local common = require("base.common")
local M = {}
local GERMAN = Player.german
local ENGLISH = Player.english
-- Insert the quest title here, in both languages
local Title = {}
Title[GERMAN] = "Der Schwätzer von Galmair"
Title[ENGLISH] = "Galmair's Gossiper"
-- Insert an extensive description of each status here, in both languages
-- Make sure that the player knows exactly where to go and what to do
local Description = {}
Description[GERMAN] = {}
Description[ENGLISH] = {}
Description[GERMAN][1] = "Cormac ist immer noch durstig. Bring ihm einen vollen Krug Bier."
Description[ENGLISH][1] = "Cormac is still thirsty so bring him a full mug of beer."
Description[GERMAN][2] = "Jetzt fühlt sich Cormac ein bisschen gesprächiger. Du kannst ihm nun alle Fragen stellen, die du hast."
Description[ENGLISH][2] = "Now Cormac is feeling a bit more talkative you can ask him any questions you might have."
-- Insert the position of the quest start here (probably the position of an NPC or item)
Start = {392, 327, -6}
-- For each status insert a list of positions where the quest will continue, i.e. a new status can be reached there
local QuestTarget = {}
QuestTarget[1] = {position(392, 327, -6)} -- Cormac
-- Insert the quest status which is reached at the end of the quest
local FINAL_QUEST_STATUS = 2
function M.QuestTitle(user)
return common.GetNLS(user, Title[GERMAN], Title[ENGLISH])
end
function M.QuestDescription(user, status)
local german = Description[GERMAN][status] or ""
local english = Description[ENGLISH][status] or ""
return common.GetNLS(user, german, english)
end
function M.QuestStart()
return Start
end
function M.QuestTargets(user, status)
return QuestTarget[status]
end
function M.QuestFinalStatus()
return FINAL_QUEST_STATUS
end
return M
| agpl-3.0 |
venturesomestone/unsung-anthem | script/anthem/world/test/map.lua | 1 | 63849 | -- Copyright (c) 2018–2020 Antti Kivi
-- Licensed under the Effective Elegy Licence
test = {
version = "1.1",
luaversion = "5.1",
tiledversion = "1.1.5",
orientation = "orthogonal",
renderorder = "right-down",
width = 100,
height = 100,
tilewidth = 16,
tileheight = 16,
nextobjectid = 4,
properties = {},
tilesets = {
{
name = "test",
firstgid = 1,
filename = "test.tsx",
tilewidth = 16,
tileheight = 16,
spacing = 0,
margin = 0,
image = "assets/anthem/test/map/tileset.png",
imagewidth = 128,
imageheight = 64,
transparentcolour = "#ff00ff",
tileoffset = {
x = 0,
y = 0
},
grid = {
orientation = "orthogonal",
width = 16,
height = 16
},
properties = {},
terrains = {},
tilecount = 32,
tiles = {}
}
},
layers = {
{
type = "tilelayer",
name = "Tile Layer 1",
x = 0,
y = 0,
width = 100,
height = 100,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
encoding = "lua",
data = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
},
{
type = "objectgroup",
name = "Object Layer 1",
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
draworder = "topdown",
properties = {},
objects = {
{
id = 2,
name = "",
type = "",
shape = "rectangle",
x = 545,
y = 698,
width = 13,
height = 22,
rotation = 0,
visible = true,
properties = {}
},
{
id = 3,
name = "",
type = "",
shape = "rectangle",
x = 609,
y = 858,
width = 13,
height = 22,
rotation = 0,
visible = true,
properties = {}
}
}
}
}
}
| agpl-3.0 |
soundsrc/premake-core | src/tools/msc.lua | 8 | 7959 | ---
-- msc.lua
-- Interface for the MS C/C++ compiler.
-- Author Jason Perkins
-- Modified by Manu Evans
-- Copyright (c) 2009-2015 Jason Perkins and the Premake project
---
local p = premake
p.tools.msc = {}
local msc = p.tools.msc
local project = p.project
local config = p.config
--
-- Returns list of C preprocessor flags for a configuration.
--
function msc.getcppflags(cfg)
return {}
end
--
-- Returns list of C compiler flags for a configuration.
--
msc.shared = {
clr = {
On = "/clr",
Unsafe = "/clr",
Pure = "/clr:pure",
Safe = "/clr:safe",
},
flags = {
FatalCompileWarnings = "/WX",
MultiProcessorCompile = "/MP",
NoMinimalRebuild = "/Gm-",
OmitDefaultLibrary = "/Zl"
},
floatingpoint = {
Fast = "/fp:fast",
Strict = "/fp:strict",
},
floatingpointexceptions = {
On = "/fp:except",
Off = "/fp:except-",
},
functionlevellinking = {
On = "/Gy",
Off = "/Gy-",
},
callingconvention = {
Cdecl = "/Gd",
FastCall = "/Gr",
StdCall = "/Gz",
VectorCall = "/Gv",
},
intrinsics = {
On = "/Oi",
},
optimize = {
Off = "/Od",
On = "/Ot",
Debug = "/Od",
Full = "/Ox",
Size = "/O1",
Speed = "/O2",
},
vectorextensions = {
AVX = "/arch:AVX",
AVX2 = "/arch:AVX2",
SSE = "/arch:SSE",
SSE2 = "/arch:SSE2",
SSE3 = "/arch:SSE2",
SSSE3 = "/arch:SSE2",
["SSE4.1"] = "/arch:SSE2",
},
warnings = {
Extra = "/W4",
High = "/W4",
Off = "/W0",
},
staticruntime = {
-- this option must always be emit (does it??)
_ = function(cfg) return iif(config.isDebugBuild(cfg), "/MDd", "/MD") end,
-- runtime defaults to dynamic in VS
Default = function(cfg) return iif(config.isDebugBuild(cfg), "/MDd", "/MD") end,
On = function(cfg) return iif(config.isDebugBuild(cfg), "/MTd", "/MT") end,
Off = function(cfg) return iif(config.isDebugBuild(cfg), "/MDd", "/MD") end,
},
stringpooling = {
On = "/GF",
Off = "/GF-",
},
symbols = {
On = "/Z7"
},
unsignedchar = {
On = "/J",
},
omitframepointer = {
On = "/Oy"
}
}
msc.cflags = {
}
function msc.getcflags(cfg)
local shared = config.mapFlags(cfg, msc.shared)
local cflags = config.mapFlags(cfg, msc.cflags)
local flags = table.join(shared, cflags, msc.getwarnings(cfg))
return flags
end
--
-- Returns list of C++ compiler flags for a configuration.
--
msc.cxxflags = {
exceptionhandling = {
Default = "/EHsc",
On = "/EHsc",
SEH = "/EHa",
},
rtti = {
Off = "/GR-"
}
}
function msc.getcxxflags(cfg)
local shared = config.mapFlags(cfg, msc.shared)
local cxxflags = config.mapFlags(cfg, msc.cxxflags)
local flags = table.join(shared, cxxflags, msc.getwarnings(cfg))
return flags
end
--
-- Decorate defines for the MSVC command line.
--
msc.defines = {
characterset = {
Default = { '/D"_UNICODE"', '/D"UNICODE"' },
MBCS = '/D"_MBCS"',
Unicode = { '/D"_UNICODE"', '/D"UNICODE"' },
ASCII = { },
}
}
function msc.getdefines(defines, cfg)
local result
-- HACK: I need the cfg to tell what the character set defines should be. But
-- there's lots of legacy code using the old getdefines(defines) signature.
-- For now, detect one or two arguments and apply the right behavior; will fix
-- it properly when the I roll out the adapter overhaul
if cfg and defines then
result = config.mapFlags(cfg, msc.defines)
else
result = {}
end
for _, define in ipairs(defines) do
table.insert(result, '/D"' .. define .. '"')
end
if cfg and cfg.exceptionhandling == p.OFF then
table.insert(result, "/D_HAS_EXCEPTIONS=0")
end
return result
end
function msc.getundefines(undefines)
local result = {}
for _, undefine in ipairs(undefines) do
table.insert(result, '/U"' .. undefine .. '"')
end
return result
end
--
-- Returns a list of forced include files, decorated for the compiler
-- command line.
--
-- @param cfg
-- The project configuration.
-- @return
-- An array of force include files with the appropriate flags.
--
function msc.getforceincludes(cfg)
local result = {}
table.foreachi(cfg.forceincludes, function(value)
local fn = project.getrelative(cfg.project, value)
table.insert(result, "/FI" .. p.quoted(fn))
end)
return result
end
function msc.getrunpathdirs()
return {}
end
--
-- Decorate include file search paths for the MSVC command line.
--
function msc.getincludedirs(cfg, dirs, sysdirs)
local result = {}
dirs = table.join(dirs, sysdirs)
for _, dir in ipairs(dirs) do
dir = project.getrelative(cfg.project, dir)
table.insert(result, '-I' .. p.quoted(dir))
end
return result
end
--
-- Return a list of linker flags for a specific configuration.
--
msc.linkerFlags = {
flags = {
FatalLinkWarnings = "/WX",
LinkTimeOptimization = "/GL",
NoIncrementalLink = "/INCREMENTAL:NO",
NoManifest = "/MANIFEST:NO",
OmitDefaultLibrary = "/NODEFAULTLIB",
},
kind = {
SharedLib = "/DLL",
},
symbols = {
On = "/DEBUG"
}
}
msc.librarianFlags = {
flags = {
FatalLinkWarnings = "/WX",
}
}
function msc.getldflags(cfg)
local map = iif(cfg.kind ~= p.STATICLIB, msc.linkerFlags, msc.librarianFlags)
local flags = config.mapFlags(cfg, map)
table.insert(flags, 1, "/NOLOGO")
-- Ignore default libraries
for i, ignore in ipairs(cfg.ignoredefaultlibraries) do
-- Add extension if required
if not msc.getLibraryExtensions()[ignore:match("[^.]+$")] then
ignore = path.appendextension(ignore, ".lib")
end
table.insert(flags, '/NODEFAULTLIB:' .. ignore)
end
return flags
end
--
-- Build a list of additional library directories for a particular
-- project configuration, decorated for the tool command line.
--
-- @param cfg
-- The project configuration.
-- @return
-- An array of decorated additional library directories.
--
function msc.getLibraryDirectories(cfg)
local flags = {}
local dirs = table.join(cfg.libdirs, cfg.syslibdirs)
for i, dir in ipairs(dirs) do
dir = project.getrelative(cfg.project, dir)
table.insert(flags, '/LIBPATH:"' .. dir .. '"')
end
return flags
end
--
-- Return a list of valid library extensions
--
function msc.getLibraryExtensions()
return {
["lib"] = true,
["obj"] = true,
}
end
--
-- Return the list of libraries to link, decorated with flags as needed.
--
function msc.getlinks(cfg, systemonly, nogroups)
local links = {}
-- If we need sibling projects to be listed explicitly, grab them first
if not systemonly then
links = config.getlinks(cfg, "siblings", "fullpath")
end
-- Then the system libraries, which come undecorated
local system = config.getlinks(cfg, "system", "fullpath")
for i = 1, #system do
-- Add extension if required
local link = system[i]
if not p.tools.msc.getLibraryExtensions()[link:match("[^.]+$")] then
link = path.appendextension(link, ".lib")
end
table.insert(links, link)
end
return links
end
--
-- Returns makefile-specific configuration rules.
--
function msc.getmakesettings(cfg)
return nil
end
--
-- Retrieves the executable command name for a tool, based on the
-- provided configuration and the operating environment.
--
-- @param cfg
-- The configuration to query.
-- @param tool
-- The tool to fetch, one of "cc" for the C compiler, "cxx" for
-- the C++ compiler, or "ar" for the static linker.
-- @return
-- The executable command name for a tool, or nil if the system's
-- default value should be used.
--
function msc.gettoolname(cfg, tool)
return nil
end
function msc.getwarnings(cfg)
local result = {}
-- NOTE: VStudio can't enable specific warnings (workaround?)
for _, disable in ipairs(cfg.disablewarnings) do
table.insert(result, '/wd"' .. disable .. '"')
end
for _, fatal in ipairs(cfg.fatalwarnings) do
table.insert(result, '/we"' .. fatal .. '"')
end
return result
end
| bsd-3-clause |
dismantl/luci-0.12 | applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua | 80 | 1455 | --[[
Luci configuration model for statistics - collectd unixsock plugin configuration
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
m = Map("luci_statistics",
translate("Unixsock Plugin Configuration"),
translate(
"The unixsock plugin creates a unix socket which can be used " ..
"to read collected data from a running collectd instance."
))
-- collectd_unixsock config section
s = m:section( NamedSection, "collectd_unixsock", "luci_statistics" )
-- collectd_unixsock.enable
enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_unixsock.socketfile (SocketFile)
socketfile = s:option( Value, "SocketFile" )
socketfile.default = "/var/run/collect-query.socket"
socketfile:depends( "enable", 1 )
-- collectd_unixsock.socketgroup (SocketGroup)
socketgroup = s:option( Value, "SocketGroup" )
socketgroup.default = "nobody"
socketgroup.rmempty = true
socketgroup.optional = true
socketgroup:depends( "enable", 1 )
-- collectd_unixsock.socketperms (SocketPerms)
socketperms = s:option( Value, "SocketPerms" )
socketperms.default = "0770"
socketperms.rmempty = true
socketperms.optional = true
socketperms:depends( "enable", 1 )
return m
| apache-2.0 |
LaFamiglia/Illarion-Content | item/id_2745_parchment.lua | 1 | 17813 | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.
You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
]]
local common = require("base.common")
local alchemy = require("alchemy.base.alchemy")
local herbs = require("alchemy.base.herbs")
local id_52_filledbucket = require("item.id_52_filledbucket")
local id_331_green_bottle = require("alchemy.item.id_331_green_bottle")
local gemdust = require("alchemy.base.gemdust")
local id_164_emptybottle = require("item.id_164_emptybottle")
local potionToTeacher = require("triggerfield.potionToTeacher")
local recipe_creation = require("alchemy.base.recipe_creation")
local lookat = require("base.lookat")
local licence = require("base.licence")
local M = {}
-- important: do not remove the fourth parameter "checkVar".
-- it is important for alchemy
-- you can just ignore it
function M.UseItem(User, SourceItem,ltstate,checkVar)
-- Check if it is an alchemy recipe.
if SourceItem:getData("alchemyRecipe") == "true" then
AlchemyRecipe(User, SourceItem,ltstate,checkVar)
return
end
if SourceItem:getData("TeachLenniersDream")=="true" then
LearnLenniersDream(User)
end
end
---------------- ALCHEMY -------------------------------
--------------------------------------------------------
local function getText(User,deText,enText)
return common.GetNLS(User,deText,enText)
end
function LearnLenniersDream(User)
local anAlchemist = alchemy.CheckIfAlchemist(User)
if not anAlchemist then
User:inform("Ihr scheint nur seltsames Gekritzel zu stehen.","Only strange scribbling can be seen here.")
return
end
local foundEffect, myEffect = User.effects:find(59);
if foundEffect then
local findsight, sightpotion = myEffect:findValue("sightpotion")
if findsight then
if sightpotion == User:getQuestProgress(860) then
TeachLenniersDream(User)
return
end
end
end
TaskToLearn(User)
end
function TeachLenniersDream(User)
local callback = function(dialog)
potionToTeacher.TellRecipe(User, 318)
end
local stockDe, stockEn = GenerateStockDescription(User)
local textDE = "Als du deinen Blick auf die wirren Zeilen richtest, beginnen sie sich zu ordnen. Das unleserliche Chaos weicht langsam einer Ordnung."
local textEN = "As you look at the confusing lines, they start to arrange themselves. The unreadable chaos is replaced by order."
local dialog
if User:getPlayerLanguage() == 0 then
dialog = MessageDialog("Was steht da wohl?", textDE, callback)
else
dialog = MessageDialog("What could be written here?", textEN, callback)
end
User:requestMessageDialog(dialog)
end
function M.GenerateStockConcentration()
local stockList = {1,1,1,1,1,1,1,1}
local add = 43
if Random.uniform(1,2)==1 then
add = 21
end
while add > 0 do
local check = false
while check == false do
local rnd = Random.uniform(1,8)
if stockList[rnd] < 9 then
stockList[rnd] = stockList[rnd]+1
add = add - 1
check = true
end
end
end
return stockList
end
function M.GetStockFromQueststatus(User)
if User:getQuestProgress(860) == 0 then
local stockList
stockList = M.GenerateStockConcentration()
User:setQuestProgress(860,alchemy.DataListToNumber(stockList))
end
return alchemy.SplitData(User,User:getQuestProgress(860))
end
function GenerateStockDescription(User)
local stockList = M.GetStockFromQueststatus(User)
local de = ""
local en = ""
for i=1,#stockList do
de = de .. alchemy.wirkung_de[stockList[i]] .. " "..alchemy.wirkstoff[i]
en = en .. alchemy.wirkung_en[stockList[i]] .. " "..alchemy.wirkstoff[i]
if i ~= 8 then
de = de .. ", "
en = en .. ", "
end
end
return de, en
end
function TaskToLearn(User)
local callback = function(dialog) end
local stockDe, stockEn = GenerateStockDescription(User)
local textDE = "Die Zeilen auf dem Pergament sind verschwommen und scheinen sich ständig zu bewegen. Nur ein paar Zeilen, lassen sich lesen:\n\n\nNeugierig, was hier steht? Nun, dann flößt Euch das folgende Gebräu ein und ich verrate Euch das Geheimnis:\nEin Trank, der zum einen aus einem Essenzgebräu auf Rubinstaubbasis (essenzierte Kräuter: Wutbeere, Wutbeere, Regenkraut, Tagtraum, Fliegenpilz) besteht und zum anderen aus einem Sud mit folgenden Konzentrationen: " .. stockDe
local textEN = "The writing on this parchment is blurry and the lines seem to be constantly moving. Only the following lines can be read:\n\n\nAre you curious what might be written here? Well, swallow the following potion and I will tell you the secret:\nA potion made from an essence brew based on ruby powder (containing: anger berry, anger berry, rain weed, daydream, toadstool) and from a stock having the following concentrations: " .. stockEn
local dialog
if User:getPlayerLanguage() == 0 then
dialog = MessageDialog("Was steht da wohl?", textDE, callback)
else
dialog = MessageDialog("What could be written here?", textEN, callback)
end
User:requestMessageDialog(dialog)
end
function AlchemyRecipe(User, SourceItem,ltstate,checkVar)
if alchemy.GetCauldronInfront(User) then
-- The char wants to use the recipe infront of a cauldron.
UseRecipe(User, SourceItem,ltstate,checkVar)
else
-- Not infront of a cauldron.
ViewRecipe(User, SourceItem)
end
end
function UseRecipe(User, SourceItem,ltstate,checkVar)
-- is the char an alchemist?
local anAlchemist = alchemy.CheckIfAlchemist(User)
if not anAlchemist then
User:inform("Nur jene, die in die Kunst der Alchemie eingeführt worden sind, können hier ihr Werk vollrichten.","Only those who have been introduced to the art of alchemy are able to work here.")
return
end
-- proper attriutes?
if ( User:increaseAttrib("perception",0) + User:increaseAttrib("essence",0) + User:increaseAttrib("intelligence",0) ) < 30 then
User:inform("Verstand, ein gutes Auge und ein Gespür für die feinstofflichen Dinge - dir fehlt es daran, als dass du hier arbeiten könntest.",
"Mind, good eyes and a feeling for the world of fine matter - with your lack of those, you are unable to work here."
)
return
end
-- let's start!
StartBrewing(User, SourceItem,ltstate,checkVar)
end
function StartBrewing(User,SourceItem,ltstate,checkVar)
local listOfTheIngredients = getIngredients(SourceItem)
local cauldron = alchemy.GetCauldronInfront(User)
if not cauldron then -- security check
return
end
if licence.licence(User) then --checks if user is citizen or has a licence
return -- avoids crafting if user is neither citizen nor has a licence
end
if ( ltstate == Action.abort ) then
User:inform("Du brichst deine Arbeit vor dem "..USER_POSITION_LIST[User.id]..". Arbeitsschritt ab.", "You abort your work before the "..USER_POSITION_LIST[User.id].." work step.")
return
end
if not checkVar and ltstate==Action.none then
if USER_POSITION_LIST == nil then -- note: it's global!
USER_POSITION_LIST = {}
end
local callback = function(dialog)
local success = dialog:getSuccess()
if success then
local selected = dialog:getSelectedIndex()+1
USER_POSITION_LIST[User.id] = selected
StartBrewing(User, SourceItem,ltstate,true)
end
end
local dialog = SelectionDialog(getText(User,"Rezept","Recipe"), getText(User,"Wähle die Zutat aus, ab welcher das Rezept abgearbeitet werden soll.","Select the ingredient which you want to start to brew from."), callback)
dialog:setCloseOnMove()
if #listOfTheIngredients > 0 then
local counter = 0
for i=1,#listOfTheIngredients do
counter = counter + 1
if type(listOfTheIngredients[i])=="string" then
if string.find(listOfTheIngredients[i],"bottle") then
dialog:addOption(164, getText(User,counter..". Abfüllen",counter..". Bottling"))
else
local liquid, liquidList = recipe_creation.StockEssenceList(listOfTheIngredients[i])
if liquid == "stock" then
dialog:addOption(331, getText(User,counter..". Sud",counter..". Stock"))
elseif liquid == "essence brew" then
dialog:addOption(liquidList[1], getText(User,counter..". Essenzgebräu",counter..". Essence brew"))
end
end
else
dialog:addOption(listOfTheIngredients[i], getText(User,counter..". "..world:getItemName(listOfTheIngredients[i],Player.german),counter..". "..world:getItemName(listOfTheIngredients[i],Player.english)))
end
end
User:requestSelectionDialog(dialog)
return
end
end
local deleteItem, deleteId, missingDe, missingEn = GetItem(User, listOfTheIngredients)
if missingDe then
User:inform("Du brichst deine Arbeit vor dem "..USER_POSITION_LIST[User.id]..". Arbeitsschritt ab. "..missingDe, "You abort your work before the "..USER_POSITION_LIST[User.id]..". work step. "..missingEn)
return
end
if (ltstate == Action.none) then
local duration,gfxId,gfxIntervall,sfxId,sfxIntervall = GetStartAction(User, listOfTheIngredients, cauldron)
User:startAction(duration,gfxId,gfxIntervall,sfxId,sfxIntervall);
return
end
CallBrewFunctionAndDeleteItem(User,deleteItem, deleteId,cauldron)
USER_POSITION_LIST[User.id] = USER_POSITION_LIST[User.id]+1
if alchemy.CheckExplosionAndCleanList(User) then
if USER_POSITION_LIST[User.id] < #listOfTheIngredients then
User:inform("Du brichst deine Arbeit vor dem "..USER_POSITION_LIST[User.id]..". Arbeitsschritt ab.", "You abort your work before the "..USER_POSITION_LIST[User.id]..". work step.")
end
return
end
if USER_POSITION_LIST[User.id] > #listOfTheIngredients then
return
else
local duration,gfxId,gfxIntervall,sfxId,sfxIntervall = GetStartAction(User, listOfTheIngredients, cauldron)
User:startAction(duration,gfxId,gfxIntervall,sfxId,sfxIntervall);
end
end
function CallBrewFunctionAndDeleteItem(User,deleteItem, deleteId,cauldron)
if deleteId then
if deleteId == 52 then -- water
local buckets = User:getItemList(deleteId)
-- here, we could need a check if the bucket has no datas
id_52_filledbucket.FillIn(User, buckets[1], cauldron, true)
elseif alchemy.CheckIfGemDust(deleteId) then --gemdust
gemdust.BrewingGemDust(User,deleteId,cauldron)
local data = {}
User:eraseItem(deleteId,1,data)
elseif alchemy.getPlantSubstance(deleteId) or deleteId == 157 then -- plant/rotten tree bark
herbs.BeginnBrewing(User,deleteId,cauldron)
local data = {}
User:eraseItem(deleteId,1,data)
end
else
if deleteItem.id == 164 then -- empty bottle
id_164_emptybottle.FillIntoBottle(User, deleteItem, cauldron)
elseif deleteItem.id == 331 then -- stock
id_331_green_bottle.FillStockIn(User,deleteItem, cauldron)
alchemy.EmptyBottle(User,deleteItem)
elseif alchemy.CheckIfPotionBottle(deleteItem) then
alchemy.FillIntoCauldron(User,deleteItem,cauldron)
end
end
end
function GetStartAction(User, listOfTheIngredients, cauldron)
local ingredient = listOfTheIngredients[USER_POSITION_LIST[User.id]]
local theString
if type(ingredient) == "number" then
if ingredient == 52 then
theString = "water"
elseif alchemy.CheckIfGemDust(ingredient) then
theString = "gemPowder"
elseif alchemy.getPlantSubstance(ingredient) or ingredient == 157 then
theString = "plant"
end
else
if string.find(ingredient,"bottle") then
theString = "bottle"
elseif string.find(ingredient,"stock") then
theString = "stock"
elseif string.find(ingredient,"essence") then
theString = "essenceBrew"
end
end
local duration,gfxId,gfxIntervall,sfxId,sfxIntervall = alchemy.GetStartAction(User, theString, cauldron)
return duration,gfxId,gfxIntervall,sfxId,sfxIntervall
end
function GetItem(User, listOfTheIngredients)
local deleteItem, deleteId, missingDe, missingEn
if type(listOfTheIngredients[USER_POSITION_LIST[User.id]])=="string" then
if string.find(listOfTheIngredients[USER_POSITION_LIST[User.id]],"bottle") then
local bottleList = User:getItemList(164)
local bottleList = User:getItemList(164)
if #bottleList > 0 then
deleteItem = bottleList[1] -- here, we take the first bottle we get
for i=1,#bottleList do
if not string.find(bottleList[i]:getData("descriptionEn"),"Bottle label:") then -- now, we check if there is an empty bottle; we prefer those
deleteItem = bottleList[i] -- in case there is a empty, unlabeled bottle
break
end
end
end
if not (deleteItem) then
missingDe = "Dir fehlt: leere Flasche"
missingEn = "You don't have: empty bottle"
end
else
local liquid, neededList = recipe_creation.StockEssenceList(listOfTheIngredients[USER_POSITION_LIST[User.id]])
if liquid == "stock" then
local stockList = User:getItemList(331)
for i=1,#stockList do
local currentList = alchemy.SubstanceDatasToList(stockList[i])
if alchemy.CheckListsIfEqual(neededList,currentList) then
deleteItem = stockList[i]
end
end
if not (deleteItem) then
missingDe = "Dir fehlt der entsprechende Sud."
missingEn = "Your don't have the proper stock."
end
elseif liquid == "essence brew" then
local neededId = table.remove(neededList,1)
local bottleList = User:getItemList(neededId)
local currentList = {}
for i=1,#bottleList do
currentList = {}
if bottleList[i]:getData("filledWith")=="essenceBrew" then
for j=1,8 do
if bottleList[i]:getData("essenceHerb"..j) ~= "" then
table.insert(currentList,tonumber(bottleList[i]:getData("essenceHerb"..j)))
end
end
end
if alchemy.CheckListsIfEqual(neededList,currentList) then
deleteItem = bottleList[i]
end
end
if not (deleteItem) then
missingDe = "Dir fehlt das entsprechende Essenzgebräu."
missingEn = "Your don't have the proper essence brew."
end
end
end
else
local data = {}
if (User:countItemAt("all",listOfTheIngredients[USER_POSITION_LIST[User.id]],data) > 0) then
deleteId = listOfTheIngredients[USER_POSITION_LIST[User.id]]
end
if not deleteId then
missingDe = "Dir fehlt: "..world:getItemName(listOfTheIngredients[USER_POSITION_LIST[User.id]],Player.german)
missingEn = "You don't have: "..world:getItemName(listOfTheIngredients[USER_POSITION_LIST[User.id]],Player.english)
end
end
return deleteItem, deleteId, missingDe, missingEn
end
function ViewRecipe(User, SourceItem)
local listOfTheIngredients = getIngredients(SourceItem)
recipe_creation.ShowRecipe(User, listOfTheIngredients, true)
end
function getIngredients(SourceItem)
local listOfTheIngredients = {}
for i=1,60 do
if SourceItem:getData("ingredient"..i) ~= "" then
if tonumber(SourceItem:getData("ingredient"..i)) ~= nil then
table.insert(listOfTheIngredients,tonumber(SourceItem:getData("ingredient"..i)))
else
table.insert(listOfTheIngredients,SourceItem:getData("ingredient"..i))
end
else
break
end
end
return listOfTheIngredients
end
---------------- ALCHEMY END ---------------------------
--------------------------------------------------------
function M.LookAtItem(User, Item)
return lookat.GenerateLookAt(User, Item, lookat.NONE)
end
return M
| agpl-3.0 |
spark0511/blueteambot | plugins/torrent_search.lua | 411 | 1622 | --[[ NOT USED DUE TO SSL ERROR
-- See https://getstrike.net/api/
local function strike_search(query)
local strike_base = 'http://getstrike.net/api/v2/torrents/'
local url = strike_base..'search/?phrase='..URL.escape(query)
print(url)
local b,c = http.request(url)
print(b,c)
local search = json:decode(b)
vardump(search)
if c ~= 200 then
return search.message
end
vardump(search)
local results = search.results
local text = 'Results: '..results
local results = math.min(results, 3)
for i=1,results do
local torrent = search.torrents[i]
text = text..torrent.torrent_title
..'\n'..'Seeds: '..torrent.seeds
..' '..'Leeches: '..torrent.seeds
..'\n'..torrent.magnet_uri..'\n\n'
end
return text
end]]--
local function search_kickass(query)
local url = 'http://kat.cr/json.php?q='..URL.escape(query)
local b,c = http.request(url)
local data = json:decode(b)
local text = 'Results: '..data.total_results..'\n\n'
local results = math.min(#data.list, 5)
for i=1,results do
local torrent = data.list[i]
local link = torrent.torrentLink
link = link:gsub('%?title=.+','')
text = text..torrent.title
..'\n'..'Seeds: '..torrent.seeds
..' '..'Leeches: '..torrent.leechs
..'\n'..link
--..'\n magnet:?xt=urn:btih:'..torrent.hash
..'\n\n'
end
return text
end
local function run(msg, matches)
local query = matches[1]
return search_kickass(query)
end
return {
description = "Search Torrents",
usage = "!torrent <search term>: Search for torrent",
patterns = {
"^!torrent (.+)$"
},
run = run
}
| gpl-2.0 |
Noltari/luci | applications/luci-app-p910nd/luasrc/model/cbi/p910nd.lua | 78 | 1340 | -- Copyright 2008 Yanira <forum-2008@email.de>
-- Copyright 2012 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local uci = luci.model.uci.cursor_state()
local net = require "luci.model.network"
local m, s, p, b
m = Map("p910nd", translate("p910nd - Printer server"),
translatef("First you have to install the packages to get support for USB (kmod-usb-printer) or parallel port (kmod-lp)."))
net = net.init(m.uci)
s = m:section(TypedSection, "p910nd", translate("Settings"))
s.addremove = true
s.anonymous = true
s:option(Flag, "enabled", translate("enable"))
s:option(Value, "device", translate("Device")).rmempty = true
b = s:option(Value, "bind", translate("Interface"), translate("Specifies the interface to listen on."))
b.template = "cbi/network_netlist"
b.nocreate = true
b.unspecified = true
function b.cfgvalue(...)
local v = Value.cfgvalue(...)
if v then
return (net:get_status_by_address(v))
end
end
function b.write(self, section, value)
local n = net:get_network(value)
if n and n:ipaddr() then
Value.write(self, section, n:ipaddr())
end
end
p = s:option(ListValue, "port", translate("Port"), translate("TCP listener port."))
p.rmempty = true
for i=0,9 do
p:value(i, 9100+i)
end
s:option(Flag, "bidirectional", translate("Bidirectional mode"))
return m
| apache-2.0 |
otalk/convert-jingle-lua | src/utils.lua | 1 | 1865 | local M = {}
function M.printTable(T)
for _,line in pairs(T) do
if type(line) == "table" then
M.printTable(line)
else
print(line)
end
end
end
function indentString(indent)
local indentString = " "
for i=1,indent do
indentString = indentString .. " "
end
return indentString
end
function M.tableString(T, indent)
indent = indent or 0
local string = "{\n"
for key, value in pairs(T) do
if type(value) == "table" then
string = string .. indentString(indent) .. key .. "= " .. M.tableString(value, indent + 1) .. "\n"
elseif type(value) == "boolean" then
string = string .. indentString(indent) .. key .. "= " .. (value and "true" or "false") .. ",\n"
else
string = string .. indentString(indent) .. key .. "= " .. value .. ",\n"
end
end
string = string .. indentString(indent) .. "},"
return string
end
function M.setMetatableRecursively(T, metatable)
setmetatable(T, metatable)
for _,value in pairs(T) do
if type(value) == "table" then
M.setMetatableRecursively(value, metatable)
end
end
end
function M.appendTable(t1, t2)
for _, value in pairs(t2) do
table.insert(t1, value)
end
return t1
end
function M.split(S, separator)
local begin = 1
local index = string.find(S, separator, begin, true)
local array = {}
while index do
local sub = string.sub(S, begin, index - 1)
table.insert(array, sub)
begin = index + string.len(separator)
index = string.find(S, separator, begin, true)
end
if table.getn(array) == 0 then
table.insert(array, S)
else
local sub = string.sub(S, begin)
table.insert(array, sub)
end
return array
end
return M
| mit |
RedSnake64/openwrt-luci-packages | libs/luci-lib-nixio/docsrc/nixio.Socket.lua | 157 | 6508 | --- Socket Object.
-- Supports IPv4, IPv6 and UNIX (POSIX only) families.
-- @cstyle instance
module "nixio.Socket"
--- Get the local address of a socket.
-- @class function
-- @name Socket.getsockname
-- @return IP-Address
-- @return Port
--- Get the peer address of a socket.
-- @class function
-- @name Socket.getpeername
-- @return IP-Address
-- @return Port
--- Bind the socket to a network address.
-- @class function
-- @name Socket.bind
-- @usage This function calls getaddrinfo() and bind() but NOT listen().
-- @usage If <em>host</em> is a domain name it will be looked up and bind()
-- tries the IP-Addresses in the order returned by the DNS resolver
-- until the bind succeeds.
-- @usage UNIX sockets ignore the <em>port</em>,
-- and interpret <em>host</em> as a socket path.
-- @param host Host (optional, default: all addresses)
-- @param port Port or service description
-- @return true
--- Connect the socket to a network address.
-- @class function
-- @name Socket.connect
-- @usage This function calls getaddrinfo() and connect().
-- @usage If <em>host</em> is a domain name it will be looked up and connect()
-- tries the IP-Addresses in the order returned by the DNS resolver
-- until the connect succeeds.
-- @usage UNIX sockets ignore the <em>port</em>,
-- and interpret <em>host</em> as a socket path.
-- @param host Hostname or IP-Address (optional, default: localhost)
-- @param port Port or service description
-- @return true
--- Listen for connections on the socket.
-- @class function
-- @name Socket.listen
-- @param backlog Length of queue for pending connections
-- @return true
--- Accept a connection on the socket.
-- @class function
-- @name Socket.accept
-- @return Socket Object
-- @return Peer IP-Address
-- @return Peer Port
--- Send a message on the socket specifying the destination.
-- @class function
-- @name Socket.sendto
-- @usage <strong>Warning:</strong> It is not guaranteed that all data
-- in the buffer is written at once.
-- You have to check the return value - the number of bytes actually written -
-- or use the safe IO functions in the high-level IO utility module.
-- @usage Unlike standard Lua indexing the lowest offset and default is 0.
-- @param buffer Buffer holding the data to be written.
-- @param host Target IP-Address
-- @param port Target Port
-- @param offset Offset to start reading the buffer from. (optional)
-- @param length Length of chunk to read from the buffer. (optional)
-- @return number of bytes written
--- Send a message on the socket.
-- This function is identical to sendto except for the missing destination
-- paramters. See the sendto description for a detailed description.
-- @class function
-- @name Socket.send
-- @param buffer Buffer holding the data to be written.
-- @param offset Offset to start reading the buffer from. (optional)
-- @param length Length of chunk to read from the buffer. (optional)
-- @see Socket.sendto
-- @return number of bytes written
--- Send a message on the socket (This is an alias for send).
-- See the sendto description for a detailed description.
-- @class function
-- @name Socket.write
-- @param buffer Buffer holding the data to be written.
-- @param offset Offset to start reading the buffer from. (optional)
-- @param length Length of chunk to read from the buffer. (optional)
-- @see Socket.sendto
-- @return number of bytes written
--- Receive a message on the socket including the senders source address.
-- @class function
-- @name Socket.recvfrom
-- @usage <strong>Warning:</strong> It is not guaranteed that all requested data
-- is read at once.
-- You have to check the return value - the length of the buffer actually read -
-- or use the safe IO functions in the high-level IO utility module.
-- @usage The length of the return buffer is limited by the (compile time)
-- nixio buffersize which is <em>nixio.const.buffersize</em> (8192 by default).
-- Any read request greater than that will be safely truncated to this value.
-- @param length Amount of data to read (in Bytes).
-- @return buffer containing data successfully read
-- @return host IP-Address of the sender
-- @return port Port of the sender
--- Receive a message on the socket.
-- This function is identical to recvfrom except that it does not return
-- the sender's source address. See the recvfrom description for more details.
-- @class function
-- @name Socket.recv
-- @param length Amount of data to read (in Bytes).
-- @see Socket.recvfrom
-- @return buffer containing data successfully read
--- Receive a message on the socket (This is an alias for recv).
-- See the recvfrom description for more details.
-- @class function
-- @name Socket.read
-- @param length Amount of data to read (in Bytes).
-- @see Socket.recvfrom
-- @return buffer containing data successfully read
--- Close the socket.
-- @class function
-- @name Socket.close
-- @return true
--- Shut down part of a full-duplex connection.
-- @class function
-- @name Socket.shutdown
-- @param how (optional, default: rdwr) ["rdwr", "rd", "wr"]
-- @return true
--- Get the number of the filedescriptor.
-- @class function
-- @name Socket.fileno
-- @return file descriptor number
--- Set the blocking mode of the socket.
-- @class function
-- @name Socket.setblocking
-- @param blocking (boolean)
-- @return true
--- Set a socket option.
-- @class function
-- @name Socket.setopt
-- @param level Level ["socket", "tcp", "ip", "ipv6"]
-- @param option Option ["keepalive", "reuseaddr", "sndbuf", "rcvbuf",
-- "priority", "broadcast", "linger", "sndtimeo", "rcvtimeo", "dontroute",
-- "bindtodevice", "error", "oobinline", "cork" (TCP), "nodelay" (TCP),
-- "mtu" (IP, IPv6), "hdrincl" (IP), "multicast_ttl" (IP), "multicast_loop"
-- (IP, IPv6), "multicast_if" (IP, IPv6), "v6only" (IPv6), "multicast_hops"
-- (IPv6), "add_membership" (IP, IPv6), "drop_membership" (IP, IPv6)]
-- @param value Value
-- @return true
--- Get a socket option.
-- @class function
-- @name Socket.getopt
-- @param level Level ["socket", "tcp", "ip", "ipv6"]
-- @param option Option ["keepalive", "reuseaddr", "sndbuf", "rcvbuf",
-- "priority", "broadcast", "linger", "sndtimeo", "rcvtimeo", "dontroute",
-- "bindtodevice", "error", "oobinline", "cork" (TCP), "nodelay" (TCP),
-- "mtu" (IP, IPv6), "hdrincl" (IP), "multicast_ttl" (IP), "multicast_loop"
-- (IP, IPv6), "multicast_if" (IP, IPv6), "v6only" (IPv6), "multicast_hops"
-- (IPv6), "add_membership" (IP, IPv6), "drop_membership" (IP, IPv6)]
-- @return Value | apache-2.0 |
LaFamiglia/Illarion-Content | npc/base/condition/questtime.lua | 1 | 2232 | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.
You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
]]
local class = require("base.class")
local repeatable_quests = require("npc.base.repeatable_quests")
local condition = require("npc.base.condition.condition")
local tools = require("npc.base.tools")
local _questtime_helper_greater
local _questtime_helper_lesser
local questtime = class(condition,
function(self, comp, quest, month, day, hour)
condition:init(self)
self["month"], self["monthtype"] = tools.set_value(month)
self["day"], self["daytype"] = tools.set_value(day)
self["hour"], self["hourtype"] = tools.set_value(hour)
self["quest"] = quest
if (comp == ">") then
self["check"] = _questtime_helper_greater
elseif (comp == "<") then
self["check"] = _questtime_helper_lesser
else
-- unkonwn comparator
end
end)
function _questtime_helper_greater(self, npcChar, texttype, player)
local month = tools.get_value(self.npc, self.month, self.monthtype)
local day = tools.get_value(self.npc, self.day, self.daytype)
local hour = tools.get_value(self.npc, self.hour, self.hourtype)
local quest = self.quest
return repeatable_quests.checkIfTimesExpired(player, quest, month, day, hour)
end
function _questtime_helper_lesser(self, npcChar, texttype, player)
local month = tools.get_value(self.npc, self.month, self.monthtype)
local day = tools.get_value(self.npc, self.day, self.daytype)
local hour = tools.get_value(self.npc, self.hour, self.hourtype)
local quest = self.quest
return not repeatable_quests.checkIfTimesExpired(player, quest, month, day, hour)
end
return questtime | agpl-3.0 |
flybird119/Atlas | lib/commit-obfuscator.lua | 39 | 1677 | --[[ $%BEGINLICENSE%$
Copyright (c) 2008, 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 distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
$%ENDLICENSE%$ --]]
--[[
Let a random number of transaction rollback
As part of the QA we have to verify that applications handle
rollbacks nicely. To simulate a deadlock we turn client-side COMMITs
into server-side ROLLBACKs and return a ERROR packet to the client
telling it a deadlock happened.
--]]
function read_query(packet)
if packet:byte() ~= proxy.COM_QUERY then return end
-- only care about commits
if packet:sub(2):upper() ~= "COMMIT" then return end
-- let 80% fail
if math.random(10) <= 5 then return end
proxy.queries:append(1, string.char(proxy.COM_QUERY) .. "ROLLBACK", { resultset_is_needed = true })
return proxy.PROXY_SEND_QUERY
end
function read_query_result(inj)
if inj.id ~= 1 then return end
proxy.response = {
type = proxy.MYSQLD_PACKET_ERR,
errmsg = "Lock wait timeout exceeded; try restarting transaction",
errno = 1205,
sqlstate = "HY000"
}
return proxy.PROXY_SEND_RESULT
end
| gpl-2.0 |
Snazz2001/fbcunn | test/benchmark_cublas.lua | 8 | 3885 | -- Copyright 2004-present Facebook. All Rights Reserved.
require('fb.luaunit')
require 'cunn'
require 'fbcunn'
torch.setdefaulttensortype('torch.FloatTensor')
local test = {}
-- Let C = m-by-n and A = m-by-k
-- Format is m, n, k, seqIter, batch, numHandles, numStreams
local problemSize = {
-- Sanity tests
-- Trivial mxm, no batch, no iter
{1, 1, 2, {}, {}, 0, 0},
{1, 1, 2, {}, {}, 0, 1},
{1, 1, 2, {}, {}, 1, 0},
{1, 1, 2, {}, {}, 1, 1},
{1, 1, 2, {}, {}, 16, 16},
-- 2x4 <- 2x8 * 8x4 as 1 iter, 1 batch
{2, 4, 8, {1}, {1}, 1, 1},
-- 2x4 <- 2x8 * 8x4 as 1 iter, no batch
{2, 4, 8, {1}, {}, 1, 1},
-- 2x4 <- 2x8 * 8x4 as no iter, 1 batch
{2, 4, 8, {}, {1}, 1, 1},
-- 2x4 <- 2x8 * 8x4 as no iter, no batch
{2, 4, 8, {}, {}, 1, 1},
-- 128x128 <- 128x128 * 128x128 as 4x4 iter, 4x4 batch
{128, 128, 128, {4, 4}, {4, 4}, 1, 1},
{1024, 1024, 1024, {1, 1}, {1, 1}, 1, 1},
{1024, 1024, 1024, {}, {}, 1, 1},
-- Various way of performing temporal convolution of 512: 32 -> 16
{16, 1024, 512, {}, {1}, 1, 1},
{16, 1024, 512, {}, {}, 1, 1},
{1, 1024, 512, {16}, {1}, 1, 1},
{1, 1024, 512, {1}, {16}, 1, 1},
{32 * 16, 1024, 512, {1}, {1}, 1, 1},
{1, 1024, 512, {16 * 32}, {1}, 1, 1},
{16, 1024, 512, {32}, {1}, 16, 1},
{16, 1024, 512, {1}, {32}, 0, 0},
{1, 1024, 512, {1}, {16 * 32}, 1, 1},
}
local function concat(t1,t2)
local res = {}
for i=1,#t1 do
res[#res + 1] = t1[i]
end
for i=1,#t2 do
res[#res + 1] = t2[i]
end
return res
end
-- Soumith's inline print
local ndepth = 4
local function print_inline(...)
local function rawprint(o)
io.write(tostring(o or '') .. ' ')
io.flush()
end
local function printrecursive(obj, depth)
local depth = depth or 0
local tab = 0
local line = function(s) for i=1,tab do io.write(' ') end rawprint(s) end
if next(obj) then
line('{')
for k,v in pairs(obj) do
if type(v) == 'table' then
if depth >= (ndepth-1) or next(v) == nil then
line(tostring(k) .. ' : {}')
else
line(tostring(k) .. ' : ') printrecursive(v, depth + 1)
end
else
line(tostring(k) .. ' : ' .. v)
end
rawprint(',')
end
tab = tab-2
line('}')
else
line('{}')
end
end
for i = 1,select('#',...) do
local obj = select(i,...)
if type(obj) ~= 'table' then
if type(obj) == 'userdata' or type(obj) == 'cdata' then
rawprint(obj)
else
io.write(obj .. '\t')
if i == select('#',...) then
rawprint()
end
end
elseif getmetatable(obj) and getmetatable(obj).__tostring then
rawprint(obj)
else
printrecursive(obj)
end
end
end
local function testLoop(problemSize)
-- Just allocate some dummy placeholder to get to the proper
-- function in the lua module
local net = nn.CuBLASWrapper()
local m = problemSize[1]
local n = problemSize[2]
local k = problemSize[3]
local seqIter = problemSize[4]
local batch = problemSize[5]
local handles = problemSize[6]
local streams = problemSize[7]
local seqBatch = concat(seqIter, batch)
local sA = torch.LongStorage(concat(seqBatch, {m, k}))
local sB = torch.LongStorage(concat(seqBatch, {k, n}))
local sC = torch.LongStorage(concat(seqBatch, {m, n}))
local A = torch.Tensor(sA):cuda()
local B = torch.Tensor(sB):cuda()
local C = torch.Tensor(sC):cuda()
print_inline(problemSize)
print('')
net:matmult(A, B, C, seqIter, batch, handles, streams)
collectgarbage()
end
for i = 1, table.getn(problemSize) do
testLoop(problemSize[i])
end
| bsd-3-clause |
D-m-L/evonara | maps/map01.lua | 1 | 144816 | return {
version = "1.1",
luaversion = "5.1",
orientation = "orthogonal",
width = 128,
height = 128,
tilewidth = 32,
tileheight = 32,
backgroundcolor = { 128, 128, 128 },
properties = {},
tilesets = {
{
name = "tilesheet",
firstgid = 1,
tilewidth = 32,
tileheight = 32,
spacing = 0,
margin = 0,
image = "tilesheet.png",
imagewidth = 1024,
imageheight = 1024,
tileoffset = {
x = 0,
y = 0
},
properties = {},
tiles = {
{
id = 0,
properties = {
["collidable"] = "true"
},
animation = {
{
tileid = "640",
duration = "100"
},
{
tileid = "641",
duration = "100"
},
{
tileid = "642",
duration = "100"
},
{
tileid = "643",
duration = "100"
},
{
tileid = "644",
duration = "100"
},
{
tileid = "645",
duration = "100"
},
{
tileid = "646",
duration = "100"
},
{
tileid = "647",
duration = "100"
},
{
tileid = "648",
duration = "100"
},
{
tileid = "649",
duration = "100"
},
{
tileid = "650",
duration = "100"
},
{
tileid = "651",
duration = "100"
},
{
tileid = "652",
duration = "100"
},
{
tileid = "653",
duration = "100"
},
{
tileid = "654",
duration = "100"
},
{
tileid = "655",
duration = "100"
},
{
tileid = "656",
duration = "100"
},
{
tileid = "657",
duration = "100"
},
{
tileid = "658",
duration = "100"
}
}
},
{
id = 1,
properties = {
["collidable"] = "true"
},
animation = {
{
tileid = "672",
duration = "100"
},
{
tileid = "673",
duration = "100"
},
{
tileid = "674",
duration = "100"
},
{
tileid = "675",
duration = "100"
},
{
tileid = "676",
duration = "100"
},
{
tileid = "677",
duration = "100"
},
{
tileid = "678",
duration = "100"
},
{
tileid = "679",
duration = "100"
},
{
tileid = "680",
duration = "100"
},
{
tileid = "681",
duration = "100"
},
{
tileid = "682",
duration = "100"
},
{
tileid = "683",
duration = "100"
},
{
tileid = "684",
duration = "100"
},
{
tileid = "685",
duration = "100"
},
{
tileid = "686",
duration = "100"
},
{
tileid = "687",
duration = "100"
},
{
tileid = "688",
duration = "100"
},
{
tileid = "689",
duration = "100"
},
{
tileid = "690",
duration = "100"
}
}
},
{
id = 210,
objectGroup = {
type = "objectgroup",
name = "",
visible = true,
opacity = 1,
properties = {},
objects = {
{
name = "",
type = "",
shape = "rectangle",
x = 12.125,
y = 26,
width = 19.625,
height = 5.875,
rotation = 0,
visible = true,
properties = {}
}
}
}
},
{
id = 211,
objectGroup = {
type = "objectgroup",
name = "",
visible = true,
opacity = 1,
properties = {},
objects = {
{
name = "",
type = "",
shape = "rectangle",
x = -0.125,
y = 26.25,
width = 11.875,
height = 5.5,
rotation = 0,
visible = true,
properties = {}
}
}
}
},
{
id = 242,
objectGroup = {
type = "objectgroup",
name = "",
visible = true,
opacity = 1,
properties = {},
objects = {
{
name = "",
type = "",
shape = "rectangle",
x = 10.125,
y = 0.125,
width = 21.625,
height = 9.625,
rotation = 0,
visible = true,
properties = {}
}
}
}
},
{
id = 243,
objectGroup = {
type = "objectgroup",
name = "",
visible = true,
opacity = 1,
properties = {},
objects = {
{
name = "",
type = "",
shape = "rectangle",
x = 0,
y = 0.25,
width = 11.875,
height = 21.625,
rotation = 0,
visible = true,
properties = {}
},
{
name = "",
type = "",
shape = "rectangle",
x = 12,
y = 10.125,
width = 13.875,
height = 11.75,
rotation = 0,
visible = true,
properties = {}
}
}
}
},
{
id = 272,
properties = {
["collidable"] = "true"
}
},
{
id = 273,
properties = {
["collidable"] = "true"
}
},
{
id = 274,
properties = {
["collidable"] = "true"
}
},
{
id = 275,
properties = {
["collidable"] = "true"
}
},
{
id = 304,
properties = {
["collidable"] = "true"
}
},
{
id = 305,
properties = {
["collidable"] = "true"
}
},
{
id = 306,
properties = {
["collidable"] = "true"
}
},
{
id = 307,
properties = {
["collidable"] = "true"
}
},
{
id = 659,
properties = {
["collidable"] = "true"
}
}
}
}
},
layers = {
{
type = "tilelayer",
name = "Ground",
x = 0,
y = 0,
width = 128,
height = 128,
visible = true,
opacity = 1,
properties = {},
encoding = "lua",
data = {
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 462, 463, 465, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 525, 559, 498, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 590, 624, 625, 339, 339, 339, 339, 79, 339, 339, 339, 339, 339, 12, 14, 47, 339, 462, 464, 464, 465, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 76, 148, 145, 339, 525, 496, 497, 530, 465, 462, 465, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 462, 464, 463, 463, 465, 77, 173, 177, 339, 494, 496, 497, 562, 562, 525, 498, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 462, 464, 464, 463, 464, 465, 339, 339, 339, 339, 494, 495, 593, 625, 498, 525, 562, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 525, 559, 496, 593, 624, 625, 45, 45, 12, 46, 525, 527, 498, 462, 465, 525, 562, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 494, 592, 593, 625, 12, 47, 13, 46, 17, 77, 623, 591, 562, 494, 498, 525, 562, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 494, 497, 530, 47, 140, 81, 45, 14, 13, 14, 48, 623, 625, 557, 625, 557, 594, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 525, 497, 530, 47, 76, 113, 140, 114, 178, 115, 147, 48, 623, 594, 557, 594, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 590, 624, 625, 80, 77, 177, 172, 176, 175, 173, 175, 80, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 116, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 110, 339, 339, 339, 339, 339, 339, 339, 339, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 115, 142, 339, 339, 339, 339, 339, 339, 339, 339, 143, 144, 141, 142, 143, 114, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 110, 339, 339, 339, 339, 339, 339, 339, 339, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 115, 112, 109, 110, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 339, 339, 339, 339, 339, 339, 339, 339, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 110, 339, 339, 339, 339, 339, 339, 339, 339, 111, 112, 109, 275, 276, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 115, 142, 143, 144, 141, 307, 308, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 114, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 116, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 115, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 143, 116, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 273, 274, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 114, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 305, 306, 112, 109, 110, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 114, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 115, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 114, 111, 112, 109, 110, 116, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 116, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 110, 111, 211, 212, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 143, 243, 244, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 109, 110, 111, 112, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 141, 142, 143, 144, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 340, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 403, 404, 403, 404, 403, 404, 403, 404, 403, 404, 403, 404, 403, 404, 403, 404, 404, 404, 403, 404, 403, 404, 403, 404, 403, 404, 403, 404, 403, 404, 403, 404, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 435, 436, 435, 436, 435, 436, 435, 436, 435, 436, 435, 436, 435, 436, 435, 436, 435, 404, 435, 435, 435, 435, 435, 435, 435, 436, 435, 436, 435, 436, 435, 436, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 467, 468, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 499, 500, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339
}
},
{
type = "tilelayer",
name = "Transition",
x = 0,
y = 0,
width = 128,
height = 128,
visible = true,
opacity = 1,
properties = {},
encoding = "lua",
data = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
},
{
type = "objectgroup",
name = "Collidable",
visible = true,
opacity = 1,
properties = {
["collidable"] = "true"
},
objects = {
{
name = "",
type = "",
shape = "rectangle",
x = 2475,
y = 1548,
width = 70,
height = 70,
rotation = 0,
visible = true,
properties = {}
},
{
name = "",
type = "",
shape = "ellipse",
x = 2378,
y = 1552,
width = 72,
height = 72,
rotation = 0,
visible = true,
properties = {}
},
{
name = "",
type = "",
shape = "polygon",
x = 2286,
y = 1554,
width = 0,
height = 0,
rotation = 0,
visible = true,
polygon = {
{ x = 0, y = 0 },
{ x = 66, y = 0 },
{ x = 63, y = 58 },
{ x = 37, y = 15 },
{ x = 6, y = 40 }
},
properties = {}
},
{
name = "",
type = "",
shape = "polyline",
x = 2254,
y = 1554,
width = 0,
height = 0,
rotation = 0,
visible = true,
polyline = {
{ x = 0, y = 0 },
{ x = -1, y = 62 },
{ x = -31, y = 27 },
{ x = -65, y = 60 },
{ x = -65, y = -1 }
},
properties = {}
},
{
name = "",
type = "",
shape = "rectangle",
x = 2527,
y = 2270,
width = 0,
height = 0,
rotation = 0,
gid = 210,
visible = true,
properties = {}
}
}
},
{
type = "objectgroup",
name = "Me too",
visible = true,
opacity = 1,
properties = {},
objects = {
{
name = "",
type = "",
shape = "ellipse",
x = 1581,
y = 2125,
width = 105,
height = 105,
rotation = 0,
visible = true,
properties = {
["collidable"] = "true"
}
},
{
name = "",
type = "",
shape = "rectangle",
x = 1932,
y = 2217.33,
width = 98.6667,
height = 70.6667,
rotation = 0,
visible = true,
properties = {
["collidable"] = "true"
}
},
{
name = "",
type = "",
shape = "rectangle",
x = 2207,
y = 2271,
width = 0,
height = 0,
rotation = 0,
gid = 244,
visible = true,
properties = {
["collidable"] = "true"
}
}
}
}
}
}
| mit |
nerdclub-tfg/telegram-bot | plugins/torrent_search.lua | 411 | 1622 | --[[ NOT USED DUE TO SSL ERROR
-- See https://getstrike.net/api/
local function strike_search(query)
local strike_base = 'http://getstrike.net/api/v2/torrents/'
local url = strike_base..'search/?phrase='..URL.escape(query)
print(url)
local b,c = http.request(url)
print(b,c)
local search = json:decode(b)
vardump(search)
if c ~= 200 then
return search.message
end
vardump(search)
local results = search.results
local text = 'Results: '..results
local results = math.min(results, 3)
for i=1,results do
local torrent = search.torrents[i]
text = text..torrent.torrent_title
..'\n'..'Seeds: '..torrent.seeds
..' '..'Leeches: '..torrent.seeds
..'\n'..torrent.magnet_uri..'\n\n'
end
return text
end]]--
local function search_kickass(query)
local url = 'http://kat.cr/json.php?q='..URL.escape(query)
local b,c = http.request(url)
local data = json:decode(b)
local text = 'Results: '..data.total_results..'\n\n'
local results = math.min(#data.list, 5)
for i=1,results do
local torrent = data.list[i]
local link = torrent.torrentLink
link = link:gsub('%?title=.+','')
text = text..torrent.title
..'\n'..'Seeds: '..torrent.seeds
..' '..'Leeches: '..torrent.leechs
..'\n'..link
--..'\n magnet:?xt=urn:btih:'..torrent.hash
..'\n\n'
end
return text
end
local function run(msg, matches)
local query = matches[1]
return search_kickass(query)
end
return {
description = "Search Torrents",
usage = "!torrent <search term>: Search for torrent",
patterns = {
"^!torrent (.+)$"
},
run = run
}
| gpl-2.0 |
paritoshmmmec/kong | kong/cli/db.lua | 22 | 1420 | #!/usr/bin/env lua
local Faker = require "kong.tools.faker"
local constants = require "kong.constants"
local cutils = require "kong.cli.utils"
local IO = require "kong.tools.io"
local lapp = require("lapp")
local args = lapp(string.format([[
For development purposes only.
Seed the database with random data or drop it.
Usage: kong db <command> [options]
Commands:
<command> (string) where <command> is one of:
seed, drop
Options:
-c,--config (default %s) path to configuration file
-r,--random flag to also insert random entities
-n,--number (default 1000) number of random entities to insert if --random
]], constants.CLI.GLOBAL_KONG_CONF))
-- $ kong db
if args.command == "db" then
lapp.quit("Missing required <command>.")
end
local config_path = cutils.get_kong_config_path(args.config)
local _, dao_factory = IO.load_configuration_and_dao(config_path)
if args.command == "seed" then
-- Drop if exists
local err = dao_factory:drop()
if err then
cutils.logger:error_exit(err)
end
local faker = Faker(dao_factory)
faker:seed(args.random and args.number or nil)
cutils.logger:success("Populated")
elseif args.command == "drop" then
local err = dao_factory:drop()
if err then
cutils.logger:error_exit(err)
end
cutils.logger:success("Dropped")
else
lapp.quit("Invalid command: "..args.command)
end
| mit |
luveti/Urho3D | bin/Data/LuaScripts/18_CharacterDemo.lua | 24 | 21387 | -- Moving character example.
-- This sample demonstrates:
-- - Controlling a humanoid character through physics
-- - Driving animations using the AnimationController component
-- - Manual control of a bone scene node
-- - Implementing 1st and 3rd person cameras, using raycasts to avoid the 3rd person camera clipping into scenery
-- - Saving and loading the variables of a script object
-- - Using touch inputs/gyroscope for iOS/Android (implemented through an external file)
require "LuaScripts/Utilities/Sample"
require "LuaScripts/Utilities/Touch"
-- Variables used by external file are made global in order to be accessed
CTRL_FORWARD = 1
CTRL_BACK = 2
CTRL_LEFT = 4
CTRL_RIGHT = 8
local CTRL_JUMP = 16
local MOVE_FORCE = 0.8
local INAIR_MOVE_FORCE = 0.02
local BRAKE_FORCE = 0.2
local JUMP_FORCE = 7.0
local YAW_SENSITIVITY = 0.1
local INAIR_THRESHOLD_TIME = 0.1
firstPerson = false -- First person camera flag
local characterNode = nil
function Start()
-- Execute the common startup for samples
SampleStart()
-- Create static scene content
CreateScene()
-- Create the controllable character
CreateCharacter()
-- Create the UI content
CreateInstructions()
-- Set the mouse mode to use in the sample
SampleInitMouseMode(MM_RELATIVE)
-- Subscribe to necessary events
SubscribeToEvents()
end
function CreateScene()
scene_ = Scene()
-- Create scene subsystem components
scene_:CreateComponent("Octree")
scene_:CreateComponent("PhysicsWorld")
-- Create camera and define viewport. Camera does not necessarily have to belong to the scene
cameraNode = Node()
local camera = cameraNode:CreateComponent("Camera")
camera.farClip = 300.0
renderer:SetViewport(0, Viewport:new(scene_, camera))
-- Create a Zone component for ambient lighting & fog control
local zoneNode = scene_:CreateChild("Zone")
local zone = zoneNode:CreateComponent("Zone")
zone.boundingBox = BoundingBox(-1000.0, 1000.0)
zone.ambientColor = Color(0.15, 0.15, 0.15)
zone.fogColor = Color(0.5, 0.5, 0.7)
zone.fogStart = 100.0
zone.fogEnd = 300.0
-- Create a directional light to the world. Enable cascaded shadows on it
local lightNode = scene_:CreateChild("DirectionalLight")
lightNode.direction = Vector3(0.6, -1.0, 0.8)
local light = lightNode:CreateComponent("Light")
light.lightType = LIGHT_DIRECTIONAL
light.castShadows = true
light.shadowBias = BiasParameters(0.00025, 0.5)
-- Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
-- Create the floor object
local floorNode = scene_:CreateChild("Floor")
floorNode.position = Vector3(0.0, -0.5, 0.0)
floorNode.scale = Vector3(200.0, 1.0, 200.0)
local object = floorNode:CreateComponent("StaticModel")
object.model = cache:GetResource("Model", "Models/Box.mdl")
object.material = cache:GetResource("Material", "Materials/Stone.xml")
local body = floorNode:CreateComponent("RigidBody")
-- Use collision layer bit 2 to mark world scenery. This is what we will raycast against to prevent camera from going
-- inside geometry
body.collisionLayer = 2
local shape = floorNode:CreateComponent("CollisionShape")
shape:SetBox(Vector3(1.0, 1.0, 1.0))
-- Create mushrooms of varying sizes
local NUM_MUSHROOMS = 60
for i = 1, NUM_MUSHROOMS do
local objectNode = scene_:CreateChild("Mushroom")
objectNode.position = Vector3(Random(180.0) - 90.0, 0.0, Random(180.0) - 90.0)
objectNode.rotation = Quaternion(0.0, Random(360.0), 0.0)
objectNode:SetScale(2.0 + Random(5.0))
local object = objectNode:CreateComponent("StaticModel")
object.model = cache:GetResource("Model", "Models/Mushroom.mdl")
object.material = cache:GetResource("Material", "Materials/Mushroom.xml")
object.castShadows = true
local body = objectNode:CreateComponent("RigidBody")
body.collisionLayer = 2
local shape = objectNode:CreateComponent("CollisionShape")
shape:SetTriangleMesh(object.model, 0)
end
-- Create movable boxes. Let them fall from the sky at first
local NUM_BOXES = 100
for i = 1, NUM_BOXES do
local scale = Random(2.0) + 0.5
local objectNode = scene_:CreateChild("Box")
objectNode.position = Vector3(Random(180.0) - 90.0, Random(10.0) + 10.0, Random(180.0) - 90.0)
objectNode.rotation = Quaternion(Random(360.0), Random(360.0), Random(360.0))
objectNode:SetScale(scale)
local object = objectNode:CreateComponent("StaticModel")
object.model = cache:GetResource("Model", "Models/Box.mdl")
object.material = cache:GetResource("Material", "Materials/Stone.xml")
object.castShadows = true
local body = objectNode:CreateComponent("RigidBody")
body.collisionLayer = 2
-- Bigger boxes will be heavier and harder to move
body.mass = scale * 2.0
local shape = objectNode:CreateComponent("CollisionShape")
shape:SetBox(Vector3(1.0, 1.0, 1.0))
end
end
function CreateCharacter()
characterNode = scene_:CreateChild("Jack")
characterNode.position = Vector3(0.0, 1.0, 0.0)
-- spin node
local adjNode = characterNode:CreateChild("AdjNode")
adjNode.rotation = Quaternion(180.0, Vector3(0.0, 1.0, 0.0))
-- Create the rendering component + animation controller
local object = adjNode:CreateComponent("AnimatedModel")
object.model = cache:GetResource("Model", "Models/Mutant/Mutant.mdl")
object.material = cache:GetResource("Material", "Models/Mutant/Materials/mutant_M.xml")
object.castShadows = true
adjNode:CreateComponent("AnimationController")
-- Set the head bone for manual control
object.skeleton:GetBone("Mutant:Head").animated = false
-- Create rigidbody, and set non-zero mass so that the body becomes dynamic
local body = characterNode:CreateComponent("RigidBody")
body.collisionLayer = 1
body.mass = 1.0
-- Set zero angular factor so that physics doesn't turn the character on its own.
-- Instead we will control the character yaw manually
body.angularFactor = Vector3(0.0, 0.0, 0.0)
-- Set the rigidbody to signal collision also when in rest, so that we get ground collisions properly
body.collisionEventMode = COLLISION_ALWAYS
-- Set a capsule shape for collision
local shape = characterNode:CreateComponent("CollisionShape")
shape:SetCapsule(0.7, 1.8, Vector3(0.0, 0.9, 0.0))
-- Create the character logic object, which takes care of steering the rigidbody
characterNode:CreateScriptObject("Character")
end
function CreateInstructions()
-- Construct new Text object, set string to display and font to use
local instructionText = ui.root:CreateChild("Text")
instructionText:SetText(
"Use WASD keys and mouse to move\n"..
"Space to jump, F to toggle 1st/3rd person\n"..
"F5 to save scene, F7 to load")
instructionText:SetFont(cache:GetResource("Font", "Fonts/Anonymous Pro.ttf"), 15)
-- The text has multiple rows. Center them in relation to each other
instructionText.textAlignment = HA_CENTER
-- Position the text relative to the screen center
instructionText.horizontalAlignment = HA_CENTER
instructionText.verticalAlignment = VA_CENTER
instructionText:SetPosition(0, ui.root.height / 4)
end
function SubscribeToEvents()
-- Subscribe to Update event for setting the character controls before physics simulation
SubscribeToEvent("Update", "HandleUpdate")
-- Subscribe to PostUpdate event for updating the camera position after physics simulation
SubscribeToEvent("PostUpdate", "HandlePostUpdate")
-- Unsubscribe the SceneUpdate event from base class as the camera node is being controlled in HandlePostUpdate() in this sample
UnsubscribeFromEvent("SceneUpdate")
end
function HandleUpdate(eventType, eventData)
if characterNode == nil then
return
end
local character = characterNode:GetScriptObject()
if character == nil then
return
end
-- Clear previous controls
character.controls:Set(CTRL_FORWARD + CTRL_BACK + CTRL_LEFT + CTRL_RIGHT + CTRL_JUMP, false)
-- Update controls using touch utility
if touchEnabled then UpdateTouches(character.controls) end
-- Update controls using keys
if ui.focusElement == nil then
if not touchEnabled or not useGyroscope then
if input:GetKeyDown(KEY_W) then character.controls:Set(CTRL_FORWARD, true) end
if input:GetKeyDown(KEY_S) then character.controls:Set(CTRL_BACK, true) end
if input:GetKeyDown(KEY_A) then character.controls:Set(CTRL_LEFT, true) end
if input:GetKeyDown(KEY_D) then character.controls:Set(CTRL_RIGHT, true) end
end
if input:GetKeyDown(KEY_SPACE) then character.controls:Set(CTRL_JUMP, true) end
-- Add character yaw & pitch from the mouse motion or touch input
if touchEnabled then
for i=0, input.numTouches - 1 do
local state = input:GetTouch(i)
if not state.touchedElement then -- Touch on empty space
local camera = cameraNode:GetComponent("Camera")
if not camera then return end
character.controls.yaw = character.controls.yaw + TOUCH_SENSITIVITY * camera.fov / graphics.height * state.delta.x
character.controls.pitch = character.controls.pitch + TOUCH_SENSITIVITY * camera.fov / graphics.height * state.delta.y
end
end
else
character.controls.yaw = character.controls.yaw + input.mouseMoveX * YAW_SENSITIVITY
character.controls.pitch = character.controls.pitch + input.mouseMoveY * YAW_SENSITIVITY
end
-- Limit pitch
character.controls.pitch = Clamp(character.controls.pitch, -80.0, 80.0)
-- Set rotation already here so that it's updated every rendering frame instead of every physics frame
characterNode.rotation = Quaternion(character.controls.yaw, Vector3(0.0, 1.0, 0.0))
-- Switch between 1st and 3rd person
if input:GetKeyPress(KEY_F) then
firstPerson = not firstPerson
end
-- Turn on/off gyroscope on mobile platform
if input:GetKeyPress(KEY_G) then
useGyroscope = not useGyroscope
end
-- Check for loading / saving the scene
if input:GetKeyPress(KEY_F5) then
scene_:SaveXML(fileSystem:GetProgramDir().."Data/Scenes/CharacterDemo.xml")
end
if input:GetKeyPress(KEY_F7) then
scene_:LoadXML(fileSystem:GetProgramDir().."Data/Scenes/CharacterDemo.xml")
-- After loading we have to reacquire the character scene node, as it has been recreated
-- Simply find by name as there's only one of them
characterNode = scene_:GetChild("Jack", true)
if characterNode == nil then
return
end
end
end
end
function HandlePostUpdate(eventType, eventData)
if characterNode == nil then
return
end
local character = characterNode:GetScriptObject()
if character == nil then
return
end
-- Get camera lookat dir from character yaw + pitch
local rot = characterNode.rotation
local dir = rot * Quaternion(character.controls.pitch, Vector3(1.0, 0.0, 0.0))
-- Turn head to camera pitch, but limit to avoid unnatural animation
local headNode = characterNode:GetChild("Mutant:Head", true)
local limitPitch = Clamp(character.controls.pitch, -45.0, 45.0)
local headDir = rot * Quaternion(limitPitch, Vector3(1.0, 0.0, 0.0))
-- This could be expanded to look at an arbitrary target, now just look at a point in front
local headWorldTarget = headNode.worldPosition + headDir * Vector3(0.0, 0.0, -1.0)
headNode:LookAt(headWorldTarget, Vector3(0.0, 1.0, 0.0))
if firstPerson then
-- First person camera: position to the head bone + offset slightly forward & up
cameraNode.position = headNode.worldPosition + rot * Vector3(0.0, 0.15, 0.2)
cameraNode.rotation = dir
else
-- Third person camera: position behind the character
local aimPoint = characterNode.position + rot * Vector3(0.0, 1.7, 0.0) -- You can modify x Vector3 value to translate the fixed character position (indicative range[-2;2])
-- Collide camera ray with static physics objects (layer bitmask 2) to ensure we see the character properly
local rayDir = dir * Vector3(0.0, 0.0, -1.0) -- For indoor scenes you can use dir * Vector3(0.0, 0.0, -0.5) to prevent camera from crossing the walls
local rayDistance = cameraDistance
local result = scene_:GetComponent("PhysicsWorld"):RaycastSingle(Ray(aimPoint, rayDir), rayDistance, 2)
if result.body ~= nil then
rayDistance = Min(rayDistance, result.distance)
end
rayDistance = Clamp(rayDistance, CAMERA_MIN_DIST, cameraDistance)
cameraNode.position = aimPoint + rayDir * rayDistance
cameraNode.rotation = dir
end
end
-- Character script object class
Character = ScriptObject()
function Character:Start()
-- Character controls.
self.controls = Controls()
-- Grounded flag for movement.
self.onGround = false
-- Jump flag.
self.okToJump = true
-- In air timer. Due to possible physics inaccuracy, character can be off ground for max. 1/10 second and still be allowed to move.
self.inAirTimer = 0.0
self:SubscribeToEvent(self.node, "NodeCollision", "Character:HandleNodeCollision")
end
function Character:Load(deserializer)
self.controls.yaw = deserializer:ReadFloat()
self.controls.pitch = deserializer:ReadFloat()
end
function Character:Save(serializer)
serializer:WriteFloat(self.controls.yaw)
serializer:WriteFloat(self.controls.pitch)
end
function Character:HandleNodeCollision(eventType, eventData)
local contacts = eventData["Contacts"]:GetBuffer()
while not contacts.eof do
local contactPosition = contacts:ReadVector3()
local contactNormal = contacts:ReadVector3()
local contactDistance = contacts:ReadFloat()
local contactImpulse = contacts:ReadFloat()
-- If contact is below node center and pointing up, assume it's a ground contact
if contactPosition.y < self.node.position.y + 1.0 then
local level = contactNormal.y
if level > 0.75 then
self.onGround = true
end
end
end
end
function Character:FixedUpdate(timeStep)
-- Could cache the components for faster access instead of finding them each frame
local body = self.node:GetComponent("RigidBody")
local animCtrl = self.node:GetComponent("AnimationController", true)
-- Update the in air timer. Reset if grounded
if not self.onGround then
self.inAirTimer = self.inAirTimer + timeStep
else
self.inAirTimer = 0.0
end
-- When character has been in air less than 1/10 second, it's still interpreted as being on ground
local softGrounded = self.inAirTimer < INAIR_THRESHOLD_TIME
-- Update movement & animation
local rot = self.node.rotation
local moveDir = Vector3(0.0, 0.0, 0.0)
local velocity = body.linearVelocity
-- Velocity on the XZ plane
local planeVelocity = Vector3(velocity.x, 0.0, velocity.z)
if self.controls:IsDown(CTRL_FORWARD) then
moveDir = moveDir + Vector3(0.0, 0.0, 1.0)
end
if self.controls:IsDown(CTRL_BACK) then
moveDir = moveDir + Vector3(0.0, 0.0, -1.0)
end
if self.controls:IsDown(CTRL_LEFT) then
moveDir = moveDir + Vector3(-1.0, 0.0, 0.0)
end
if self.controls:IsDown(CTRL_RIGHT) then
moveDir = moveDir + Vector3(1.0, 0.0, 0.0)
end
-- Normalize move vector so that diagonal strafing is not faster
if moveDir:LengthSquared() > 0.0 then
moveDir:Normalize()
end
-- If in air, allow control, but slower than when on ground
if softGrounded then
body:ApplyImpulse(rot * moveDir * MOVE_FORCE)
else
body:ApplyImpulse(rot * moveDir * INAIR_MOVE_FORCE)
end
if softGrounded then
-- When on ground, apply a braking force to limit maximum ground velocity
local brakeForce = planeVelocity * -BRAKE_FORCE
body:ApplyImpulse(brakeForce)
-- Jump. Must release jump control between jumps
if self.controls:IsDown(CTRL_JUMP) then
if self.okToJump then
body:ApplyImpulse(Vector3(0.0, 1.0, 0.0) * JUMP_FORCE)
self.okToJump = false
animCtrl:PlayExclusive("Models/Mutant/Mutant_Jump1.ani", 0, false, 0.2)
end
else
self.okToJump = true
end
end
if not self.onGround then
animCtrl:PlayExclusive("Models/Mutant/Mutant_Jump1.ani", 0, false, 0.2)
else
-- Play walk animation if moving on ground, otherwise fade it out
if softGrounded and not moveDir:Equals(Vector3(0.0, 0.0, 0.0)) then
animCtrl:PlayExclusive("Models/Mutant/Mutant_Run.ani", 0, true, 0.2)
-- Set walk animation speed proportional to velocity
animCtrl:SetSpeed("Models/Mutant/Mutant_Run.ani", planeVelocity:Length() * 0.3)
else
animCtrl:PlayExclusive("Models/Mutant/Mutant_Idle0.ani", 0, true, 0.2)
end
end
-- Reset grounded flag for next frame
self.onGround = false
end
-- Create XML patch instructions for screen joystick layout specific to this sample app
function GetScreenJoystickPatchString()
return
"<patch>" ..
" <add sel=\"/element\">" ..
" <element type=\"Button\">" ..
" <attribute name=\"Name\" value=\"Button3\" />" ..
" <attribute name=\"Position\" value=\"-120 -120\" />" ..
" <attribute name=\"Size\" value=\"96 96\" />" ..
" <attribute name=\"Horiz Alignment\" value=\"Right\" />" ..
" <attribute name=\"Vert Alignment\" value=\"Bottom\" />" ..
" <attribute name=\"Texture\" value=\"Texture2D;Textures/TouchInput.png\" />" ..
" <attribute name=\"Image Rect\" value=\"96 0 192 96\" />" ..
" <attribute name=\"Hover Image Offset\" value=\"0 0\" />" ..
" <attribute name=\"Pressed Image Offset\" value=\"0 0\" />" ..
" <element type=\"Text\">" ..
" <attribute name=\"Name\" value=\"Label\" />" ..
" <attribute name=\"Horiz Alignment\" value=\"Center\" />" ..
" <attribute name=\"Vert Alignment\" value=\"Center\" />" ..
" <attribute name=\"Color\" value=\"0 0 0 1\" />" ..
" <attribute name=\"Text\" value=\"Gyroscope\" />" ..
" </element>" ..
" <element type=\"Text\">" ..
" <attribute name=\"Name\" value=\"KeyBinding\" />" ..
" <attribute name=\"Text\" value=\"G\" />" ..
" </element>" ..
" </element>" ..
" </add>" ..
" <remove sel=\"/element/element[./attribute[@name='Name' and @value='Button0']]/attribute[@name='Is Visible']\" />" ..
" <replace sel=\"/element/element[./attribute[@name='Name' and @value='Button0']]/element[./attribute[@name='Name' and @value='Label']]/attribute[@name='Text']/@value\">1st/3rd</replace>" ..
" <add sel=\"/element/element[./attribute[@name='Name' and @value='Button0']]\">" ..
" <element type=\"Text\">" ..
" <attribute name=\"Name\" value=\"KeyBinding\" />" ..
" <attribute name=\"Text\" value=\"F\" />" ..
" </element>" ..
" </add>" ..
" <remove sel=\"/element/element[./attribute[@name='Name' and @value='Button1']]/attribute[@name='Is Visible']\" />" ..
" <replace sel=\"/element/element[./attribute[@name='Name' and @value='Button1']]/element[./attribute[@name='Name' and @value='Label']]/attribute[@name='Text']/@value\">Jump</replace>" ..
" <add sel=\"/element/element[./attribute[@name='Name' and @value='Button1']]\">" ..
" <element type=\"Text\">" ..
" <attribute name=\"Name\" value=\"KeyBinding\" />" ..
" <attribute name=\"Text\" value=\"SPACE\" />" ..
" </element>" ..
" </add>" ..
"</patch>"
end
| mit |
AdamGagorik/darkstar | scripts/zones/Toraimarai_Canal/npcs/Grounds_Tome.lua | 30 | 1103 | -----------------------------------
-- Area: Toraimarai Canal
-- NPC: Grounds Tome
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/groundsofvalor");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
startGov(GOV_EVENT_TORAIMARAI_CANAL,player);
end;
-----------------------------------
-- onEventSelection
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
updateGov(player,csid,option,618,619,620,621,622,623,624,625,0,0);
end;
-----------------------------------
-- onEventFinish Action
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
finishGov(player,csid,option,618,619,620,621,622,623,624,625,0,0,GOV_MSG_TORAIMARAI_CANAL);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Lower_Jeuno/npcs/Navisse.lua | 13 | 4725 | -----------------------------------
-- Area: Lower Jeuno
-- NPC: Navisse
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil;
require("scripts/zones/Lower_Jeuno/TextIDs");
require("scripts/globals/pathfind");
local path = {
-- -59.562683, 6.000051, -90.890404,
-58.791367, 6.000050, -91.663391,
-58.021465, 6.000049, -92.432144,
-58.729881, 6.000051, -91.577568,
-60.351879, 6.000053, -89.835815,
-61.099354, 6.000054, -89.034248,
-61.841427, 5.999946, -88.238564,
-62.769325, 5.999948, -87.244301,
-61.750378, 5.999948, -87.684868,
-60.796600, 5.999947, -88.208214,
-55.475166, 5.999943, -91.271210,
-56.590668, 5.999943, -91.245201,
-57.651192, 6.000052, -91.002350,
-64.134392, 6.000052, -89.460915,
-63.261021, 6.000051, -90.107605,
-62.330879, 6.000051, -90.679604,
-61.395359, 6.000050, -91.235107,
-56.591644, 6.000047, -94.066406,
-57.208908, 6.000048, -93.245895,
-57.934330, 6.000049, -92.435081,
-59.788624, 6.000052, -90.439583,
-61.832211, 5.999946, -88.248795,
-62.574249, 5.999948, -87.453148,
-61.832058, 5.999946, -88.248627,
-61.089920, 6.000054, -89.044273,
-60.348049, 6.000053, -89.840111,
-59.043877, 6.000051, -91.238251,
-58.301846, 6.000050, -92.033958,
-57.467026, 6.000048, -92.929070,
-56.536987, 6.000047, -93.926826,
-57.528469, 6.000047, -93.482582,
-58.476944, 6.000048, -92.949654,
-59.416409, 6.000049, -92.400879,
-64.235306, 6.000051, -89.563835,
-64.000816, 6.000054, -88.482338,
-63.516331, 5.999947, -87.539917,
-62.444843, 5.999948, -87.352570,
-61.468765, 5.999947, -87.831436,
-60.520329, 5.999947, -88.364532,
-55.100037, 5.999943, -91.488144,
-56.063160, 5.999944, -90.932312,
-62.719467, 5.999948, -87.093468,
-62.064899, 5.999947, -87.960884,
-61.338562, 5.999946, -88.770836,
-59.579746, 6.000052, -90.663826,
-58.177391, 6.000050, -92.167343,
-57.435341, 6.000048, -92.963005,
-56.734436, 6.000047, -93.714989,
-57.492855, 6.000049, -92.901787,
-58.251190, 6.000050, -92.088486,
-59.364170, 6.000051, -90.894829,
-61.039413, 6.000054, -89.098907,
-61.784184, 5.999946, -88.300293,
-62.804745, 5.999948, -87.206451,
-60.463631, 6.000053, -89.715942,
-59.721657, 6.000052, -90.511711,
-58.974190, 6.000051, -91.313248,
-58.232239, 6.000050, -92.109024,
-56.840717, 6.000047, -93.600716,
-57.914623, 6.000048, -93.276276,
-58.855755, 6.000048, -92.730408,
-64.140175, 6.000051, -89.619812,
-63.025597, 6.000052, -89.751106,
-61.954758, 6.000052, -89.984474,
-60.887684, 6.000052, -90.234573,
-55.190853, 5.999943, -91.590721,
-55.368877, 6.000050, -92.667923,
-55.841885, 6.000048, -93.664970,
-56.916370, 6.000048, -93.400879,
-57.705578, 6.000049, -92.652748,
-58.456089, 6.000050, -91.865067,
-60.405739, 6.000053, -89.778008,
-61.147854, 6.000054, -88.982376,
-61.889904, 5.999946, -88.186691,
-62.637497, 5.999948, -87.385239,
-63.643429, 6.000055, -87.880524,
-64.248825, 6.000053, -88.784004,
-63.455921, 6.000052, -89.526733,
-62.418514, 6.000052, -89.852493,
-61.363335, 6.000052, -90.117607,
-55.142048, 5.999943, -91.602325,
-55.358624, 6.000050, -92.679016,
-55.842934, 6.000048, -93.675148,
-56.919590, 6.000048, -93.408241,
-57.710354, 6.000049, -92.649918,
-58.459896, 6.000050, -91.861336,
-60.409424, 6.000053, -89.774185,
-61.151508, 6.000054, -88.978500,
-62.848709, 5.999948, -87.159264,
-61.829231, 5.999948, -87.629791,
-60.951675, 5.999947, -88.117493,
-55.395309, 5.999943, -91.317513,
-56.522537, 5.999943, -91.263893,
-57.586517, 6.000052, -91.018196,
-64.081299, 6.000052, -89.473526,
-63.209583, 6.000051, -90.135269,
-62.270042, 6.000050, -90.714821,
-61.334797, 6.000050, -91.270729,
-56.586208, 6.000047, -94.069595,
-64.130554, 6.000051, -89.625450,
-56.496498, 6.000047, -94.122322,
-57.173595, 6.000048, -93.271568,
-57.904095, 6.000049, -92.465279,
-59.571453, 6.000052, -90.672951,
};
function onSpawn(npc)
npc:initNpcAi();
npc:setPos(pathfind.first(path));
onPath(npc);
end;
function onPath(npc)
pathfind.patrol(npc, path);
end;
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:startEvent(0x0099);
npc:wait(-1);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option,npc)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
npc:wait(0);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Kazham-Jeuno_Airship/npcs/Oslam.lua | 30 | 2299 | -----------------------------------
-- Area: Kazham-Jeuno Airship
-- NPC: Oslam
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Kazham-Jeuno_Airship/TextIDs"] = nil;
require("scripts/zones/Kazham-Jeuno_Airship/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
local vHour = VanadielHour();
local vMin = VanadielMinute();
while vHour >= 1 do
vHour = vHour - 6;
end
local message = WILL_REACH_KAZHAM;
if (vHour == -5) then
if (vMin >= 48) then
vHour = 3;
message = WILL_REACH_JEUNO;
else
vHour = 0;
end
elseif (vHour == -4) then
vHour = 2;
message = WILL_REACH_JEUNO;
elseif (vHour == -3) then
vHour = 1;
message = WILL_REACH_JEUNO;
elseif (vHour == -2) then
if (vMin <= 49) then
vHour = 0;
message = WILL_REACH_JEUNO;
else
vHour = 3;
end
elseif (vHour == -1) then
vHour = 2;
elseif (vHour == 0) then
vHour = 1;
end
local vMinutes = 0;
if (message == WILL_REACH_JEUNO) then
vMinutes = (vHour * 60) + 49 - vMin;
else -- WILL_REACH_KAZHAM
vMinutes = (vHour * 60) + 48 - vMin;
end
if (vMinutes <= 30) then
if ( message == WILL_REACH_KAZHAM) then
message = IN_KAZHAM_MOMENTARILY;
else -- WILL_REACH_JEUNO
message = IN_JEUNO_MOMENTARILY;
end
elseif (vMinutes < 60) then
vHour = 0;
end
player:messageSpecial( message, math.floor((2.4 * vMinutes) / 60), math.floor( vMinutes / 60 + 0.5));
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/AlTaieu/mobs/Ul_hpemde.lua | 7 | 2794 | -----------------------------------
-- Area: Al'Taieu
-- MOB: Ul'Hpemde
-----------------------------------
require("scripts/globals/status");
-----------------------------------
-- onMobInitialize Action
-----------------------------------
function onMobInitialize(mob)
end;
-----------------------------------
-- onMobSpawn Action
-----------------------------------
function onMobSpawn(mob)
mob:hideName(true);
mob:untargetable(true);
mob:AnimationSub(5);
mob:SetAutoAttackEnabled(false);
mob:SetMobAbilityEnabled(false);
mob:setMod(MOD_REGEN, 10);
mob:wait(2000);
end;
-----------------------------------
-- onMobEngaged
-----------------------------------
function onMobEngaged(mob, killer)
mob:hideName(false);
mob:untargetable(false);
if (mob:AnimationSub() == 5) then
mob:AnimationSub(6);
mob:wait(2000);
end
end;
-----------------------------------
-- onMobDisengage
-----------------------------------
function onMobDisengage(mob)
mob:hideName(true);
mob:untargetable(true);
mob:AnimationSub(5);
mob:SetAutoAttackEnabled(false);
mob:SetMobAbilityEnabled(false);
mob:setMod(MOD_REGEN, 10);
end;
-----------------------------------
-- onMobRoam Action
-----------------------------------
function onMobRoam(mob)
if (mob:getHPP() == 100) then
mob:setLocalVar("damaged", 0);
mob:SetAutoAttackEnabled(false);
mob:SetMobAbilityEnabled(false);
end
end;
-----------------------------------
-- onMobFight
-----------------------------------
function onMobFight(mob, target)
if (mob:getHP() < mob:getMaxHP()) then -- it will attack once it has been damaged.
if (mob:getLocalVar("damaged") == 0) then
mob:SetAutoAttackEnabled(true);
mob:SetMobAbilityEnabled(true);
mob:setLocalVar("damaged", 1);
end
local changeTime = mob:getLocalVar("changeTime");
if (mob:AnimationSub() == 6 and mob:getBattleTime() - changeTime > 30) then
mob:AnimationSub(3); -- Mouth Open
mob:wait(2000);
mob:addMod(MOD_ATTP, 100);
mob:addMod(MOD_DEFP, -50);
mob:addMod(MOD_DMGMAGIC, -50);
mob:setLocalVar("changeTime", mob:getBattleTime());
elseif (mob:AnimationSub() == 3 and mob:getBattleTime() - changeTime > 30) then
mob:AnimationSub(6); -- Mouth Closed
mob:wait(2000);
mob:addMod(MOD_ATTP, -100);
mob:addMod(MOD_DEFP, 50);
mob:addMod(MOD_DMGMAGIC, 50);
mob:setLocalVar("changeTime", mob:getBattleTime());
end
end
end;
-----------------------------------
-- onMobDeath
-----------------------------------
function onMobDeath(mob, killer, ally)
end; | gpl-3.0 |
Nathan22Miles/sile | languages/bg.lua | 4 | 17441 | SILE.hyphenator.languages["bg"] = {};
SILE.hyphenator.languages["bg"].patterns =
{
"1а1",
"1б1",
"1в1",
"1г1",
"1д1",
"1е1",
"1ж1",
"1з1",
"1и1",
"1й1",
"1к1",
"1л1",
"1м1",
"1н1",
"1о1",
"1п1",
"1р1",
"1с1",
"1т1",
"1у1",
"1ф1",
"1х1",
"1ц1",
"1ч1",
"1ш1",
"1щ1",
"1ъ1",
"0ь0",
"1ю1",
"1я1",
"б4а б4е б4и б4о б4у б4ъ б4ю б4я",
"в4а в4е в4и в4о в4у в4ъ в4ю в4я",
"г4а г4е г4и г4о г4у г4ъ г4ю г4я",
"д4а д4е д4и д4о д4у д4ъ д4ю д4я",
"ж4а ж4е ж4и ж4о ж4у ж4ъ ж4ю ж4я",
"з4а з4е з4и з4о з4у з4ъ з4ю з4я",
"й4а й4е й4и й4о й4у й4ъ й4ю й4я",
"к4а к4е к4и к4о к4у к4ъ к4ю к4я",
"л4а л4е л4и л4о л4у л4ъ л4ю л4я",
"м4а м4е м4и м4о м4у м4ъ м4ю м4я",
"н4а н4е н4и н4о н4у н4ъ н4ю н4я",
"п4а п4е п4и п4о п4у п4ъ п4ю п4я",
"р4а р4е р4и р4о р4у р4ъ р4ю р4я",
"с4а с4е с4и с4о с4у с4ъ с4ю с4я",
"т4а т4е т4и т4о т4у т4ъ т4ю т4я",
"ф4а ф4е ф4и ф4о ф4у ф4ъ ф4ю ф4я",
"х4а х4е х4и х4о х4у х4ъ х4ю х4я",
"ц4а ц4е ц4и ц4о ц4у ц4ъ ц4ю ц4я",
"ч4а ч4е ч4и ч4о ч4у ч4ъ ч4ю ч4я",
"ш4а ш4е ш4и ш4о ш4у ш4ъ ш4ю ш4я",
"щ4а щ4е щ4и щ4о щ4у щ4ъ щ4ю щ4я",
"ь4а ь4е ь4и ь4о ь4у ь4ъ ь4ю ь4я",
"4б3б4",
"2б3в2",
"2б3г2",
"2б3д2",
"2б3ж2",
"2б3з2",
"2б3й2",
"2б3к2",
"2б3л2",
"2б3м2",
"2б3н2",
"2б3п2",
"2б3р2",
"2б3с2",
"2б3т2",
"2б3ф2",
"2б3х2",
"2б3ц2",
"2б3ч2",
"2б3ш2",
"2б3щ2",
"2в3б2",
"4в3в4",
"2в3г2",
"2в3д2",
"2в3ж2",
"2в3з2",
"2в3й2",
"2в3к2",
"2в3л2",
"2в3м2",
"2в3н2",
"2в3п2",
"2в3р2",
"2в3с2",
"2в3т2",
"2в3ф2",
"2в3х2",
"2в3ц2",
"2в3ч2",
"2в3ш2",
"2в3щ2",
"2г3б2",
"2г3в2",
"4г3г4",
"2г3д2",
"2г3ж2",
"2г3з2",
"2г3й2",
"2г3к2",
"2г3л2",
"2г3м2",
"2г3н2",
"2г3п2",
"2г3р2",
"2г3с2",
"2г3т2",
"2г3ф2",
"2г3х2",
"2г3ц2",
"2г3ч2",
"2г3ш2",
"2г3щ2",
"2д3б2",
"2д3в2",
"2д3г2",
"4д3д4",
"3д4ж",
"2д3з2",
"2д3й2",
"2д3к2",
"2д3л2",
"2д3м2",
"2д3н2",
"2д3п2",
"2д3р2",
"2д3с2",
"2д3т2",
"2д3ф2",
"2д3х2",
"2д3ц2",
"2д3ч2",
"2д3ш2",
"2д3щ2",
"2ж3б2",
"2ж3в2",
"2ж3г2",
"2ж3д2",
"4ж3ж4",
"2ж3з2",
"2ж3й2",
"2ж3к2",
"2ж3л2",
"2ж3м2",
"2ж3н2",
"2ж3п2",
"2ж3р2",
"2ж3с2",
"2ж3т2",
"2ж3ф2",
"2ж3х2",
"2ж3ц2",
"2ж3ч2",
"2ж3ш2",
"2ж3щ2",
"2з3б2",
"2з3в2",
"2з3г2",
"2з3д2",
"2з3ж2",
"4з3з4",
"2з3й2",
"2з3к2",
"2з3л2",
"2з3м2",
"2з3н2",
"2з3п2",
"2з3р2",
"2з3с2",
"2з3т2",
"2з3ф2",
"2з3х2",
"2з3ц2",
"2з3ч2",
"2з3ш2",
"2з3щ2",
"2й3б2",
"2й3в2",
"2й3г2",
"2й3д2",
"2й3ж2",
"2й3з2",
"4й3й4",
"2й3к2",
"2й3л2",
"2й3м2",
"2й3н2",
"2й3п2",
"2й3р2",
"2й3с2",
"2й3т2",
"2й3ф2",
"2й3х2",
"2й3ц2",
"2й3ч2",
"2й3ш2",
"2й3щ2",
"2к3б2",
"2к3в2",
"2к3г2",
"2к3д2",
"2к3ж2",
"2к3з2",
"2к3й2",
"4к3к4",
"2к3л2",
"2к3м2",
"2к3н2",
"2к3п2",
"2к3р2",
"2к3с2",
"2к3т2",
"2к3ф2",
"2к3х2",
"2к3ц2",
"2к3ч2",
"2к3ш2",
"2к3щ2",
"2л3б2",
"2л3в2",
"2л3г2",
"2л3д2",
"2л3ж2",
"2л3з2",
"2л3й2",
"2л3к2",
"4л3л4",
"2л3м2",
"2л3н2",
"2л3п2",
"2л3р2",
"2л3с2",
"2л3т2",
"2л3ф2",
"2л3х2",
"2л3ц2",
"2л3ч2",
"2л3ш2",
"2л3щ2",
"2м3б2",
"2м3в2",
"2м3г2",
"2м3д2",
"2м3ж2",
"2м3з2",
"2м3й2",
"2м3к2",
"2м3л2",
"4м3м4",
"2м3н2",
"2м3п2",
"2м3р2",
"2м3с2",
"2м3т2",
"2м3ф2",
"2м3х2",
"2м3ц2",
"2м3ч2",
"2м3ш2",
"2м3щ2",
"2н3б2",
"2н3в2",
"2н3г2",
"2н3д2",
"2н3ж2",
"2н3з2",
"2н3й2",
"2н3к2",
"2н3л2",
"2н3м2",
"4н3н4",
"2н3п2",
"2н3р2",
"2н3с2",
"2н3т2",
"2н3ф2",
"2н3х2",
"2н3ц2",
"2н3ч2",
"2н3ш2",
"2н3щ2",
"2п3б2",
"2п3в2",
"2п3г2",
"2п3д2",
"2п3ж2",
"2п3з2",
"2п3й2",
"2п3к2",
"2п3л2",
"2п3м2",
"2п3н2",
"4п3п4",
"2п3р2",
"2п3с2",
"2п3т2",
"2п3ф2",
"2п3х2",
"2п3ц2",
"2п3ч2",
"2п3ш2",
"2п3щ2",
"2р3б2",
"2р3в2",
"2р3г2",
"2р3д2",
"2р3ж2",
"2р3з2",
"2р3й2",
"2р3к2",
"2р3л2",
"2р3м2",
"2р3н2",
"2р3п2",
"4р3р4",
"2р3с2",
"2р3т2",
"2р3ф2",
"2р3х2",
"2р3ц2",
"2р3ч2",
"2р3ш2",
"2р3щ2",
"2с3б2",
"2с3в2",
"2с3г2",
"2с3д2",
"2с3ж2",
"2с3з2",
"2с3й2",
"2с3к2",
"2с3л2",
"2с3м2",
"2с3н2",
"2с3п2",
"2с3р2",
"4с3с4",
"2с3т2",
"2с3ф2",
"2с3х2",
"2с3ц2",
"2с3ч2",
"2с3ш2",
"2с3щ2",
"2т3б2",
"2т3в2",
"2т3г2",
"2т3д2",
"2т3ж2",
"2т3з2",
"2т3й2",
"2т3к2",
"2т3л2",
"2т3м2",
"2т3н2",
"2т3п2",
"2т3р2",
"2т3с2",
"4т3т4",
"2т3ф2",
"2т3х2",
"2т3ц2",
"2т3ч2",
"2т3ш2",
"2т3щ2",
"2ф3б2",
"2ф3в2",
"2ф3г2",
"2ф3д2",
"2ф3ж2",
"2ф3з2",
"2ф3й2",
"2ф3к2",
"2ф3л2",
"2ф3м2",
"2ф3н2",
"2ф3п2",
"2ф3р2",
"2ф3с2",
"2ф3т2",
"4ф3ф4",
"2ф3х2",
"2ф3ц2",
"2ф3ч2",
"2ф3ш2",
"2ф3щ2",
"2х3б2",
"2х3в2",
"2х3г2",
"2х3д2",
"2х3ж2",
"2х3з2",
"2х3й2",
"2х3к2",
"2х3л2",
"2х3м2",
"2х3н2",
"2х3п2",
"2х3р2",
"2х3с2",
"2х3т2",
"2х3ф2",
"4х3х4",
"2х3ц2",
"2х3ч2",
"2х3ш2",
"2х3щ2",
"2ц3б2",
"2ц3в2",
"2ц3г2",
"2ц3д2",
"2ц3ж2",
"2ц3з2",
"2ц3й2",
"2ц3к2",
"2ц3л2",
"2ц3м2",
"2ц3н2",
"2ц3п2",
"2ц3р2",
"2ц3с2",
"2ц3т2",
"2ц3ф2",
"2ц3х2",
"4ц3ц4",
"2ц3ч2",
"2ц3ш2",
"2ц3щ2",
"2ч3б2",
"2ч3в2",
"2ч3г2",
"2ч3д2",
"2ч3ж2",
"2ч3з2",
"2ч3й2",
"2ч3к2",
"2ч3л2",
"2ч3м2",
"2ч3н2",
"2ч3п2",
"2ч3р2",
"2ч3с2",
"2ч3т2",
"2ч3ф2",
"2ч3х2",
"2ч3ц2",
"4ч3ч4",
"2ч3ш2",
"2ч3щ2",
"2ш3б2",
"2ш3в2",
"2ш3г2",
"2ш3д2",
"2ш3ж2",
"2ш3з2",
"2ш3й2",
"2ш3к2",
"2ш3л2",
"2ш3м2",
"2ш3н2",
"2ш3п2",
"2ш3р2",
"2ш3с2",
"2ш3т2",
"2ш3ф2",
"2ш3х2",
"2ш3ц2",
"2ш3ч2",
"4ш3ш4",
"2ш3щ2",
"2щ3б2",
"2щ3в2",
"2щ3г2",
"2щ3д2",
"2щ3ж2",
"2щ3з2",
"2щ3й2",
"2щ3к2",
"2щ3л2",
"2щ3м2",
"2щ3н2",
"2щ3п2",
"2щ3р2",
"2щ3с2",
"2щ3т2",
"2щ3ф2",
"2щ3х2",
"2щ3ц2",
"2щ3ч2",
"2щ3ш2",
"4щ3щ4",
"ааа4",
"аае4",
"ааи4",
"аао4",
"аау4",
"ааъ4",
"ааю4",
"аая4",
"аеа4",
"аее4",
"аеи4",
"аео4",
"аеу4",
"аеъ4",
"аею4",
"аея4",
"аиа4",
"аие4",
"аии4",
"аио4",
"аиу4",
"аиъ4",
"аию4",
"аия4",
"аоа4",
"аое4",
"аои4",
"аоо4",
"аоу4",
"аоъ4",
"аою4",
"аоя4",
"ауа4",
"ауе4",
"ауи4",
"ауо4",
"ауу4",
"ауъ4",
"аую4",
"ауя4",
"аъа4",
"аъе4",
"аъи4",
"аъо4",
"аъу4",
"аъъ4",
"аъю4",
"аъя4",
"аюа4",
"аюе4",
"аюи4",
"аюо4",
"аюу4",
"аюъ4",
"аюю4",
"аюя4",
"аяа4",
"аяе4",
"аяи4",
"аяо4",
"аяу4",
"аяъ4",
"аяю4",
"аяя4",
"еаа4",
"еае4",
"еаи4",
"еао4",
"еау4",
"еаъ4",
"еаю4",
"еая4",
"ееа4",
"еее4",
"ееи4",
"еео4",
"ееу4",
"ееъ4",
"еею4",
"еея4",
"еиа4",
"еие4",
"еии4",
"еио4",
"еиу4",
"еиъ4",
"еию4",
"еия4",
"еоа4",
"еое4",
"еои4",
"еоо4",
"еоу4",
"еоъ4",
"еою4",
"еоя4",
"еуа4",
"еуе4",
"еуи4",
"еуо4",
"еуу4",
"еуъ4",
"еую4",
"еуя4",
"еъа4",
"еъе4",
"еъи4",
"еъо4",
"еъу4",
"еъъ4",
"еъю4",
"еъя4",
"еюа4",
"еюе4",
"еюи4",
"еюо4",
"еюу4",
"еюъ4",
"еюю4",
"еюя4",
"еяа4",
"еяе4",
"еяи4",
"еяо4",
"еяу4",
"еяъ4",
"еяю4",
"еяя4",
"иаа4",
"иае4",
"иаи4",
"иао4",
"иау4",
"иаъ4",
"иаю4",
"иая4",
"иеа4",
"иее4",
"иеи4",
"иео4",
"иеу4",
"иеъ4",
"иею4",
"иея4",
"ииа4",
"иие4",
"иии4",
"иио4",
"ииу4",
"ииъ4",
"иию4",
"иия4",
"иоа4",
"иое4",
"иои4",
"иоо4",
"иоу4",
"иоъ4",
"иою4",
"иоя4",
"иуа4",
"иуе4",
"иуи4",
"иуо4",
"иуу4",
"иуъ4",
"иую4",
"иуя4",
"иъа4",
"иъе4",
"иъи4",
"иъо4",
"иъу4",
"иъъ4",
"иъю4",
"иъя4",
"июа4",
"июе4",
"июи4",
"июо4",
"июу4",
"июъ4",
"июю4",
"июя4",
"ияа4",
"ияе4",
"ияи4",
"ияо4",
"ияу4",
"ияъ4",
"ияю4",
"ияя4",
"оаа4",
"оае4",
"оаи4",
"оао4",
"оау4",
"оаъ4",
"оаю4",
"оая4",
"оеа4",
"оее4",
"оеи4",
"оео4",
"оеу4",
"оеъ4",
"оею4",
"оея4",
"оиа4",
"оие4",
"оии4",
"оио4",
"оиу4",
"оиъ4",
"оию4",
"оия4",
"ооа4",
"оое4",
"оои4",
"ооо4",
"ооу4",
"ооъ4",
"оою4",
"ооя4",
"оуа4",
"оуе4",
"оуи4",
"оуо4",
"оуу4",
"оуъ4",
"оую4",
"оуя4",
"оъа4",
"оъе4",
"оъи4",
"оъо4",
"оъу4",
"оъъ4",
"оъю4",
"оъя4",
"оюа4",
"оюе4",
"оюи4",
"оюо4",
"оюу4",
"оюъ4",
"оюю4",
"оюя4",
"ояа4",
"ояе4",
"ояи4",
"ояо4",
"ояу4",
"ояъ4",
"ояю4",
"ояя4",
"уаа4",
"уае4",
"уаи4",
"уао4",
"уау4",
"уаъ4",
"уаю4",
"уая4",
"уеа4",
"уее4",
"уеи4",
"уео4",
"уеу4",
"уеъ4",
"уею4",
"уея4",
"уиа4",
"уие4",
"уии4",
"уио4",
"уиу4",
"уиъ4",
"уию4",
"уия4",
"уоа4",
"уое4",
"уои4",
"уоо4",
"уоу4",
"уоъ4",
"уою4",
"уоя4",
"ууа4",
"ууе4",
"ууи4",
"ууо4",
"ууу4",
"ууъ4",
"уую4",
"ууя4",
"уъа4",
"уъе4",
"уъи4",
"уъо4",
"уъу4",
"уъъ4",
"уъю4",
"уъя4",
"уюа4",
"уюе4",
"уюи4",
"уюо4",
"уюу4",
"уюъ4",
"уюю4",
"уюя4",
"уяа4",
"уяе4",
"уяи4",
"уяо4",
"уяу4",
"уяъ4",
"уяю4",
"уяя4",
"ъаа4",
"ъае4",
"ъаи4",
"ъао4",
"ъау4",
"ъаъ4",
"ъаю4",
"ъая4",
"ъеа4",
"ъее4",
"ъеи4",
"ъео4",
"ъеу4",
"ъеъ4",
"ъею4",
"ъея4",
"ъиа4",
"ъие4",
"ъии4",
"ъио4",
"ъиу4",
"ъиъ4",
"ъию4",
"ъия4",
"ъоа4",
"ъое4",
"ъои4",
"ъоо4",
"ъоу4",
"ъоъ4",
"ъою4",
"ъоя4",
"ъуа4",
"ъуе4",
"ъуи4",
"ъуо4",
"ъуу4",
"ъуъ4",
"ъую4",
"ъуя4",
"ъъа4",
"ъъе4",
"ъъи4",
"ъъо4",
"ъъу4",
"ъъъ4",
"ъъю4",
"ъъя4",
"ъюа4",
"ъюе4",
"ъюи4",
"ъюо4",
"ъюу4",
"ъюъ4",
"ъюю4",
"ъюя4",
"ъяа4",
"ъяе4",
"ъяи4",
"ъяо4",
"ъяу4",
"ъяъ4",
"ъяю4",
"ъяя4",
"юаа4",
"юае4",
"юаи4",
"юао4",
"юау4",
"юаъ4",
"юаю4",
"юая4",
"юеа4",
"юее4",
"юеи4",
"юео4",
"юеу4",
"юеъ4",
"юею4",
"юея4",
"юиа4",
"юие4",
"юии4",
"юио4",
"юиу4",
"юиъ4",
"юию4",
"юия4",
"юоа4",
"юое4",
"юои4",
"юоо4",
"юоу4",
"юоъ4",
"юою4",
"юоя4",
"юуа4",
"юуе4",
"юуи4",
"юуо4",
"юуу4",
"юуъ4",
"юую4",
"юуя4",
"юъа4",
"юъе4",
"юъи4",
"юъо4",
"юъу4",
"юъъ4",
"юъю4",
"юъя4",
"ююа4",
"ююе4",
"ююи4",
"ююо4",
"ююу4",
"ююъ4",
"ююю4",
"ююя4",
"юяа4",
"юяе4",
"юяи4",
"юяо4",
"юяу4",
"юяъ4",
"юяю4",
"юяя4",
"яаа4",
"яае4",
"яаи4",
"яао4",
"яау4",
"яаъ4",
"яаю4",
"яая4",
"яеа4",
"яее4",
"яеи4",
"яео4",
"яеу4",
"яеъ4",
"яею4",
"яея4",
"яиа4",
"яие4",
"яии4",
"яио4",
"яиу4",
"яиъ4",
"яию4",
"яия4",
"яоа4",
"яое4",
"яои4",
"яоо4",
"яоу4",
"яоъ4",
"яою4",
"яоя4",
"яуа4",
"яуе4",
"яуи4",
"яуо4",
"яуу4",
"яуъ4",
"яую4",
"яуя4",
"яъа4",
"яъе4",
"яъи4",
"яъо4",
"яъу4",
"яъъ4",
"яъю4",
"яъя4",
"яюа4",
"яюе4",
"яюи4",
"яюо4",
"яюу4",
"яюъ4",
"яюю4",
"яюя4",
"яяа4",
"яяе4",
"яяи4",
"яяо4",
"яяу4",
"яяъ4",
"яяю4",
"яяя4",
"й4бб",
"й4бв",
"й4бг",
"й4бд",
"й4бж",
"й4бз",
"й4бй",
"й4бк",
"й4бл",
"й4бм",
"й4бн",
"й4бп",
"й4бр",
"й4бс",
"й4бт",
"й4бф",
"й4бх",
"й4бц",
"й4бч",
"й4бш",
"й4бщ",
"й4вб",
"й4вв",
"й4вг",
"й4вд",
"й4вж",
"й4вз",
"й4вй",
"й4вк",
"й4вл",
"й4вм",
"й4вн",
"й4вп",
"й4вр",
"й4вс",
"й4вт",
"й4вф",
"й4вх",
"й4вц",
"й4вч",
"й4вш",
"й4вщ",
"й4гб",
"й4гв",
"й4гг",
"й4гд",
"й4гж",
"й4гз",
"й4гй",
"й4гк",
"й4гл",
"й4гм",
"й4гн",
"й4гп",
"й4гр",
"й4гс",
"й4гт",
"й4гф",
"й4гх",
"й4гц",
"й4гч",
"й4гш",
"й4гщ",
"й4дб",
"й4дв",
"й4дг",
"й4дд",
"й4дж",
"й4дз",
"й4дй",
"й4дк",
"й4дл",
"й4дм",
"й4дн",
"й4дп",
"й4др",
"й4дс",
"й4дт",
"й4дф",
"й4дх",
"й4дц",
"й4дч",
"й4дш",
"й4дщ",
"й4жб",
"й4жв",
"й4жг",
"й4жд",
"й4жж",
"й4жз",
"й4жй",
"й4жк",
"й4жл",
"й4жм",
"й4жн",
"й4жп",
"й4жр",
"й4жс",
"й4жт",
"й4жф",
"й4жх",
"й4жц",
"й4жч",
"й4жш",
"й4жщ",
"й4зб",
"й4зв",
"й4зг",
"й4зд",
"й4зж",
"й4зз",
"й4зй",
"й4зк",
"й4зл",
"й4зм",
"й4зн",
"й4зп",
"й4зр",
"й4зс",
"й4зт",
"й4зф",
"й4зх",
"й4зц",
"й4зч",
"й4зш",
"й4зщ",
"й4йб",
"й4йв",
"й4йг",
"й4йд",
"й4йж",
"й4йз",
"й4йй",
"й4йк",
"й4йл",
"й4йм",
"й4йн",
"й4йп",
"й4йр",
"й4йс",
"й4йт",
"й4йф",
"й4йх",
"й4йц",
"й4йч",
"й4йш",
"й4йщ",
"й4кб",
"й4кв",
"й4кг",
"й4кд",
"й4кж",
"й4кз",
"й4кй",
"й4кк",
"й4кл",
"й4км",
"й4кн",
"й4кп",
"й4кр",
"й4кс",
"й4кт",
"й4кф",
"й4кх",
"й4кц",
"й4кч",
"й4кш",
"й4кщ",
"й4лб",
"й4лв",
"й4лг",
"й4лд",
"й4лж",
"й4лз",
"й4лй",
"й4лк",
"й4лл",
"й4лм",
"й4лн",
"й4лп",
"й4лр",
"й4лс",
"й4лт",
"й4лф",
"й4лх",
"й4лц",
"й4лч",
"й4лш",
"й4лщ",
"й4мб",
"й4мв",
"й4мг",
"й4мд",
"й4мж",
"й4мз",
"й4мй",
"й4мк",
"й4мл",
"й4мм",
"й4мн",
"й4мп",
"й4мр",
"й4мс",
"й4мт",
"й4мф",
"й4мх",
"й4мц",
"й4мч",
"й4мш",
"й4мщ",
"й4нб",
"й4нв",
"й4нг",
"й4нд",
"й4нж",
"й4нз",
"й4нй",
"й4нк",
"й4нл",
"й4нм",
"й4нн",
"й4нп",
"й4нр",
"й4нс",
"й4нт",
"й4нф",
"й4нх",
"й4нц",
"й4нч",
"й4нш",
"й4нщ",
"й4пб",
"й4пв",
"й4пг",
"й4пд",
"й4пж",
"й4пз",
"й4пй",
"й4пк",
"й4пл",
"й4пм",
"й4пн",
"й4пп",
"й4пр",
"й4пс",
"й4пт",
"й4пф",
"й4пх",
"й4пц",
"й4пч",
"й4пш",
"й4пщ",
"й4рб",
"й4рв",
"й4рг",
"й4рд",
"й4рж",
"й4рз",
"й4рй",
"й4рк",
"й4рл",
"й4рм",
"й4рн",
"й4рп",
"й4рр",
"й4рс",
"й4рт",
"й4рф",
"й4рх",
"й4рц",
"й4рч",
"й4рш",
"й4рщ",
"й4сб",
"й4св",
"й4сг",
"й4сд",
"й4сж",
"й4сз",
"й4сй",
"й4ск",
"й4сл",
"й4см",
"й4сн",
"й4сп",
"й4ср",
"й4сс",
"й4ст",
"й4сф",
"й4сх",
"й4сц",
"й4сч",
"й4сш",
"й4сщ",
"й4тб",
"й4тв",
"й4тг",
"й4тд",
"й4тж",
"й4тз",
"й4тй",
"й4тк",
"й4тл",
"й4тм",
"й4тн",
"й4тп",
"й4тр",
"й4тс",
"й4тт",
"й4тф",
"й4тх",
"й4тц",
"й4тч",
"й4тш",
"й4тщ",
"й4фб",
"й4фв",
"й4фг",
"й4фд",
"й4фж",
"й4фз",
"й4фй",
"й4фк",
"й4фл",
"й4фм",
"й4фн",
"й4фп",
"й4фр",
"й4фс",
"й4фт",
"й4фф",
"й4фх",
"й4фц",
"й4фч",
"й4фш",
"й4фщ",
"й4хб",
"й4хв",
"й4хг",
"й4хд",
"й4хж",
"й4хз",
"й4хй",
"й4хк",
"й4хл",
"й4хм",
"й4хн",
"й4хп",
"й4хр",
"й4хс",
"й4хт",
"й4хф",
"й4хх",
"й4хц",
"й4хч",
"й4хш",
"й4хщ",
"й4цб",
"й4цв",
"й4цг",
"й4цд",
"й4цж",
"й4цз",
"й4цй",
"й4цк",
"й4цл",
"й4цм",
"й4цн",
"й4цп",
"й4цр",
"й4цс",
"й4цт",
"й4цф",
"й4цх",
"й4цц",
"й4цч",
"й4цш",
"й4цщ",
"й4чб",
"й4чв",
"й4чг",
"й4чд",
"й4чж",
"й4чз",
"й4чй",
"й4чк",
"й4чл",
"й4чм",
"й4чн",
"й4чп",
"й4чр",
"й4чс",
"й4чт",
"й4чф",
"й4чх",
"й4чц",
"й4чч",
"й4чш",
"й4чщ",
"й4шб",
"й4шв",
"й4шг",
"й4шд",
"й4шж",
"й4шз",
"й4шй",
"й4шк",
"й4шл",
"й4шм",
"й4шн",
"й4шп",
"й4шр",
"й4шс",
"й4шт",
"й4шф",
"й4шх",
"й4шц",
"й4шч",
"й4шш",
"й4шщ",
"й4щб",
"й4щв",
"й4щг",
"й4щд",
"й4щж",
"й4щз",
"й4щй",
"й4щк",
"й4щл",
"й4щм",
"й4щн",
"й4щп",
"й4щр",
"й4щс",
"й4щт",
"й4щф",
"й4щх",
"й4щц",
"й4щч",
"й4щш",
"й4щщ",
"б4ь",
"в4ь",
"г4ь",
"д4ь",
"ж4ь",
"з4ь",
"й4ь",
"к4ь",
"л4ь",
"м4ь",
"н4ь",
"п4ь",
"р4ь",
"с4ь",
"т4ь",
"ф4ь",
"х4ь",
"ц4ь",
"ч4ь",
"ш4ь",
"щ4ь",
"ь4ь",
".дз4в",
".дж4р",
".дж4л",
".вг4л",
".вд4л",
".вг4р",
".вг4н",
".вп4л",
".вк4л",
".вк4р",
".вт4р",
".сг4л",
".зд4р",
".сг4р",
".сб4р",
".сд4р",
".жд4р",
".ск4л",
".сп4л",
".сп4р",
".ст4р",
".ск4р",
".шп4р",
".ск4в",
".вз4р",
".вс4л",
".вс4м",
".вс4р",
".св4р",
".сх4л",
".сх4р",
".хв4р",
".вс4т",
".сх4в",
".см4р",
"н4кт.",
"н4кс.",
"к4ст.",
};
| mit |
AdamGagorik/darkstar | scripts/globals/items/bowl_of_optical_soup.lua | 18 | 1562 | -----------------------------------------
-- ID: 4340
-- Item: bowl_of_optical_soup
-- Food Effect: 4Hrs, All Races
-----------------------------------------
-- HP % 6 (cap 75)
-- Charisma -15
-- HP Recovered While Healing 5
-- Accuracy 15
-- Ranged Accuracy 15
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)
local result = 0;
if (target:hasStatusEffect(EFFECT_FOOD) == true or target:hasStatusEffect(EFFECT_FIELD_SUPPORT_FOOD) == true) then
result = 246;
end
return result;
end;
-----------------------------------------
-- OnItemUse
-----------------------------------------
function onItemUse(target)
target:addStatusEffect(EFFECT_FOOD,0,0,14400,4340);
end;
-----------------------------------------
-- onEffectGain Action
-----------------------------------------
function onEffectGain(target,effect)
target:addMod(MOD_FOOD_HPP, 6);
target:addMod(MOD_FOOD_HP_CAP, 75);
target:addMod(MOD_CHR, -15);
target:addMod(MOD_HPHEAL, 5);
target:addMod(MOD_ACC, 15);
target:addMod(MOD_RACC, 15);
end;
-----------------------------------------
-- onEffectLose Action
-----------------------------------------
function onEffectLose(target,effect)
target:delMod(MOD_FOOD_HPP, 6);
target:delMod(MOD_FOOD_HP_CAP, 75);
target:delMod(MOD_CHR, -15);
target:delMod(MOD_HPHEAL, 5);
target:delMod(MOD_ACC, 15);
target:delMod(MOD_RACC, 15);
end;
| gpl-3.0 |
aquileia/wesnoth | data/lua/wml/find_path.lua | 6 | 5035 | local helper = wesnoth.require "lua/helper.lua"
local utils = wesnoth.require "lua/wml-utils.lua"
function wesnoth.wml_actions.find_path(cfg)
local filter_unit = helper.get_child(cfg, "traveler") or helper.wml_error("[find_path] missing required [traveler] tag")
-- only the first unit matching
local unit = wesnoth.get_units(filter_unit)[1] or helper.wml_error("[find_path]'s filter didn't match any unit")
local filter_location = helper.get_child(cfg, "destination") or helper.wml_error( "[find_path] missing required [destination] tag" )
-- support for $this_unit
local this_unit = utils.start_var_scope("this_unit")
wesnoth.set_variable ( "this_unit" ) -- clearing this_unit
wesnoth.set_variable("this_unit", unit.__cfg) -- cfg field needed
local variable = cfg.variable or "path"
local ignore_units = false
local ignore_teleport = false
if cfg.check_zoc == false then --if we do not want to check the ZoCs, we must ignore units
ignore_units = true
end
if cfg.check_teleport == false then --if we do not want to check teleport, we must ignore it
ignore_teleport = true
end
local allow_multiple_turns = cfg.allow_multiple_turns
local viewing_side
if not cfg.check_visibility then viewing_side = 0 end -- if check_visiblity then shroud is taken in account
local locations = wesnoth.get_locations(filter_location) -- only the location with the lowest distance and lowest movement cost will match. If there will still be more than 1, only the 1st maching one.
local max_cost = nil
if not allow_multiple_turns then max_cost = unit.moves end --to avoid wrong calculation on already moved units
local current_distance, current_cost = math.huge, math.huge
local current_location = {}
local width,heigth,border = wesnoth.get_map_size() -- data for test below
for index, location in ipairs(locations) do
-- we test if location passed to pathfinder is invalid (border); if is, do nothing, do not return and continue the cycle
if location[1] == 0 or location[1] == ( width + 1 ) or location[2] == 0 or location[2] == ( heigth + 1 ) then
else
local distance = helper.distance_between ( unit.x, unit.y, location[1], location[2] )
-- if we pass an unreachable locations an high value will be returned
local path, cost = wesnoth.find_path( unit, location[1], location[2], { max_cost = max_cost, ignore_units = ignore_units, ignore_teleport = ignore_teleport, viewing_side = viewing_side } )
if ( distance < current_distance and cost <= current_cost ) or ( cost < current_cost and distance <= current_distance ) then -- to avoid changing the hex with one with less distance and more cost, or vice versa
current_distance = distance
current_cost = cost
current_location = location
end
end
end
if #current_location == 0 then wesnoth.message("WML warning","[find_path]'s filter didn't match any location")
else
local path, cost = wesnoth.find_path( unit, current_location[1], current_location[2], { max_cost = max_cost, ignore_units = ignore_units, ignore_teleport = ignore_teleport, viewing_side = viewing_side } )
local turns
if cost == 0 then -- if location is the same, of course it doesn't cost any MP
turns = 0
else
turns = math.ceil( ( ( cost - unit.moves ) / unit.max_moves ) + 1 )
end
if cost >= 42424242 then -- it's the high value returned for unwalkable or busy terrains
wesnoth.set_variable ( string.format("%s", variable), { hexes = 0 } ) -- set only length, nil all other values
-- support for $this_unit
wesnoth.set_variable ( "this_unit" ) -- clearing this_unit
utils.end_var_scope("this_unit", this_unit)
return end
if not allow_multiple_turns and turns > 1 then -- location cannot be reached in one turn
wesnoth.set_variable ( string.format("%s", variable), { hexes = 0 } )
-- support for $this_unit
wesnoth.set_variable ( "this_unit" ) -- clearing this_unit
utils.end_var_scope("this_unit", this_unit)
return end -- skip the cycles below
wesnoth.set_variable ( string.format( "%s", variable ), { hexes = current_distance, from_x = unit.x, from_y = unit.y, to_x = current_location[1], to_y = current_location[2], movement_cost = cost, required_turns = turns } )
for index, path_loc in ipairs(path) do
local sub_path, sub_cost = wesnoth.find_path( unit, path_loc[1], path_loc[2], { max_cost = max_cost, ignore_units = ignore_units, ignore_teleport = ignore_teleport, viewing_side = viewing_side } )
local sub_turns
if sub_cost == 0 then
sub_turns = 0
else
sub_turns = math.ceil( ( ( sub_cost - unit.moves ) / unit.max_moves ) + 1 )
end
wesnoth.set_variable ( string.format( "%s.step[%d]", variable, index - 1 ), { x = path_loc[1], y = path_loc[2], terrain = wesnoth.get_terrain( path_loc[1], path_loc[2] ), movement_cost = sub_cost, required_turns = sub_turns } ) -- this structure takes less space in the inspection window
end
end
-- support for $this_unit
wesnoth.set_variable ( "this_unit" ) -- clearing this_unit
utils.end_var_scope("this_unit", this_unit)
end | gpl-2.0 |
karottenreibe/luapdf | lib/index.lua | 1 | 2111 | ----------------------------------------------------------------
-- Document index menu --
-- @author Fabian Streitel (luapdf@rottenrei.be) --
----------------------------------------------------------------
-- Add index command
local cmd = lousy.bind.cmd
add_cmds({
cmd("index", function (w) w:set_mode("index") end),
})
-- Add mode to display the index in an interactive menu
new_mode("index", {
enter = function (w)
local rows = {{ "Index", title = true }}
local build_menu
build_menu = function (t, indent)
for _, action in pairs(t) do
table.insert(rows, { indent .. action.title, dest = action.destination })
build_menu(action.children, indent .. " ")
end
end
build_menu(w:get_current().index, " ")
w.menu:build(rows)
w:notify("Use j/k to move, t tabopen, w winopen.", false)
end,
leave = function (w)
w.menu:hide()
end,
})
-- Add additional binds to quickmarks menu mode
local key = lousy.bind.key
add_binds("index", lousy.util.table.join({
-- Open quickmark
key({}, "Return", function (w)
local row = w.menu:get()
if row and row.dest then
document.methods.scroll_to_dest(w:get_current(), w, row.dest)
end
end),
-- Open quickmark in new tab
key({}, "t", function (w)
local row = w.menu:get()
if row and row.dest then
local doc = w:new_tab(w:get_current().path, {switch = false})
document.methods.scroll_to_dest(doc, w, row.dest)
end
end),
-- Open quickmark in new window
key({}, "w", function (w)
local row = w.menu:get()
w:set_mode()
if row and row.dest then
local new_win = window.new({w:get_current().path})
document.methods.scroll_to_dest(new_win:get_current(), new_win, row.dest)
end
end),
-- Exit menu
key({}, "q", function (w) w:set_mode() end),
}, menu_binds))
-- vim: et:sw=4:ts=8:sts=4:tw=80
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Port_Jeuno/npcs/HomePoint#1.lua | 27 | 1262 | -----------------------------------
-- Area: Port Jeuno
-- NPC: HomePoint#1
-- @pos 37.076 0.001 8.831 246
-----------------------------------
package.loaded["scripts/zones/Port_Jeuno/TextIDs"] = nil;
require("scripts/globals/settings");
require("scripts/zones/Port_Jeuno/TextIDs");
require("scripts/globals/homepoint");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
homepointMenu( player, 0x21fc, 37);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
if (csid == 0x21fc) then
if (option == 1) then
player:setHomePoint();
player:messageSpecial(HOMEPOINT_SET);
else
hpTeleport( player, option);
end
end
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/globals/weaponskills/wheeling_thrust.lua | 11 | 1571 | -----------------------------------
-- Wheeling Thrust
-- Polearm weapon skill
-- Skill Level: 225
-- Ignores enemy's defense. Amount ignored varies with TP.
-- Will stack with Sneak Attack.
-- Aligned with the Flame Gorget & Light Gorget.
-- Aligned with the Flame Belt & Light Belt.
-- Element: None
-- Modifiers: STR:80%
-- 100%TP 200%TP 300%TP
-- 1.75 1.75 1.75
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/settings");
require("scripts/globals/weaponskills");
-----------------------------------
function onUseWeaponSkill(player, target, wsID, tp, primary)
local params = {};
params.numHits = 1;
params.ftp100 = 1.75; params.ftp200 = 1.75; params.ftp300 = 1.75;
params.str_wsc = 0.5; params.dex_wsc = 0.0; params.vit_wsc = 0.0; params.agi_wsc = 0.0; params.int_wsc = 0.0; params.mnd_wsc = 0.0; params.chr_wsc = 0.0;
params.crit100 = 0.0; params.crit200 = 0.0; params.crit300 = 0.0;
params.canCrit = false;
params.acc100 = 0.0; params.acc200= 0.0; params.acc300= 0.0;
params.atkmulti = 1;
-- Defense ignored is 50%, 75%, 100% (50% at 100 TP is accurate, other values are guesses)
params.ignoresDef = true;
params.ignored100 = 0.5;
params.ignored200 = 0.75;
params.ignored300 = 1;
if (USE_ADOULIN_WEAPON_SKILL_CHANGES == true) then
params.str_wsc = 0.8;
end
local damage, criticalHit, tpHits, extraHits = doPhysicalWeaponskill(player, target, wsID, params, tp, primary);
return tpHits, extraHits, criticalHit, damage;
end
| gpl-3.0 |
r1k/vlc | share/lua/intf/cli.lua | 2 | 32520 | --[==========================================================================[
cli.lua: CLI module for VLC
--[==========================================================================[
Copyright (C) 2007-2011 the VideoLAN team
$Id$
Authors: Antoine Cellerier <dionoea at videolan dot org>
Pierre Ynard
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
--]==========================================================================]
description=
[============================================================================[
Command Line Interface for VLC
This is a modules/control/oldrc.c look alike (with a bunch of new features).
It also provides a VLM interface copied from the telnet interface.
Use on local term:
vlc -I cli
Use on tcp connection:
vlc -I cli --lua-config "cli={host='localhost:4212'}"
Use on telnet connection:
vlc -I cli --lua-config "cli={host='telnet://localhost:4212'}"
Use on multiple hosts (term + plain tcp port + telnet):
vlc -I cli --lua-config "cli={hosts={'*console','localhost:4212','telnet://localhost:5678'}}"
Note:
-I cli and -I luacli are aliases for -I luaintf --lua-intf cli
Configuration options settable through the --lua-config option are:
* hosts: A list of hosts to listen on.
* host: A host to listen on. (won't be used if `hosts' is set)
* password: The password used for telnet clients.
The following can be set using the --lua-config option or in the interface
itself using the `set' command:
* prompt: The prompt.
* welcome: The welcome message.
* width: The default terminal width (used to format text).
* autocompletion: When issuing an unknown command, print a list of
possible commands to autocomplete with. (0 to disable,
1 to enable).
* autoalias: If autocompletion returns only one possibility, use it
(0 to disable, 1 to enable).
* flatplaylist: 0 to disable, 1 to enable.
]============================================================================]
require("common")
skip = common.skip
skip2 = function(foo) return skip(skip(foo)) end
setarg = common.setarg
strip = common.strip
_ = vlc.gettext._
N_ = vlc.gettext.N_
running = true
--[[ Setup default environement ]]
env = { prompt = "> ";
width = 70;
autocompletion = 1;
autoalias = 1;
welcome = _("Command Line Interface initialized. Type `help' for help.");
flatplaylist = 0;
}
--[[ Import custom environement variables from the command line config (if possible) ]]
for k,v in pairs(env) do
if config[k] then
if type(env[k]) == type(config[k]) then
env[k] = config[k]
vlc.msg.dbg("set environment variable `"..k.."' to "..tostring(env[k]))
else
vlc.msg.err("environment variable `"..k.."' should be of type "..type(env[k])..". config value will be discarded.")
end
end
end
--[[ Command functions ]]
function set_env(name,client,value)
if value then
local var,val = split_input(value)
if val then
local s = string.gsub(val,"\"(.*)\"","%1")
if type(client.env[var])==type(1) then
client.env[var] = tonumber(s)
else
client.env[var] = s
end
else
client:append( tostring(client.env[var]) )
end
else
for e,v in common.pairs_sorted(client.env) do
client:append(e.."="..v)
end
end
end
function save_env(name,client,value)
env = common.table_copy(client.env)
end
function alias(client,value)
if value then
local var,val = split_input(value)
if commands[var] and type(commands[var]) ~= type("") then
client:append("Error: cannot use a primary command as an alias name")
else
if commands[val] then
commands[var]=val
else
client:append("Error: unknown primary command `"..val.."'.")
end
end
else
for c,v in common.pairs_sorted(commands) do
if type(v)==type("") then
client:append(c.."="..v)
end
end
end
end
function lock(name,client)
if client.type == host.client_type.telnet then
client:switch_status( host.status.password )
client.buffer = ""
else
client:append("Error: the prompt can only be locked when logged in through telnet")
end
end
function logout(name,client)
if client.type == host.client_type.net
or client.type == host.client_type.telnet then
client:send("Bye-bye!\r\n")
client:del()
else
client:append("Error: Can't logout of stdin/stdout. Use quit or shutdown to close VLC.")
end
end
function shutdown(name,client)
client:append("Bye-bye!")
h:broadcast("Shutting down.\r\n")
vlc.msg.info("Requested shutdown.")
vlc.misc.quit()
running = false
end
function quit(name,client)
if client.type == host.client_type.net
or client.type == host.client_type.telnet then
logout(name,client)
else
shutdown(name,client)
end
end
function add(name,client,arg)
-- TODO: parse single and double quotes properly
local f
if name == "enqueue" then
f = vlc.playlist.enqueue
else
f = vlc.playlist.add
end
local options = {}
for o in string.gmatch(arg," +:([^ ]*)") do
table.insert(options,o)
end
arg = string.gsub(arg," +:.*$","")
local uri = vlc.strings.make_uri(arg)
f({{path=uri,options=options}})
end
function move(name,client,arg)
local x,y
local tbl = {}
for token in string.gmatch(arg, "[^%s]+") do
table.insert(tbl,token)
end
x = tonumber(tbl[1])
y = tonumber(tbl[2])
local res = vlc.playlist.move(x,y)
if res == (-1) then
client:append("You should choose valid id.")
end
end
function playlist_is_tree( client )
if client.env.flatplaylist == 0 then
return true
else
return false
end
end
function playlist(name,client,arg)
local current = vlc.playlist.current()
function playlist0(item,prefix)
local prefix = prefix or ""
if not item.flags.disabled then
local marker = ( item.id == current ) and "*" or " "
local str = "|"..prefix..marker..tostring(item.id).." - "..
( item.name or item.path )
if item.duration > 0 then
str = str.." ("..common.durationtostring(item.duration)..")"
end
if item.nb_played > 0 then
str = str.." [played "..tostring(item.nb_played).." time"
if item.nb_played > 1 then
str = str .. "s"
end
str = str .. "]"
end
client:append(str)
end
if item.children then
for _, c in ipairs(item.children) do
playlist0(c,prefix.." ")
end
end
end
local playlist
local tree = playlist_is_tree(client)
if name == "search" then
playlist = vlc.playlist.search(arg or "", tree)
else
if tonumber(arg) then
playlist = vlc.playlist.get(tonumber(arg), tree)
elseif arg then
playlist = vlc.playlist.get(arg, tree)
else
playlist = vlc.playlist.get(nil, tree)
end
end
if name == "search" then
client:append("+----[ Search - "..(arg or "`reset'").." ]")
else
client:append("+----[ Playlist - "..playlist.name.." ]")
end
if playlist.children then
for _, item in ipairs(playlist.children) do
playlist0(item)
end
else
playlist0(playlist)
end
if name == "search" then
client:append("+----[ End of search - Use `search' to reset ]")
else
client:append("+----[ End of playlist ]")
end
end
function playlist_sort(name,client,arg)
if not arg then
client:append("Valid sort keys are: id, title, artist, genre, random, duration, album.")
else
local tree = playlist_is_tree(client)
vlc.playlist.sort(arg,false,tree)
end
end
function services_discovery(name,client,arg)
if arg then
if vlc.sd.is_loaded(arg) then
vlc.sd.remove(arg)
client:append(arg.." disabled.")
else
vlc.sd.add(arg)
client:append(arg.." enabled.")
end
else
local sd = vlc.sd.get_services_names()
client:append("+----[ Services discovery ]")
for n,ln in pairs(sd) do
client:append("| "..n..": " .. ln)
end
client:append("+----[ End of services discovery ]")
client:append("Enabled services discovery sources appear in the playlist.")
end
end
function load_vlm(name, client, value)
if vlm == nil then
vlm = vlc.vlm()
end
end
function print_text(label,text)
return function(name,client)
client:append("+----[ "..label.." ]")
client:append "|"
for line in string.gmatch(text,".-\r?\n") do
client:append("| "..string.gsub(line,"\r?\n",""))
end
client:append "|"
client:append("+----[ End of "..string.lower(label).." ]")
end
end
function help(name,client,arg)
if arg == nil and vlm ~= nil then
client:append("+----[ VLM commands ]")
local message, vlc_err = vlm:execute_command("help")
vlm_message_to_string( client, message, "|" )
end
local width = client.env.width
local long = (name == "longhelp")
local extra = ""
if arg then extra = "matching `" .. arg .. "' " end
client:append("+----[ CLI commands "..extra.."]")
for i, cmd in ipairs(commands_ordered) do
if (cmd == "" or not commands[cmd].adv or long)
and (not arg or string.match(cmd,arg)) then
local str = "| " .. cmd
if cmd ~= "" then
local val = commands[cmd]
if val.aliases then
for _,a in ipairs(val.aliases) do
str = str .. ", " .. a
end
end
if val.args then str = str .. " " .. val.args end
if #str%2 == 1 then str = str .. " " end
str = str .. string.rep(" .",math.floor((width-(#str+#val.help)-1)/2))
str = str .. string.rep(" ",width-#str-#val.help) .. val.help
end
client:append(str)
end
end
client:append("+----[ end of help ]")
end
function input_info(name,client,id)
local item = nil;
if id then item = (vlc.playlist.get(id) or {})["item"]
else item = vlc.input.item() end
if(item == nil) then return end
local infos = item:info()
infos["Meta data"] = item:metas()
-- Sort categories so the output is consistent
local categories = {}
for cat in pairs(infos) do
table.insert(categories, cat)
end
table.sort(categories)
for _, cat in ipairs(categories) do
client:append("+----[ "..cat.." ]")
client:append("|")
for name, value in pairs(infos[cat]) do
client:append("| "..name..": "..value)
end
client:append("|")
end
client:append("+----[ end of stream info ]")
end
function stats(name,client)
local item = vlc.input.item()
if(item == nil) then return end
local stats_tab = item:stats()
client:append("+----[ begin of statistical info")
client:append("+-[Incoming]")
client:append("| input bytes read : "..string.format("%8.0f KiB",stats_tab["read_bytes"]/1024))
client:append("| input bitrate : "..string.format("%6.0f kb/s",stats_tab["input_bitrate"]*8000))
client:append("| demux bytes read : "..string.format("%8.0f KiB",stats_tab["demux_read_bytes"]/1024))
client:append("| demux bitrate : "..string.format("%6.0f kb/s",stats_tab["demux_bitrate"]*8000))
client:append("| demux corrupted : "..string.format("%5i",stats_tab["demux_corrupted"]))
client:append("| discontinuities : "..string.format("%5i",stats_tab["demux_discontinuity"]))
client:append("|")
client:append("+-[Video Decoding]")
client:append("| video decoded : "..string.format("%5i",stats_tab["decoded_video"]))
client:append("| frames displayed : "..string.format("%5i",stats_tab["displayed_pictures"]))
client:append("| frames lost : "..string.format("%5i",stats_tab["lost_pictures"]))
client:append("|")
client:append("+-[Audio Decoding]")
client:append("| audio decoded : "..string.format("%5i",stats_tab["decoded_audio"]))
client:append("| buffers played : "..string.format("%5i",stats_tab["played_abuffers"]))
client:append("| buffers lost : "..string.format("%5i",stats_tab["lost_abuffers"]))
client:append("|")
client:append("+-[Streaming]")
client:append("| packets sent : "..string.format("%5i",stats_tab["sent_packets"]))
client:append("| bytes sent : "..string.format("%8.0f KiB",stats_tab["sent_bytes"]/1024))
client:append("| sending bitrate : "..string.format("%6.0f kb/s",stats_tab["send_bitrate"]*8000))
client:append("+----[ end of statistical info ]")
end
function playlist_status(name,client)
local item = vlc.input.item()
if(item ~= nil) then
client:append( "( new input: " .. vlc.strings.decode_uri(item:uri()) .. " )" )
end
client:append( "( audio volume: " .. tostring(vlc.volume.get()) .. " )")
client:append( "( state " .. vlc.playlist.status() .. " )")
end
function is_playing(name,client)
if vlc.input.is_playing() then client:append "1" else client:append "0" end
end
function get_title(name,client)
local item = vlc.input.item()
if item then
client:append(item:name())
else
client:append("")
end
end
function get_length(name,client)
local item = vlc.input.item()
if item then
client:append(math.floor(item:duration()))
else
client:append("")
end
end
function ret_print(foo,start,stop)
local start = start or ""
local stop = stop or ""
return function(discard,client,...) client:append(start..tostring(foo(...))..stop) end
end
function get_time(var)
return function(name,client)
local input = vlc.object.input()
if input then
client:append(math.floor(vlc.var.get( input, var ) / 1000000))
else
client:append("")
end
end
end
function titlechap(name,client,value)
local input = vlc.object.input()
local var = string.gsub( name, "_.*$", "" )
if value then
vlc.var.set( input, var, value )
else
local item = vlc.var.get( input, var )
-- Todo: add item name conversion
client:append(item)
end
end
function titlechap_offset(var,offset)
local input = vlc.object.input()
vlc.var.set( input, var, vlc.var.get( input, var ) + offset )
end
function title_next(name,client,value)
titlechap_offset('title', 1)
end
function title_previous(name,client,value)
titlechap_offset('title', -1)
end
function chapter_next(name,client,value)
titlechap_offset('chapter', 1)
end
function chapter_previous(name,client,value)
titlechap_offset('chapter', -1)
end
function seek(name,client,value)
common.seek(value)
end
function volume(name,client,value)
if value then
common.volume(value)
else
client:append(tostring(vlc.volume.get()))
end
end
function rate(name,client,value)
local input = vlc.object.input()
if name == "rate" then
vlc.var.set(input, "rate", common.us_tonumber(value))
elseif name == "normal" then
vlc.var.set(input,"rate",1)
end
end
function rate_var(name,client,value)
local playlist = vlc.object.playlist()
vlc.var.trigger_callback(playlist,"rate-"..name)
end
function frame(name,client)
vlc.var.trigger_callback(vlc.object.input(),"frame-next");
end
function listvalue(obj,var)
return function(client,value)
local o
if obj == "input" then
o = vlc.object.input()
elseif obj == "aout" then
o = vlc.object.aout()
elseif obj == "vout" then
o = vlc.object.vout()
end
if not o then return end
if value then
vlc.var.set( o, var, value )
else
local c = vlc.var.get( o, var )
local v, l = vlc.var.get_list( o, var )
client:append("+----[ "..var.." ]")
for i,val in ipairs(v) do
local mark = (val==c)and " *" or ""
client:append("| "..tostring(val).." - "..tostring(l[i])..mark)
end
client:append("+----[ end of "..var.." ]")
end
end
end
function hotkey(name, client, value)
if not value then
client:append("Please specify a hotkey (ie key-quit or quit)")
elseif not common.hotkey(value) and not common.hotkey("key-"..value) then
client:append("Unknown hotkey '"..value.."'")
end
end
--[[ Declare commands, register their callback functions and provide
help strings here.
Syntax is:
"<command name>"; { func = <function>; [ args = "<str>"; ] help = "<str>"; [ adv = <bool>; ] [ aliases = { ["<str>";]* }; ] }
]]
commands_ordered = {
{ "add"; { func = add; args = "XYZ"; help = "add XYZ to playlist" } };
{ "enqueue"; { func = add; args = "XYZ"; help = "queue XYZ to playlist" } };
{ "playlist"; { func = playlist; help = "show items currently in playlist" } };
{ "search"; { func = playlist; args = "[string]"; help = "search for items in playlist (or reset search)" } };
{ "delete"; { func = skip2(vlc.playlist.delete); args = "[X]"; help = "delete item X in playlist" } };
{ "move"; { func = move; args = "[X][Y]"; help = "move item X in playlist after Y" } };
{ "sort"; { func = playlist_sort; args = "key"; help = "sort the playlist" } };
{ "sd"; { func = services_discovery; args = "[sd]"; help = "show services discovery or toggle" } };
{ "play"; { func = skip2(vlc.playlist.play); help = "play stream" } };
{ "stop"; { func = skip2(vlc.playlist.stop); help = "stop stream" } };
{ "next"; { func = skip2(vlc.playlist.next); help = "next playlist item" } };
{ "prev"; { func = skip2(vlc.playlist.prev); help = "previous playlist item" } };
{ "goto"; { func = skip2(vlc.playlist.gotoitem); help = "goto item at index" ; aliases = { "gotoitem" } } };
{ "repeat"; { func = skip2(vlc.playlist.repeat_); args = "[on|off]"; help = "toggle playlist repeat" } };
{ "loop"; { func = skip2(vlc.playlist.loop); args = "[on|off]"; help = "toggle playlist loop" } };
{ "random"; { func = skip2(vlc.playlist.random); args = "[on|off]"; help = "toggle playlist random" } };
{ "clear"; { func = skip2(vlc.playlist.clear); help = "clear the playlist" } };
{ "status"; { func = playlist_status; help = "current playlist status" } };
{ "title"; { func = titlechap; args = "[X]"; help = "set/get title in current item" } };
{ "title_n"; { func = title_next; help = "next title in current item" } };
{ "title_p"; { func = title_previous; help = "previous title in current item" } };
{ "chapter"; { func = titlechap; args = "[X]"; help = "set/get chapter in current item" } };
{ "chapter_n"; { func = chapter_next; help = "next chapter in current item" } };
{ "chapter_p"; { func = chapter_previous; help = "previous chapter in current item" } };
{ "" };
{ "seek"; { func = seek; args = "X"; help = "seek in seconds, for instance `seek 12'" } };
{ "pause"; { func = skip2(vlc.playlist.pause); help = "toggle pause" } };
{ "fastforward"; { func = setarg(common.hotkey,"key-jump+extrashort"); help = "set to maximum rate" } };
{ "rewind"; { func = setarg(common.hotkey,"key-jump-extrashort"); help = "set to minimum rate" } };
{ "faster"; { func = rate_var; help = "faster playing of stream" } };
{ "slower"; { func = rate_var; help = "slower playing of stream" } };
{ "normal"; { func = rate; help = "normal playing of stream" } };
{ "rate"; { func = rate; args = "[playback rate]"; help = "set playback rate to value" } };
{ "frame"; { func = frame; help = "play frame by frame" } };
{ "fullscreen"; { func = skip2(vlc.video.fullscreen); args = "[on|off]"; help = "toggle fullscreen"; aliases = { "f", "F" } } };
{ "info"; { func = input_info; args= "[X]"; help = "information about the current stream (or specified id)" } };
{ "stats"; { func = stats; help = "show statistical information" } };
{ "get_time"; { func = get_time("time"); help = "seconds elapsed since stream's beginning" } };
{ "is_playing"; { func = is_playing; help = "1 if a stream plays, 0 otherwise" } };
{ "get_title"; { func = get_title; help = "the title of the current stream" } };
{ "get_length"; { func = get_length; help = "the length of the current stream" } };
{ "" };
{ "volume"; { func = volume; args = "[X]"; help = "set/get audio volume" } };
{ "volup"; { func = ret_print(vlc.volume.up,"( audio volume: "," )"); args = "[X]"; help = "raise audio volume X steps" } };
{ "voldown"; { func = ret_print(vlc.volume.down,"( audio volume: "," )"); args = "[X]"; help = "lower audio volume X steps" } };
-- { "adev"; { func = skip(listvalue("aout","audio-device")); args = "[X]"; help = "set/get audio device" } };
{ "achan"; { func = skip(listvalue("aout","stereo-mode")); args = "[X]"; help = "set/get stereo audio output mode" } };
{ "atrack"; { func = skip(listvalue("input","audio-es")); args = "[X]"; help = "set/get audio track" } };
{ "vtrack"; { func = skip(listvalue("input","video-es")); args = "[X]"; help = "set/get video track" } };
{ "vratio"; { func = skip(listvalue("vout","aspect-ratio")); args = "[X]"; help = "set/get video aspect ratio" } };
{ "vcrop"; { func = skip(listvalue("vout","crop")); args = "[X]"; help = "set/get video crop"; aliases = { "crop" } } };
{ "vzoom"; { func = skip(listvalue("vout","zoom")); args = "[X]"; help = "set/get video zoom"; aliases = { "zoom" } } };
{ "vdeinterlace"; { func = skip(listvalue("vout","deinterlace")); args = "[X]"; help = "set/get video deinterlace" } };
{ "vdeinterlace_mode"; { func = skip(listvalue("vout","deinterlace-mode")); args = "[X]"; help = "set/get video deinterlace mode" } };
{ "snapshot"; { func = common.snapshot; help = "take video snapshot" } };
{ "strack"; { func = skip(listvalue("input","spu-es")); args = "[X]"; help = "set/get subtitle track" } };
{ "hotkey"; { func = hotkey; args = "[hotkey name]"; help = "simulate hotkey press"; adv = true; aliases = { "key" } } };
{ "" };
{ "vlm"; { func = load_vlm; help = "load the VLM" } };
{ "set"; { func = set_env; args = "[var [value]]"; help = "set/get env var"; adv = true } };
{ "save_env"; { func = save_env; help = "save env vars (for future clients)"; adv = true } };
{ "alias"; { func = skip(alias); args = "[cmd]"; help = "set/get command aliases"; adv = true } };
{ "description"; { func = print_text("Description",description); help = "describe this module" } };
{ "license"; { func = print_text("License message",vlc.misc.license()); help = "print VLC's license message"; adv = true } };
{ "help"; { func = help; args = "[pattern]"; help = "a help message"; aliases = { "?" } } };
{ "longhelp"; { func = help; args = "[pattern]"; help = "a longer help message" } };
{ "lock"; { func = lock; help = "lock the telnet prompt" } };
{ "logout"; { func = logout; help = "exit (if in a socket connection)" } };
{ "quit"; { func = quit; help = "quit VLC (or logout if in a socket connection)" } };
{ "shutdown"; { func = shutdown; help = "shutdown VLC" } };
}
commands = {}
for i, cmd in ipairs( commands_ordered ) do
if #cmd == 2 then
commands[cmd[1]]=cmd[2]
if cmd[2].aliases then
for _,a in ipairs(cmd[2].aliases) do
commands[a]=cmd[1]
end
end
end
commands_ordered[i]=cmd[1]
end
--[[ From now on commands_ordered is a list of the different command names
and commands is a associative array indexed by the command name. ]]
-- Compute the column width used when printing a the autocompletion list
env.colwidth = 0
for c,_ in pairs(commands) do
if #c > env.colwidth then env.colwidth = #c end
end
env.coldwidth = env.colwidth + 1
--[[ Utils ]]
function split_input(input)
local input = strip(input)
local s = string.find(input," ")
if s then
return string.sub(input,0,s-1), strip(string.sub(input,s))
else
return input
end
end
function vlm_message_to_string(client,message,prefix)
local prefix = prefix or ""
if message.value then
client:append(prefix .. message.name .. " : " .. message.value)
else
client:append(prefix .. message.name)
end
if message.children then
for i,c in ipairs(message.children) do
vlm_message_to_string(client,c,prefix.." ")
end
end
end
--[[ Command dispatch ]]
function call_command(cmd,client,arg)
if type(commands[cmd]) == type("") then
cmd = commands[cmd]
end
local ok, msg
if arg ~= nil then
ok, msg = pcall( commands[cmd].func, cmd, client, arg )
else
ok, msg = pcall( commands[cmd].func, cmd, client )
end
if not ok then
local a = arg and " "..arg or ""
client:append("Error in `"..cmd..a.."' ".. msg)
end
end
function call_vlm_command(cmd,client,arg)
if vlm == nil then
return -1
end
if arg ~= nil then
cmd = cmd.." "..arg
end
local message, vlc_err = vlm:execute_command( cmd )
-- the VLM doesn't let us know if the command exists,
-- so we need this ugly hack
if vlc_err ~= 0 and message.value == "Unknown VLM command" then
return vlc_err
end
vlm_message_to_string( client, message )
return 0
end
function call_libvlc_command(cmd,client,arg)
local ok, vlcerr = pcall( vlc.var.libvlc_command, cmd, arg )
if not ok then
local a = arg and " "..arg or ""
client:append("Error in `"..cmd..a.."' ".. vlcerr) -- when pcall fails, the 2nd arg is the error message.
end
return vlcerr
end
function client_command( client )
local cmd,arg = split_input(client.buffer)
client.buffer = ""
if commands[cmd] then
call_command(cmd,client,arg)
elseif call_vlm_command(cmd,client,arg) == 0 then
--
elseif client.type == host.client_type.stdio
and call_libvlc_command(cmd,client,arg) == 0 then
--
else
local choices = {}
if client.env.autocompletion ~= 0 then
for v,_ in common.pairs_sorted(commands) do
if string.sub(v,0,#cmd)==cmd then
table.insert(choices, v)
end
end
end
if #choices == 1 and client.env.autoalias ~= 0 then
-- client:append("Aliasing to \""..choices[1].."\".")
cmd = choices[1]
call_command(cmd,client,arg)
else
client:append("Unknown command `"..cmd.."'. Type `help' for help.")
if #choices ~= 0 then
client:append("Possible choices are:")
local cols = math.floor(client.env.width/(client.env.colwidth+1))
local fmt = "%-"..client.env.colwidth.."s"
for i = 1, #choices do
choices[i] = string.format(fmt,choices[i])
end
for i = 1, #choices, cols do
local j = i + cols - 1
if j > #choices then j = #choices end
client:append(" "..table.concat(choices," ",i,j))
end
end
end
end
end
--[[ Some telnet command special characters ]]
WILL = "\251" -- Indicates the desire to begin performing, or confirmation that you are now performing, the indicated option.
WONT = "\252" -- Indicates the refusal to perform, or continue performing, the indicated option.
DO = "\253" -- Indicates the request that the other party perform, or confirmation that you are expecting the other party to perform, the indicated option.
DONT = "\254" -- Indicates the demand that the other party stop performing, or confirmation that you are no longer expecting the other party to perform, the indicated option.
IAC = "\255" -- Interpret as command
ECHO = "\001"
function telnet_commands( client )
-- remove telnet command replies from the client's data
client.buffer = string.gsub( client.buffer, IAC.."["..DO..DONT..WILL..WONT.."].", "" )
end
--[[ Client status change callbacks ]]
function on_password( client )
client.env = common.table_copy( env )
if client.type == host.client_type.telnet then
client:send( "Password: " ..IAC..WILL..ECHO )
else
if client.env.welcome ~= "" then
client:send( client.env.welcome .. "\r\n")
end
client:switch_status( host.status.read )
end
end
-- Print prompt when switching a client's status to `read'
function on_read( client )
client:send( client.env.prompt )
end
function on_write( client )
end
--[[ Setup host ]]
require("host")
h = host.host()
h.status_callbacks[host.status.password] = on_password
h.status_callbacks[host.status.read] = on_read
h.status_callbacks[host.status.write] = on_write
h:listen( config.hosts or config.host or "*console" )
password = config.password or "admin"
--[[ The main loop ]]
while running do
local write, read = h:accept_and_select()
for _, client in pairs(write) do
local len = client:send()
client.buffer = string.sub(client.buffer,len+1)
if client.buffer == "" then client:switch_status(host.status.read) end
end
for _, client in pairs(read) do
local input = client:recv(1000)
if input == nil -- the telnet client program has left
or ((client.type == host.client_type.net
or client.type == host.client_type.telnet)
and input == "\004") then
-- Caught a ^D
client.cmds = "quit\n"
else
client.cmds = client.cmds .. input
end
client.buffer = ""
-- split the command at the first '\n'
while string.find(client.cmds, "\n") do
-- save the buffer to send to the client
local saved_buffer = client.buffer
-- get the next command
local index = string.find(client.cmds, "\n")
client.buffer = strip(string.sub(client.cmds, 0, index - 1))
client.cmds = string.sub(client.cmds, index + 1)
-- Remove telnet commands from the command line
if client.type == host.client_type.telnet then
telnet_commands( client )
end
-- Run the command
if client.status == host.status.password then
if client.buffer == password then
client:send( IAC..WONT..ECHO.."\r\nWelcome, Master\r\n" )
client.buffer = ""
client:switch_status( host.status.write )
elseif client.buffer == "quit" then
client_command( client )
else
client:send( "\r\nWrong password\r\nPassword: " )
client.buffer = ""
end
else
client:switch_status( host.status.write )
client_command( client )
end
client.buffer = saved_buffer .. client.buffer
end
end
end
--[[ Clean up ]]
vlm = nil
| gpl-2.0 |
rinstrum/LUA-LIB | src/rinLibrary/GenericReg.lua | 2 | 24305 | -------------------------------------------------------------------------------
--- Register Functions.
-- Functions to read, write and execute commands on instrument registers directly
-- @module rinLibrary.Device.Reg
-- @author Merrick Heley
-- @copyright 2016 Rinstrum Pty Ltd
-------------------------------------------------------------------------------
local string = string
local tonumber = tonumber
local powersOfTen = require "rinLibrary.powersOfTen"
local timers = require 'rinSystem.rinTimers'
local system = require 'rinSystem'
local dbg = require "rinLibrary.rinDebug"
local rinMsg = require 'rinLibrary.rinMessage'
local canonical = require('rinLibrary.namings').canonicalisation
local bit32 = require "bit"
local lpeg = require "rinLibrary.lpeg"
local space, digit, P, S = lpeg.space, lpeg.digit, lpeg.P, lpeg.S
local math = math
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
-- Submodule function begins here
return function (_M, private, deprecated)
local REG_HEARTBEAT = 0x032F
-- Register Types
local TYP_CHAR = 0x00
local TYP_UCHAR = 0x01
local TYP_SHORT = 0x02
local TYP_USHORT = 0x03
local TYP_LONG = 0x04
local TYP_ULONG = 0x05
local TYP_STRING = 0x06
local TYP_OPTION = 0x07
local TYP_MENU = 0x08
local TYP_WEIGHT = 0x09
local TYP_BLOB = 0x0A
local TYP_EXECUTE = 0x0B
local TYP_BITFIELD = 0x0C
local TYP_REGSTREAM = 0x0D
local TYP_STRING_EXECUTE = 0x0E
local TYP_MENU_END = 0x0F
local TYP_STRING_ARRAY = 0x10
local TYP_OPTION16 = 0x11
local TYP_IP = 0x12
--- Register Types.
-- @table rinType
-- @field char Eight bit character
-- @field uchar Eight bit unsigned character
-- @field short Sixteen bit signed integer
-- @field ushort Sixteen bit unsigned integer
-- @field long Thirty two bit signed integer
-- @field ulong Thirty two bit unsigned integer
-- @field string String
-- @field option Option
-- @field menu Menu
-- @field weight Weight
-- @field blob Blob
-- @field execute Execute
-- @field bitfield Bit Field
local typeMap = {
[TYP_CHAR] = 'char',
[TYP_UCHAR] = 'uchar',
[TYP_SHORT] = 'short',
[TYP_USHORT] = 'ushort',
[TYP_LONG] = 'long',
[TYP_ULONG] = 'ulong',
[TYP_STRING] = 'string',
[TYP_OPTION] = 'option',
[TYP_MENU] = 'menu',
[TYP_WEIGHT] = 'weight',
[TYP_BLOB] = 'blob',
[TYP_EXECUTE] = 'execute',
[TYP_BITFIELD] = 'bitfield',
[TYP_REGSTREAM] = 'regstream',
[TYP_STRING_EXECUTE] = 'string_execute',
[TYP_MENU_END] = 'menu_end',
[TYP_STRING_ARRAY] = 'string_array',
[TYP_OPTION16] = 'option16',
[TYP_IP] = 'ip',
}
local permissionsMap = {
[0] = true, [1] = 'safe', [2] = 'full', [3] = false
}
-- Pattern to ease the computation of the number of decimal places in a value
local dpCount
local dpPattern = S('+-')^-1 * space^0 * digit^0 * (P'.' * (digit^0 / function(s) dpCount = #s end))^-1
local regCache -- Maintain a cache of register attributes
-------------------------------------------------------------------------------
-- Called to send command to a register but not wait for the response
-- @param cmd command
-- @param reg register
-- @param data to send
-- @param crc 'crc' if message sent with crc, not otherwise (default)
-- @local
local function sendReg(cmd, reg, data, crc)
if reg ~= nil then
local r = private.getRegisterNumber(reg)
private.send(nil, cmd, r, data, "noReply", crc)
end
end
-------------------------------------------------------------------------------
-- Called to send command and wait for response
-- @param cmd command
-- @param reg register
-- @param data to send
-- @param t timeout in sec
-- @param crc 'crc' if message sent with crc, not otherwise (default)
-- @return reply received from instrument, nil if error
-- @return err error string if error received, nil otherwise
-- @local
local function sendRegWait(cmd, reg, data, t, crc)
if reg == nil then
return nil, 'Nil Register'
end
local r = private.getRegisterNumber(reg)
if r == nil then
return nil, "Unknown Register"
end
local finished, regData, regErr = false, '', ''
local function waitf(data, err)
finished, regData, regErr = true, data, err
end
local f = private.getDeviceRegister(r)
private.bindRegister(r, waitf)
private.send(nil, cmd, r, data, "reply", crc)
local tmr = timers.addTimer(0, t or 2.0, waitf, nil, 'Timeout')
_M.app.delayUntil(function() return finished end)
private.bindRegister(r, f)
timers.removeTimer(tmr)
return regData, regErr
end
-------------------------------------------------------------------------------
-- processes the return string from rdlit command
-- if data is a floating point number then the converted number is returned
-- otherwise the original data string is returned
-- @param data returned from rdlit
-- @return floating point number or data string
-- @local
local function literalToFloat(data)
local a, b = string.find(data,'[+-]?%s*%d*%.?%d*')
if not a then
return data
else
data = string.gsub(string.sub(data,a,b), '%s', '') -- remove spaces
return tonumber(data)
end
end
-------------------------------------------------------------------------------
-- called to convert hexadecimal return string to a floating point number
-- @function toFloat
-- @param data returned from _rdfinalhex or from stream
-- @param dp decimal position (if nil then instrument dp used)
-- @return floating point number or nil on error
-- @local
function private.toFloat(data, dp)
local dp = dp or _M.getDispModeDP('primary') -- use instrument dp if not specified otherwise
data = tonumber(data, 16)
if data then
if data > 0x7FFFFFFF then
data = data - 4294967296 -- 4294967296 = 2^32 = 0xFFFFFFFF + 1
end
return data / powersOfTen[dp]
end
return nil
end
-------------------------------------------------------------------------------
-- Called to read register contents
-- @param reg register to read
-- @param timeout timeout in seconds (optional)
-- @return data received from instrument, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.readRegLiteral(reg, timeout)
local data, err = sendRegWait('rdlit', reg, nil, timeout)
if err then
dbg.debug('Read Literal Error', err)
end
return data, err
end
-------------------------------------------------------------------------------
-- Called to read register contents
-- @function readReg
-- @param reg register to read
-- @param timeout timeout in seconds (optional)
-- @return data received from instrument, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.readReg(reg, timeout)
local data, err = private.readRegLiteral(reg, timeout)
if err then
return nil, err
end
local num = literalToFloat(data)
if num then
return num, nil
else
return data, nil
end
end
-------------------------------------------------------------------------------
-- Called to read register contents in decimal
-- @param reg register to read
-- @param timeout timeout in seconds (optional)
-- @return data received from instrument, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.readRegDec(reg, timeout)
local data, err
data, err = sendRegWait('rdfinaldec', reg, nil, timeout)
if err then
dbg.debug('Read Dec Error', err)
end
return data, nil
end
-------------------------------------------------------------------------------
-- Called to read register contents in decimal
-- @param reg register to read
-- @param timeout timeout in seconds (optional)
-- @return data received from instrument, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.readRegHex(reg, timeout)
local data, err
data, err = sendRegWait('rdfinalhex', reg, nil, timeout)
if err then
dbg.debug('Read Hex Error', string.format("%04X", reg), err)
end
return data, err
end
-------------------------------------------------------------------------------
-- Called to write data to an instrument register
-- @function writeReg
-- @param reg register
-- @param data to send
-- @param timeout timeout for send operation
-- @param crc 'crc' if message sent with crc, not otherwise (default)
-- @return reply received from instrument, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.writeReg(reg, data, timeout, crc)
return sendRegWait('wrfinaldec', reg, data, timeout, crc)
end
-------------------------------------------------------------------------------
-- Called to write hex data to an instrument register
-- @param reg register
-- @param data to send
-- @param timeout timeout for send operation
-- @param crc 'crc' if message sent with crc, not otherwise (default)
-- @return reply received from instrument, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.writeRegHex(reg, data, timeout, crc)
return sendRegWait('wrfinalhex', reg, data, timeout, crc)
end
-------------------------------------------------------------------------------
-- Called to write data to an instrument register asynchronously
-- @function writeRegAsync
-- @param reg register
-- @param data to send
-- @param crc 'crc' if message sent with crc, not otherwise (default)
-- @local
function private.writeRegAsync(reg, data, crc)
sendReg('wrfinaldec', reg, data, crc)
end
-------------------------------------------------------------------------------
-- Called to write hex data to an instrument register asynchronously
-- @function writeRegHexAsync
-- @param reg register
-- @param data to send
-- @param crc 'crc' if message sent with crc, not otherwise (default)
-- @local
function private.writeRegHexAsync(reg, data, crc)
sendReg('wrfinalhex', reg, data, crc)
end
-------------------------------------------------------------------------------
-- Called to run a register execute command with data as the execute parameter
-- @function exReg
-- @param reg register
-- @param data to send
-- @param timeout Timeout in seconds (optional)
-- @return reply received from instrument, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.exReg(reg, data, timeout)
return sendRegWait('ex', reg, data, timeout)
end
-------------------------------------------------------------------------------
-- Call to run a register execute command with data as the execute parameter.
-- This call doesn't wait for a response.
-- @function exRegAsync
-- @param reg register
-- @param data to send
-- @local
function private.exRegAsync(reg, data)
sendReg('ex', reg, data, "noReply")
end
-------------------------------------------------------------------------------
-- Reset the register infomation cache to clear.
--
-- This needs to be called after any change that might impact the register
-- information and settings.
-- @function resetRegisterInfoCache
-- @local
function private.resetRegisterInfoCache()
regCache = {}
end
private.resetRegisterInfoCache()
-------------------------------------------------------------------------------
-- Utility function to cache register information.
-- The item desired is queried for and cached. Future queries return the
-- cached value directly.
-- @param reg Register to query
-- @param name Name of item being queried
-- @param post Post query update function
-- @param ... Argument to sendRegWait to query this item
-- @return query result, nil if error
-- @return err error string if error received, nil otherwise
-- @local
local function queryRegisterInformation(reg, name, post, ...)
if reg == nil then
return nil, 'Nil Register'
end
local r = private.getRegisterNumber(reg)
if r == nil then
return nil, "Unknown Register"
end
if regCache[r] == nil then
regCache[r] = {}
end
if regCache[r][name] ~= nil then
return regCache[r][name], nil
end
local data, err = post(reg, sendRegWait(...))
if err == nil then
regCache[r][name] = data
end
return data, err
end
-------------------------------------------------------------------------------
-- Query helper function that simply returns its arguments.
-- This is used for a no modification query
-- @param reg Register being queried
-- @param data Data returned from the display
-- @param err Error code from display
-- @return Data
-- @return Error code
-- @local
local function queryNoChanges(reg, data, err)
return data, err
end
-------------------------------------------------------------------------------
-- Called to get a registers name
-- @param reg register
-- @param timeout Timeout in seconds (optional)
-- @return reply Name of register from instrument, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.getRegName(reg, timeout)
return queryRegisterInformation(reg, 'name', queryNoChanges, 'rdname', reg, nil, timeout)
end
-------------------------------------------------------------------------------
-- Query helper function to get decimal places from a query return code
-- @param reg Register being queried
-- @param data Formatted value returned from display
-- @param err Error code from display
-- @return Number of decimal places
-- @return Error code
-- @local
local function queryDecimalPlaces(reg, data, err)
if err then
return data, err
end
dpCount = 0
dpPattern:match(data)
return dpCount, nil
end
-------------------------------------------------------------------------------
-- Called to read a register value and work out how many decimal places the
-- value contains.
-- @function getRegDecimalPlaces
-- @param reg Register to read
-- @return Decimal places for register, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.getRegDecimalPlaces(reg)
return queryRegisterInformation(reg, 'decimalPlaces', queryDecimalPlaces, 'rdlit', reg)
end
-------------------------------------------------------------------------------
-- Query helper function to get permissions from the permission return code
-- @param reg Register being queried
-- @param data Permission code returned from display
-- @param err Error code from display
-- @return Permissions table
-- @return Error code
-- @local
local function queryPermissions(reg, data, err)
local p = tonumber(data, 16) or 15
return {
read = permissionsMap[p % 4],
write = permissionsMap[math.floor(p/4) % 4],
sideEffects = bit32.band(0x80, p) == 0
}, err
end
-------------------------------------------------------------------------------
-- Called to read a register's permissions
-- @function getRegType
-- @param reg Register to query
-- @return The register permissions, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.getRegPermissions(reg)
return queryRegisterInformation(reg, 'permissions', queryPermissions, 'rdpermission', reg)
end
-------------------------------------------------------------------------------
-- Query helper function to get type from the type code
-- @param reg Register being queried
-- @param data Type code returned from display
-- @param err Error code from display
-- @return Type name
-- @return Error code
-- @local
local function queryType(reg, data, err)
if data == nil then return nil, err end
return typeMap[tonumber(data, 16) or -1], err
end
-------------------------------------------------------------------------------
-- Called to read a register's type
-- @function getRegType
-- @param reg Register to query
-- @return The type of the register, nil if error
-- @return err error string if error received, nil otherwise
-- @local
function private.getRegType(reg)
return queryRegisterInformation(reg, 'type', queryType, 'rdtype', reg)
end
-------------------------------------------------------------------------------
-- Query helper function to get a number from the data
-- @param reg Register being queried
-- @param data Data returned from display
-- @param err Error code from display
-- @return Numeric data
-- @return Error code
-- @local
local function queryNum(reg, data, err)
if err then
return data, err
end
return private.toFloat(data, private.getRegDecimalPlaces(reg)), nil
end
-------------------------------------------------------------------------------
-- Called to read a register's maximum value
-- @function getRegMax
-- @param reg Register to query
-- @return The maximum value for the register, not converted to real, nil if error
-- @return Error code or nil for no error
-- @local
function private.getRegMax(reg)
local dp = private.getRegDecimalPlaces(reg)
return queryRegisterInformation(reg, 'max', queryNum, 'rdrangemax', reg)
end
-------------------------------------------------------------------------------
-- Called to read a register's minimum value
-- @function getRegMin
-- @param reg Register to query
-- @return The minimum value for the register, not converted to real, nil if error
-- @return Error code or nil for no error
-- @local
function private.getRegMin(reg)
local dp = private.getRegDecimalPlaces(reg)
return queryRegisterInformation(reg, 'min', queryNum, 'rdrangemin', reg)
end
-------------------------------------------------------------------------------
-- Query all the information about a register.
-- @param reg Register to query information about
-- @return Table containing all the register information (name, type, min, max, decimalPlaces, permissions).
-- @usage
-- local regInfo = device.getRegInfo('grossnet')
-- print('grossnet decimals', regInfo.decimalPlaces)
function _M.getRegInfo(reg)
return {
name = private.getRegName(reg) or canonical(reg),
type = private.getRegType(reg),
min = private.getRegMin(reg),
max = private.getRegMax(reg),
decimalPlaces = private.getRegDecimalPlaces(reg),
permissions = private.getRegPermissions(reg)
}
end
-------------------------------------------------------------------------------
-- Read a numeric register and convert according to the current decimal place
-- settings etc
-- @param reg Register to query
-- @return value of register or nil on error
-- @return eror message or nil for no error
-- @local
local function getNumber(reg)
local n, err = private.readRegHex(reg)
if n == nil then
return nil, err
end
return private.toFloat(n, private.getRegDecimalPlaces(reg))
end
-------------------------------------------------------------------------------
-- Write a numeric register and convert according to the current decimal place
-- settings etc
-- @param reg Register to query
-- @param val Value to write to the register (real)
-- @local
local function setNumber(reg, val)
val = math.max(private.getRegMin(reg), math.min(private.getRegMax(reg), val))
val = math.floor(val * powersOfTen[private.getRegDecimalPlaces(reg)] + 0.5)
if val < 0 then
val = val + 4294967296
end
return private.writeRegHexAsync(reg, val)
end
local registerAccessorsByType = {
-- type read function write function
char = { getNumber, setNumber },
uchar = { getNumber, setNumber },
short = { getNumber, setNumber },
ushort = { getNumber, setNumber },
long = { getNumber, setNumber },
ulong = { getNumber, setNumber },
string = { private.readRegLiteral, private.writeReg },
option = { private.readRegHex, private.writeRegHexAsync },
menu = { private.readRegHex, private.writeRegHexAsync },
weight = { getNumber, setNumber },
blob = { private.readRegHex, private.writeRegHexAsync },
execute = { nil, private.exReg },
bitfield = { private.readRegHex, private.writeRegHexAsync },
string_execute = { nil, private.exReg },
}
local registerReadAccessors = {
literal = private.readRegLiteral,
hex = private.readRegHex,
dec = getNumber,
}
-------------------------------------------------------------------------------
-- Type and range cogniscent register query function
-- @param reg Register to read
-- @param[opt] method Force register read using a
-- specific method. Options are 'literal', 'hex', or 'dec'.
-- @return Register's value, nil on error
-- @return Error message, nil for no error
-- @usage
-- local value = getRegister('')
function _M.getRegister(reg, method)
if method == nil then
local t, err = private.getRegType(reg)
if t == nil then
return nil, err
end
local acc = registerAccessorsByType[t]
if acc and acc[1] then
return acc[1](reg)
end
return nil, (acc == nil) and "unknown register type" or 'cannot get register'
else
local acc = registerReadAccessors[method]
if acc then
return acc(reg)
end
return nil, 'unknown method'
end
end
-------------------------------------------------------------------------------
-- Type and range congiscent register query function
-- @param reg Register to set
-- @param value Value to set register to
-- @return Register's value, nil on error
-- @return Error message, nil for no error
-- @usage
-- setRegister('', 3.14)
function _M.setRegister(reg, value)
local t, err = private.getRegType(reg)
if t == nil then
return nil, err
end
local acc = registerAccessorsByType[t]
if acc and acc[2] then
return acc[2](reg, value)
end
return (acc == nil) and "unknown register type" or 'cannot set register'
end
-------------------------------------------------------------------------------
-- Read a RIS file and send valid commands to the device
-- @param filename Name of the RIS file
-- @param calibration Set to true to rewrite calibration data. This will
-- increase the calibration count and should not be used lightly. Generally,
-- omit this argument and rely on the default behaviour of not rewriting the
-- calibration data.
-- @usage
-- device.loadRIS('myApp.RIS')
function _M.loadRIS(filename, calibration)
local file = io.open(filename, "r")
if not file then
dbg.warn('RIS file not found',filename)
return
end
local oldCRC = private.setCRCmode(calibration == true and 'crc' or '')
for line in file:lines() do
if (string.find(line, ':') and tonumber(string.sub(line, 1, 8), 16)) then
local endCh = string.sub(line, -1, -1)
if endCh ~= '\r' and endCh ~= '\n' then
line = line .. ';'
end
local _, cmd, reg, data, err = rinMsg.processMsg(line)
if err then
dbg.error('RIS error: ',err)
end
sendRegWait(cmd, reg, data)
end
end
file:close()
private.setCRCmode(oldCRC)
_M.saveSettings()
end
-- Add a timer for the heartbeat (every 5s)
timers.addTimer(5.0, 0, private.writeRegAsync, REG_HEARTBEAT, 10)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
-- Expose some internals for testing purposes
if _TEST then
private.literalToFloat = literalToFloat
private.sendRegWait = sendRegWait
end
end
| gpl-3.0 |
aquileia/wesnoth | data/ai/micro_ais/cas/ca_bottleneck_attack.lua | 4 | 3171 | local AH = wesnoth.require "ai/lua/ai_helper.lua"
local H = wesnoth.require "lua/helper.lua"
local ca_bottleneck_attack = {}
function ca_bottleneck_attack:evaluation(cfg, data)
local attackers = AH.get_units_with_attacks {
side = wesnoth.current.side,
{ "filter_adjacent", {
{ "filter_side", { { "enemy_of", {side = wesnoth.current.side} } } }
} }
}
if (not attackers[1]) then return 0 end
local max_rating, best_attacker, best_target, best_weapon = -9e99
for _,attacker in ipairs(attackers) do
local targets = wesnoth.get_units {
{ "filter_side", { { "enemy_of", { side = wesnoth.current.side } } } },
{ "filter_adjacent", { id = attacker.id } }
}
for _,target in ipairs(targets) do
local n_weapon = 0
for weapon in H.child_range(attacker.__cfg, "attack") do
n_weapon = n_weapon + 1
local att_stats, def_stats = wesnoth.simulate_combat(attacker, n_weapon, target)
local rating
-- This is an acceptable attack if:
-- 1. There is no counter attack
-- 2. Probability of death is >=67% for enemy, 0% for attacker
if (att_stats.hp_chance[attacker.hitpoints] == 1)
or ((def_stats.hp_chance[0] >= 0.67) and (att_stats.hp_chance[0] == 0))
then
rating = target.max_hitpoints + def_stats.hp_chance[0] * 100
rating = rating + att_stats.average_hp - def_stats.average_hp
-- If there's a chance to make the kill, unit closest to leveling up goes first,
-- otherwise the other way around
if (def_stats.hp_chance[0] >= 0.67) then
rating = rating + (attacker.experience - attacker.max_experience) / 10.
else
rating = rating - (attacker.experience - attacker.max_experience) / 10.
end
end
if rating and (rating > max_rating) then
max_rating = rating
best_attacker, best_target, best_weapon = attacker, target, n_weapon
end
end
end
end
if (not best_attacker) then
-- In this case we take attacks away from all units
data.BD_bottleneck_attacks_done = true
else
data.BD_bottleneck_attacks_done = false
data.BD_attacker = best_attacker
data.BD_target = best_target
data.BD_weapon = best_weapon
end
return cfg.ca_score
end
function ca_bottleneck_attack:execution(cfg, data)
if data.BD_bottleneck_attacks_done then
local units = AH.get_units_with_attacks { side = wesnoth.current.side }
for _,unit in ipairs(units) do
AH.checked_stopunit_attacks(ai, unit)
end
else
AH.checked_attack(ai, data.BD_attacker, data.BD_target, data.BD_weapon)
end
data.BD_attacker, data.BD_target, data.BD_weapon = nil, nil, nil
data.BD_bottleneck_attacks_done = nil
end
return ca_bottleneck_attack
| gpl-2.0 |
mohammad25253/seed238 | plugins/vote.lua | 83 | 2129 | do
local _file_votes = './data/votes.lua'
function read_file_votes ()
local f = io.open(_file_votes, "r+")
if f == nil then
print ('Created voting file '.._file_votes)
serialize_to_file({}, _file_votes)
else
print ('Values loaded: '.._file_votes)
f:close()
end
return loadfile (_file_votes)()
end
function clear_votes (chat)
local _votes = read_file_votes ()
_votes [chat] = {}
serialize_to_file(_votes, _file_votes)
end
function votes_result (chat)
local _votes = read_file_votes ()
local results = {}
local result_string = ""
if _votes [chat] == nil then
_votes[chat] = {}
end
for user,vote in pairs (_votes[chat]) do
if (results [vote] == nil) then
results [vote] = user
else
results [vote] = results [vote] .. ", " .. user
end
end
for vote,users in pairs (results) do
result_string = result_string .. vote .. " : " .. users .. "\n"
end
return result_string
end
function save_vote(chat, user, vote)
local _votes = read_file_votes ()
if _votes[chat] == nil then
_votes[chat] = {}
end
_votes[chat][user] = vote
serialize_to_file(_votes, _file_votes)
end
function run(msg, matches)
if (matches[1] == "ing") then
if (matches [2] == "reset") then
clear_votes (tostring(msg.to.id))
return "Voting statistics reset.."
elseif (matches [2] == "stats") then
local votes_result = votes_result (tostring(msg.to.id))
if (votes_result == "") then
votes_result = "[No votes registered]\n"
end
return "Voting statistics :\n" .. votes_result
end
else
save_vote(tostring(msg.to.id), msg.from.print_name, tostring(tonumber(matches[2])))
return "Vote registered : " .. msg.from.print_name .. " " .. tostring(tonumber(matches [2]))
end
end
return {
description = "Plugin for voting in groups.",
usage = {
"!voting reset: Reset all the votes.",
"!vote [number]: Cast the vote.",
"!voting stats: Shows the statistics of voting."
},
patterns = {
"^!vot(ing) (reset)",
"^!vot(ing) (stats)",
"^!vot(e) ([0-9]+)$"
},
run = run
}
end
| gpl-2.0 |
Nathan22Miles/sile | languages/pl.lua | 4 | 42908 | SILE.hyphenator.languages["pl"] = {};
SILE.hyphenator.languages["pl"].patterns =
{
".ćć8",
".ćł8",
".ćń8",
".ćś8",
".ćź8",
".ćż8",
".ć8",
".ćb8",
".ćc8",
".ćd8",
".ćf8",
".ćg8",
".ćh8",
".ćj8",
".ćk8",
".ćl8",
".ćm8",
".ćn8",
".ćp8",
".ćr8",
".ćs8",
".ćt8",
".ćv8",
".ćw8",
".ćwier2ć3",
".ćx8",
".ćz8",
".łć8",
".łł8",
".łń8",
".łś8",
".łź8",
".łż8",
".ł8",
".łb8",
".łc8",
".łd8",
".łf8",
".łg8",
".łh8",
".łj8",
".łk8",
".łl8",
".łm8",
".łn8",
".łp8",
".łr8",
".łs8",
".łt8",
".łv8",
".łw8",
".łx8",
".łz8",
".ńć8",
".ńł8",
".ńń8",
".ńś8",
".ńź8",
".ńż8",
".ń8",
".ńb8",
".ńc8",
".ńd8",
".ńf8",
".ńg8",
".ńh8",
".ńj8",
".ńk8",
".ńl8",
".ńm8",
".ńn8",
".ńp8",
".ńr8",
".ńs8",
".ńt8",
".ńv8",
".ńw8",
".ńx8",
".ńz8",
".ść8",
".śł8",
".śń8",
".śś8",
".śź8",
".śż8",
".ś8",
".śb8",
".śc8",
".śd8",
".śf8",
".śg8",
".śh8",
".śj8",
".śk8",
".śl8",
".śm8",
".śn8",
".śp8",
".śró2d5",
".śródr2",
".śr8",
".śs8",
".śt8",
".śv8",
".św8",
".światło3w2",
".śx8",
".śz8",
".źć8",
".źł8",
".źń8",
".źś8",
".źź8",
".źż8",
".ź8",
".źb8",
".źc8",
".źdź8",
".źd8",
".źf8",
".źg8",
".źh8",
".źj8",
".źk8",
".źl8",
".źm8",
".źn8",
".źp8",
".źr8",
".źs8",
".źt8",
".źv8",
".źw8",
".źx8",
".źz8",
".żć8",
".żł8",
".żń8",
".żś8",
".żź8",
".żż8",
".ż8",
".żb8",
".żc8",
".żd8",
".żf8",
".żg8",
".żh8",
".żj8",
".żk8",
".żl8",
".żm8",
".żn8",
".żp8",
".żr8",
".żs8",
".żt8",
".żv8",
".żw8",
".żx8",
".żz8",
".a2b2s3t",
".a2d3",
".ad4a",
".ad4e",
".ad4i",
".ad4o",
".ad4u",
".ad4y",
".ad5apt",
".ad5iu",
".ad5op",
".ad5or",
".ae3ro",
".aeroa2",
".aeroe2",
".aeroi2",
".aeroo2",
".aerou2",
".antya2",
".antye2",
".antyi2",
".antyo2",
".antyu2",
".arcy3ł2",
".arcy3b2",
".arcy3bz2",
".arcy3k2",
".arcy3m2",
".arcya2",
".arcye2",
".arcyi2",
".arcyo2",
".arcyu2",
".au3g2",
".au3k2",
".au3t2",
".auto3ch2",
".autoa2",
".autoe2",
".autoi2",
".autoo2",
".autotran2s3",
".autou2",
".bć8",
".bł8",
".bń8",
".bś8",
".bź8",
".bż8",
".b8",
".bb8",
".bc8",
".bd8",
".be2z3",
".be3z4an",
".be3z4ec",
".be3z4ik",
".bezch2",
".bezm2",
".bezo2",
".bezo2b1j",
".bezw2",
".bezzw2",
".bf8",
".bg8",
".bh8",
".bj8",
".bk8",
".bl8",
".bm8",
".bn8",
".bp8",
".br8",
".brz8",
".bs8",
".bt8",
".bv8",
".bw8",
".bx8",
".bz8",
".cć8",
".cł8",
".cń8",
".cś8",
".cź8",
".cż8",
".c8",
".cało3ś2",
".cało3k2",
".cb8",
".cc8",
".cd8",
".cf8",
".cg8",
".ch8",
".chrz8",
".cienko3w2",
".ciepło3kr2",
".cj8",
".ck8",
".cl8",
".cm8",
".cn8",
".cp8",
".cr8",
".cs8",
".ct8",
".cv8",
".cw8",
".cx8",
".cz8",
".czarno3k2",
".czk8",
".cztere2ch3",
".czterechse2t3",
".cztero3ś2",
".czwó2r3",
".czwó3r4ą",
".czwó3r4ę",
".czwó3r4a",
".czwó3r4e",
".czwó3r4o",
".dć8",
".dł8",
".długo3tr2",
".długo3w2",
".dń8",
".dś8",
".dź8",
".dż8",
".d8",
".daleko3w2",
".db8",
".dc8",
".dd8",
".de2z3",
".de3z4a3bil",
".de3z4a3wu",
".de3z4el",
".de3z4er",
".de3z4y",
".deza2",
".dezo2",
".df8",
".dg8",
".dh8",
".dj8",
".dk8",
".dl8",
".dm8",
".dn8",
".do3ć2",
".do3ł2",
".do3ś2",
".do3ź2",
".do3ż2",
".do3b2",
".do3c2",
".do3d2",
".do3f2",
".do3g2",
".do3h2",
".do3k2",
".do3l2",
".do3m2",
".do3p2",
".do3r2",
".do3s2",
".do3t2",
".do3w2",
".do3z2",
".do4ł3k",
".do4k3t",
".do4l3n",
".do4m3k",
".do4r3s",
".do4w3c",
".do5m4k2n",
".dobr2",
".dobrz2",
".doch2",
".docz2",
".dodź2",
".dodż2",
".dodz2",
".dogrz2",
".dopch2",
".doprz2",
".dorż2",
".dorz2",
".dosch2",
".dosm2",
".dosz2",
".dotk2",
".dotr2",
".dp8",
".dr8",
".drogo3w2",
".drz8",
".ds8",
".dt8",
".dv8",
".dwó2j3",
".dwó3j4ą",
".dwó3j4ę",
".dwó3j4a",
".dwó3j4e",
".dwó3j4o",
".dw8",
".dx8",
".dy2s3",
".dy2z3",
".dy3s4e",
".dy3s4o",
".dy3s4ta",
".dy3s4y",
".dy3sz",
".dy3z4e",
".dyzu2",
".dz8",
".dziesięcio3ś2",
".dziewięćse2t3",
".dziewię2ć3",
".dziewięcio3ś2",
".e2k2s3",
".e2m3e2s5ze2t",
".e2s1e2s1ma",
".e2s1ha",
".e2s1t",
".egoa2",
".egoe2",
".egoi2",
".egoo2",
".egou2",
".eks4y",
".elektroa2",
".elektroe2",
".elektroi2",
".elektroo2",
".elektrou2",
".fć8",
".fł8",
".fń8",
".fś8",
".fź8",
".fż8",
".f8",
".fb8",
".fc8",
".fd8",
".ff8",
".fg8",
".fh8",
".fj8",
".fk8",
".fl8",
".fm8",
".fn8",
".fp8",
".fr8",
".fs8",
".ft8",
".fv8",
".fw8",
".fx8",
".fz8",
".gć8",
".gł8",
".gń8",
".gś8",
".gź8",
".gż8",
".g8",
".gb8",
".gc8",
".gd8",
".ge2o3",
".gf8",
".gg8",
".gh8",
".gj8",
".gk8",
".gl8",
".gm8",
".gn8",
".go2u3",
".gp8",
".gr8",
".grubo3w2",
".grz8",
".gs8",
".gt8",
".gv8",
".gw8",
".gx8",
".gz8",
".hć8",
".hł8",
".hń8",
".hś8",
".hź8",
".hż8",
".h8",
".hb8",
".hc8",
".hd8",
".hf8",
".hg8",
".hh8",
".hipe2r3",
".hipe3r4o",
".hipera2",
".hipere2",
".hj8",
".hk8",
".hl8",
".hm8",
".hn8",
".hp8",
".hr8",
".hs8",
".ht8",
".hv8",
".hw8",
".hx8",
".hz8",
".i2n3",
".i2s3l",
".i3n4ic",
".i3n4o",
".i3n4u",
".i4n5o2k",
".in4f3lan",
".ino3w2",
".izoa2",
".izoe2",
".izoi2",
".izoo2",
".izou2",
".jć8",
".jł8",
".jń8",
".jś8",
".jź8",
".jż8",
".j8",
".jadło3w2",
".jb8",
".jc8",
".jd8",
".jf8",
".jg8",
".jh8",
".jj8",
".jk8",
".jl8",
".jm8",
".jn8",
".jp8",
".jr8",
".js8",
".jt8",
".jv8",
".jw8",
".jx8",
".jz8",
".kć8",
".kł8",
".kń8",
".kś8",
".kź8",
".kż8",
".k8",
".kb8",
".kc8",
".kd8",
".kf8",
".kg8",
".kh8",
".kilkuse2t3",
".kilkuseto2",
".kj8",
".kk8",
".kl8",
".km8",
".kn8",
".koło3w2",
".kon2t2r3",
".kon3tr4a",
".kon3tr4e",
".kon3tr4o3l",
".kon3tr4o3w",
".kon3tr4y",
".kon4tr5a2gi",
".kon4tr5a2se",
".kon4tr5a2sy",
".kon4tr5a2ta",
".kon4tr5adm",
".kon4tr5akc",
".kon4tr5alt",
".kon4tr5arg",
".kontro2",
".kontru2",
".kp8",
".krótko3tr2",
".krótko3w2",
".kr8",
".kro2ć3",
".krz8",
".ks8",
".kt8",
".kv8",
".kw8",
".kx8",
".kz8",
".lć8",
".lł8",
".lń8",
".lś8",
".lź8",
".lż8",
".l8",
".lb8",
".lc8",
".ld8",
".lf8",
".lg8",
".lh8",
".lj8",
".lk8",
".ll8",
".lm8",
".ln8",
".lp8",
".lr8",
".ls8",
".lt8",
".ludo3w2",
".lv8",
".lw8",
".lx8",
".lz8",
".mć8",
".mł8",
".mń8",
".mś8",
".mź8",
".mż8",
".m8",
".mb8",
".mc8",
".md8",
".mf8",
".mg8",
".mh8",
".mili3amp",
".mj8",
".mk8",
".ml8",
".mm8",
".mn8",
".możno3w2",
".mp8",
".mr8",
".ms8",
".mt8",
".mv8",
".mw8",
".mx8",
".mz8",
".nć8",
".nł8",
".nń8",
".nś8",
".nź8",
".nż8",
".n8",
".na2d2",
".na2j",
".na3ć2",
".na3ł2",
".na3ś2",
".na3ź2",
".na3ż2",
".na3b2",
".na3c2",
".na3dą",
".na3dę",
".na3dź2",
".na3d4łub",
".na3d4ir",
".na3d4much",
".na3d4ręcz",
".na3d4r2w",
".na3d4repcz",
".na3d4rept",
".na3d4ruk",
".na3d4rz",
".na3d4worn",
".na3daj",
".na3de",
".na3do",
".na3dy",
".na3dzi",
".na3f2",
".na3g2",
".na3h2",
".na3ją",
".na3ję",
".na3jazd",
".na3je",
".na3k2",
".na3l2",
".na3m2",
".na3p2",
".na3r2",
".na3s2",
".na3t2",
".na3u2",
".na3w2",
".na3z2",
".na4d3o2b2ł",
".na4d3o2bojcz",
".na4d3o2bowi",
".na4d3o2brot",
".na4d3o2drz",
".na4d3o2kien",
".na4d3olbrz",
".na4d5rzą",
".na4d5rzę",
".na4d5rzecz",
".na4d5rzy",
".na4d5ziem",
".na4f3c",
".na4f3t",
".na4j3e2f",
".na4j3e2g",
".na4j3e2k2s",
".na4j3e2ko",
".na4j3e2n",
".na4j3e2r",
".na4j3e2s",
".na4j3e2w",
".na4j3emf",
".na4j3eu",
".na4r3c",
".na4r3d",
".na4r3k",
".na4r3r",
".na4r3t",
".nabrz2",
".nach2",
".nacz2",
".nadśrod5ziem",
".nad3ć2",
".nad3ł2",
".nad3ś2",
".nad3b2",
".nad3c2",
".nad3d2",
".nad3e2tat",
".nad3f2",
".nad3g2",
".nad3h2",
".nad3i2",
".nad3j2",
".nad3k2",
".nad3l2",
".nad3m2",
".nad3n2",
".nad3p2",
".nad3r2",
".nad3s2",
".nad3t2",
".nad3u2",
".nad3w2",
".nad5ż2",
".nad5zó",
".nad5z2mys",
".nad5zo",
".nad5zwycz",
".nadch2",
".nadcz2",
".naddź2",
".nade3ć2",
".nade3ł2",
".nade3ś2",
".nade3ź2",
".nade3ż2",
".nade3b2",
".nade3c2",
".nade3d2",
".nade3f2",
".nade3g2",
".nade3h2",
".nade3k2",
".nade3l2",
".nade3m2",
".nade3p2",
".nade3r2",
".nade3s2",
".nade3t2",
".nade3w2",
".nade3z2",
".nade4p3c",
".nade4p3n",
".nade4p3t",
".nadech2",
".nadecz2",
".nadedź2",
".nadedż2",
".nadedz2",
".naderż2",
".naderz2",
".nadesz2",
".nadsz2",
".nadtr2",
".nadz2",
".nagrz2",
".naj3ć2",
".naj3ł2",
".naj3ś2",
".naj3ź2",
".naj3ż2",
".naj3akt",
".naj3au",
".naj3b2",
".naj3c2",
".naj3d2",
".naj3f2",
".naj3g2",
".naj3h2",
".naj3i2",
".naj3k2",
".naj3l2",
".naj3m2",
".naj3o2",
".naj3o2ć2",
".naj3o2ł2",
".naj3o2ś2",
".naj3o2ź2",
".naj3o2ż2",
".naj3o2b2",
".naj3o2c2",
".naj3o2d2",
".naj3o2f2",
".naj3o2g2",
".naj3o2h2",
".naj3o2k2",
".naj3o2l2",
".naj3o2m2",
".naj3o2p2",
".naj3o2r2",
".naj3o2s2",
".naj3o2t2",
".naj3o2w2",
".naj3o2z2",
".naj3p2",
".naj3r2",
".naj3ro2z3",
".naj3s2",
".naj3t2",
".naj3u2",
".naj3w2",
".naj3z2",
".najbe2z3",
".najbezw2",
".najch2",
".najcz2",
".najdź2",
".najdż2",
".najdo3ć2",
".najdo3ł2",
".najdo3ś2",
".najdo3ź2",
".najdo3ż2",
".najdo3b2",
".najdo3c2",
".najdo3d2",
".najdo3f2",
".najdo3g2",
".najdo3h2",
".najdo3k2",
".najdo3l2",
".najdo3m2",
".najdo3p2",
".najdo3r2",
".najdo3s2",
".najdo3t2",
".najdo3w2",
".najdo3z2",
".najdoch2",
".najdocz2",
".najdodź2",
".najdodż2",
".najdodz2",
".najdorz2",
".najdosz2",
".najdotk2",
".najdz2",
".najkr2",
".najob3ć2",
".najob3ł2",
".najob3ś2",
".najob3ź2",
".najob3ż2",
".najob3c2",
".najob3d2",
".najob3f2",
".najob3g2",
".najob3h2",
".najob3j2",
".najob3k2",
".najob3l2",
".najob3m2",
".najob3n2",
".najob3p2",
".najob3s2",
".najob3t2",
".najob3w2",
".najobch2",
".najobcz2",
".najobdź2",
".najobdż2",
".najobdz2",
".najobrz2",
".najobsz2",
".najoch2",
".najocz2",
".najodź2",
".najod3ć2",
".najod3ś2",
".najod3c2",
".najod3d2",
".najod3f2",
".najod3g2",
".najod3h2",
".najod3j2",
".najod3k2",
".najod3l2",
".najod3m2",
".najod3n2",
".najod3p2",
".najod3s2",
".najod3t2",
".najod3w2",
".najod5ż2",
".najodch2",
".najodcz2",
".najoddź2",
".najoddż2",
".najoddz2",
".najodsz2",
".najodz2",
".najorz2",
".najosz2",
".najro3z4u",
".najrz2",
".najsm2",
".najsz2",
".najtk2",
".najtr2",
".najucz2",
".najzw2",
".nakr2",
".napo2d2",
".napo3ć2",
".napo3ł2",
".napo3ś2",
".napo3ź2",
".napo3ż2",
".napo3b2",
".napo3c2",
".napo3f2",
".napo3g2",
".napo3h2",
".napo3k2",
".napo3l2",
".napo3m2",
".napo3p2",
".napo3r2",
".napo3s2",
".napo3t2",
".napo3w2",
".napo3z2",
".napo4m3p",
".napoch2",
".napocz2",
".napodź2",
".napodż2",
".napod3d",
".napomk2",
".naporz2",
".naposz2",
".naprz2",
".narż2",
".naro2z3",
".narz2",
".nasm2",
".nasz2",
".natch2",
".natk2",
".naz3m2",
".nazw2",
".nb8",
".nc8",
".nd8",
".ne2o3",
".nf8",
".ng8",
".nh8",
".nie3ć2",
".nie3ł2",
".nie3ś2",
".nie3ź2",
".nie3ż2",
".nie3b2",
".nie3c2",
".nie3d2",
".nie3f2",
".nie3g2",
".nie3h2",
".nie3k2",
".nie3l2",
".nie3m2",
".nie3p2",
".nie3r2",
".nie3s2",
".nie3t2",
".nie3u2",
".nie3w2",
".nie3z2",
".nie4c3c",
".nie4c3k",
".nie4dź3",
".nie4m3c",
".nie4m3k",
".niech2",
".niecz2",
".niedż2",
".niedo3ć2",
".niedo3ł2",
".niedo3ś2",
".niedo3ź2",
".niedo3ż2",
".niedo3b2",
".niedo3c2",
".niedo3d2",
".niedo3f2",
".niedo3g2",
".niedo3h2",
".niedo3k2",
".niedo3l2",
".niedo3m2",
".niedo3p2",
".niedo3r2",
".niedo3s2",
".niedo3t2",
".niedo3w2",
".niedo3z2",
".niedobrz2",
".niedoch2",
".niedocz2",
".niedodź2",
".niedodż2",
".niedodz2",
".niedokr2",
".niedomk2",
".niedopch2",
".niedorz2",
".niedosz2",
".niedotk2",
".niedz2",
".nieoć2",
".nieoł2",
".nieoś2",
".nieoź2",
".nieoż2",
".nieo2",
".nieob2",
".nieob3ć2",
".nieob3ś2",
".nieob3ź2",
".nieob3ż2",
".nieob3c2",
".nieob3d2",
".nieob3f2",
".nieob3g2",
".nieob3h2",
".nieob3j2",
".nieob3k2",
".nieob3m2",
".nieob3p2",
".nieob3s2",
".nieob3w2",
".nieobch2",
".nieobcz2",
".nieobdź2",
".nieobdż2",
".nieobdz2",
".nieobsz2",
".nieoc2",
".nieoch2",
".nieocz2",
".nieodź2",
".nieod2",
".nieod3ć2",
".nieod3ł2",
".nieod3ś2",
".nieod3c2",
".nieod3d2",
".nieod3f2",
".nieod3g2",
".nieod3h2",
".nieod3j2",
".nieod3k2",
".nieod3l2",
".nieod3n2",
".nieod3p2",
".nieod3s2",
".nieod3t2",
".nieod3wr",
".nieod5ż2",
".nieodch2",
".nieodcz2",
".nieoddź2",
".nieoddż2",
".nieoddz2",
".nieodsz2",
".nieodw2",
".nieodz2",
".nieof2",
".nieog2",
".nieoh2",
".nieok2",
".nieol2",
".nieom2",
".nieop2",
".nieor2",
".nieorz2",
".nieos2",
".nieosz2",
".nieot2",
".nieow2",
".nieoz2",
".niepo2d2",
".niepo3ć2",
".niepo3ł2",
".niepo3ś2",
".niepo3ź2",
".niepo3ż2",
".niepo3b2",
".niepo3c2",
".niepo3dź2",
".niepo3d4łu",
".niepo3d4much",
".niepo3d4ręcz",
".niepo3d4raż",
".niepo3d4rap",
".niepo3d4repcz",
".niepo3d4rept",
".niepo3d4waj",
".niepo3d4woj",
".niepo3do",
".niepo3du",
".niepo3dz2",
".niepo3f2",
".niepo3g2",
".niepo3h2",
".niepo3k2",
".niepo3l2",
".niepo3m2",
".niepo3p2",
".niepo3r2",
".niepo3s2",
".niepo3t2",
".niepo3w2",
".niepo3z2",
".niepo4d3o2choc",
".niepo4d3o2strz",
".niepoch2",
".niepocz2",
".niepod3ć2",
".niepod3ł2",
".niepod3ś2",
".niepod3b2",
".niepod3c2",
".niepod3d2",
".niepod3f2",
".niepod3g2",
".niepod3h2",
".niepod3j2",
".niepod3k2",
".niepod3l2",
".niepod3m2",
".niepod3n2",
".niepod3p2",
".niepod3r2",
".niepod3s2",
".niepod3t2",
".niepod3w2",
".niepod5ż",
".niepodch2",
".niepodcz2",
".niepoddź2",
".niepoddż2",
".niepodsm2",
".niepodsz2",
".nieporz2",
".nieposm2",
".nieposz2",
".nieprzełk2",
".nieprze2d2",
".nieprze3ć2",
".nieprze3ł2",
".nieprze3ś2",
".nieprze3ź2",
".nieprze3ż2",
".nieprze3b2",
".nieprze3brz2",
".nieprze3c2",
".nieprze3dź2",
".nieprze3d4łuż",
".nieprze3d4much",
".nieprze3d4ramat",
".nieprze3d4ruk",
".nieprze3d4ryl",
".nieprze3d4rz2",
".nieprze3d4um",
".nieprze3dy",
".nieprze3dz2",
".nieprze3e2k2s3",
".nieprze3f2",
".nieprze3g2",
".nieprze3h2",
".nieprze3k2",
".nieprze3l2",
".nieprze3m2",
".nieprze3n2",
".nieprze3p2",
".nieprze3r2",
".nieprze3s2",
".nieprze3t2",
".nieprze3w2",
".nieprze3z2",
".nieprze4d5łużyc",
".nieprze4d5ż2",
".nieprze4d5z2a",
".nieprze4d5zg2",
".nieprze4d5zim",
".nieprze4d5zj",
".nieprze4d5zl",
".nieprze4d5zw2r",
".nieprze4d5zwoj",
".nieprzech2",
".nieprzecz2",
".nieprzed3ć2",
".nieprzed3ł2",
".nieprzed3ś2",
".nieprzed3c2",
".nieprzed3d2",
".nieprzed3f2",
".nieprzed3g2",
".nieprzed3h2",
".nieprzed3i2",
".nieprzed3j2",
".nieprzed3k2",
".nieprzed3l2",
".nieprzed3m2",
".nieprzed3n2",
".nieprzed3p2",
".nieprzed3r2",
".nieprzed3s2",
".nieprzed3sz2",
".nieprzed3t2",
".nieprzed3u2",
".nieprzed3w2",
".nieprzedch2",
".nieprzedcz2",
".nieprzeddź2",
".nieprzeddż2",
".nieprzeddz2",
".nieprzegrz2",
".nieprzekl2",
".nieprzekr2",
".nieprzepch2",
".nieprzerż2",
".nieprzerz2",
".nieprzesch2",
".nieprzesm2",
".nieprzesz2",
".nieprzetk2",
".nieprzetr2",
".niero2z3",
".niero3z4e",
".niero3z4u",
".nierozś2",
".nierozbrz2",
".nieroze3r2",
".nierozm2",
".nieroztr2",
".nierz2",
".niesu2b3",
".niesu3b4ie",
".niesz2",
".nietk2",
".nietr2",
".nieucz2",
".nieuw2",
".niewy3ć2",
".niewy3ł2",
".niewy3ś2",
".niewy3ź2",
".niewy3ż2",
".niewy3b2",
".niewy3c2",
".niewy3d2",
".niewy3f2",
".niewy3g2",
".niewy3h2",
".niewy3k2",
".niewy3l2",
".niewy3m2",
".niewy3p2",
".niewy3r2",
".niewy3s2",
".niewy3t2",
".niewy3w2",
".niewy3z2",
".niewybrz2",
".niewych2",
".niewycz2",
".niewydź2",
".niewydż2",
".niewydz2",
".niewyrz2",
".niewysz2",
".niewytk2",
".niewytr2",
".niezw2",
".nj8",
".nk8",
".nl8",
".nm8",
".nn8",
".np8",
".nr8",
".ns8",
".nt8",
".nv8",
".nw8",
".nx8",
".nz8",
".oć2",
".oś2",
".ośmio3ś2",
".oź2",
".oż2",
".o2b2",
".o2d2",
".o2t3chł",
".o3b4łą",
".o3b4łę",
".o3b4łoc",
".o3b4luzg",
".o3b4rać",
".o3b4raso",
".o3b4roń",
".o3b4ron",
".o3b4ryź",
".o3b4ryz",
".o3b4rz2",
".o3be",
".o3bi",
".o3d4iu",
".o3d4ręt",
".o3d4rap",
".o3d4robin",
".o3d4rut",
".o3d4rwi",
".o3d4rzeć",
".o3d4rzw",
".o3d6zia",
".o3d6zie",
".o3de",
".o3l2śn",
".o4b5łocz",
".o4b5rzą",
".o4b5rzęd",
".o4b5rzez",
".o4b5rzuc",
".o4b5rzut",
".o4b5rzyn",
".o4d7ziar",
".o4d7ziem",
".oa3z",
".ob3ć2",
".ob3ł2",
".ob3ś2",
".ob3ź2",
".ob3ż2",
".ob3c2",
".ob3d2",
".ob3f2",
".ob3g2",
".ob3h2",
".ob3j2",
".ob3k2",
".ob3l2",
".ob3m2",
".ob3n2",
".ob3o2strz",
".ob3p2",
".ob3r",
".ob3s2",
".ob3t2",
".ob3u2m2",
".ob3w2",
".obch2",
".obcz2",
".obdź2",
".obdż2",
".obdz2",
".obe3ć2",
".obe3ł2",
".obe3ś2",
".obe3ź2",
".obe3ż2",
".obe3b2",
".obe3c2",
".obe3d2",
".obe3f2",
".obe3g2",
".obe3h2",
".obe3k2",
".obe3l2",
".obe3m2",
".obe3p2",
".obe3r2",
".obe3r3t",
".obe3s2",
".obe3t2",
".obe3w2",
".obe3z2",
".obe4c3n",
".obe4z3w",
".obech2",
".obecz2",
".obedź2",
".obedż2",
".obedz2",
".oberż2",
".ober3m",
".oberz2",
".obesch2",
".obesz2",
".obetk2",
".obi3b2",
".obsz2",
".oc2",
".och2",
".ochrz2",
".ocz2",
".odź2",
".od3ć2",
".od3ś2",
".od3au",
".od3b2",
".od3c2",
".od3d2",
".od3f2",
".od3g2",
".od3h2",
".od3i2",
".od3i2zo",
".od3j2",
".od3k2",
".od3l2",
".od3m2",
".od3n2",
".od3o2s",
".od3p2",
".od3r2",
".od3s2",
".od3t2",
".od3u2cz",
".od3u2m2",
".od3w2",
".od5ż2",
".od5z2",
".odbe2z3",
".odch2",
".odcz2",
".oddź2",
".oddż2",
".oddz2",
".ode3ć2",
".ode3ł2",
".ode3ś2",
".ode3ź2",
".ode3ż2",
".ode3b2",
".ode3c2",
".ode3d2",
".ode3f2",
".ode3g2",
".ode3h2",
".ode3k2",
".ode3l2",
".ode3m2",
".ode3mk2",
".ode3p2",
".ode3r2",
".ode3s2",
".ode3t2",
".ode3w2",
".ode3z2",
".odech2",
".odecz2",
".odedź2",
".odedż2",
".odedz2",
".odepch2",
".oderż2",
".oderz2",
".odesz2",
".odetch2",
".odetk2",
".odkrz2",
".odrz2",
".odsz2",
".of2",
".ogólno3k2",
".og2",
".ognio3tr2",
".oh2",
".ok2",
".oka3m2",
".okr2",
".ole2o3",
".om2",
".op2",
".opch2",
".or2ż2",
".or2tę",
".or2z2",
".os2",
".osie2m3",
".osiemse2t3",
".osz2",
".ot2",
".ow2",
".oz2",
".pć8",
".pł8",
".płasko3w2",
".pń8",
".półk2",
".półkr2",
".półm2",
".póło2",
".półob3r",
".półom2d",
".półprzy3m2k",
".pó2ł3",
".pó3ł4ą",
".pó3ł4ę",
".pó3ł4ecz",
".pó3ł4y",
".pś8",
".pź8",
".pż8",
".p8",
".pb8",
".pc8",
".pch8",
".pd8",
".pełno3kr2",
".pe2r3",
".pe3c2k",
".pe3r4e",
".pe3r4i",
".pe3r4o",
".pe3r4u",
".pe3r4y",
".pe4r5i2n",
".pee2se2l",
".pepee2r",
".pepee2s",
".peze2t1pee2r",
".pf8",
".pg8",
".ph8",
".pięćse2t3",
".pię2ć3",
".pięcio3ś2",
".pierwo3w2",
".piono3w2",
".pj8",
".pk8",
".pl8",
".pm8",
".pn8",
".połk2",
".po2d2",
".po3ć2",
".po3ł2",
".po3ś2",
".po3ź2",
".po3ż2",
".po3b2",
".po3c2",
".po3dą",
".po3dę",
".po3dź2",
".po3d4łu",
".po3d4much",
".po3d4naw",
".po3d4ręcz",
".po3d4rętw",
".po3d4róż",
".po3d4r2wi",
".po3d4raż",
".po3d4rap",
".po3d4repcz",
".po3d4rept",
".po3d4roż",
".po3d4robó",
".po3d4roba",
".po3d4robo",
".po3d4roby",
".po3d4rocz",
".po3d4ruzg",
".po3d4ryg",
".po3d4rze",
".po3d4wójn",
".po3d4wór",
".po3d4waj",
".po3d4woi",
".po3d4woj",
".po3d4worz",
".po3da",
".po3de",
".po3dej",
".po3diu",
".po3do",
".po3du",
".po3dy",
".po3dz2",
".po3e2k2s3",
".po3f2",
".po3g2",
".po3h2",
".po3k2",
".po3l2",
".po3m2",
".po3p2",
".po3rż",
".po3r2",
".po3s2",
".po3t2",
".po3w2",
".po3z2",
".po4ń3c",
".po4cz3d",
".po4cz3t",
".po4d3ów",
".po4d3e4k2s3",
".po4d3o2bóz",
".po4d3o2biad",
".po4d3o2bojcz",
".po4d3o2braz",
".po4d3o2choc",
".po4d3o2dm",
".po4d3o2f",
".po4d3o2g",
".po4d3o2kien",
".po4d3o2kn",
".po4d3o2kręg",
".po4d3o2kres",
".po4d3o2piecz",
".po4d3o2ryw",
".po4d3o2siniak",
".po4d3o2strz",
".po4d3obsz",
".po4d3odd",
".po4d3olbrz",
".po4d3u2cz",
".po4d3u2dz",
".po4d3u2pa",
".po4d3u2ral",
".po4d3u2sta",
".po4d3u2szcz",
".po4d5ręczn",
".po4d5zakr",
".po4d5zam",
".po4d5zast",
".po4d5zbi",
".po4d5ze",
".po4d5zielenią",
".po4d5zielenić",
".po4d5zielenię",
".po4d5zielenił",
".po4d5zielenic",
".po4d5zielenien",
".po4d5zielenil",
".po4d5zielenim",
".po4d5zielenio",
".po4d5zielenis",
".po4d5ziem",
".po4d5ziom",
".po4d5zw2r",
".po4l3s",
".po4m3p",
".po4r3c",
".po4r3f",
".po4r3n",
".po4r3t",
".po4st3d",
".po4st3f",
".po4st3g",
".po4st3h",
".po4st3i2",
".po4st3k",
".po4st3l",
".po4st3m",
".po4st3p",
".po4st3rom",
".po4st3s",
".po5d4uszczyn",
".po5r4tę",
".pobr2",
".pobrz2",
".poch2",
".pochrz2",
".pocz2",
".pod3ć2",
".pod3ł2",
".pod3ś2",
".pod3śró2d5",
".pod3alp",
".pod3b2",
".pod3c2",
".pod3d2",
".pod3f2",
".pod3g2",
".pod3h2",
".pod3i2n",
".pod3j2",
".pod3k2",
".pod3l2",
".pod3m2",
".pod3n2",
".pod3p2",
".pod3r2",
".pod3s2",
".pod3t2",
".pod3w2",
".pod5ż2",
".podch2",
".podcz2",
".poddź2",
".poddż2",
".pode3ć2",
".pode3ł2",
".pode3ś2",
".pode3ź2",
".pode3ż2",
".pode3b2",
".pode3c2",
".pode3d2",
".pode3f2",
".pode3g2",
".pode3h2",
".pode3k2",
".pode3l2",
".pode3m2",
".pode3p2",
".pode3r2",
".pode3s2",
".pode3t2",
".pode3tk2",
".pode3w2",
".pode3z2",
".podech2",
".podecz2",
".podedź2",
".podedż2",
".podedz2",
".podepch2",
".poderż2",
".poderz2",
".podesch2",
".podesz2",
".podro2z3",
".podsm2",
".podsz2",
".pogrz2",
".pokl2",
".pokr2",
".pom4pk",
".pomk2",
".pona2d2",
".pona3ć2",
".pona3ł2",
".pona3ś2",
".pona3ź2",
".pona3ż2",
".pona3b2",
".pona3c2",
".pona3cz2",
".pona3dź2",
".pona3do",
".pona3f2",
".pona3g2",
".pona3h2",
".pona3k2",
".pona3l2",
".pona3m2",
".pona3p2",
".pona3r2",
".pona3s2",
".pona3t2",
".pona3w2",
".pona3z2",
".pona4f3t",
".ponabrz2",
".ponach2",
".ponad3ć2",
".ponad3ś2",
".ponad3c2",
".ponad3ch2",
".ponad3cz2",
".ponad3dź2",
".ponad3f2",
".ponad3g2",
".ponad3h2",
".ponad3j2",
".ponad3k2",
".ponad3l2",
".ponad3p2",
".ponad3s2",
".ponad3t2",
".ponadz2",
".ponarz2",
".ponasm2",
".ponasz2",
".ponaz3m2",
".ponazw2",
".ponie3k2",
".ponie3w2",
".popch2",
".popo3w2",
".poprz2",
".por4t1w",
".por4tf",
".por4tm",
".poro2z3",
".poro3z4u",
".porz2",
".posch2",
".posm2",
".posz2",
".potk2",
".potr2",
".poz4m2",
".poza3u2",
".pozw2",
".pp8",
".pr8",
".pra3s2",
".pra3w2nu",
".pra3w2z",
".prapra3w2nu",
".predy2s3po",
".prz8",
".przełk2",
".prze2d2",
".prze3ć2",
".prze3ł2",
".prze3ś2",
".prze3ź2",
".prze3ż2",
".prze3b2",
".prze3c2",
".prze3dą",
".prze3dę",
".prze3dź2",
".prze3d4łuż",
".prze3d4much",
".prze3d4o3br",
".prze3d4o3st",
".prze3d4o3zo",
".prze3d4ramat",
".prze3d4ruk",
".prze3d4ryl",
".prze3d4rz2",
".prze3d4um",
".prze3dy",
".prze3dz2",
".prze3e2k2s3",
".prze3f2",
".prze3g2",
".prze3h2",
".prze3k2",
".prze3l2",
".prze3m2",
".prze3n2",
".prze3p2",
".prze3r2",
".prze3s2",
".prze3t2",
".prze3u2",
".prze3w2",
".prze3z2",
".prze4d5łużyc",
".prze4d5ż2",
".prze4d5o4stat",
".prze4d5za",
".prze4d5zg2",
".prze4d5zim",
".prze4d5zj",
".prze4d5zl",
".prze4d5zw2r",
".prze4d5zwoj",
".przebr2",
".przebrz2",
".przech2",
".przechrz2",
".przeci2w3",
".przeci3w4ie",
".przeciwa2",
".przeciww2",
".przecz2",
".przed3ć2",
".przed3ł2",
".przed3ś2",
".przed3a2gon",
".przed3a2kc",
".przed3alp",
".przed3b2",
".przed3c2",
".przed3d2",
".przed3e2gz",
".przed3e2mer",
".przed3f2",
".przed3g2",
".przed3h2",
".przed3i2",
".przed3j2",
".przed3k2",
".przed3l2",
".przed3m2",
".przed3n2",
".przed3o2",
".przed3p2",
".przed3r2",
".przed3s2",
".przed3się3w2",
".przed3sz2",
".przed3t2",
".przed3u2",
".przed3w2",
".przedch2",
".przedcz2",
".przeddź2",
".przeddż2",
".przeddz2",
".przedgrz2",
".przedy2s3ku",
".przegrz2",
".przekl2",
".przekr2",
".przemk2",
".przepch2",
".przerż2",
".przerz2",
".przesch2",
".przesm2",
".przesz2",
".przetk2",
".przetr2",
".przetran2s3",
".przy3ć2",
".przy3ł2",
".przy3ś2",
".przy3ź2",
".przy3ż2",
".przy3b2",
".przy3c2",
".przy3d2",
".przy3f2",
".przy3g2",
".przy3h2",
".przy3k2",
".przy3l2",
".przy3m2",
".przy3p2",
".przy3r2",
".przy3s2",
".przy3t2",
".przy3w2",
".przy3z2",
".przybr2",
".przych2",
".przycz2",
".przydź2",
".przydż2",
".przydz2",
".przygrz2",
".przymk2",
".przyoz2",
".przypch2",
".przyrż2",
".przyrz2",
".przysch2",
".przysz2",
".przytk2",
".ps8",
".pt8",
".pv8",
".pw8",
".px8",
".pz8",
".rć8",
".rł8",
".rń8",
".rś8",
".rź8",
".rż8",
".r8",
".rb8",
".rc8",
".rd8",
".retran2s3",
".rf8",
".rg8",
".rh8",
".rj8",
".rk8",
".rl8",
".rm8",
".rn8",
".ro2z3",
".ro3z4a",
".ro3z4e",
".ro3z4e3ć2",
".ro3z4e3ł2",
".ro3z4e3ś2",
".ro3z4e3ź2",
".ro3z4e3ż2",
".ro3z4e3b2",
".ro3z4e3c2",
".ro3z4e3d2",
".ro3z4e3f2",
".ro3z4e3g2",
".ro3z4e3h2",
".ro3z4e3k2",
".ro3z4e3l2",
".ro3z4e3m2",
".ro3z4e3p2",
".ro3z4e3r2",
".ro3z4e3s2",
".ro3z4e3t2",
".ro3z4e3w2",
".ro3z4e3z2",
".ro3z4ej",
".ro3z4u",
".ro4z5a2gi",
".ro4z5a2nie",
".ro4z5e2mo",
".ro4z5e4g3z",
".ro4z5e4n3t",
".rozś2",
".rozbrz2",
".rozd2",
".rozech2",
".rozecz2",
".rozedź2",
".rozedż2",
".rozedz2",
".rozepch2",
".rozerż2",
".rozerz2",
".rozesch2",
".rozesz2",
".rozi2",
".rozm2",
".rozo2",
".rozpo3w2",
".rozt2",
".roztr2",
".rozw2",
".rp8",
".rr8",
".rs8",
".rt8",
".rv8",
".rw8",
".rx8",
".rz8",
".sć8",
".sł8",
".sń8",
".sś8",
".sź8",
".sż8",
".s8",
".samo3ch2",
".samo3k2",
".samo3p2",
".samo3w2",
".samoro2z3",
".sb8",
".sc8",
".sch8",
".sd8",
".sf8",
".sg8",
".sh8",
".siede2m3",
".siedemse2t3",
".siedmio3ś2",
".sj8",
".ską2d5że",
".sk8",
".skl8",
".skr8",
".sl8",
".sm8",
".sn8",
".sobo3w2",
".spó2ł3",
".sp8",
".spo2d2",
".spo3ć2",
".spo3ł2",
".spo3ś2",
".spo3ź2",
".spo3ż2",
".spo3b2",
".spo3c2",
".spo3dz2",
".spo3f2",
".spo3g2",
".spo3h2",
".spo3k2",
".spo3l2",
".spo3m2",
".spo3p2",
".spo3r2",
".spo3s2",
".spo3t2",
".spo3w2",
".spo3z2",
".spo4r3n",
".spo4r3t",
".spoch2",
".spocz2",
".spodź2",
".spodż2",
".spod3d",
".sporz2",
".sposz2",
".sr8",
".ss8",
".st8",
".stere2o3",
".stereoa2",
".stereoe2",
".stereoi2",
".stereoo2",
".stereou2",
".su2b3",
".su3b4ie",
".su3b4otn",
".supe2r3",
".supe3r4at",
".supe3r4io",
".supe4r5a2tr",
".super5z2b",
".supere2",
".supero2d1rzut",
".sv8",
".sw8",
".sx8",
".sz8",
".sześćse2t3",
".sześcio3ś2",
".sze2ś2ć3",
".sze2s3",
".tć8",
".tł8",
".tń8",
".tś8",
".tź8",
".tż8",
".t8",
".ta2o3",
".ta2r7zan",
".tb8",
".tc8",
".tch8",
".td8",
".te2o3",
".tf8",
".tg8",
".th8",
".tj8",
".tk8",
".tl8",
".tm8",
".tn8",
".toa3",
".tp8",
".tró2j3",
".tró3j4ą",
".tró3j4ę",
".tró3j4ecz",
".tr8",
".tran2s3",
".tran3s4e",
".tran3s4ie",
".tran3s4y",
".tran3sz",
".tran4s5eu",
".transa2",
".transo2",
".trz8",
".trze2ch3",
".trzechse2t3",
".ts8",
".tt8",
".tv8",
".tw8",
".tx8",
".tysią2c3",
".tysią3c4a",
".tysią3c4e",
".tysią3cz",
".tysią4c5zł",
".tz8",
".uć2",
".uś2",
".u3ł2",
".u3ź2",
".u3ż2",
".u3b2",
".u3c2",
".u3d2",
".u3f2",
".u3g2",
".u3h2",
".u3k2",
".u3l2",
".u3m2",
".u3n2",
".u3p2",
".u3r2",
".u3s2",
".u3t2",
".u3w2",
".u3z2",
".u4d3k",
".u4f3n",
".u4k3lej",
".u4l3s",
".u4l3t",
".u4m3br",
".u4n3c",
".u4n3d",
".u4p3p2s",
".u4r3s",
".u4st3n",
".u4stc",
".u4stk",
".u4z3be",
".ube2z3",
".ubezw2",
".ubr2",
".uch2",
".ucz2",
".udź2",
".udż2",
".udz2",
".ukr2",
".umk2",
".upch2",
".upo2d2",
".upo3ć2",
".upo3ł2",
".upo3ś2",
".upo3ź2",
".upo3ż2",
".upo3b2",
".upo3c2",
".upo3da",
".upo3f2",
".upo3g2",
".upo3h2",
".upo3k2",
".upo3l2",
".upo3m2",
".upo3p2",
".upo3r2",
".upo3s2",
".upo3t2",
".upo3w2",
".upo3z2",
".upoch2",
".upocz2",
".upodź2",
".upodż2",
".upod3d",
".uporz2",
".uposz2",
".urż2",
".uro2z3",
".urz2",
".usch2",
".usz2",
".utk2",
".utr2",
".uze3w2",
".vć8",
".vł8",
".vń8",
".vś8",
".vź8",
".vż8",
".v8",
".vb8",
".vc8",
".vd8",
".vf8",
".vg8",
".vh8",
".vj8",
".vk8",
".vl8",
".vm8",
".vn8",
".vp8",
".vr8",
".vs8",
".vt8",
".vv8",
".vw8",
".vx8",
".vz8",
".wć8",
".wł8",
".wń8",
".wś8",
".wź8",
".wż8",
".w8",
".wb8",
".wc8",
".wd8",
".we3ć2",
".we3ł2",
".we3ś2",
".we3ż2",
".we3b2",
".we3c2",
".we3d2",
".we3f2",
".we3g2",
".we3h2",
".we3k2",
".we3l2",
".we3m2",
".we3n2",
".we3p2",
".we3r2",
".we3s2",
".we3t2",
".we3w2",
".we3z2",
".we4ł3n",
".we4k3t",
".we4l3w",
".we4n3d",
".we4n3t",
".we4r3b",
".we4r3d",
".we4r3n",
".we4r3s",
".we4r3t",
".we4s3prz",
".we4s3tch2",
".we4z3br",
".we4z3gł",
".wech2",
".wecz2",
".wedź2",
".wedż2",
".wedz2",
".wemk2",
".wepch2",
".werz2",
".wesz2",
".wetk2",
".wewną2trz3",
".wf8",
".wg8",
".wh8",
".wielo3ś2",
".wielo3d2",
".wielo3k2",
".wieluse2t3",
".wilczo3m2",
".wj8",
".wk8",
".wl8",
".wm8",
".wn8",
".wniebo3w2",
".wodo3w2",
".wp8",
".wr8",
".ws8",
".współi2",
".współo2b3w",
".współu2",
".współw2",
".wspó2ł3",
".wsze2ch3",
".wszecho2",
".wszechw2",
".wt8",
".wv8",
".ww8",
".wx8",
".wy3ć2",
".wy3ł2",
".wy3ś2",
".wy3ź2",
".wy3ż2",
".wy3b2",
".wy3c2",
".wy3d2",
".wy3f2",
".wy3g2",
".wy3h2",
".wy3k2",
".wy3l2",
".wy3m2",
".wy3o2d3r",
".wy3p2",
".wy3r2",
".wy3s2",
".wy3t2",
".wy3w2",
".wy3z2",
".wy4ż3sz",
".wy4cz3ha",
".wybr2",
".wybrz2",
".wych2",
".wycz2",
".wydź2",
".wydż2",
".wydr2",
".wydz2",
".wye2k2s3",
".wygrz2",
".wyi2zo",
".wykl2",
".wykr2",
".wykrz2",
".wymk2",
".wypch2",
".wyprz2",
".wyrż2",
".wyrz2",
".wysch2",
".wysm2",
".wysz2",
".wytch2",
".wytk2",
".wytr2",
".wz8",
".xć8",
".xł8",
".xń8",
".xś8",
".xź8",
".xż8",
".x8",
".xb8",
".xc8",
".xd8",
".xf8",
".xg8",
".xh8",
".xj8",
".xk8",
".xl8",
".xm8",
".xn8",
".xp8",
".xr8",
".xs8",
".xt8",
".xv8",
".xw8",
".xx8",
".xz8",
".zć8",
".zł8",
".zło3w2",
".zń8",
".zś8",
".zź8",
".zż8",
".z8",
".za3ć2",
".za3ł2",
".za3ś2",
".za3ź2",
".za3ż2",
".za3b2",
".za3c2",
".za3d2",
".za3f2",
".za3g2",
".za3h2",
".za3k2",
".za3l2",
".za3m2",
".za3o2b3r",
".za3o2b3s",
".za3p2",
".za3r2",
".za3s2",
".za3t2",
".za3u2",
".za3w2",
".za3z2",
".za4k3t",
".za4l3g",
".za4l3k",
".za4l3t",
".za4m3k",
".za4r3ch",
".za4uto",
".za5m4k2n",
".zabr2",
".zabrz2",
".zach2",
".zacz2",
".zadź2",
".zadż2",
".zadośću4",
".zado2ść3",
".zadr2",
".zady2s3po",
".zadz2",
".zagrz2",
".zai2n3",
".zai2zo",
".zain4ic",
".zakl2",
".zakr2",
".zakrz2",
".zanie3d2",
".zarż2",
".zarz2",
".zasch2",
".zasm2",
".zasz2",
".zatk2",
".zatr2",
".zb8",
".zc8",
".zd8",
".zde2z3",
".zde3z4awu",
".zde3z4el",
".zde3z4er",
".zde3z4y",
".zdy2s3kont",
".zdy2s3kred",
".zdy2s3kwal",
".ze3ć2",
".ze3ł2",
".ze3ś2",
".ze3ź2",
".ze3ż2",
".ze3b2",
".ze3c2",
".ze3d2",
".ze3f2",
".ze3g2",
".ze3h2",
".ze3k2",
".ze3l2",
".ze3m2",
".ze3p2",
".ze3r2",
".ze3s2",
".ze3t2",
".ze3tk2",
".ze3w2",
".ze3z2",
".ze4r3k",
".ze4t3e2m1e2s",
".ze4t3e2s1e2l",
".ze4t3emp",
".ze4t3hap",
".zech2",
".zecz2",
".zedź2",
".zedż2",
".zedz2",
".zekl2",
".zepch2",
".zerż2",
".zerz2",
".zesch2",
".zesm4",
".zesz2",
".zf8",
".zg8",
".zh8",
".zimno3kr2",
".zj8",
".zk8",
".zl8",
".zm8",
".zmartwy2ch3",
".zmartwychw2",
".zn8",
".znie3ć2",
".znie3ł2",
".znie3ń2",
".znie3ś2",
".znie3ź2",
".znie3ż2",
".znie3b2",
".znie3c2",
".znie3d2",
".znie3f2",
".znie3g2",
".znie3h2",
".znie3k2",
".znie3l2",
".znie3m2",
".znie3n2",
".znie3p2",
".znie3r2",
".znie3s2",
".znie3t2",
".znie3w2",
".znie3z2",
".znie4dź3",
".znie4m3c",
".zniech2",
".zniecz2",
".zniedż2",
".zniedz2",
".znierz2",
".zniesz2",
".zo2o3",
".zp8",
".zr8",
".zro2z3",
".zro3z4u",
".zs8",
".zt8",
".zv8",
".zw8",
".zx8",
".zz8",
"ą1",
"ę1",
"ó1",
"ó4w3cz",
"ś1c",
"ź2dź",
"1ś2ci",
"2ć1ń",
"2ć1ś",
"2ć1ź",
"2ć1ż",
"2ć1b",
"2ć1c",
"2ć1d",
"2ć1f",
"2ć1g",
"2ć1k",
"2ć1m",
"2ć1n",
"2ć1p",
"2ć1s",
"2ć1t",
"2ć1z",
"2ł1ć",
"2ł1ń",
"2ł1ś",
"2ł1ź",
"2ł1ż",
"2ł1b",
"2ł1c",
"2ł1d",
"2ł1f",
"2ł1g",
"2ł1h",
"2ł1j",
"2ł1k",
"2ł1l",
"2ł1m",
"2ł1n",
"2ł1p",
"2ł1r",
"2ł1s",
"2ł1t",
"2ł1w",
"2ł1z",
"2ń1ć",
"2ń1ł",
"2ń1ń",
"2ń1ś",
"2ń1ź",
"2ń1ż",
"2ń1b",
"2ń1c",
"2ń1d",
"2ń1f",
"2ń1g",
"2ń1h",
"2ń1j",
"2ń1k",
"2ń1l",
"2ń1m",
"2ń1n",
"2ń1p",
"2ń1r",
"2ń1s",
"2ń1t",
"2ń1w",
"2ń1z",
"2śćc",
"2ś1ś",
"2ś1ź",
"2ś1ż",
"2ś1b",
"2ś1d",
"2ś1f",
"2ś1g",
"2ś1k",
"2ś1p",
"2ś1s",
"2ś1t",
"2ś1z",
"2ślm",
"2śln",
"2ź1ć",
"2ź1ś",
"2ź1ż",
"2ź1b",
"2ź1c",
"2ź1d",
"2ź1f",
"2ź1g",
"2ź1k",
"2ź1l",
"2ź1m",
"2ź1n",
"2ź1p",
"2ź1s",
"2ź1t",
"2ź1w",
"2ź1z",
"2ż1ć",
"2ż1ł",
"2ż1ń",
"2ż1ś",
"2ż1ź",
"2ż1b",
"2ż1c",
"2ż1d",
"2ż1f",
"2ż1g",
"2ż1j",
"2ż1k",
"2ż1l",
"2ż1m",
"2ż1n",
"2ż1p",
"2ż1r",
"2ż1s",
"2ż1t",
"2ż1w",
"2ż1z",
"2błk",
"2b1ć",
"2b1ń",
"2b1ś",
"2b1ź",
"2b1ż",
"2b1c",
"2b1d",
"2b1f",
"2b1g",
"2b1k",
"2b1m",
"2b1n",
"2b1p",
"2b1s",
"2b1t",
"2b1z",
"2brn",
"2c1ć",
"2c1ń",
"2c1ś",
"2c1ź",
"2c1ż",
"2c1b",
"2c1d",
"2c1f",
"2c1g",
"2c1k",
"2c1l",
"2c1m",
"2c1n",
"2c1p",
"2c1s",
"2c1t",
"2ch1ć",
"2ch1ń",
"2ch1ś",
"2ch1ź",
"2ch1ż",
"2ch1b",
"2ch1c",
"2ch1d",
"2ch1f",
"2ch1g",
"2ch1k",
"2ch1m",
"2ch1n",
"2ch1p",
"2ch1s",
"2ch1t",
"2ch1z",
"2cz1ć",
"2cz1ń",
"2cz1ś",
"2cz1ź",
"2cz1ż",
"2cz1b",
"2cz1c",
"2cz1d",
"2cz1f",
"2cz1g",
"2cz1k",
"2cz1l",
"2cz1m",
"2cz1n",
"2cz1p",
"2cz1s",
"2cz1t",
"2cz1z",
"2dłb",
"2dłsz",
"2dź1ć",
"2dź1ń",
"2dź1ś",
"2dź1ź",
"2dź1ż",
"2dź1b",
"2dź1c",
"2dź1d",
"2dź1f",
"2dź1g",
"2dź1k",
"2dź1m",
"2dź1n",
"2dź1p",
"2dź1s",
"2dź1t",
"2dź1z",
"2dż1ć",
"2dż1ń",
"2dż1ś",
"2dż1ź",
"2dż1ż",
"2dż1b",
"2dż1c",
"2dż1d",
"2dż1f",
"2dż1g",
"2dż1k",
"2dż1m",
"2dż1n",
"2dż1p",
"2dż1s",
"2dż1t",
"2dż1z",
"2d1ć",
"2d1ń",
"2d1ś",
"2d1b",
"2d1c",
"2d1f",
"2d1g",
"2d1k",
"2d1m",
"2d1n",
"2d1p",
"2d1s",
"2d1t",
"2drn",
"2dz1ć",
"2dz1ń",
"2dz1ś",
"2dz1ź",
"2dz1ż",
"2dz1b",
"2dz1c",
"2dz1d",
"2dz1f",
"2dz1g",
"2dz1k",
"2dz1l",
"2dz1m",
"2dz1n",
"2dz1p",
"2dz1s",
"2dz1t",
"2dz1z",
"2f1c",
"2f1k",
"2f1m",
"2f1n",
"2głb",
"2g1ć",
"2g1ń",
"2g1ś",
"2g1ź",
"2g1ż",
"2g1b",
"2g1c",
"2g1d",
"2g1f",
"2g1k",
"2g1m",
"2g1p",
"2g1s",
"2g1t",
"2g1z",
"2h1ć",
"2h1ł",
"2h1ń",
"2h1ś",
"2h1ź",
"2h1ż",
"2h1b",
"2h1c",
"2h1d",
"2h1f",
"2h1g",
"2h1j",
"2h1k",
"2h1l",
"2h1m",
"2h1n",
"2h1p",
"2h1r",
"2h1s",
"2h1t",
"2h1w",
"2h1z",
"2j1ć",
"2j1ł",
"2j1ń",
"2j1ś",
"2j1ź",
"2j1ż",
"2j1b",
"2j1c",
"2j1d",
"2j1f",
"2j1g",
"2j1h",
"2j1k",
"2j1l",
"2j1m",
"2j1n",
"2j1p",
"2j1r",
"2j1s",
"2j1t",
"2j1w",
"2j1z",
"2kłb",
"2k1ć",
"2k1ń",
"2k1ś",
"2k1ź",
"2k1ż",
"2k1b",
"2k1c",
"2k1d",
"2k1f",
"2k1g",
"2k1m",
"2k1n",
"2k1p",
"2k1s",
"2k1sz",
"2k1t",
"2k1z",
"2l1ć",
"2l1ł",
"2l1ń",
"2l1ś",
"2l1ź",
"2l1ż",
"2l1b",
"2l1c",
"2l1d",
"2l1f",
"2l1g",
"2l1h",
"2l1j",
"2l1k",
"2l1m",
"2l1n",
"2l1p",
"2l1r",
"2l1s",
"2l1t",
"2l1w",
"2l1z",
"2m1ć",
"2m1ł",
"2m1ń",
"2m1ś",
"2m1ź",
"2m1ż",
"2m1b",
"2m1c",
"2m1d",
"2m1f",
"2m1g",
"2m1h",
"2m1j",
"2m1k",
"2m1l",
"2m1n",
"2m1p",
"2m1r",
"2m1s",
"2m1t",
"2m1w",
"2m1z",
"2n1ć",
"2n1ł",
"2n1ń",
"2n1ś",
"2n1ź",
"2n1ż",
"2n1b",
"2n1c",
"2n1d",
"2n1f",
"2n1g",
"2n1h",
"2n1j",
"2n1k",
"2n1l",
"2n1m",
"2n1p",
"2n1r",
"2n1s",
"2n1t",
"2n1w",
"2n1z",
"2ntn",
"2p1ć",
"2p1ń",
"2p1ś",
"2p1ź",
"2p1ż",
"2p1b",
"2p1c",
"2p1d",
"2p1f",
"2p1g",
"2p1k",
"2p1m",
"2p1n",
"2p1s",
"2p1sz",
"2p1t",
"2p1z",
"2pln",
"2r1ć",
"2r1ł",
"2r1ń",
"2r1ś",
"2r1ź",
"2r1ż",
"2r1b",
"2r1c",
"2r1d",
"2r1f",
"2r1g",
"2r1h",
"2r1j",
"2r1k",
"2r1l",
"2r1m",
"2r1n",
"2r1p",
"2r1s",
"2r1t",
"2r1w",
"2rz1ć",
"2rz1ł",
"2rz1ń",
"2rz1ś",
"2rz1ź",
"2rz1ż",
"2rz1b",
"2rz1c",
"2rz1d",
"2rz1f",
"2rz1g",
"2rz1h",
"2rz1j",
"2rz1k",
"2rz1l",
"2rz1m",
"2rz1n",
"2rz1p",
"2rz1r",
"2rz1s",
"2rz1t",
"2rz1w",
"2słb",
"2s1ź",
"2s1ż",
"2s1b",
"2s1d",
"2s1f",
"2s1g",
"2s1s",
"2snk",
"2stk",
"2stn",
"2stsz",
"2sz1ć",
"2sz1ś",
"2sz1c",
"2sz1f",
"2sz1k",
"2sz1l",
"2sz1m",
"2sz1n",
"2sz1p",
"2sz1s",
"2sz1t",
"2sz1w",
"2sz1z",
"2szln",
"2t1ć",
"2t1ń",
"2t1ś",
"2t1ź",
"2t1ż",
"2t1b",
"2t1c",
"2t1d",
"2t1f",
"2t1g",
"2t1k",
"2t1m",
"2t1n",
"2t1p",
"2t1s",
"2t1z",
"2tln",
"2trk",
"2trzn",
"2w1ć",
"2w1ł",
"2w1ń",
"2w1ś",
"2w1ź",
"2w1ż",
"2w1b",
"2w1c",
"2w1d",
"2w1f",
"2w1g",
"2w1j",
"2w1k",
"2w1l",
"2w1m",
"2w1n",
"2w1p",
"2w1r",
"2w1s",
"2w1t",
"2w1z",
"2z1ć",
"2z1ś",
"2z1c",
"2z1d",
"2z1f",
"2z1k",
"2z1p",
"2z1s",
"2z1t",
"2zdk",
"2zdn",
"3d2niow",
"3k2sz2t",
"3m2k2n",
"3m2nest",
"3m2nezj",
"3m2sk2n",
"3p2neu",
"3w2ład",
"3w2łos",
"3w2czas",
"4ć3ć",
"4ł3ł",
"4ź3ź",
"4ż3ż",
"4b3b",
"4c3c",
"4d3d",
"4f3f",
"4g3g",
"4h3h",
"4j3j",
"4k3k",
"4l3l",
"4m3m",
"4n3n",
"4p3p",
"4r3r",
"4t3t",
"4w3w",
"4z3z",
"8ć.",
"8ćć.",
"8ćł.",
"8ćń.",
"8ćś.",
"8ćź.",
"8ćż.",
"8ćb.",
"8ćc.",
"8ćd.",
"8ćf.",
"8ćg.",
"8ćh.",
"8ćj.",
"8ćk.",
"8ćl.",
"8ćm.",
"8ćn.",
"8ćp.",
"8ćr.",
"8ćs.",
"8ćt.",
"8ćv.",
"8ćw.",
"8ćx.",
"8ćz.",
"8ł.",
"8łć.",
"8łł.",
"8łń.",
"8łś.",
"8łź.",
"8łż.",
"8łb.",
"8łc.",
"8łd.",
"8łf.",
"8łg.",
"8łh.",
"8łj.",
"8łk.",
"8łl.",
"8łm.",
"8łn.",
"8łp.",
"8łr.",
"8łs.",
"8łt.",
"8łv.",
"8łw.",
"8łx.",
"8łz.",
"8ń.",
"8ńć.",
"8ńł.",
"8ńń.",
"8ńś.",
"8ńź.",
"8ńż.",
"8ńb.",
"8ńc.",
"8ńd.",
"8ńf.",
"8ńg.",
"8ńh.",
"8ńj.",
"8ńk.",
"8ńl.",
"8ńm.",
"8ńn.",
"8ńp.",
"8ńr.",
"8ńs.",
"8ńt.",
"8ńv.",
"8ńw.",
"8ńx.",
"8ńz.",
"8ś.",
"8ść.",
"8śł.",
"8śń.",
"8śś.",
"8śź.",
"8śż.",
"8śb.",
"8śc.",
"8śd.",
"8śf.",
"8śg.",
"8śh.",
"8śj.",
"8śk.",
"8śl.",
"8śm.",
"8śn.",
"8śp.",
"8śr.",
"8śs.",
"8śt.",
"8śv.",
"8św.",
"8śx.",
"8śz.",
"8ź.",
"8źć.",
"8źł.",
"8źń.",
"8źś.",
"8źź.",
"8źż.",
"8źb.",
"8źc.",
"8źd.",
"8źf.",
"8źg.",
"8źh.",
"8źj.",
"8źk.",
"8źl.",
"8źm.",
"8źn.",
"8źp.",
"8źr.",
"8źs.",
"8źt.",
"8źv.",
"8źw.",
"8źx.",
"8źz.",
"8ż.",
"8żć.",
"8żł.",
"8żń.",
"8żś.",
"8żź.",
"8żż.",
"8żb.",
"8żc.",
"8żd.",
"8żf.",
"8żg.",
"8żh.",
"8żj.",
"8żk.",
"8żl.",
"8żm.",
"8żn.",
"8żp.",
"8żr.",
"8żs.",
"8żt.",
"8żv.",
"8żw.",
"8żx.",
"8żz.",
"8b.",
"8bć.",
"8bł.",
"8bń.",
"8bś.",
"8bź.",
"8bż.",
"8bb.",
"8bc.",
"8bd.",
"8bf.",
"8bg.",
"8bh.",
"8bj.",
"8bk.",
"8bl.",
"8bm.",
"8bn.",
"8bp.",
"8br.",
"8brz.",
"8bs.",
"8bt.",
"8bv.",
"8bw.",
"8bx.",
"8bz.",
"8c.",
"8cć.",
"8cł.",
"8cń.",
"8cś.",
"8cź.",
"8cż.",
"8cb.",
"8cc.",
"8cd.",
"8cf.",
"8cg.",
"8ch.",
"8chł.",
"8chrz.",
"8chw.",
"8cj.",
"8ck.",
"8cl.",
"8cm.",
"8cn.",
"8cp.",
"8cr.",
"8cs.",
"8ct.",
"8cv.",
"8cw.",
"8cx.",
"8cz.",
"8czt.",
"8d.",
"8dć.",
"8dł.",
"8dń.",
"8dś.",
"8dź.",
"8dż.",
"8db.",
"8dc.",
"8dd.",
"8df.",
"8dg.",
"8dh.",
"8dj.",
"8dk.",
"8dl.",
"8dm.",
"8dn.",
"8dp.",
"8dr.",
"8drz.",
"8ds.",
"8dt.",
"8dv.",
"8dw.",
"8dx.",
"8dz.",
"8f.",
"8fć.",
"8fł.",
"8fń.",
"8fś.",
"8fź.",
"8fż.",
"8fb.",
"8fc.",
"8fd.",
"8ff.",
"8fg.",
"8fh.",
"8fj.",
"8fk.",
"8fl.",
"8fm.",
"8fn.",
"8fp.",
"8fr.",
"8fs.",
"8ft.",
"8fv.",
"8fw.",
"8fx.",
"8fz.",
"8g.",
"8gć.",
"8gł.",
"8gń.",
"8gś.",
"8gź.",
"8gż.",
"8gb.",
"8gc.",
"8gd.",
"8gf.",
"8gg.",
"8gh.",
"8gj.",
"8gk.",
"8gl.",
"8gm.",
"8gn.",
"8gp.",
"8gr.",
"8gs.",
"8gt.",
"8gv.",
"8gw.",
"8gx.",
"8gz.",
"8h.",
"8hć.",
"8hł.",
"8hń.",
"8hś.",
"8hź.",
"8hż.",
"8hb.",
"8hc.",
"8hd.",
"8hf.",
"8hg.",
"8hh.",
"8hj.",
"8hk.",
"8hl.",
"8hm.",
"8hn.",
"8hp.",
"8hr.",
"8hs.",
"8ht.",
"8hv.",
"8hw.",
"8hx.",
"8hz.",
"8j.",
"8jć.",
"8jł.",
"8jń.",
"8jś.",
"8jź.",
"8jż.",
"8jb.",
"8jc.",
"8jd.",
"8jf.",
"8jg.",
"8jh.",
"8jj.",
"8jk.",
"8jl.",
"8jm.",
"8jn.",
"8jp.",
"8jr.",
"8js.",
"8jt.",
"8jv.",
"8jw.",
"8jx.",
"8jz.",
"8k.",
"8kć.",
"8kł.",
"8kń.",
"8kś.",
"8kź.",
"8kż.",
"8kb.",
"8kc.",
"8kd.",
"8kf.",
"8kg.",
"8kh.",
"8kj.",
"8kk.",
"8kl.",
"8km.",
"8kn.",
"8kp.",
"8kr.",
"8ks.",
"8kst.",
"8kt.",
"8kv.",
"8kw.",
"8kx.",
"8kz.",
"8l.",
"8lć.",
"8lł.",
"8lń.",
"8lś.",
"8lź.",
"8lż.",
"8lb.",
"8lc.",
"8ld.",
"8lf.",
"8lg.",
"8lh.",
"8lj.",
"8lk.",
"8ll.",
"8lm.",
"8ln.",
"8lp.",
"8lr.",
"8ls.",
"8lt.",
"8lv.",
"8lw.",
"8lx.",
"8lz.",
"8m.",
"8mć.",
"8mł.",
"8mń.",
"8mś.",
"8mź.",
"8mż.",
"8mb.",
"8mc.",
"8md.",
"8mf.",
"8mg.",
"8mh.",
"8mj.",
"8mk.",
"8ml.",
"8mm.",
"8mn.",
"8mp.",
"8mr.",
"8ms.",
"8mst.",
"8mt.",
"8mv.",
"8mw.",
"8mx.",
"8mz.",
"8n.",
"8nć.",
"8nł.",
"8nń.",
"8nś.",
"8nź.",
"8nż.",
"8nb.",
"8nc.",
"8nd.",
"8nf.",
"8ng.",
"8nh.",
"8nj.",
"8nk.",
"8nl.",
"8nm.",
"8nn.",
"8np.",
"8nr.",
"8ns.",
"8nt.",
"8nv.",
"8nw.",
"8nx.",
"8nz.",
"8p.",
"8pć.",
"8pł.",
"8pń.",
"8pś.",
"8pź.",
"8pż.",
"8pb.",
"8pc.",
"8pd.",
"8pf.",
"8pg.",
"8ph.",
"8pj.",
"8pk.",
"8pl.",
"8pm.",
"8pn.",
"8pp.",
"8pr.",
"8prz.",
"8ps.",
"8pt.",
"8pv.",
"8pw.",
"8px.",
"8pz.",
"8r.",
"8rć.",
"8rł.",
"8rń.",
"8rś.",
"8rź.",
"8rż.",
"8rb.",
"8rc.",
"8rd.",
"8rf.",
"8rg.",
"8rh.",
"8rj.",
"8rk.",
"8rl.",
"8rm.",
"8rn.",
"8rp.",
"8rr.",
"8rs.",
"8rsz.",
"8rt.",
"8rv.",
"8rw.",
"8rx.",
"8rz.",
"8rzł.",
"8s.",
"8sć.",
"8sł.",
"8sń.",
"8sś.",
"8sź.",
"8sż.",
"8sb.",
"8sc.",
"8sch.",
"8sd.",
"8sf.",
"8sg.",
"8sh.",
"8sj.",
"8sk.",
"8skrz.",
"8sl.",
"8sm.",
"8sn.",
"8sp.",
"8sr.",
"8ss.",
"8st.",
"8str.",
"8strz.",
"8stw.",
"8sv.",
"8sw.",
"8sx.",
"8sz.",
"8szcz.",
"8szczb.",
"8szk.",
"8szn.",
"8szt.",
"8sztr.",
"8t.",
"8tć.",
"8tł.",
"8tń.",
"8tś.",
"8tź.",
"8tż.",
"8tb.",
"8tc.",
"8td.",
"8tf.",
"8tg.",
"8th.",
"8tj.",
"8tk.",
"8tl.",
"8tm.",
"8tn.",
"8tp.",
"8tr.",
"8trz.",
"8ts.",
"8tt.",
"8tv.",
"8tw.",
"8tx.",
"8tz.",
"8v.",
"8vć.",
"8vł.",
"8vń.",
"8vś.",
"8vź.",
"8vż.",
"8vb.",
"8vc.",
"8vd.",
"8vf.",
"8vg.",
"8vh.",
"8vj.",
"8vk.",
"8vl.",
"8vm.",
"8vn.",
"8vp.",
"8vr.",
"8vs.",
"8vt.",
"8vv.",
"8vw.",
"8vx.",
"8vz.",
"8w.",
"8wć.",
"8wł.",
"8wń.",
"8wś.",
"8wź.",
"8wż.",
"8wb.",
"8wc.",
"8wd.",
"8wf.",
"8wg.",
"8wh.",
"8wj.",
"8wk.",
"8wl.",
"8wm.",
"8wn.",
"8wp.",
"8wr.",
"8ws.",
"8wt.",
"8wv.",
"8ww.",
"8wx.",
"8wz.",
"8x.",
"8xć.",
"8xł.",
"8xń.",
"8xś.",
"8xź.",
"8xż.",
"8xb.",
"8xc.",
"8xd.",
"8xf.",
"8xg.",
"8xh.",
"8xj.",
"8xk.",
"8xl.",
"8xm.",
"8xn.",
"8xp.",
"8xr.",
"8xs.",
"8xt.",
"8xv.",
"8xw.",
"8xx.",
"8xz.",
"8z.",
"8zć.",
"8zł.",
"8zń.",
"8zś.",
"8zź.",
"8zż.",
"8zb.",
"8zc.",
"8zd.",
"8zdr.",
"8zdrz.",
"8zf.",
"8zg.",
"8zh.",
"8zj.",
"8zk.",
"8zl.",
"8zm.",
"8zn.",
"8zp.",
"8zr.",
"8zs.",
"8zt.",
"8zv.",
"8zw.",
"8zx.",
"8zz.",
"a1",
"a2u",
"a2y",
"aa2",
"ae2",
"ai2",
"ao2",
"be2eth",
"be2f3sz2",
"be2k1hend",
"bi2n3o2ku",
"bi2sz3kop",
"bi2z3ne2s3m",
"bi2z3nes",
"birmin2g1ham",
"blo2k1hauz",
"bo2s3ma",
"br2d",
"bro2a2d3way",
"bu2sz3me",
"buk2sz3pan",
"busine2ss3m",
"busines2s",
"c4h",
"c4z",
"cal2d1well",
"ch2ł",
"ch2j",
"ch2l",
"ch2r",
"ch2w",
"chus1t",
"cu2r7zon",
"dż2ł",
"dż2j",
"dż2l",
"dż2r",
"dż2w",
"dże4z3b",
"dże4z3m",
"d4ź",
"d4ż",
"d4z",
"deut4sch3land",
"drz2w",
"du2sz3past",
"e1",
"e2r5zac",
"e2u",
"e2y",
"e3u2sz",
"ea2",
"ee2",
"ei2",
"eo2",
"fi2s3harm",
"fi2sz3bin",
"fo2k2s3t",
"fo2r5zac",
"fol2k1lor",
"fos2f1a2zot",
"ga3d2get",
"gado3p2ta",
"gol2f3s",
"golfsz2",
"gran2d1ilo",
"gro4t3r",
"hi2sz3p",
"hu2cz1w",
"hu2x3ley",
"i1",
"i2ą",
"i2ę",
"i2ó",
"i2a",
"i2e",
"i2i",
"i2o",
"i2u",
"i2y",
"in4nsbruck",
"in4sbruc",
"j2t1ł",
"j2t1r",
"ja4z4z3b",
"ja4z4z3m",
"karl2s1kron",
"karl2s1ruhe",
"kir2chhoff",
"kongre2s3m",
"led1w",
"lu2ft3waffe",
"lu2ks1fer",
"ly2o",
"ma2r5zł",
"ma2r5zl",
"ma2r5zn",
"mi2sz1masz",
"mie2r5zł",
"mie2r5zi",
"mon2t3real",
"moza2i3k",
"mu2r7zasich3l",
"na4ł3kows",
"na4r3v",
"o1",
"o2y",
"oa2",
"och3mistrz",
"oe2",
"of2f3set",
"oi2",
"oo2",
"ou2",
"pa2n3a2mer",
"pa2s3cal",
"pa2s3ch",
"połu3d2ni",
"po3d4nieprz",
"po3m2ną",
"po3m2nę",
"po3m2ni",
"po4rt2s3mo2uth",
"po4rt3land",
"poli3e2t",
"poli3u2re",
"powsze3d2ni",
"pr2chal",
"pre2sz3pa",
"r4z",
"ro2e3nt2gen",
"ro2k3rocz",
"ro2s3to3c2k",
"s4z",
"se2t3le",
"sko2r5zoner",
"sm2r",
"sowi3z2",
"sy2n3opt",
"sy2s1tem",
"sza2sz1ły",
"sze2z1long",
"sze4ść",
"szto2k1holm",
"szyn2k1was",
"to3y2o3t",
"turboo2d3rzut",
"tygo3d2ni",
"u1",
"u2y",
"ua2",
"ue2",
"ui2",
"uo2",
"uu2",
"vo2lk2s3",
"we2e2k1end",
"we4st3f",
"we4st3m",
"y1",
"ya2",
"ye2",
"yi2",
"yo2",
"yu2",
"ze4p3p",
};
SILE.hyphenator.languages["pl"].exceptions =
{
"be-zach",
"be-zami",
"by-naj-mniej",
"gdzie-nie-gdzie",
"ina-czej",
"na-dal",
"ni-gdy",
"ni-gdzie",
"niech-że",
"niech-by",
"ow-szem",
"pó-łach",
"pó-łami",
"pó-łek",
"pod-ów-czas",
"przy-naj-mniej",
"skąd-inąd",
"tró-jach",
"tró-jami",
"tró-jek",
};
| mit |
Hostle/luci | applications/luci-app-diag-devinfo/luasrc/controller/luci_diag/smap_common.lua | 61 | 3184 | -- Copyright 2009 Daniel Dickinson
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.luci_diag.smap_common", package.seeall)
require("luci.i18n")
require("luci.util")
require("luci.sys")
require("luci.cbi")
require("luci.model.uci")
local translate = luci.i18n.translate
local DummyValue = luci.cbi.DummyValue
local SimpleSection = luci.cbi.SimpleSection
function index()
return -- no-op
end
function get_params()
local smapnets_uci = luci.model.uci.cursor()
smapnets_uci:load("luci_devinfo")
local nettable = smapnets_uci:get_all("luci_devinfo")
local i
local subnet
local smapout
local outnets = {}
i = next(nettable, nil)
while (i) do
if (smapnets_uci:get("luci_devinfo", i) == "smap_scannet") then
local scannet = smapnets_uci:get_all("luci_devinfo", i)
if scannet["subnet"] and (scannet["subnet"] ~= "") and scannet["enable"] and ( scannet["enable"] == "1") then
local output = ""
local outrow = {}
outrow["subnet"] = scannet["subnet"]
ports = "5060"
if scannet["ports"] and ( scannet["ports"] ~= "" ) then
ports = scannet["ports"]
end
outrow["timeout"] = 10
local timeout = tonumber(scannet["timeout"])
if timeout and ( timeout > 0 ) then
outrow["timeout"] = scannet["timeout"]
end
outrow["repeat_count"] = 1
local repcount = tonumber(scannet["repeat_count"])
if repcount and ( repcount > 0 ) then
outrow["repeat_count"] = scannet["repeat_count"]
end
outrow["sleepreq"] = 100
local repcount = tonumber(scannet["sleepreq"])
if repcount and ( repcount > 0 ) then
outrow["sleepreq"] = scannet["sleepreq"]
end
if scannet["interface"] and ( scannet["interface"] ~= "" ) then
outrow["interface"] = scannet["interface"]
else
outrow["interface"] = ""
end
outrow["ports"] = ports
outrow["output"] = output
outnets[i] = outrow
end
end
i = next(nettable, i)
end
return outnets
end
function command_function(outnets, i)
local interface = luci.controller.luci_diag.devinfo_common.get_network_device(outnets[i]["interface"])
return "/usr/bin/netsmap-to-devinfo -r " .. outnets[i]["subnet"] .. " -t " .. outnets[i]["timeout"] .. " -i " .. interface .. " -x -p " .. outnets[i]["ports"] .. " -c " .. outnets[i]["repeat_count"] .. " -s " .. outnets[i]["sleepreq"] .. " </dev/null"
end
function action_links(smapmap, mini)
s = smapmap:section(SimpleSection, "", translate("Actions"))
b = s:option(DummyValue, "_config", translate("Configure Scans"))
b.value = ""
if (mini) then
b.titleref = luci.dispatcher.build_url("mini", "voice", "phones", "phone_scan_config")
else
b.titleref = luci.dispatcher.build_url("admin", "network", "diag_config", "smap_devinfo_config")
end
b = s:option(DummyValue, "_scans", translate("Repeat Scans (this can take a few minutes)"))
b.value = ""
if (mini) then
b.titleref = luci.dispatcher.build_url("mini", "diag", "phone_scan")
else
b.titleref = luci.dispatcher.build_url("admin", "status", "smap_devinfo")
end
end
| apache-2.0 |
AdamGagorik/darkstar | scripts/zones/Mount_Zhayolm/npcs/qm2.lua | 30 | 1322 | -----------------------------------
-- Area: Mount Zhayolm
-- NPC: ??? (Spawn Claret(ZNM T1))
-- @pos 497 -9 52 61
-----------------------------------
package.loaded["scripts/zones/Mount_Zhayolm/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Mount_Zhayolm/TextIDs");
require("scripts/globals/status");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
local mobID = 17027472;
if (trade:hasItemQty(2591,1) and trade:getItemCount() == 1) then -- Trade Pectin
if (GetMobAction(mobID) == ACTION_NONE) then
player:tradeComplete();
SpawnMob(mobID):updateClaim(player);
end
end
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:messageSpecial(NOTHING_HAPPENS);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/globals/items/homemade_steak.lua | 18 | 1100 | -----------------------------------------
-- ID: 5226
-- Item: homemade_steak
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Strength 1
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)
local result = 0;
if (target:hasStatusEffect(EFFECT_FOOD) == true or target:hasStatusEffect(EFFECT_FIELD_SUPPORT_FOOD) == true) then
result = 246;
end
return result;
end;
-----------------------------------------
-- OnItemUse
-----------------------------------------
function onItemUse(target)
target:addStatusEffect(EFFECT_FOOD,0,0,1800,5226);
end;
-----------------------------------
-- onEffectGain Action
-----------------------------------
function onEffectGain(target,effect)
target:addMod(MOD_STR, 1);
end;
-----------------------------------------
-- onEffectLose Action
-----------------------------------------
function onEffectLose(target,effect)
target:delMod(MOD_STR, 1);
end;
| gpl-3.0 |
sbuettner/kong | kong/dao/cassandra/migrations.lua | 12 | 2666 | local cassandra = require "cassandra"
local stringy = require "stringy"
local BaseDao = require "kong.dao.cassandra.base_dao"
local Migrations = BaseDao:extend()
function Migrations:new(properties)
self._table = "schema_migrations"
self.queries = {
add_migration = [[
UPDATE schema_migrations SET migrations = migrations + ? WHERE id = 'migrations';
]],
get_keyspace = [[
SELECT * FROM system.schema_keyspaces WHERE keyspace_name = ?;
]],
get_migrations = [[
SELECT migrations FROM schema_migrations WHERE id = 'migrations';
]],
delete_migration = [[
UPDATE schema_migrations SET migrations = migrations - ? WHERE id = 'migrations';
]]
}
Migrations.super.new(self, properties)
end
-- Log (add) given migration to schema_migrations table.
-- @param migration_name Name of the migration to log
-- @return query result
-- @return error if any
function Migrations:add_migration(migration_name)
return Migrations.super._execute(self, self.queries.add_migration,
{ cassandra.list({ migration_name }) })
end
-- Return all logged migrations if any. Check if keyspace exists before to avoid error during the first migration.
-- @return A list of previously executed migration (as strings)
-- @return error if any
function Migrations:get_migrations()
local rows, err
rows, err = Migrations.super._execute(self, self.queries.get_keyspace,
{ self._properties.keyspace }, nil, "system")
if err then
return nil, err
elseif #rows == 0 then
-- keyspace is not yet created, this is the first migration
return nil
end
rows, err = Migrations.super._execute(self, self.queries.get_migrations)
if err and stringy.find(err.message, "unconfigured columnfamily schema_migrations") ~= nil then
return nil, "Missing mandatory column family \"schema_migrations\" in configured keyspace. Please consider running \"kong migrations reset\" to fix this."
elseif err then
return nil, err
elseif rows and #rows > 0 then
return rows[1].migrations
end
end
-- Unlog (delete) given migration from the schema_migrations table.
-- @return query result
-- @return error if any
function Migrations:delete_migration(migration_name)
return Migrations.super._execute(self, self.queries.delete_migration,
{ cassandra.list({ migration_name }) })
end
-- Drop the entire keyspace
-- @param `keyspace` Name of the keyspace to drop
-- @return query result
function Migrations:drop_keyspace(keyspace)
return Migrations.super._execute(self, string.format("DROP keyspace \"%s\"", keyspace))
end
function Migrations:drop()
-- never drop this
end
return { migrations = Migrations }
| mit |
AdamGagorik/darkstar | scripts/globals/spells/aspir_ii.lua | 21 | 1315 | -----------------------------------------
-- Spell: Aspir
-- Drain functions only on skill level!!
-----------------------------------------
require("scripts/globals/magic");
require("scripts/globals/status");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function onMagicCastingCheck(caster,target,spell)
return 0;
end;
function onSpellCast(caster,target,spell)
local dmg = 10 + 0.575 * (caster:getSkillLevel(DARK_MAGIC_SKILL) + caster:getMod(79 + DARK_MAGIC_SKILL));
--get resist multiplier (1x if no resist)
local resist = applyResistance(caster,spell,target,caster:getStat(MOD_INT)-target:getStat(MOD_INT),DARK_MAGIC_SKILL,1.0);
--get the resisted damage
dmg = dmg*resist;
--add on bonuses (staff/day/weather/jas/mab/etc all go in this function)
dmg = addBonuses(caster,spell,target,dmg);
--add in target adjustment
dmg = adjustForTarget(target,dmg,spell:getElement());
--add in final adjustments
if (target:isUndead()) then
spell:setMsg(75); -- No effect
return dmg;
end
if (target:getMP() > dmg) then
caster:addMP(dmg);
target:delMP(dmg);
else
dmg = target:getMP();
caster:addMP(dmg);
target:delMP(dmg);
end
return dmg;
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Bastok_Mines/npcs/Proud_Beard.lua | 13 | 1668 | -----------------------------------
-- Area: Bastok Mines
-- NPC: Proud Beard
-- Standard Merchant NPC
-----------------------------------
require("scripts/globals/shop");
package.loaded["scripts/zones/Bastok_Mines/TextIDs"] = nil;
require("scripts/zones/Bastok_Mines/TextIDs");
require("scripts/globals/events/harvest_festivals");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
onHalloweenTrade(player,trade,npc)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:showText(npc,PROUDBEARD_SHOP_DIALOG);
stock = {
0x3157, 276, --Hume Tunic
0x3158, 276, --Hume Vest
0x31D2, 165, --Hume M Gloves
0x31D8, 165, --Hume F Gloves
0x3253, 239, --Hume Slacks
0x3254, 239, --Hume Pants
0x32CD, 165, --Hume M Boots
0x32D2, 165, --Hume F Boots
0x315D, 276, --Galkan Surcoat
0x31D6, 165, --Galkan Bracers
0x3258, 239, --Galkan Braguette
0x32D1, 165 --Galkan Sandals
}
showShop(player, STATIC, stock);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Metalworks/npcs/Fariel.lua | 13 | 2130 | -----------------------------------
-- Area: Metalworks
-- NPC: Fariel
-- Type: Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Metalworks/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Metalworks/TextIDs");
require("scripts/globals/pathfind");
local path = {
53.551208, -14.000000, -7.162227,
54.111534, -14.000000, -6.227105,
54.075279, -14.000000, -5.139729,
53.565350, -14.000000, 6.000605,
52.636345, -14.000000, 6.521872,
51.561535, -14.000000, 6.710593,
50.436523, -14.000000, 6.835652,
41.754219, -14.000000, 7.686310,
41.409531, -14.000000, 6.635177,
41.351002, -14.000000, 5.549131,
41.341057, -14.000000, 4.461191,
41.338020, -14.000000, -9.138797,
42.356136, -14.000000, -9.449953,
43.442558, -14.000000, -9.409095,
44.524868, -14.000000, -9.298069,
53.718494, -14.000000, -8.260445,
54.082706, -14.000000, -7.257769,
54.110283, -14.000000, -6.170790,
54.073116, -14.000000, -5.083439,
53.556625, -14.000000, 6.192736,
52.545383, -14.000000, 6.570893,
51.441212, -14.000000, 6.730487,
50.430820, -14.000000, 6.836911,
41.680725, -14.000000, 7.693455,
41.396103, -14.000000, 6.599321,
41.349224, -14.000000, 5.512603,
41.340771, -14.000000, 4.424644
};
function onSpawn(npc)
npc:initNpcAi();
npc:setPos(pathfind.first(path));
onPath(npc);
end;
function onPath(npc)
pathfind.patrol(npc, path);
end;
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:startEvent(0x02C2);
npc:wait(-1);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option,npc)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
npc:wait(0);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Windurst_Waters/npcs/Jourille.lua | 16 | 1510 | -----------------------------------
-- Area: Windurst Waters
-- NPC: Jourille
-- Only sells when Windurst controlls Ronfaure Region
-- Confirmed shop stock, August 2013
-----------------------------------
require("scripts/globals/shop");
require("scripts/globals/conquest");
package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil;
require("scripts/zones/Windurst_Waters/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
RegionOwner = GetRegionOwner(RONFAURE);
if (RegionOwner ~= WINDURST) then
player:showText(npc,JOURILLE_CLOSED_DIALOG);
else
player:showText(npc,JOURILLE_OPEN_DIALOG);
stock = {
0x027F, 110, --Chestnut
0x1125, 29, --San d'Orian Carrot
0x0262, 55, --San d'Orian Flour
0x114F, 69, --San d'Orian Grape
}
showShop(player,WINDURST,stock);
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Chamber_of_Oracles/npcs/Pedestal_of_Lightning.lua | 13 | 2410 | -----------------------------------
-- Area: Chamber of Oracles
-- NPC: Pedestal of Lightning
-- Involved in Zilart Mission 7
-- @pos 199 -2 36 168
-------------------------------------
package.loaded["scripts/zones/Chamber_of_Oracles/TextIDs"] = nil;
-------------------------------------
require("scripts/globals/titles");
require("scripts/globals/keyitems");
require("scripts/globals/missions");
require("scripts/zones/Chamber_of_Oracles/TextIDs");
-------------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
local ZilartStatus = player:getVar("ZilartStatus");
if (player:getCurrentMission(ZILART) == THE_CHAMBER_OF_ORACLES) then
if (player:hasKeyItem(LIGHTNING_FRAGMENT)) then
player:delKeyItem(LIGHTNING_FRAGMENT);
player:setVar("ZilartStatus",ZilartStatus + 32);
player:messageSpecial(YOU_PLACE_THE,LIGHTNING_FRAGMENT);
if (ZilartStatus == 255) then
player:startEvent(0x0001);
end
elseif (ZilartStatus == 255) then -- Execute cutscene if the player is interrupted.
player:startEvent(0x0001);
else
player:messageSpecial(IS_SET_IN_THE_PEDESTAL,LIGHTNING_FRAGMENT);
end
elseif (player:hasCompletedMission(ZILART,THE_CHAMBER_OF_ORACLES)) then
player:messageSpecial(HAS_LOST_ITS_POWER,LIGHTNING_FRAGMENT);
else
player:messageSpecial(PLACED_INTO_THE_PEDESTAL);
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("onUpdate CSID: %u",csid);
--printf("onUpdate RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish Action
-----------------------------------
function onEventFinish(player,csid,option)
--printf("onFinish CSID: %u",csid);
--printf("onFinish RESULT: %u",option);
if (csid == 0x0001) then
player:addTitle(LIGHTWEAVER);
player:setVar("ZilartStatus",0);
player:addKeyItem(PRISMATIC_FRAGMENT);
player:messageSpecial(KEYITEM_OBTAINED,PRISMATIC_FRAGMENT);
player:completeMission(ZILART,THE_CHAMBER_OF_ORACLES);
player:addMission(ZILART,RETURN_TO_DELKFUTTS_TOWER);
end
end;
| gpl-3.0 |
mohammad25253/seed238 | plugins/LinkPv.lua | 46 | 31163 | do
local function check_member(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration
data[tostring(msg.to.id)] = {
moderators = {},
set_owner = member_id ,
settings = {
set_name = string.gsub(msg.to.print_name, '_', ' '),
lock_name = 'yes',
lock_photo = 'no',
lock_member = 'no',
flood = 'yes'
}
}
save_data(_config.moderation.data, data)
local groups = 'groups'
if not data[tostring(groups)] then
data[tostring(groups)] = {}
save_data(_config.moderation.data, data)
end
data[tostring(groups)][tostring(msg.to.id)] = msg.to.id
save_data(_config.moderation.data, data)
return send_large_msg(receiver, 'You have been promoted as the owner.')
end
end
end
local function check_member_modadd(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration
data[tostring(msg.to.id)] = {
moderators = {},
set_owner = member_id ,
settings = {
set_name = string.gsub(msg.to.print_name, '_', ' '),
lock_name = 'yes',
lock_photo = 'no',
lock_member = 'no',
flood = 'yes'
}
}
save_data(_config.moderation.data, data)
local groups = 'groups'
if not data[tostring(groups)] then
data[tostring(groups)] = {}
save_data(_config.moderation.data, data)
end
data[tostring(groups)][tostring(msg.to.id)] = msg.to.id
save_data(_config.moderation.data, data)
return send_large_msg(receiver, 'Group is added and you have been promoted as the owner ')
end
end
end
local function automodadd(msg)
local data = load_data(_config.moderation.data)
if msg.action.type == 'chat_created' then
receiver = get_receiver(msg)
chat_info(receiver, check_member,{receiver=receiver, data=data, msg = msg})
end
end
local function check_member_modrem(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration removal
data[tostring(msg.to.id)] = nil
save_data(_config.moderation.data, data)
local groups = 'groups'
if not data[tostring(groups)] then
data[tostring(groups)] = nil
save_data(_config.moderation.data, data)
end
data[tostring(groups)][tostring(msg.to.id)] = nil
save_data(_config.moderation.data, data)
return send_large_msg(receiver, 'Group has been removed')
end
end
end
local function show_group_settingsmod(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local data = load_data(_config.moderation.data)
if data[tostring(msg.to.id)] then
if data[tostring(msg.to.id)]['settings']['flood_msg_max'] then
NUM_MSG_MAX = tonumber(data[tostring(msg.to.id)]['settings']['flood_msg_max'])
print('custom'..NUM_MSG_MAX)
else
NUM_MSG_MAX = 5
end
end
local bots_protection = "Yes"
if data[tostring(msg.to.id)]['settings']['lock_bots'] then
bots_protection = data[tostring(msg.to.id)]['settings']['lock_bots']
end
local settings = data[tostring(target)]['settings']
local text = "Group settings:\nLock group name : "..settings.lock_name.."\nLock group photo : "..settings.lock_photo.."\nLock group member : "..settings.lock_member.."\nflood sensitivity : "..NUM_MSG_MAX.."\nBot protection : "..bots_protection
return text
end
local function set_descriptionmod(msg, data, target, about)
if not is_momod(msg) then
return "For moderators only!"
end
local data_cat = 'description'
data[tostring(target)][data_cat] = about
save_data(_config.moderation.data, data)
return 'Set group description to:\n'..about
end
local function get_description(msg, data)
local data_cat = 'description'
if not data[tostring(msg.to.id)][data_cat] then
return 'No description available.'
end
local about = data[tostring(msg.to.id)][data_cat]
local about = string.gsub(msg.to.print_name, "_", " ")..':\n\n'..about
return 'About '..about
end
local function lock_group_arabic(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local group_arabic_lock = data[tostring(target)]['settings']['lock_arabic']
if group_arabic_lock == 'yes' then
return 'Arabic is already locked'
else
data[tostring(target)]['settings']['lock_arabic'] = 'yes'
save_data(_config.moderation.data, data)
return 'Arabic has been locked'
end
end
local function unlock_group_arabic(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local group_arabic_lock = data[tostring(target)]['settings']['lock_arabic']
if group_arabic_lock == 'no' then
return 'Arabic is already unlocked'
else
data[tostring(target)]['settings']['lock_arabic'] = 'no'
save_data(_config.moderation.data, data)
return 'Arabic has been unlocked'
end
end
local function lock_group_bots(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local group_bots_lock = data[tostring(target)]['settings']['lock_bots']
if group_bots_lock == 'yes' then
return 'Bots protection is already enabled'
else
data[tostring(target)]['settings']['lock_bots'] = 'yes'
save_data(_config.moderation.data, data)
return 'Bots protection has been enabled'
end
end
local function unlock_group_bots(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local group_bots_lock = data[tostring(target)]['settings']['lock_bots']
if group_bots_lock == 'no' then
return 'Bots protection is already disabled'
else
data[tostring(target)]['settings']['lock_bots'] = 'no'
save_data(_config.moderation.data, data)
return 'Bots protection has been disabled'
end
end
local function lock_group_namemod(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
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']['lock_name'] = 'yes'
save_data(_config.moderation.data, data)
rename_chat('chat#id'..target, group_name_set, ok_cb, false)
return 'Group name has been locked'
end
end
local function unlock_group_namemod(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local group_name_set = data[tostring(target)]['settings']['set_name']
local group_name_lock = data[tostring(target)]['settings']['lock_name']
if group_name_lock == 'no' then
return 'Group name is already unlocked'
else
data[tostring(target)]['settings']['lock_name'] = 'no'
save_data(_config.moderation.data, data)
return 'Group name has been unlocked'
end
end
local function lock_group_floodmod(msg, data, target)
if not is_owner(msg) then
return "Only admins can do it for now"
end
local group_flood_lock = data[tostring(target)]['settings']['flood']
if group_flood_lock == 'yes' then
return 'Group flood is locked'
else
data[tostring(target)]['settings']['flood'] = 'yes'
save_data(_config.moderation.data, data)
return 'Group flood has been locked'
end
end
local function unlock_group_floodmod(msg, data, target)
if not is_owner(msg) then
return "Only admins can do it for now"
end
local group_flood_lock = data[tostring(target)]['settings']['flood']
if group_flood_lock == 'no' then
return 'Group flood is not locked'
else
data[tostring(target)]['settings']['flood'] = 'no'
save_data(_config.moderation.data, data)
return 'Group flood has been unlocked'
end
end
local function lock_group_membermod(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local group_member_lock = data[tostring(target)]['settings']['lock_member']
if group_member_lock == 'yes' then
return 'Group members are already locked'
else
data[tostring(target)]['settings']['lock_member'] = 'yes'
save_data(_config.moderation.data, data)
end
return 'Group members has been locked'
end
local function unlock_group_membermod(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local group_member_lock = data[tostring(target)]['settings']['lock_member']
if group_member_lock == 'no' then
return 'Group members are not locked'
else
data[tostring(target)]['settings']['lock_member'] = 'no'
save_data(_config.moderation.data, data)
return 'Group members has been unlocked'
end
end
local function unlock_group_photomod(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local group_photo_lock = data[tostring(target)]['settings']['lock_photo']
if group_photo_lock == 'no' then
return 'Group photo is not locked'
else
data[tostring(target)]['settings']['lock_photo'] = 'no'
save_data(_config.moderation.data, data)
return 'Group photo has been unlocked'
end
end
local function set_rulesmod(msg, data, target)
if not is_momod(msg) then
return "For moderators only!"
end
local data_cat = 'rules'
data[tostring(target)][data_cat] = rules
save_data(_config.moderation.data, data)
return 'Set group rules to:\n'..rules
end
local function modadd(msg)
-- superuser and admins only (because sudo are always has privilege)
if not is_admin(msg) then
return "You're not admin"
end
local data = load_data(_config.moderation.data)
if data[tostring(msg.to.id)] then
return 'Group is already added.'
end
receiver = get_receiver(msg)
chat_info(receiver, check_member_modadd,{receiver=receiver, data=data, msg = msg})
end
local function modrem(msg)
-- superuser and admins only (because sudo are always has privilege)
if not is_admin(msg) then
return "You're not admin"
end
local data = load_data(_config.moderation.data)
if not data[tostring(msg.to.id)] then
return 'Group is not added.'
end
receiver = get_receiver(msg)
chat_info(receiver, check_member_modrem,{receiver=receiver, data=data, msg = msg})
end
local function get_rules(msg, data)
local data_cat = 'rules'
if not data[tostring(msg.to.id)][data_cat] then
return 'No rules available.'
end
local rules = data[tostring(msg.to.id)][data_cat]
local rules = 'Chat rules:\n'..rules
return rules
end
local function set_group_photo(msg, success, result)
local data = load_data(_config.moderation.data)
local receiver = get_receiver(msg)
if success then
local file = 'data/photos/chat_photo_'..msg.to.id..'.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
chat_set_photo (receiver, file, ok_cb, false)
data[tostring(msg.to.id)]['settings']['set_photo'] = file
save_data(_config.moderation.data, data)
data[tostring(msg.to.id)]['settings']['lock_photo'] = 'yes'
save_data(_config.moderation.data, data)
send_large_msg(receiver, 'Photo saved!', ok_cb, false)
else
print('Error downloading: '..msg.id)
send_large_msg(receiver, 'Failed, please try again!', ok_cb, false)
end
end
local function promote(receiver, member_username, member_id)
local data = load_data(_config.moderation.data)
local group = string.gsub(receiver, 'chat#id', '')
if not data[group] then
return send_large_msg(receiver, 'Group is not added.')
end
if data[group]['moderators'][tostring(member_id)] then
return send_large_msg(receiver, member_username..' is already a moderator.')
end
data[group]['moderators'][tostring(member_id)] = member_username
save_data(_config.moderation.data, data)
return send_large_msg(receiver, '@'..member_username..' has been promoted.')
end
local function demote(receiver, member_username, member_id)
local data = load_data(_config.moderation.data)
local group = string.gsub(receiver, 'chat#id', '')
if not data[group] then
return send_large_msg(receiver, 'Group is not added.')
end
if not data[group]['moderators'][tostring(member_id)] then
return send_large_msg(receiver, member_username..' is not a moderator.')
end
data[group]['moderators'][tostring(member_id)] = nil
save_data(_config.moderation.data, data)
return send_large_msg(receiver, '@'..member_username..' has been demoted.')
end
local function username_id(cb_extra, success, result)
local mod_cmd = cb_extra.mod_cmd
local receiver = cb_extra.receiver
local member = cb_extra.member
local text = 'No user @'..member..' in this group.'
for k,v in pairs(result.members) do
vusername = v.username
if vusername == member then
member_username = member
member_id = v.id
if mod_cmd == 'promote' then
return promote(receiver, member_username, member_id)
elseif mod_cmd == 'demote' then
return demote(receiver, member_username, member_id)
end
end
end
send_large_msg(receiver, text)
end
local function modlist(msg)
local data = load_data(_config.moderation.data)
if not data[tostring(msg.to.id)] then
return 'Group is not added.'
end
-- determine if table is empty
if next(data[tostring(msg.to.id)]['moderators']) == nil then --fix way
return 'No moderator in this group.'
end
local i = 1
local message = '\nList of moderators for ' .. string.gsub(msg.to.print_name, '_', ' ') .. ':\n'
for k,v in pairs(data[tostring(msg.to.id)]['moderators']) do
message = message ..i..' - @'..v..' [' ..k.. '] \n'
i = i + 1
end
return message
end
local function callbackres(extra, success, result)
local user = result.id
local name = string.gsub(result.print_name, "_", " ")
local chat = 'chat#id'..extra.chatid
send_large_msg(chat, user..'\n'..name)
return user
end
local function help()
local help_text = tostring(_config.help_text)
return help_text
end
local function cleanmember(cb_extra, success, result)
local receiver = cb_extra.receiver
local chat_id = "chat#id"..result.id
local chatname = result.print_name
if success == -1 then
return send_large_msg(receiver, '*Error: Invite link failed* \nReason: Not creator.')
end
for k,v in pairs(result.members) do
kick_user(v.id, result.id)
end
end
local function run(msg, matches)
local data = load_data(_config.moderation.data)
local receiver = get_receiver(msg)
local name_log = user_print_name(msg.from)
local group = msg.to.id
if msg.media then
if msg.media.type == 'photo' and data[tostring(msg.to.id)]['settings']['set_photo'] == 'waiting' and is_chat_msg(msg) and is_momod(msg) then
load_photo(msg.id, set_group_photo, msg)
end
end
if matches[1] == 'add' then
print("group "..msg.to.print_name.."("..msg.to.id..") added")
return modadd(msg)
end
if matches[1] == 'rem' then
print("group "..msg.to.print_name.."("..msg.to.id..") removed")
return modrem(msg)
end
if matches[1] == 'chat_created' and msg.from.id == 0 then
return automodadd(msg)
end
if msg.to.id and data[tostring(msg.to.id)] then
local settings = data[tostring(msg.to.id)]['settings']
if matches[1] == 'chat_add_user' then
if not msg.service then
return "Are you trying to troll me?"
end
local group_member_lock = settings.lock_member
local user = 'user#id'..msg.action.user.id
local chat = 'chat#id'..msg.to.id
if group_member_lock == 'yes' and not is_owner2(msg.action.user.id, msg.to.id) then
chat_del_user(chat, user, ok_cb, true)
elseif group_member_lock == 'yes' and tonumber(msg.from.id) == tonumber(our_id) then
return nil
elseif group_member_lock == 'no' then
return nil
end
end
if matches[1] == 'chat_add_user' then
if not msg.service then
return "Are you trying to troll me?"
end
local receiver = 'user#id'..msg.action.user.id
local data_cat = 'rules'
if not data[tostring(msg.to.id)][data_cat] then
return false
end
local rules = data[tostring(msg.to.id)][data_cat]
local rules = 'Welcome to "' .. string.gsub(msg.to.print_name, '_', ' ') ..'" this group has rules that you should follow:\n'..rules
savelog(msg.to.id, name_log.." ["..msg.from.id.."] deleted user "..msg.action.user.id)
send_large_msg(receiver, rules)
end
if matches[1] == 'chat_del_user' then
if not msg.service then
return "Are you trying to troll me?"
end
local user = 'user#id'..msg.action.user.id
local chat = 'chat#id'..msg.to.id
savelog(msg.to.id, name_log.." ["..msg.from.id.."] deleted user "..user)
end
if matches[1] == 'chat_delete_photo' then
if not msg.service then
return "Are you trying to troll me?"
end
local group_photo_lock = settings.lock_photo
if group_photo_lock == 'yes' then
local picturehash = 'picture:changed:'..msg.to.id..':'..msg.from.id
redis:incr(picturehash)
---
local picturehash = 'picture:changed:'..msg.to.id..':'..msg.from.id
local picprotectionredis = redis:get(picturehash)
if picprotectionredis then
if tonumber(picprotectionredis) == 4 and not is_owner(msg) then
kick_user(msg.from.id, msg.to.id)
end
if tonumber(picprotectionredis) == 8 and not is_owner(msg) then
ban_user(msg.from.id, msg.to.id)
local picturehash = 'picture:changed:'..msg.to.id..':'..msg.from.id
redis:set(picturehash, 0)
end
end
savelog(msg.to.id, name_log.." ["..msg.from.id.."] tried to deleted picture but failed ")
chat_set_photo(receiver, settings.set_photo, ok_cb, false)
elseif group_photo_lock == 'no' then
return nil
end
end
if matches[1] == 'chat_change_photo' and msg.from.id ~= 0 then
if not msg.service then
return "Are you trying to troll me?"
end
local group_photo_lock = settings.lock_photo
if group_photo_lock == 'yes' then
local picturehash = 'picture:changed:'..msg.to.id..':'..msg.from.id
redis:incr(picturehash)
---
local picturehash = 'picture:changed:'..msg.to.id..':'..msg.from.id
local picprotectionredis = redis:get(picturehash)
if picprotectionredis then
if tonumber(picprotectionredis) == 4 and not is_owner(msg) then
kick_user(msg.from.id, msg.to.id)
end
if tonumber(picprotectionredis) == 8 and not is_owner(msg) then
ban_user(msg.from.id, msg.to.id)
local picturehash = 'picture:changed:'..msg.to.id..':'..msg.from.id
redis:set(picturehash, 0)
end
end
savelog(msg.to.id, name_log.." ["..msg.from.id.."] tried to change picture but failed ")
chat_set_photo(receiver, settings.set_photo, ok_cb, false)
elseif group_photo_lock == 'no' then
return nil
end
end
if matches[1] == 'chat_rename' then
if not msg.service then
return "Are you trying to troll me?"
end
local group_name_set = settings.set_name
local group_name_lock = settings.lock_name
local to_rename = 'chat#id'..msg.to.id
if group_name_lock == 'yes' then
if group_name_set ~= tostring(msg.to.print_name) then
local namehash = 'name:changed:'..msg.to.id..':'..msg.from.id
redis:incr(namehash)
local namehash = 'name:changed:'..msg.to.id..':'..msg.from.id
local nameprotectionredis = redis:get(namehash)
if nameprotectionredis then
if tonumber(nameprotectionredis) == 4 and not is_owner(msg) then
kick_user(msg.from.id, msg.to.id)
end
if tonumber(nameprotectionredis) == 8 and not is_owner(msg) then
ban_user(msg.from.id, msg.to.id)
local namehash = 'name:changed:'..msg.to.id..':'..msg.from.id
redis:set(namehash, 0)
end
end
savelog(msg.to.id, name_log.." ["..msg.from.id.."] tried to change name but failed ")
rename_chat(to_rename, group_name_set, ok_cb, false)
end
elseif group_name_lock == 'no' then
return nil
end
end
if matches[1] == 'setname' and is_momod(msg) then
local new_name = string.gsub(matches[2], '_', ' ')
data[tostring(msg.to.id)]['settings']['set_name'] = new_name
save_data(_config.moderation.data, data)
local group_name_set = data[tostring(msg.to.id)]['settings']['set_name']
local to_rename = 'chat#id'..msg.to.id
rename_chat(to_rename, group_name_set, ok_cb, false)
savelog(msg.to.id, "Group { "..msg.to.print_name.." } name changed to [ "..new_name.." ] by "..name_log.." ["..msg.from.id.."]")
end
if matches[1] == 'setphoto' and is_momod(msg) then
data[tostring(msg.to.id)]['settings']['set_photo'] = 'waiting'
save_data(_config.moderation.data, data)
return 'Please send me new group photo now'
end
if matches[1] == 'promote' and matches[2] then
if not is_owner(msg) then
return "Only owner can promote"
end
local member = string.gsub(matches[2], "@", "")
local mod_cmd = 'promote'
savelog(msg.to.id, name_log.." ["..msg.from.id.."] promoted @".. member)
chat_info(receiver, username_id, {mod_cmd= mod_cmd, receiver=receiver, member=member})
end
if matches[1] == 'demote' and matches[2] then
if not is_owner(msg) then
return "Only owner can demote"
end
if string.gsub(matches[2], "@", "") == msg.from.username then
return "You can't demote yourself"
end
local member = string.gsub(matches[2], "@", "")
local mod_cmd = 'demote'
savelog(msg.to.id, name_log.." ["..msg.from.id.."] demoted @".. member)
chat_info(receiver, username_id, {mod_cmd= mod_cmd, receiver=receiver, member=member})
end
if matches[1] == 'modlist' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] requested group modlist")
return modlist(msg)
end
if matches[1] == 'about' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] requested group description")
return get_description(msg, data)
end
if matches[1] == 'rules' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] requested group rules")
return get_rules(msg, data)
end
if matches[1] == 'set' then
if matches[2] == 'rules' then
rules = matches[3]
local target = msg.to.id
savelog(msg.to.id, name_log.." ["..msg.from.id.."] has changed group rules to ["..matches[3].."]")
return set_rulesmod(msg, data, target)
end
if matches[2] == 'about' then
local data = load_data(_config.moderation.data)
local target = msg.to.id
local about = matches[3]
savelog(msg.to.id, name_log.." ["..msg.from.id.."] has changed group description to ["..matches[3].."]")
return set_descriptionmod(msg, data, target, about)
end
end
if matches[1] == 'lock' then
local target = msg.to.id
if matches[2] == 'name' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] locked name ")
return lock_group_namemod(msg, data, target)
end
if matches[2] == 'member' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] locked member ")
return lock_group_membermod(msg, data, target)
end
if matches[2] == 'flood' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] locked flood ")
return lock_group_floodmod(msg, data, target)
end
if matches[2] == 'arabic' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] locked arabic ")
return lock_group_arabic(msg, data, target)
end
if matches[2] == 'bots' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] locked bots ")
return lock_group_bots(msg, data, target)
end
end
if matches[1] == 'unlock' then
local target = msg.to.id
if matches[2] == 'name' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] unlocked name ")
return unlock_group_namemod(msg, data, target)
end
if matches[2] == 'member' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] unlocked member ")
return unlock_group_membermod(msg, data, target)
end
if matches[2] == 'photo' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] unlocked photo ")
return unlock_group_photomod(msg, data, target)
end
if matches[2] == 'flood' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] unlocked flood ")
return unlock_group_floodmod(msg, data, target)
end
if matches[2] == 'arabic' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] unlocked arabic ")
return unlock_group_arabic(msg, data, target)
end
if matches[2] == 'bots' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] unlocked bots ")
return unlock_group_bots(msg, data, target)
end
end
if matches[1] == 'settings' then
local target = msg.to.id
savelog(msg.to.id, name_log.." ["..msg.from.id.."] requested group settings ")
return show_group_settingsmod(msg, data, target)
end
if matches[1] == 'newlink' then
if not is_momod(msg) then
return "For moderators only!"
end
local function callback (extra , success, result)
local receiver = 'chat#'..msg.to.id
if success == 0 then
return send_large_msg(receiver, '*Error: Invite link failed* \nReason: Not creator.')
end
send_large_msg(receiver, "Created a new link")
data[tostring(msg.to.id)]['settings']['set_link'] = result
save_data(_config.moderation.data, data)
end
local receiver = 'chat#'..msg.to.id
savelog(msg.to.id, name_log.." ["..msg.from.id.."] revoked group link ")
return export_chat_link(receiver, callback, true)
end
if matches[1] == 'linkpv' then
if not is_momod(msg) then
return "For moderators only!"
end
local group_link = data[tostring(msg.to.id)]['settings']['set_link']
if not group_link then
return "Create a link using /newlink first !"
end
savelog(msg.to.id, name_log.." ["..msg.from.id.."] requested group link ["..group_link.."]")
send_large_msg('user#id'..msg.from.id, "Group link:\n"..group_link)
end
if matches[1] == 'setowner' then
if not is_owner(msg) then
return "For owner only!"
end
data[tostring(msg.to.id)]['set_owner'] = matches[2]
save_data(_config.moderation.data, data)
savelog(msg.to.id, name_log.." ["..msg.from.id.."] set ["..matches[2].."] as owner")
local text = matches[2].." added as owner"
return text
end
if matches[1] == 'owner' then
local group_owner = data[tostring(msg.to.id)]['set_owner']
if not group_owner then
return "no owner,ask admins in support groups to set owner for your group"
end
savelog(msg.to.id, name_log.." ["..msg.from.id.."] used /owner")
return "Group owner is ["..group_owner..']'
end
if matches[1] == 'setgpowner' then
local receiver = "chat#id"..matches[2]
if not is_admin(msg) then
return "For admins only!"
end
data[tostring(matches[2])]['set_owner'] = matches[3]
save_data(_config.moderation.data, data)
local text = matches[3].." added as owner"
send_large_msg(receiver, text)
return
end
if matches[1] == 'setflood' then
if not is_momod(msg) then
return "For moderators only!"
end
if tonumber(matches[2]) < 5 or tonumber(matches[2]) > 20 then
return "Wrong number,range is [5-20]"
end
local flood_max = matches[2]
data[tostring(msg.to.id)]['settings']['flood_msg_max'] = flood_max
save_data(_config.moderation.data, data)
savelog(msg.to.id, name_log.." ["..msg.from.id.."] set flood to ["..matches[2].."]")
return 'Group flood has been set to '..matches[2]
end
if matches[1] == 'clean' then
if not is_owner(msg) then
return "Only owner can clean"
end
if matches[2] == 'member' then
if not is_owner(msg) then
return "Only admins can clean members"
end
local receiver = get_receiver(msg)
chat_info(receiver, cleanmember, {receiver=receiver})
end
if matches[2] == 'modlist' then
if next(data[tostring(msg.to.id)]['moderators']) == nil then --fix way
return 'No moderator in this group.'
end
local message = '\nList of moderators for ' .. string.gsub(msg.to.print_name, '_', ' ') .. ':\n'
for k,v in pairs(data[tostring(msg.to.id)]['moderators']) do
data[tostring(msg.to.id)]['moderators'][tostring(k)] = nil
save_data(_config.moderation.data, data)
end
savelog(msg.to.id, name_log.." ["..msg.from.id.."] cleaned modlist")
end
if matches[2] == 'rules' then
local data_cat = 'rules'
data[tostring(msg.to.id)][data_cat] = nil
save_data(_config.moderation.data, data)
savelog(msg.to.id, name_log.." ["..msg.from.id.."] cleaned rules")
end
if matches[2] == 'about' then
local data_cat = 'description'
data[tostring(msg.to.id)][data_cat] = nil
save_data(_config.moderation.data, data)
savelog(msg.to.id, name_log.." ["..msg.from.id.."] cleaned about")
end
end
if matches[1] == 'help' then
if not is_momod(msg) then
return
end
savelog(msg.to.id, name_log.." ["..msg.from.id.."] Used /help")
return help()
end
if matches[1] == 'res' and is_momod(msg) then
local cbres_extra = {
chatid = msg.to.id
}
local username = matches[2]
local username = username:gsub("@","")
savelog(msg.to.id, name_log.." ["..msg.from.id.."] Used /res "..username)
return res_user(username, callbackres, cbres_extra)
end
end
end
return {
patterns = {
"^[!/](linkpv)$",
"%[(photo)%]",
"^!!tgservice (.+)$",
},
run = run
}
end
--Iwas Lazy So I Just Removed Patterns And Didn't Del Junk Items
--https://github.com/ThisIsArman
--Telegram.me/ThisIsArman
| gpl-2.0 |
wez2020/roh | plugins/inrealm.lua | 287 | 25005 | -- data saved to moderation.json
-- check moderation plugin
do
local function create_group(msg)
-- superuser and admins only (because sudo are always has privilege)
if is_sudo(msg) or is_realm(msg) and is_admin(msg) then
local group_creator = msg.from.print_name
create_group_chat (group_creator, group_name, ok_cb, false)
return 'Group [ '..string.gsub(group_name, '_', ' ')..' ] has been created.'
end
end
local function create_realm(msg)
-- superuser and admins only (because sudo are always has privilege)
if is_sudo(msg) or is_realm(msg) and is_admin(msg) then
local group_creator = msg.from.print_name
create_group_chat (group_creator, group_name, ok_cb, false)
return 'Realm [ '..string.gsub(group_name, '_', ' ')..' ] has been created.'
end
end
local function killchat(cb_extra, success, result)
local receiver = cb_extra.receiver
local chat_id = "chat#id"..result.id
local chatname = result.print_name
for k,v in pairs(result.members) do
kick_user_any(v.id, result.id)
end
end
local function killrealm(cb_extra, success, result)
local receiver = cb_extra.receiver
local chat_id = "chat#id"..result.id
local chatname = result.print_name
for k,v in pairs(result.members) do
kick_user_any(v.id, result.id)
end
end
local function get_group_type(msg)
local data = load_data(_config.moderation.data)
if data[tostring(msg.to.id)] then
if not data[tostring(msg.to.id)]['group_type'] then
return 'No group type available.'
end
local group_type = data[tostring(msg.to.id)]['group_type']
return group_type
else
return 'Chat type not found.'
end
end
local function callbackres(extra, success, result)
--vardump(result)
local user = result.id
local name = string.gsub(result.print_name, "_", " ")
local chat = 'chat#id'..extra.chatid
send_large_msg(chat, user..'\n'..name)
return user
end
local function set_description(msg, data, target, about)
if not is_admin(msg) then
return "For admins only!"
end
local data_cat = 'description'
data[tostring(target)][data_cat] = about
save_data(_config.moderation.data, data)
return 'Set group description to:\n'..about
end
local function set_rules(msg, data, target)
if not is_admin(msg) then
return "For admins only!"
end
local data_cat = 'rules'
data[tostring(target)][data_cat] = rules
save_data(_config.moderation.data, data)
return 'Set group rules to:\n'..rules
end
-- lock/unlock group name. bot automatically change group name when locked
local function lock_group_name(msg, data, target)
if not is_admin(msg) then
return "For admins only!"
end
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']['lock_name'] = 'yes'
save_data(_config.moderation.data, data)
rename_chat('chat#id'..target, group_name_set, ok_cb, false)
return 'Group name has been locked'
end
end
local function unlock_group_name(msg, data, target)
if not is_admin(msg) then
return "For admins only!"
end
local group_name_set = data[tostring(target)]['settings']['set_name']
local group_name_lock = data[tostring(target)]['settings']['lock_name']
if group_name_lock == 'no' then
return 'Group name is already unlocked'
else
data[tostring(target)]['settings']['lock_name'] = 'no'
save_data(_config.moderation.data, data)
return 'Group name has been unlocked'
end
end
--lock/unlock group member. bot automatically kick new added user when locked
local function lock_group_member(msg, data, target)
if not is_admin(msg) then
return "For admins only!"
end
local group_member_lock = data[tostring(target)]['settings']['lock_member']
if group_member_lock == 'yes' then
return 'Group members are already locked'
else
data[tostring(target)]['settings']['lock_member'] = 'yes'
save_data(_config.moderation.data, data)
end
return 'Group members has been locked'
end
local function unlock_group_member(msg, data, target)
if not is_admin(msg) then
return "For admins only!"
end
local group_member_lock = data[tostring(target)]['settings']['lock_member']
if group_member_lock == 'no' then
return 'Group members are not locked'
else
data[tostring(target)]['settings']['lock_member'] = 'no'
save_data(_config.moderation.data, data)
return 'Group members has been unlocked'
end
end
--lock/unlock group photo. bot automatically keep group photo when locked
local function lock_group_photo(msg, data, target)
if not is_admin(msg) then
return "For admins only!"
end
local group_photo_lock = data[tostring(target)]['settings']['lock_photo']
if group_photo_lock == 'yes' then
return 'Group photo is already locked'
else
data[tostring(target)]['settings']['set_photo'] = 'waiting'
save_data(_config.moderation.data, data)
end
return 'Please send me the group photo now'
end
local function unlock_group_photo(msg, data, target)
if not is_admin(msg) then
return "For admins only!"
end
local group_photo_lock = data[tostring(target)]['settings']['lock_photo']
if group_photo_lock == 'no' then
return 'Group photo is not locked'
else
data[tostring(target)]['settings']['lock_photo'] = 'no'
save_data(_config.moderation.data, data)
return 'Group photo has been unlocked'
end
end
local function lock_group_flood(msg, data, target)
if not is_admin(msg) then
return "For admins only!"
end
local group_flood_lock = data[tostring(target)]['settings']['flood']
if group_flood_lock == 'yes' then
return 'Group flood is locked'
else
data[tostring(target)]['settings']['flood'] = 'yes'
save_data(_config.moderation.data, data)
return 'Group flood has been locked'
end
end
local function unlock_group_flood(msg, data, target)
if not is_admin(msg) then
return "For admins only!"
end
local group_flood_lock = data[tostring(target)]['settings']['flood']
if group_flood_lock == 'no' then
return 'Group flood is not locked'
else
data[tostring(target)]['settings']['flood'] = 'no'
save_data(_config.moderation.data, data)
return 'Group flood has been unlocked'
end
end
-- show group settings
local function show_group_settings(msg, data, target)
local data = load_data(_config.moderation.data, data)
if not is_admin(msg) then
return "For admins only!"
end
local settings = data[tostring(target)]['settings']
local text = "Group settings:\nLock group name : "..settings.lock_name.."\nLock group photo : "..settings.lock_photo.."\nLock group member : "..settings.lock_member
return text
end
local function returnids(cb_extra, success, result)
local receiver = cb_extra.receiver
local chat_id = "chat#id"..result.id
local chatname = result.print_name
local text = 'Users in '..string.gsub(chatname,"_"," ")..' ('..result.id..'):'..'\n'..''
for k,v in pairs(result.members) do
local username = ""
text = text .. "- " .. string.gsub(v.print_name,"_"," ") .. " (" .. v.id .. ") \n"
end
send_large_msg(receiver, text)
local file = io.open("./groups/lists/"..result.id.."memberlist.txt", "w")
file:write(text)
file:flush()
file:close()
end
local function returnidsfile(cb_extra, success, result)
local receiver = cb_extra.receiver
local chat_id = "chat#id"..result.id
local chatname = result.print_name
local text = 'Users in '..string.gsub(chatname,"_"," ")..' ('..result.id..'):'..'\n'..''
for k,v in pairs(result.members) do
local username = ""
text = text .. "- " .. string.gsub(v.print_name,"_"," ") .. " (" .. v.id .. ") \n"
end
local file = io.open("./groups/lists/"..result.id.."memberlist.txt", "w")
file:write(text)
file:flush()
file:close()
send_document("chat#id"..result.id,"./groups/lists/"..result.id.."memberlist.txt", ok_cb, false)
end
local function admin_promote(msg, admin_id)
if not is_sudo(msg) then
return "Access denied!"
end
local admins = 'admins'
if not data[tostring(admins)] then
data[tostring(admins)] = {}
save_data(_config.moderation.data, data)
end
if data[tostring(admins)][tostring(admin_id)] then
return admin_name..' is already an admin.'
end
data[tostring(admins)][tostring(admin_id)] = admin_id
save_data(_config.moderation.data, data)
return admin_id..' has been promoted as admin.'
end
local function admin_demote(msg, admin_id)
if not is_sudo(msg) then
return "Access denied!"
end
local data = load_data(_config.moderation.data)
local admins = 'admins'
if not data[tostring(admins)] then
data[tostring(admins)] = {}
save_data(_config.moderation.data, data)
end
if not data[tostring(admins)][tostring(admin_id)] then
return admin_id..' is not an admin.'
end
data[tostring(admins)][tostring(admin_id)] = nil
save_data(_config.moderation.data, data)
return admin_id..' has been demoted from admin.'
end
local function admin_list(msg)
local data = load_data(_config.moderation.data)
local admins = 'admins'
if not data[tostring(admins)] then
data[tostring(admins)] = {}
save_data(_config.moderation.data, data)
end
local message = 'List for Realm admins:\n'
for k,v in pairs(data[tostring(admins)]) do
message = message .. '- (at)' .. v .. ' [' .. k .. '] ' ..'\n'
end
return message
end
local function groups_list(msg)
local data = load_data(_config.moderation.data)
local groups = 'groups'
if not data[tostring(groups)] then
return 'No groups at the moment'
end
local message = 'List of groups:\n'
for k,v in pairs(data[tostring(groups)]) do
local settings = data[tostring(v)]['settings']
for m,n in pairs(settings) do
if m == 'set_name' then
name = n
end
end
local group_owner = "No owner"
if data[tostring(v)]['set_owner'] then
group_owner = tostring(data[tostring(v)]['set_owner'])
end
local group_link = "No link"
if data[tostring(v)]['settings']['set_link'] then
group_link = data[tostring(v)]['settings']['set_link']
end
message = message .. '- '.. name .. ' (' .. v .. ') ['..group_owner..'] \n {'..group_link.."}\n"
end
local file = io.open("./groups/lists/groups.txt", "w")
file:write(message)
file:flush()
file:close()
return message
end
local function realms_list(msg)
local data = load_data(_config.moderation.data)
local realms = 'realms'
if not data[tostring(realms)] then
return 'No Realms at the moment'
end
local message = 'List of Realms:\n'
for k,v in pairs(data[tostring(realms)]) do
local settings = data[tostring(v)]['settings']
for m,n in pairs(settings) do
if m == 'set_name' then
name = n
end
end
local group_owner = "No owner"
if data[tostring(v)]['admins_in'] then
group_owner = tostring(data[tostring(v)]['admins_in'])
end
local group_link = "No link"
if data[tostring(v)]['settings']['set_link'] then
group_link = data[tostring(v)]['settings']['set_link']
end
message = message .. '- '.. name .. ' (' .. v .. ') ['..group_owner..'] \n {'..group_link.."}\n"
end
local file = io.open("./groups/lists/realms.txt", "w")
file:write(message)
file:flush()
file:close()
return message
end
local function admin_user_promote(receiver, member_username, member_id)
local data = load_data(_config.moderation.data)
if not data['admins'] then
data['admins'] = {}
save_data(_config.moderation.data, data)
end
if data['admins'][tostring(member_id)] then
return send_large_msg(receiver, member_username..' is already as admin.')
end
data['admins'][tostring(member_id)] = member_username
save_data(_config.moderation.data, data)
return send_large_msg(receiver, '@'..member_username..' has been promoted as admin.')
end
local function admin_user_demote(receiver, member_username, member_id)
local data = load_data(_config.moderation.data)
if not data['admins'] then
data['admins'] = {}
save_data(_config.moderation.data, data)
end
if not data['admins'][tostring(member_id)] then
return send_large_msg(receiver, member_username..' is not an admin.')
end
data['admins'][tostring(member_id)] = nil
save_data(_config.moderation.data, data)
return send_large_msg(receiver, 'Admin '..member_username..' has been demoted.')
end
local function username_id(cb_extra, success, result)
local mod_cmd = cb_extra.mod_cmd
local receiver = cb_extra.receiver
local member = cb_extra.member
local text = 'No user @'..member..' in this group.'
for k,v in pairs(result.members) do
vusername = v.username
if vusername == member then
member_username = member
member_id = v.id
if mod_cmd == 'addadmin' then
return admin_user_promote(receiver, member_username, member_id)
elseif mod_cmd == 'removeadmin' then
return admin_user_demote(receiver, member_username, member_id)
end
end
end
send_large_msg(receiver, text)
end
local function set_log_group(msg)
if not is_admin(msg) then
return
end
local log_group = data[tostring(groups)][tostring(msg.to.id)]['log_group']
if log_group == 'yes' then
return 'Log group is already set'
else
data[tostring(groups)][tostring(msg.to.id)]['log_group'] = 'yes'
save_data(_config.moderation.data, data)
return 'Log group has been set'
end
end
local function unset_log_group(msg)
if not is_admin(msg) then
return
end
local log_group = data[tostring(groups)][tostring(msg.to.id)]['log_group']
if log_group == 'no' then
return 'Log group is already disabled'
else
data[tostring(groups)][tostring(msg.to.id)]['log_group'] = 'no'
save_data(_config.moderation.data, data)
return 'log group has been disabled'
end
end
local function help()
local help_text = tostring(_config.help_text_realm)
return help_text
end
function run(msg, matches)
--vardump(msg)
local name_log = user_print_name(msg.from)
if matches[1] == 'log' and is_owner(msg) then
savelog(msg.to.id, "log file created by owner")
send_document("chat#id"..msg.to.id,"./groups/"..msg.to.id.."log.txt", ok_cb, false)
end
if matches[1] == 'who' and is_momod(msg) then
local name = user_print_name(msg.from)
savelog(msg.to.id, name.." ["..msg.from.id.."] requested member list ")
local receiver = get_receiver(msg)
chat_info(receiver, returnidsfile, {receiver=receiver})
end
if matches[1] == 'wholist' and is_momod(msg) then
local name = user_print_name(msg.from)
savelog(msg.to.id, name.." ["..msg.from.id.."] requested member list in a file")
local receiver = get_receiver(msg)
chat_info(receiver, returnids, {receiver=receiver})
end
if matches[1] == 'creategroup' and matches[2] then
group_name = matches[2]
group_type = 'group'
return create_group(msg)
end
if not is_sudo(msg) or not is_admin(msg) and not is_realm(msg) then
return --Do nothing
end
if matches[1] == 'createrealm' and matches[2] then
group_name = matches[2]
group_type = 'realm'
return create_realm(msg)
end
local data = load_data(_config.moderation.data)
local receiver = get_receiver(msg)
if matches[2] then if data[tostring(matches[2])] then
local settings = data[tostring(matches[2])]['settings']
if matches[1] == 'setabout' and matches[2] then
local target = matches[2]
local about = matches[3]
return set_description(msg, data, target, about)
end
if matches[1] == 'setrules' then
rules = matches[3]
local target = matches[2]
return set_rules(msg, data, target)
end
if matches[1] == 'lock' then --group lock *
local target = matches[2]
if matches[3] == 'name' then
return lock_group_name(msg, data, target)
end
if matches[3] == 'member' then
return lock_group_member(msg, data, target)
end
if matches[3] == 'photo' then
return lock_group_photo(msg, data, target)
end
if matches[3] == 'flood' then
return lock_group_flood(msg, data, target)
end
end
if matches[1] == 'unlock' then --group unlock *
local target = matches[2]
if matches[3] == 'name' then
return unlock_group_name(msg, data, target)
end
if matches[3] == 'member' then
return unlock_group_member(msg, data, target)
end
if matches[3] == 'photo' then
return unlock_group_photo(msg, data, target)
end
if matches[3] == 'flood' then
return unlock_group_flood(msg, data, target)
end
end
if matches[1] == 'settings' and data[tostring(matches[2])]['settings'] then
local target = matches[2]
return show_group_settings(msg, data, target)
end
if matches[1] == 'setname' and is_realm(msg) then
local new_name = string.gsub(matches[2], '_', ' ')
data[tostring(msg.to.id)]['settings']['set_name'] = new_name
save_data(_config.moderation.data, data)
local group_name_set = data[tostring(msg.to.id)]['settings']['set_name']
local to_rename = 'chat#id'..msg.to.id
rename_chat(to_rename, group_name_set, ok_cb, false)
savelog(msg.to.id, "Realm { "..msg.to.print_name.." } name changed to [ "..new_name.." ] by "..name_log.." ["..msg.from.id.."]")
end
if matches[1] == 'setgpname' and is_admin(msg) then
local new_name = string.gsub(matches[3], '_', ' ')
data[tostring(matches[2])]['settings']['set_name'] = new_name
save_data(_config.moderation.data, data)
local group_name_set = data[tostring(matches[2])]['settings']['set_name']
local to_rename = 'chat#id'..matches[2]
rename_chat(to_rename, group_name_set, ok_cb, false)
savelog(msg.to.id, "Group { "..msg.to.print_name.." } name changed to [ "..new_name.." ] by "..name_log.." ["..msg.from.id.."]")
end
end
end
if matches[1] == 'help' and is_realm(msg) then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] Used /help")
return help()
end
if matches[1] == 'set' then
if matches[2] == 'loggroup' then
savelog(msg.to.id, name_log.." ["..msg.from.id.."] set as log group")
return set_log_group(msg)
end
end
if matches[1] == 'kill' and matches[2] == 'chat' then
if not is_admin(msg) then
return nil
end
if is_realm(msg) then
local receiver = 'chat#id'..matches[3]
return modrem(msg),
print("Closing Group: "..receiver),
chat_info(receiver, killchat, {receiver=receiver})
else
return 'Error: Group '..matches[3]..' not found'
end
end
if matches[1] == 'kill' and matches[2] == 'realm' then
if not is_admin(msg) then
return nil
end
if is_realm(msg) then
local receiver = 'chat#id'..matches[3]
return realmrem(msg),
print("Closing realm: "..receiver),
chat_info(receiver, killrealm, {receiver=receiver})
else
return 'Error: Realm '..matches[3]..' not found'
end
end
if matches[1] == 'chat_add_user' then
if not msg.service then
return "Are you trying to troll me?"
end
local user = 'user#id'..msg.action.user.id
local chat = 'chat#id'..msg.to.id
if not is_admin(msg) then
chat_del_user(chat, user, ok_cb, true)
end
end
if matches[1] == 'addadmin' then
if string.match(matches[2], '^%d+$') then
local admin_id = matches[2]
print("user "..admin_id.." has been promoted as admin")
return admin_promote(msg, admin_id)
else
local member = string.gsub(matches[2], "@", "")
local mod_cmd = "addadmin"
chat_info(receiver, username_id, {mod_cmd= mod_cmd, receiver=receiver, member=member})
end
end
if matches[1] == 'removeadmin' then
if string.match(matches[2], '^%d+$') then
local admin_id = matches[2]
print("user "..admin_id.." has been demoted")
return admin_demote(msg, admin_id)
else
local member = string.gsub(matches[2], "@", "")
local mod_cmd = "removeadmin"
chat_info(receiver, username_id, {mod_cmd= mod_cmd, receiver=receiver, member=member})
end
end
if matches[1] == 'type'then
local group_type = get_group_type(msg)
return group_type
end
if matches[1] == 'list' and matches[2] == 'admins' then
return admin_list(msg)
end
if matches[1] == 'list' and matches[2] == 'groups' then
if msg.to.type == 'chat' then
groups_list(msg)
send_document("chat#id"..msg.to.id, "./groups/lists/groups.txt", ok_cb, false)
return "Group list created" --group_list(msg)
elseif msg.to.type == 'user' then
groups_list(msg)
send_document("user#id"..msg.from.id, "./groups/lists/groups.txt", ok_cb, false)
return "Group list created" --group_list(msg)
end
end
if matches[1] == 'list' and matches[2] == 'realms' then
if msg.to.type == 'chat' then
realms_list(msg)
send_document("chat#id"..msg.to.id, "./groups/lists/realms.txt", ok_cb, false)
return "Realms list created" --realms_list(msg)
elseif msg.to.type == 'user' then
realms_list(msg)
send_document("user#id"..msg.from.id, "./groups/lists/realms.txt", ok_cb, false)
return "Realms list created" --realms_list(msg)
end
end
if matches[1] == 'res' and is_momod(msg) then
local cbres_extra = {
chatid = msg.to.id
}
local username = matches[2]
local username = username:gsub("@","")
savelog(msg.to.id, name_log.." ["..msg.from.id.."] Used /res "..username)
return res_user(username, callbackres, cbres_extra)
end
end
return {
patterns = {
"^[!/](creategroup) (.*)$",
"^[!/](createrealm) (.*)$",
"^[!/](setabout) (%d+) (.*)$",
"^[!/](setrules) (%d+) (.*)$",
"^[!/](setname) (.*)$",
"^[!/](setgpname) (%d+) (.*)$",
"^[!/](setname) (%d+) (.*)$",
"^[!/](lock) (%d+) (.*)$",
"^[!/](unlock) (%d+) (.*)$",
"^[!/](setting) (%d+)$",
"^[!/](wholist)$",
"^[!/](who)$",
"^[!/](type)$",
"^[!/](kill) (chat) (%d+)$",
"^[!/](kill) (realm) (%d+)$",
"^[!/](addadmin) (.*)$", -- sudoers only
"^[!/](removeadmin) (.*)$", -- sudoers only
"^[!/](list) (.*)$",
"^[!/](log)$",
"^[!/](help)$",
"^!!tgservice (.+)$",
},
run = run
}
end
| gpl-2.0 |
githubtelebot/Bot-telebot | plugins/MAP.lua | 9 | 2677 | do
local api_key = nil
local base_api = "https://maps.googleapis.com/maps/api"
local function get_staticmap(area)
local api = base_api.."/staticmap?"
local lat,lng,acc,types = get_latlong(area)
local scale = types[1]
if scale=="locality" then
zoom=8
elseif scale=="country" then
zoom=4
else
zoom = 13
end
local parameters = "size=600x300"
.."&zoom="..zoom
.."¢er="..URL.escape(area)
.."&markers=color:red"..URL.escape("|"..area)
if api_key ~=nil and api_key ~= "" then
parameters = parameters.."&key="..api_key
end
return lat, lng, api..parameters
end
local function run(msg, matches)
local receiver = get_receiver(msg)
local lat,lng,url = get_staticmap(matches[2])
if matches[1]:lower() == "loc" or matches[1]:lower() == 'لوکیشن' then
send_location(receiver, lat, lng, ok_cb, false)
elseif matches[1]:lower() == "map" or matches[1]:lower() == 'نقشه' then
local zooms = {10, 16}
local urls = {}
for i = 1, #zooms do
local zoom = zooms[i]
local url = "https://maps.googleapis.com/maps/api/staticmap?zoom=" .. zoom .. "&size=600x300&maptype=roadmap¢er=" .. lat .. "," .. lng .. "&markers=color:blue%7Clabel:X%7C" .. lat .. "," .. lng
table.insert(urls, url)
end
send_photos_from_url(receiver, urls)
elseif matches[1]:lower() == "view" or matches[1]:lower() == 'نمایش' then
local zooms = {12, 18}
local urls = {}
for i = 1, #zooms do
local zoom = zooms[i]
local url = "nhttps://maps.googleapis.com/maps/api/staticmap?zoom=" .. zoom .. "&size=600x300&maptype=hybrid¢er=" .. lat .. "," .. lng .. "&markers=color:blue%7Clabel:X%7C" .. lat .. "," .. lng
table.insert(urls, url)
end
send_photos_from_url(receiver, urls)
elseif matches[1]:lower() == "link" or matches[1]:lower() == 'لینک' then
return "موقعيت مکاني در گوگل مپ:\nhttps://www.google.com/maps/place/" .. lat .. "," .. lng
elseif matches[1]:lower() == "gps" or matches[1]:lower() == 'مختصات' then
return "مختصات محل مورد نظر:\n"..lat..","..lng
end
return nil
end
return {
description = "Get Map Location by Name",
usage = {
"map loc (name) : لوکيشن",
"map link (name) : لينک گوگل مپ",
"map map (name) : نقشه",
"map view (name) : تصوير واقعي",
"map gps (name) : مختصات",
},
patterns = {
"^نقشه (لوکیشن) (.*)$",
"^نقشه (نقشه) (.*)$",
"^نقشه (نمایش) (.*)$",
"^نقشه (لینک) (.*)$",
"^نقشه (مختصات) (.*)$",
"^[Mm]ap ([Ll]oc) (.*)$",
"^[Mm]ap ([Mm]ap) (.*)$",
"^[Mm]ap ([Vv]iew) (.*)$",
"^[Mm]ap ([Ll]ink) (.*)$",
"^[Mm]ap ([Gg]ps) (.*)$",
},
run = run
}
end
| gpl-2.0 |
gnosygnu/luaj_xowa | test/lua/errors/stringlibargs.lua | 5 | 4891 | package.path = "?.lua;test/lua/errors/?.lua"
require 'args'
-- arg type tests for string library functions
-- string.byte
banner('string.byte')
checkallpass('string.byte',{somestring})
checkallpass('string.byte',{somestring,somenumber})
checkallpass('string.byte',{somestring,somenumber,somenumber})
checkallerrors('string.byte',{somestring,{astring,afunction,atable}},'bad argument')
checkallerrors('string.byte',{notastring,{nil,111,n=2}},'bad argument')
-- string.char
function string_char(...)
return string.byte( string.char( ... ) )
end
banner('string_char')
checkallpass('string.char',{{60}})
checkallpass('string.char',{{60},{70}})
checkallpass('string.char',{{60},{70},{80}})
checkallpass('string_char',{{0,9,40,127,128,255,'0','9','255','9.2',9.2}})
checkallpass('string_char',{{0,127,255},{0,127,255}})
checkallerrors('string_char',{},'bad argument')
checkallerrors('string_char',{{nil,-1,256,3}},'bad argument')
checkallerrors('string_char',{notanumber,{23,'45',6.7}},'bad argument')
checkallerrors('string_char',{{23,'45',6.7},nonnumber},'bad argument')
-- string.dump
banner('string.dump')
local someupval = 435
local function funcwithupvals() return someupval end
checkallpass('string.dump',{{function() return 123 end}})
checkallpass('string.dump',{{funcwithupvals}})
checkallerrors('string.dump',{notafunction},'bad argument')
-- string.find
banner('string.find')
checkallpass('string.find',{somestring,somestring})
checkallpass('string.find',{somestring,somestring,{nil,-3,3,n=3}})
checkallpass('string.find',{somestring,somestring,somenumber,anylua})
checkallerrors('string.find',{notastring,somestring},'bad argument')
checkallerrors('string.find',{somestring,notastring},'bad argument')
checkallerrors('string.find',{somestring,somestring,nonnumber},'bad argument')
-- string.format
--local numfmts = {'%c','%d','%E','%e','%f','%g','%G','%i','%o','%u','%X','%x'}
local numfmts = {'%c','%d','%i','%o','%u','%X','%x'}
local strfmts = {'%q','%s'}
local badfmts = {'%w'}
banner('string.format')
checkallpass('string.format',{somestring,anylua})
checkallpass('string.format',{numfmts,somenumber})
checkallpass('string.format',{strfmts,somestring})
checkallerrors('string.format',{numfmts,notanumber},'bad argument')
checkallerrors('string.format',{strfmts,notastring},'bad argument')
checkallerrors('string.format',{badfmts,somestring},"invalid option '%w'")
-- string.gmatch
banner('string.gmatch')
checkallpass('string.gmatch',{somestring,somestring})
checkallerrors('string.gmatch',{notastring,somestring},'bad argument')
checkallerrors('string.gmatch',{somestring,notastring},'bad argument')
-- string.gsub
local somerepl = {astring,atable,afunction}
local notarepl = {nil,aboolean,n=2}
banner('string.gsub')
checkallpass('string.gsub',{somestring,somestring,somerepl,{nil,-1,n=2}})
checkallerrors('string.gsub',{nonstring,somestring,somerepl},'bad argument')
checkallerrors('string.gsub',{somestring,nonstring,somerepl},'bad argument')
checkallerrors('string.gsub',{{astring},{astring},notarepl},'bad argument')
checkallerrors('string.gsub',{{astring},{astring},somerepl,nonnumber},'bad argument')
-- string.len
banner('string.len')
checkallpass('string.len',{somestring})
checkallerrors('string.len',{notastring},'bad argument')
-- string.lower
banner('string.lower')
checkallpass('string.lower',{somestring})
checkallerrors('string.lower',{notastring},'bad argument')
-- string.match
banner('string.match')
checkallpass('string.match',{somestring,somestring})
checkallpass('string.match',{somestring,somestring,{nil,-3,3,n=3}})
checkallerrors('string.match',{},'bad argument')
checkallerrors('string.match',{nonstring,somestring},'bad argument')
checkallerrors('string.match',{somestring},'bad argument')
checkallerrors('string.match',{somestring,nonstring},'bad argument')
checkallerrors('string.match',{somestring,somestring,notanumber},'bad argument')
-- string.reverse
banner('string.reverse')
checkallpass('string.reverse',{somestring})
checkallerrors('string.reverse',{notastring},'bad argument')
-- string.rep
banner('string.rep')
checkallpass('string.rep',{somestring,somenumber})
checkallerrors('string.rep',{notastring,somenumber},'bad argument')
checkallerrors('string.rep',{somestring,notanumber},'bad argument')
-- string.sub
banner('string.sub')
checkallpass('string.sub',{somestring,somenumber})
checkallpass('string.sub',{somestring,somenumber,somenumber})
checkallerrors('string.sub',{},'bad argument')
checkallerrors('string.sub',{nonstring,somenumber,somenumber},'bad argument')
checkallerrors('string.sub',{somestring},'bad argument')
checkallerrors('string.sub',{somestring,nonnumber,somenumber},'bad argument')
checkallerrors('string.sub',{somestring,somenumber,nonnumber},'bad argument')
-- string.upper
banner('string.upper')
checkallpass('string.upper',{somestring})
checkallerrors('string.upper',{notastring},'bad argument')
| mit |
sbuettner/kong | kong/constants.lua | 3 | 1191 | local VERSION = "0.4.1"
return {
NAME = "kong",
VERSION = VERSION,
ROCK_VERSION = VERSION.."-1",
SYSLOG = {
ADDRESS = "kong-hf.mashape.com",
PORT = 61828,
API = "api"
},
CLI = {
GLOBAL_KONG_CONF = "/etc/kong/kong.yml",
NGINX_CONFIG = "nginx.conf",
NGINX_PID = "kong.pid",
DNSMASQ_PID = "dnsmasq.pid",
},
DATABASE_NULL_ID = "00000000-0000-0000-0000-000000000000",
DATABASE_ERROR_TYPES = {
SCHEMA = "schema",
INVALID_TYPE = "invalid_type",
DATABASE = "database",
UNIQUE = "unique",
FOREIGN = "foreign"
},
-- Non standard headers, specific to Kong
HEADERS = {
HOST_OVERRIDE = "X-Host-Override",
PROXY_TIME = "X-Kong-Proxy-Time",
API_TIME = "X-Kong-Api-Time",
CONSUMER_ID = "X-Consumer-ID",
CONSUMER_CUSTOM_ID = "X-Consumer-Custom-ID",
CONSUMER_USERNAME = "X-Consumer-Username",
RATELIMIT_LIMIT = "X-RateLimit-Limit",
RATELIMIT_REMAINING = "X-RateLimit-Remaining"
},
AUTHENTICATION = {
QUERY = "query",
BASIC = "basic",
HEADER = "header"
},
RATELIMIT = {
PERIODS = {
"second",
"minute",
"hour",
"day",
"month",
"year"
}
}
}
| mit |
Nathan22Miles/sile | languages/id.lua | 4 | 2459 | SILE.hyphenator.languages["id"] = {};
SILE.hyphenator.languages["id"].patterns =
{
"a1",
"e1",
"i1",
"o1",
"u1",
-- allow hyphens after vowels
"2b1d",
"2b1j",
"2b1k",
"2b1n",
"2b1s",
"2b1t",
"2c1k",
"2c1n",
"2d1k",
"2d1n",
"2d1p",
"2f1d",
"2f1k",
"2f1n",
"2f1t",
"2g1g",
"2g1k",
"2g1n",
"2h1k",
"2h1l",
"2h1m",
"2h1n",
"2h1w",
"2j1k",
"2j1n",
"2k1b",
"2k1k",
"2k1m",
"2k1n",
"2k1r",
"2k1s",
"2k1t",
"2l1b",
"2l1f",
"2l1g",
"2l1h",
"2l1k",
"2l1m",
"2l1n",
"2l1s",
"2l1t",
"2l1q",
"2m1b",
"2m1k",
"2m1l",
"2m1m",
"2m1n",
"2m1p",
"2m1r",
"2m1s",
"2n1c",
"2n1d",
"2n1f",
"2n1j",
"2n1k",
"2n1n",
"2n1p",
"2n1s",
"2n1t",
"2n1v",
"2p1k",
"2p1n",
"2p1p",
"2p1r",
"2p1t",
"2r1b",
"2r1c",
"2r1f",
"2r1g",
"2r1h",
"2r1j",
"2r1k",
"2r1l",
"2r1m",
"2r1n",
"2r1p",
"2r1r",
"2r1s",
"2r1t",
"2r1w",
"2r1y",
"2s1b",
"2s1k",
"2s1l",
"2s1m",
"2s1n",
"2s1p",
"2s1r",
"2s1s",
"2s1t",
"2s1w",
"2t1k",
"2t1l",
"2t1n",
"2t1t",
"2w1t",
-- two consonant groups to be hyphenated between
-- the consonants
"2ng1g",
"2ng1h",
"2ng1k",
"2ng1n",
"2ng1s", -- three consonant groups
"2n3s2t", -- kon-stan-ta
" .be2r3",
" .te2r3",
".me2ng3",
".pe2r3",
-- prefixes
"2ng.",
"2ny.", -- don't hyphenate -ng and -ny at the end of word
"i2o1n",
-- in-ter-na-sio-nal
"a2ir", -- ber-air
"1ba1ga2i", -- se-ba-gai-ma-na
"2b1an.",
"2c1an.",
"2d1an.",
"2f1an.",
"2g1an.",
"2h1an.",
"2j1an.",
"2k1an.",
"2l1an.",
"2m1an.",
"2ng1an.",
"2n1an.",
"2p1an.",
"2r1an.",
"2s1an.",
"2t1an.",
"2v1an.",
"2z1an.",
"3an.", -- suffix -an
".a2ta2u", -- atau-pan
" .ta3ng4an.",
" .le3ng4an.",
".ja3ng4an.",
".ma3ng4an.",
".pa3ng4an.",
".ri3ng4an.",
".de3ng4an.", -- Don't overload the exception list...
};
SILE.hyphenator.languages["id"].exceptions =
{
"be-ra-be",
"be-ra-hi",
"be-rak",
"be-ran-da",
"be-ran-dal",
"be-rang",
"be-ra-ngas-an",
"be-rang-sang",
"be-ra-ngus",
"be-ra-ni",
"be-ran-tak-an",
"be-ran-tam",
"be-ran-tas",
"be-ra-pa",
"be-ras",
"be-ren-deng",
"be-re-ngut",
"be-re-rot",
"be-res",
"be-re-wok",
"be-ri",
"be-ri-ngas",
"be-ri-sik",
"be-ri-ta",
"be-rok",
"be-ron-dong",
"be-ron-tak",
"be-ru-du",
"be-ruk",
"be-run-tun",
"peng-eks-por",
"peng-im-por",
"te-ra",
"te-rang",
"te-ras",
"te-ra-si",
"te-ra-tai",
"te-ra-wang",
"te-ra-weh",
"te-ri-ak",
"te-ri-gu",
"te-rik",
"te-ri-ma",
"te-ri-pang",
"te-ro-bos",
"te-ro-bos-an",
"te-ro-mol",
"te-rom-pah",
"te-rom-pet",
"te-ro-pong",
"te-ro-wong-an",
"te-ru-buk",
"te-ru-na",
"te-rus",
"te-ru-si",
};
| mit |
Snazz2001/fbcunn | examples/imagenet/models/overfeat_fbcunn.lua | 8 | 1822 | require 'fbcunn'
require 'cudnn'
function createModel(nGPU)
local features = nn.Sequential()
features:add(cudnn.SpatialConvolution(3, 96, 11, 11, 4, 4))
features:add(cudnn.ReLU(true))
features:add(cudnn.SpatialMaxPooling(2, 2, 2, 2))
features:add(nn.SpatialConvolutionCuFFT(96, 256, 5, 5, 1, 1))
features:add(cudnn.ReLU(true))
features:add(cudnn.SpatialMaxPooling(2, 2, 2, 2))
features:add(nn.SpatialZeroPadding(1,1,1,1))
features:add(nn.SpatialConvolutionCuFFT(256, 512, 3, 3, 1, 1))
features:add(cudnn.ReLU(true))
features:add(nn.SpatialZeroPadding(1,1,1,1))
features:add(nn.SpatialConvolutionCuFFT(512, 1024, 3, 3, 1, 1))
features:add(cudnn.ReLU(true))
features:add(cudnn.SpatialConvolution(1024, 1024, 3, 3, 1, 1, 1, 1))
features:add(cudnn.ReLU(true))
features:add(cudnn.SpatialMaxPooling(2, 2, 2, 2))
-- 1.3. Create Classifier (fully connected layers)
local classifier = nn.Sequential()
classifier:add(nn.View(1024*5*5))
classifier:add(nn.Dropout(0.5))
classifier:add(nn.Linear(1024*5*5, 3072))
classifier:add(nn.Threshold(0, 1e-6))
classifier:add(nn.Dropout(0.5))
classifier:add(nn.Linear(3072, 4096))
classifier:add(nn.Threshold(0, 1e-6))
classifier:add(nn.Linear(4096, nClasses))
classifier:add(nn.LogSoftMax())
-- 1.4. Combine 1.2 and 1.3 to produce final model
if nGPU > 1 then
assert(nGPU <= cutorch.getDeviceCount(), 'number of GPUs less than nGPU specified')
local features_single = features
require 'fbcunn'
features = nn.DataParallel(1)
for i=1,nGPU do
cutorch.withDevice(i, function()
features:add(features_single:clone())
end)
end
end
local model = nn.Sequential():add(features):add(classifier)
return model
end
| bsd-3-clause |
AdamGagorik/darkstar | scripts/globals/weaponskills/skullbreaker.lua | 11 | 1493 | -----------------------------------
-- Skullbreaker
-- Club weapon skill
-- Skill level: 150
-- Lowers enemy's INT. Chance of lowering INT varies with TP.
-- Will stack with Sneak Attack.
-- Aligned with the Snow Gorget & Aqua Gorget.
-- Aligned with the Snow Belt & Aqua Belt.
-- Element: None
-- Modifiers: STR:100%
-- 100%TP 200%TP 300%TP
-- 1.00 1.00 1.00
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/settings");
require("scripts/globals/weaponskills");
-----------------------------------
function onUseWeaponSkill(player, target, wsID, tp, primary)
local params = {};
params.numHits = 1;
params.ftp100 = 1; params.ftp200 = 1; params.ftp300 = 1;
params.str_wsc = 0.3; params.dex_wsc = 0.0; params.vit_wsc = 0.0; params.agi_wsc = 0.0; params.int_wsc = 0.0; params.mnd_wsc = 0.0; params.chr_wsc = 0.0;
params.crit100 = 0.0; params.crit200 = 0.0; params.crit300 = 0.0;
params.canCrit = false;
params.acc100 = 0.0; params.acc200= 0.0; params.acc300= 0.0;
params.atkmulti = 1;
local damage, criticalHit, tpHits, extraHits = doPhysicalWeaponskill(player, target, wsID, params, tp, primary);
if (USE_ADOULIN_WEAPON_SKILL_CHANGES == true) then
params.str_wsc = 1.0;
end
if (damage > 0 and target:hasStatusEffect(EFFECT_INT_DOWN) == false) then
target:addStatusEffect(EFFECT_INT_DOWN, 10, 0, 140);
end
return tpHits, extraHits, criticalHit, damage;
end
| gpl-3.0 |
mynameiscraziu/karizma | plugins/help.lua | 337 | 5009 | do
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]]
end
end
return iter
end
-- Returns true if is not empty
local function has_usage_data(dict)
if (dict.usage == nil or dict.usage == '') then
return false
end
return true
end
-- Get commands for that plugin
local function plugin_help(name,number,requester)
local plugin = ""
if number then
local i = 0
for name in pairsByKeys(plugins) do
if plugins[name].hidden then
name = nil
else
i = i + 1
if i == tonumber(number) then
plugin = plugins[name]
end
end
end
else
plugin = plugins[name]
if not plugin then return nil end
end
local text = ""
if (type(plugin.usage) == "table") then
for ku,usage in pairs(plugin.usage) do
if ku == 'user' then -- usage for user
if (type(plugin.usage.user) == "table") then
for k,v in pairs(plugin.usage.user) do
text = text..v..'\n'
end
elseif has_usage_data(plugin) then -- Is not empty
text = text..plugin.usage.user..'\n'
end
elseif ku == 'moderator' then -- usage for moderator
if requester == 'moderator' or requester == 'admin' or requester == 'sudo' then
if (type(plugin.usage.moderator) == "table") then
for k,v in pairs(plugin.usage.moderator) do
text = text..v..'\n'
end
elseif has_usage_data(plugin) then -- Is not empty
text = text..plugin.usage.moderator..'\n'
end
end
elseif ku == 'admin' then -- usage for admin
if requester == 'admin' or requester == 'sudo' then
if (type(plugin.usage.admin) == "table") then
for k,v in pairs(plugin.usage.admin) do
text = text..v..'\n'
end
elseif has_usage_data(plugin) then -- Is not empty
text = text..plugin.usage.admin..'\n'
end
end
elseif ku == 'sudo' then -- usage for sudo
if requester == 'sudo' then
if (type(plugin.usage.sudo) == "table") then
for k,v in pairs(plugin.usage.sudo) do
text = text..v..'\n'
end
elseif has_usage_data(plugin) then -- Is not empty
text = text..plugin.usage.sudo..'\n'
end
end
else
text = text..usage..'\n'
end
end
text = text..'======================\n'
elseif has_usage_data(plugin) then -- Is not empty
text = text..plugin.usage..'\n======================\n'
end
return text
end
-- !help command
local function telegram_help()
local i = 0
local text = "Plugins list:\n\n"
-- Plugins names
for name in pairsByKeys(plugins) do
if plugins[name].hidden then
name = nil
else
i = i + 1
text = text..i..'. '..name..'\n'
end
end
text = text..'\n'..'There are '..i..' plugins help available.'
text = text..'\n'..'Write "!help [plugin name]" or "!help [plugin number]" for more info.'
text = text..'\n'..'Or "!help all" to show all info.'
return text
end
-- !help all command
local function help_all(requester)
local ret = ""
for name in pairsByKeys(plugins) do
if plugins[name].hidden then
name = nil
else
ret = ret .. plugin_help(name, nil, requester)
end
end
return ret
end
local function run(msg, matches)
if is_sudo(msg) then
requester = "sudo"
elseif is_admin(msg) then
requester = "admin"
elseif is_momod(msg) then
requester = "moderator"
else
requester = "user"
end
if matches[1] == "!help" then
return telegram_help()
elseif matches[1] == "!help all" then
return help_all(requester)
else
local text = ""
if tonumber(matches[1]) then
text = plugin_help(nil, matches[1], requester)
else
text = plugin_help(matches[1], nil, requester)
end
if not text then
text = telegram_help()
end
return text
end
end
return {
description = "Help plugin. Get info from other plugins. ",
usage = {
"!help: Show list of plugins.",
"!help all: Show all commands for every plugin.",
"!help [plugin name]: Commands for that plugin.",
"!help [number]: Commands for that plugin. Type !help to get the plugin number."
},
patterns = {
"^!help$",
"^!help all",
"^!help (.+)"
},
run = run
}
end
| gpl-2.0 |
D-m-L/evonara | modules/libs/3d2/lib/math/vec3.lua | 1 | 6231 | -- Copyright (C) 2012 Nicholas Carlson
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the "Software"),
-- to deal in the Software without restriction, including without limitation
-- the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- and/or sell copies of the Software, and to permit persons to whom the
-- Software is furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in
-- all copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-- DEALINGS IN THE SOFTWARE.
local sqrt, cos, sin = math.sqrt, math.cos, math.sin
local vec3 = {}
vec3.__index = vec3
local function new(x,y,z)
local v = {x, y, z}
setmetatable(v, vec3)
return v
end
local function from_table( t )
return new( t[1], t[2], t[3] )
end
local function from_c_table( t )
return new( t[0], t[1], t[2] )
end
local function isvec3(v)
return getmetatable(v) == vec3
end
function vec3:clone()
return new(self[1], self[2], self[3])
end
function vec3:unpack()
return self[1], self[2], self[3]
end
function vec3:__tostring()
return string.format("(%.4f, %.4f, %.4f)", self[1], self[2], self[3])
end
function vec3.__unm(a)
return new(-a[1], -a[2], -a[3])
end
function vec3.__add(a,b)
assert(isvec3(a) and isvec3(b), "Add: wrong argument types (<vec3> expected)")
return new(a[1]+b[1], a[2]+b[2], a[3]+b[3])
end
function vec3.__sub(a,b)
assert(isvec3(a) and isvec3(b), "Sub: wrong argument types (<vec3> expected)")
return new(a[1]-b[1], a[2]-b[2], a[3]-b[3])
end
function vec3.__mul(a,b)
if type(a) == "number" then
return new(a*b[1], a*b[2], a*b[3])
elseif type(b) == "number" then
return new(b*a[1], b*a[2], b*a[3])
else
assert(isvec3(a) and isvec3(b), "Mul: wrong argument types (<vec3> or <number> expected)")
return a[1]*b[1] + a[2]*b[2] + a[3]*b[3]
end
end
function vec3.__div(a,b)
assert(isvec3(a) and type(b) == "number", "wrong argument types (expected <vec3> / <number>)")
return new(a[1] / b, a[2] / b, a[3] / b)
end
function vec3:compmul(b)
return new(self[1] * b[1], self[2] * b[2], self[3] * b[3])
end
function vec3.__eq(a,b)
return a[1] == b[1] and a[2] == b[2] and a[3] == b[3]
end
function vec3:square()
return self[1] * self[1] + self[2] * self[2] + self[3] * self[3]
end
function vec3:length()
return sqrt(self[1] * self[1] + self[2] * self[2] + self[3] * self[3])
end
local function dist (a, b)
local x, y, z = a[1]-b[1], a[2]-b[2], a[3]-b[3]
return sqrt(x*x + y*y + z*z)
end
local function dir (a, b)
local x, y, z = a[1]-b[1], a[2]-b[2], a[3]-b[3]
local l = sqrt(x*x + y*y + z*z)
if l == 0 then
return new(0, 0, 0)
else
return new(x/l, y/l, z/l)
end
end
function vec3:abs ()
return new(math.abs(self[1]), math.abs(self[2]), math.abs(self[3]))
end
function vec3:normalize ()
local l = self:length()
if l ~= 0 then
self[1] = self[1] / l
self[2] = self[2] / l
self[3] = self[3] / l
end
return self
end
function vec3:cross(other)
return new(self[2] * other[3] - other[2] * self[3],
self[3] * other[1] - other[3] * self[1],
self[1] * other[2] - other[1] * self[2])
end
local function cross(a, b)
return new(a[2] * b[3] - b[2] * a[3],
a[3] * b[1] - b[3] * a[1],
a[1] * b[2] - b[1] * a[2])
end
function vec3:dot (b)
return self[1] * b[1] + self[2] * b[2] + self[3] * b[3]
end
function vec3:unit ()
local l = sqrt(self[1] * self[1] + self[2] * self[2] + self[3] * self[3])
return new(self[1] / l, self[2] / l, self[3] / l)
end
function vec3:rotateX(r)
local c = cos(r)
local s = sin(r)
self[2] = c * self[2] - s * self[3]
self[3] = s * self[2] + c * self[3]
return self
end
function vec3:rotateY(r)
local c = cos(r)
local s = sin(r)
self[3] = c * self[3] - s * self[1]
self[1] = s * self[3] + c * self[1]
return self
end
function vec3:rotateZ(r)
local c = cos(r)
local s = sin(r)
self[1] = c * self[1] - s * self[2]
self[2] = s * self[1] + c * self[2]
return self
end
function vec3:rotatev(axis, r)
local x, y, z = self[1], self[2], self[3]
local u, v, w = axis[1], axis[2], axis[3]
local ux = u * x
local vy = v * y
local wz = w * z
local s = sin(r)
local c = cos(r)
self[1] = u * (ux + vy + wz) * (1 - c) + x * c + (-w * y + v * z) * s
self[2] = v * (ux + vy + wz) * (1 - c) + y * c + (w * x - u * z) * s
self[3] = w * (ux + vy + wz) * (1 - c) + z * c + (-v * x + u * y) * s
return self
end
local function rotateX(v, r)
return v:clone():rotateX(r)
end
local function rotateY(v, r)
return v:clone():rotateY(r)
end
local function rotateZ(v, r)
return v:clone():rotateZ(r)
end
-- rotate vector about axis
-- @precondition axis is a vec3 of unit length
-- @param vector vec3 to rotate
-- @param axis vec3 representing axis of rotation
-- @param r number radians to rotate
local function rotatev(vector, axis, r)
local x, y, z = vector[1], vector[2], vector[3]
local u, v, w = axis[1], axis[2], axis[3]
local ux = u * x
local vy = v * y
local wz = w * z
local s = sin(r)
local c = cos(r)
return new(
u * (ux + vy + wz) * (1 - c) + x * c + (-w * y + v * z) * s,
v * (ux + vy + wz) * (1 - c) + y * c + (w * x - u * z) * s,
w * (ux + vy + wz) * (1 - c) + z * c + (-v * x + u * y) * s)
end
return setmetatable(
{
new = new,
from_table = from_table,
from_c_table = from_c_table,
isvec3 = isvec3,
cross = cross,
dir = dir,
dist = dist,
unit = unit,
rotatev = rotatev,
rotateX = rotateX,
rotateY = rotateY,
rotateZ = rotateZ
},
{__call = function(_,...) return new(...) end})
| mit |
AdamGagorik/darkstar | scripts/globals/items/cone_of_homemade_gelato.lua | 18 | 1113 | -----------------------------------------
-- ID: 5223
-- Item: cone_of_homemade_gelato
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Intelligence 1
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)
local result = 0;
if (target:hasStatusEffect(EFFECT_FOOD) == true or target:hasStatusEffect(EFFECT_FIELD_SUPPORT_FOOD) == true) then
result = 246;
end
return result;
end;
-----------------------------------------
-- OnItemUse
-----------------------------------------
function onItemUse(target)
target:addStatusEffect(EFFECT_FOOD,0,0,1800,5223);
end;
-----------------------------------
-- onEffectGain Action
-----------------------------------
function onEffectGain(target,effect)
target:addMod(MOD_INT, 1);
end;
-----------------------------------------
-- onEffectLose Action
-----------------------------------------
function onEffectLose(target,effect)
target:delMod(MOD_INT, 1);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Windurst_Waters_[S]/npcs/Mearuru.lua | 13 | 1059 | -----------------------------------
-- Area: Windurst Waters (S)
-- NPC: Mearuru
-- Type: Standard NPC
-- @zone: 94
-- @pos 153.798 -1 153.712
--
-- Auto-Script: Requires Verification (Verified by Brawndo)
-----------------------------------
package.loaded["scripts/zones/Windurst_Waters_[S]/TextIDs"] = nil;
-----------------------------------
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:startEvent(0x01a2);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Windurst_Waters/npcs/Hakeem.lua | 53 | 1824 | -----------------------------------
-- Area: Windurst Waters
-- NPC: Hakeem
-- Type: Cooking Image Support
-- @pos -123.120 -2.999 65.472 238
-----------------------------------
package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/crafting");
require("scripts/zones/Windurst_Waters/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
local guildMember = isGuildMember(player,4);
local SkillCap = getCraftSkillCap(player,SKILL_COOKING);
local SkillLevel = player:getSkillLevel(SKILL_COOKING);
if (guildMember == 1) then
if (player:hasStatusEffect(EFFECT_COOKING_IMAGERY) == false) then
player:startEvent(0x2721,SkillCap,SkillLevel,2,495,player:getGil(),0,4095,0); -- p1 = skill level
else
player:startEvent(0x2721,SkillCap,SkillLevel,2,495,player:getGil(),7094,4095,0);
end
else
player:startEvent(0x2721); -- Standard Dialogue
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
if (csid == 0x2721 and option == 1) then
player:messageSpecial(COOKING_SUPPORT,0,8,2);
player:addStatusEffect(EFFECT_COOKING_IMAGERY,1,0,120);
end
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Riverne-Site_A01/mobs/Hippogryph.lua | 8 | 1639 | -----------------------------------
-- Area: Riverne Site A01
-- MOB: Hippogryph
-----------------------------------
-----------------------------------
-- onMobRoam
-----------------------------------
function onMobRoam(mob)
local Heliodromos_Table =
{
16900110,
16900111,
16900112
};
local Heliodromos_PH_Table =
{
16900107,
16900108,
16900109
};
local Heliodromos_ToD = GetServerVariable("Heliodromos_ToD");
if (Heliodromos_ToD <= os.time()) then
for i=1, table.getn(Heliodromos_Table), 1 do
if (Heliodromos_PH_Table[i] ~= nil) then
if (GetMobAction(Heliodromos_Table[i]) == 0) then
DeterMob(Heliodromos_PH_Table[i], true);
DeterMob(Heliodromos_Table[i], false);
DespawnMob(Heliodromos_PH_Table[i]);
SetServerVariable("Heliodromos_Despawn", 0);
SpawnMob(Heliodromos_Table[i], "", 0);
end
end
end
end
end;
-----------------------------------
-- onMobDeath
-----------------------------------
function onMobDeath(mob, killer, ally)
local Hippogryph = mob:getID();
local Heliodromos_PH_Table =
{
16900107,
16900108,
16900109
};
for i = 1, table.getn(Heliodromos_PH_Table), 1 do
if (Heliodromos_PH_Table[i] ~= nil) then
if (Hippogryph == Heliodromos_PH_Table[i]) then
SetServerVariable("Heliodromos_ToD", (os.time() + math.random((43200), (54000))));
end
end
end
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/globals/spells/bluemagic/animating_wail.lua | 28 | 1226 | -----------------------------------------
-- Spell: Animating Wail
-- Increases attack speed
-- Spell cost: 53 MP
-- Monster Type: Undead
-- Spell Type: Magical (Wind)
-- Blue Magic Points: 5
-- Stat Bonus: HP+20
-- Level: 79
-- Casting Time: 2 Seconds
-- Recast Time: 45 Seconds
-- 5 minutes
--
-- Combos: Dual Wield
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnMagicCastingCheck
-----------------------------------------
function onMagicCastingCheck(caster,target,spell)
return 0;
end;
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function onSpellCast(caster,target,spell)
local typeEffect = EFFECT_HASTE;
local power = 153;
local duration = 300;
if (caster:hasStatusEffect(EFFECT_DIFFUSION)) then
local diffMerit = caster:getMerit(MERIT_DIFFUSION);
if (diffMerit > 0) then
duration = duration + (duration/100)* diffMerit;
end;
caster:delStatusEffect(EFFECT_DIFFUSION);
end;
if (target:addStatusEffect(typeEffect,power,0,duration) == false) then
spell:setMsg(75);
end;
return typeEffect;
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Ranguemont_Pass/npcs/Grounds_Tome.lua | 30 | 1100 | -----------------------------------
-- Area: Ranguemont Pass
-- NPC: Grounds Tome
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/groundsofvalor");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
startGov(GOV_EVENT_RANGUEMONT_PASS,player);
end;
-----------------------------------
-- onEventSelection
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
updateGov(player,csid,option,602,603,604,605,606,607,608,609,0,0);
end;
-----------------------------------
-- onEventFinish Action
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
finishGov(player,csid,option,602,603,604,605,606,607,608,609,0,0,GOV_MSG_RANGUEMONT_PASS);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/globals/items/dish_of_spaghetti_pescatora.lua | 18 | 1653 | -----------------------------------------
-- ID: 5191
-- Item: dish_of_spaghetti_pescatora
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Health % 15
-- Health Cap 150
-- Vitality 3
-- Mind -1
-- Defense % 22
-- Defense Cap 65
-- Store TP 6
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)
local result = 0;
if (target:hasStatusEffect(EFFECT_FOOD) == true or target:hasStatusEffect(EFFECT_FIELD_SUPPORT_FOOD) == true) then
result = 246;
end
return result;
end;
-----------------------------------------
-- OnItemUse
-----------------------------------------
function onItemUse(target)
target:addStatusEffect(EFFECT_FOOD,0,0,1800,5191);
end;
-----------------------------------
-- onEffectGain Action
-----------------------------------
function onEffectGain(target,effect)
target:addMod(MOD_FOOD_HPP, 15);
target:addMod(MOD_FOOD_HP_CAP, 150);
target:addMod(MOD_VIT, 3);
target:addMod(MOD_MND, -1);
target:addMod(MOD_FOOD_DEFP, 22);
target:addMod(MOD_FOOD_DEF_CAP, 65);
target:addMod(MOD_STORETP, 6);
end;
-----------------------------------------
-- onEffectLose Action
-----------------------------------------
function onEffectLose(target,effect)
target:delMod(MOD_FOOD_HPP, 15);
target:delMod(MOD_FOOD_HP_CAP, 150);
target:delMod(MOD_VIT, 3);
target:delMod(MOD_MND, -1);
target:delMod(MOD_FOOD_DEFP, 22);
target:delMod(MOD_FOOD_DEF_CAP, 65);
target:delMod(MOD_STORETP, 6);
end;
| gpl-3.0 |
kahluamods/kore | Libs/LibDeformat-3.0.lua | 3 | 9216 | --[[
Name: LibDeformat-3.0
Author(s): ckknight (ckknight@gmail.com)
Website: http://www.wowace.com/projects/libdeformat-3-0/
Description: A library to convert a post-formatted string back to its original arguments given its format string.
License: MIT
]]
local LibDeformat = LibStub:NewLibrary("LibDeformat-3.0", 1)
if not LibDeformat then
return
end
-- this function does nothing and returns nothing
local function do_nothing()
end
-- a dictionary of format to match entity
local FORMAT_SEQUENCES = {
["s"] = ".+",
["c"] = ".",
["%d*d"] = "%%-?%%d+",
["[fg]"] = "%%-?%%d+%%.?%%d*",
["%%%.%d[fg]"] = "%%-?%%d+%%.?%%d*",
}
-- a set of format sequences that are string-based, i.e. not numbers.
local STRING_BASED_SEQUENCES = {
["s"] = true,
["c"] = true,
}
local cache = setmetatable({}, {__mode='k'})
-- generate the deformat function for the pattern, or fetch from the cache.
local function get_deformat_function(pattern)
local func = cache[pattern]
if func then
return func
end
-- escape the pattern, so that string.match can use it properly
local unpattern = '^' .. pattern:gsub("([%(%)%.%*%+%-%[%]%?%^%$%%])", "%%%1") .. '$'
-- a dictionary of index-to-boolean representing whether the index is a number rather than a string.
local number_indexes = {}
-- (if the pattern is a numbered format,) a dictionary of index-to-real index.
local index_translation = nil
-- the highest found index, also the number of indexes found.
local highest_index
if not pattern:find("%%1%$") then
-- not a numbered format
local i = 0
while true do
i = i + 1
local first_index
local first_sequence
for sequence in pairs(FORMAT_SEQUENCES) do
local index = unpattern:find("%%%%" .. sequence)
if index and (not first_index or index < first_index) then
first_index = index
first_sequence = sequence
end
end
if not first_index then
break
end
unpattern = unpattern:gsub("%%%%" .. first_sequence, "(" .. FORMAT_SEQUENCES[first_sequence] .. ")", 1)
number_indexes[i] = not STRING_BASED_SEQUENCES[first_sequence]
end
highest_index = i - 1
else
-- a numbered format
local i = 0
while true do
i = i + 1
local found_sequence
for sequence in pairs(FORMAT_SEQUENCES) do
if unpattern:find("%%%%" .. i .. "%%%$" .. sequence) then
found_sequence = sequence
break
end
end
if not found_sequence then
break
end
unpattern = unpattern:gsub("%%%%" .. i .. "%%%$" .. found_sequence, "(" .. FORMAT_SEQUENCES[found_sequence] .. ")", 1)
number_indexes[i] = not STRING_BASED_SEQUENCES[found_sequence]
end
highest_index = i - 1
i = 0
index_translation = {}
pattern:gsub("%%(%d)%$", function(w)
i = i + 1
index_translation[i] = tonumber(w)
end)
end
if highest_index == 0 then
cache[pattern] = do_nothing
else
--[=[
-- resultant function looks something like this:
local unpattern = ...
return function(text)
local a1, a2 = text:match(unpattern)
if not a1 then
return nil, nil
end
return a1+0, a2
end
-- or if it were a numbered pattern,
local unpattern = ...
return function(text)
local a2, a1 = text:match(unpattern)
if not a1 then
return nil, nil
end
return a1+0, a2
end
]=]
local t = {}
t[#t+1] = [=[
return function(text)
local ]=]
for i = 1, highest_index do
if i ~= 1 then
t[#t+1] = ", "
end
t[#t+1] = "a"
if not index_translation then
t[#t+1] = i
else
t[#t+1] = index_translation[i]
end
end
t[#t+1] = [=[ = text:match(]=]
t[#t+1] = ("%q"):format(unpattern)
t[#t+1] = [=[)
if not a1 then
return ]=]
for i = 1, highest_index do
if i ~= 1 then
t[#t+1] = ", "
end
t[#t+1] = "nil"
end
t[#t+1] = "\n"
t[#t+1] = [=[
end
]=]
t[#t+1] = "return "
for i = 1, highest_index do
if i ~= 1 then
t[#t+1] = ", "
end
t[#t+1] = "a"
t[#t+1] = i
if number_indexes[i] then
t[#t+1] = "+0"
end
end
t[#t+1] = "\n"
t[#t+1] = [=[
end
]=]
t = table.concat(t, "")
-- print(t)
cache[pattern] = assert(loadstring(t))()
end
return cache[pattern]
end
--- Return the arguments of the given format string as found in the text.
-- @param text The resultant formatted text.
-- @param pattern The pattern used to create said text.
-- @return a tuple of values, either strings or numbers, based on the pattern.
-- @usage LibDeformat.Deformat("Hello, friend", "Hello, %s") == "friend"
-- @usage LibDeformat.Deformat("Hello, friend", "Hello, %1$s") == "friend"
-- @usage LibDeformat.Deformat("Cost: $100", "Cost: $%d") == 100
-- @usage LibDeformat.Deformat("Cost: $100", "Cost: $%1$d") == 100
-- @usage LibDeformat.Deformat("Alpha, Bravo", "%s, %s") => "Alpha", "Bravo"
-- @usage LibDeformat.Deformat("Alpha, Bravo", "%1$s, %2$s") => "Alpha", "Bravo"
-- @usage LibDeformat.Deformat("Alpha, Bravo", "%2$s, %1$s") => "Bravo", "Alpha"
-- @usage LibDeformat.Deformat("Hello, friend", "Cost: $%d") == nil
-- @usage LibDeformat("Hello, friend", "Hello, %s") == "friend"
function LibDeformat.Deformat(text, pattern)
if type(text) ~= "string" then
error(("Argument #1 to `Deformat' must be a string, got %s (%s)."):format(type(text), text), 2)
elseif type(pattern) ~= "string" then
error(("Argument #2 to `Deformat' must be a string, got %s (%s)."):format(type(pattern), pattern), 2)
end
return get_deformat_function(pattern)(text)
end
--[===[@debug@
function LibDeformat.Test()
local function tuple(success, ...)
if success then
return true, { n = select('#', ...), ... }
else
return false, ...
end
end
local function check(text, pattern, ...)
local success, results = tuple(pcall(LibDeformat.Deformat, text, pattern))
if not success then
return false, results
end
if select('#', ...) ~= results.n then
return false, ("Differing number of return values. Expected: %d. Actual: %d."):format(select('#', ...), results.n)
end
for i = 1, results.n do
local expected = select(i, ...)
local actual = results[i]
if type(expected) ~= type(actual) then
return false, ("Return #%d differs by type. Expected: %s (%s). Actual: %s (%s)"):format(type(expected), expected, type(actual), actual)
elseif expected ~= actual then
return false, ("Return #%d differs. Expected: %s. Actual: %s"):format(expected, actual)
end
end
return true
end
local function test(text, pattern, ...)
local success, problem = check(text, pattern, ...)
if not success then
print(("Problem with (%q, %q): %s"):format(text, pattern, problem or ""))
end
end
test("Hello, friend", "Hello, %s", "friend")
test("Hello, friend", "Hello, %1$s", "friend")
test("Cost: $100", "Cost: $%d", 100)
test("Cost: $100", "Cost: $%1$d", 100)
test("Alpha, Bravo", "%s, %s", "Alpha", "Bravo")
test("Alpha, Bravo", "%1$s, %2$s", "Alpha", "Bravo")
test("Alpha, Bravo", "%2$s, %1$s", "Bravo", "Alpha")
test("Alpha, Bravo, Charlie, Delta, Echo", "%s, %s, %s, %s, %s", "Alpha", "Bravo", "Charlie", "Delta", "Echo")
test("Alpha, Bravo, Charlie, Delta, Echo", "%1$s, %2$s, %3$s, %4$s, %5$s", "Alpha", "Bravo", "Charlie", "Delta", "Echo")
test("Alpha, Bravo, Charlie, Delta, Echo", "%5$s, %4$s, %3$s, %2$s, %1$s", "Echo", "Delta", "Charlie", "Bravo", "Alpha")
test("Alpha, Bravo, Charlie, Delta, Echo", "%2$s, %3$s, %4$s, %5$s, %1$s", "Echo", "Alpha", "Bravo", "Charlie", "Delta")
test("Alpha, Bravo, Charlie, Delta, Echo", "%3$s, %4$s, %5$s, %1$s, %2$s", "Delta", "Echo", "Alpha", "Bravo", "Charlie")
test("Alpha, Bravo, Charlie, Delta", "%s, %s, %s, %s, %s", nil, nil, nil, nil, nil)
test("Hello, friend", "Cost: $%d", nil)
print("LibDeformat-3.0: Tests completed.")
end
--@end-debug@]===]
setmetatable(LibDeformat, { __call = function(self, ...) return self.Deformat(...) end }) | apache-2.0 |
Nathan22Miles/sile | lua-libraries/unicode-bidi-algorithm.lua | 2 | 12512 | bidi = bidi or { }
bidi.module = {
name = "bidi",
version = 0.003,
date = "2011/09/05",
description = "Unicode Bidirectional Algorithm implementation for LuaTeX",
author = "Khaled Hosny",
copyright = "Khaled Hosny",
license = "CC0",
}
if not modules then modules = { } end modules ['bidi'] = bidi.module
--[[
This code started as a line for line translation of Arabeyes' minibidi.c from
C to lua, excluding parts that of no use to us like shaping.
The C code is Copyright (c) 2004 Ahmad Khalifa, and is distributed under the
MIT Licence. The full license text:
http://svn.arabeyes.org/viewvc/projects/adawat/minibidi/LICENCE
--]]
local MAX_STACK = 60
local format, upper, max = string.format, string.upper, math.max
require("char-def")
local chardata = characters.data
local function get_bidi_type(c)
local dir = chardata[c] and chardata[c].direction or "l"
return dir
end
local function get_mirror(c)
local mir = chardata[c] and chardata[c].mirror
return mir
end
local function odd(x)
return x%2 == 1 and true or false
end
local function least_greater_odd(x)
return odd(x) and x+2 or x+1
end
local function least_greater_even(x)
return odd(x) and x+1 or x+2
end
local function type_of_level(x)
return odd(x) and "r" or "l"
end
local function dir_of_level(x)
return format("T%sT", upper(type_of_level(x)))
end
local function Set(list)
local set = {}
for _,v in ipairs(list) do
set[v] = true
end
return set
end
local function is_whitespace(x)
if Set{"lre", "rle", "lro", "rlo", "pdf", "bn", "ws"}[x] then
return true
end
end
local function find_run_limit(line, run_start, limit, types)
local run_limit = run_start
local i = run_start
while i <= limit and Set(types)[line[i].type] do
run_limit = i
i = i + 1
end
return run_limit
end
local function get_base_level(line)
-- P2, P3
for _,c in next, line do
if c.type == "r" or c.type == "al" then
return 1
elseif c.type == "l" then
return 0
end
end
return 0
end
local function resolve_explicit(line, base_level)
--[[
to be checked:
X1. Begin by setting the current embedding level to the paragraph
embedding level. Set the directional override status to neutral.
X8. All explicit directional embeddings and overrides are completely
terminated at the end of each paragraph. Paragraph separators are not
included in the embedding. (Useless here) NOT IMPLEMENTED
--]]
local curr_level = base_level
local curr_override = "on"
local stack = { }
for _,c in next, line do
-- X2
if c.type == "rle" then
if #stack <= MAX_STACK then
table.insert (stack, {curr_level, curr_override})
curr_level = least_greater_odd(curr_level)
curr_override = "on"
c.level = curr_level
c.type = "bn"
c.remove = true
end
-- X3
elseif c.type == "lre" then
if #stack < MAX_STACK then
table.insert (stack, {curr_level, curr_override})
curr_level = least_greater_even(curr_level)
curr_override = "on"
c.level = curr_level
c.type = "bn"
c.remove = true
end
-- X4
elseif c.type == "rlo" then
if #stack <= MAX_STACK then
table.insert (stack, {curr_level, curr_override})
curr_level = least_greater_odd(curr_level)
curr_override = "r"
c.level = curr_level
c.type = "bn"
c.remove = true
end
-- X5
elseif c.type == "lro" then
if #stack < MAX_STACK then
table.insert (stack, {curr_level, curr_override})
curr_level = least_greater_even(curr_level)
curr_override = "l"
c.level = curr_level
c.type = "bn"
c.remove = true
end
-- X7
elseif c.type == "pdf" then
if #stack > 0 then
curr_level, curr_override = unpack(table.remove(stack))
c.level = curr_level
c.type = "bn"
c.remove = true
end
-- X6
else
c.level = curr_level
if curr_override ~= "on" then
c.type = curr_override
end
end
end
end
local function resolve_weak(line, start, limit, sor, eor)
-- W1
for i = start, limit do
local c = line[i]
if c.type == "nsm" then
if i == start then
c.type = sor
else
c.type = line[i-1].type
end
end
end
-- W2
for i = start, limit do
local c = line[i]
if c.type == "en" then
for j = i - 1, start, -1 do
local bc = line[j]
if bc.type == "al" then
c.type = "an"
break
elseif bc.type == "r" or bc.type == "l" then
break
end
end
end
end
-- W3
for i = start, limit do
local c = line[i]
if c.type == "al" then
c.type = "r"
end
end
-- W4
for i = start+1, limit-1 do
local c, pc, nc = line[i], line[i-1], line[i+1]
if c.type == "es" or c.type == "cs" then
if pc.type == "en" and nc.type == "en" then
c.type = "en"
elseif c.type == "cs" and pc.type == "an" and nc.type == "an" then
c.type = "an"
end
end
end
-- W5
local i = start
while i <= limit do
if line[i].type == "et" then
local et_start, et_limit, t
et_start = i
et_limit = find_run_limit(line, et_start, limit, {"et"})
t = (et_start == start and sor) or line[et_start-1].type
if t ~= "en" then
t = (et_limit == limit and eor) or line[et_limit+1].type
end
if t == "en" then
for j = et_start, et_limit do
line[j].type = "en"
end
end
i = et_limit
end
i = i + 1
end
-- W6
for i = start, limit do
local c = line[i]
if c.type == "es" or c.type == "et" or c.type == "cs" then
c.type = "on"
end
end
-- W7
for i = start, limit do
local c = line[i]
if c.type == "en" then
local prev_strong = sor
for j = i - 1, start, -1 do
if line[j].type == "l" or line[j].type == "r" then
prev_strong = line[j].type
break
end
end
if prev_strong == "l" then
c.type = "l"
end
end
end
end
local function resolve_neutral(line, start, limit, sor, eor)
-- N1, N2
for i = start, limit do
local c = line[i]
if c.type == "b" or c.type == "s" or c.type == "ws" or c.type == "on" then
local n_start, n_limit, leading_type, trailing_type, resolved_type
n_start = i
n_limit = find_run_limit(line, n_start, limit, {"b", "s", "ws", "on"})
if n_start == start then
leading_type = sor
else
leading_type = line[n_start-1].type
if leading_type == "en" or leading_type == "an" then
leading_type = "r"
end
end
if n_limit == limit then
trailing_type = eor
else
trailing_type = line[n_limit+1].type
if trailing_type == "en" or trailing_type == "an" then
trailing_type = "r"
end
end
if leading_type == trailing_type then
-- N1
resolved_type = leading_type
else
-- N2
resolved_type = type_of_level(line[i].level)
end
for j = n_start, n_limit do
line[j].type = resolved_type
end
i = n_limit
end
i = i + 1
end
end
local function resolve_implicit(line, start, limit, sor, eor)
-- I1
for i = start, limit do
local c = line[i]
if not odd(c.level) then
if c.type == "r" then
c.level = c.level + 1
elseif c.type == "an" or c.type == "en" then
c.level = c.level + 2
end
end
end
-- I2
for i = start, limit do
local c = line[i]
if odd(c.level) then
if c.type == "l" or c.type == "en" or c.type == "an" then
c.level = c.level + 1
end
end
end
end
local function resolve_levels(line, base_level)
-- Rules X1 to X9
resolve_explicit(line, base_level)
-- X10
local start = 1
while start < #line do
local level = line[start].level
local limit = start + 1
while limit < #line and line[limit].level == level do
limit = limit + 1
end
local prev_level = (start == 1 and base_level) or line[start-1].level
local next_level = (limit == #line and base_level) or line[limit+1].level
local sor = type_of_level(max(level, prev_level))
local eor = type_of_level(max(level, next_level))
-- Rules W1 to W7
resolve_weak(line, start, limit, sor, eor)
-- Rules N1 and N2
resolve_neutral(line, start, limit, sor, eor)
-- Rules I1 and I2
resolve_implicit(line, start, limit, sor, eor)
start = limit
end
-- L1
for i,c in next, line do
-- (1)
if c.orig_type == "s" or c.orig_type == "b" then
c.level = base_level
-- (2)
for j = i - 1, 1, -1 do
local bc = line[j]
if is_whitespace(bc.orig_type) then
bc.level = base_level
else
break
end
end
end
end
-- (3)
for i = #line, 1, -1 do
local bc = line[i]
if is_whitespace(bc.orig_type) then
bc.level = base_level
else
break
end
end
-- L4
for _,c in next, line do
if odd(c.level) then
c.mirror = get_mirror(c.char)
end
end
return line
end
local obj_code = 0xFFFC -- A who-cares character
local function node_to_table(nodelist)
-- Takes a node list and returns its textual representation
local line = {}
for i = 1,#nodelist do
local n = nodelist[i]
if n.type == "hbox" and n.value and n.value.text then
print(n.value)
c = SU.codepoint(n.value.text)
elseif n:isNnode() then
-- This is technically a hack. n.text will probably contain multiple
-- characters, but by dint of being shaped into the same run, they are
-- guaranteed(?) to be of the same class, so using one as a representative
-- should be fine.
c = SU.codepoint(n.text)
elseif n:isGlue() then
c = 0x0020 -- space
else
c = obj_code
end
line[#line+1] = { char = c, type = get_bidi_type(c), orig_type = get_bidi_type(c), level = 0 }
end
return line
end
-- Dumb stupid version
local function reverse_portion(tbl, s,e)
rv = {}
for i = 1,s-1 do rv[#rv+1] = tbl[i] end
for i = e,s,-1 do rv[#rv+1] = tbl[i] end
for i = e+1, #tbl do rv[#rv+1] = tbl[i] end
return rv
end
local function create_matrix(line, base_level)
-- L2; create a transformation matrix of elements
-- such that output[matrix[i]] = input[i]
-- e.g. No reversions required: [1,2,3,4,5]
-- Levels [0,0,0,1,1] -> [1,2,3,5,4]
local max_level = 0
local matrix = {}
for i,c in next, line do
if c.level > max_level then max_level = c.level end
matrix[i] = i
end
for level = base_level+1, max_level do
local level_start, level_limit
for i,_ in next, line do
if line[i].level >= level then
if not level_start then
level_start = i
elseif i == #line then
level_end = i
matrix = reverse_portion(matrix, level_start, level_end)
level_start = nil
end
else
if level_start then
level_end = i-1
matrix = reverse_portion(matrix, level_start, level_end)
level_start = nil
end
end
end
end
return matrix
end
local function process(nodelist, frame)
-- main node list processing
-- return early if there is nothing to process
if not nodelist then
return nodelist
end
local line, base_level, par_dir
-- convert node list into our internal structure, this way the bidi
-- implementation is kept separate from actual node list processing
line = node_to_table(nodelist)
-- set paragraph direction according to main direction set by the user,
-- else based on first strong bidi character according to the algorithm
if frame.direction then
base_level = frame.direction == "RTL" and 1 or 0
else
base_level = get_base_level(line)
end
-- will be used later to set direction of sublists
par_dir = dir_of_level(base_level)
-- run the bidi algorithm
line = resolve_levels(line, base_level)
matrix = create_matrix(line, base_level)
assert(#line == #nodelist)
local rv = {}
for i = 1, #nodelist do
rv[matrix[i]] = nodelist[i]
end
return rv
end
return { process = process } | mit |
AdamGagorik/darkstar | scripts/zones/La_Theine_Plateau/npcs/Coumaine.lua | 27 | 1692 | -----------------------------------
-- Area: La Theine Plateau
-- NPC: Coumaine
-- Type: Chocobo Vendor
-----------------------------------
require("scripts/globals/chocobo");
require("scripts/globals/keyitems");
require("scripts/globals/settings");
require("scripts/globals/status");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
local level = player:getMainLvl();
local gil = player:getGil();
if (player:hasKeyItem(CHOCOBO_LICENSE) and level >= 20) then
local price = getChocoboPrice(player);
player:setLocalVar("chocoboPriceOffer",price);
player:startEvent(0x0078,price,gil);
else
player:startEvent(0x0079);
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish Action
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
local price = player:getLocalVar("chocoboPriceOffer");
if (csid == 0x0078 and option == 0) then
if (player:delGil(price)) then
updateChocoboPrice(player, price);
local duration = 1800 + (player:getMod(MOD_CHOCOBO_RIDING_TIME) * 60)
player:addStatusEffectEx(EFFECT_CHOCOBO,EFFECT_CHOCOBO,1,0,duration,true);
end
end
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/globals/items/eel_kabob.lua | 18 | 1258 | -----------------------------------------
-- ID: 4457
-- Item: eel_kabob
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Dexterity 4
-- Mind -3
-- Evasion 5
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)
local result = 0;
if (target:hasStatusEffect(EFFECT_FOOD) == true or target:hasStatusEffect(EFFECT_FIELD_SUPPORT_FOOD) == true) then
result = 246;
end
return result;
end;
-----------------------------------------
-- OnItemUse
-----------------------------------------
function onItemUse(target)
target:addStatusEffect(EFFECT_FOOD,0,0,1800,4457);
end;
-----------------------------------------
-- onEffectGain Action
-----------------------------------------
function onEffectGain(target,effect)
target:addMod(MOD_DEX, 4);
target:addMod(MOD_MND, -3);
target:addMod(MOD_EVA, 5);
end;
-----------------------------------------
-- onEffectLose Action
-----------------------------------------
function onEffectLose(target,effect)
target:delMod(MOD_DEX, 4);
target:delMod(MOD_MND, -3);
target:delMod(MOD_EVA, 5);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Castle_Oztroja/TextIDs.lua | 15 | 2162 | -- Variable TextID Description text
-- General Texts
ITEM_CANNOT_BE_OBTAINED = 6564; -- You cannot obtain the item <item>. Come back after sorting your inventory.
FULL_INVENTORY_AFTER_TRADE = 6568; -- You cannot obtain the #. Try trading again after sorting your inventory.
ITEM_OBTAINED = 6569; -- Obtained: <item>.
GIL_OBTAINED = 6570; -- Obtained <number> gil.
KEYITEM_OBTAINED = 6572; -- Obtained key item: <keyitem>.
ITEMS_OBTAINED = 6575; -- You obtain
FISHING_MESSAGE_OFFSET = 7249; -- You can't fish here.
-- Other dialog
SENSE_OF_FOREBODING = 6584; -- You are suddenly overcome with a sense of foreboding...
NOTHING_OUT_OF_ORDINARY = 7757; -- There is nothing out of the ordinary here.
ITS_LOCKED = 1; -- It's locked.
PROBABLY_WORKS_WITH_SOMETHING_ELSE = 3; -- It probably works with something else.
TORCH_LIT = 5; -- The torch is lit.
-- Treasure Coffer/Chest Dialog
CHEST_UNLOCKED = 7414; -- You unlock the chest!
CHEST_FAIL = 7415; -- Fails to open the chest.
CHEST_TRAP = 7416; -- The chest was trapped!
CHEST_WEAK = 7417; -- You cannot open the chest when you are in a weakened state.
CHEST_MIMIC = 7418; -- The chest was a mimic!
CHEST_MOOGLE = 7419; -- You cannot open the chest while participating in the moogle event.
CHEST_ILLUSION = 7420; -- The chest was but an illusion...
CHEST_LOCKED = 7421; -- The chest appears to be locked.
YAGUDO_AVATAR_ENGAGE = 7435; -- Kahk-ka-ka... You filthy, dim-witted heretics! You have damned yourselves by coming here.
YAGUDO_AVATAR_DEATH = 7436; -- Our lord, Tzee Xicu the Manifest!Even should our bodies be crushed and broken, may our souls endure into eternity...
YAGUDO_KING_ENGAGE = 7437; -- You are not here as sacrifices, are you? Could you possibly be committing this affront in the face of a deity?Very well, I will personally mete out your divine punishment, kyah!
YAGUDO_KING_DEATH = 7438; -- You have...bested me... However, I...am...a god... I will never die...never rot...never fade...never...
-- conquest Base
CONQUEST_BASE = 26;
| gpl-3.0 |
D-m-L/evonara | modules/heroes/cam.lua | 1 | 6510 | cam = {}
function cam:init(target1, target2)
self.tx,self.ty = 0,0
self.alt = 100
self.mode = "one"
self.lastmode = "one"
self.target1 = target1
self.target2 = target2
self.zoom = 1
self.zit = 6
self.zsteps = {.042, .12, .2, .4, .6, 1, 1.4, 2, 3.4, 4, 8}
self.ox = 0
self.oy = 0
self.r = 0
self.fps = 60
self.frDesired = 1/self.fps
self.attached = 1
self.fade = 255
end
function cam:update(dt)
local hdist = math.abs(self.target1.x - self.target2.x) or 0
local vdist = math.abs(self.target1.y - self.target2.y) or 0
local lastmode = self.mode
-- if self.target1.state.ymov ~= "climbing" and self.mode == "unattached" then
-- self.attached = 1
-- if self.target1.state.ymov == "climbing" and self.mode ~= "unattached" then
-- -- lastmode = self.mode
-- self.mode = "unattached"
-- flux.to(self, 1, { ox = 0 })
-- flux.to(self, 1, { oy = 0 })
-- flux.to(self, 1, { ty = self.ty - 24 })
-- flux.to(self, 1, { tx = self.target1.x })
-- end
local down = love.keyboard.isDown
-- local mdown = love.mouse.isDown
if self.mode == "one" then
if down("a") or down("left") then
if self.ox > -75*self.zoom then flux.to(cam, 2, { ox = cam.ox - 25/cam.zoom }) end
elseif down("d") or down("right") then
if self.ox < 75*self.zoom then flux.to(cam, 2, { ox = cam.ox + 25/cam.zoom }) end
end
if down("w") or down("up") then
if self.oy < 25*self.zoom then flux.to(cam, 1, { oy = cam.oy + 50/cam.zoom }):delay(1) end
end
-- elseif self.mode == "unattached" then
-- flux.to(self, 1, { ty = -self.target1.y })
-- flux.to(self, 1, { tx = self.target1.x })
-- self.tx = self.tx + 24
-- self.ox = self.ox - 24
-- self.mode = lastmode
elseif self.mode == "free" then
if down("a") or down("left") then self.tx = self.tx + 100 * cam.zoom * dt end
if down("s") or down("down") then self.ty = self.ty - 100 * cam.zoom * dt end
if down("d") or down("right") then self.tx = self.tx - 100 * cam.zoom * dt end
if down("w") or down("up") then self.ty = self.ty + 100 * cam.zoom * dt end
elseif self.mode == "two" then
--Moving Out
if self.zoom == self.zsteps[4] and ((hdist > 1600) or (vdist > 800)) then
self.zit = 3
flux.to(self, 1, { zoom = self.zsteps[self.zit] })
end
if self.zoom == self.zsteps[5] and ((hdist > 900 and hdist < 1600) or (vdist > 450 and hdist < 800)) then
self.zit = 4
flux.to(self, 1, { zoom = self.zsteps[self.zit] })
end
if self.zoom == self.zsteps[6] and ((hdist > 400 and hdist < 900) or (vdist > 200 and hdist < 450)) then
self.zit = 5
flux.to(self, 1, { zoom = self.zsteps[self.zit] })
end
if self.zoom == self.zsteps[8] and ((hdist > 200 and hdist < 400) or (vdist > 100 and hdist < 200)) then
self.zit = 6
flux.to(self, 1, { zoom = self.zsteps[self.zit] })
end
--Coming In
if self.zoom == self.zsteps[3] and (hdist > 900 and hdist < 1600) then
self.zit = 4
flux.to(self, 1, { zoom = self.zsteps[self.zit] })
end
if self.zoom == self.zsteps[4] and (hdist > 400 and hdist < 900) then
self.zit = 5
flux.to(self, 1, { zoom = self.zsteps[self.zit] })
end
if self.zoom == self.zsteps[5] and (hdist > 200 and hdist < 400) then
self.zit = 6
flux.to(self, 1, { zoom = self.zsteps[self.zit] })
end
if self.zoom == self.zsteps[6] and (hdist < 200) then
self.zit = 8
flux.to(self, 1, { zoom = self.zsteps[self.zit] })
end
end
end
function cam:getCenter()
local view = scrn.scl * self.zoom
local scale = scrn.scl / scrn.fullfactor
if not self.target1 or not self.target2 then return 0,0
elseif self.mode == "one" then
self.tx = scrn.w / scale / view - (self.target1.x + self.ox)
self.ty = scrn.h / scale / view - (self.target1.y - self.target1.h / scrn.scl + self.oy)
elseif self.mode == "two" then
self.tx = scrn.w / scale / view - (self.target1.x + self.target2.x ) / 2 --+ self.ox
self.ty = scrn.h / scale / view - (self.target1.y + self.target2.y ) / 2 --+ self.oy
elseif self.mode == "free" then
-- self.tx = self.tx + scrn.w / scale / view
-- self.ty = self.ty + scrn.h / scale / view
elseif self.mode == "unattached" then
-- self.tx = self.tx + scrn.w / scale / view
-- self.ty = self.ty + scrn.h / scale / view
end
return self.tx or 0, self.ty or 0
end
function cam:switchMode()
if self.mode == "one" then self.mode = "two"
elseif self.mode == "two" then self.mode = "free"
elseif self.mode == "free" or self.mode == "unattached" then self.mode = "one" end --flux.to(self, .5, { ox = 0, oy = 0 } ) end
end
function cam:switchTarget()
local t2, t1 = self.target1, self.target2
self.target1, self.target2 = t1, t2
end
function cam:getMouse(button)
if self.mode == "one" or "free" then
if button == "wu" then
if self.zit < #self.zsteps then
flux.to(self, 1, { zoom = self.zsteps[self.zit + 1], oy = self.oy + self.oy / self.zoom })
self.zit = self.zit + 1 end
end
if button == "wd" then
if self.zit > 1 then
flux.to(self, 2, { zoom = self.zsteps[self.zit - 1] })
self.zit = self.zit - 1 end
end
end
maths.wrap(self.zit, 1, #self.zsteps)
end
function cam:getZoom(offx, offy, w, h, sh, sv)
-- zoom with parallaxity
local targetx = self.target1.x -- what are these??
local targety = self.target1.y
local parx = sh / 100 -- turns sh into a percent
local pary = sv / 100
local par = parx -- and pary?
local objx, objy = 0, 0
-- Step 1: project to landscape coordinates
local resultzoom = 1.0 / (1.0 - (par - par/self.zoom)) -- it would be par / (1.0 - (par - par/zoom)) if objects would get smaller farther away
-- if (resultzoom <= 0 or resultzoom > 100) then -- FIXME: optimize treshhold??
-- return resultx, resulty, resultzoom = 0, 0, 1 end
local rx = ((1 - parx) * targetx) * resultzoom + objx / (parx + self.zoom - parx * self.zoom)
local ry = ((1 - pary) * targety) * resultzoom + objy / (pary + self.zoom - pary * self.zoom)
-- Step 2: convert to screen coordinates
if parx == 0 then resultx = offx + (objx + w) * self.zoom / resultzoom
else resultx = offx + (rx - targetx) * self.zoom / resultzoom end
if pary == 0 then resulty = offy + (objy + h) * self.zoom / resultzoom
else resulty = offy + (ry - targety) * self.zoom / resultzoom end
return resultx, resulty, resultzoom
end
return cam | mit |
AdamGagorik/darkstar | scripts/globals/items/melon_snowcone.lua | 18 | 1219 | -----------------------------------------
-- ID: 5712
-- Item: Melon Snowcone
-- Food Effect: 5 Min, All Races
-----------------------------------------
-- MP % 10 Cap 200
-- HP Healing 3
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)
result = 0;
if (target:hasStatusEffect(EFFECT_FOOD)) then
result = 246;
end
return result;
end;
-----------------------------------------
-- OnItemUse
-----------------------------------------
function onItemUse(target)
target:addStatusEffect(EFFECT_FOOD,0,0,300,5712);
end;
-----------------------------------------
-- onEffectGain Action
-----------------------------------------
function onEffectGain(target,effect)
target:addMod(MOD_FOOD_MPP, 10);
target:addMod(MOD_FOOD_MP_CAP, 200);
target:addMod(MOD_HPHEAL, 3);
end;
-----------------------------------------
-- onEffectLose Action
-----------------------------------------
function onEffectLose(target,effect)
target:delMod(MOD_FOOD_MPP, 10);
target:delMod(MOD_FOOD_MP_CAP, 200);
target:delMod(MOD_HPHEAL, 3);
end;
| gpl-3.0 |
Hostle/luci | modules/luci-base/luasrc/dispatcher.lua | 1 | 21086 | -- 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 "nixio", require "nixio.util"
module("luci.dispatcher", package.seeall)
context = util.threadlocal()
uci = require "luci.model.uci"
i18n = require "luci.i18n"
_M.fs = fs
authenticator = {}
-- Index table
local index = nil
-- Fastindex
local fi
function build_url(...)
local path = {...}
local url = { http.getenv("SCRIPT_NAME") or "" }
local p
for _, p in ipairs(path) do
if p:match("^[a-zA-Z0-9_%-%.%%/,;]+$") then
url[#url+1] = "/"
url[#url+1] = p
end
end
if #path == 0 then
url[#url+1] = "/"
end
return table.concat(url, "")
end
function node_visible(node)
if node then
return not (
(not node.title or #node.title == 0) or
(not node.target or node.hidden == true) or
(type(node.target) == "table" and node.target.type == "firstchild" and
(type(node.nodes) ~= "table" or not next(node.nodes)))
)
end
return false
end
function node_childs(node)
local rv = { }
if node then
local k, v
for k, v in util.spairs(node.nodes,
function(a, b)
return (node.nodes[a].order or 100)
< (node.nodes[b].order or 100)
end)
do
if node_visible(v) then
rv[#rv+1] = k
end
end
end
return rv
end
function error404(message)
http.status(404, "Not Found")
message = message or "Not Found"
require("luci.template")
if not util.copcall(luci.template.render, "error404") then
http.prepare_content("text/plain")
http.write(message)
end
return false
end
function error500(message)
util.perror(message)
if not context.template_header_sent then
http.status(500, "Internal Server Error")
http.prepare_content("text/plain")
http.write(message)
else
require("luci.template")
if not util.copcall(luci.template.render, "error500", {message=message}) then
http.prepare_content("text/plain")
http.write(message)
end
end
return false
end
function authenticator.htmlauth(validator, accs, default)
local user = http.formvalue("luci_username")
local pass = http.formvalue("luci_password")
if user and validator(user, pass) then
return user
end
require("luci.i18n")
require("luci.template")
context.path = {}
http.status(403, "Forbidden")
luci.template.render("sysauth", {duser=default, fuser=user})
return false
end
function httpdispatch(request, prefix)
http.context.request = request
local r = {}
context.request = r
local pathinfo = http.urldecode(request:getenv("PATH_INFO") or "", true)
if prefix then
for _, node in ipairs(prefix) do
r[#r+1] = node
end
end
for node in pathinfo:gmatch("[^/]+") do
r[#r+1] = node
end
local stat, err = util.coxpcall(function()
dispatch(context.request)
end, error500)
http.close()
--context._disable_memtrace()
end
local function require_post_security(target)
if type(target) == "table" then
if type(target.post) == "table" then
local param_name, required_val, request_val
for param_name, required_val in pairs(target.post) do
request_val = http.formvalue(param_name)
if (type(required_val) == "string" and
request_val ~= required_val) or
(required_val == true and
(request_val == nil or request_val == ""))
then
return false
end
end
return true
end
return (target.post == true)
end
return false
end
function test_post_security()
if http.getenv("REQUEST_METHOD") ~= "POST" then
http.status(405, "Method Not Allowed")
http.header("Allow", "POST")
return false
end
if http.formvalue("token") ~= context.authtoken then
http.status(403, "Forbidden")
luci.template.render("csrftoken")
return false
end
return true
end
function dispatch(request)
--context._disable_memtrace = require "luci.debug".trap_memtrace("l")
local ctx = context
ctx.path = request
local conf = require "luci.config"
assert(conf.main,
"/etc/config/luci seems to be corrupt, unable to find section 'main'")
local lang = conf.main.lang or "auto"
if lang == "auto" then
local aclang = http.getenv("HTTP_ACCEPT_LANGUAGE") or ""
for lpat in aclang:gmatch("[%w-]+") do
lpat = lpat and lpat:gsub("-", "_")
if conf.languages[lpat] then
lang = lpat
break
end
end
end
require "luci.i18n".setlanguage(lang)
local c = ctx.tree
local stat
if not c then
c = createtree()
end
local track = {}
local args = {}
ctx.args = args
ctx.requestargs = ctx.requestargs or args
local n
local preq = {}
local freq = {}
for i, s in ipairs(request) do
preq[#preq+1] = s
freq[#freq+1] = s
c = c.nodes[s]
n = i
if not c then
break
end
util.update(track, c)
if c.leaf then
break
end
end
if c and c.leaf then
for j=n+1, #request do
args[#args+1] = request[j]
freq[#freq+1] = request[j]
end
end
ctx.requestpath = ctx.requestpath or freq
ctx.path = preq
if track.i18n then
i18n.loadc(track.i18n)
end
-- Init template engine
if (c and c.index) or not track.notemplate then
local tpl = require("luci.template")
local media = track.mediaurlbase or luci.config.main.mediaurlbase
if not pcall(tpl.Template, "themes/%s/header" % fs.basename(media)) then
media = nil
for name, theme in pairs(luci.config.themes) do
if name:sub(1,1) ~= "." and pcall(tpl.Template,
"themes/%s/header" % fs.basename(theme)) then
media = theme
end
end
assert(media, "No valid theme found")
end
local function _ifattr(cond, key, val)
if cond then
local env = getfenv(3)
local scope = (type(env.self) == "table") and env.self
return string.format(
' %s="%s"', tostring(key),
util.pcdata(tostring( val
or (type(env[key]) ~= "function" and env[key])
or (scope and type(scope[key]) ~= "function" and scope[key])
or "" ))
)
else
return ''
end
end
tpl.context.viewns = setmetatable({
write = http.write;
include = function(name) tpl.Template(name):render(getfenv(2)) end;
translate = i18n.translate;
translatef = i18n.translatef;
export = function(k, v) if tpl.context.viewns[k] == nil then tpl.context.viewns[k] = v end end;
striptags = util.striptags;
pcdata = util.pcdata;
media = media;
theme = fs.basename(media);
resource = luci.config.main.resourcebase;
ifattr = function(...) return _ifattr(...) end;
attr = function(...) return _ifattr(true, ...) end;
url = build_url;
}, {__index=function(table, key)
if key == "controller" then
return build_url()
elseif key == "REQUEST_URI" then
return build_url(unpack(ctx.requestpath))
elseif key == "token" then
return ctx.authtoken
else
return rawget(table, key) or _G[key]
end
end})
end
track.dependent = (track.dependent ~= false)
assert(not track.dependent or not track.auto,
"Access Violation\nThe page at '" .. table.concat(request, "/") .. "/' " ..
"has no parent node so the access to this location has been denied.\n" ..
"This is a software bug, please report this message at " ..
"http://luci.subsignal.org/trac/newticket"
)
if track.sysauth then
local authen = type(track.sysauth_authenticator) == "function"
and track.sysauth_authenticator
or authenticator[track.sysauth_authenticator]
local def = (type(track.sysauth) == "string") and track.sysauth
local accs = def and {track.sysauth} or track.sysauth
local sess = ctx.authsession
if not sess then
sess = http.getcookie("sysauth")
sess = sess and sess:match("^[a-f0-9]*$")
end
local sdat = (util.ubus("session", "get", { ubus_rpc_session = sess }) or { }).values
local user, token
if sdat then
user = sdat.user
token = sdat.token
else
local eu = http.getenv("HTTP_AUTH_USER")
local ep = http.getenv("HTTP_AUTH_PASS")
if eu and ep and sys.user.checkpasswd(eu, ep) then
authen = function() return eu end
end
end
if not util.contains(accs, user) then
if authen then
local user, sess = authen(sys.user.checkpasswd, accs, def)
local token
if not user or not util.contains(accs, user) then
return
else
if not sess then
local sdat = util.ubus("session", "create", { timeout = tonumber(luci.config.sauth.sessiontime) })
if sdat then
token = sys.uniqueid(16)
util.ubus("session", "set", {
ubus_rpc_session = sdat.ubus_rpc_session,
values = {
user = user,
token = token,
section = sys.uniqueid(16)
}
})
sess = sdat.ubus_rpc_session
end
end
if sess and token then
http.header("Set-Cookie", 'sysauth=%s; path=%s' %{ sess, build_url() })
ctx.authsession = sess
ctx.authtoken = token
ctx.authuser = user
http.redirect(build_url(unpack(ctx.requestpath)))
end
end
else
http.status(403, "Forbidden")
return
end
else
ctx.authsession = sess
ctx.authtoken = token
ctx.authuser = user
end
end
if c and require_post_security(c.target) then
if not test_post_security(c) then
return
end
end
if track.setgroup then
sys.process.setgroup(track.setgroup)
end
if track.setuser then
sys.process.setuser(track.setuser)
end
local target = nil
if c then
if type(c.target) == "function" then
target = c.target
elseif type(c.target) == "table" then
target = c.target.target
end
end
if c and (c.index or type(target) == "function") then
ctx.dispatched = c
ctx.requested = ctx.requested or ctx.dispatched
end
if c and c.index then
local tpl = require "luci.template"
if util.copcall(tpl.render, "indexer", {}) then
return true
end
end
if type(target) == "function" then
util.copcall(function()
local oldenv = getfenv(target)
local module = require(c.module)
local env = setmetatable({}, {__index=
function(tbl, key)
return rawget(tbl, key) or module[key] or oldenv[key]
end})
setfenv(target, env)
end)
local ok, err
if type(c.target) == "table" then
ok, err = util.copcall(target, c.target, unpack(args))
else
ok, err = util.copcall(target, unpack(args))
end
assert(ok,
"Failed to execute " .. (type(c.target) == "function" and "function" or c.target.type or "unknown") ..
" dispatcher target for entry '/" .. table.concat(request, "/") .. "'.\n" ..
"The called action terminated with an exception:\n" .. tostring(err or "(unknown)"))
else
local root = node()
if not root or not root.target then
error404("No root node was registered, this usually happens if no module was installed.\n" ..
"Install luci-mod-admin-full and retry. " ..
"If the module is already installed, try removing the /tmp/luci-indexcache file.")
else
error404("No page is registered at '/" .. table.concat(request, "/") .. "'.\n" ..
"If this url belongs to an extension, make sure it is properly installed.\n" ..
"If the extension was recently installed, try removing the /tmp/luci-indexcache file.")
end
end
end
function createindex()
local controllers = { }
local base = "%s/controller/" % util.libpath()
local _, path
for path in (fs.glob("%s*.lua" % base) or function() end) do
controllers[#controllers+1] = path
end
for path in (fs.glob("%s*/*.lua" % base) or function() end) do
controllers[#controllers+1] = path
end
if indexcache then
local cachedate = fs.stat(indexcache, "mtime")
if cachedate then
local realdate = 0
for _, obj in ipairs(controllers) do
local omtime = fs.stat(obj, "mtime")
realdate = (omtime and omtime > realdate) and omtime or realdate
end
if cachedate > realdate and sys.process.info("uid") == 0 then
assert(
sys.process.info("uid") == fs.stat(indexcache, "uid")
and fs.stat(indexcache, "modestr") == "rw-------",
"Fatal: Indexcache is not sane!"
)
index = loadfile(indexcache)()
return index
end
end
end
index = {}
for _, path in ipairs(controllers) do
local modname = "luci.controller." .. path:sub(#base+1, #path-4):gsub("/", ".")
local mod = require(modname)
assert(mod ~= true,
"Invalid controller file found\n" ..
"The file '" .. path .. "' contains an invalid module line.\n" ..
"Please verify whether the module name is set to '" .. modname ..
"' - It must correspond to the file path!")
local idx = mod.index
assert(type(idx) == "function",
"Invalid controller file found\n" ..
"The file '" .. path .. "' contains no index() function.\n" ..
"Please make sure that the controller contains a valid " ..
"index function and verify the spelling!")
index[modname] = idx
end
if indexcache then
local f = nixio.open(indexcache, "w", 600)
f:writeall(util.get_bytecode(index))
f:close()
end
end
-- Build the index before if it does not exist yet.
function createtree()
if not index then
createindex()
end
local ctx = context
local tree = {nodes={}, inreq=true}
local modi = {}
ctx.treecache = setmetatable({}, {__mode="v"})
ctx.tree = tree
ctx.modifiers = modi
-- Load default translation
require "luci.i18n".loadc("base")
local scope = setmetatable({}, {__index = luci.dispatcher})
for k, v in pairs(index) do
scope._NAME = k
setfenv(v, scope)
v()
end
local function modisort(a,b)
return modi[a].order < modi[b].order
end
for _, v in util.spairs(modi, modisort) do
scope._NAME = v.module
setfenv(v.func, scope)
v.func()
end
return tree
end
function modifier(func, order)
context.modifiers[#context.modifiers+1] = {
func = func,
order = order or 0,
module
= getfenv(2)._NAME
}
end
function assign(path, clone, title, order)
local obj = node(unpack(path))
obj.nodes = nil
obj.module = nil
obj.title = title
obj.order = order
setmetatable(obj, {__index = _create_node(clone)})
return obj
end
function entry(path, target, title, order)
local c = node(unpack(path))
c.target = target
c.title = title
c.order = order
c.module = getfenv(2)._NAME
return c
end
-- enabling the node.
function get(...)
return _create_node({...})
end
function node(...)
local c = _create_node({...})
c.module = getfenv(2)._NAME
c.auto = nil
return c
end
function _create_node(path)
if #path == 0 then
return context.tree
end
local name = table.concat(path, ".")
local c = context.treecache[name]
if not c then
local last = table.remove(path)
local parent = _create_node(path)
c = {nodes={}, auto=true}
-- the node is "in request" if the request path matches
-- at least up to the length of the node path
if parent.inreq and context.path[#path+1] == last then
c.inreq = true
end
parent.nodes[last] = c
context.treecache[name] = c
end
return c
end
-- Subdispatchers --
function _firstchild()
local path = { unpack(context.path) }
local name = table.concat(path, ".")
local node = context.treecache[name]
local lowest
if node and node.nodes and next(node.nodes) then
local k, v
for k, v in pairs(node.nodes) do
if not lowest or
(v.order or 100) < (node.nodes[lowest].order or 100)
then
lowest = k
end
end
end
assert(lowest ~= nil,
"The requested node contains no childs, unable to redispatch")
path[#path+1] = lowest
dispatch(path)
end
function firstchild()
return { type = "firstchild", target = _firstchild }
end
function alias(...)
local req = {...}
return function(...)
for _, r in ipairs({...}) do
req[#req+1] = r
end
dispatch(req)
end
end
function rewrite(n, ...)
local req = {...}
return function(...)
local dispatched = util.clone(context.dispatched)
for i=1,n do
table.remove(dispatched, 1)
end
for i, r in ipairs(req) do
table.insert(dispatched, i, r)
end
for _, r in ipairs({...}) do
dispatched[#dispatched+1] = r
end
dispatch(dispatched)
end
end
local function _call(self, ...)
local func = getfenv()[self.name]
assert(func ~= nil,
'Cannot resolve function "' .. self.name .. '". Is it misspelled or local?')
assert(type(func) == "function",
'The symbol "' .. self.name .. '" does not refer to a function but data ' ..
'of type "' .. type(func) .. '".')
if #self.argv > 0 then
return func(unpack(self.argv), ...)
else
return func(...)
end
end
function call(name, ...)
return {type = "call", argv = {...}, name = name, target = _call}
end
function post_on(params, name, ...)
return {
type = "call",
post = params,
argv = { ... },
name = name,
target = _call
}
end
function post(...)
return post_on(true, ...)
end
local _template = function(self, ...)
require "luci.template".render(self.view)
end
function template(name)
return {type = "template", view = name, target = _template}
end
local function _cbi(self, ...)
local cbi = require "luci.cbi"
local tpl = require "luci.template"
local http = require "luci.http"
local config = self.config or {}
local maps = cbi.load(self.model, ...)
local state = nil
for i, res in ipairs(maps) do
res.flow = config
local cstate = res:parse()
if cstate and (not state or cstate < state) then
state = cstate
end
end
local function _resolve_path(path)
return type(path) == "table" and build_url(unpack(path)) or path
end
if config.on_valid_to and state and state > 0 and state < 2 then
http.redirect(_resolve_path(config.on_valid_to))
return
end
if config.on_changed_to and state and state > 1 then
http.redirect(_resolve_path(config.on_changed_to))
return
end
if config.on_success_to and state and state > 0 then
http.redirect(_resolve_path(config.on_success_to))
return
end
if config.state_handler then
if not config.state_handler(state, maps) then
return
end
end
http.header("X-CBI-State", state or 0)
if not config.noheader then
tpl.render("cbi/header", {state = state})
end
local redirect
local messages
local applymap = false
local pageaction = true
local parsechain = { }
for i, res in ipairs(maps) do
if res.apply_needed and res.parsechain then
local c
for _, c in ipairs(res.parsechain) do
parsechain[#parsechain+1] = c
end
applymap = true
end
if res.redirect then
redirect = redirect or res.redirect
end
if res.pageaction == false then
pageaction = false
end
if res.message then
messages = messages or { }
messages[#messages+1] = res.message
end
end
for i, res in ipairs(maps) do
res:render({
firstmap = (i == 1),
applymap = applymap,
redirect = redirect,
messages = messages,
pageaction = pageaction,
parsechain = parsechain
})
end
if not config.nofooter then
tpl.render("cbi/footer", {
flow = config,
pageaction = pageaction,
redirect = redirect,
state = state,
autoapply = config.autoapply
})
end
end
function cbi(model, config)
return {
type = "cbi",
post = { ["cbi.submit"] = "1" },
config = config,
model = model,
target = _cbi
}
end
local function _arcombine(self, ...)
local argv = {...}
local target = #argv > 0 and self.targets[2] or self.targets[1]
setfenv(target.target, self.env)
target:target(unpack(argv))
end
function arcombine(trg1, trg2)
return {type = "arcombine", env = getfenv(), target = _arcombine, targets = {trg1, trg2}}
end
local function _form(self, ...)
local cbi = require "luci.cbi"
local tpl = require "luci.template"
local http = require "luci.http"
local maps = luci.cbi.load(self.model, ...)
local state = nil
for i, res in ipairs(maps) do
local cstate = res:parse()
if cstate and (not state or cstate < state) then
state = cstate
end
end
http.header("X-CBI-State", state or 0)
tpl.render("header")
for i, res in ipairs(maps) do
res:render()
end
tpl.render("footer")
end
function form(model)
return {
type = "cbi",
post = { ["cbi.submit"] = "1" },
model = model,
target = _form
}
end
translate = i18n.translate
-- This function does not actually translate the given argument but
-- is used by build/i18n-scan.pl to find translatable entries.
function _(text)
return text
end
-- get the current user anyway we can
-- if no user if found return "nobody"
if fs.stat("/usr/lib/lua/luci/users.lua") then
function get_user()
local fs = require "nixio.fs"
local http = require "luci.http"
local util = require "luci.util"
local sess = luci.http.getcookie("sysauth")
local sdat = (util.ubus("session", "get", { ubus_rpc_session = sess }) or { }).values
if sdat then
user = sdat.user
return(user)
elseif http.formvalue("username") then
user = http.formvalue("username")
return(user)
elseif http.getenv("HTTP_AUTH_USER") then
user = http.getenv("HTTP_AUTH_USER")
return(user)
else
user = "nobody"
return(user)
end
end
end
| apache-2.0 |
rinstrum/LUA-LIB | src/rinLibrary/K400USB.lua | 2 | 13147 | -------------------------------------------------------------------------------
--- USB Helper Infrastructure.
-- Support routines to provide a semi-standard interface to USB file copying
-- and package installation.
-- @module rinLibrary.Device.USB
-- @author Pauli
-- @copyright 2014 Rinstrum Pty Ltd
-------------------------------------------------------------------------------
local usb = require 'rinLibrary.rinUSB'
local dbg = require "rinLibrary.rinDebug"
local timers = require 'rinSystem.rinTimers'
local utils = require 'rinSystem.utilities'
local naming = require 'rinLibrary.namings'
local posix = require 'posix'
local pairs = pairs
local os = os
local whenMap = {
idle = 'idle',
immediate = 'immediate',
manual = 'manual'
}
--- When Setting Modes.
--
-- This setting determines when the automatic USB storage handler will operate.
--@table usbWhenMode
-- @field idle Called during the main loop after a USB storage device appears.
-- @field immediate Called immediately after a USB storage device appears.
-- @field manual Never called.
--- USB Storage Subsystem Parameters
--
-- The storage subsystem provides a number of call backs which allow control
-- over the copying and update processes. Generally, you will only need
-- to specify a backup and an update call back.
-- @table usbActivateParameters
-- @field automatic Boolean which, when true, skips the user menu and does the copying
-- automatically. Default is false.
--
-- @field backup Call back to backup the module to the USB and save logs etc.
-- The USB storage device's mount point path is passed to the call back. This
-- call back should return true to indicate that some deletions are possible and
-- that the user should be prompted to do so.
--
-- @field delete Call back that is called to delete files from the module after
-- the USB device has been removed.
--
-- @field new Call back when a new USB storage device becomes available.
-- The USB storage device's mount point path is passed to the call back. This
-- call back can return a new when code that replaces the previous set when
-- code just for this USB storage device, returning nothing or nil will use
-- the normally defined when code.
--
-- @field package A boolean which, when true, allows package files to be
-- installed from the USB storage device. Default is true.
--
-- @field removed Call back when a USB storage device is removed. No arguments
-- are passed to the call back.
--
-- @field unmount Call back when the USB storage device is about to be unmounted.
-- The USB storage device's mount point path is passed to the call back.
-- @see usbWhenMode
--
-- @field update Call back to update the module from the USB storage device.
-- The USB storage device's mount point path is passed to the call back.
-- This call back can return true to indicate that a reboot is required.
--
-- @field when Secify when the automatic USB storage handler is invoked.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
-- Submodule function begins here
return function (_M, private, deprecated)
local newUsbCB, removedUsbCB, backupUsbCB, updateUsbCB, unmountUsbCB, deleteUsbCB
local mountPoint
local doDelete, mustReboot, usbRemoved, noMenu = false, false, false, false
local when, theMenu, packageRecovery, packageList = 'idle', nil, true, nil
-------------------------------------------------------------------------------
-- Display a message to the screen in a standard manner.
-- @param m Message to display
-- @param params Optional display parameters
-- @local
local function message(m, params)
params = params or 'align=right, sync'
_M.write('bottomRight', '')
_M.write('topRight', '')
_M.write('topLeft', 'USB')
_M.write('bottomLeft', m, params)
end
-------------------------------------------------------------------------------
-- Unmount the attached USB storage device.
--
-- Appropraite messages are displayed on the display during this process.
--
-- You won't need to call this unless you are taking control of the USB storage
-- handling yourself.
-- @usage
-- device.usbUnmount('/dev/sda1')
function _M.usbUnmount()
message('UNMOUNT')
utils.call(unmountUsbCB, mountPoint)
usb.unmount(mountPoint)
_M.write('bottomLeft', 'REMOVE', 'align=right')
end
-------------------------------------------------------------------------------
-- Display the writing backup messages and call the user's call back.
--
-- Appropraite messages are displayed on the display during this process.
--
-- You won't need to call this unless you are taking control of the USB storage
-- handling yourself.
-- @return the return value(s) from the user's call back or nil
-- @usage
-- device.usbBackup()
function _M.usbBackup()
message('WRITING')
return utils.call(backupUsbCB, mountPoint)
end
-------------------------------------------------------------------------------
-- Display the reading / update messages and call the user's call back.
--
-- Appropraite messages are displayed on the display during this process.
--
-- You won't need to call this unless you are taking control of the USB storage
-- handling yourself.
-- @return the return value(s) from the user's call back or nil
-- @usage
-- device.usbUpdate()
function _M.usbUpdate()
message('READING')
return utils.call(updateUsbCB, mountPoint)
end
-------------------------------------------------------------------------------
-- Indicate that a reboot is required when the USB storage device is unmounted.
--
-- You generally won't need to call this because the return code from your
-- update routine sets this directly.
-- @see usbReboot
-- @usage
-- device.usbRebootRequired()
function _M.usbDeletionRequired()
doDelete = true
end
-------------------------------------------------------------------------------
-- Indicate that a reboot is required when the USB storage device is unmounted.
--
-- You generally won't need to call this because the return code from your
-- update routine sets this directly.
-- @see usbReboot
-- @usage
-- device.usbRebootRequired()
function _M.usbRebootRequired()
mustReboot = true
end
-------------------------------------------------------------------------------
-- Display the reboot message and reboot the module and display.
--
-- Appropraite messages are displayed on the display during this process.
--
-- You won't need to call this unless you are taking control of the USB storage
-- handling yourself.
-- @see usbRebootRequired
-- @usage
-- device.usbReboot()
function _M.usbReboot()
_M.buzz(3) -- "triple beep" on reboot
message('REBOOT')
_M.restart('all')
end
-------------------------------------------------------------------------------
-- Set when the automatic USB handler is invoked.
--
-- You generally don't need to call this directly, the when setting can be
-- specified when activing the storage helper subsystem.
-- @tparam usbWhenMode w When ('idle', 'immediate', 'manual')
-- @see usbActivateStorage
-- @usage
-- device.usbSetWhen('immediate')
function _M.usbSetWhen(w)
when = naming.convertNameToValue(w, whenMap, 'idle')
end
-------------------------------------------------------------------------------
-- Copy things from the USB device, optionally schedule a reboot.
-- @local
local function copyFrom()
if _M.usbUpdate() == true then
_M.usbRebootRequired()
end
end
-------------------------------------------------------------------------------
-- Copy things to the USB device, optionally schedule a deletion query.
-- @local
local function copyTo()
if _M.usbBackup() == true then
_M.usbDeletionRequired()
end
end
-------------------------------------------------------------------------------
-- Attempt to install all of the discovered package files
-- @local
local function installPackages()
message('PACKAGES')
for _, pkg in pairs(packageList) do
os.execute('/usr/local/bin/rinfwupgrade ' .. pkg)
end
utils.reboot()
end
-------------------------------------------------------------------------------
-- Confirm packages are to be installed and install them if confirmed
-- @local
local function confirmInstall()
local n, prompt = #packageList, 'INSTALL PACKAGE'
_M.write('topLeft', 'USB')
if n > 1 then
prompt = 'INSTALL '..n..' PACKAGES'
end
if _M.askOK('CONFIRM?', prompt) == 'ok' then
installPackages()
end
end
-------------------------------------------------------------------------------
-- USB storage save/restore handler
-- @param mountPoint Mount point for the USB storage device
-- @local
local function newUsb(mountPoint)
local mode, restoreDisplay = _M.lcdControl('lua'), _M.saveDisplay()
local savedKeyHandlers = _M.saveKeyCallbacks(false)
_M.setKeyGroupCallback('all', utils.True)
message('FOUND', 'time=2, wait, clear')
if packageRecovery then
packageList = posix.glob(mountPoint .. '/*.[oOrR][Pp][kK]')
end
if noMenu then
if backupUsbCB then copyTo() end
if updateUsbCB then copyFrom() end
if packageList then installPackages() end
else
theMenu = _M.createMenu { 'USB STORAGE', loop=true }
.item { 'TO', secondary='USB', run=copyTo, enabled=backupUsbCB ~= nil }
.item { 'FROM', secondary='USB', run=copyFrom, enabled=updateUsbCB ~= nil }
.item { 'INSTAL', secondary='PACKAGES', run=confirmInstall, enabled=packageList ~= nil }
.item { 'EJECT', secondary='USB', exit=true, }
theMenu.run()
theMenu = nil
end
packageList = nil
if not usbRemoved then
_M.usbUnmount()
_M.app.delayUntil(function() return usbRemoved end)
end
savedKeyHandlers()
restoreDisplay()
_M.lcdControl(mode)
end
-------------------------------------------------------------------------------
-- Call back for USB registration events
-- @param loc Mount point for new USB storage device
-- @local
local function added(loc)
mountPoint, doDelete, mustReboot, usbRemoved = loc, false, false, false
_M.buzz(1) -- "single beep" on USB registration
local w = utils.call(newUsbCB, loc) or when
if w == 'immediate' then
newUsb(loc)
elseif w == 'idle' then
_M.app.addIdleEvent(newUsb, loc)
end
end
-------------------------------------------------------------------------------
-- Call back for USB deregistration events
-- @local
local function removed()
_M.buzz(2) -- "double beep" when USB is unplugged
utils.call(removedUsbCB)
usbRemoved = true
if theMenu ~= nil then _M.abortDialog() end
if doDelete and utils.callable(deleteUsbCB) then
_M.write('topLeft', 'DELETE')
if _M.askOK('OK ?', 'LOG FILES') == 'ok' then
utils.call(deleteUsbCB)
_M.write('topLeft', 'LOGS')
_M.write('bottomRight', '')
_M.write('bottomLeft', 'DELETED', 'wait, time=1.5')
end
end
if mustReboot then
_M.usbReboot()
end
mountPoint, mustReboot = nil, false
end
-------------------------------------------------------------------------------
-- Activate the USB storage subsystem.
-- @tparam usbActivateParameters args Parameters for the subsystem
-- @see usbDeactiveStorage
function _M.usbActivateStorage(args)
newUsbCB = args.new utils.checkCallback(newUsbCB)
removedUsbCB = args.removed utils.checkCallback(removedUsbCB)
backupUsbCB = args.backup utils.checkCallback(backupUsbCB)
updateUsbCB = args.update utils.checkCallback(updateUsbCB)
unmountUsbCB = args.unmount utils.checkCallback(unmountUsbCB)
deleteUsbCB = args.delete utils.checkCallback(deleteUsbCB)
_M.usbSetWhen(args.when)
noMenu = args.automatic == true
packageRecovery = args.package ~= false
usb.setStorageAddedCallback(added)
usb.setStorageRemovedCallback(removed)
end
-------------------------------------------------------------------------------
-- Deactivate the USB storage subsystem.
-- @see usbActivateStorage
function _M.usbDeactiveStorage()
usb.setStorageAddedCallback(nil)
usb.setStorageRemovedCallback(nil)
end
-------------------------------------------------------------------------------
-- Indictor function to tell if the auto USB subsystem is active or not
-- @treturn bool True if a menu is active
-- @usage
-- if not device.usbStorageInProgress() then
-- device.display('topLeft', 'HELLO')
-- end
function _M.usbStorageInProgress()
return theMenu ~= nil
end
end
| gpl-3.0 |
TrurlMcByte/docker-prosody | etc/prosody-modules/mod_auth_phpbb3/mod_auth_phpbb3.lua | 1 | 8699 | -- phpbb3 authentication backend for Prosody
--
-- Copyright (C) 2011 Waqas Hussain
--
local log = require "util.logger".init("auth_sql");
local new_sasl = require "util.sasl".new;
local nodeprep = require "util.encodings".stringprep.nodeprep;
local saslprep = require "util.encodings".stringprep.saslprep;
local DBI = require "DBI"
local md5 = require "util.hashes".md5;
local uuid_gen = require "util.uuid".generate;
local have_bcrypt, bcrypt = pcall(require, "bcrypt"); -- available from luarocks
local connection;
local params = module:get_option("sql");
local resolve_relative_path = require "core.configmanager".resolve_relative_path;
local function test_connection()
if not connection then return nil; end
if connection:ping() then
return true;
else
module:log("debug", "Database connection closed");
connection = nil;
end
end
local function connect()
if not test_connection() then
prosody.unlock_globals();
local dbh, err = DBI.Connect(
params.driver, params.database,
params.username, params.password,
params.host, params.port
);
prosody.lock_globals();
if not dbh then
module:log("debug", "Database connection failed: %s", tostring(err));
return nil, err;
end
module:log("debug", "Successfully connected to database");
dbh:autocommit(true); -- don't run in transaction
connection = dbh;
return connection;
end
end
do -- process options to get a db connection
params = params or { driver = "SQLite3" };
if params.driver == "SQLite3" then
params.database = resolve_relative_path(prosody.paths.data or ".", params.database or "prosody.sqlite");
end
assert(params.driver and params.database, "Both the SQL driver and the database need to be specified");
assert(connect());
end
local function getsql(sql, ...)
if params.driver == "PostgreSQL" then
sql = sql:gsub("`", "\"");
end
if not test_connection() then connect(); end
-- do prepared statement stuff
local stmt, err = connection:prepare(sql);
if not stmt and not test_connection() then error("connection failed"); end
if not stmt then module:log("error", "QUERY FAILED: %s %s", err, debug.traceback()); return nil, err; end
-- run query
local ok, err = stmt:execute(...);
if not ok and not test_connection() then error("connection failed"); end
if not ok then return nil, err; end
return stmt;
end
local function setsql(sql, ...)
local stmt, err = getsql(sql, ...);
if not stmt then return stmt, err; end
return stmt:affected();
end
local function get_password(username)
local stmt, err = getsql("SELECT `user_password` FROM `phpbb_users` WHERE `username_clean`=?", username);
if stmt then
for row in stmt:rows(true) do
return row.user_password;
end
end
end
local function check_sessionids(username, session_id)
-- TODO add session expiration and auto-login check
local stmt, err = getsql("SELECT phpbb_sessions.session_id FROM phpbb_sessions INNER JOIN phpbb_users ON phpbb_users.user_id = phpbb_sessions.session_user_id WHERE phpbb_users.username_clean =?", username);
if stmt then
for row in stmt:rows(true) do
-- if row.session_id == session_id then return true; end
-- workaround for possible LuaDBI bug
-- The session_id returned by the sql statement has an additional zero at the end. But that is not in the database.
if row.session_id == session_id or row.session_id == session_id.."0" then return true; end
end
end
end
local itoa64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
local function hashEncode64(input, count)
local output = "";
local i, value = 0, 0;
while true do
value = input:byte(i+1)
i = i+1;
local idx = value % 0x40 + 1;
output = output .. itoa64:sub(idx, idx);
if i < count then
value = value + input:byte(i+1) * 256;
end
local _ = value % (2^6);
local idx = ((value - _) / (2^6)) % 0x40 + 1
output = output .. itoa64:sub(idx, idx);
if i >= count then break; end
i = i+1;
if i < count then
value = value + input:byte(i+1) * 256 * 256;
end
local _ = value % (2^12);
local idx = ((value - _) / (2^12)) % 0x40 + 1
output = output .. itoa64:sub(idx, idx);
if i >= count then break; end
i = i+1;
local _ = value % (2^18);
local idx = ((value - _) / (2^18)) % 0x40 + 1
output = output .. itoa64:sub(idx, idx);
if not(i < count) then break; end
end
return output;
end
local function hashCryptPrivate(password, genSalt)
local output = "*";
if not genSalt:match("^%$H%$") then return output; end
local count_log2 = itoa64:find(genSalt:sub(4,4)) - 1;
if count_log2 < 7 or count_log2 > 30 then return output; end
local count = 2 ^ count_log2;
local salt = genSalt:sub(5, 12);
if #salt ~= 8 then return output; end
local hash = md5(salt..password);
while true do
hash = md5(hash..password);
if not(count > 1) then break; end
count = count-1;
end
output = genSalt:sub(1, 12);
output = output .. hashEncode64(hash, 16);
return output;
end
local function hashGensaltPrivate(input)
local iteration_count_log2 = 6;
local output = "$H$";
local idx = math.min(iteration_count_log2 + 5, 30) + 1;
output = output .. itoa64:sub(idx, idx);
output = output .. hashEncode64(input, 6);
return output;
end
local function phpbbCheckHash(password, hash)
if #hash == 32 then return hash == md5(password, true); end -- legacy PHPBB2 hash
if #hash == 34 then return hashCryptPrivate(password, hash) == hash; end
if #hash == 60 and have_bcrypt then return bcrypt.verify(password, hash); end
module:log("error", "Unsupported hash: %s", hash);
return false;
end
local function phpbbCreateHash(password)
local random = uuid_gen():sub(-6);
local salt = hashGensaltPrivate(random);
local hash = hashCryptPrivate(password, salt);
if #hash == 34 then return hash; end
return md5(password, true);
end
provider = {};
function provider.test_password(username, password)
local hash = get_password(username);
return hash and phpbbCheckHash(password, hash);
end
function provider.user_exists(username)
module:log("debug", "test user %s existence", username);
return get_password(username) and true;
end
function provider.get_password(username)
return nil, "Getting password is not supported.";
end
function provider.set_password(username, password)
local hash = phpbbCreateHash(password);
local stmt, err = setsql("UPDATE `phpbb_users` SET `user_password`=? WHERE `username_clean`=?", hash, username);
return stmt and true, err;
end
function provider.create_user(username, password)
return nil, "Account creation/modification not supported.";
end
local escapes = {
[" "] = "\\20";
['"'] = "\\22";
["&"] = "\\26";
["'"] = "\\27";
["/"] = "\\2f";
[":"] = "\\3a";
["<"] = "\\3c";
[">"] = "\\3e";
["@"] = "\\40";
["\\"] = "\\5c";
};
local unescapes = {};
for k,v in pairs(escapes) do unescapes[v] = k; end
local function jid_escape(s) return s and (s:gsub(".", escapes)); end
local function jid_unescape(s) return s and (s:gsub("\\%x%x", unescapes)); end
function provider.get_sasl_handler()
local sasl = {};
function sasl:clean_clone() return provider.get_sasl_handler(); end
function sasl:mechanisms() return { PLAIN = true; }; end
function sasl:select(mechanism)
if not self.selected and mechanism == "PLAIN" then
self.selected = mechanism;
return true;
end
end
function sasl:process(message)
if not message then return "failure", "malformed-request"; end
local authorization, authentication, password = message:match("^([^%z]*)%z([^%z]+)%z([^%z]+)");
if not authorization then return "failure", "malformed-request"; end
authentication = saslprep(authentication);
password = saslprep(password);
if (not password) or (password == "") or (not authentication) or (authentication == "") then
return "failure", "malformed-request", "Invalid username or password.";
end
local function test(authentication)
local prepped = nodeprep(authentication);
local normalized = jid_unescape(prepped);
return normalized and provider.test_password(normalized, password) and prepped;
end
local username = test(authentication) or test(jid_escape(authentication));
if not username and params.sessionid_as_password then
local function test(authentication)
local prepped = nodeprep(authentication);
local normalized = jid_unescape(prepped);
return normalized and check_sessionids(normalized, password) and prepped;
end
username = test(authentication) or test(jid_escape(authentication));
end
if username then
self.username = username;
return "success";
end
return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent.";
end
return sasl;
end
module:provides("auth", provider);
| mit |
rinstrum/LUA-LIB | src/autostart.lua | 2 | 5603 | -------------------------------------------------------------------------------
--- Autostart support and failure recovery.
--
-- This can never be called from an application, it exists to start applications
-- only.
--
-- @module autostart
-- @author Pauli
-- @copyright 2014 Rinstrum Pty Ltd
-------------------------------------------------------------------------------
local posix = require 'posix'
local utils = require 'rinSystem.utilities'
local threshold = 30 -- Seconds running to consider the start a failure
local failure = 3 -- Number of sequential failures before terminating
-------------------------------------------------------------------------------
-- Return a current time. This isn't fixed to any specific base and is only
-- useful for determing time differences.
-- @return Monotonic time from arbitrary base
-- @local
local function time()
local s, n = posix.clock_gettime "monotonic"
return s + n * 0.000000001
end
return function(directory, main)
local count = 0
while count <= failure do
local s = time()
local r = os.execute('cd ' .. directory .. ' && /usr/local/bin/lua ' .. main)
if r == 0 then
count = 0
else
if time() - s < threshold then
count = count + 1
else
count = 1
end
end
end
-- Only get here if something goes horribly wrong
local rinApp = require 'rinApp'
local usb = require "rinLibrary.rinUSB"
local dev = rinApp.addK400('K401')
local usbPath, usbPackages = nil, nil
-------------------------------------------------------------------------------
-- Convert a string into a case insensitive glob string
-- @param s String
-- @return Glob string
-- @local
local function mix(s)
local r = {}
for i = 1, #s do
local c = s:sub(i, i)
local cu, cl = string.upper(c), string.lower(c)
table.insert(r, (cu == cl) and c or ('['..cu..cl..']'))
end
return table.concat(r)
end
-------------------------------------------------------------------------------
-- Copy the execution directory to USB as a tar file
-- @local
local function copyTo()
dev.write('topRight', 'SAVE', 'wait, time=.3')
local yr, mo, da = dev.RTCreadDate()
local hr, mi, se = dev.RTCreadTime()
local dest = string.format('%s/save-%s-%s%s%s%s%s%s.tar',
usbPath, dev.getSerialNumber():gsub('%s+', ''),
yr, mo, da, hr, mi, se)
os.execute('tar cf ' .. dest .. ' ' .. directory)
utils.sync()
dev.write('topRight', 'DONE SAVE', 'time=1, clear')
return true
end
-------------------------------------------------------------------------------
-- Copy lua, ini, csv, ris and txt files from the USB to the execution directory
-- @local
local function copyFrom()
dev.write('topRight', 'LOAD', 'wait, time=.3')
for _, s in pairs{ 'lua', 'luac', 'ini', 'csv', 'ris', 'txt' } do
os.execute('cp '..usbPath..'/*.'..mix(s)..' '..directory..'/')
end
utils.sync()
dev.write('topRight', 'DONE LOAD', 'time=1, clear')
return true
end
-------------------------------------------------------------------------------
-- Install all available packages from the USB
-- @local
local function installPackages()
dev.write('topRight', 'PKGS', 'wait, time=.3')
for _, pkg in pairs(usbPackages) do
os.execute('/usr/local/bin/rinfwupgrade ' .. pkg)
end
-- Package installation kills the Lua infrastructure so reboot now
utils.reboot()
end
-------------------------------------------------------------------------------
-- Change the mutable display fields
-- @local
local function updateDisplay()
local f2, f3, f4
if usbPath ~= nil then
local prompt = 'F1 EXIT F2 USB> F3 >USB'
if usbPackages then
prompt = prompt .. ' OK PKGS'
f4 = installPackages
end
dev.write('bottomLeft', 'READY')
dev.write('bottomRight', prompt, 'align=right')
f2, f3 = copyFrom, copyTo
else
dev.write('bottomLeft', 'WAIT USB')
dev.write('bottomRight', 'F1 EXIT', 'align=right')
end
dev.setKeyCallback('f2', f2, 'short')
dev.setKeyCallback('f3', f3, 'short')
dev.setKeyCallback('ok', f4, 'short')
end
dev.clearAnnunciators('all')
dev.writeTopUnits('none')
dev.writeBotUnits('none', 'none')
dev.write('topRight', '')
dev.write('topLeft', 'RECVRY')
usb.setStorageAddedCallback(function(where)
usbPath = where
usbPackages = posix.glob(where .. '/*.[oOrR][Pp][kK]')
local recover = posix.glob(where .. mix('/recovery.lua'))
if recover then
dev.write('bottomRight', #recover > 1 and 'SCRIPTS' or 'SCRIPT')
dev.write('bottomLeft', 'RUNNING', 'wait, time=.3, align=right')
for _, s in pairs(recover) do
os.execute('/usr/local/bin/lua ' .. s)
end
end
updateDisplay()
end)
usb.setStorageRemovedCallback(function()
usbPath = nil
usbPackages = nil
updateDisplay()
end)
dev.setKeyCallback('f1', rinApp.finish, 'short')
dev.setKeyGroupCallback('all', function() return true end)
rinApp.addIdleEvent(updateDisplay)
rinApp.run()
utils.reboot()
end
| gpl-3.0 |
AdamGagorik/darkstar | scripts/globals/weaponskills/vidohunir.lua | 6 | 2086 | -----------------------------------
-- Vidohunir
-- Staff weapon skill
-- Skill Level: N/A
-- Lowers target's magic defense. Duration of effect varies with TP. Laevateinn: Aftermath effect varies with TP.
-- Reduces enemy's magic defense by 10%.
-- Available only after completing the Unlocking a Myth (Black Mage) quest.
-- Aligned with the Breeze Gorget, Thunder Gorget, Aqua Gorget & Snow Gorget.
-- Aligned with the Breeze Belt, Thunder Belt, Aqua Belt & Snow Belt.
-- Element: Darkness
-- Modifiers: INT:30%
-- 100%TP 200%TP 300%TP
-- 1.75 1.75 1.75
-----------------------------------
require("scripts/globals/magic");
require("scripts/globals/status");
require("scripts/globals/settings");
require("scripts/globals/weaponskills");
-----------------------------------
function onUseWeaponSkill(player, target, wsID, tp, primary)
local params = {};
params.ftp100 = 1.75; params.ftp200 = 1.75; params.ftp300 = 1.75;
params.str_wsc = 0.0; params.dex_wsc = 0.0; params.vit_wsc = 0.0; params.agi_wsc = 0.0; params.int_wsc = 0.3;
params.mnd_wsc = 0.0; params.chr_wsc = 0.0;
params.ele = ELE_DARK;
params.skill = SKILL_STF;
params.includemab = true;
if (USE_ADOULIN_WEAPON_SKILL_CHANGES == true) then
params.int_wsc = 0.8;
end
local damage, criticalHit, tpHits, extraHits = doMagicWeaponskill(player, target, wsID, params, tp, primary);
if (damage > 0) then
local duration = (tp/1000 * 60);
if (target:hasStatusEffect(EFFECT_MAGIC_DEF_DOWN) == false) then
target:addStatusEffect(EFFECT_MAGIC_DEF_DOWN, 10, 0, duration);
end
end
if ((player:getEquipID(SLOT_MAIN) == 18994) and (player:getMainJob() == JOB_BLM)) then
if (damage > 0) then
local params = initAftermathParams()
params.power.lv2_inc = 1
params.subpower.lv1 = 2
params.subpower.lv2 = 3
params.subpower.lv3 = 1
applyAftermathEffect(player, tp, params)
end
end
return tpHits, extraHits, criticalHit, damage;
end
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/The_Eldieme_Necropolis/npcs/Treasure_Chest.lua | 13 | 3257 | -----------------------------------
-- Area: The Eldieme Necropolis
-- NPC: Treasure Chest
-- @zone 195
-----------------------------------
package.loaded["scripts/zones/The_Eldieme_Necropolis/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/treasure");
require("scripts/zones/The_Eldieme_Necropolis/TextIDs");
local TreasureType = "Chest";
local TreasureLvL = 53;
local TreasureMinLvL = 43;
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
-- trade:hasItemQty(1039,1); -- Treasure Key
-- trade:hasItemQty(1115,1); -- Skeleton Key
-- trade:hasItemQty(1023,1); -- Living Key
-- trade:hasItemQty(1022,1); -- Thief's Tools
local questItemNeeded = 0;
-- Player traded a key.
if ((trade:hasItemQty(1039,1) or trade:hasItemQty(1115,1) or trade:hasItemQty(1023,1) or trade:hasItemQty(1022,1)) and trade:getItemCount() == 1) then
local zone = player:getZoneID();
local pack = openChance(player,npc,trade,TreasureType,TreasureLvL,TreasureMinLvL,questItemNeeded);
local success = 0;
if (pack[2] ~= nil) then
player:messageSpecial(pack[2]);
success = pack[1];
else
success = pack[1];
end
if (success ~= -2) then
player:tradeComplete();
if (math.random() <= success) then
-- Succeded to open the coffer
player:messageSpecial(CHEST_UNLOCKED);
if (questItemNeeded == 1) then
player:addKeyItem(GUIDING_BELL);
player:messageSpecial(KEYITEM_OBTAINED,GUIDING_BELL); -- Guiding Bell (KI)
else
player:setVar("["..zone.."]".."Treasure_"..TreasureType,os.time() + math.random(CHEST_MIN_ILLUSION_TIME,CHEST_MAX_ILLUSION_TIME));
local loot = chestLoot(zone,npc);
-- print("loot array: "); -- debug
-- print("[1]", loot[1]); -- debug
-- print("[2]", loot[2]); -- debug
if (loot[1]=="gil") then
player:addGil(loot[2]);
player:messageSpecial(GIL_OBTAINED,loot[2]);
else
-- Item
player:addItem(loot[2]);
player:messageSpecial(ITEM_OBTAINED,loot[2]);
end
end
UpdateTreasureSpawnPoint(npc:getID());
end
end
end
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:messageSpecial(CHEST_LOCKED,1039);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Chateau_dOraguille/npcs/Rahal.lua | 13 | 6274 | -----------------------------------
-- Area: Chateau d'Oraguille
-- NPC: Rahal
-- Involved in Quests: The Holy Crest, Lure of the Wildcat (San d'Oria)
-- @pos -28 0.1 -6 233
-----------------------------------
package.loaded["scripts/zones/Chateau_dOraguille/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/keyitems");
require("scripts/globals/quests");
require("scripts/zones/Chateau_dOraguille/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
if (player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) == QUEST_ACCEPTED) then
if (trade:hasItemQty(532,1) and trade:getItemCount() == 1) then -- Trade Magicmart_flyer
player:messageSpecial(FLYER_REFUSED);
end
end
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
local CrestProgress = player:getVar("TheHolyCrest_Event");
local RemedyKI = player:hasKeyItem(DRAGON_CURSE_REMEDY);
local Stalker_Quest = player:getQuestStatus(SANDORIA,KNIGHT_STALKER);
local StalkerProgress = player:getVar("KnightStalker_Progress");
local WildcatSandy = player:getVar("WildcatSandy");
if (player:getQuestStatus(SANDORIA,LURE_OF_THE_WILDCAT_SAN_D_ORIA) == QUEST_ACCEPTED and player:getMaskBit(WildcatSandy,17) == false) then
player:startEvent(0x022f);
-- Need to speak with Rahal to get Dragon Curse Remedy
elseif (CrestProgress == 5 and RemedyKI == false) then
player:startEvent(0x003c); -- Gives key item
elseif (CrestProgress == 5 and RemedyKI == true) then
player:startEvent(122); -- Reminder to go to Gelsba
-- Completed AF2, AF3 available, and currently on DRG. No level check, since they cleared AF2.
elseif (player:getQuestStatus(SANDORIA,CHASING_QUOTAS) == QUEST_COMPLETED and Stalker_Quest == QUEST_AVAILABLE and player:getMainJob() == 14) then
if (player:getVar("KnightStalker_Declined") == 0) then
player:startEvent(121); -- Start AF3
else
player:startEvent(120); -- Short version if they previously declined
end
elseif Stalker_Quest == QUEST_ACCEPTED then
if (StalkerProgress == 0) then
player:startEvent(119); -- Reminder to go to Brugaire/Ceraulian
elseif (player:hasKeyItem(CHALLENGE_TO_THE_ROYAL_KNIGHTS) == true) then
if (StalkerProgress == 1) then
player:startEvent(78); -- Reaction to challenge, go talk to Balasiel
elseif (StalkerProgress == 2) then
player:startEvent(69); -- Reminder to talk to Balasiel
elseif (StalkerProgress == 3) then
player:startEvent(110); -- To the south with you
end
end
elseif (player:getVar("KnightStalker_Option2") == 1) then
player:startEvent(118); -- Optional CS after Knight Stalker
-- Mission 8-2 San dOria --
elseif (player:getCurrentMission(SANDORIA) == LIGHTBRINGER and player:getVar("MissionStatus") == 1) then
player:startEvent(0x006A)
elseif (player:getCurrentMission(SANDORIA) == LIGHTBRINGER and player:getVar("MissionStatus") == 2) then
player:startEvent(0x006b);
else
player:startEvent(0x0211); -- standard dialogue
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
if (csid == 0x003c) then
player:addKeyItem(DRAGON_CURSE_REMEDY);
player:messageSpecial(KEYITEM_OBTAINED, DRAGON_CURSE_REMEDY);
elseif (csid == 0x022f) then
player:setMaskBit(player:getVar("WildcatSandy"),"WildcatSandy",17,true);
elseif (csid == 121) then
if (option == 1) then
player:addQuest(SANDORIA,KNIGHT_STALKER);
else
player:setVar("KnightStalker_Declined",1);
end
elseif (csid == 120 and option == 1) then
player:addQuest(SANDORIA,KNIGHT_STALKER);
player:setVar("KnightStalker_Declined",0);
elseif (csid == 78) then
player:setVar("KnightStalker_Progress",2);
elseif (csid == 110) then
player:setVar("KnightStalker_Progress",4);
elseif (csid == 118) then
player:setVar("KnightStalker_Option2",0);
elseif (csid == 0x006A) then
if (player:hasKeyItem(CRYSTAL_DOWSER)) then
player:delKeyItem(CRYSTAL_DOWSER); -- To prevent them getting a message about already having the keyitem
else
player:setVar("MissionStatus",2);
player:addKeyItem(CRYSTAL_DOWSER);
player:messageSpecial(KEYITEM_OBTAINED,CRYSTAL_DOWSER);
end
end
end;
-- Already in-use cutscenes are not listed
-- 563 - ToAU, brought a letter from "Sage Raillefal."
-- 564 - Show Raillefal's letter to Halver? Goes to 563.
-- 9 - Destin gives an address, Mission CS, Rahal appears
-- 10 - Destin gives another speech, Mission CS, Claide reports on Rochefogne
-- 100 - Destin speech, mission, Lightbringer
-- 106 - Take this CRYSTAL_DOWSER and go to Temple of Uggalepih
-- 107 - Short version/reminder for 106
-- 105 - Unable to locate Lightbringer, but Curilla found it
-- 42 - Had my doubts about treasure, but Curilla found it. Why was it on that island?
-- 37 - Rochefogne slain?
-- 38 - Rites of Succession
-- 39 - Dedicates upcoming battle in Fei'Yin to fallen knights.
-- 40 - Thanks for help. Wrap up for what 39 is suggesting?
-- 41 - Lightbringer sealed away. Thanks for help.
-- 529 - I am Rahal S Lebrart of the Royal Knights. Possible fall back dialog if nothing active?
-- 544 - "I understand his lordship's fervor, but the risk is too great for us. I believe this requires utmost caution."
-- 77 - "Commendable work. With our mortal enemy vanquished, we must now restore glory to San d'Oria. Your cooperation is expected!"
-- 534 - Halver CS, re: Rank 5 fight in Fei'Yin
-- 559 - Lure of the Wildcat | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Cirdas_Caverns_U/Zone.lua | 19 | 1071 | -----------------------------------
--
-- Zone: Cirdas Caverns U
--
-----------------------------------
require("scripts/globals/settings");
package.loaded["scripts/zones/Cirdas_Caverns_U/TextIDs"] = nil;
require("scripts/zones/Cirdas_Caverns_U/TextIDs");
-----------------------------------
-- onInitialize
-----------------------------------
function onInitialize(zone)
end;
-----------------------------------
-- onZoneIn
-----------------------------------
function onZoneIn(player,prevZone)
cs = -1;
return cs;
end;
-----------------------------------
-- onRegionEnter
-----------------------------------
function onRegionEnter(player,region)
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/globals/spells/fire_carol.lua | 27 | 1532 | -----------------------------------------
-- Spell: Fire Carol
-- Increases fire resistance for party members within the area of effect.
-----------------------------------------
require("scripts/globals/status");
require("scripts/globals/magic");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function onMagicCastingCheck(caster,target,spell)
return 0;
end;
function onSpellCast(caster,target,spell)
local sLvl = caster:getSkillLevel(SKILL_SNG); -- Gets skill level of Singing
local iLvl = caster:getWeaponSkillLevel(SLOT_RANGED);
local power = 20;
if (sLvl+iLvl > 200) then
power = power + math.floor((sLvl+iLvl-200) / 10);
end
if (power >= 40) then
power = 40;
end
local iBoost = caster:getMod(MOD_CAROL_EFFECT) + caster:getMod(MOD_ALL_SONGS_EFFECT);
power = power + iBoost*5;
if (caster:hasStatusEffect(EFFECT_SOUL_VOICE)) then
power = power * 2;
elseif (caster:hasStatusEffect(EFFECT_MARCATO)) then
power = power * 1.5;
end
caster:delStatusEffect(EFFECT_MARCATO);
local duration = 120;
duration = duration * ((iBoost * 0.1) + (caster:getMod(MOD_SONG_DURATION_BONUS)/100) + 1);
if (caster:hasStatusEffect(EFFECT_TROUBADOUR)) then
duration = duration * 2;
end
if not (target:addBardSong(caster,EFFECT_CAROL,power,0,duration,caster:getID(), ELE_FIRE, 1)) then
spell:setMsg(75);
end
return EFFECT_CAROL;
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Western_Altepa_Desert/npcs/_3h7.lua | 13 | 1925 | -----------------------------------
-- Area: Western Altepa Desert
-- NPC: _3h7 (Emerald Column)
-- Notes: Mechanism for Altepa Gate
-- @pos -775 2 -460 125
-----------------------------------
package.loaded["scripts/zones/Western_Altepa_Desert/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Western_Altepa_Desert/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
local EmeraldID = npc:getID();
local Ruby = GetNPCByID(EmeraldID-2):getAnimation();
local Topaz = GetNPCByID(EmeraldID-1):getAnimation();
local Emerald = npc:getAnimation();
local Sapphire = GetNPCByID(EmeraldID+1):getAnimation();
if (Emerald ~= 8) then
npc:setAnimation(8);
GetNPCByID(EmeraldID-4):setAnimation(8);
else
player:messageSpecial(DOES_NOT_RESPOND);
end
if (Sapphire == 8 and Ruby == 8 and Topaz == 8) then
local rand = math.random(15,30);
local timeDoor = rand * 60;
-- Add timer for the door
GetNPCByID(EmeraldID-7):openDoor(timeDoor);
-- Add same timer for the 4 center lights
GetNPCByID(EmeraldID-6):openDoor(timeDoor);
GetNPCByID(EmeraldID-5):openDoor(timeDoor);
GetNPCByID(EmeraldID-4):openDoor(timeDoor);
GetNPCByID(EmeraldID-3):openDoor(timeDoor);
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Dynamis-Xarcabard/mobs/Animated_Great_Axe.lua | 7 | 1515 | -----------------------------------
-- Area: Dynamis Xarcabard
-- MOB: Animated Great Axe
-----------------------------------
require("scripts/globals/status");
require("scripts/zones/Dynamis-Xarcabard/TextIDs");
-----------------------------------
-- onMobEngaged
-----------------------------------
function onMobEngaged(mob,target)
if (mob:AnimationSub() == 3) then
SetDropRate(104,1576,1000);
else
SetDropRate(104,1576,0);
end
target:showText(mob,ANIMATED_GREATAXE_DIALOG);
SpawnMob(17330383,120):updateEnmity(target);
SpawnMob(17330384,120):updateEnmity(target);
SpawnMob(17330385,120):updateEnmity(target);
SpawnMob(17330395,120):updateEnmity(target);
SpawnMob(17330396,120):updateEnmity(target);
SpawnMob(17330397,120):updateEnmity(target);
end;
-----------------------------------
-- onMobFight Action
-----------------------------------
function onMobFight(mob,target)
-- TODO: add battle dialog
end;
-----------------------------------
-- onMobDisengage
-----------------------------------
function onMobDisengage(mob)
mob:showText(mob,ANIMATED_GREATAXE_DIALOG+2);
end;
-----------------------------------
-- onMobDeath
-----------------------------------
function onMobDeath(mob,killer,ally)
ally:showText(mob,ANIMATED_GREATAXE_DIALOG+1);
DespawnMob(17330383);
DespawnMob(17330384);
DespawnMob(17330385);
DespawnMob(17330395);
DespawnMob(17330396);
DespawnMob(17330397);
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Xarcabard/Zone.lua | 19 | 3027 | -----------------------------------
--
-- Zone: Xarcabard (112)
--
-----------------------------------
package.loaded[ "scripts/zones/Xarcabard/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Xarcabard/TextIDs");
require("scripts/globals/icanheararainbow");
require("scripts/globals/keyitems");
require("scripts/globals/zone");
require("scripts/globals/conquest");
-----------------------------------
-- onInitialize
-----------------------------------
function onInitialize(zone)
local manuals = {17236346,17236347};
SetFieldManual(manuals);
SetRegionalConquestOverseers(zone:getRegionID())
end;
-----------------------------------
-- onZoneIn
-----------------------------------
function onZoneIn( player, prevZone)
local cs = -1;
local UnbridledPassionCS = player:getVar("unbridledPassion");
if (prevZone == 135) then -- warp player to a correct position after dynamis
player:setPos(569.312,-0.098,-270.158,90);
end
if (player:getXPos() == 0 and player:getYPos() == 0 and player:getZPos() == 0) then
player:setPos( -136.287, -23.268, 137.302, 91);
end
if (player:hasKeyItem( VIAL_OF_SHROUDED_SAND) == false and player:getRank() >= 6 and player:getMainLvl() >= 65 and player:getVar( "Dynamis_Status") == 0) then
player:setVar( "Dynamis_Status", 1);
cs = 0x000D;
elseif (triggerLightCutscene(player)) then -- Quest: I Can Hear A Rainbow
cs = 0x0009;
elseif (UnbridledPassionCS == 3) then
cs = 0x0004;
elseif (player:getCurrentMission(WINDURST) == VAIN and player:getVar("MissionStatus") ==1) then
cs = 0x000b;
end
return cs;
end;
-----------------------------------
-- onConquestUpdate
-----------------------------------
function onConquestUpdate(zone, updatetype)
local players = zone:getPlayers();
for name, player in pairs(players) do
conquestUpdate(zone, player, updatetype, CONQUEST_BASE);
end
end;
-----------------------------------
-- onRegionEnter
-----------------------------------
function onRegionEnter( player, region)
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate( player, csid, option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
if (csid == 0x0009) then
lightCutsceneUpdate(player); -- Quest: I Can Hear A Rainbow
elseif (csid == 0x000b) then
if (player:getPreviousZone() == 111) then
player:updateEvent(0,0,0,0,0,2);
else
player:updateEvent(0,0,0,0,0,3);
end
end
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish( player, csid, option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
if (csid == 0x0009) then
lightCutsceneFinish(player); -- Quest: I Can Hear A Rainbow
elseif (csid == 0x0004) then
player:setVar("unbridledPassion",4);
end
end; | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Moh_Gates/Zone.lua | 16 | 1174 | -----------------------------------
--
-- Zone: Moh Gates
--
-----------------------------------
require("scripts/globals/settings");
package.loaded["scripts/zones/Moh_Gates/TextIDs"] = nil;
require("scripts/zones/Moh_Gates/TextIDs");
-----------------------------------
-- onInitialize
-----------------------------------
function onInitialize(zone)
end;
-----------------------------------
-- onZoneIn
-----------------------------------
function onZoneIn(player,prevZone)
cs = -1;
if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then
player:setPos(107,15,135,238);
end
return cs;
end;
-----------------------------------
-- onRegionEnter
-----------------------------------
function onRegionEnter(player,region)
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
| gpl-3.0 |
sjznxd/lc-20130204 | modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua | 82 | 2998 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
local uci = require "luci.model.uci".cursor()
local sys = require "luci.sys"
local wa = require "luci.tools.webadmin"
local fs = require "nixio.fs"
m = Map("dhcp", "DHCP")
s = m:section(TypedSection, "dhcp", "DHCP-Server")
s.anonymous = true
s.addremove = false
s.dynamic = false
s:depends("interface", "lan")
enable = s:option(ListValue, "ignore", translate("enable"), "")
enable:value(0, translate("enable"))
enable:value(1, translate("disable"))
start = s:option(Value, "start", translate("First leased address"))
start.rmempty = true
start:depends("ignore", "0")
limit = s:option(Value, "limit", translate("Number of leased addresses"), "")
limit:depends("ignore", "0")
function limit.cfgvalue(self, section)
local value = Value.cfgvalue(self, section)
if value then
return tonumber(value) + 1
end
end
function limit.write(self, section, value)
value = tonumber(value) - 1
return Value.write(self, section, value)
end
limit.rmempty = true
time = s:option(Value, "leasetime")
time:depends("ignore", "0")
time.rmempty = true
local leasefn, leasefp, leases
uci:foreach("dhcp", "dnsmasq",
function(section)
leasefn = section.leasefile
end
)
local leasefp = leasefn and fs.access(leasefn) and io.lines(leasefn)
if leasefp then
leases = {}
for lease in leasefp do
table.insert(leases, luci.util.split(lease, " "))
end
end
if leases then
v = m:section(Table, leases, translate("Active Leases"))
name = v:option(DummyValue, 4, translate("Hostname"))
function name.cfgvalue(self, ...)
local value = DummyValue.cfgvalue(self, ...)
return (value == "*") and "?" or value
end
ip = v:option(DummyValue, 3, translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address"))
mac = v:option(DummyValue, 2, translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
ltime = v:option(DummyValue, 1, translate("Leasetime remaining"))
function ltime.cfgvalue(self, ...)
local value = DummyValue.cfgvalue(self, ...)
return wa.date_format(os.difftime(tonumber(value), os.time()))
end
end
s2 = m:section(TypedSection, "host", translate("Static Leases"))
s2.addremove = true
s2.anonymous = true
s2.template = "cbi/tblsection"
name = s2:option(Value, "name", translate("Hostname"))
mac = s2:option(Value, "mac", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
ip = s2:option(Value, "ip", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address"))
sys.net.arptable(function(entry)
ip:value(entry["IP address"])
mac:value(
entry["HW address"],
entry["HW address"] .. " (" .. entry["IP address"] .. ")"
)
end)
return m
| apache-2.0 |
AdamGagorik/darkstar | scripts/zones/Windurst_Waters/npcs/Npopo.lua | 13 | 1468 | -----------------------------------
-- Area: Windurst Waters
-- NPC: Npopo
-- Type: Standard NPC
-- @pos -35.464 -5.999 239.120 238
-----------------------------------
package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/quests");
require("scripts/zones/Windurst_Waters/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
local WildcatWindurst = player:getVar("WildcatWindurst");
if (player:getQuestStatus(WINDURST,LURE_OF_THE_WILDCAT_WINDURST) == QUEST_ACCEPTED and player:getMaskBit(WildcatWindurst,10) == false) then
player:startEvent(0x03a8);
else
player:startEvent(0x010d);
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
if (csid == 0x03a8) then
player:setMaskBit(player:getVar("WildcatWindurst"),"WildcatWindurst",10,true);
end
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Quicksand_Caves/Zone.lua | 12 | 6617 | -----------------------------------
--
-- Zone: Quicksand_Caves (208)
--
-----------------------------------
package.loaded["scripts/zones/Quicksand_Caves/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/keyitems");
require("scripts/globals/zone");
require("scripts/zones/Quicksand_Caves/TextIDs");
base_id = 17629685;
-----------------------------------
-- onInitialize
-----------------------------------
function onInitialize(zone)
local tomes = {17629766,17629767,17629768,17629769,17629770,17629771};
SetGroundsTome(tomes);
-- Weight Door System (RegionID, X, Radius, Z)
zone:registerRegion(1, -15, 5, -60, 0,0,0); -- 0x010D01EF Door
zone:registerRegion(3, 15, 5,-180, 0,0,0); -- 0x010D01F1 Door
zone:registerRegion(5, -580, 5,-420, 0,0,0); -- 0x010D01F3 Door
zone:registerRegion(7, -700, 5,-420, 0,0,0); -- 0x010D01F5 Door
zone:registerRegion(9, -700, 5,-380, 0,0,0); -- 0x010D01F7 Door
zone:registerRegion(11, -780, 5,-460, 0,0,0); -- 0x010D01F9 Door
zone:registerRegion(13, -820, 5,-380, 0,0,0); -- 0x010D01FB Door
zone:registerRegion(15, -260, 5, 740, 0,0,0); -- 0x010D01FD Door
zone:registerRegion(17, -340, 5, 660, 0,0,0); -- 0x010D01FF Door
zone:registerRegion(19, -420, 5, 740, 0,0,0); -- 0x010D0201 Door
zone:registerRegion(21, -340, 5, 820, 0,0,0); -- 0x010D0203 Door
zone:registerRegion(23, -409, 5, 800, 0,0,0); -- 0x010D0205 Door
zone:registerRegion(25, -400, 5, 670, 0,0,0); -- 0x010D0207 Door
--[[ -- (Old)
zone:registerRegion(1,-18,-1, -62,-13,1, -57);
zone:registerRegion(3, 13,-1, -183, 18,1, -177);
zone:registerRegion(5,-583,-1,-422,-577,1,-418);
zone:registerRegion(7,-703,-1,-423,-697,1,-417);
zone:registerRegion(9,-703,-1,-383,-697,1,-377);
zone:registerRegion(11,-782,-1,-462,-777,1,-457);
zone:registerRegion(13,-823,-1,-383,-817,1,-377);
zone:registerRegion(15,-262,-1, 737,-257,1, 742);
zone:registerRegion(17,-343,-1, 657,-337,1, 662);
zone:registerRegion(19,-343,-1, 818,-337,1, 822);
zone:registerRegion(21,-411,-1, 797,-406,1, 803);
zone:registerRegion(23,-422,-1, 737,-417,1, 742);
zone:registerRegion(25,-403,-1, 669,-397,1, 674);
]]--
-- Hole in the Sand
zone:registerRegion(30,495,-9,-817,497,-7,-815); -- E-11 (Map 2)
zone:registerRegion(31,815,-9,-744,817,-7,-742); -- M-9 (Map 2)
zone:registerRegion(32,215,6,-17,217,8,-15); -- K-6 (Map 3)
zone:registerRegion(33,-297,6,415,-295,8,417); -- E-7 (Map 6)
zone:registerRegion(34,-137,6,-177,-135,8,-175); -- G-7 (Map 8)
SetServerVariable("BastokFight8_1" ,0);
SetServerVariable("Bastok8-1LastClear", os.time()-QM_RESET_TIME); -- Set a delay on ??? mission NM pop.
UpdateTreasureSpawnPoint(17629735);
end;
-----------------------------------
-- onConquestUpdate
-----------------------------------
function onConquestUpdate(zone, updatetype)
local players = zone:getPlayers();
for name, player in pairs(players) do
conquestUpdate(zone, player, updatetype, CONQUEST_BASE);
end
end;
-----------------------------------
-- onZoneIn
-----------------------------------
function onZoneIn(player,prevZone)
local cs = -1;
if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then
player:setPos(-980.193,14.913,-282.863,60);
end
return cs;
end;
-----------------------------------
-- onRegionEnter
-----------------------------------
function onRegionEnter(player,region)
local RegionID = region:GetRegionID();
if (RegionID >= 30) then
switch (RegionID): caseof
{
[30] = function (x)
player:setPos(496,-6,-816);
end,
[31] = function (x)
player:setPos(816,-6,-743);
end,
[32] = function (x)
player:setPos(216,9,-16);
end,
[33] = function (x)
player:setPos(-296,9,416);
end,
[34] = function (x)
player:setPos(-136,9,-176);
end,
}
else
local race = player:getRace();
printf("entering region %u",RegionID);
if (race == 8) then -- Galka
weight = 3;
elseif (race == 5 or race == 6) then -- Taru male or female
weight = 1;
else -- Hume/Elvaan/Mithra
weight = 2;
end
local varname = "[DOOR]Weight_Sensor_"..RegionID;
w = GetServerVariable(varname);
w = w + weight;
SetServerVariable(varname,w);
if (player:hasKeyItem(2051) or w >= 3) then
local door = GetNPCByID(base_id + RegionID - 1);
door:openDoor(15); -- open door with a 15 second time delay.
--platform = GetNPCByID(base_id + RegionID + 1);
--platform:setAnimation(8); -- this is supposed to light up the platform but it's not working. Tried other values too.
end
end
end;
-----------------------------------
-- OnRegionLeave
-----------------------------------
function onRegionLeave(player,region)
local RegionID = region:GetRegionID();
if (RegionID < 30) then
local race = player:getRace();
-- printf("exiting region %u",RegionID);
if (race == 8) then -- Galka
weight = 3;
elseif (race == 5 or race == 6) then -- Taru male or female
weight = 1;
else -- Hume/Elvaan/Mithra
weight = 2;
end;
local varname = "[DOOR]Weight_Sensor_"..RegionID;
w = GetServerVariable(varname);
lastWeight = w;
w = w - weight;
SetServerVariable(varname,w);
if (lastWeight >= 3 and w < 3) then
--platform = GetNPCByID(base_id + RegionID + 1);
--platform:setAnimation(9);
end
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/The_Shrouded_Maw/bcnms/waking_dreams.lua | 30 | 2828 | -----------------------------------
-- Area: The_Shrouded_Maw
-- Name: waking_dreams
-----------------------------------
package.loaded["scripts/zones/The_Shrouded_Maw/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/titles");
require("scripts/globals/keyitems");
require("scripts/globals/quests");
require("scripts/zones/The_Shrouded_Maw/TextIDs");
require("scripts/globals/missions");
-----------------------------------
-- After registering the BCNM via bcnmRegister(bcnmid)
function onBcnmRegister(player,instance)
local inst = player:getBattlefieldID();
if (inst == 1) then
local TileOffset = 16818258;
for i = TileOffset, TileOffset+7 do
local TileOffsetA = GetNPCByID(i):getAnimation();
if (TileOffsetA == 8) then
GetNPCByID(i):setAnimation(9);
end
end
elseif (inst == 2) then
local TileOffset = 16818266;
for i = TileOffset, TileOffset+7 do
local TileOffsetA = GetNPCByID(i):getAnimation();
if (TileOffsetA == 8) then
GetNPCByID(i):setAnimation(9);
end
end
elseif (inst == 3) then
local TileOffset = 16818274;
for i = TileOffset, TileOffset+7 do
local TileOffsetA = GetNPCByID(i):getAnimation();
if (TileOffsetA == 8) then
GetNPCByID(i):setAnimation(9);
end
end
end
end;
-- Physically entering the BCNM via bcnmEnter(bcnmid)
function onBcnmEnter(player,instance)
end;
-- Leaving the BCNM by every mean possible, given by the LeaveCode
-- 1=Select Exit on circle
-- 2=Winning the BC
-- 3=Disconnected or warped out
-- 4=Losing the BC
-- via bcnmLeave(1) or bcnmLeave(2). LeaveCodes 3 and 4 are called
-- from the core when a player disconnects or the time limit is up, etc
function onBcnmLeave(player,instance,leavecode)
-- print("leave code "..leavecode);
if (leavecode == 2) then -- play end CS. Need time and battle id for record keeping + storage
if (player:hasKeyItem(VIAL_OF_DREAM_INCENSE)==true) then
player:addKeyItem(WHISPER_OF_DREAMS);
player:delKeyItem(VIAL_OF_DREAM_INCENSE);
player:messageSpecial(KEYITEM_OBTAINED,WHISPER_OF_DREAMS);
end
player:addTitle(HEIR_TO_THE_REALM_OF_DREAMS);
player:startEvent(0x7d02);
elseif (leavecode == 4) then
player:startEvent(0x7d02);
end
end;
function onEventUpdate(player,csid,option)
-- print("bc update csid "..csid.." and option "..option);
end;
function onEventFinish(player,csid,option)
-- print("bc finish csid "..csid.." and option "..option);
end;
| gpl-3.0 |
Nathan22Miles/sile | languages/ro.lua | 4 | 5473 | SILE.hyphenator.languages["ro"] = {};
SILE.hyphenator.languages["ro"].patterns =
{
".a3ic",
".a4n3is",
".a2z",
".cre1",
".de2aj",
".de2z1",
".g4",
".i2a",
".i2e",
".i3ț",
".i4u3",
".i3v",
".î4m",
".n2",
".ni2",
".p4",
".pre3ș",
".s4",
".ș4",
".u4i",
".u5ni",
".z2",
"a1",
"2acă",
"achi5",
"a3e",
"afo3",
"a3i2a",
"a3i2e",
"a3il",
"ai3s2",
"a3iu",
"alie6",
"2alt",
"a2m",
"a2n",
"2an.",
"a5n2e",
"ani2e",
"ani3ș4",
"an4s",
"2anu",
"an2z",
"ao2g",
"ati4a",
"2atr",
"a5t4u",
"2ața",
"2ață",
"2au",
"a3ua",
"a3ud",
"a3ug",
"a3ul",
"a3un",
"a3ur",
"a3us",
"a3ute",
"a3u2ț",
"a3uz",
"2ă1",
"ă3i",
"ăi2e",
"ă2m2",
"ănu3",
"ărgi5",
"ă3ș",
"ă4ș3t",
"ă2ti.",
"ăti4e",
"ă3u",
"ă3v",
"ă2zi",
"1b",
"2b.",
"ba2ț",
"bănu5",
"2bc",
"2bd",
"bi2a.",
"bi2at",
"bi2e",
"3bii",
"b2l",
"3b4lim",
"b4lu",
"bo1",
"bo3ric",
"2bs",
"2bt",
"2bț",
"bți4ne.",
"bu3",
"1c",
"4c.",
"ca3ut",
"că2c",
"cătu5",
"2cc",
"ce2a",
"ce2ț",
"2chi.",
"2ci.",
"ci3ale",
"ci2o",
"cis2",
"ci3sp",
"ciza2",
"c4l",
"2cm",
"2c5n",
"copia2tă",
"co2ț",
"2cs",
"2ct",
"2cț",
"cu3im",
"3cul",
"cu2ț",
"2cv",
"1d",
"4d.",
"da4m",
"da2ț",
"2dc",
"de4sc",
"dez3in",
"di2an",
"dia2tă",
"2dj",
"2dm",
"2d1n",
"do4il",
"3du",
"e1ac",
"e1aj",
"e1al",
"e1aș",
"e1at",
"ea2ț",
"e1av",
"ebu5i",
"2ec",
"eci2a",
"ecla2re",
"edi4ulu",
"e3e",
"ee2a",
"1efa",
"e1h",
"e3i2a",
"e3i2e",
"e3ii",
"e3il",
"e3im",
"e3in",
"e3i2o",
"e3i3s2",
"e3it",
"e3i4u",
"e1î",
"2el",
"e2m",
"emon5",
"2en",
"e5ne",
"e1o1",
"e3on",
"e1r",
"2era",
"2eră",
"2erc",
"2e2s",
"es3co",
"es5ti",
"2eș",
"e3și",
"etan4ț",
"2eț",
"e3u",
"eu5ș",
"1evit",
"e2x",
"2ez",
"eză5",
"ezi3a",
"e2z1o",
"1f4",
"2f.",
"3fa",
"3făș",
"2fi.",
"fi3e",
"3fo",
"2ft",
"f5tu",
"1g2",
"2g.",
"gă3ț",
"2ghi.",
"2gi.",
"g4l",
"2g3m",
"2g3n",
"go5n",
"3gu3",
"2g3v",
"2h.",
"2hi.",
"hi2a",
"hi3c",
"hi4u",
"2h1n",
"2i1",
"4i.",
"3i2ac",
"ia3g4",
"i2ai",
"i2aș",
"ia2ț",
"i3că",
"i2ed",
"i3ia",
"i3ie",
"i3ii",
"i3il",
"i3in",
"i3ir",
"i3it",
"iitu2ră",
"i2î",
"4ila",
"i3le",
"i3lo",
"imateri6",
"i2n",
"i4n1ed",
"in2gă",
"inți4i",
"3inv",
"i3od",
"i3oni",
"io2ț",
"ipă5",
"i2s",
"is3f",
"4isp",
"iș3t",
"i5ti",
"iți2a",
"i3ți2o",
"i3ua",
"i3ul",
"i3um",
"i3und",
"i3unu",
"i3us",
"i3ut",
"iz3v",
"î2",
"î3d",
"î3e",
"î3lo",
"îna3",
"în5ș",
"î3ri",
"î3rî",
"îr5ș",
"îș3t",
"î3t",
"î4ti",
"î3ț",
"î4ți",
"î5ții",
"î3z",
"1j",
"2j.",
"2jd",
"2ji.",
"ji2ț",
"2jl",
"j4u",
"ju3t",
"1k",
"1l",
"4l.",
"larați2",
"lă2ti",
"lătu5",
"2lb",
"2lc",
"2ld",
"le2a",
"2lf",
"2lg",
"4li.",
"li3a",
"li3e",
"li3o",
"2lm",
"2l5n",
"2lp",
"2ls",
"2l3ș",
"2lt",
"2lț",
"3lu",
"2lv",
"1m",
"2m.",
"3ma",
"3mă",
"2mb",
"mblîn3",
"3me",
"me2z",
"2mf",
"3mi",
"4mi.",
"mi2ț",
"3mî",
"2m1n",
"3mo",
"mon4",
"2mp",
"2m3s2",
"2mt",
"2mț",
"3mu",
"mu2ț",
"2mv",
"4n.",
"3na",
"4n1ad",
"na3in",
"3nă",
"2nc",
"n2cis",
"n2ciz",
"2nd",
"3ne",
"ne1ab",
"ne1an",
"ne1ap",
"4nef",
"4n1eg",
"ne3s2",
"4nevi",
"4n1ex",
"2ng",
"ng3ăt",
"3ni",
"4ni.",
"ni3ez",
"3nî",
"n3j",
"n1n",
"3no",
"no4ș",
"n1r",
"2n3s2",
"ns3f",
"n4sî",
"ns3po",
"n3ș2",
"n4și",
"2nt",
"n5ti",
"n5t4u",
"2nț",
"5nu",
"nu3a",
"nu3ă",
"nu5m",
"nu3s2",
"2nz",
"o1ag",
"o2al",
"o2bi.",
"2oca",
"ocu5i",
"2od",
"odi2a",
"o3e",
"o3i2",
"oiecti2",
"oi3s2p",
"omedi2e.",
"om4n",
"2on",
"o1o",
"opi3e",
"opla2",
"oplagi2",
"o1ra",
"o1ră",
"or2c",
"o1re",
"o1ri",
"o2ric",
"o1rî",
"o1ro",
"or2te.",
"o1ru",
"os5ti",
"o3și",
"otați4",
"o5ti",
"ot3od",
"o3u",
"1p2",
"2p.",
"3pa",
"păr3ț",
"2p3c",
"pecți2",
"pe2ț",
"2pi.",
"pi2e",
"pi3e.",
"pi3ez",
"pi3o",
"pi2ț",
"pi2z",
"p4l",
"po4ș",
"po2ț",
"2p3s",
"2p3ș",
"2p3t",
"2p3ț",
"p4ți.",
"pu3b4",
"puri2e",
"pu4ș",
"4r.",
"2rb",
"2rc",
"2rd",
"r2e",
"re2bi",
"recizi2",
"re3s2cr",
"re4și",
"2rf",
"2rg",
"2r1h",
"4ri.",
"ri3a",
"ri4ali",
"ri3eț",
"ri3ez",
"ri5mi",
"2ri3un",
"ri3v",
"2rk",
"2rl",
"2rm",
"2r1n",
"rna2ț",
"rografi6",
"2rp",
"2r1r",
"2rs2",
"r3sp",
"r3st",
"2r3ș",
"2rt",
"rtua2le",
"2rț",
"ru3il",
"ru3sp",
"2rv",
"2rz",
"1s",
"4s.",
"5sa",
"5să",
"să4m",
"să4ș",
"2sc",
"4sc.",
"3s2co",
"3se",
"se2a",
"se4e.",
"ses2",
"se3sp",
"se4ș",
"4s2f",
"5sfî",
"3si",
"si3p",
"3sî",
"3s4l",
"4sm",
"s1n",
"3so",
"so3ric",
"2sp",
"2st",
"sto3",
"5su",
"su2ț",
"2ș",
"4ș.",
"3șa",
"șa2ț",
"3șă2",
"3șe",
"1și",
"4și.",
"5șii",
"5șil",
"3șin",
"3șî",
"4ș5n",
"șnu5",
"3șo",
"ș2p",
"ș2ti",
"4ști.",
"4ș3tr",
"3șu",
"1t2",
"4t.",
"ta3ut",
"2t3c",
"2t3d",
"te2a",
"te5ni",
"teri6ală",
"te3s2p",
"2t3f",
"4ti.",
"ti3a",
"ti3e",
"3tii.",
"3til",
"3tin",
"ti2ț",
"2tî.",
"t4l",
"2t3m",
"3tol",
"3tor",
"to2to",
"3tru.",
"3trul",
"3truo",
"4t3s2",
"2t3t",
"tu3a",
"tu3im",
"4t3un",
"tu4ș",
"4t3z",
"1ț",
"2ț.",
"3ța",
"3ță",
"țe2ț",
"2ți.",
"3ția",
"ți3a.",
"3ție",
"3ții",
"3țil",
"ți2ț",
"3țiu",
"țu3",
"țu5i",
"2u1",
"6u.",
"u2a.",
"u2ad",
"u3au",
"uă3",
"uăs2",
"u2bia",
"u2b3l",
"u2b1o",
"ub3s2",
"u3e",
"4ugu",
"u3i2a",
"u3i2e",
"u3in",
"u3ir",
"u3is",
"u3it",
"u3i2ț",
"u3iz",
"u2l",
"u3la",
"u3lă",
"u3le",
"u3lii",
"u3lî",
"u3lo",
"umi5r",
"ur2z",
"u2s",
"us2pr",
"u4st",
"u3ș",
"u4șt",
"u2to",
"3utor",
"u3ui",
"u3um",
"1v",
"2v.",
"ve5ni",
"ve2ț",
"ve2z",
"2vi.",
"vi2ț",
"2v1n",
"vorbito2",
"3vr",
"1x",
"2x.",
"3xa",
"3xă",
"3xe",
"xe2z",
"3xi",
"3xo",
"3xu",
"1z",
"2z.",
"za2ț",
"2zb",
"2z2g",
"2zi.",
"zi2an",
"zi2ar",
"3zii",
"3zil",
"z4m",
"2z1n",
"3z2ol",
"3zon",
"zu2ț",
"2z2v",
"z3vă",
};
| mit |
chfg007/skynet | service/cdummy.lua | 94 | 1797 | local skynet = require "skynet"
require "skynet.manager" -- import skynet.launch, ...
local globalname = {}
local queryname = {}
local harbor = {}
local harbor_service
skynet.register_protocol {
name = "harbor",
id = skynet.PTYPE_HARBOR,
pack = function(...) return ... end,
unpack = skynet.tostring,
}
skynet.register_protocol {
name = "text",
id = skynet.PTYPE_TEXT,
pack = function(...) return ... end,
unpack = skynet.tostring,
}
local function response_name(name)
local address = globalname[name]
if queryname[name] then
local tmp = queryname[name]
queryname[name] = nil
for _,resp in ipairs(tmp) do
resp(true, address)
end
end
end
function harbor.REGISTER(name, handle)
assert(globalname[name] == nil)
globalname[name] = handle
response_name(name)
skynet.redirect(harbor_service, handle, "harbor", 0, "N " .. name)
end
function harbor.QUERYNAME(name)
if name:byte() == 46 then -- "." , local name
skynet.ret(skynet.pack(skynet.localname(name)))
return
end
local result = globalname[name]
if result then
skynet.ret(skynet.pack(result))
return
end
local queue = queryname[name]
if queue == nil then
queue = { skynet.response() }
queryname[name] = queue
else
table.insert(queue, skynet.response())
end
end
function harbor.LINK(id)
skynet.ret()
end
function harbor.CONNECT(id)
skynet.error("Can't connect to other harbor in single node mode")
end
skynet.start(function()
local harbor_id = tonumber(skynet.getenv "harbor")
assert(harbor_id == 0)
skynet.dispatch("lua", function (session,source,command,...)
local f = assert(harbor[command])
f(...)
end)
skynet.dispatch("text", function(session,source,command)
-- ignore all the command
end)
harbor_service = assert(skynet.launch("harbor", harbor_id, skynet.self()))
end)
| mit |
mosy210/PERSION-BOT | plugins/isX.lua | 605 | 2031 | local https = require "ssl.https"
local ltn12 = require "ltn12"
local function request(imageUrl)
-- 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 api_key = mashape.api_key
if api_key:isempty() then
return nil, 'Configure your Mashape API Key'
end
local api = "https://sphirelabs-advanced-porn-nudity-and-adult-content-detection.p.mashape.com/v1/get/index.php?"
local parameters = "&url="..(URL.escape(imageUrl) or "")
local url = api..parameters
local respbody = {}
local headers = {
["X-Mashape-Key"] = api_key,
["Accept"] = "Accept: application/json"
}
print(url)
local body, code, headers, status = https.request{
url = url,
method = "GET",
headers = headers,
sink = ltn12.sink.table(respbody),
protocol = "tlsv1"
}
if code ~= 200 then return "", code end
local body = table.concat(respbody)
return body, code
end
local function parseData(data)
local jsonBody = json:decode(data)
local response = ""
print(data)
if jsonBody["Error Occured"] ~= nil then
response = response .. jsonBody["Error Occured"]
elseif jsonBody["Is Porn"] == nil or jsonBody["Reason"] == nil then
response = response .. "I don't know if that has adult content or not."
else
if jsonBody["Is Porn"] == "True" then
response = response .. "Beware!\n"
end
response = response .. jsonBody["Reason"]
end
return jsonBody["Is Porn"], response
end
local function run(msg, matches)
local data, code = request(matches[1])
if code ~= 200 then return "There was an error. "..code end
local isPorn, result = parseData(data)
return result
end
return {
description = "Does this photo contain adult content?",
usage = {
"!isx [url]",
"!isporn [url]"
},
patterns = {
"^!is[x|X] (.*)$",
"^!is[p|P]orn (.*)$"
},
run = run
} | gpl-2.0 |
AdamGagorik/darkstar | scripts/zones/Jugner_Forest_[S]/npcs/Roiloux_RK.lua | 13 | 1046 | -----------------------------------
-- Area: Jugner Forest (S)
-- NPC: Roiloux, R.K.
-- Type: Campaign Arbiter
-- @pos 70.493 -0.602 -9.185 82
-----------------------------------
package.loaded["scripts/zones/Jugner_Forest_[S]/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Jugner_Forest_[S]/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:startEvent(0x01c2);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Upper_Jeuno/npcs/Shiroro.lua | 13 | 1357 | -----------------------------------
-- Area: Upper Jeuno
-- NPC: Shiroro
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Upper_Jeuno/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Upper_Jeuno/TextIDs");
require("scripts/globals/quests");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
local WildcatJeuno = player:getVar("WildcatJeuno");
if (player:getQuestStatus(JEUNO,LURE_OF_THE_WILDCAT_JEUNO) == QUEST_ACCEPTED and player:getMaskBit(WildcatJeuno,6) == false) then
player:startEvent(10084);
else
player:startEvent(0x0055);
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
if (csid == 10084) then
player:setMaskBit(player:getVar("WildcatJeuno"),"WildcatJeuno",6,true);
end
end;
| gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/La_Theine_Plateau/npcs/Narvecaint.lua | 13 | 1768 | -----------------------------------
-- Area: La Theine Plateau
-- NPC: Narvecaint
-- Involved in Mission: The Rescue Drill
-- @pos -263 22 129 102
-----------------------------------
package.loaded["scripts/zones/La_Theine_Plateau/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/missions");
require("scripts/zones/La_Theine_Plateau/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if (player:getCurrentMission(SANDORIA) == THE_RESCUE_DRILL) then
local MissionStatus = player:getVar("MissionStatus");
if (MissionStatus == 6) then
player:startEvent(0x006b);
elseif (MissionStatus == 7) then
player:showText(npc, RESCUE_DRILL + 14);
elseif (MissionStatus == 8) then
player:showText(npc, RESCUE_DRILL + 21);
elseif (MissionStatus >= 9) then
player:showText(npc, RESCUE_DRILL + 26);
else
player:showText(npc, RESCUE_DRILL);
end
else
player:showText(npc, RESCUE_DRILL);
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish Action
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
if (csid == 0x006b) then
player:setVar("MissionStatus",7);
end
end; | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.