content stringlengths 5 1.05M |
|---|
local Players = game:GetService("Players")
local Promise = require(script.Parent.Promise)
local function PromiseClone(Parent)
return Promise.Defer(function(Resolve)
local NewModel = Instance.new("Model")
for _, Descendant in ipairs(Parent:GetDescendants()) do
if Descendant:IsA("BasePart") and not Descendant:IsA("Terrain") and Descendant.Archivable then
local Model = Descendant:FindFirstAncestorOfClass("Model")
if Model then
if Players:GetPlayerFromCharacter(Model) then
continue
end
end
local Clone = Descendant:Clone()
Clone.Anchored = true
Clone.Parent = NewModel
end
end
Resolve(NewModel)
end)
end
return PromiseClone |
#!/usr/bin/env lua5.1
--[[
/****************************************************************
* Copyright (c) Neptunium Pvt Ltd., 2014.
* Author: Neptunium Pvt Ltd..
*
* This unpublished material is proprietary to Neptunium Pvt Ltd..
* All rights reserved. The methods and techniques described herein
* are considered trade secrets and/or confidential. Reproduction or
* distribution, in whole or in part, is forbidden except by express
* written permission of Neptunium.
****************************************************************/
]]
require ('os')
require ('mongo')
require ('json')
require ('posix')
require ('lualdap')
require ('base64')
require ('akorp_utils')
require ('akorp_common')
require ('config')
package.cpath = "../obj/?.so"
require ('luamodule')
local stp = require ('stack_trace_plus');
debug.traceback = stp.stacktrace;
local db = assert(mongo.Connection.New())
assert(db:connect('localhost'))
--Create the akorp database in the mongodb
--Create the akorp db meta object
db:insert(akorp_meta_ns, { uid= 1020 , gid = 1000 });
--Create the group collection
local group = group_object.new();
group.gname = "akorp";
group.gid = 1000;
group.homedir = group_home_base_path .. gname;
db:insert(akorp_group_ns, group);
--Create the user collection
local user = user_object.new();
user.uname = "akorp";
user.uid = 1020;
user.gid = 1000;
db:insert(akorp_user_ns, user);
--Create the kons collection
db:insert(akorp_kons_ns, {});
--Create the docs collection
db:insert(akorp_doc_ns, {});
--create the notification collection.
db:insert(akorp_notif_ns, {});
--create the notification collection.
db:insert(akorp_im_ns, {});
|
-- class
function Location(x, y)
-- private members
local _x = x
local _y = y
-- public members
return {
type = "Location",
getX = function(self)
return _x
end,
getY = function(self)
return _y
end,
}
end
|
let a = 1
pprint a
|
--===== CHECK START ARGS =====--
local serverName = (...) or false
if serverName then
serverName = "ENDER_ITEM:"..tostring(serverName)
else
serverName = "ENDER_ITEM"
end
--===== LOAD API(S) =====--
if not messageHandlerServer then
if not os.loadAPI("messageHandlerServer") then
error("Could not load API: messageHandlerServer")
end
end
--===== OPEN REDNET =====--
for _, side in ipairs(redstone.getSides()) do
if peripheral.getType(side) == "modem" then
rednet.open(side)
end
end
if not rednet.isOpen() then
printError("could not open rednet")
return
end
--===== DEFINE CONSTANTS =====--
local ID_TO_TYPE = {
"QUERY",
"GET_CONTENTS",
"SET_CONTENTS",
"GET_AMOUNT",
"SET_AMOUNT",
"FILL",
"EMPTY",
"EMPTY_ALL",
}
local TYPE_TO_ID = {}
for id, requestType in ipairs(ID_TO_TYPE) do
TYPE_TO_ID[requestType] = id
end
--===== DEFINE VARIABLES =====--
local interfaceSide = "tileinterface_0"
local enderChestSide = "ender_chest_0"
local interfaceToChestDir = "EAST"
--===== DEFINE UTILITY FUNCTION =====--
local function checkColours(colours)
if type(colours) ~= "table" then
return false
end
for i = 1, 3 do
local colour = colours[i]
if type(colour) ~= "number" then
return false
elseif colour < 1 then
return false
elseif colour > 32768 then
return false
elseif bit.band(colour, colour - 1) ~= 0 then
return false
end
end
return true
end
local function checkItemID(itemID)
return type(itemID) == "string"
end
local function checkItemDmg(dmg)
return dmg == nil or (type(dmg) == "number" and dmg >= 0)
end
local function checkFingerprint(fingerprint)
if type(fingerprint) ~= "table" then
return false
end
return checkItemID(fingerprint.id) and checkItemDmg(fingerprint.dmg)
end
local function fingerprintsEqual(fingerprint_1, fingerprint_2)
return fingerprint_1.id == fingerprint_2.id and fingerprint_1.dmg == fingerprint_2.dmg
end
local function checkAmount(amount)
return type(amount) == "number" and amount >= 0
end
local function checkStackNum(stackNum, inventorySize)
return type(stackNum) == "number" and stackNum >= 1 and stackNum <= inventorySize and stackNum % 1 == 0
end
local function emptySlot(stackNum, amount)
return amount == peripheral.call(interfaceSide, "pullItem", interfaceToChestDir, stackNum, amount)
end
--===== DEFINE REQUEST HANDLER FUNCTIONS =====--
local requestHandlers
requestHandlers = {
[TYPE_TO_ID.QUERY] = function()
return true, serverName
end,
[TYPE_TO_ID.GET_CONTENTS] = function()
return true, peripheral.call(enderChestSide, "getAllStacks", false)
end,
[TYPE_TO_ID.SET_CONTENTS] = function(contents)
if type(contents) ~= "table" then
return false, "invalid contents"
end
local inventorySize = peripheral.call(enderChestSide, "getInventorySize")
local currentStacks = peripheral.call(enderChestSide, "getAllStacks")
local currentStack
for stackNum, stack in pairs(contents) do
if checkStackNum(stackNum, inventorySize) then
currentStack = currentStacks[stackNum]
if stack == false then
if currentStack then
emptySlot(stackNum, currentStack.basic().qty)
end
elseif checkFingerprint(stack) and checkAmount(stack.qty) then
local quantityRequired
if currentStack then -- there is something currently in the slot
currentStack = currentStack.basic()
if fingerprintsEqual(stack, currentStack) then -- is the same stack as being requested
quantityRequired = stack.qty - currentStack.qty
else -- is a different stack
if emptySlot(stackNum, currentStack.qty) then -- is different stack so empty slot
quantityRequired = stack.qty
else -- failed to empty the slot
quantityRequired = 0
end
end
else -- slot is currently empty
quantityRequired = stack.qty
end
-- move quantityRequired into stackNum
if quantityRequired > 0 then
local storedItems = peripheral.call(interfaceSide, "getItemDetail", stack)
if storedItems then
peripheral.call(interfaceSide, "exportItem", stack, interfaceToChestDir, quantityRequired, stackNum)
end
elseif quantityRequired < 0 then
emptySlot(stackNum, -quantityRequired)
end
end
end
end
return true, peripheral.call(enderChestSide, "getAllStacks", false)
end,
[TYPE_TO_ID.GET_AMOUNT] = function(fingerprint)
if not checkFingerprint(fingerprint) then
return false, "invalid fingerprint"
end
local amount = 0
local stacks = peripheral.call(enderChestSide, "getAllStacks", false)
for _, stack in pairs(stacks) do
if fingerprintsEqual(fingerprint, stack) then
amount = amount + stack.qty
end
end
return true, amount
end,
[TYPE_TO_ID.SET_AMOUNT] = function(fingerprint, amount)
if not checkFingerprint(fingerprint) then
return false, "invalid fingerprint"
elseif not checkAmount(amount) then
return false, "invalid amount"
end
local success, currentAmount = requestHandlers[TYPE_TO_ID.GET_AMOUNT](fingerprint)
local moved = 0
if currentAmount < amount then
success, moved = requestHandlers[TYPE_TO_ID.FILL](fingerprint, amount - currentAmount)
elseif currentAmount > amount then
success, moved = requestHandlers[TYPE_TO_ID.EMPTY](fingerprint, currentAmount - amount)
if success then
moved = -moved
end
end
return success, success and currentAmount + moved or moved
end,
[TYPE_TO_ID.FILL] = function(fingerprint, optional_amount)
if not checkFingerprint(fingerprint) then
return false, "invalid fingerprint"
elseif optional_amount ~= nil and not checkAmount(optional_amount) then
return false, "invalid amount"
end
local amount = optional_amount or math.huge
local moved, movedAmount = false, 0
repeat
local storedItems = peripheral.call(interfaceSide, "getItemDetail", fingerprint)
if storedItems then
moved = peripheral.call(interfaceSide, "exportItem", fingerprint, interfaceToChestDir, amount - movedAmount)
moved = moved.size
else
moved = 0
end
movedAmount = movedAmount + moved
until movedAmount >= amount or moved == 0
return true, movedAmount
end,
[TYPE_TO_ID.EMPTY] = function(fingerprint, optional_amount)
if not checkFingerprint(fingerprint) then
return false, "invalid fingerprint"
elseif optional_amount ~= nil and not checkAmount(optional_amount) then
return false, "invalid amount"
end
local amount = optional_amount or math.huge
local moved, movedAmount = false, 0
local stacks = peripheral.call(enderChestSide, "getAllStacks", false)
for stackNum, stack in pairs(stacks) do
if fingerprintsEqual(fingerprint, stack) then
moved = peripheral.call(interfaceSide, "pullItem", interfaceToChestDir, stackNum, amount - movedAmount)
movedAmount = movedAmount + moved
if movedAmount >= amount or moved == 0 then
break
end
end
end
return true, movedAmount
end,
[TYPE_TO_ID.EMPTY_ALL] = function()
for stackNum = 1, peripheral.call(enderChestSide, "getInventorySize") do
peripheral.call(interfaceSide, "pullItem", interfaceToChestDir, stackNum)
end
return true
end,
}
local function handleRequest(request)
if type(request) ~= "table" then
return false, "invalid request"
elseif not requestHandlers[ request[1] ] then
return false, "invalid request type"
elseif not checkColours(request[2]) and request[1] ~= TYPE_TO_ID.QUERY then
return false, "invalid colours"
end
if request[1] ~= TYPE_TO_ID.QUERY then
peripheral.call(enderChestSide, "setColours", unpack(request[2], 1, 3))
end
return requestHandlers[ request[1] ](unpack(request, 3))
end
for requestID, requestType in ipairs(ID_TO_TYPE) do
if not requestHandlers[requestID] then
printError("No request handler provided for request type: ", requestType)
end
end
--===== CREATE AND RUN MESSAGE HANDLER =====--
local messageHandler = messageHandlerServer.new(handleRequest, nil, "ENDER_ITEM")
messageHandler:Run()
|
-----------------------------------
-- Area: Aydeewa Subterrane
-- NPC: ??? (Spawn Nosferatu(ZNM T3))
-- !pos -199 8 -62 68
-----------------------------------
local ID = require("scripts/zones/Aydeewa_Subterrane/IDs")
require("scripts/globals/npc_util")
-----------------------------------
function onTrade(player, npc, trade)
if npcUtil.tradeHas(trade, 2584) and npcUtil.popFromQM(player, npc, ID.mob.NOSFERATU) then -- Pure Blood
player:confirmTrade()
end
end
function onTrigger(player, npc)
player:messageSpecial(ID.text.NOTHING_HAPPENS)
end
|
blue_fire = class({})
function blue_fire:GetDuration()
return -1
end
function blue_fire:GetEffectName()
return "particles/econ/courier/courier_hyeonmu_ambient/courier_hyeonmu_ambient_blue_plus.vpcf"
end
function blue_fire:GetEffectAttachType()
return PATTACH_ABSORIGIN_FOLLOW
end
function blue_fire:AllowIllusionDuplicate()
return true
end
function blue_fire:IsPassive()
return 1
end
function blue_fire:IsDebuff()
return false
end
function blue_fire:IsPurgable()
return false
end
function blue_fire:IsHidden()
return true
end
function blue_fire:GetAttributes()
return MODIFIER_ATTRIBUTE_PERMANENT + MODIFIER_ATTRIBUTE_IGNORE_INVULNERABLE
end
|
object_tangible_wearables_cybernetic_cybernetic_crafted_s02_hand_r = object_tangible_wearables_cybernetic_shared_cybernetic_crafted_s02_hand_r:new {
}
ObjectTemplates:addTemplate(object_tangible_wearables_cybernetic_cybernetic_crafted_s02_hand_r, "object/tangible/wearables/cybernetic/cybernetic_crafted_s02_hand_r.iff") |
// Generated by github.com/davyxu/tabtoy
// Version: 2.8.10
module table {
export var TurnBrand : table.ITurnBrandDefine[] = [
{ Id : 1, Name : "皇上", Head : "Image/Head/2_round.png", Type : 5, RewardId : 1, Value : 1, Dialogue : 0, Weight : 50 },
{ Id : 2, Name : "皇后", Head : "Image/Head/1_round.png", Type : 2, RewardId : 0, Value : 10, Dialogue : 14, Weight : 10 },
{ Id : 3, Name : "侍卫", Head : "Image/Head/5_round.png", Type : 1, RewardId : 0, Value : 500, Dialogue : 0, Weight : 30 },
{ Id : 4, Name : "贵妃", Head : "Image/Head/4_round.png", Type : 1, RewardId : 0, Value : 1000, Dialogue : 0, Weight : 20 },
{ Id : 5, Name : "太监", Head : "Image/Head/3_round.png", Type : 1, RewardId : 0, Value : 200, Dialogue : 0, Weight : 80 },
{ Id : 6, Name : "太医", Head : "Image/Head/6_round.png", Type : 1, RewardId : 0, Value : 300, Dialogue : 0, Weight : 60 }
]
// Id
export var TurnBrandById : game.Dictionary<table.ITurnBrandDefine> = {}
function readTurnBrandById(){
for(let rec of TurnBrand) {
TurnBrandById[rec.Id] = rec;
}
}
readTurnBrandById();
}
|
local function Color(hex, value)
return {
tonumber(string.sub(hex, 2, 3), 16)/256,
tonumber(string.sub(hex, 4, 5), 16)/256,
tonumber(string.sub(hex, 6, 7), 16)/256,
value or 1
}
end
return Color |
local image = require 'image'
local path = require 'path'
local function rgbto16( r, g, b )
r = r * 31 // 255
g = g * 63 // 255
b = b * 31 // 255
return ( r << 11 ) | ( g << 5 ) | b
end
return function( args )
if #args == 0 then
io.write[[
Creates a .h header file with the tile ready to be used in tile functions
rl_tile_blit_nobg, rl_tile_blit and rl_tile_unblit. The header file will have
a pixel array with the same name as the input image with extension, and two
macros with the tile's width and height will be defined.
Ex. "luai rltile.lua grass.png" will create a grass.h file containing the
grass_png pixel array and the grass_png_width and grass_png_height macros.
Usage: luai rltile.lua <image>
]]
return 0
end
local name = path.realpath( args[ 1 ] )
local png = image.load( name )
local width = png:getWidth()
local height = png:getHeight()
local pixels = {}
for y = 0, height - 1 do
for x = 0, width - 1 do
local c = rgbto16( image.split( png:getPixel( x, y ) ) )
pixels[ #pixels + 1 ] = c
end
end
local dir, name, ext = path.split( name )
local file, err = io.open( dir .. path.separator .. name .. '.h', 'w' )
if not file then error( err ) end
local array = string.gsub( name .. ext, '[%.\\/:]', '_' )
file:write( 'const uint16_t ', array, '[] = {\n' )
for i = 1, #pixels, 8 do
local line = {}
table.move( pixels, i, i + 7, 1, line )
file:write( ' ' )
for j = 1, #line do
file:write( string.format( '0x%04x, ', line[ j ] ) )
end
file:write( '\n' )
end
file:write( '};\n\n' )
file:write( '#define ', array, '_width ', tostring( width ), '\n' )
file:write( '#define ', array, '_height ', tostring( height ), '\n' )
file:close()
return 0
end
|
--[[
- SKYNET SIMPLE ( https://github.com/viticm/skynet-simple )
- $Id main.lua
- @link https://github.com/viticm/skynet-simple for the canonical source repository
- @copyright Copyright (c) 2020 viticm( viticm.ti@gmail.com )
- @license
- @user viticm( viticm.ti@gmail.com )
- @date 2020/08/19 17:08
- @uses The world server bootstarup script.
--]]
local skynet = require 'skynet'
local skynet_manager = require 'skynet.manager'
local cfg_loader = require 'cfg.loader'
local setting = require 'setting'
local service_common = require 'service_common'
local function init()
skynet.error('--- world server starting ---')
service_common.start()
local stype = skynet.getenv('svr_type')
cfg_loader.loadall(stype)
local db_mgr = skynet.uniqueservice('db_mgr')
skynet.name('db_mgr', db_mgr)
local manager = skynet.uniqueservice('world/manager')
skynet.name('.manager', manager)
local map_mgr = skynet.uniqueservice('map_mgr')
skynet.name('.map_mgr', map_mgr)
skynet.call(manager, 'lua', 'open', {
address = setting.get('ip') or '0.0.0.0',
port = setting.get('port'),
client_max = setting.get('client_max') or 3000,
no_delay = true,
recvspeed = 30,
})
skynet.call('.launcher', 'lua', 'FINISHBOOT')
skynet.error('-- world server startup complated ---')
skynet.exit()
end
return {
init = init,
}
|
local function ThunkMiddleware(store)
return function(nextDispatch)
return function(action)
if typeof(action) == "function" then
action(store.dispatch, store.getState)
return
end
nextDispatch(action)
end
end
end
return ThunkMiddleware |
-- tells which ships count as squad leaders
-- these ships should all have shipholds
flagShips =
{
"hgn_mothership",
"hgn_battlecruiser",
"hgn_carrier",
"hgn_shipyard",
"hgn_shipyard_elohim",
"hgn_shipyard_spg",
"vgr_mothership",
"vgr_mothership_makaan",
"vgr_battlecruiser",
"vgr_carrier",
"vgr_shipyard",
}
hyperMods =
{
"hgn_ms_module_hyperspace",
"hgn_c_module_hyperspace",
"vgr_ms_module_hyperspace",
"vgr_c_module_hyperspace",
}
objectData =
{
ships =
{
hgn_mothership =
{
prettyname = "Hiigaran Mothership",
subsystems =
{
"hgn_ms_production_fighter",
"hgn_ms_production_corvette",
"hgn_ms_production_corvettemover",
"hgn_ms_production_frigate",
"hgn_ms_production_capship",
"hgn_ms_module_platformcontrol",
"hgn_ms_module_research",
"hgn_ms_module_researchadvanced",
"hgn_ms_module_hyperspace",
"hgn_ms_module_hyperspaceinhibitor",
"hgn_ms_module_cloakgenerator",
"hgn_ms_module_firecontrol",
"hgn_ms_sensors_detecthyperspace",
"hgn_ms_sensors_advancedarray",
"hgn_ms_sensors_detectcloaked",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 40,
},
hgn_battlecruiser =
{
prettyname = "Hiigaran Battlecruiser",
subsystems =
{
"hgn_c_module_hyperspace",
"hgn_c_module_cloakgenerator",
"hgn_c_module_hyperspaceinhibitor",
"hgn_c_module_firecontrol",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 79,
},
hgn_carrier =
{
prettyname = "Hiigaran Carrier",
subsystems =
{
"hgn_c_production_fighter",
"hgn_c_production_corvette",
"hgn_c_production_frigate",
"hgn_c_module_platformcontrol",
"hgn_c_module_research",
"hgn_c_module_researchadvanced",
"hgn_c_module_hyperspace",
"hgn_c_module_hyperspaceinhibitor",
"hgn_c_module_cloakgenerator",
"hgn_c_module_firecontrol",
"hgn_c_sensors_detecthyperspace",
"hgn_c_sensors_advancedarray",
"hgn_c_sensors_detectcloaked",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 81,
},
hgn_shipyard =
{
prettyname = "Hiigaran Shipyard",
subsystems =
{
"hgn_ms_production_fighter",
"hgn_ms_production_corvette",
"hgn_ms_production_frigate",
"hgn_ms_production_frigateadvanced",
"hgn_sy_production_capship",
"hgn_ms_module_research",
"hgn_ms_module_hyperspace",
"hgn_ms_module_platformcontrol",
"hgn_ms_module_cloakgenerator",
"hgn_ms_module_hyperspaceinhibitor",
"hgn_ms_module_firecontrol",
"hgn_ms_module_researchadvanced",
"hgn_ms_sensors_detecthyperspace",
"hgn_ms_sensors_advancedarray",
"hgn_ms_sensors_detectcloaked",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 20,
},
hgn_shipyard_elohim =
{
prettyname = "Elohim (Hiigaran Shipyard)",
subsystems =
{
"hgn_ms_production_fighter",
"hgn_ms_production_corvette",
"hgn_ms_production_frigate",
"hgn_ms_production_frigateadvanced",
"hgn_sy_production_capship",
"hgn_ms_module_research",
"hgn_ms_module_hyperspace",
"hgn_ms_module_platformcontrol",
"hgn_ms_module_cloakgenerator",
"hgn_ms_module_hyperspaceinhibitor",
"hgn_ms_module_firecontrol",
"hgn_ms_module_researchadvanced",
"hgn_ms_sensors_detecthyperspace",
"hgn_ms_sensors_advancedarray",
"hgn_ms_sensors_detectcloaked",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 20,
},
hgn_shipyard_spg =
{
prettyname = "Hiigaran Shipyard",
subsystems =
{
"hgn_ms_production_fighter",
"hgn_ms_production_corvette",
"hgn_ms_production_frigate",
"hgn_ms_production_frigateadvanced",
"hgn_sy_production_capship",
"hgn_ms_module_research",
"hgn_ms_module_hyperspace",
"hgn_ms_module_platformcontrol",
"hgn_ms_module_cloakgenerator",
"hgn_ms_module_hyperspaceinhibitor",
"hgn_ms_module_firecontrol",
"hgn_ms_module_researchadvanced",
"hgn_ms_sensors_detecthyperspace",
"hgn_ms_sensors_advancedarray",
"hgn_ms_sensors_detectcloaked",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 20,
},
hgn_destroyer = {prettyname = "Hiigaran Destroyer", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 120,},
hgn_assaultfrigate = {prettyname = "Hiigaran Flak Frigate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 178,},
hgn_defensefieldfrigate = {prettyname = "Hiigaran Defense Field Frigate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 177,},
hgn_ioncannonfrigate = {prettyname = "Hiigaran Ion Frigate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 165,},
hgn_marinefrigate = {prettyname = "Hiigaran Marine Frigate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 230,},
hgn_marinefrigate_soban = {prettyname = "Hiigaran Marine Frigate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 230,},
hgn_torpedofrigate = {prettyname = "Hiigaran Torpedo Frigate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 176,},
hgn_assaultcorvette = {prettyname = "Hiigaran Gunship", subsystems = {}, squadronsize = 3, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
hgn_pulsarcorvette = {prettyname = "Hiigaran Pulsar Gunship", subsystems = {}, squadronsize = 3, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
hgn_minelayercorvette = {prettyname = "Hiigaran Minelayer", subsystems = {}, squadronsize = 1, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
hgn_scout = {prettyname = "Hiigaran Scout", subsystems = {}, squadronsize = 3, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
hgn_attackbomber = {prettyname = "Hiigaran Bomber", subsystems = {}, squadronsize = 5, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
hgn_interceptor = {prettyname = "Hiigaran Interceptor", subsystems = {}, squadronsize = 5, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
hgn_gunturret = {prettyname = "Hiigaran Gun Platform", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
hgn_ionturret = {prettyname = "Hiigaran Ion Beam Platform", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
hgn_resourcecollector = {prettyname = "Hiigaran Resource Collector", subsystems = {}, squadronsize = 1, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
hgn_resourcecontroller = {prettyname = "Hiigaran Mobile Refinery", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 225,},
hgn_proximitysensor = {prettyname = "Hiigaran Proximity Sensor", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
hgn_ecmprobe = {prettyname = "Hiigaran Sensors Distortion Probe", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
hgn_probe = {prettyname = "Hiigaran Probe", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
vgr_mothership =
{
prettyname = "Vaygr Mothership",
subsystems =
{
"vgr_ms_production_fighter",
"vgr_ms_production_corvette",
"vgr_ms_production_frigate",
"vgr_ms_module_platformcontrol",
"vgr_ms_production_capship",
"vgr_ms_module_research",
"vgr_ms_module_cloakgenerator",
"vgr_ms_module_hyperspaceinhibitor",
"vgr_ms_module_firecontrol",
"vgr_ms_module_hyperspace",
"vgr_ms_sensors_advancedarray",
"vgr_ms_sensors_detecthyperspace",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 40,
},
vgr_mothership_makaan =
{
prettyname = "Makaan (Vaygr Mothership)",
subsystems =
{
"vgr_ms_production_fighter",
"vgr_ms_production_corvette",
"vgr_ms_production_frigate",
"vgr_ms_module_platformcontrol",
"vgr_ms_production_capship",
"vgr_ms_module_research",
"vgr_ms_module_cloakgenerator",
"vgr_ms_module_hyperspaceinhibitor",
"vgr_ms_module_firecontrol",
"vgr_ms_module_hyperspace",
"vgr_ms_sensors_advancedarray",
"vgr_ms_sensors_detecthyperspace",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 40,
},
vgr_battlecruiser =
{
prettyname = "Vaygr Battlecruiser",
subsystems =
{
"vgr_c_module_hyperspace",
"vgr_c_module_cloakgenerator",
"vgr_c_module_hyperspaceinhibitor",
"vgr_c_module_firecontrol",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 79,
},
vgr_carrier =
{
prettyname = "Vaygr Carrier",
subsystems =
{
"vgr_c_production_fighter",
"vgr_c_production_corvette",
"vgr_c_production_frigate",
"vgr_c_module_platformcontrol",
"vgr_c_module_research",
"vgr_c_module_cloakgenerator",
"vgr_c_module_hyperspaceinhibitor",
"vgr_c_module_firecontrol",
"vgr_c_module_hyperspace",
"vgr_c_sensors_advancedarray",
"vgr_c_sensors_detecthyperspace",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 81,
},
vgr_shipyard =
{
prettyname = "Vaygr Shipyard",
subsystems =
{
"vgr_ms_production_fighter",
"vgr_ms_production_corvette",
"vgr_ms_production_frigate",
"vgr_sy_production_capship",
"vgr_ms_module_research",
"vgr_ms_module_cloakgenerator",
"vgr_ms_module_platformcontrol",
"vgr_ms_module_firecontrol",
"vgr_ms_module_hyperspaceinhibitor",
"vgr_ms_module_hyperspace",
"vgr_ms_sensors_advancedarray",
"vgr_ms_sensors_detecthyperspace",
"vgr_ms_sensors_detectcloaked",
},
squadronsize = 1,
candock = 0,
hasshiphold = 1,
canhyperspace = 1,
canbuildhypermodule = 1,
canmove = 1,
hyperspeed = 20,
},
vgr_destroyer = {prettyname = "Vaygr Destroyer", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 120,},
vgr_assaultfrigate = {prettyname = "Vaygr Assault Frigate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 176,},
vgr_heavymissilefrigate = {prettyname = "Vaygr Heavy Missile Frigate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 165,},
vgr_infiltratorfrigate = {prettyname = "Vaygr Infiltrator Frigate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 230,},
vgr_lasercorvette = {prettyname = "Vaygr Laser Corvette", subsystems = {}, squadronsize = 4, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
vgr_missilecorvette = {prettyname = "Vaygr Missile Corvette", subsystems = {}, squadronsize = 4, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
vgr_commandcorvette = {prettyname = "Vaygr Command Corvette", subsystems = {}, squadronsize = 1, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
vgr_minelayercorvette = {prettyname = "Vaygr Minelayer", subsystems = {}, squadronsize = 1, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
vgr_scout = {prettyname = "Vaygr Survey Scout", subsystems = {}, squadronsize = 3, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
vgr_bomber = {prettyname = "Vaygr Bomber", subsystems = {}, squadronsize = 6, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
vgr_interceptor = {prettyname = "Vaygr Assault Craft", subsystems = {}, squadronsize = 7, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
vgr_lancefighter = {prettyname = "Vaygr Lance Fighter", subsystems = {}, squadronsize = 5, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
vgr_weaponplatform_gun = {prettyname = "Vaygr Gun Platform", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
vgr_weaponplatform_missile = {prettyname = "Vaygr Heavy Missile Platform", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
vgr_hyperspace_platform = {prettyname = "Vaygr Hyperspace Gate", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
vgr_resourcecollector = {prettyname = "Vaygr Resource Collector", subsystems = {}, squadronsize = 1, candock = 1, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 0,},
vgr_resourcecontroller = {prettyname = "Vaygr Mobile Refinery", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 1, canbuildhypermodule = 0, canmove = 1, hyperspeed = 225,},
vgr_probe_prox = {prettyname = "Vaygr Proximity Sensor", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
vgr_probe_ecm = {prettyname = "Vaygr Sensors Distortion Probe", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
vgr_probe = {prettyname = "Vaygr Probe", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 0, hyperspeed = 0,},
kpr_sajuuk = {prettyname = "Keeper Sajuuk", subsystems = {}, squadronsize = 1, candock = 0, hasshiphold = 0, canhyperspace = 0, canbuildhypermodule = 0, canmove = 1, hyperspeed = 70,},
},
}
enemyReinforcements =
{
vaygr_small_carrier_group =
{
{
type = "vgr_carrier",
name = "",
subsystems =
{
},
position = {0,0,0},
rotation = {0,0,0},
playerindex = 1,
shiphold =
{
},
sobgroups = {},
},
{
type = "vgr_assaultfrigate",
name = "",
subsystems = {},
position = {0,0,0},
rotation = {0,0,0},
playerindex = 1,
shiphold = {},
sobgroups = {},
},
{
type = "vgr_assaultfrigate",
name = "",
subsystems = {},
position = {0,0,0},
rotation = {0,0,0},
playerindex = 1,
shiphold = {},
sobgroups = {},
},
{
type = "vgr_heavymissilefrigate",
name = "",
subsystems = {},
position = {0,0,0},
rotation = {0,0,0},
playerindex = 1,
shiphold = {},
sobgroups = {},
},
{
type = "vgr_heavymissilefrigate",
name = "",
subsystems = {},
position = {0,0,0},
rotation = {0,0,0},
playerindex = 1,
shiphold = {},
sobgroups = {},
},
},
}
|
--@return number numSites
--[Documentation](https://wow.gamepedia.com/API_ArchaeologyMapUpdateAll)
--function ArchaeologyMapUpdateAll() end
--@return string fonts
--[Documentation](https://wow.gamepedia.com/API_GetFonts)
--function GetFonts() end
--[Documentation](https://wow.gamepedia.com/API_GetItemCount)
--function GetItemCount(itemInfo, includeBank, includeUses, includeReagentBank) end
--@return string questDescription
--@return string questObjectives
--[Documentation](https://wow.gamepedia.com/API_GetQuestLogQuestText)
--function GetQuestLogQuestText() end
--@param unit string
--@param index number
--@return number powerType
--@return string powerToken
--@return number altR
--@return number altG
--@return number altB
--[Documentation](https://wow.gamepedia.com/API_UnitPowerType)
--function UnitPowerType(unit, index) end
|
project "Im3d"
kind "StaticLib"
language "C++"
cppdialect "C++17"
staticruntime "On"
targetdir ("Binaries/" .. outputdir .. "/%{prj.name}")
objdir ("Intermediate/" .. outputdir .. "/%{prj.name}")
files
{
"im3d.h",
"im3d_config.h",
"im3d_math.h",
"im3d.cpp"
}
optimize "on"
symbols "off"
filter "system:windows"
systemversion "latest"
filter { "system:windows", "configurations:Release" }
buildoptions "/MT"
filter "configurations:DebugAll"
runtime "Debug"
symbols "on"
filter "configurations:DebugEngine"
runtime "Debug"
symbols "on"
filter "configurations:DebugApplication"
runtime "Release"
optimize "on"
filter "configurations:Release"
runtime "Release"
optimize "on"
|
-- Settings lifted from agriffis
-- The utils and plugins have heavily been lifted from
-- https://github.com/alpha2phi/neovim-for-beginner,
-- with an assist from https://codevion.github.io/#!vim/treelsp.md
require "settings"
require "utils"
require("plugins").setup()
|
--[[ Element: Master Looter Icon
Toggles visibility of the master looter icon.
Widget
MasterLooter - Any UI widget.
Notes
The default master looter icon will be applied if the UI widget is a texture
and doesn't have a texture or color defined.
Examples
-- Position and size
local MasterLooter = self:CreateTexture(nil, 'OVERLAY')
MasterLooter:SetSize(16, 16)
MasterLooter:SetPoint('TOPRIGHT', self)
-- Register it with oUF
self.MasterLooter = MasterLooter
Hooks
Override(self) - Used to completely override the internal update function.
Removing the table key entry will make the element fall-back
to its internal function again.
]]
local parent, ns = ...
local oUF = ns.oUF
local Update = function(self, event)
local unit = self.unit
local masterlooter = self.MasterLooter
if(not (UnitInParty(unit) or UnitInRaid(unit))) then
return masterlooter:Hide()
end
if(masterlooter.PreUpdate) then
masterlooter:PreUpdate()
end
local method, pid, rid = GetLootMethod()
if(method == 'master') then
local mlUnit
if(pid) then
if(pid == 0) then
mlUnit = 'player'
else
mlUnit = 'party'..pid
end
elseif(rid) then
mlUnit = 'raid'..rid
end
if(UnitIsUnit(unit, mlUnit)) then
masterlooter:Show()
elseif(masterlooter:IsShown()) then
masterlooter:Hide()
end
else
masterlooter:Hide()
end
if(masterlooter.PostUpdate) then
return masterlooter:PostUpdate(masterlooter:IsShown())
end
end
local Path = function(self, ...)
return (self.MasterLooter.Override or Update) (self, ...)
end
local ForceUpdate = function(element)
return Path(element.__owner, 'ForceUpdate')
end
local function Enable(self, unit)
local masterlooter = self.MasterLooter
if(masterlooter) then
masterlooter.__owner = self
masterlooter.ForceUpdate = ForceUpdate
self:RegisterEvent('PARTY_LOOT_METHOD_CHANGED', Path, true)
self:RegisterEvent('GROUP_ROSTER_UPDATE', Path, true)
if(masterlooter:IsObjectType('Texture') and not masterlooter:GetTexture()) then
masterlooter:SetTexture([[Interface\GroupFrame\UI-Group-MasterLooter]])
end
return true
end
end
local function Disable(self)
if(self.MasterLooter) then
self:UnregisterEvent('PARTY_LOOT_METHOD_CHANGED', Path)
self:UnregisterEvent('GROUP_ROSTER_UPDATE', Path)
end
end
oUF:AddElement('MasterLooter', Path, Enable, Disable)
|
-- eLua platform interface - PIO
data_en =
{
-- Title
title = "eLua platform interface - PIO",
-- Menu name
menu_name = "PIO",
-- OverviewA
overview = "This part of the platform interface deals with PIO (Programmable Input Output) operations, thus letting the user access the low level input/output facilities of the host MCU.",
-- Data structures, constants and types
structures =
{
{ text = [[enum
{
// Pin operations
PLATFORM_IO_PIN_SET, $// Set the pin to 1$
PLATFORM_IO_PIN_CLEAR, $// Clear the pin (set it to 0)$
PLATFORM_IO_PIN_GET, $// Get the value of the pin$
PLATFORM_IO_PIN_DIR_INPUT, $// Make the pin an input$
PLATFORM_IO_PIN_DIR_OUTPUT, $// Make the pin an output$
PLATFORM_IO_PIN_PULLUP, $// Activate the pullup on the pin$
PLATFORM_IO_PIN_PULLDOWN, $// Activate the pulldown on the pin$
PLATFORM_IO_PIN_NOPULL, $// Disable all pullups/pulldowns on the pin$
// Port operations
PLATFORM_IO_PORT_SET_VALUE, $// Set port value$
PLATFORM_IO_PORT_GET_VALUE, $// Get port value$
PLATFORM_IO_PORT_DIR_INPUT, $// Set port as input$
PLATFORM_IO_PORT_DIR_OUTPUT $// Set port as output$
}; ]],
name = "PIO operations",
desc = [[These are the operations that can be executed by the PIO subsystem on both ports and pins. They are given as arguments to the @#platform_pio_op@platform_pio_op@ function
shown below.]]
},
{ text = "typedef u32 pio_type;",
name = "PIO data type",
desc = [[This is the type used for the actual I/O operations. Currently defined as an unsigned 32-bit type, thus no port can have more than 32 pins. If this happens, it is possible to split
it in two or more parts and adding the new parts as "virtual ports" (logical ports that don't have a direct hardware equivalent). The "virtual port" technique is used in the AVR32 backend.]]
}
},
-- Functions
funcs =
{
{ sig = "int #platform_pio_has_port#( unsigned port );",
desc = [[Checks if the platform has the hardware port specified as argument. Implemented in %src/common.c%, it uses the $NUM_PIO$ macro that must be defined in the
platform's $cpu_xxx.h$ file (see @arch_overview.html#platforms@here@ for details). For example:</p>
~#define NUM_PIO 4 $// The platform has 4 hardware PIO ports$~<p> ]],
args = "$port$ - the port ID",
ret = "1 if the port exists, 0 otherwise",
},
{ sig = "int #platform_pio_has_pin#( unsigned port, unsigned pin );",
desc = [[Checks if the platform has the hardware port and pin specified as arguments. Implemented in %src/common.c%, it uses the $NUM_PIO$ macro to check the validity
of the port and the $PIO_PINS_PER_PORT$ or $PIO_PIN_ARRAY$ macros to check the validity of the pin. The macros must be defined in the platform's $platform_conf.h$ file
(see @arch_overview.html#platforms@here@ for details).</p>
<ul>
<li>use $PIO_PINS_PER_PORT$ when all the ports of the MCU have the same number of pins. For example:
~#define PIO_PINS_PER_PORT 8 $// Each port has 8 pins$~</li>
<li>use $PIO_PIN_ARRAY$ when different ports of the MCU have different number of pins. For example:
~#define PIO_PIN_ARRAY { 4, 4, 2, 6 } $// Port 0 has 4 pins, port 1 has 4 pins, port 2 has 2 pins, port 3 has 6 pins$~</li>
</ul><p>]],
args =
{
"$port$ - the port ID",
"$pin$ - the pin number"
},
ret = "1 if the pin exists, 0 otherwise",
},
{ sig = "int #platform_pio_get_num_pins#( unsigned port );",
desc = "Returns the number of pins for the specified port.",
args = "$port$ - the port number.",
ret = "The number of pins for the port."
},
{ sig = "const char* #platform_pio_get_prefix#( unsigned port );",
desc = [[Get the port prefix. Used to establish if the port notation uses numbers (P0, P1, P2...) or letters (PA, PB, PC...). Implemented in %src/common.c%, it uses the
$PIO_PREFIX$ macro that must be defined in the platform's $platform_conf.h$ file (see @arch_overview.html#platforms@here@ for details). The value of this macro can be either '0' (for
numeric notation) or 'A' (for letter notation). For example:</p>
~#define PIO_PREFIX 'A' $// Use PA, PB, PC ... for port notation$~<p>]],
args = "$port$ - the port ID",
ret = "the port prefix (either '0' or 'A')",
},
{ sig = "pio_type #platform_pio_op#( unsigned port, pio_type pinmask, int op );",
link = "platform_pio_op",
desc = "This is the function that does the actual I/O work. It is implemented in the platform's own porting layer (%platform.c%, see @arch_overview.html#ports@here@ for more details).",
args =
{
"$port$ - the port number",
[[$pinmask$ - has different meanings:
<ul>
<li>for $pin operations$ it is the mask of pins in the operation. Each pin on which the function action is executed is encoded with an 1 in the corresponding bit position
of the pinmask.</li>
<li>for $port operations$ it is only meaningful for $PLATFORM_IO_PORT_SET_VALUE$ and in this case it specifies the new value of the port.</li>
</ul>]],
"$op$ - specifies the I/O operations, as specified @#pio_operations@here@."
},
ret =
{
"an actual value for $PLATFORM_IO_PIN_GET$ (0 or 1) and $PLATFORM_IO_PORT_GET$ (the value of the port).",
[[an error flag for all the other operations: 1 if the operation succeeded, 0 otherwise. For example, a platform that doesn't have pulldowns on its ports will always return a 0
when called with the $PLATFORM_IO_PIN_PULLDOWN$ operation.]]
}
},
}
}
data_pt = data_en
|
---------------------------------------------
-- Nerve Gas
--
-- Description: Inflicts curse and powerful poison tpz.effect.
-- Type: Magical
-- Wipes Shadows
-- Range: 10' Radial
---------------------------------------------
require("scripts/globals/monstertpmoves")
require("scripts/globals/settings")
require("scripts/globals/status")
---------------------------------------------
function onMobSkillCheck(target,mob,skill)
if (mob:getFamily() == 316) then -- PW
local mobSkin = mob:getModelId()
if (mobSkin == 1796) then
return 0
else
return 1
end
elseif (mob:getFamily() == 313) then -- Tinnin can use at will
return 0
else
if (mob:AnimationSub() == 0) then
return 0
else
return 1
end
end
end
function onMobWeaponSkill(target, mob, skill)
skill:setMsg(MobStatusEffectMove(mob, target, tpz.effect.CURSE_I, 50, 0, 420))
MobStatusEffectMove(mob, target, tpz.effect.POISON, 20, 3, 60)
return tpz.effect.CURSE_I
end
|
local GameMode = require 'tetris.modes.gamemode'
local MarathonA2Game = require 'tetris.modes.marathon_a2'
local BigA2Game = MarathonA2Game:extend()
BigA2Game.name = "Big A2"
BigA2Game.hash = "BigA2"
BigA2Game.tagline = "Big blocks in the most celebrated TGM mode!"
function BigA2Game:new()
BigA2Game.super:new()
self.big_mode = true
end
function BigA2Game:updateScore(level, drop_bonus, cleared_lines)
cleared_lines = cleared_lines / 2
if not self.clear then
self:updateGrade(cleared_lines)
if cleared_lines >= 4 then
self.tetris_count = self.tetris_count + 1
end
if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end
if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + (
(math.ceil((level + cleared_lines) / 4) + drop_bonus) *
cleared_lines * self.combo * self.bravo
)
else
self.combo = 1
end
self.drop_bonus = 0
else self.lines = self.lines + cleared_lines end
end
function BigA2Game:onLineClear(cleared_row_count)
cleared_row_count = cleared_row_count / 2
self:updateSectionTimes(self.level, self.level + cleared_row_count)
self.level = math.min(self.level + cleared_row_count, 999)
if self.level == 999 and not self.clear then
self.clear = true
self.grid:clear()
if self:qualifiesForMRoll() then self.grade = 32 end
self.roll_frames = -150
end
self.lock_drop = self.level >= 900
self.lock_hard_drop = self.level >= 900
end
return BigA2Game |
--[[
AvorionControl - data/scripts/lib/avocontrol-discord.lua
--------------------------------------------------------
Discord helper functions for Avorion
License: BSD-3-Clause
https://opensource.org/licenses/BSD-3-Clause
]]
include("avocontrol-utils")
do
local data = FetchConfigData("Discord", {
discordUrl = "string",
discordBot = "string"})
-- Discord.Url() returns the configured Discord URL
local function __discordUrl()
return data.discordUrl
end
-- Discord.Bot() returns the current name of the bot managing this config file
local function __discordBot()
return data.discordBot
end
-- Discord.IsLinked() checks the player index for a linked Discord account and
-- returns string if its valid.
function __discordIsLinked(index)
local l = Player(index):getValue("discorduserid")
return (tonumber(l) and l or "")
end
function __discordSay(color, user, message)
local server = Server()
if color == "default" then
color = '77c'
end
server:broadcastChatMessage("Discord", ChatMessageType.Normal,
"\\c("..color..")@"..user.."\\c(ddd): "..message)
end
return {
Url = __discordUrl,
Bot = __discordBot,
Say = __discordSay,
IsLinked = __discordIsLinked}
end
|
require "strangepan.util.class"
require "strangepan.util.type"
require "entities.Player"
require "entities.Direction"
PlayerController = buildClass()
local Class = PlayerController
function PlayerController:_init(player)
self:setPlayer(player)
end
function Class:setPlayer(player)
if player then
assertClass(player, Player, "player")
end
self.player = player
end
function Class:getPlayer()
return self.player
end
function Class:moveUp()
return self:move(Direction.UP)
end
function Class:moveRight()
return self:move(Direction.RIGHT)
end
function Class:moveDown()
return self:move(Direction.DOWN)
end
function Class:moveLeft()
return self:move(Direction.LEFT)
end
function Class:move(direction)
direction = Direction.fromId(direction)
if direction == nil then return false end
if not self:getPlayer() then return false end
return self:getPlayer():move(direction)
end
function Class:emoteSpin()
if not self:getPlayer() then return false end
return self:getPlayer():spin()
end
|
return {'nota','notabedrag','notabedragen','notabel','notabele','notabelen','notaboek','notaboekje','notanummer','notanummers','notariaat','notarieel','notaris','notarisambt','notariskantoor','notarisklerk','notariskosten','notariswet','notariszoon','notatie','notationele','notawisseling','notebook','notelaar','notelaren','noten','notenapparaat','notenbalk','notenbar','notenbomen','notenboom','notendop','notendruk','notenhout','notenhouten','notenkraker','notenleer','notenlijst','notenmuskaat','notenolie','notenpapier','notenpasta','notenschelp','notenschrift','noteren','notering','notie','notificatie','notificeren','notitie','notitieblok','notitieboek','notitieboekje','notoir','notulant','notulen','notulenboek','notuleren','notulering','notulist','notuliste','noteringsovereenkomst','notatiebiljet','notatieformulier','notchback','notatiesysteem','not','noten','notenboom','notten','notermans','noteborn','nottelman','notenbomer','notas','notaatje','notaatjes','notariaten','notariskantoren','notarisklerken','notarissen','notaristarieven','notariele','notaties','notebooks','noteer','noteerde','noteerden','noteert','notelaars','notenbalken','notenpastas','notenschelpen','noteringen','noties','notificaties','notificeer','notificeerde','notificeerden','notificeert','notitieblokje','notitieblokjes','notitieblokken','notitieboekjes','notities','notoire','notuleer','notuleerde','notuleerden','notuleert','notulenboeken','notulisten','notaboeken','notaboekjes','notawisselingen','notenbars','notendoppen','notenkrakers','notitieboeken','notelaartje','notatiebiljetten','notchbacks','notulanten','notatieformulieren'} |
local viewerOn = false
function ToggleViewer()
viewerOn = not viewerOn
local DRAW_LINE = GetHashKey("DRAW_LINE")
local RANGE = 50.0
local crosshair_size = 0.15
if viewerOn then
Citizen.CreateThread(
function()
while viewerOn do
Citizen.Wait(0)
local playerPed = PlayerPedId()
local playerPedPosition = GetEntityCoords(playerPed)
local cameraRotation = GetGameplayCamRot()
local direction = RotationToDirection(cameraRotation)
local a = GetGameplayCamCoord()
local b = vec3(a.x + direction.x * RANGE, a.y + direction.y * RANGE, a.z + direction.z * RANGE)
local distab = #(a - b)
DrawText3D(b.x, b.y, b.z, "X", 255, 255, 255, 255, 7, 0)
local selectedImaps = {}
for imapHash, d in pairs(all_imaps_list) do
local imapPosition = vec3(d.x, d.y, d.z)
if #(playerPedPosition - imapPosition) <= RANGE then
local hex = "0x" .. DEC_HEX(imapHash)
if math.abs(#(a - imapPosition) + #(imapPosition - b) - distab) <= 0.025 then
table.insert(selectedImaps, imapHash)
else
if IsImapActive(imapHash) then
DrawText3D(d.x, d.y, d.z, "" .. hex, 165, 235, 124, 120, 10, 0)
else
DrawText3D(d.x, d.y, d.z, "" .. hex, 237, 124, 116, 120, 10, 0)
end
end
end
end
for _, imapHash in pairs(selectedImaps) do
local d = all_imaps_list[imapHash]
local imapPosition = vec3(d.x, d.y, d.z)
local hex = "0x" .. DEC_HEX(imapHash)
DrawText3D(d.x, d.y, d.z + ((_ - 1) * 0.7), "" .. hex, 0, 100, 255, 200, 10, 0)
end
if IsControlJustPressed(0, 0xDFF812F9) then
for _, imapHash in pairs(selectedImaps) do
if IsImapActive(imapHash) then
RemoveImap(imapHash)
else
RequestImap(imapHash)
end
end
end
end
end
)
end
end
-- -2547.854,406.829,150.491
function DEC_HEX(IN)
local B, K, OUT, I, D = 16, "0123456789ABCDEF", "", 0
while IN > 0 do
I = I + 1
IN, D = math.floor(IN / B), (IN % B) + 1
OUT = string.sub(K, D, D) .. OUT
end
return OUT
end
do
ToggleViewer()
end
function RotationToDirection(rotation)
local adjustedRotation = {
x = (math.pi / 180) * rotation.x,
y = (math.pi / 180) * rotation.y,
z = (math.pi / 180) * rotation.z
}
local direction = {
x = -math.sin(adjustedRotation.z) * math.abs(math.cos(adjustedRotation.x)),
y = math.cos(adjustedRotation.z) * math.abs(math.cos(adjustedRotation.x)),
z = math.sin(adjustedRotation.x)
}
return direction
end
function DrawText3D(x, y, z, text, r, g, b, a, scale_multiplier, font)
if text == "" then
text = "UNKNOWN"
end
local onScreen, _x, _y = GetScreenCoordFromWorldCoord(x, y, z)
local dist = #(GetGameplayCamCoord() - vector3(x, y, z))
if scale_multiplier == nil then
scale_multiplier = 2
end
local scale = (1 / dist) * scale_multiplier
local fov = (1 / GetGameplayCamFov()) * 100
local scale = scale * fov
if onScreen then
SetTextScale(0.0 * scale, 0.55 * scale)
SetTextColor(r, g, b, a)
if font ~= nil then
Citizen.InvokeNative(0xADA9255D, font)
end
SetTextDropshadow(0, 0, 0, 0, 255)
Citizen.InvokeNative(0xBE5261939FBECB8C, true)
Citizen.InvokeNative(0xd79334a4bb99bad1, Citizen.InvokeNative(0xFA925AC00EB830B9, 10, "LITERAL_STRING", text, Citizen.ResultAsLong()), _x, _y)
end
end
|
---------------------------------------------------------------------
-- SF Instance class.
-- Contains the compiled SF script and essential data. Essentially
-- the execution context.
---------------------------------------------------------------------
local dsethook, dgethook = debug.sethook, debug.gethook
if SERVER then
SF.cpuQuota = CreateConVar("sf_timebuffer", 0.005, FCVAR_ARCHIVE, "The max average the CPU time can reach.")
SF.cpuBufferN = CreateConVar("sf_timebuffersize", 100, FCVAR_ARCHIVE, "The window width of the CPU time quota moving average.")
SF.softLockProtection = CreateConVar("sf_timebuffersoftlock", 1, FCVAR_ARCHIVE, "Consumes more cpu, but protects from freezing the game. Only turn this off if you want to use a profiler on your scripts.")
SF.RamCap = CreateConVar("sf_ram_max", 1500000, "If ram exceeds this limit (in kB), starfalls will be terminated")
else
SF.cpuQuota = CreateConVar("sf_timebuffer_cl", 0.006, FCVAR_ARCHIVE, "The max average the CPU time can reach.")
SF.cpuOwnerQuota = CreateConVar("sf_timebuffer_cl_owner", 0.015, FCVAR_ARCHIVE, "The max average the CPU time can reach for your own chips.")
SF.cpuBufferN = CreateConVar("sf_timebuffersize_cl", 100, FCVAR_ARCHIVE, "The window width of the CPU time quota moving average.")
SF.softLockProtection = CreateConVar("sf_timebuffersoftlock_cl", 1, FCVAR_ARCHIVE, "Consumes more cpu, but protects from freezing the game. Only turn this off if you want to use a profiler on your scripts.")
SF.softLockProtectionOwner = CreateConVar("sf_timebuffersoftlock_cl_owner", 1, FCVAR_ARCHIVE, "If sf_timebuffersoftlock_cl is 0, this enabled will make it only your own chips will be affected.")
SF.RamCap = CreateConVar("sf_ram_max_cl", 1500000, "If ram exceeds this limit (in kB), starfalls will be terminated")
end
SF.Instance = {}
SF.Instance.__index = SF.Instance
--- A set of all instances that have been created. It has weak keys and values.
-- Instances are put here after initialization.
SF.allInstances = {}
SF.playerInstances = {}
--- Preprocesses and Compiles code and returns an Instance
-- @param code Either a string of code, or a {path=source} table
-- @param mainfile If code is a table, this specifies the first file to parse.
-- @param player The "owner" of the instance
-- @param data The table to set instance.data to. Default is a new table.
-- @param dontpreprocess Set to true to skip preprocessing
-- @return True if no errors, false if errors occured.
-- @return The compiled instance, or the error message.
function SF.Instance.Compile(code, mainfile, player, data, dontpreprocess)
if isstring(code) then
mainfile = mainfile or "generic"
code = { [mainfile] = code }
end
local quotaRun
if SERVER then
if SF.softLockProtection:GetBool() then
quotaRun = SF.Instance.runWithOps
else
quotaRun = SF.Instance.runWithoutOps
end
else
if SF.softLockProtection:GetBool() then
quotaRun = SF.Instance.runWithOps
elseif SF.softLockProtectionOwner:GetBool() and LocalPlayer() ~= player then
quotaRun = SF.Instance.runWithOps
else
quotaRun = SF.Instance.runWithoutOps
end
end
local instance = setmetatable({}, SF.Instance)
instance.player = player
instance.env = SF.BuildEnvironment()
instance.env._G = instance.env
instance.data = data or {}
instance.ppdata = {}
instance.ops = 0
instance.hooks = {}
instance.scripts = {}
instance.source = code
instance.initialized = false
instance.mainfile = mainfile
instance.requires = {}
instance.requirestack = {string.GetPathFromFilename(mainfile)}
instance.cpuQuota = (SERVER or LocalPlayer() ~= player) and SF.cpuQuota:GetFloat() or SF.cpuOwnerQuota:GetFloat()
instance.cpuQuotaRatio = 1 / SF.cpuBufferN:GetInt()
instance.run = quotaRun
instance.startram = collectgarbage("count")
if CLIENT and instance.cpuQuota <= 0 then
return false, { message = "Cannot execute with 0 sf_timebuffer", traceback = "" }
end
for filename, source in pairs(code) do
if not dontpreprocess then
SF.Preprocessor.ParseDirectives(filename, source, instance.ppdata)
end
local serverorclient
if instance.ppdata.serverorclient then
serverorclient = instance.ppdata.serverorclient[filename]
end
if string.match(source, "^[%s\n]*$") or (serverorclient == "server" and CLIENT) or (serverorclient == "client" and SERVER) then
-- Lua doesn't have empty statements, so an empty file gives a syntax error
instance.scripts[filename] = function() end
else
local func = SF.CompileString(source, "SF:"..filename, false)
if isstring(func) then
return false, { message = func, traceback = "" }
end
debug.setfenv(func, instance.env)
instance.scripts[filename] = func
end
end
return true, instance
end
--- Overridable hook for pcall-based hook systems
-- Gets called when inside a starfall context
-- @param running Are we executing a starfall context?
function SF.OnRunningOps(running)
-- override me
end
SF.runningOps = false
local function safeThrow(self, msg, nocatch, force)
local source = debug.getinfo(3, "S").short_src
if string.find(source, "SF:", 1, true) or string.find(source, "starfall", 1, true) or force then
if SERVER and nocatch then
local consolemsg = "[Starfall] CPU Quota exceeded"
if self.player:IsValid() then
consolemsg = consolemsg .. " by " .. self.player:Nick() .. " (" .. self.player:SteamID() .. ")"
end
SF.Print(nil, consolemsg .. "\n")
MsgC(Color(255,0,0), consolemsg .. "\n")
end
SF.Throw(msg, 3, nocatch)
end
end
local function xpcall_callback (err)
if debug.getmetatable(err)~=SF.Errormeta then
return SF.MakeError(err, 1)
end
return err
end
--- Internal function - do not call.
-- Runs a function while incrementing the instance ops coutner.
-- This does no setup work and shouldn't be called by client code
-- @param func The function to run
-- @param ... Arguments to func
-- @return True if ok
-- @return A table of values that the hook returned
function SF.Instance:runWithOps(func, ...)
local oldSysTime = SysTime() - self.cpu_total
local function cpuCheck()
self.cpu_total = SysTime() - oldSysTime
local usedRatio = self:movingCPUAverage() / self.cpuQuota
if usedRatio>1 then
if usedRatio>1.5 then
safeThrow(self, "CPU Quota exceeded.", true, true)
else
safeThrow(self, "CPU Quota exceeded.", true)
end
elseif usedRatio > self.cpu_softquota then
safeThrow(self, "CPU Quota warning.")
end
end
local prevHook, mask, count = dgethook()
local prev = SF.runningOps
SF.runningOps = true
SF.OnRunningOps(true)
dsethook(cpuCheck, "", 2000)
local tbl = { xpcall(func, xpcall_callback, ...) }
dsethook(prevHook, mask, count)
SF.runningOps = prev
SF.OnRunningOps(prev)
if tbl[1] then
--Do another cpu check in case the debug hook wasn't called
self.cpu_total = SysTime() - oldSysTime
local usedRatio = self:movingCPUAverage() / self.cpuQuota
if usedRatio>1 then
return {false, SF.MakeError("CPU Quota exceeded.", 1, true, true)}
elseif usedRatio > self.cpu_softquota then
return {false, SF.MakeError("CPU Quota warning.", 1, false, true)}
end
end
return tbl
end
--- Internal function - do not call.
-- Runs a function without incrementing the instance ops coutner.
-- This does no setup work and shouldn't be called by client code
-- @param func The function to run
-- @param ... Arguments to func
-- @return True if ok
-- @return A table of values that the hook returned
function SF.Instance:runWithoutOps(func, ...)
return { xpcall(func, xpcall_callback, ...) }
end
--- Internal function - Do not call. Prepares the script to be executed.
-- This is done automatically by Initialize and runScriptHook.
function SF.Instance:prepare(hook)
assert(self.initialized, "Instance not initialized!")
--Functions calling this one will silently halt.
if self.error then return true end
if SF.instance ~= nil then
if self.instanceStack then
self.instanceStack[#self.instanceStack + 1] = SF.instance
else
self.instanceStack = {SF.instance}
end
end
SF.instance = self
self:runLibraryHook("prepare", hook)
end
--- Internal function - Do not call. Cleans up the script.
-- This is done automatically by Initialize and runScriptHook.
function SF.Instance:cleanup(hook, ok, err)
assert(SF.instance == self)
self:runLibraryHook("cleanup", hook, ok, err)
if self.instanceStack then
SF.instance = self.instanceStack[#self.instanceStack]
if #self.instanceStack == 1 then self.instanceStack = nil
else self.instanceStack[#self.instanceStack] = nil
end
else
SF.instance = nil
end
end
--- Runs the scripts inside of the instance. This should be called once after
-- compiling/unpacking so that scripts can register hooks and such. It should
-- not be called more than once.
-- @return True if no script errors occured
-- @return The error message, if applicable
-- @return The error traceback, if applicable
function SF.Instance:initialize()
assert(not self.initialized, "Already initialized!")
self.initialized = true
self.cpu_total = 0
self.cpu_average = 0
self.cpu_softquota = 1
SF.allInstances[self] = true
if SF.playerInstances[self.player] then
SF.playerInstances[self.player][self] = true
else
SF.playerInstances[self.player] = {[self] = true}
end
self:runLibraryHook("initialize")
self:prepare("_initialize")
local func = self.scripts[self.mainfile]
local tbl = self:run(func)
if not tbl[1] then
self:cleanup("_initialize", true, tbl[2])
self:Error(tbl[2])
return false, tbl[2]
end
self:cleanup("_initialize", false)
return true
end
--- Runs a script hook. This calls script code.
-- @param hook The hook to call.
-- @param ... Arguments to pass to the hook's registered function.
-- @return True if it executed ok, false if not or if there was no hook
-- @return If the first return value is false then the error message or nil if no hook was registered
function SF.Instance:runScriptHook(hook, ...)
if not self.hooks[hook] then return {} end
if self:prepare(hook) then return {} end
local tbl
for name, func in pairs(self.hooks[hook]) do
tbl = self:run(func, ...)
if not tbl[1] then
tbl[2].message = "Hook '" .. hook .. "' errored with: " .. tbl[2].message
self:cleanup(hook, true, tbl[2])
self:Error(tbl[2])
return tbl
end
end
self:cleanup(hook, false)
return tbl
end
--- Runs a script hook until one of them returns a true value. Returns those values.
-- @param hook The hook to call.
-- @param ... Arguments to pass to the hook's registered function.
-- @return True if it executed ok, false if not or if there was no hook
-- @return If the first return value is false then the error message or nil if no hook was registered. Else any values that the hook returned.
-- @return The traceback if the instance errored
function SF.Instance:runScriptHookForResult(hook, ...)
if not self.hooks[hook] then return {} end
if self:prepare(hook) then return {} end
local tbl
for name, func in pairs(self.hooks[hook]) do
tbl = self:run(func, ...)
if tbl[1] then
if tbl[2]~=nil then
break
end
else
tbl[2].message = "Hook '" .. hook .. "' errored with: " .. tbl[2].message
self:cleanup(hook, true, tbl[2])
self:Error(tbl[2])
return tbl
end
end
self:cleanup(hook, false)
return tbl
end
--- Runs a library hook. Alias to SF.CallHook(hook, self, ...).
-- @param hook Hook to run.
-- @param ... Additional arguments.
function SF.Instance:runLibraryHook(hook, ...)
return SF.CallHook(hook, self, ...)
end
--- Runs an arbitrary function under the SF instance. This can be used
-- to run your own hooks when using the integrated hook system doesn't
-- make sense (ex timers).
-- @param func Function to run
-- @param ... Arguments to pass to func
function SF.Instance:runFunction(func, ...)
if self:prepare("_runFunction") then return {} end
local tbl = self:run(func, ...)
if tbl[1] then
self:cleanup("_runFunction", false)
else
tbl[2].message = "Callback errored with: " .. tbl[2].message
self:cleanup("_runFunction", true, tbl[2])
self:Error(tbl[2])
end
return tbl
end
--- Deinitializes the instance. After this, the instance should be discarded.
function SF.Instance:deinitialize()
self:runLibraryHook("deinitialize")
SF.allInstances[self] = nil
SF.playerInstances[self.player][self] = nil
if not next(SF.playerInstances[self.player]) then
SF.playerInstances[self.player] = nil
end
self.error = true
end
hook.Add("Think", "SF_Think", function()
local ram = collectgarbage("count")
if SF.Instance.Ram then
if ram > SF.RamCap:GetInt() then
for inst, _ in pairs(SF.allInstances) do
inst:Error(SF.MakeError("Global RAM usage limit exceeded!!", 1))
end
collectgarbage()
end
SF.Instance.Ram = ram
SF.Instance.RamAvg = SF.Instance.RamAvg*0.999 + ram*0.001
else
SF.Instance.Ram = ram
SF.Instance.RamAvg = ram
end
-- Check and attempt recovery from potential failures
if SF.runningOps then
SF.runningOps = false
SF.OnRunningOps(false)
ErrorNoHalt("[Starfall] ERROR: This should not happen, bad addons?\n")
end
for pl, insts in pairs(SF.playerInstances) do
local plquota = (SERVER or LocalPlayer() ~= pl) and SF.cpuQuota:GetFloat() or SF.cpuOwnerQuota:GetFloat()
local cputotal = 0
for instance, _ in pairs(insts) do
instance.cpu_average = instance:movingCPUAverage()
instance.cpu_total = 0
instance:runScriptHook("think")
cputotal = cputotal + instance.cpu_average
end
if cputotal>plquota then
local max, maxinst = 0, nil
for instance, _ in pairs(insts) do
if instance.cpu_average>=max then
max = instance.cpu_average
maxinst = instance
end
end
if maxinst then
maxinst:Error(SF.MakeError("SF: Player cpu time limit reached!", 1))
end
end
end
end)
if CLIENT then
--- Check if a HUD Component is connected to the SF instance
-- @return true if a HUD Component is connected
function SF.Instance:isHUDActive()
local foundlink
for hud, _ in pairs(SF.ActiveHuds) do
if hud.link == self.data.entity then
return true
end
end
return false
end
end
--- Errors the instance. Should only be called from the tips of the call tree (aka from places such as the hook library, timer library, the entity's think function, etc)
function SF.Instance:Error(err)
if self.error then return end
if self.runOnError then -- We have a custom error function, use that instead
self:runOnError(err)
else
-- Default behavior
self:deinitialize()
end
end
-- Don't self modify. The average should only the modified per tick.
function SF.Instance:movingCPUAverage()
return self.cpu_average + (self.cpu_total - self.cpu_average) * self.cpuQuotaRatio
end
|
---@meta
---@class resty.websocket.client : resty.websocket
local client = {
_VERSION = "0.09"
}
---Instantiates a WebSocket client object.
---
---In case of error, it returns nil and a string describing the error.
---
---An optional options table can be specified.
---
---@param opts? resty.websocket.new.opts
---@return resty.websocket.client? client
---@return string? error
function client:new(opts) end
---Connects to the remote WebSocket service port and performs the websocket
---handshake process on the client side.
---
---Before actually resolving the host name and connecting to the remote backend,
---this method will always look up the connection pool for matched idle
---connections created by previous calls of this method.
---
---@param url string
---@param opts? resty.websocket.client.connect.opts
---@return boolean ok
---@return string? error
function client:connect(uri, opts) end
--- Puts the current WebSocket connection immediately into the ngx_lua cosocket connection pool.
---
--- You can specify the max idle timeout (in ms) when the connection is in the pool and the maximal size of the pool every nginx worker process.
---
--- In case of success, returns 1. In case of errors, returns nil with a string describing the error.
---
--- Only call this method in the place you would have called the close method instead. Calling this method will immediately turn the current WebSocket object into the closed state. Any subsequent operations other than connect() on the current object will return the closed error.
----
---@param max_idle_timeout number
---@param pool_size integer
---@return boolean ok
---@return string? error
function client:set_keepalive(max_idle_timeout, pool_size) end
---Closes the current WebSocket connection.
---
---If no close frame is sent yet, then the close frame will be automatically sent.
---
---@return boolean ok
---@return string? error
function client:close() end
---@class resty.websocket.client.connect.opts : table
---
---@field protocols string|string[] subprotocol(s) used for the current WebSocket session
---@field origin string the value of the Origin request header
---@field pool string custom name for the connection pool being used. If omitted, then the connection pool name will be generated from the string template <host>:<port>.
---@field ssl_verify boolean whether to perform SSL certificate verification during the SSL handshake if the wss:// scheme is used.
---@field headers string[] custom headers to be sent in the handshake request. The table is expected to contain strings in the format {"a-header: a header value", "another-header: another header value"}.
return client |
project "miniz"
uuid "B5E0C06B-8121-426A-8FFB-4293ECAAE29C"
language "C"
location ( "../../build/" .. mpt_projectpathname .. "/ext" )
mpt_projectname = "miniz"
dofile "../../build/premake/premake-defaults-LIBorDLL.lua"
dofile "../../build/premake/premake-defaults.lua"
targetname "openmpt-miniz"
filter {}
filter { "action:vs*" }
characterset "Unicode"
filter {}
files {
"../../include/miniz/miniz.c",
"../../include/miniz/miniz.h",
}
filter { "action:vs*" }
buildoptions { "/wd4244" }
filter {}
filter { "kind:SharedLib" }
defines { "MINIZ_EXPORT=__declspec(dllexport)" }
filter {}
|
require('./util')
require('./request')
require('./response')
local Http = require('http')
local Stack = require('stack')
local Path = require('path')
local parse_url = require('url').parse
local parse_query = require('querystring').parse
Stack.errorHandler = function(req, res, err)
if err then
local reason = err
print('\n' .. reason .. '\n')
return res:fail(reason)
else
return res:send(404)
end
end
local use
use = function(plugin_name)
return require(Path.join(__dirname, plugin_name))
end
local run
run = function(layers, port, host)
local handler = Stack.stack(unpack(layers))
local server = Http.create_server(host or '127.0.0.1', port or 80, function(req, res)
res.req = req
if not req.uri then
req.uri = parse_url(req.url)
req.uri.query = parse_query(req.uri.query)
end
handler(req, res)
return
end)
return server
end
local standard
standard = function(port, host, options)
extend(options, { })
local layers = {
use('health')(),
use('static')('/public/', options.static),
use('session')(options.session),
use('body')(),
use('route')(options.routes),
use('auth')('/rpc/auth', options.session),
use('rest')('/rpc/'),
use('websocket')('/ws/')
}
return run(layers, port, host)
end
local Application = { }
local _ = [[--require('utils').inherits Application, require('emitter')
Application.prototype:setup = (options) ->
@options = options
Application.prototype:run = (port, host) ->
standard port, host, @options
--]]
return {
use = use,
run = run,
Application = Application
}
|
-- MUSHclient localization file
-- Written: Friday, 03 February 2017 at 13:07:42
-- Static messages
messages = {
-- /cygdrive/c/source/mushclient/ActivityView.cpp:122
["Activity List"] =
"",
-- /cygdrive/c/source/mushclient/DDV_validation.cpp:41
["This field may not be blank"] =
"",
-- /cygdrive/c/source/mushclient/Finding.cpp:173
["Finding..."] =
"",
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:449
["OLE initialization failed"] =
"",
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:608
["Unable to load main frame window"] =
"",
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:831
["I notice that this is the first time you have used MUSHclient on this PC."] =
"",
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:998
["This will end your MUSHclient session."] =
"",
-- /cygdrive/c/source/mushclient/Mapping.cpp:79
["Warning - mapping has not been turned on because you pressed 'Cancel'.\n\nDo you want mapping enabled now?"] =
"",
-- /cygdrive/c/source/mushclient/TextDocument.cpp:284
["Unable to read file"] =
"",
-- /cygdrive/c/source/mushclient/TextDocument.cpp:435
["Untitled"] =
"",
-- /cygdrive/c/source/mushclient/TextView.cpp:678
-- /cygdrive/c/source/mushclient/sendvw.cpp:339
-- /cygdrive/c/source/mushclient/sendvw.cpp:2265
["Spell check ..."] =
"",
-- /cygdrive/c/source/mushclient/TextView.cpp:917
["&Send To World\tShift+Ctrl+S"] =
"",
-- /cygdrive/c/source/mushclient/TextView.cpp:1137
["&Flip To World\tCtrl+Alt+Space"] =
"",
-- /cygdrive/c/source/mushclient/TextView.cpp:1339
["Unterminated element (\"<\" not followed by \">\")"] =
"",
-- /cygdrive/c/source/mushclient/TextView.cpp:1355
["Unterminated entity (\"&\" not followed by \";\")"] =
"",
-- /cygdrive/c/source/mushclient/TextView.cpp:1459
-- /cygdrive/c/source/mushclient/dialogs/ImmediateDlg.cpp:64
["Executing immediate script"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:809
["<unknown>"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:813
["Closed"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:814
["Look up world name"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:815
["Look up proxy name"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:816
["Connecting to world"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:817
["Connecting to proxy"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:818
["Awaiting proxy response (1)"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:819
["Awaiting proxy response (2)"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:820
["Awaiting proxy response (3)"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:821
["Open"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:822
["Disconnecting"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:1046
["Closing network connection ..."] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2534
["No match"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2535
["Null"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2536
["Bad option"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2537
["Bad magic"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2538
["Unknown Opcode"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2539
["No Memory"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2540
["No Substring"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2541
["Match Limit"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2542
["Callout"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2543
["Bad UTF8"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2544
["Bad UTF8 Offset"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2545
["Partial"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2546
["Bad Partial"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2547
["Internal"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2548
["Bad Count"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2549
["Dfa Uitem"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2550
["Dfa Ucond"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2551
["Dfa Umlimit"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2552
["Dfa Wssize"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2553
["Dfa Recurse"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2554
["Recursion Limit"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2555
["Null Ws Limit"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2556
["Bad Newline"] =
"",
-- /cygdrive/c/source/mushclient/Utilities.cpp:2557
["Unknown PCRE error"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/AsciiArtDlg.cpp:49
["You must specify some text to insert."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/AsciiArtDlg.cpp:59
["You must specify a font file."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/CreditsDlg.cpp:76
["Could not load text"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/DebugLuaDlg.cpp:98
["Edit command"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/EditDlg.cpp:48
["Line breaks not permitted here."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/FindDlg.cpp:47
-- /cygdrive/c/source/mushclient/dialogs/RecallSearchDlg.cpp:57
["You must specify something to search for."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/FunctionListDlg.cpp:253
["No function selected"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/GlobalChangeDlg.cpp:41
["This field cannot be empty."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/HighlightPhraseDlg.cpp:52
["The text to highlight cannot be empty."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/HighlightPhraseDlg.cpp:60
["Please choose a colour other than '(no change)'."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/HighlightPhraseDlg.cpp:71
["Please choose a different colour than the original one."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/ImportXMLdlg.cpp:237
["Not in XML format"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/ImportXMLdlg.cpp:242
["There was a problem parsing the XML. See the output window for more details"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/InsertUnicodeDlg.cpp:43
["Unicode character code cannot be blank."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/InsertUnicodeDlg.cpp:50
["Unicode character code too long."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/LuaGsubDlg.cpp:61
["When calling a function the replacement text must be the function name"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/LuaGsubDlg.cpp:149
["Edit 'find pattern'"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/LuaGsubDlg.cpp:164
["Edit 'replacement' text"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/MapDlg.cpp:269
["Edit mapping failure 'match' text"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/MultiLineTriggerDlg.cpp:49
["The trigger match text cannot be empty."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/MultiLineTriggerDlg.cpp:64
["Multi-line triggers must match at least 2 lines."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/RecallDlg.cpp:134
["Window contents have changed. Save changes?"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:159
[" No action."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:274
["** WARNING - length discrepancy **"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:277
["------ (end line information) ------"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/global_prefs/GlobalPrefs.cpp:146
["You have selected too many worlds to add. Please try again with fewer worlds."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/global_prefs/GlobalPrefs.cpp:1633
["You have selected too many plugins to add. Please try again with fewer Plugins."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/logdlg.cpp:52
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:1163
["You are not logging output from the MUD - is this intentional?"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/password.cpp:42
["Your password cannot be blank."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:71
["The plugin name must start with a letter and consist of letters, numbers or the underscore character."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:126
["Description may not contain the sequence \"]]>\""] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:986
["Script may not contain the sequence \"]]>\""] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:1125
["Comments may not contain the sequence \"--\""] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:430
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:539
["Plugin cannot be found, unexpectedly."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/EditVariable.cpp:52
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/TimerDlg.cpp:206
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:265
["The variable name must start with a letter and consist of letters, numbers or the underscore character."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/EditVariable.cpp:64
["This variable name is already in the list of variables."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/EditVariable.cpp:113
["Edit variable"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/TimerDlg.cpp:131
["The timer interval must be greater than zero."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/TimerDlg.cpp:138
["The timer offset must be less than the timer period."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/TimerDlg.cpp:180
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:240
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:288
["The label must start with a letter and consist of letters, numbers or the underscore character."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/TimerDlg.cpp:193
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:252
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:259
["When sending to a variable you must specify a variable name. "] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/TimerDlg.cpp:235
["The timer contents cannot be blank unless you specify a script subroutine."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/TimerDlg.cpp:248
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:308
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:303
["The script subroutine name must start with a letter and consist of letters, numbers or the underscore character."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:123
["The alias cannot be blank."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:295
["The alias contents cannot be blank unless you specify a script subroutine."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:466
["Edit alias 'match' text"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1646
["You have activated UTF-8 mode, but the above trigger(s) could not be automatically converted to UTF-8 safely due to the use of extended ASCII characters. Please perform the following actions to convert your trigger(s) to safe UTF-8:"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1649
["1. Locate the trigger(s) from the list above."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1650
["2. Copy the trigger \"Trigger match\" text to the clipboard."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1651
["3. Open an Immediate scripting window (Ctrl+I)."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1652
["4. Enter this script command: "] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1654
[" (Note: this requires Lua to be the selected scripting language)"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1655
["5. Replace XXX by pasting in the trigger match text from step 2."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1656
["6. Execute this script command (Click the \"Run\" button)."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1657
["7. The converted trigger match text (in UTF-8) will be echoed to the output window."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1658
["8. Copy that from there and paste back into your trigger \"Trigger match\" text."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1659
["9. Save the updated trigger."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1660
["10. Repeat the above steps for all triggers mentioned above."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:1727
["Only the Lua script language is available with the /wine option"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:858
["(ungrouped)"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:1496
["Tree Vie&w"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:1803
["There was a problem parsing the XML on the clipboard. See the output window for more details"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:132
["Your world name cannot be blank.\n\nYou must fill in your world name, TCP/IP address and port number before tabbing to other configuration screens"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:144
["The world IP address cannot be blank."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:151
["The world port number must be specified."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:168
-- /cygdrive/c/source/mushclient/doc.cpp:1016
["The proxy server address cannot be blank."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:175
-- /cygdrive/c/source/mushclient/doc.cpp:1022
["The proxy server port must be specified."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:182
["Unknown proxy server type."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:1054
["Reset all custom colours to MUSHclient defaults?"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:1084
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:1911
["Make all colours random?"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:1322
["By checking the option \"Override with default colours\" your existing colours will be PERMANENTLY discarded next time you open this world.\n\nAre you SURE you want to do this?"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:1493
["Reset all colours to the ANSI defaults?"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:1859
["Copy all 16 colours to the custom colours?"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:2076
["By checking the option \"Override with default macros\" your existing macros will be PERMANENTLY discarded next time you open this world.\n\nAre you SURE you want to do this?"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:3128
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:4292
["Cannot move up - already has a sequence of zero"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:3146
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:4310
["Cannot move up - already at top of list"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:3236
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:4399
["Cannot move down - already has a sequence of 10000"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:3255
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:4418
["Cannot move down - already at bottom of list"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:4752
["You must supply a speed-walk prefix."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:4760
["You must supply a command stack character."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:4767
["The command stack character is invalid."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:5167
["File exceeds 32000 bytes in length, cannot be loaded"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:5171
["File is empty"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:5183
-- /cygdrive/c/source/mushclient/doc.cpp:3716
["Unable to open or read the requested file"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:5189
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:5250
-- /cygdrive/c/source/mushclient/evaluate.cpp:692
-- /cygdrive/c/source/mushclient/evaluate.cpp:793
["Insufficient memory to do this operation"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:5244
["Unable to open or write the requested file"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:5340
["Regular expressions not supported here."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:7405
-- /cygdrive/c/source/mushclient/doc.cpp:7780
["Unable to edit the script file."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:7942
["No variables in this world."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:8093
["Your \"auto say\" string cannot be blank"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:8284
["Your character name cannot be blank for auto-connect."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:9041
["Calculating memory usage..."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:9043
["Memory used by output buffer"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:9052
["Calculating size of output buffer..."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:173
["The trigger match text cannot be blank."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:273
["The variable must start with a letter and consist of letters, numbers or the underscore character."] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:333
["Multi-line triggers must be a regular expression"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:339
["Multi-line triggers must match at least 2 lines"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:699
["Edit trigger 'match' text"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:773
["Variable:"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:775
["Pane:"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:777
["(n/a)"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:776
["Written by Nick Gammon."] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:788
["For information and assistance about MUSHclient visit our forum at:"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:790
["MUSHclient forum"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:793
["Can you trust your plugins? See: "] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:794
["How to trust plugins"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:989
["Cannot connect. World name not specified"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:1427
["Insufficient memory in buffer to decompress text"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:1495
["Insufficient memory to decompress MCCP text."] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:2549
["Ran out of memory. The world has been closed."] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:2719
["processing hotspot callback"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3288
-- /cygdrive/c/source/mushclient/doc.cpp:3358
["Unable to allocate memory for screen font"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3503
["An error occurred calculating amount to send to world"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3536
["Sending to world..."] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3538
["Sending..."] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3655
["An error occurred when sending/pasting to this world"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3739
-- /cygdrive/c/source/mushclient/doc.cpp:3826
["Cannot open the Clipboard"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3771
["Unable to get Clipboard data"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3783
-- /cygdrive/c/source/mushclient/doc.cpp:3895
["Unable to lock memory for Clipboard data"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3841
["Unable to allocate memory for Clipboard data"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3852
["Unable to lock memory for Clipboard text data"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3867
["Unable to set Clipboard text data"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3884
["Unable to allocate memory for Clipboard Unicode data"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:3912
["Unable to set Clipboard Unicode data"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4031
-- /cygdrive/c/source/mushclient/doc.cpp:4044
["For assistance with connection problems see: "] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4035
["How to resolve network connection problems"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4047
["This message can be suppressed, or displayed in the main window."] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4049
["See the File menu -> Global Preferences -> General to do this."] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4183
["Unexpected phase in HostNameResolved function"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4289
["Recalculating line positions"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4645
["Permission denied"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4646
["Address already in use"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4647
["Cannot assign requested address"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4648
["Address family not supported by protocol family"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4649
["Operation already in progress. "] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4650
["Software caused connection abort"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4651
["Connection refused"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4652
["Connection reset by peer"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4653
["Destination address required"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4654
["Bad address"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4655
["Host is down"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4656
["No route to host"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4657
["Operation now in progress"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4658
["Interrupted function call"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4659
["Invalid argument"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4660
["Socket is already connected"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4661
["Too many open files"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4662
["Message too long"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4663
["Network is down"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4664
["Network dropped connection on reset"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4665
["Network is unreachable"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4666
["No buffer space available"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4667
["Bad protocol option"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4668
["Socket is not connected"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4669
["Socket operation on non-socket"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4670
["Operation not supported"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4671
["Protocol family not supported"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4672
["Too many processes"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4673
["Protocol not supported"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4674
["Protocol wrong type for socket"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4675
["Cannot send after socket shutdown"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4676
["Socket type not supported"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4677
["Connection timed out"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4678
["Resource temporarily unavailable"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4679
["Host not found"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4680
["Specified event object handle is invalid"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4681
["One or more parameters are invalid"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4682
["Invalid procedure table from service provider"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4683
["Invalid service provider version number"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4684
["Overlapped operations will complete later"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4685
["Overlapped I/O event object not in signaled state"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4686
["Insufficient memory available"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4687
["Successful WSAStartup not yet performed"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4688
["Valid name, no data record of requested type"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4689
["This is a non-recoverable error"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4690
["Unable to initialize a service provider"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4691
["System call failure"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4692
["Network subsystem is unavailable"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4693
["Non-authoritative host not found"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4694
["WINSOCK.DLL version out of range"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4695
["Graceful shutdown in progress"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4696
["Overlapped operation aborted"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4700
["Unknown error code"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:4922
["Recalling..."] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:6509
-- /cygdrive/c/source/mushclient/doc.cpp:6531
["Send-to-script cannot execute because scripting is not enabled."] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:6600
["Unable to allocate memory for host name lookup"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:7063
-- /cygdrive/c/source/mushclient/doc.cpp:7065
["Proxy server refused authentication"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:7223
["Proxy server username or password lengths cannot be > 255 characters"] =
"",
-- /cygdrive/c/source/mushclient/doc_construct.cpp:96
-- /cygdrive/c/source/mushclient/mainfrm.cpp:487
["Ready"] =
"",
-- /cygdrive/c/source/mushclient/doc_construct.cpp:793
["Your world name cannot be blank."] =
"",
-- /cygdrive/c/source/mushclient/doc_construct.cpp:799
["The world TCP/IP address cannot be blank."] =
"",
-- /cygdrive/c/source/mushclient/evaluate.cpp:600
["Replace existing triggers?\nIf you reply \"No\", then triggers from the file will be added to existing triggers"] =
"",
-- /cygdrive/c/source/mushclient/evaluate.cpp:609
["Replace existing aliases?\nIf you reply \"No\", then aliases from the file will be added to existing aliases"] =
"",
-- /cygdrive/c/source/mushclient/evaluate.cpp:618
["Replace existing timers?\nIf you reply \"No\", then timers from the file will be added to existing timers"] =
"",
-- /cygdrive/c/source/mushclient/evaluate.cpp:673
-- /cygdrive/c/source/mushclient/serialize.cpp:58
["File does not have a valid MUSHclient XML signature."] =
"",
-- /cygdrive/c/source/mushclient/evaluate.cpp:787
["Unable to create the requested file"] =
"",
-- /cygdrive/c/source/mushclient/evaluate.cpp:799
["There was a problem in the data format"] =
"",
-- /cygdrive/c/source/mushclient/genprint.cpp:206
["Unable to create a font for printing"] =
"",
-- /cygdrive/c/source/mushclient/genprint.cpp:282
-- /cygdrive/c/source/mushclient/genprint.cpp:382
["Error occurred starting a new page"] =
"",
-- /cygdrive/c/source/mushclient/genprint.cpp:407
["Error occurred closing printer"] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:281
["Failed to create MDI Frame Window"] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:290
["Failed to create toolbar"] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:300
["Failed to create status bar"] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:310
["Failed to create game toolbar"] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:320
["Failed to create activity toolbar"] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:1204
["Unable to open the Gammon Software Solutions web page: "] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:1214
-- /cygdrive/c/source/mushclient/mainfrm.cpp:1223
["Unable to open the MUSHclient forum web page: "] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:1248
["Unable to open the MUD lists web page: "] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:1403
["Unable to open the Gammon Software Solutions Bug Report web page: "] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:1849
["Unable to open the MUSHclient documentation web page: "] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:1859
["Unable to open the regular expressions web page: "] =
"",
-- /cygdrive/c/source/mushclient/mainfrm.cpp:2207
["Unable to open the plugins web page: "] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:3864
["Printing world..."] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:4050
["Printing cancelled"] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:4541
["No URL selected"] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:4543
["URL too long"] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:4583
["No email address selected"] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:4585
["Email address too long"] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:5329
["Cannot find style of this character"] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:5776
["@ must be followed by a variable name"] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:6362
-- /cygdrive/c/source/mushclient/mushview.cpp:6446
["Cannot compile regular expression"] =
"",
-- /cygdrive/c/source/mushclient/mxp/mxp.cpp:50
["Empty MXP element supplied."] =
"",
-- /cygdrive/c/source/mushclient/mxp/mxpOnOff.cpp:32
["Closing down MXP"] =
"",
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:572
["Character name requested but auto-connect not set to MXP."] =
"",
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:575
["Character name requested but none defined."] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7338
["No error"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7339
["The world is already open"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7340
["The world is closed, this action cannot be performed"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7341
["No name has been specified where one is required"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7342
["The sound file could not be played"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7343
["The specified trigger name does not exist"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7344
["Attempt to add a trigger that already exists"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7345
["The trigger \"match\" string cannot be empty"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7346
["The name of this object is invalid"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7347
["Script name is not in the script file"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7348
["The specified alias name does not exist"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7349
["Attempt to add a alias that already exists"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7350
["The alias \"match\" string cannot be empty"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7351
["Unable to open requested file"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7352
["Log file was not open"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7353
["Log file was already open"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7354
["Bad write to log file"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7355
["The specified timer name does not exist"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7356
["Attempt to add a timer that already exists"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7357
["Attempt to delete a variable that does not exist"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7358
["Attempt to use SetCommand with a non-empty command window"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7359
["Bad regular expression syntax"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7360
["Time given to AddTimer is invalid"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7361
["Direction given to AddToMapper is invalid"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7362
["No items in mapper"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7363
["Option name not found"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7364
["New value for option is out of range"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7365
["Trigger sequence value invalid"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7366
["Where to send trigger text to is invalid"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7367
["Trigger label not specified/invalid for 'send to variable'"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7368
["File name specified for plugin not found"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7369
["There was a parsing or other problem loading the plugin"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7370
["Plugin is not allowed to set this option"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7371
["Plugin is not allowed to get this option"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7372
["Requested plugin is not installed"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7373
["Only a plugin can do this"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7374
["Plugin does not support that subroutine (subroutine not in script)"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7375
["Plugin does not support saving state"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7376
["Plugin could not save state (eg. no state directory)"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7377
["Plugin is currently disabled"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7378
["Could not call plugin routine"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7379
["Calls to \"Execute\" nested too deeply"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7380
["Unable to create socket for chat connection"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7381
["Unable to do DNS (domain name) lookup for chat connection"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7382
["No chat connections open"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7383
["Requested chat person not connected"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7384
["General problem with a parameter to a script call"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7385
["Already listening for incoming chats"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7386
["Chat session with that ID not found"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7387
["Already connected to that server/port"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7388
["Cannot get (text from the) clipboard"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7389
["Cannot open the specified file"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7390
["Already transferring a file"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7391
["Not transferring a file"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7392
["There is not a command of that name"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7393
["That array already exists"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7394
["That array does not exist"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7395
["Values to be imported into array are not in pairs"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7396
["Import succeeded, however some values were overwritten"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7397
["Import/export delimiter must be a single character, other than backslash"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7398
["Array element set, existing value overwritten"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7399
["Array key does not exist"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7400
["Cannot import because cannot find unused temporary character"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7401
["Cannot delete trigger/alias/timer because it is executing a script"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7402
["Spell checker is not active"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7403
["Cannot create requested font"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7404
["Invalid settings for pen parameter"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7405
["Bitmap image could not be loaded"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7406
["Image has not been loaded into window"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7407
["Number of points supplied is incorrect"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7408
["Point is not numeric"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7409
["Hotspot processing must all be in same plugin"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7410
["Hotspot has not been defined for this window"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7411
["Requested miniwindow does not exist"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:7412
["Invalid settings for brush parameter"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:252
["No (relevant) chat connections."] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_commands.cpp:290
["Scripting is not active yet, or script file had a parse error."] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_commands.cpp:306
["Warning - you appear to be doing a script command but scripting is not enabled."] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:243
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:259
["database id not found"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:245
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:263
["database not open"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:251
["row ready"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:255
["finished"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:267
["already have prepared statement"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:271
["do not have prepared statement"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:275
["do not have a valid row"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:279
["database already exists under a different disk name"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_database.cpp:283
["column count out of valid range"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:54
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:196
["Comment code of '{' not terminated by a '}'"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:65
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:212
["Speed walk counter exceeds 99"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:77
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:224
["Speed walk counter not followed by an action"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:80
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:227
["Speed walk counter may not be followed by a comment"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:89
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:236
["Action code of C, O, L or K must not follow a speed walk count (1-99)"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:107
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:248
["Action code of C, O, L or K must be followed by a direction"] =
"",
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:133
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:276
["Action code of '(' not terminated by a ')'"] =
"",
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:202
["Immediate execution"] =
"",
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:207
["Line in error: "] =
"",
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:213
["No active world"] =
"",
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:240
["Script error"] =
"",
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:396
["Something nasty happened whilst initialising the scripting engine"] =
"",
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:434
["Script engine problem on script parse"] =
"",
-- /cygdrive/c/source/mushclient/scripting/scripting.cpp:29
["Error, scripting already active"] =
"",
-- /cygdrive/c/source/mushclient/scripting/scripting.cpp:445
["You have not specified a script file name:"] =
"",
-- /cygdrive/c/source/mushclient/scripting/scripting.cpp:516
["Error context in script:"] =
"",
-- /cygdrive/c/source/mushclient/scripting/scripting.cpp:556
["Error context in script:\n"] =
"",
-- /cygdrive/c/source/mushclient/telnet_phases.cpp:586
-- /cygdrive/c/source/mushclient/telnet_phases.cpp:844
["Cannot process compressed output. World closed."] =
"",
-- /cygdrive/c/source/mushclient/timers.cpp:314
["Reconnecting ..."] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:832
["Script:"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:833
["-------(start script)----------"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:835
["--------(end script)-----------"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:1062
["Script file: "] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:1275
["MCCP not active."] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:1567
[" WARNING: temporarily hidden by auto-positioning (no room)"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:1704
["----- Debug commands available -----"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2301
-- /cygdrive/c/source/mushclient/world_debug.cpp:2371
["Matched count"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2302
-- /cygdrive/c/source/mushclient/world_debug.cpp:2372
-- /cygdrive/c/source/mushclient/world_debug.cpp:2442
["Has script"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2303
-- /cygdrive/c/source/mushclient/world_debug.cpp:2373
-- /cygdrive/c/source/mushclient/world_debug.cpp:2443
["Times script called"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2304
-- /cygdrive/c/source/mushclient/world_debug.cpp:2374
["When last matched"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2305
-- /cygdrive/c/source/mushclient/world_debug.cpp:2375
-- /cygdrive/c/source/mushclient/world_debug.cpp:2447
["Send to"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2306
-- /cygdrive/c/source/mushclient/world_debug.cpp:2376
-- /cygdrive/c/source/mushclient/world_debug.cpp:2448
["Temporary"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2312
-- /cygdrive/c/source/mushclient/world_debug.cpp:2381
["Time to match"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2316
-- /cygdrive/c/source/mushclient/world_debug.cpp:2384
["Match attempts"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2441
["Fired count"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2444
["When to fire next"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2445
["Seconds to fire next"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2446
["When last reset/fired"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:2556
-- /cygdrive/c/source/mushclient/world_debug.cpp:2565
["Never"] =
"",
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:735
["Loading plugins ..."] =
"",
} -- end messages
-- Formatted messages
formatted = {
-- /cygdrive/c/source/mushclient/Finding.cpp:51
["The %s \"%s\" was not found%s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/Finding.cpp:154
["Finding: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:574
["Internal MUSHclient error, config name collision: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:851
["Welcome to MUSHclient, version %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:852
["Thank you for upgrading MUSHclient to version %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:1431
["Function '%s' not in spellchecker.lua file"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:1462
["Could not initialise zlib decompression engine: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/MUSHclient.cpp:1465
["Could not initialise zlib decompression engine: %i"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/Mapping.cpp:107
-- /cygdrive/c/source/mushclient/serialize.cpp:84
["Error \"%s\" processing mapping failure regular expression \"%s\""] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/Mapping.cpp:347
["Mapper: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/ProcessPreviousLine.cpp:575
["Previous line had a bad UTF-8 sequence at column %i, and was not evaluated for trigger matches"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/ProcessPreviousLine.cpp:1146
["Trigger: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/StatLink.cpp:107
["Unable to execute: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextDocument.cpp:266
["The file \"%s\" has been modified. Do you wish to reload it?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextDocument.cpp:433
-- /cygdrive/c/source/mushclient/dialogs/cmdhist.cpp:246
-- /cygdrive/c/source/mushclient/doc.cpp:5797
-- /cygdrive/c/source/mushclient/mushview.cpp:5445
-- /cygdrive/c/source/mushclient/sendvw.cpp:2325
["Notepad: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:576
["The %s contains %i line%s, %i word%s, %i character%s"] =
function (a, b, c, d, e, f, g)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:911
["&Send To %s\tShift+Ctrl+S"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:970
["Replace entire window contents with 'recall' from %s?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1131
["&Flip To %s\tCtrl+Alt+Space"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1373
["Invalid hex number in entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1382
["Invalid hex number in entity: &%s; - maximum of 2 hex digits"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1394
["Invalid number in entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1407
["Disallowed number in entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1420
["Unknown entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1601
["%i character%s selected."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1603
["All text selected: %i character%s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1614
[" (%i line break%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/TextView.cpp:1705
["%i replaced."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/Utilities.cpp:1744
["Cannot find the function '%s' - item '%s' is %s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/Utilities.cpp:2332
["Clipboard converted for use with the Forum, %i change%s made"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatlistensock.cpp:62
["Accepted call from %s port %d"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:263
["Incoming packet on %i: \"%s\""] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:347
["Incoming chat call to world %s from %s, IP address: %s.\n\nAccept it?"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:362
["Chat session accepted, remote user: \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:506
["Unable to send to \"%s\", code = %i (%s)"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:537
["Unable to connect to \"%s\", code = %i (%s)"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:546
["Session established to %s."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:578
["Chat session cannot resolve host name: %s."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:617
["You are already connected to %s port %d"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:627
["Calling chat server at %s port %d"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:677
["Received chat message %i on %i, data: \"%s\""] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:727
["\n%s does not support the chat command %i.\n"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:731
["Received unsupported chat command %i from %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:750
["Sending chat message %i on %i, data: \"%s\""] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:833
["%s has changed his/her name to %s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:863
["%s has requested your public connections"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:874
["Found %i connection%s to %s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1015
["%s is not allowing file transfers from you."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1036
["Supplied file name of \"%s\" may not contain slashes."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1060
["%s wishes to send you the file \"%s\", size %ld bytes (%1.1f Kb).\n\nAccept it?"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1081
["Chat: Save file from %s as ..."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1111
["%s does not want that particular file."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1124
["%s can not open that file."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1126
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1193
["File %s cannot be opened."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1143
["Receiving a file from %s -- Filename: %s, Length: %ld bytes (%1.1f Kb)."] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1208
["Send of file \"%s\" aborted due to read error."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1223
["Send of file \"%s\" complete."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1227
["Sumcheck from sender was: %08X %08X %08X %08X %08X"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1236
["Sumcheck we calculated: %08X %08X %08X %08X %08X"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1286
["Receive of file \"%s\" aborted due to write error."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1304
["Receive of file \"%s\" complete."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1308
["Sumcheck as written was: %08X %08X %08X %08X %08X"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1317
["Sumcheck as received was: %08X %08X %08X %08X %08X"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1342
["Transfer of file \"%s\" stopped prematurely."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1379
["Ping time to %s: %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1385
["Ping response: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1424
["%s is peeking at your connections"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1440
-- /cygdrive/c/source/mushclient/chatsock.cpp:1474
["Peek found %i connection%s to %s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1517
["\nYou are no longer snooping %s.\n"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1520
["%s has stopped snooping you."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1530
["%s wishes to start snooping you.\n\nPermit it?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1536
["\n%s does not want you to snoop just now.\n"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1543
["\nYou are now snooping %s.\n"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1546
["%s is now snooping you."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1555
["\n%s has not given you permission to snoop.\n"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1558
["%s attempted to snoop you."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1613
["\nYou command %s to '%s'.\n"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1617
["%s commands you to '%s'."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1626
["\n%s has not given you permission to send commands.\n"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/chatsock.cpp:1629
["%s attempted to send you a command."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/ColourPickerDlg.cpp:388
["Hue: %5.1f"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/ColourPickerDlg.cpp:389
["Saturation: %5.3f"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/ColourPickerDlg.cpp:390
["Luminance: %5.3f"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/GoToLineDlg.cpp:45
["Line number must be in range 1 to %i"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/ImportXMLdlg.cpp:123
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:365
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:524
-- /cygdrive/c/source/mushclient/doc.cpp:881
-- /cygdrive/c/source/mushclient/evaluate.cpp:685
["Unable to open or read %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/ImportXMLdlg.cpp:210
["%lu trigger%s, %lu alias%s, %lu timer%s, %lu macro%s, %lu variable%s, %lu colour%s, %lu keypad%s, %lu printing style%s loaded. "] =
function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/InsertUnicodeDlg.cpp:65
["Bad hex character: '%c'."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/InsertUnicodeDlg.cpp:83
["Bad decimal character: '%c'."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/InsertUnicodeDlg.cpp:93
["Unicode character %I64i too large - must be in range 0 to 2147483647 (hex 0 to 7FFFFFFF)."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/LuaGsubDlg.cpp:82
["Function '%s' not found in script text"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/MapCommentDlg.cpp:43
["The comment may not contain the character \"%c\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/MapDlg.cpp:101
["Remove existing %i directions from the map?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/MapMoveDlg.cpp:51
["The action may not contain the character \"%c\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/MapMoveDlg.cpp:58
["The reverse action may not contain the character \"%c\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/MultiLineTriggerDlg.cpp:72
["Multi-line triggers can match a maximum of %i lines."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/ScriptErrorDlg.cpp:74
["Error number: %i\nEvent: %s\nDescription: %s\nCalled by: %s\n"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:103
["Line %i (%i), %s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:108
[" Flags = End para: %s, Note: %s, User input: %s, Log: %s, Bookmark: %s"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:116
[" Length = %i, last space = %i"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:122
[" Text = \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:125
["%i style run%s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:138
["%i: Offset = %i, Length = %i, Text = \"%s\""] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:162
[" Action - send to MUD: \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:165
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:172
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:179
[" Hint: \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:169
[" Action - hyperlink: \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:176
[" Action - send to command window: \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:187
[" Set variable: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:189
[" Flags = Hilite: %s, Underline: %s, Blink: %s, Inverse: %s, Changed: %s"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:199
[" Start MXP tag: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:219
[" Foreground colour 256-ANSI : R=%i, G=%i, B=%i"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:225
[" Foreground colour ANSI : %i (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:229
[" Background colour 256-ANSI : R=%i, G=%i, B=%i"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:235
[" Background colour ANSI : %i (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:240
[" Custom colour: %i (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:245
[" Foreground colour RGB : R=%i, G=%i, B=%i"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:250
[" Background colour RGB : R=%i, G=%i, B=%i"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:257
[" Foreground colour rsvd : %i"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:259
[" Background colour rsvd : %i"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/TextAttributesDlg.cpp:272
["%i column%s in %i style run%s"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/chat/ChatListDlg.cpp:154
["Chat sessions for %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:605
["Every %02i:%02i:%04.2f"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:610
["At %02i:%02i:%04.2f"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:254
["%s description"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:358
["Added plugin %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:372
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:531
-- /cygdrive/c/source/mushclient/doc.cpp:888
["There was a problem loading the plugin %s. See the output window for more details"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:426
["Removed plugin %s (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:516
["Reinstalled plugin %s (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:576
-- /cygdrive/c/source/mushclient/world_debug.cpp:2477
["Unable to edit the plugin file %s."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:739
["Unable to edit the plugin state file %s."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:777
["Enabled plugin %s (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:812
["Disabled plugin %s (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/EditVariable.cpp:115
["Edit variable '%s'"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/TimerDlg.cpp:164
["The timer label \"%s\" is already in the list of timers."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:150
["The alias 'match' text contains an invalid non-printable character (hex %02X) at position %i."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:164
["The alias 'send' text contains an invalid non-printable character (hex %02X) at position %i."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/aliasdlg.cpp:224
["The alias label \"%s\" is already in the list of aliases."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:2453
["In %s, could not recompile trigger (%s) matching on: %s."] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:2487
["In %s, could not recompile alias (%s) matching on: %s."] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:2496
["In %s, %i trigger(s) could not be recompiled."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:2502
["In %s, %i alias(es) could not be recompiled."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:259
["The %s named \"%s\" is already in the %s list"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:380
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:427
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:1656
["The %s you selected is no longer in the %s list"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:384
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:431
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:1660
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:3110
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:3218
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:4274
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:4381
["The %s named \"%s\" is no longer in the %s list"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:447
["The %s named \"%s\" has been included from an include file. You cannot modify it here."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:458
["The %s named \"%s\" has already been modified by a script subroutine"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:486
["The %s named \"%s\" already exists in the %s list"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:707
["Delete %i %s - are you sure?"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:774
["%i item%s %s included from an include file. You cannot delete %s here."] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:784
["%i item%s %s currently executing a script. You cannot delete %s now."] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:1175
["%i item%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/genpropertypage.cpp:1178
[" (%i item%s hidden by filter)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:2534
["By checking the option \"Override with default aliases\" your existing %i aliase(s) will be PERMANENTLY discarded next time you open this world.\n\nAre you SURE you want to do this?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:2660
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:3702
["Error: %s "] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:3506
["By checking the option \"Override with default triggers\" your existing %i trigger%s will be PERMANENTLY discarded next time you open this world.\n\nAre you SURE you want to do this?"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:5858
["You are allocating %ld lines for your output buffer, but have only %ld Mb of physical RAM. This is not recommended. Do you wish to continue anyway?"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:6207
["By checking the option \"Override with default timers\" your existing %i timer%s will be PERMANENTLY discarded next time you open this world.\n\nAre you SURE you want to do this?"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:7374
["Successfully registered %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:7916
["%i line%s could not be added as a variable."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:7930
["Loaded %i variable%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:7989
["Saved %i variable%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:8333
["(%i line%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:9085
[" (%i styles)"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:200
["The trigger 'match' text contains an invalid non-printable character (hex %02X) at position %i."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:214
["The trigger 'send' text contains an invalid non-printable character (hex %02X) at position %i."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:246
["The trigger label \"%s\" is already in the list of triggers."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/triggdlg.cpp:317
["Your trigger is set to 'send to %s' however the 'Send:' field is blank.\n\nYou can use \"%%0\" to send the entire matching line to the specified place.\n\n(You can eliminate this message by sending to 'world')\n\nDo you want to change the trigger to fix this?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:775
["Welcome to MUSHclient version %s!"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:779
["Compiled: %s at %s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:781
["Using: %s, PCRE %s, PNG %s, SQLite3 %s, Zlib %s"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:995
["Cannot connect to \"%s\", TCP/IP address not specified"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:1002
["Cannot connect to \"%s\", port number not specified"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:1028
["Unknown proxy server type: %d."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:1046
["Connecting to %s, port %d"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:1068
["Unable to create TCP/IP socket for \"%s\", code = %i (%s)"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:1515
["Could not decompress text from MUD: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:1518
["Could not decompress text from MUD: %i"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:2593
["%s function \"%s\" cannot execute - scripting disabled/parse error."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:2605
["%s function \"%s\" not found or had a previous error."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:2624
["processing trigger \"%s\" when matching line: \"%s\""] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:2783
["Close log file %s?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:2895
["Unable to open log file \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:3174
["An error occurred writing to log file \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:4004
-- /cygdrive/c/source/mushclient/doc.cpp:6674
["Unable to connect to \"%s\", code = %i (%s)\n\nError occurred during phase: %s"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:4159
["Unable to resolve host name for \"%s\", code = %i (%s)"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:4485
["This will end your %s session."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:4515
["World internal variables (only) have changed.\n\nSave changes to %s?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:4876
["Are you SURE you want to clear all %i lines in the output window?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:4905
["Recalling: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:5068
["The %s \"%s\" was not found"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:5129
-- /cygdrive/c/source/mushclient/mushview.cpp:5498
["Recall: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:5335
["The connection to %s is currently being established."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:5341
["The connection to %s is not open. Attempt to reconnect?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:5646
["%s%s packet: %I64d (%i bytes) at %s%s%s"] =
function (a, b, c, d, e, f, g)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:6615
["Unable to initiate host name lookup for \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:6828
["Could not open log file \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:7041
["Proxy server cannot authenticate, reason: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:7107
-- /cygdrive/c/source/mushclient/doc.cpp:7145
["Proxy server refused connection, reason: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:7175
["Unexpected proxy server response %i, expected %i"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/doc.cpp:7750
["Unable to edit file %s."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/evaluate.cpp:698
["The file %s is not in the correct format"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/evaluate.cpp:962
-- /cygdrive/c/source/mushclient/mushview.cpp:5884
["Alias: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/evaluate.cpp:993
-- /cygdrive/c/source/mushclient/mushview.cpp:5814
["processing alias \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mainfrm.cpp:1393
["Unable to play file %s, reason: %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:2267
["Plugin \"%s\" is not installed"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:2272
["Script routine \"%s\" is not in plugin %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:2279
["An error occurred calling plugin %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:2332
-- /cygdrive/c/source/mushclient/mushview.cpp:5622
["Hyperlink action \"%s\" - permission denied."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:2337
-- /cygdrive/c/source/mushclient/mushview.cpp:5627
["Unable to open the hyperlink \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:4456
["Line %ld, %s%s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:4553
["Unable to open the URL \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:4587
["Email address \"%s\" invalid - does not contain a \"@\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:4595
["Unable to send mail to \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mushview.cpp:5786
["Variable '%s' is not defined."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxp.cpp:45
["MXP element: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxp.cpp:65
["MXP element too short: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpClose.cpp:61
["Opening MXP tag <%s> not found in output buffer"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpClose.cpp:136
["closing MXP tag %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpClose.cpp:232
["setting MXP variable %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpClose.cpp:317
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:271
-- /cygdrive/c/source/mushclient/mxp/mxpStart.cpp:127
["Unknown MXP element: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpClose.cpp:379
["End-of-line closure of open MXP tag: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpClose.cpp:400
["<reset> closure of MXP tag: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:39
["MXP definition ignored when not in secure mode: <!%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:54
["Invalid MXP definition name: <!%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:70
["Invalid MXP element/entity name: \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:88
["Got Definition: !%s %s %s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:106
["Unknown definition type: <!%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:135
["Cannot redefine built-in MXP element: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:145
["Replacing previously-defined MXP element: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:187
["No opening \"<\" in MXP element definition \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:201
["Unexpected \"<\" in MXP element definition \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:213
["No closing quote in MXP element definition \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:225
["No closing \">\" in MXP element definition \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:237
["No element name in MXP element definition \"<%s>\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:247
["Element definitions cannot close other elements: </%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:257
["Element definitions cannot define other elements: <!%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:347
["Bad variable name \"%s\" - for MXP FLAG definition"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:372
["Cannot add attributes to undefined MXP element: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:404
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:827
["Cannot redefine entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:437
["No closing \";\" in MXP entity argument \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpDefs.cpp:504
["Unexpected word \"%s\" in entity definition for &%s; ignored"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEnd.cpp:35
["Invalid MXP tag name: </%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEnd.cpp:45
["Closing MXP tag </%s %s> has inappropriate arguments"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEnd.cpp:68
["Cannot close open MXP tag <%s> - blocked by secure tag <%s>"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEnd.cpp:82
["Closing MXP tag </%s> does not have corresponding opening tag"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEnd.cpp:90
["Cannot close open MXP tag <%s> - it was opened in secure mode."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEnd.cpp:109
["Closing out-of-sequence MXP tag: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEntities.cpp:34
["MXP entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEntities.cpp:40
["Invalid MXP entity name \"%s\" supplied."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEntities.cpp:84
["Invalid hex number in MXP entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEntities.cpp:96
["Invalid hex number in MXP entity: &%s;- maximum of 2 hex digits"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEntities.cpp:110
["Invalid number in MXP entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEntities.cpp:122
["Disallowed number in MXP entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpEntities.cpp:139
["Unknown MXP entity: &%s;"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpError.cpp:163
["Unterminated MXP %s: %s (%s)"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpMode.cpp:62
-- /cygdrive/c/source/mushclient/mxp/mxpMode.cpp:67
["unknown mode %i"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpMode.cpp:70
["MXP mode change from '%s' to '%s'"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:138
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:146
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:267
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:280
["Unknown colour: \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:300
["Sent version response: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:321
["Sent AFK response: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:371
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:383
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:431
["Invalid <support> argument: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:461
["Sent supports response: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:507
["Sent options response: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:531
["Option named '%s' not known."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:535
["Option named '%s' cannot be changed."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:542
["Option named '%s' changed to '%s'."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:547
["Option named '%s' could not be changed to '%s' (out of range)."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:567
["Sent character name: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:815
["Invalid MXP entity name: <!%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpOpenAtomic.cpp:841
["MXP tag <%s> is not implemented"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpStart.cpp:48
["Invalid MXP element name \"%s\" supplied."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpStart.cpp:145
["Secure MXP tag ignored when not in secure mode: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpStart.cpp:217
["Now have %i outstanding MXP tags"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpStart.cpp:286
-- /cygdrive/c/source/mushclient/mxp/mxpStart.cpp:422
["No closing \";\" in MXP element argument \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpStart.cpp:473
["Non-default argument \"%s\" not supplied to <%s>"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxpStart.cpp:566
["opening MXP tag %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxputils.cpp:140
-- /cygdrive/c/source/mushclient/mxp/mxputils.cpp:161
["Invalid parameter name: \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxputils.cpp:170
["No argument value supplied for: \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxputils.cpp:521
["Unused argument (%i) for <%s>: %s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/mxp/mxputils.cpp:528
["Unused argument for <%s>: %s=\"%s\""] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/plugins.cpp:225
-- /cygdrive/c/source/mushclient/plugins.cpp:272
-- /cygdrive/c/source/mushclient/plugins.cpp:354
-- /cygdrive/c/source/mushclient/plugins.cpp:444
-- /cygdrive/c/source/mushclient/plugins.cpp:532
-- /cygdrive/c/source/mushclient/plugins.cpp:620
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:1145
-- /cygdrive/c/source/mushclient/scripting/methods/methods_plugins.cpp:414
["Plugin %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/plugins.cpp:227
-- /cygdrive/c/source/mushclient/plugins.cpp:275
-- /cygdrive/c/source/mushclient/plugins.cpp:355
-- /cygdrive/c/source/mushclient/plugins.cpp:445
-- /cygdrive/c/source/mushclient/plugins.cpp:533
-- /cygdrive/c/source/mushclient/plugins.cpp:623
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:1146
-- /cygdrive/c/source/mushclient/scripting/methods/methods_plugins.cpp:415
["Executing plugin %s sub %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/plugins.cpp:814
["Plugin state saved. Plugin: \"%s\". World: \"%s\"."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/plugins.cpp:827
["Unable to create the plugin save state file: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/plugins.cpp:836
["Insufficient memory to write the plugin save state file: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/plugins.cpp:845
["There was a problem saving the plugin save state file: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/regexp.cpp:102
["Error executing regular expression: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/regexp.cpp:140
["Error occurred at column %i."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:1014
["Plugin ID (%s) is not installed"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:1024
["Plugin '%s' (%s) disabled"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:1036
["Scripting not enabled in plugin '%s' (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:1062
["No function '%s' in plugin '%s' (%s)"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:1113
["Cannot pass argument #%i (%s type) to CallPlugin"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/lua_methods.cpp:1166
["Runtime error in function '%s', plugin '%s' (%s)"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/lua_scripting.cpp:487
-- /cygdrive/c/source/mushclient/scripting/lua_scripting.cpp:703
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:70
["Executing %s script \"%s\""] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:191
["Your chat name changed from %s to %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:216
["\n%s chats to everybody, '%s%s%s%s'\n"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:234
["You emote to everybody: %s%s%s %s%s"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:242
["You chat to everybody, '%s%s%s%s'"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:271
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1051
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1138
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1247
["Chat ID %i is not connected."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:276
["\nTo you, %s%s%s %s%s\n"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:284
["\n%s chats to you, '%s%s%s%s'\n"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:297
["You emote to %s: %s%s%s %s%s"] =
function (a, b, c, d, e, f)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:306
["You chat to %s, '%s%s%s%s'"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:339
["%s is not connected."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:344
["%i matches."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:357
["%-15s\nTo the group, %s%s%s %s%s\n"] =
function (a, b, c, d, e, f)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:365
["%-15s\n%s chats to the group, '%s%s%s%s'\n"] =
function (a, b, c, d, e, f)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:384
["You emote to the group %s: %s%s%s %s%s"] =
function (a, b, c, d, e, f)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:393
["You chat to the group %s, '%s%s%s%s'"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:405
["No chat connections in the group %s."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:433
["\n[Chat message truncated, exceeds %i bytes]"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:458
["\n[Chat message truncated, exceeds %i lines]"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:519
["Accepting chat calls on port %d"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:534
["Cannot accept calls on port %i, code = %i (%s)"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:545
["Listening for chat connections on port %d"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:739
["Connection to %s dropped."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:760
["%i connection%s closed."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:895
["You can now send %s commands"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:899
["You can no longer send %s commands"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:905
["You can now send %s files"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:909
["You can no longer send %s files"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:915
["You can now snoop %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:919
["You can no longer snoop %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:925
["%s is ignoring you"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:929
["%s is no longer ignoring you"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:935
["%s has marked your connection as private"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:939
["%s has marked your connection as public"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:979
["%s has added you to the group %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:983
["%s has removed you from the chat group"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1016
["Chat ID %ld is not connected."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1033
["Cannot find connection \"%s\"."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1062
["\n%s pastes to you: \n\n%s%s%s%s\n"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1072
["You paste to %s: \n\n%s%s%s%s"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1091
["\n%s pastes to everybody: \n\n%s%s%s%s\n"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1109
["You paste to everybody: \n\n%s%s%s%s"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1145
["Already sending file %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1148
["Already receiving file %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1210
["%s,%ld"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:1227
["Initiated transfer of file %s, %ld bytes (%1.1f Kb)."] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:140
["*Invalid direction '%c' in speed walk, must be N, S, E, W, U, D, F, or (something)"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:297
["Invalid direction '%c' in speed walk, must be N, S, E, W, U, D, F, or (something)"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/methods/methods_speedwalks.cpp:373
["&Discard %i Queued Command%s\tCtrl+D"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:87
["Script engine problem invoking subroutine \"%s\" when %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:136
["Wrong number of arguments for script subroutine \"%s\" when %s\n\nWe expected your subroutine to have %i argument%s"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:142
["Unable to invoke script subroutine \"%s\" when %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:185
["Execution of line %i column %i"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:219
["Plugin: %s (called from world: %s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scriptengine.cpp:224
["World: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scripting.cpp:400
["The script file \"%s\" has been modified. Do you wish to re-process it?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scripting.cpp:432
["The %s subroutine named \"%s\" could not be found."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scripting.cpp:436
["The %s (%s) subroutine named \"%s\" could not be found."] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/scripting/scripting.cpp:447
["There was a problem in script file \"%s\":"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/sendvw.cpp:1000
["Logout from this character on %s?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/sendvw.cpp:1014
["Quit from %s?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/sendvw.cpp:1322
["Replace your typing of\n\n\"%s\"\n\nwith\n\n\"%s\"?"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/sendvw.cpp:2146
["Are you SURE you want to clear all %i commands you have typed?"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/sendvw.cpp:2232
["No replacements made for \"%s\"."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/sendvw.cpp:2557
["Accelerator: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/serialize.cpp:48
["Opening world \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/telnet_phases.cpp:600
-- /cygdrive/c/source/mushclient/telnet_phases.cpp:858
["Could not reset zlib decompression engine: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/telnet_phases.cpp:603
-- /cygdrive/c/source/mushclient/telnet_phases.cpp:861
["Could not reset zlib decompression engine: %i"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/timers.cpp:178
["Timer: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/timers.cpp:200
["processing timer \"%s\""] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:225
["%i colour%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:275
["%-24s %-24s %-24s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:280
[" Normal #%i (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:286
[" Bold #%i (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:300
[" Custom #%2i (%s)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:325
["%i entit%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:348
["%i server entit%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:381
["%i element%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:459
["%i server element%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:483
["%i action%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:507
["--- Command Window %i ---"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:517
["%i command%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:574
-- /cygdrive/c/source/mushclient/world_debug.cpp:1947
["%i alias%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:645
-- /cygdrive/c/source/mushclient/world_debug.cpp:1884
["%i trigger%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:782
-- /cygdrive/c/source/mushclient/world_debug.cpp:2083
["%i variable%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:806
["%i array%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:821
["Name: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:822
["ID: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:823
["Purpose: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:824
["Author: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:825
["Disk file: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:826
["Language: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:827
["Enabled: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:828
["Sequence: %d"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:848
["Trigger %i: %s=%s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:854
-- /cygdrive/c/source/mushclient/world_debug.cpp:880
["--> Script sub %s NOT active <--"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:860
["Alias %i: %s=%s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:872
["Timer %i: %02i:%02i:%04.2f=%s"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:886
["Variable %i: %s=%s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:892
["<--- (end plugin \"%s\") --->"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:896
["%i plugin%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:908
["%i internal command%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:938
["%i info item%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:973
["MUSHclient version: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:975
["Compiled: %s."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:990
["Unknown (Platform %ld, Major %ld, Minor %ld)"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1038
["Operating system: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1041
["Libraries: %s, PCRE %s, PNG %s, SQLite3 %s, Zlib %s"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1048
["World name: '%s', ID: %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1055
["Script language: %s, enabled: %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1059
["Scripting active: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1069
["Lua sandbox is %i characters, DLL loading allowed: %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1073
["Scripting prefix: '%s'. External editor in use: %s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1076
["Editor path: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1083
["Scripting for: %1.6f seconds."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1118
["** Triggers: %ld in world file, triggers enabled: %s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1131
-- /cygdrive/c/source/mushclient/world_debug.cpp:1186
[" %ld enabled, %ld regexp, %I64d attempts, %I64d matched, %1.6f seconds."] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1173
["** Aliases: %ld in world file, aliases enabled: %s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1206
["** Timers: %ld in world file, timers enabled: %s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1220
[" %ld enabled, %I64d fired."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1223
[" Timers checked every %i second(s)."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1225
[" Timers checked every %0.1f seconds."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1250
["** Variables: %ld."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1266
["MCCP active, took %1.6f seconds to decompress"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1267
["MCCP received %I64d compressed bytes, decompressed to %I64d bytes."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1271
["MCCP compression ratio was: %6.1f%% (lower is better)"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1302
["ID: %s, '"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1319
["', (%s, %0.3f s) %s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1418
["** Plugins: %ld loaded, %ld enabled."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1426
["Connect phase: %i (%s). NAWS wanted: %s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1431
["Received: %I64d bytes (%I64d Kb)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1432
["Sent: %I64d bytes (%I64d Kb)"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1433
["Received %I64d packets, sent %I64d packets."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1434
["Total lines received: %ld"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1436
["This connection: Sent %ld lines, received %ld lines."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1440
["Telnet (IAC) received: DO: %ld, DONT: %ld, WILL: %ld, WONT: %ld, SB: %ld"] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1466
["MXP active: %s, Pueblo mode: %s, Activated: %s"] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1471
["MXP tags received: %I64d"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1472
["MXP entities received: %I64d"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1473
["MXP errors: %I64d"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1495
["Commands in command history: %ld"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1496
["Speed walking enabled: %s. Speed walking prefix: %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1498
["Command stacking enabled: %s. Command stack character: '%s'"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1503
["Accelerators defined: %ld"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1550
["Window: '%s', at (%ld,%ld,%ld,%ld), shown: %s"] =
function (a, b, c, d, e, f)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1558
[" width: %ld, height: %ld, position: %d, hotspots: %ld, fonts: %ld, images: %ld"] =
function (a, b, c, d, e, f)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1571
["** Miniwindows: %ld loaded, %ld shown."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1583
["Output pixels: width %ld, height: %ld, font width: %ld, font height: %ld"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1587
[" can show %ld characters, wrapping at column %ld, height %ld lines."] =
function (a, b, c)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1591
["Output buffer: %i of %ld lines."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1608
["Logging: %s, tracing: %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1617
["Database: '%s', disk file: '%s'"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1623
["** SQLite3 databases: %i"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1633
["Sound buffers in use: %ld"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1656
["Pane name = %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1657
[" Pane title = %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1658
[" Left = %i, Top = %i, Width = %i, Height = %i, Flags = %08X, Lines = %i"] =
function (a, b, c, d, e, f)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1676
["Line %i, Width = %i, Styles = %i, newline = %i"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1698
["%i pane%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1796
["Plugin ID %s does not exist."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1805
["(For plugin: %s)"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:1808
["Warning: Plugin '%s' disabled."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2019
[" %5s %02i:%02i:%04.2f"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2028
[" - firing in %8.1f seconds."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2035
["%i timer%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2118
["%i callback%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2170
["%i accelerator%s."] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2265
["Trigger %s does not exist."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2335
["Alias %s does not exist."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2403
["Timer %s does not exist."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2506
["Unable to edit the script file %s."] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/world_debug.cpp:2521
["DebugHelper: %s, %s"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/worldsock.cpp:125
["--- Connected for %i day%s, %i hour%s, %i minute%s, %i second%s. ---"] =
function (a, b, c, d, e, f, g, h)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/worldsock.cpp:139
["--- Received %i line%s, sent %i line%s."] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/worldsock.cpp:146
["--- Output buffer has %i/%i line%s in it (%.1f%% full)."] =
function (a, b, c, d, e)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/worldsock.cpp:155
["--- Matched %i trigger%s, %i alias%s, and %i timer%s fired."] =
function (a, b, c, d, e, f)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/worldsock.cpp:165
["The \"%s\" server has closed the connection"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:214
["Time taken to %s = %15.8f seconds\n"] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:614
["Line %4i: %s (%s)%s"] =
function (a, b, c, d)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:668
["Attribute not used: %s=\"%s\""] =
function (a, b)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:684
["Tag not used: <%s>"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:752
["Loading plugin: %s"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:1048
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:1114
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:1145
["option '%s' not set"] =
function (a)
return ""
end, -- function
-- /cygdrive/c/source/mushclient/xml/xml_load_world.cpp:2418
["%s loading plugin %s ..."] =
function (a, b)
return ""
end, -- function
} -- end formatted
-- Date and time strings
times = {
-- /cygdrive/c/source/mushclient/TextView.cpp:529
["%A, %#d %B %Y, %#I:%M %p"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:514
-- /cygdrive/c/source/mushclient/doc.cpp:2969
-- /cygdrive/c/source/mushclient/doc.cpp:6857
-- /cygdrive/c/source/mushclient/mushview.cpp:3914
-- /cygdrive/c/source/mushclient/plugins.cpp:997
-- /cygdrive/c/source/mushclient/scripting/methods/methods_chat.cpp:700
-- /cygdrive/c/source/mushclient/xml/xml_save_world.cpp:52
["%A, %B %d, %Y, %#I:%M %p"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:5640
["%A, %B %d, %Y, %#I:%M:%S %p"] =
"",
-- /cygdrive/c/source/mushclient/doc.cpp:6764
["--- Connected on %A, %B %d, %Y, %#I:%M %p ---"] =
"",
-- /cygdrive/c/source/mushclient/mushview.cpp:4448
["%A, %B %d, %#I:%M:%S %p"] =
"",
-- /cygdrive/c/source/mushclient/scripting/lua_scripting.cpp:436
["\n\n--- Scripting error on %A, %B %d, %Y, %#I:%M %p ---\n\n"] =
"",
-- /cygdrive/c/source/mushclient/world_debug.cpp:976
["Time now: %A, %B %d, %Y, %#I:%M %p"] =
"",
-- /cygdrive/c/source/mushclient/worldsock.cpp:118
["--- Disconnected on %A, %B %d, %Y, %#I:%M %p ---"] =
"",
} -- end times
-- Dialog headings
headings = {
-- /cygdrive/c/source/mushclient/ActivityView.cpp:108
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:229
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:271
["Seq"] =
"",
-- /cygdrive/c/source/mushclient/ActivityView.cpp:109
["World"] =
"",
-- /cygdrive/c/source/mushclient/ActivityView.cpp:110
["New"] =
"",
-- /cygdrive/c/source/mushclient/ActivityView.cpp:111
["Lines"] =
"",
-- /cygdrive/c/source/mushclient/ActivityView.cpp:112
["Status"] =
"",
-- /cygdrive/c/source/mushclient/ActivityView.cpp:113
["Since"] =
"",
-- /cygdrive/c/source/mushclient/ActivityView.cpp:114
["Duration"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/ColourPickerDlg.cpp:242
["Colour name"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/LuaChooseList.cpp:56
-- /cygdrive/c/source/mushclient/dialogs/LuaChooseListMulti.cpp:52
["Main column"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/chat/ChatListDlg.cpp:164
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:220
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:400
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:583
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:820
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:107
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:694
["Name"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/chat/ChatListDlg.cpp:165
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:223
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:403
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:586
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:232
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:274
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:614
["Group"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/chat/ChatListDlg.cpp:166
["From IP"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/chat/ChatListDlg.cpp:167
["Call IP"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/chat/ChatListDlg.cpp:168
["Call Port"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/chat/ChatListDlg.cpp:169
["Flags"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:221
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:401
["Match"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:222
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:402
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:585
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:230
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:272
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:612
["Send"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:584
["Time"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginWizard.cpp:821
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:695
["Contents"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:108
["Purpose"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:109
["Author"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:110
["Language"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:111
["File"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:112
["Enabled"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/plugins/PluginsDlg.cpp:113
["Ver"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:228
["Alias"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:231
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:273
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:613
["Label"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:270
["Trigger"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:610
["Type"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:611
["When"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/configuration.cpp:615
["Next"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:2370
["Macro name"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:2371
["Text"] =
"",
-- /cygdrive/c/source/mushclient/dialogs/world_prefs/prefspropertypages.cpp:2372
["Action"] =
"",
} -- end headings
|
local key_input = ECS.System({COMPONENTS.key_input}, {"replay", COMPONENTS.record})
function key_input:update(dt)
local e
for i = 1, self.pool.size do
e = self.pool:get(i)
local inputs = e:get(COMPONENTS.key_input).inputs
for key, func in pairs(inputs.down) do
if love.keyboard.isDown(key) then
GAME.current:emit("capture", key, true)
func()
end
end
end
end
function key_input:replayKeys(key, state)
local e
for i = 1, self.replay.size do
e = self.pool:get(i)
local inputs = e:get(COMPONENTS.key_input).inputs
for _, t in pairs(inputs) do
for _key, func in pairs(t) do
if _key == key and state then
func()
end
end
end
end
end
function key_input:keypressed(key)
local e
for i = 1, self.pool.size do
e = self.pool:get(i)
local inputs = e:get(COMPONENTS.key_input).inputs
GAME.current:emit("capture", key, true)
for k, v in pairs(inputs.keypressed) do
if key == k then
v()
end
end
end
end
function key_input:keyreleased(key)
local e
for i = 1, self.pool.size do
e = self.pool:get(i)
local inputs = e:get(COMPONENTS.key_input).inputs
GAME.current:emit("capture", key, false)
for k, v in pairs(inputs.keyreleased) do
if key == k then
v()
end
end
end
end
return key_input
|
local _, L = ...;
if GetLocale() == "enUS" then
L["Insert QuestID for info:"] = "";
L["Check"] = "";
L["Cancel"] = "";
L["Quest ID \124cff9d9d9d[%s]\124r %s"] = "";
L["has already been completed"] = "";
L["has not yet been completed"] = "";
L["NO DATABASE INFO FOUND"] = "";
L[": wrong type value for quest id."] = "";
L[": quest id out of range."] = "";
L[": input field null."] = "";
-- [Options Localization] --
L[ADDONNAME.." is designed to help user retrieving infos by a quest ID. "
..ADDONNAME.." can be useful for example, if you want know what quest"
.." of a quests chain has not yet completed or if you want find out its title. "
..ADDONNAME.." is looking for beta testers to provide feedback for bug fixes and to suggest new features.\n"
.."Please PM me at "..RnB.LBlue(PM).." if you are want helping or suggesting.\n\r\r"] = "";
L["Bug Reports"] = "";
L[RnB.Grey("Please use ")..RnB.WYellow("!BugGrabber")..RnB.Grey(" and ")..RnB.WYellow("BugSack")
..RnB.Grey(" to provide meaningful information to help me debug without which, "
.."I probably won't be able to find out, repeat, diagnose, and fix the issue you see).\n\r")] = "";
L["Features"] = "";
L["- Keyboard support keys to easy way control UI. "] = "";
L["[Keys: ESC, Enter]\n"] = "";
L["- Colored responses"] = "";
L["Slash Commands"] = "";
L[" - show the GUI."] = "";
L["Languages "] = "";
L["Project Website "] = "";
L["Developer"] = "Sviluppatore";
L["Version"] = "";
end |
--[[
Author: Miqueas Martinez (miqueas2020@yahoo.com)
Date: 2020/09/10
License: MIT (see it in the repository)
Git Repository: https://github.com/M1que4s/TermColors
]]
local TermColors = {}
local Tokens = {
-- Attributes
"None", "Bold", "Dim", "Italic", "Underline", "DobleU", "Blink", "Reverse", "Hidden", "Strike",
-- Predefined colors
"Black", "Red", "Green", "Yellow", "Blue", "Magenta", "Cyan", "White"
}
local function tokExists(val) -- Check if the given value is a valid token
for i=1, #Tokens do
if val == Tokens[i] then return true end
end
return false
end
local function split(str, sep) -- Like 'split()' in JS
local sep = sep or "%s"
local t = {}
for e in str:gmatch("([^" .. sep .. "]+)") do t[#t+1] = e end
return t
end
TermColors.ESC = string.char(27)
TermColors.Attr = { -- Text attributes
None = "0", Bold = "1",
Dim = "2", Italic = "3",
Underline = "4", Blink = "5",
Reverse = "7", Hidden = "8",
Strike = "9", DobleU = "21" -- "Doble Underline"
}
TermColors.FG = { -- Predefined colors for foreground
Black = "30", Red = "31",
Green = "32", Yellow = "33",
Blue = "34", Magenta = "35",
Cyan = "36", White = "37",
FG = "38"
}
TermColors.BG = { -- Predefined colors for background
Black = "40", Red = "41",
Green = "42", Yellow = "43",
Blue = "44", Magenta = "45",
Cyan = "46", White = "47",
BG = "48"
}
function TermColors:compile(input)
assert(type(input) == "string", "wrong input to 'compile()', string expected, got '" .. type(input) .. "'.")
local gi = 0 -- "group index": Used to count the number of "style" groups in the string
local tn = 0 -- "token number": Like 'gi', but for count the number of "style properties" in a group
local esc = string.char(27)
local str = input:gsub("(%#%{(.-)%})", function (match) -- Caught "style" groups in the input
gi = gi + 1
match = match:gsub("%s", "")
match = match:gsub("%#%{(.-)%}", function (props)
for _, val in pairs(split(props, ";")) do -- Split down all properties in separated values
tn = tn + 1
if val:match("%w%(.*%)") then -- Check if 'val' is a function
local func, farg = val:match("(%w+)%((.*)%)") -- Gets the function name an their arguments
local rgb = nil
if farg:find("RGB") and farg:match("RGB%((%d+,%d+,%d+)%)") then
farg = farg
:gsub("[%(%)]", "") -- Remove parentheses
:gsub("RGB", "2;") -- Replace the 'RGB' function name by the correct needed value
:gsub(",", ";") -- ...
rgb = true
elseif farg:find("RGB") and not farg:match("RGB%((%d+,%d+,%d+)%)") then
-- Error: bad call to RGB() function
error(
("Bad call to RGB() function.\n\t→ in input: %s\n\t→ in group #%s: %s\n\t→ in token #%s: %s")
:format(input, gi, match, tn, val)
)
end
if func == "FG" or func == "BG" then
if not rgb then
if tokExists(farg) then props = props:gsub(func .. "%(?" .. farg .. "%)?", self[func][farg])
elseif farg:match("^(%d+)$") and not farg:find(",") and not farg:find("%a+") then
if tonumber(farg) >= 0 and tonumber(farg) <= 255 then
props = props:gsub(func .. "%(?" .. farg .. "%)?", self[func][func] .. ";5;" .. farg)
else
-- Error: 8-bit color value out of range
error(
("8-bit color value out of range: %s.\n\t→ in input: %s\n\t→ in group #%s: %s\n\t→ in token #%s: %s")
:format(farg, input, gi, match, tn, val)
)
end
else
-- Error: unknown pre-defined color
error(
("wrong color '%s'.\n\t→ in input: %s\n\t→ in group #%s: %s\n\t→ in token #%s: %s")
:format(farg, input, gi, match, tn, val)
)
end
elseif rgb then
props = props:gsub(func, self[func][func]..";2;")
:gsub("[%(%)]+", "")
:gsub("RGB", "")
:gsub(",", ";")
else
-- Error: idk...
error(
("something's wrong...\n\t→ in input: %s\n\t→ in group #%s: %s\n\t→ in token #%s: %s")
:format(input, gi, match, tn, val)
)
end
elseif func == "RGB" then
-- Error: calling RGB() function outside FG() and BG() functions is not allowed
error(
("calling RGB() outside FG() and BG() is not allowed\n\t→ in input: %s\n\t→ in group #%s: %s\n\t→ in token #%s: %s")
:format(input, gi, match, tn, val)
)
else
-- Error: unknown function name
error(
("unknown function '%s'.\n\t→ in input: %s\n\t→ in group #%s: %s\n\t→ in token #%s: %s")
:format(func, input, gi, match, tn, val)
)
end
elseif tokExists(val) and self.Attr[val] then props = props:gsub(val, self.Attr[val])
elseif tokExists(val) and not self.Attr[val] then
-- Error: trying to use a color value outside FG() and BG() functions is not allowed
error(
("trying to use a color value outside FG() and BG() functions is not allowed.\n\t→ in input: %s\n\t→ in group #%s: %s\n\t→ in token #%s: %s")
:format(input, gi, match, tn, val)
)
else
-- Error: unknown property
error(
("unknown property '%s'.\n\t→ in input: %s\n\t→ in group #%s: %s\n\t→ in token #%s: %s")
:format(val, input, gi, match, tn, val)
)
end
end
return props
end)
match = esc.."["..match.."m"
tn = 0
return match
end)
return str
end
function TermColors:print(str) print(self:compile(str or "")) end
return setmetatable(TermColors, { __call = TermColors.print }) |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local common = ReplicatedStorage:WaitForChild("common")
local AssetCatagories = require(common:WaitForChild("AssetCatagories"))
local Assets = require(common:WaitForChild("Assets"))
return function(equipped, action, cataId)
equipped = equipped or {}
if action.type == "ASSET_EQUIP" then
local asset = Assets.byId[action.assetId]
if asset then
local catagory = AssetCatagories.byId[asset.type]
if catagory and catagory.id == cataId then
local max = catagory.maxEquipped or 1
local newEquipped = {}
newEquipped[1] = action.assetId
for i = 1, math.min(#equipped, max - 1) do
newEquipped[i + 1] = equipped[i]
end
return newEquipped
end
end
end
return equipped
end |
return {'smeden','smeder','smederij','smedig','smeedbaar','smeedbaarheid','smeedijzer','smeedijzeren','smeedkunst','smeedstaal','smeedtang','smeedwerk','smeekbede','smeekbrief','smeekdicht','smeekgebed','smeekolen','smeekschrift','smeer','smeerbaar','smeerboel','smeerbuik','smeerder','smeergeld','smeergeldaffaire','smeergeldschandaal','smeerkaars','smeerkaas','smeerkanis','smeerkees','smeerklier','smeerkwast','smeerlap','smeerlapperij','smeermiddel','smeerolie','smeerolietank','smeerpijp','smeerpoes','smeerpoets','smeerpot','smeerprop','smeersel','smeerseltje','smeertroep','smeervet','smeerwortel','smeerzalf','smeet','smegma','smekeling','smekelinge','smeken','smekerig','smeking','smelleken','smelt','smeltbaar','smeltbaarheid','smeltbak','smelten','smelter','smelterig','smelterij','smelting','smeltkaas','smeltkroes','smeltkroesmuziek','smeltoven','smeltpan','smeltproces','smeltpunt','smeltstop','smelttemperatuur','smeltveiligheid','smeltwarmte','smeltwater','smeren','smergel','smerig','smerigheid','smering','smeris','smet','smeten','smetlijn','smetstof','smetteloos','smetteloosheid','smetten','smetvrees','smetvrij','smeu','smeue','smeulen','smeuig','smeuigheid','smeedstalen','smeernippel','smeltmiddel','smeltdraad','smeerleverworst','smeerzeep','smeltbad','smeerput','smeerworst','smeercampagne','smeulbrand','smeersysteem','smeerhout','smeltpoeder','smetbaan','smet','smetlede','smets','smeets','smedt','smetsers','smeenk','smeding','smeele','smeulders','smeekens','smedema','smedes','smeenge','smeijers','smeijsters','smeekes','smelik','smeitink','smedinga','smeman','smeink','smederijen','smeders','smedige','smediger','smeed','smeedbare','smeedde','smeedden','smeedt','smeedtangen','smeek','smeekbeden','smeekgebeden','smeekschriften','smeekt','smeekte','smeekten','smeerde','smeerden','smeerders','smeergeldaffaires','smeergelden','smeerkaarsen','smeerkezen','smeerlappen','smeerlapperijen','smeermiddelen','smeerolien','smeerpoetsen','smeerpoezen','smeerpotten','smeerproppen','smeersels','smeerseltjes','smeert','smeerwortels','smekelingen','smekend','smekende','smekerige','smekingen','smeltbakken','smeltbare','smeltende','smelterijen','smelters','smeltingen','smeltkroezen','smeltovens','smeltpannen','smeltpunten','smeltstoppen','smeltveiligheden','smerige','smeriger','smerigere','smerigheden','smerigst','smerigste','smeringen','smerissen','smetlijnen','smetstoffen','smette','smetteloze','smettelozer','smeul','smeulde','smeulden','smeulend','smeulende','smeult','smeuige','smeuiger','smeuigere','smeuigst','smeuigste','smeekbedes','smeekbrieven','smeekdichten','smeerbuiken','smeerklieren','smeerkwasten','smeerpijpen','smeltend','smerende','smerigs','smeerbare','smetvrije','smetteloost','smellekens','smeernippels','smeerkaasjes','smeersystemen','smeercampagnes'} |
--[[
A biome map (bm_*) collects a group of biomes from biome definition files (could be all from the
same or could be from different ones) and decides how to map them to the world surface.
A biome map provides a list of biomes, and a biome function that maps those biomes to the surface.
Like most biome maps, this one uses bf_generic.map_biome_to_surface for its biome function.
There are two primary biome map types. "MATRIX" and "VORONOI" this is an example of MATRIX.
MATRIX is very simple to implement, you just build a matrix and populate it with the biomes you
want. It gives you complete and easy control over what percentage of the world will be what biome.
The disadvantage is that it does not create as natural of a distribution as VORONOI, and your biomes
have to set up "alternate" lists of repalcement biomes if the primary biome is outside of its y
range.
this biome map combines biomes from bd_basic and bd_odd
--]]
bm_mixed_biomes={}
bm_mixed_biomes.name="bm basic biomes"
--bm_mixed_biomes.make_ocean_sand=true
bm_mixed_biomes.typ="MATRIX"
bm_mixed_biomes.heatrange=5
bm_mixed_biomes.humidrange=5
local arctic =realms.biome.basic_arctic --2
local cold =realms.biome.basic_cold --4
local warm =realms.biome.basic_warm --4
local hot =realms.biome.basic_hot --4
local desert =realms.biome.basic_desert --2
local crystal =realms.biome.odd_crystal --3
local mushroom=realms.biome.odd_mushroom --3
local scorched=realms.biome.odd_scorched --2
local golden =realms.biome.odd_golden --3
local rainbow =realms.biome.odd_rainbow --3
bm_mixed_biomes.biome={
{arctic , arctic , cold ,cold ,rainbow ,crystal },--+humid
{cold , cold , crystal ,crystal ,golden ,mushroom},
{warm , warm , warm ,golden ,mushroom ,mushroom},
{desert , scorched, warm ,rainbow ,hot ,hot },
{desert , scorched, golden ,rainbow ,hot ,hot }
} --+hot
--[[
bm_mixed_biomes.type="VORONOI"
bm_mixed_biomes.list={
{biome=arctic ,heatp=0.00, humidp=0.00}
{biome=cold ,heatp=0.20, humidp=0.20}
{biome=crystal ,heatp=0.35, humidp=0.35}
{biome=warm ,heatp=0.50, humidp=0.50}
{biome=mushroom ,heatp=0.30, humidp=0.80}
{biome=hot ,heatp=0.75, humidp=0.75}
{biome=scorched ,heatp=0.99, humidp=0.00}
{bbiome=desert,heatp=0.90, humidp=0.10}
}
--]]
realms.register_biomemap(bm_mixed_biomes)
--********************************
function bm_mixed_biomes.bm_mixed_biomes(parms)
bf_generic.map_biome_to_surface(parms,bm_mixed_biomes)
end -- bf_basic_biomes
realms.register_mapfunc("bm_mixed_biomes",bm_mixed_biomes.bm_mixed_biomes)
|
--
-- blat 36 modulefile
--
-- "URL: https://www.psc.edu/resources/software"
-- "Category: Biological Sciences"
-- "Description: BLAT produces two major classes of alignments (1) at the DNA level between two sequences that are of 95% or greater identity, but which may include large inserts; (2) at the protein or translated DNA level between sequences that are of 80% or greater identity and may also include large inserts."
-- "Keywords: singularity bioinformatics"
whatis("Name: BLAT")
whatis("Version: 36")
whatis("Category: Biological Sciences")
whatis("URL: https://www.psc.edu/resources/software")
whatis("Description: Blat produces two major classes of alignments (1) at the DNA level between two sequences that are of 95% or greater identity, but which may include large inserts; (2) at the protein or translated DNA level between sequences that are of 80% or greater identity and may also include large inserts.")
whatis("Keywords: singularity bioinformatics")
help([[
BLAT produces two major classes of alignments (1) at the DNA level between two sequences that are of 95% or greater identity, but which may include large inserts; (2) at the protein or translated DNA level between sequences that are of 80% or greater identity and may also include large inserts.
To load the module, type
> module load BLAT/36
To unload the module, type
> module unload BLAT/36
For help, type
> blat
Tools included in this module are
* blat
]])
local package = "BLAT"
local version = "36"
local base = pathJoin("/opt/packages",package,version)
prepend_path("PATH", base)
|
local t = require('luatest')
local g = t.group()
local http_lib = require('http.lib')
g.test_template = function()
t.assert_equals(http_lib.template("<% for i = 1, cnt do %> <%= abc %> <% end %>",
{abc = '1 <3>&" ', cnt = 3}),
' 1 <3>&" 1 <3>&" 1 <3>&" ',
"tmpl1")
t.assert_equals(http_lib.template("<% for i = 1, cnt do %> <%= ab %> <% end %>",
{abc = '1 <3>&" ', cnt = 3}),
' nil nil nil ', "tmpl2")
local r, msg = pcall(http_lib.template, "<% ab() %>", {ab = '1'})
t.assert(r == false and msg:match("call local 'ab'") ~= nil, "bad template")
-- gh-18: rendered tempate is truncated
local template = [[
<html>
<body>
<table border="1">
% for i,v in pairs(t) do
<tr>
<td><%= i %></td>
<td><%= v %></td>
</tr>
% end
</table>
</body>
</html>
]]
local tt = {}
for i=1, 100 do
tt[i] = string.rep('#', i)
end
local rendered = http_lib.template(template, { t = tt })
t.assert(#rendered > 10000, "rendered size")
t.assert_equals(rendered:sub(#rendered - 7, #rendered - 1), "</html>", "rendered eof")
end
g.test_parse_request = function()
t.assert_equals(http_lib._parse_request('abc'),
{ error = 'Broken request line', headers = {} }, 'broken request')
t.assert_equals(
http_lib._parse_request("GET / HTTP/1.1\nHost: s.com\r\n\r\n").path,
'/',
'path'
)
t.assert_equals(
http_lib._parse_request("GET / HTTP/1.1\nHost: s.com\r\n\r\n").proto,
{1,1},
'proto'
)
t.assert_equals(
http_lib._parse_request("GET / HTTP/1.1\nHost: s.com\r\n\r\n").headers,
{host = 's.com'},
'host'
)
t.assert_equals(
http_lib._parse_request("GET / HTTP/1.1\nHost: s.com\r\n\r\n").method,
'GET',
'method'
)
t.assert_equals(
http_lib._parse_request("GET / HTTP/1.1\nHost: s.com\r\n\r\n").query,
'',
'query'
)
end
g.test_params = function()
t.assert_equals(http_lib.params(), {}, 'nil string')
t.assert_equals(http_lib.params(''), {}, 'empty string')
t.assert_equals(http_lib.params('a'), {a = ''}, 'separate literal')
t.assert_equals(http_lib.params('a=b'), {a = 'b'}, 'one variable')
t.assert_equals(http_lib.params('a=b&b=cde'), {a = 'b', b = 'cde'}, 'some')
t.assert_equals(http_lib.params('a=b&b=cde&a=1'),
{a = { 'b', '1' }, b = 'cde'}, 'array')
end
|
local _, private = ...
if private.isClassic then return end
--[[ Lua Globals ]]
-- luacheck: globals
--[[ Core ]]
local Aurora = private.Aurora
local Base, Hook, Skin = Aurora.Base, Aurora.Hook, Aurora.Skin
local Color = Aurora.Color
do --[[ AddOns\Blizzard_TokenUI\Blizzard_TokenUI.lua ]]
function Hook.TokenFrame_Update()
local buttons = _G.TokenFrameContainer.buttons
if not buttons then return end
for i = 1, #buttons do
local button = buttons[i]
if button:IsShown() then
if button.isHeader then
Base.SetBackdrop(button, Color.button)
button.highlight:SetAlpha(0)
button._auroraMinus:Show()
button._auroraPlus:SetShown(not button.isExpanded)
button.stripe:Hide()
button.icon.bg:Hide()
else
button:SetBackdrop(nil)
local r, g, b = Color.highlight:GetRGB()
button.highlight:SetColorTexture(r, g, b, 0.2)
button.highlight:SetPoint("TOPLEFT", 1, 0)
button.highlight:SetPoint("BOTTOMRIGHT", -1, 0)
button._auroraMinus:Hide()
button._auroraPlus:Hide()
button.stripe:SetShown(button.index % 2 == 1)
button.icon.bg:Show()
end
end
end
end
end
do --[[ AddOns\Blizzard_TokenUI\Blizzard_TokenUI.xml ]]
function Skin.TokenButtonTemplate(Button)
local stripe = Button.stripe
stripe:SetPoint("TOPLEFT", 1, 1)
stripe:SetPoint("BOTTOMRIGHT", -1, -1)
Button.icon.bg = Base.CropIcon(Button.icon, Button)
Button.categoryMiddle:SetAlpha(0)
Button.categoryLeft:SetAlpha(0)
Button.categoryRight:SetAlpha(0)
Skin.FrameTypeButton(Button)
Button.expandIcon:SetTexture("")
local minus = Button:CreateTexture(nil, "ARTWORK")
minus:SetSize(7, 1)
minus:SetPoint("LEFT", 8, 0)
minus:SetColorTexture(1, 1, 1)
minus:Hide()
Button._auroraMinus = minus
local plus = Button:CreateTexture(nil, "ARTWORK")
plus:SetSize(1, 7)
plus:SetPoint("LEFT", 11, 0)
plus:SetColorTexture(1, 1, 1)
plus:Hide()
Button._auroraPlus = plus
end
function Skin.BackpackTokenTemplate(Button)
Base.CropIcon(Button.icon, Button)
Button.count:SetPoint("RIGHT", Button.icon, "LEFT", -2, 0)
end
end
function private.AddOns.Blizzard_TokenUI()
_G.hooksecurefunc("TokenFrame_Update", Hook.TokenFrame_Update)
_G.hooksecurefunc(_G.TokenFrameContainer, "update", Hook.TokenFrame_Update)
Skin.HybridScrollBarTemplate(_G.TokenFrame.Container.scrollBar)
local TokenFramePopup = _G.TokenFramePopup
Skin.SecureDialogBorderTemplate(TokenFramePopup.Border)
TokenFramePopup:SetSize(175, 90)
local titleText = _G.TokenFramePopupTitle
titleText:ClearAllPoints()
titleText:SetPoint("TOPLEFT")
titleText:SetPoint("BOTTOMRIGHT", TokenFramePopup, "TOPRIGHT", 0, -private.FRAME_TITLE_HEIGHT)
_G.TokenFramePopupCorner:Hide()
Skin.OptionsSmallCheckButtonTemplate(_G.TokenFramePopupInactiveCheckBox)
_G.TokenFramePopupInactiveCheckBox:SetPoint("TOPLEFT", TokenFramePopup, 24, -26)
Skin.OptionsSmallCheckButtonTemplate(_G.TokenFramePopupBackpackCheckBox)
_G.TokenFramePopupBackpackCheckBox:SetPoint("TOPLEFT", _G.TokenFramePopupInactiveCheckBox, "BOTTOMLEFT", 0, -8)
Skin.UIPanelCloseButton(_G.TokenFramePopupCloseButton)
if not private.disabled.bags then
local BackpackTokenFrame = _G.BackpackTokenFrame
BackpackTokenFrame:GetRegions():Hide()
local tokenBG = _G.CreateFrame("Frame", nil, BackpackTokenFrame)
Base.SetBackdrop(tokenBG, Color.frame)
tokenBG:SetBackdropBorderColor(0.15, 0.95, 0.15)
tokenBG:SetPoint("TOPLEFT", 5, -6)
tokenBG:SetPoint("BOTTOMRIGHT", -9, 8)
for i = 1, #BackpackTokenFrame.Tokens do
Skin.BackpackTokenTemplate(BackpackTokenFrame.Tokens[i])
end
end
end
|
function event_say(e)
if(e.message:findi("Hail")) then
e.self:Say("Greetings, " .. e.other:GetCleanName() .. ", Perhaps you've come to purchase some of my rare supplies? I have a special blend of eleven herbs and spices......oh wait.....I'm sold out of that......anyway. What can I do for you?");
elseif(e.message:findi("Vagnar") and e.other:GetFaction(e.self) < 6) then
e.self:Say("Vagnar? I don't recall.....Unless Vagnar was that shaman supposedly on some quest to save our entire race from total destruction..someone always on one of those. He bought some charms to ward of [Dragon kin]. He's most likely in the belly of some beast now.");
elseif(e.message:findi("Dragon kin") and e.other:GetFaction(e.self) < 6) then
e.self:Say("Yes he said he needed to steal secrets from the hated Sarnaks to aid him in his true quest. He said the sarnak know ways to cleanse the mind from intrusion, he would say no more.");
end
end
|
local gauntlet_data = require "gauntlet_data"
local BATTLE_STAGE_DEFS = {}
-- Taken from http://forums.therockManexezone.com/topic/8831451/1/
BATTLE_STAGE_DEFS.NUM_STAGES = 127
function BATTLE_STAGE_DEFS.is_lava_panel(x, y, battle_stage)
if battle_stage == 0x0B then
return
(x == 2 and y == 1) or
(x == 2 and y == 3) or
(x == 5 and y == 1) or
(x == 5 and y == 3)
elseif battle_stage == 0x0C then
return
(x == 1 and y == 1) or
(x == 1 and y == 3) or
(x == 3 and y == 1) or
(x == 3 and y == 3) or
(x == 4 and y == 1) or
(x == 4 and y == 3) or
(x == 6 and y == 1) or
(x == 6 and y == 3)
elseif battle_stage == 0x0D then
return
(x == 2 and y == 2) or
(x == 5 and y == 2)
elseif battle_stage == 0x5A then
return
(x == 1 and y == 2) or
(x == 1 and y == 3) or
(x == 3 and y == 2) or
(x == 4 and y == 2) or
(x == 6 and y == 1) or
(x == 6 and y == 2)
elseif battle_stage == 0x5B then
return
(x == 1 and y == 1) or
(x == 1 and y == 2) or
(x == 1 and y == 3) or
(x == 6 and y == 1) or
(x == 6 and y == 2) or
(x == 6 and y == 3)
elseif battle_stage == 0x5C then
return
(x == 2 and y == 3) or
(x == 3 and y == 2) or
(x == 3 and y == 3) or
(x == 4 and y == 2) or
(x == 4 and y == 3) or
(x == 5 and y == 3)
elseif battle_stage == 0x5D then
return
(x == 1 and y == 2) or
(x == 3 and y == 1) or
(x == 4 and y == 1) or
(x == 4 and y == 3)
elseif battle_stage == 0x5F then
return
(x == 1 and y == 1) or
(x == 2 and y == 3) or
(x == 6 and y == 2) or
(x == 6 and y == 3)
elseif battle_stage == 0x56 then
return
(x == 1 and y == 1) or
(x == 1 and y == 2) or
(x == 1 and y == 3) or
(x == 3 and y == 1) or
(x == 3 and y == 2) or
(x == 3 and y == 3) or
(x == 4 and y == 1) or
(x == 4 and y == 2) or
(x == 4 and y == 3) or
(x == 6 and y == 1) or
(x == 6 and y == 2) or
(x == 6 and y == 3)
elseif battle_stage == 0x57 then
return
(x == 2 and y == 1) or
(x == 2 and y == 2) or
(x == 2 and y == 3) or
(x == 3 and y == 1) or
(x == 3 and y == 2) or
(x == 3 and y == 3) or
(x == 4 and y == 1) or
(x == 4 and y == 2) or
(x == 4 and y == 3) or
(x == 5 and y == 1) or
(x == 5 and y == 2) or
(x == 5 and y == 3)
elseif battle_stage == 0x58 then
return
(x == 3 and y == 1) or
(x == 3 and y == 2) or
(x == 3 and y == 3) or
(x == 4 and y == 1) or
(x == 4 and y == 2) or
(x == 4 and y == 3)
elseif battle_stage == 0x59 then
return
(x == 2 and y == 3) or
(x == 3 and y == 2) or
(x == 3 and y == 3) or
(x == 4 and y == 1) or
(x == 4 and y == 2) or
(x == 5 and y == 1)
elseif battle_stage == 0x60 then
return
(x == 1 and y == 3) or
(x == 2 and y == 3) or
(x == 3 and y == 3) or
(x == 4 and y == 3) or
(x == 5 and y == 3) or
(x == 6 and y == 3)
elseif battle_stage == 0x61 then
return
(x == 1 and y == 1) or
(x == 1 and y == 2) or
(x == 2 and y == 1) or
(x == 5 and y == 3) or
(x == 6 and y == 2) or
(x == 6 and y == 3)
elseif battle_stage == 0x62 then
return
(x == 1 and y == 1) or
(x == 1 and y == 2) or
(x == 1 and y == 3) or
(x == 2 and y == 1) or
(x == 3 and y == 1) or
(x == 4 and y == 3) or
(x == 5 and y == 3) or
(x == 6 and y == 1) or
(x == 6 and y == 2) or
(x == 6 and y == 3)
elseif battle_stage == 0x63 then
return
(x == 2 and y == 3) or
(x == 3 and y == 1) or
(x == 5 and y == 3) or
(x == 6 and y == 2)
elseif battle_stage == 0x64 then
return
(x == 1 and y == 2) or
(x == 3 and y == 1) or
(x == 3 and y == 2) or
(x == 4 and y == 1) or
(x == 4 and y == 2) or
(x == 4 and y == 3)
elseif battle_stage == 0x65 then
return
(x == 1 and y == 1) or
(x == 3 and y == 2) or
(x == 3 and y == 3) or
(x == 4 and y == 2) or
(x == 4 and y == 3) or
(x == 6 and y == 1)
elseif battle_stage == 0x70 then
return
(x == 1 and y == 3) or
(x == 6 and y == 3)
end
return false
end
function BATTLE_STAGE_DEFS.is_poison_panel(x, y, battle_stage)
if battle_stage == 0x0A then
return
(x == 1 and y == 1) or
(x == 1 and y == 2) or
(x == 1 and y == 3) or
(x == 6 and y == 1) or
(x == 6 and y == 2) or
(x == 6 and y == 3)
elseif battle_stage == 0x4C then
return
(x == 2 and y == 1) or
(x == 3 and y == 1) or
(x == 3 and y == 2) or
(x == 4 and y == 2) or
(x == 4 and y == 3) or
(x == 5 and y == 3)
elseif battle_stage == 0x4D then
return
(x == 2 and y == 1) or
(x == 2 and y == 2) or
(x == 2 and y == 3) or
(x == 3 and y == 1) or
(x == 3 and y == 2) or
(x == 3 and y == 3) or
(x == 4 and y == 1) or
(x == 4 and y == 2) or
(x == 4 and y == 3) or
(x == 5 and y == 1) or
(x == 5 and y == 2) or
(x == 5 and y == 3)
elseif battle_stage == 0x4E then
return
(x == 1 and y == 2) or
(x == 1 and y == 3) or
(x == 2 and y == 2) or
(x == 2 and y == 3) or
(x == 5 and y == 1) or
(x == 5 and y == 2) or
(x == 6 and y == 1) or
(x == 6 and y == 2)
elseif battle_stage == 0x4F then
return
(x == 1 and y == 2) or
(x == 2 and y == 2) or
(x == 3 and y == 2) or
(x == 4 and y == 2) or
(x == 5 and y == 2) or
(x == 6 and y == 2)
elseif battle_stage == 0x5E then
return
((x == 2 and y == 2) or
(x == 5 and y == 2)) == false
elseif battle_stage == 0x08 then
return
(x == 2 and y == 2) or
(x == 3 and y == 1) or
(x == 3 and y == 2) or
(x == 3 and y == 3) or
(x == 4 and y == 1) or
(x == 4 and y == 2) or
(x == 4 and y == 3) or
(x == 5 and y == 2)
elseif battle_stage == 0x09 then
return
(x == 1 and y == 1) or
(x == 1 and y == 2) or
(x == 1 and y == 3) or
(x == 2 and y == 1) or
(x == 2 and y == 2) or
(x == 2 and y == 3) or
(x == 5 and y == 1) or
(x == 5 and y == 2) or
(x == 5 and y == 3) or
(x == 6 and y == 1) or
(x == 6 and y == 2) or
(x == 6 and y == 3)
elseif battle_stage == 0x50 then
return
(x == 1 and y == 3) or
(x == 2 and y == 1) or
(x == 3 and y == 2) or
(x == 4 and y == 1) or
(x == 4 and y == 3) or
(x == 6 and y == 2)
elseif battle_stage == 0x51 then
return
(x == 1 and y == 1) or
(x == 2 and y == 3) or
(x == 3 and y == 1) or
(x == 4 and y == 3) or
(x == 5 and y == 1) or
(x == 6 and y == 3)
elseif battle_stage == 0x52 then
return
(x == 1 and y == 3) or
(x == 2 and y == 2) or
(x == 6 and y == 1) or
(x == 6 and y == 2)
elseif battle_stage == 0x53 then
return
(x == 3 and y == 1) or
(x == 3 and y == 2) or
(x == 3 and y == 3) or
(x == 4 and y == 1) or
(x == 4 and y == 2) or
(x == 4 and y == 3)
elseif battle_stage == 0x54 then
return
(x == 2 and y == 1) or
(x == 2 and y == 2) or
(x == 5 and y == 2) or
(x == 5 and y == 3)
elseif battle_stage == 0x55 then
return
(x == 1 and y == 3) or
(x == 2 and y == 2) or
(x == 3 and y == 1) or
(x == 4 and y == 3) or
(x == 5 and y == 2) or
(x == 6 and y == 1)
end
return false
end
function BATTLE_STAGE_DEFS.random()
return gauntlet_data.math.random_named("BATTLE_DATA", 0, BATTLE_STAGE_DEFS.NUM_STAGES)
end
return BATTLE_STAGE_DEFS |
--
-- option.lua
-- Work with the list of registered options.
-- Copyright (c) 2002-2009 Jason Perkins and the Premake project
--
premake.option = { }
--
-- The list of registered options.
--
premake.option.list = { }
--
-- Register a new option.
--
-- @param opt
-- The new option object.
--
function premake.option.add(opt)
-- some sanity checking
local missing
for _, field in ipairs({ "description", "trigger" }) do
if (not opt[field]) then
missing = field
end
end
if (missing) then
error("option needs a " .. missing, 3)
end
-- add it to the master list
premake.option.list[opt.trigger] = opt
end
--
-- Retrieve an option by name.
--
-- @param name
-- The name of the option to retrieve.
-- @returns
-- The requested option, or nil if the option does not exist.
--
function premake.option.get(name)
return premake.option.list[name]
end
--
-- Iterator for the list of options.
--
function premake.option.each()
-- sort the list by trigger
local keys = { }
for _, option in pairs(premake.option.list) do
table.insert(keys, option.trigger)
end
table.sort(keys)
local i = 0
return function()
i = i + 1
return premake.option.list[keys[i]]
end
end
--
-- Validate a list of user supplied key/value pairs against the list of registered options.
--
-- @param values
-- The list of user supplied key/value pairs.
-- @returns
--- True if the list of pairs are valid, false and an error message otherwise.
--
function premake.option.validate(values)
for key, value in pairs(values) do
-- does this option exist
local opt = premake.option.get(key)
if (not opt) then
return false, "invalid option '" .. key .. "'"
end
-- does it need a value?
if (opt.value and value == "") then
return false, "no value specified for option '" .. key .. "'"
end
-- is the value allowed?
if opt.allowed then
local found = false
for _, match in ipairs(opt.allowed) do
if match[1] == value then
found = true
break
end
end
if not found then
return false, string.format("invalid value '%s' for option '%s'", value, key)
end
end
end
return true
end
|
io.stdout:setvbuf("no")
love.filesystem.load("libs/mini_core.lua")()
love.filesystem.load("libs/escena.lua")()
love.filesystem.load("libs/utf8.lua")()
love.filesystem.load('libs/ayowoki.lua')()
love.filesystem.load('libs/delepanto.lua')()
love.filesystem.load('libs/boton.lua')()
love.filesystem.load('libs/dialogo.lua')() --el dialogo requiere que definan una imagen para SCROLL_TOP_IMA, y SCROLL_BG_IMA abajo
flux = require "libs/flux"
ayo = Ayouwoki()
love.filesystem.load('libs/delepanto.lua')()
love.filesystem.load('textos.lua')()
love.window.setTitle("Before Losing")
love.window.setMode(1920/2,1080/2,{resizable=true}) --debug
--love.window.setMode(1920,1080,{resizable=true})
--love.graphics.setDefaultFilter( 'nearest', 'nearest', 1 )
--love.mouse.setVisible(false)
FULL_SCREEN = false --debug
--FULL_SCREEN = true
CANVAS = nil
local base_win_size_w = 1920
local base_win_size_h= 1080
--
SIZE_B_WIN_W = base_win_size_w
SIZE_B_WIN_H = base_win_size_h
--current window size...
SIZE_WIN_W = love.graphics.getWidth()
SIZE_WIN_H = love.graphics.getHeight()
IS_CHANGED_RESOLUTION = false
local old_factor = SIZE_WIN_H/(base_win_size_h)
function love.resize(w, h)
SIZE_WIN_H = h
SIZE_WIN_W = w
end
function getCanvasScaleFactor()
return SIZE_WIN_H/(base_win_size_h)
end
function getCanvasPadding()
return (SIZE_WIN_W-getCanvasScaleFactor()*base_win_size_w)/2
end
function getMouseOnWindowDrawArea()
local mx, my = love.mouse.getPosition()
local nx = mx-getCanvasPadding()
return nx, my
end
function getMouseOnCanvas()
local factor = SIZE_WIN_H/(base_win_size_h)
local x,y = getMouseOnWindowDrawArea()
return x/factor, y/factor
end
--this are chronometers
GARBAGE_TIMER = Chrono() -- one is used to call the garbaje collector
DRAW_TIMER = Chrono() --this one if for drawing the canvas ad a fixed rate
--this is a scena manager
--the main menu and each one of the examples is treated like a scene
SCENA_MANAGER = EscenaManager()
---TRIBUS STATUS
TRIBU_1_NAME = 'Kukao'
TRIBU_2_NAME = 'Pizu'
TRIBU_3_NAME = 'Walla'
--[[
ESTADOS TRIBUS
0 - no se ha hecho nada
1 - se ha ganado el ataque
2 - se perdio el ataque
3 - se gano diplomacia
4 - se perdio diplomacia
]]
TRIBUS = {}
TRIBUS[0]=0
TRIBUS[1]=0
TRIBUS[2]=0
MSC_MAIN_MENU = nil
MSC_MAP_MENU = nil
MSC_ATACK = nil
MSC_DERROTA = nil
MSC_EXITO = nil
MSC_TRB_MERCANTE = nil
MSC_TRB_GUERRERA = nil
MSC_TRB_PACIFICA = nil
GAUSIAN_BLURS = nil
FONT_BIG = nil
FONT = nil
FONT_SMALL = nil
FONT_SCROLL = nil
SCROLL_TOP_IMA = nil
SCROLL_BG_IMA = nil
KINGS_IMG_LIST = {}
KING_IMG = nil
VIDEO_CREDITS = nil
--- Black ink on paper!!!
function BlackBehaviour(char_dpl,font)
--set the start values
char_dpl.font_id_name = font
char_dpl.alpha = 0
char_dpl.scale = 1.0
char_dpl.cred = 0
char_dpl.cblue = 0
char_dpl.cgreen = 0
local easing_intro = nil
local easing_wait = nil
char_dpl.awake = function ()
char_dpl.alpha = 0.5
char_dpl.x = -1
char_dpl.y = -1
char_dpl.scale = 0.1-- 3
char_dpl.intro()
end
char_dpl.intro = function()
--ayo.new(char_dpl,0.5,{alpha=1,x=0,y=0}).setEasing('outSine')
--ayo.new(char_dpl,0.075,{scale=1}).setEasing('inQuad').onWait(char_dpl.wait)
easing_intro = ayo.new(char_dpl,0.05,{alpha=1, scale=1.2}).onEnd(char_dpl.wait)
end
char_dpl.wait = function()
--print('call next')
char_dpl.scale = 1
char_dpl.alpha = 1
char_dpl.x = 0
char_dpl.y = 0
char_dpl.callNextTrue()
easing_wait = ayo.new(char_dpl,0.5,{scale = 0.92}).setEasing('outSine').chain(0.3,{scale=1, alpha=0.8}).setEasing('inQuad')
end
char_dpl.outro = function()
if easing_intro then
easing_intro.cancel()
end
if easing_wait then
easing_wait.cancel()
end
ayo.new(char_dpl,0.2,{alpha=0,scale= 0.1})
end
return char_dpl
end
function love.load()
--we start here chronometers
--"iniciar" is spanish for "start"
--Why is on spanish?
love.window.setFullscreen( FULL_SCREEN )
GARBAGE_TIMER.iniciar()
DRAW_TIMER.iniciar()
--we set the canvas size to be a quarter of the size of the window
--love.graphics.setDefaultFilter("nearest", "nearest")
CANVAS = love.graphics.newCanvas(base_win_size_w,base_win_size_h)
--CANVAS:setFilter("nearest", "nearest")
FONT_SCROLL = love.graphics.newFont('/rcs/fonts/Old Story Bold.ttf',80)
FONT_SCROLL_SMALL = love.graphics.newFont('/rcs/fonts/Old Story Bold.ttf',60)
FONT_SCROLL_SMALL:setLineHeight(0.75)
FONT_SMALL = love.graphics.setNewFont(45)
FONT = love.graphics.setNewFont(60)
FONT_BIG = love.graphics.setNewFont(70)
love.graphics.setFont(FONT)
loadNewFontDLP('regular','/rcs/fonts/Old Story Bold.ttf',60,BlackBehaviour)
setFontFallback('regular')
--CURSOR = Cursor()
MSC_MAIN_MENU = love.audio.newSource('/rcs/music/menu.mp3','stream', true)
MSC_MAP_MENU = love.audio.newSource('/rcs/music/mapa.mp3','stream', true)
MSC_ATACK = love.audio.newSource('/rcs/music/ataque.mp3','stream', true)
MSC_DIPLOMACIA = love.audio.newSource('/rcs/music/diplomacia.mp3','stream', true)
MSC_DERROTA = love.audio.newSource('/rcs/music/derrota.mp3','stream', true)
MSC_EXITO = love.audio.newSource('/rcs/music/victoria_final.mp3','stream', true)
MSC_TRB_MERCANTE = love.audio.newSource('/rcs/music/tribu_mercante.mp3','stream', true)
MSC_TRB_GUERRERA = love.audio.newSource('/rcs/music/tribu_guerrera.mp3','stream', true)
MSC_TRB_PACIFICA = love.audio.newSource('/rcs/music/tribu_pacifica.mp3','stream', true)
MSC_MAIN_MENU:setLooping(true)
MSC_MAP_MENU:setLooping(true)
MSC_ATACK:setLooping(true)
MSC_DIPLOMACIA:setLooping(true)
MSC_DERROTA:setLooping(true)
MSC_EXITO:setLooping(true)
MSC_TRB_MERCANTE:setLooping(true)
MSC_TRB_GUERRERA:setLooping(true)
MSC_TRB_PACIFICA:setLooping(true)
SCROLL_TOP_IMA = love.graphics.newImage("/rcs/img/scroll_head.png")
SCROLL_BG_IMA = love.graphics.newImage("/rcs/img/scroll_body.png")
MINIGAME_BG_IMA = love.graphics.newImage('/rcs/img/minijuego_background.png')
KINGS_IMG_LIST[0] = love.graphics.newImage("/rcs/img/rey_circulo.png")
KINGS_IMG_LIST[1] = love.graphics.newImage("/rcs/img/rey_cuadrado.png")
KINGS_IMG_LIST[2] = love.graphics.newImage("/rcs/img/rey_triangulo.png")
KING_IMG = love.graphics.newImage("/rcs/img/rey_jugador.png")
VIDEO_CREDITS = love.graphics.newVideo("/rcs/video/making_of.ogg")
GAUSIAN_BLURS = love.graphics.newShader[[
// This is a reimplementation of some code I found in shadertoy
float Pi = 6.28318530718; // Pi*2
extern float Size = 2.0; // BLUR SIZE (Radius)
vec4 effect(vec4 color, Image tex, vec2 uv, vec2 screen_coords){
float Directions = 8.0; // BLUR DIRECTIONS (Default 16.0 - More is better but slower)
float Quality = 4.0; // BLUR QUALITY (Default 4.0 - More is better but slower)
vec2 Radius = vec2(Size/1920.0f,Size/1080.0f);
vec4 texturecolor = Texel(tex, uv);
for( float d=0.0; d<Pi; d+=Pi/Directions)
{
for(float i=1.0/Quality; i<=1.0; i+=1.0/Quality)
{
texturecolor += Texel(tex, uv+vec2(cos(d),sin(d))*Radius*i);
}
}
texturecolor /= Quality * Directions - 7.0;
texturecolor /= 1.2;
return texturecolor*color;
}
]]
local init_scene = love.filesystem.load("scenes/main_menu.lua")()
--local init_scene = love.filesystem.load("scenes/intro.lua")()
--local init_scene = love.filesystem.load("scenes/min_atack.lua")()
SCENA_MANAGER.push(init_scene,{1})
end
function love.update(dt)
--this is used to handle the resolution.
IS_CHANGED_RESOLUTION = (old_factor ~= getCanvasScaleFactor())
--loveframes.update(dt)
--[[
Here is some dark magic used to keep a consistent
update dt indepentend of the used hardware and framerate
as possible
--]]
local accum = dt
while accum > 0 do
local dt = math.min( 1/45, accum )
accum = accum - dt
SCENA_MANAGER.update(dt) --we update the scenes
--loveframes.update(dt) --update the gui
flux.update(dt)
ayo.update(dt)
--check for changes on the size of the window
if IS_CHANGED_RESOLUTION then
old_factor = getCanvasScaleFactor()
IS_CHANGED_RESOLUTION = false
end
end
--collencting the garbage each 5 seconds
if GARBAGE_TIMER.hanPasado(5) then
--print('recolector')
collectgarbage()
end
--love.audio.setVolume(0)
--gooi.update(dt)
end
function love.draw()
love.graphics.setCanvas{CANVAS,stencil=true}
SCENA_MANAGER.draw()
love.graphics.setCanvas()
love.graphics.setColor(1,1,1)
--we draw here the canvas scaled and draw
--to acount for the resize
local factor = SIZE_WIN_H/(base_win_size_h)
local x = (SIZE_WIN_W/2)-((base_win_size_w/2)*factor)
local y = (SIZE_WIN_H/2)-((base_win_size_h/2)*factor)
love.graphics.draw(CANVAS,x,y,0,factor,factor)
--GUI is draw on top of everything
--love.graphics.setColor(1,1,1,1)
--love.graphics.print("Current FPS: "..tostring(love.timer.getFPS( )), 10, 10)
--loveframes.draw()
end
--[[
Input functions, we pass their values directly to the handler and gui.
--]]
function love.mousepressed(x, y, button)
--loveframes.mousepressed(x, y, button)
--gooi.pressed()
SCENA_MANAGER.mousepressed(x, y, button)
--CURSOR.mousepressed()
end
function love.mousereleased(x, y, button)
--loveframes.mousereleased(x, y, button)
--gooi.released()
SCENA_MANAGER.mousereleased(x, y, button)
--CURSOR.mousereleased()
end
function love.wheelmoved(x, y)
--loveframes.wheelmoved(x, y)
end
function love.keyreleased( key, scancode )
--loveframes.keyreleased(key)
SCENA_MANAGER.keyreleased(key,scancode)
end
function love.keypressed(key,scancode, isrepeat)
if key == "escape" then
love.event.quit()
end
--loveframes.keypressed(key, isrepeat)
SCENA_MANAGER.keypressed(key,scancode)
if key == 'f11' then
FULL_SCREEN = not FULL_SCREEN
love.window.setFullscreen( FULL_SCREEN )
end
end
function love.mousemoved(x, y, dx, dy, istouch)
SCENA_MANAGER.mousemoved(x, y, dx,dy)
end
function love.wheelmoved( dx, dy )
SCENA_MANAGER.wheelmoved( dx, dy )
end
function love.textinput(text)
--loveframes.textinput(text)
end
function love.focus(f)
SCENA_MANAGER.focus(f)
end
|
workspace "RayTracerChallange"
configurations { "Debug", "Release" }
platforms {"x64"}
language "C++"
cppdialect "C++17"
targetdir "bin/%{cfg.buildcfg}"
location ("build/" .. _ACTION)
filter "action:vs*"
toolset "msc-ClangCL"
filter "platforms:x64"
architecture "x64"
filter { "configurations:Debug" }
defines { "DEBUG" }
symbols "On"
optimize "Off"
filter { "configurations:Release" }
defines { "NDEBUG" }
optimize "Full"
project "RayTracer"
kind "ConsoleApp"
files { "RayTracer/**.h", "RayTracer/**.cpp" }
links { "RayTracerLib" }
includedirs { "RayTracerLib/include" }
project "RayTracerTest"
kind "ConsoleApp"
files { "RayTracerTest/**.h", "RayTracerTest/**.cpp" }
links { "RayTracerLib" }
includedirs { "RayTracerLib/include", "ThirdParty/Catch2/include" }
project "RayTracerLib"
kind "StaticLib"
files { "RayTracerLib/include/RayTracerLib/**.h", "RayTracerLib/src/**.cpp" }
includedirs { "RayTracerLib/include" }
|
local skynet = require "skynet"
local socket = require "skynet.socket"
-- 简单echo服务
function echo(c_id, addr)
socket.start(c_id)
local str
while true do
str = socket.readline(c_id)
if str then
skynet.fork(function()
skynet.error("recv "..str)
skynet.sleep(math.random(1, 5)*100)
socket.write(c_id, string.upper(str).."\n")
end)
else
socket.close(c_id)
skynet.error(addr .. " disconnect")
return
end
end
end
function accept(c_id, addr)
skynet.error(addr .. "accepted")
skynet.fork(echo, c_id, addr)
end
-- 服务入口
skynet.start(function()
local addr = "0.0.0.0:8001"
skynet.error("listen " .. addr)
local l_id = socket.listen(addr)
assert(l_id)
socket.start(l_id, accept)
end)
|
local createEnum = import("../createEnum")
return createEnum("MouseBehavior", {
Default = 0,
LockCenter = 1,
LockCurrentPosition = 2,
}) |
-- MIT License
--
-- Copyright (c) Ruvann Beukes
--
-- 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.
--
-- Released on GitHub by Ruvann Beukes
obs = obslua
settings = {}
-- Script hook for defining the script description
function script_description()
return [[
Send a pushover notification on successful events in OBS Studio.
The Pushover notification "Title" is the current OBS Profile.
- Sound: Optional (E.g.: bike, magic, siren) - https://pushover.net/api#sounds
- Device: Name of device to receive the notification. Empty = All devices
- Priority: Optional (-2,-1,0,1,2 = Low, Moderate, Normal, High, Emergency). Default = Normal
- Emergency Priority Retry: How often (in seconds) the same notification will be sent. Min value of 30 or greater.
- Emergency Priority Expire: How many seconds the notification will continue to be retried for (every retry seconds). Max value of 10800 seconds (3 hours) or less.
]]
end
-- Script settings
function script_properties()
local props = obs.obs_properties_create()
obs.obs_properties_add_text(props, "user_key", "User Key", obs.OBS_TEXT_PASSWORD)
obs.obs_properties_add_text(props, "app_token", "App API Token", obs.OBS_TEXT_PASSWORD)
obs.obs_properties_add_int_slider(props, "priority", "Pushover Priority", -2, 2, 1)
obs.obs_properties_add_text(props, "sound", "Pushover Sound", obs.OBS_TEXT_DEFAULT)
obs.obs_properties_add_text(props, "device", "Pushover Device", obs.OBS_TEXT_DEFAULT)
obs.obs_properties_add_int(props, "retry", "Emergency Priority Retry", 30, 10800, 1)
obs.obs_properties_add_int(props, "expire", "Emergency Priority Expire", 0, 10800, 1)
obs.obs_properties_add_bool(props, "scene_change", "Scene Change")
obs.obs_properties_add_bool(props, "stream_started", "Stream Started")
obs.obs_properties_add_bool(props, "stream_stopped", "Stream Stopped")
obs.obs_properties_add_bool(props, "recording_started", "Recording Started")
obs.obs_properties_add_bool(props, "recording_stopped", "Recording Stopped")
obs.obs_properties_add_bool(props, "recording_paused", "Recording Paused")
obs.obs_properties_add_bool(props, "recording_unpaused", "Recording Unpaused")
obs.obs_properties_add_bool(props, "buffer_started", "Replay Buffer Started")
obs.obs_properties_add_bool(props, "buffer_stopped", "Replay Buffer Stopped")
obs.obs_properties_add_bool(props, "vcam_started", "Virtual Cam Started")
obs.obs_properties_add_bool(props, "vcam_stopped", "Virtual Cam Stopped")
obs.obs_properties_add_bool(props, "scene_col_changed", "Scene Collection Changed")
obs.obs_properties_add_bool(props, "profile_changed", "Profile Changed")
obs.obs_properties_add_bool(props, "program_exit", "Program Exit")
obs.obs_properties_add_bool(props, "studio_enabled", "Studio Mode Enabled")
obs.obs_properties_add_bool(props, "studio_disabled", "Studio Mode Disabled")
return props
end
-- Update settings
function script_update(_settings)
settings = _settings
end
function script_load(settings)
obs.obs_frontend_add_event_callback(handle_event)
end
-- Events to listen for and send notifications for
function handle_event(event)
obs.script_log(obs.LOG_INFO, event)
if (event == obs.OBS_FRONTEND_EVENT_SCENE_CHANGED) and
(obs.obs_data_get_bool(settings, "scene_change") == true) then
local scene_ref = obs.obs_frontend_get_current_scene()
local scene_name = obs.obs_source_get_name(scene_ref)
local message = "Scene change - " .. scene_name
pushover(message)
end
if (event == obs.OBS_FRONTEND_EVENT_STREAMING_STARTED) and
(obs.obs_data_get_bool(settings, "stream_started") == true) then
pushover("Streaming started")
end
if (event == obs.OBS_FRONTEND_EVENT_STREAMING_STOPPED) and
(obs.obs_data_get_bool(settings, "stream_stopped") == true) then
pushover("Streaming stopped")
end
if (event == obs.OBS_FRONTEND_EVENT_RECORDING_STARTED) and
(obs.obs_data_get_bool(settings, "recording_started") == true) then
pushover("Recording started")
end
if (event == obs.OBS_FRONTEND_EVENT_RECORDING_STOPPED) and
(obs.obs_data_get_bool(settings, "recording_stopped") == true) then
pushover("Recording stopped")
end
if (event == obs.OBS_FRONTEND_EVENT_RECORDING_PAUSED) and
(obs.obs_data_get_bool(settings, "recording_paused") == true) then
pushover("Recording paused")
end
if (event == obs.OBS_FRONTEND_EVENT_RECORDING_UNPAUSED) and
(obs.obs_data_get_bool(settings, "recording_unpaused") == true) then
pushover("Recording unpaused")
end
if (event == obs.OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTED) and
(obs.obs_data_get_bool(settings, "buffer_started") == true) then
pushover("Replay Buffer started")
end
if (event == obs.OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPED) and
(obs.obs_data_get_bool(settings, "buffer_stopped") == true) then
pushover("Replay Buffer stopped")
end
if (event == obs.OBS_FRONTEND_EVENT_VIRTUALCAM_STARTED) and
(obs.obs_data_get_bool(settings, "vcam_started") == true) then
pushover("Virtual Cam started")
end
if (event == obs.OBS_FRONTEND_EVENT_VIRTUALCAM_STOPPED) and
(obs.obs_data_get_bool(settings, "vcam_stopped") == true) then
pushover("Virtual Cam stopped")
end
if (event == obs.OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGED) and
(obs.obs_data_get_bool(settings, "scene_col_changed") == true) then
local scence_col_ref = obs.obs_frontend_get_current_scene_collection()
local scene_col_name = obs.obs_source_get_name(scence_col_ref)
local message = "Scene Collection change - " .. scene_col_name
pushover(message)
end
if (event == obs.OBS_FRONTEND_EVENT_PROFILE_CHANGED) and
(obs.obs_data_get_bool(settings, "profile_changed") == true) then
pushover("Profile changed")
end
if (event == obs.OBS_FRONTEND_EVENT_EXIT) and
(obs.obs_data_get_bool(settings, "program_exit") == true) then
pushover("Program is exiting")
end
if (event == obs.OBS_FRONTEND_EVENT_STUDIO_MODE_ENABLED) and
(obs.obs_data_get_bool(settings, "studio_enabled") == true) then
pushover("Studio Mode Enabled")
end
if (event == obs.OBS_FRONTEND_EVENT_STUDIO_MODE_DISABLED) and
(obs.obs_data_get_bool(settings, "studio_disabled") == true) then
pushover("Studio Mode Disabled")
end
end
function pushover(message)
local title = obs.obs_frontend_get_current_profile()
local sound = string.lower(obs.obs_data_get_string(settings, "sound"))
local device = obs.obs_data_get_string(settings, "device")
local user_key = obs.obs_data_get_string(settings, "user_key")
local app_token = obs.obs_data_get_string(settings, "app_token")
local priority = obs.obs_data_get_int(settings, "priority")
local retry = obs.obs_data_get_int(settings, "retry")
local expire = obs.obs_data_get_int(settings, "expire")
local command = 'curl --data "token=' .. app_token .. '&user=' .. user_key .. '&title=' .. title .. '&message=' .. message .. '&priority=' .. priority .. '&sound=' .. sound .. '&device=' .. device .. '" https://api.pushover.net/1/messages.json'
if priority == 2
then
--[[ If Retry is not altered after adding the script, "obs_properties_add_int" initially sets its value to 0.
Check added here to ensure a min value is correct otherwise curl fails]]
if retry < 30
then
retry = 30
end
command = 'curl --data "token=' .. app_token .. '&user=' .. user_key .. '&title=' .. title .. '&message=' .. message .. '&priority=' .. priority .. '&retry=' .. retry .. '&expire=' .. expire .. '&sound=' .. sound .. '&device=' .. device .. '" https://api.pushover.net/1/messages.json'
end
obs.script_log(obs.LOG_INFO, title .. ", " .. message)
obs.script_log(obs.LOG_INFO, command:gsub(user_key, "***"):gsub(app_token, "***"))
f = assert(io.popen(command))
for line in f:lines() do
obs.script_log(obs.LOG_INFO, line)
end
f:close()
end
|
--Is daygame worth it? A little model designed to find that out.
--Also, calculating the optimal number of approaches.
--TODO: Sources for nearly all of these numbers
--TODO: How often do people who do daygame sleep with their lays?
--Probably has quadratically diminishing returns on each time they have sex.
--A bit under minimum wage
hour_val=5
--Price of middle range quality prostitution+a sense of pride and accomplishment
prost_cost=250
pride_val=500
first_lay_val=prost_cost+pride_val
--How much a date costs (rough estimate)
date_cost=40
--The average number of dates before a lay
avg_dates=2
--The average length of a date (in hours) (total 7 hours for 2 dates, mystery's number)
date_len=3.5
--One every 15 minutes seems fair, but most experienced daygamers seem to do less?
appr_per_hour=4
--The definite upper limit seems to be 1 in 30 for professionals
--but for the average person not willing to travel for daygame,
--that seems a bit much
ratio_expert=0.02
--The general consensus seems to be 1 in 100 for beginners, but
--I've read reports of guys not getting any lays within the first ~200
--approaches.
ratio_beginner=0.005
function ratio(appr)
--grows to approximate the expert ratio, starting from the beginner ratio
return ratio_beginner+(ratio_expert-ratio_beginner)*(1-500/(appr+500))
end
function benefit(appr)
local lay_ratio=ratio(appr)
--positive side-effects of daygame of behavior
--it seems like those grow very slowly after an initial surge
local sideeff_val=200*math.log((appr+1)*0.2)
return first_lay_val*math.sqrt(lay_ratio*appr)+sideeff_val
end
function cost(appr)
--I could be working minimum wage!
local opportunity_cost=hour_val*appr/appr_per_hour
--mental cost is at first positive (the first approaches are very hard)
--then daygame becomes an enjoyable activity and the mental cost is negative
--i.e a benefit, but the enjoyment fades over time
local mental_cost=-(200*math.log((appr+100)*0.01))-200
--one can abuse the ratio to find out how many dates one will have to pay
--maybe a constant factor is not appropriate?
local date_ratio=3*ratio(appr)
local total_date_cost=date_ratio*date_cost*avg_dates
local date_opp_cost=date_ratio*date_len*avg_dates*hour_val
return opportunity_cost+mental_cost+total_date_cost+date_opp_cost
end
for i=1,10000 do
print((benefit(i)-cost(i)) .. ": " .. i)
end
|
-- видеоскрипт для запросов потоков Rezka по ID кинопоиска и IMDB (31/01/22)
-- nexterr, west_side
-- ## открывает подобные ссылки ##
-- https://voidboost.net/embed/1227967
-- https://voidboost.net/embed/tt0108778
-- ##
if m_simpleTV.Control.ChangeAddress ~= 'No' then return end
if not m_simpleTV.Control.CurrentAddress:match('^https?://voidboost%.net/.+')
then
return
end
local userAgent = 'Mozilla/5.0 (Windows NT 10.0; rv:96.0) Gecko/20100101 Firefox/96.0'
local session = m_simpleTV.Http.New(userAgent, proxy, false)
if not session then
showError('1')
return
end
m_simpleTV.Http.SetTimeout(session, 30000)
require 'playerjs'
local function imdbid(kpid)
local url_vn = decode64('aHR0cHM6Ly92aWRlb2Nkbi50di9hcGkvc2hvcnQ/YXBpX3Rva2VuPW9TN1d6dk5meGU0SzhPY3NQanBBSVU2WHUwMVNpMGZtJmtpbm9wb2lza19pZD0=') .. kpid
local rc5,answer_vn = m_simpleTV.Http.Request(session,{url=url_vn})
if rc5~=200 then
return '','',''
end
require('json')
answer_vn = answer_vn:gsub('(%[%])', '"nil"')
local tab_vn = json.decode(answer_vn)
if tab_vn and tab_vn.data and tab_vn.data[1] and tab_vn.data[1].imdb_id and tab_vn.data[1].imdb_id ~= 'null' and tab_vn.data[1].year then
return tab_vn.data[1].imdb_id or '', tab_vn.data[1].title or '',tab_vn.data[1].year:match('%d%d%d%d') or ''
elseif tab_vn and tab_vn.data and tab_vn.data[1] and ( not tab_vn.data[1].imdb_id or tab_vn.data[1].imdb_id ~= 'null') then
return '', tab_vn.data[1].title or '',tab_vn.data[1].year:match('%d%d%d%d') or ''
else return '','',''
end
end
local function bg_imdb_id(imdb_id)
local urld = 'https://api.themoviedb.org/3/find/' .. imdb_id .. decode64('P2FwaV9rZXk9ZDU2ZTUxZmI3N2IwODFhOWNiNTE5MmVhYWE3ODIzYWQmbGFuZ3VhZ2U9cnUmZXh0ZXJuYWxfc291cmNlPWltZGJfaWQ')
local rc5,answerd = m_simpleTV.Http.Request(session,{url=urld})
if rc5~=200 then
m_simpleTV.Http.Close(session)
return
end
require('json')
answerd = answerd:gsub('(%[%])', '"nil"')
local tab = json.decode(answerd)
local background, name_tmdb, year_tmdb = '', '', ''
if not tab and (not tab.movie_results[1] or tab.movie_results[1]==nil) and not tab.movie_results[1].backdrop_path or not tab and not (tab.tv_results[1] or tab.tv_results[1]==nil) and not tab.tv_results[1].backdrop_path then background = '' else
if tab.movie_results[1] then
background = tab.movie_results[1].backdrop_path or ''
name_tmdb = tab.movie_results[1].title or ''
year_tmdb = tab.movie_results[1].release_date or 0
name_tmdb = name_tmdb .. ' (' .. year_tmdb:match('(%d+)') .. ')'
elseif tab.tv_results[1] then
background = tab.tv_results[1].backdrop_path or ''
name_tmdb = tab.tv_results[1].name or ''
end
end
if background and background ~= nil and background ~= '' then background = 'http://image.tmdb.org/t/p/original' .. background end
if background == nil then background = '' end
return background, name_tmdb
end
local function getConfigVal(key)
return m_simpleTV.Config.GetValue(key,"LiteConf.ini")
end
local function setConfigVal(key,val)
m_simpleTV.Config.SetValue(key,val,"LiteConf.ini")
end
local proxy = ''
local background
local inAdr = m_simpleTV.Control.CurrentAddress
local imdb_id
local kp_id
if not m_simpleTV.User then
m_simpleTV.User = {}
end
if not m_simpleTV.User.Rezka then
m_simpleTV.User.Rezka = {}
end
m_simpleTV.User.Rezka.title = nil
m_simpleTV.User.Rezka.year = nil
if inAdr:match('/embed/')
then m_simpleTV.User.Rezka.embed = inAdr:match('/embed/(.-)$') m_simpleTV.User.Rezka.embed = m_simpleTV.User.Rezka.embed:gsub('%?.-$','')
elseif inAdr:match('%&embed=')
then m_simpleTV.User.Rezka.embed = inAdr:match('%&embed=(.-)$') inAdr = inAdr:gsub('%&embed=.-$','')
end
imdb_id = m_simpleTV.User.Rezka.embed:match('tt%d+')
if not imdb_id then kp_id = m_simpleTV.User.Rezka.embed:match('(%d+)') end
local title_v, year_v
if kp_id then imdb_id, title_v, year_v = imdbid(kp_id) end
local logo = 'https://static.hdrezka.ac/templates/hdrezka/images/avatar.png'
if imdb_id and imdb_id~='' and bg_imdb_id(imdb_id)~='' then
m_simpleTV.User.Rezka.background, m_simpleTV.User.Rezka.title = bg_imdb_id(imdb_id)
m_simpleTV.Control.ChangeChannelLogo(m_simpleTV.User.Rezka.background, m_simpleTV.Control.ChannelID, 'CHANGE_IF_NOT_EQUAL')
end
if not m_simpleTV.User.Rezka.title then
m_simpleTV.User.Rezka.title = title_v
end
if not m_simpleTV.User.Rezka.background or m_simpleTV.User.Rezka.background=='' then
m_simpleTV.Control.ChangeChannelLogo(logo, m_simpleTV.Control.ChannelID, 'CHANGE_IF_NOT_EQUAL')
end
m_simpleTV.Control.SetTitle(m_simpleTV.User.Rezka.title)
local function showError(str)
m_simpleTV.OSD.ShowMessageT({text = 'hdrezka ошибка: ' .. str, showTime = 5000, color = 0xffff1000, id = 'channelName'})
end
m_simpleTV.Control.ChangeAddress = 'Yes'
m_simpleTV.Control.CurrentAddress = ''
m_simpleTV.User.Rezka.DelayedAddress = nil
m_simpleTV.User.Rezka.ThumbsInfo = nil
local function rezkaGetStream(adr)
local rc, answer = m_simpleTV.Http.Request(session, {url = adr})
if rc ~= 200 then return end
return answer
end
local function rezkaIndex(t)
local lastQuality = tonumber(m_simpleTV.Config.GetValue('rezka_qlty') or 5000)
local index = #t
for i = 1, #t do
if t[i].qlty >= lastQuality then
index = i
break
end
end
if index > 1 then
if t[index].qlty > lastQuality then
index = index - 1
end
end
return index
end
local function GetRezkaAdr(urls)
local subt = urls:match("subtitle\':(.-)return pub")
-- debug_in_file(subt .. '\n')
if subt then
local s, j = {}, 1
for w in subt:gmatch('https.-%.vtt') do
s[j] = {}
s[j] = w
j = j + 1
end
subt = '$OPT:sub-track=0$OPT:input-slave=' .. table.concat(s, '#')
end
local t, i = {}, 1
local url = urls:match("file\'(:.-)return pub")
url = url:gsub(": ",''):gsub("'#",'#'):gsub("'\n.-$",'')
url = playerjs.decode(url, m_simpleTV.User.Rezka.playerjs_url)
local qlty, adr
for qlty, adr in url:gmatch('%[(.-)%](http.-) ') do
if not qlty:match('%d+') then break end
t[i] = {}
t[i].Address = adr
t[i].Name = qlty
t[i].qlty = tonumber(qlty:match('%d+'))
i = i + 1
end
if i == 1 then return end
table.sort(t, function(a, b) return a.qlty < b.qlty end)
for i = 1, #t do
t[i].Id = i
t[i].Address = t[i].Address:gsub('^https://', 'http://'):gsub(':hls:manifest%.m3u8', '') .. '$OPT:NO-STIMESHIFT$OPT:demux=mp4,any$OPT:http-referrer=https://rezka.ag/' .. (subt or '')
t[i].qlty = tonumber(t[i].Name:match('%d+'))
end
m_simpleTV.User.Rezka.Tab = t
local index = rezkaIndex(t)
return t[index].Address
end
local function time_ms(str)
local h,m,s,ms = str:match('(%d+)%:(%d+)%:(%d+).(%d+)')
ms = (tonumber(h)*60*60 + tonumber(m)*60 + tonumber(s))*1000
return ms
end
local function pars_thumb(thumb_url)
local rc, answer = m_simpleTV.Http.Request(session, {url = thumb_url})
if rc ~= 200 then
showError('4')
m_simpleTV.Http.Close(session)
return
end
local samplingFrequency, thumbWidth, thumbHeight = answer:match('%-%-%> (%d+%:%d+%:%d+.%d+)\n.-0%,0%,(%d+)%,(%d+)\n')
samplingFrequency = time_ms(samplingFrequency)
local t,i,k,j = {},1,1,1
for str in answer:gmatch('http.-\n') do
local adr = str:match('(https.-%.jpg)#')
if not adr then break end
t[j] = {}
if k == 26 then k = 1 end
if k == 1 then
t[j].url = adr
j=j+1
end
k=k+1
i=i+1
end
if m_simpleTV.Control.MainMode ~= 0 then return end
m_simpleTV.User.Rezka.ThumbsInfo = {}
m_simpleTV.User.Rezka.ThumbsInfo.samplingFrequency = samplingFrequency
m_simpleTV.User.Rezka.ThumbsInfo.thumbsPerImage = 25
m_simpleTV.User.Rezka.ThumbsInfo.thumbWidth = thumbWidth
m_simpleTV.User.Rezka.ThumbsInfo.thumbHeight = thumbHeight
m_simpleTV.User.Rezka.ThumbsInfo.urlPattern = t
if not m_simpleTV.User.Rezka.PositionThumbsHandler then
local handlerInfo = {}
handlerInfo.luaFunction = 'PositionThumbs_Rezka'
handlerInfo.regexString = ''
handlerInfo.sizeFactor = 0.20
handlerInfo.backColor = ARGB(255, 0, 0, 0)
handlerInfo.textColor = ARGB(240, 127, 255, 0)
handlerInfo.glowParams = 'glow="7" samples="5" extent="4" color="0xB0000000"'
handlerInfo.marginBottom = 0
handlerInfo.showPreviewWhileSeek = true
handlerInfo.clearImgCacheOnStop = false
handlerInfo.minImageWidth = 80
handlerInfo.minImageHeight = 45
m_simpleTV.User.Rezka.PositionThumbsHandler = m_simpleTV.PositionThumbs.AddHandler(handlerInfo)
end
end
local function tmdb_id(imdb_id)
local session = m_simpleTV.Http.New('Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0')
if not session then return end
m_simpleTV.Http.SetTimeout(session, 60000)
local urld = 'https://api.themoviedb.org/3/find/' .. imdb_id .. decode64('P2FwaV9rZXk9ZDU2ZTUxZmI3N2IwODFhOWNiNTE5MmVhYWE3ODIzYWQmbGFuZ3VhZ2U9cnUmZXh0ZXJuYWxfc291cmNlPWltZGJfaWQ')
local rc5,answerd = m_simpleTV.Http.Request(session,{url=urld})
if rc5~=200 then
m_simpleTV.Http.Close(session)
return
end
require('json')
answerd = answerd:gsub('(%[%])', '"nil"')
local tab = json.decode(answerd)
local tmdb_id, tv
if not tab and (not tab.movie_results[1] or tab.movie_results[1]==nil) and not tab.movie_results[1].backdrop_path or not tab and not (tab.tv_results[1] or tab.tv_results[1]==nil) and not tab.tv_results[1].backdrop_path then tmdb_id, tv = '', '' else
if tab.movie_results[1] then
tmdb_id, tv = tab.movie_results[1].id, 0
elseif tab.tv_results[1] then
tmdb_id, tv = tab.tv_results[1].id, 1
end
end
return tmdb_id, tv
end
function Perevod_rezka(translate, media, adr)
m_simpleTV.Control.ExecuteAction(36, 0)
local selected_tr = 0
local tr, k, istr = {}, 1, false
for w1 in translate:gmatch('<option.-</option>') do
tr[k]={}
local token, val, name = w1:match('<option data%-token="(.-)".-value="(.-)">(.-)</option>')
if w1:match('selected') then selected_tr = k-1 end
tr[k].Id = k
tr[k].Address = 'https://voidboost.net/' .. media .. '/' .. token .. '/iframe?h=voidboost.net'
if name == '-' then tr[k].Name = 'Оригинал' else tr[k].Name = name end
if media == 'movie' or media == 'serial' and name == 'Перевод' then istr = true end
k = k + 1
end
if istr == false then
tr[#tr+1] = {}
tr[#tr].Id = #tr
tr[#tr].Address = 'https://voidboost.net/embed/' .. m_simpleTV.User.Rezka.embed .. '?h=voidboost.net'
tr[#tr].Name = 'Перевод всех сезонов'
end
tr.ExtButton0 = {ButtonEnable = true, ButtonName = ' ⚙ ', ButtonScript = 'Qlty_rezka()'}
local ret, id = m_simpleTV.OSD.ShowSelect_UTF8('Перевод', selected_tr, tr, 5000, 1 + 4 + 2)
if m_simpleTV.User.Rezka.isVideo == false then
if m_simpleTV.User.Rezka.DelayedAddress then
m_simpleTV.Control.ExecuteAction(108)
else
m_simpleTV.Control.ExecuteAction(37)
end
else
m_simpleTV.Control.ExecuteAction(37)
end
if ret == 1 then
if media == 'movie' then
m_simpleTV.Control.SetNewAddress(tr[id].Address:gsub('h=voidboost%.net.-$','h=voidboost.net&embed=' .. m_simpleTV.User.Rezka.embed), m_simpleTV.Control.GetPosition())
elseif media == 'serial' then
local cur_season, cur_e
if adr then
cur_season, cur_e = adr:match('s=(%d+).-e=(%d+)')
local rc, test = m_simpleTV.Http.Request(session, {url = tr[id].Address:gsub('h=voidboost%.net.-$','s=' .. cur_season .. '&e=' .. cur_e .. '&h=voidboost.net')})
if rc ~= 200 then
m_simpleTV.OSD.ShowMessageT({text = tr[id].Name .. ': озвучка эпизода отсутствует', color = ARGB(255, 255, 255, 255), showTime = 1000 * 5})
Perevod_rezka(translate, media, adr)
else
m_simpleTV.Control.SetNewAddress(tr[id].Address:gsub('h=voidboost%.net.-$','s=' .. cur_season .. '&e=' .. cur_e .. '&h=voidboost.net&embed=' .. m_simpleTV.User.Rezka.embed), m_simpleTV.Control.GetPosition())
end
else
m_simpleTV.Control.SetNewAddress(tr[id].Address)
end
end
end
if ret == 2 then Qlty_rezka() end
end
function Season_rezka(season, episodes, Adr, translate)
m_simpleTV.Control.ExecuteAction(36, 0)
local s, k = {}, 1
for w1 in episodes:gmatch('"%d+":%[.-%]') do
s[k]={}
local ses, ep = w1:match('"(%d+)":%[.-(%d+)')
s[k].Id = k
s[k].Address = Adr:gsub('%?h=.-$',''):gsub('%?s=.-$','') .. '?s=' .. ses .. '&e=' .. ep .. '&h=voidboost.net&embed=' .. m_simpleTV.User.Rezka.embed
s[k].Name = 'Сезон ' .. ses
if tonumber(ses) == tonumber(season) then selected_season = k-1 end
k = k + 1
end
s.ExtButton0 = {ButtonEnable = true, ButtonName = ' ⚙ ', ButtonScript = 'Qlty_rezka()'}
s.ExtButton1 = {ButtonEnable = true, ButtonName = ' 🔊 ', ButtonScript = 'Perevod_rezka(\'' .. m_simpleTV.Common.multiByteToUTF8(translate) .. '\', \'' .. 'serial' .. '\')'}
local ret, id = m_simpleTV.OSD.ShowSelect_UTF8('Сезон', selected_season, s, 5000, 1 + 4 + 2)
if m_simpleTV.User.Rezka.isVideo == false then
if m_simpleTV.User.Rezka.DelayedAddress then
m_simpleTV.Control.ExecuteAction(108)
else
m_simpleTV.Control.ExecuteAction(37)
end
else
m_simpleTV.Control.ExecuteAction(37)
end
if ret == 1 then
m_simpleTV.Control.SetNewAddress(s[id].Address)
end
if ret == 2 then Qlty_rezka() end
if ret == 3 then Perevod_rezka(m_simpleTV.Common.multiByteToUTF8(translate), 'serial') end
end
function OnMultiAddressOk_rezka(Object, id)
if id == 0 then
OnMultiAddressCancel_rezka(Object)
else
m_simpleTV.User.rezka.DelayedAddress = nil
end
end
function OnMultiAddressCancel_rezka(Object)
if m_simpleTV.User.Rezka.DelayedAddress then
local state = m_simpleTV.Control.GetState()
if state == 0 then
m_simpleTV.Control.SetNewAddress(m_simpleTV.User.Rezka.DelayedAddress)
end
m_simpleTV.User.Rezka.DelayedAddress = nil
end
m_simpleTV.Control.ExecuteAction(36, 0)
end
function Qlty_rezka()
m_simpleTV.Control.ExecuteAction(36, 0)
local t = m_simpleTV.User.Rezka.Tab
if not t then return end
local index = rezkaIndex(t)
t.ExtButton1 = {ButtonEnable = true, ButtonName = '✕', ButtonScript = 'm_simpleTV.Control.ExecuteAction(37)'}
if getConfigVal('info/scheme') then
t.ExtButton0 = {ButtonEnable = true, ButtonName = ' Info ', ButtonScript = ''}
end
local ret, id = m_simpleTV.OSD.ShowSelect_UTF8('⚙ Качество', index - 1, t, 5000, 1 + 4 + 2)
if m_simpleTV.User.Rezka.isVideo == false then
if m_simpleTV.User.Rezka.DelayedAddress then
m_simpleTV.Control.ExecuteAction(108)
else
m_simpleTV.Control.ExecuteAction(37)
end
else
m_simpleTV.Control.ExecuteAction(37)
end
if ret == 1 then
m_simpleTV.Control.SetNewAddress(t[id].Address, m_simpleTV.Control.GetPosition())
m_simpleTV.Config.SetValue('rezka_qlty', t[id].qlty)
end
if ret == 2 then
if getConfigVal('info/scheme') == 'EXFS' then media_info(getConfigVal('info/media')) end
if getConfigVal('info/scheme') == 'TMDB' then media_info_tmdb(tmdb_id(getConfigVal('info/imdb'))) end
if getConfigVal('info/scheme') == 'Rezka' then media_info_rezka(getConfigVal('info/Rezka')) end
end
end
function PositionThumbs_Rezka(queryType, address, forTime)
if queryType == 'testAddress' and m_simpleTV.User.Rezka and m_simpleTV.User.Rezka.ThumbsInfo and m_simpleTV.User.Rezka.ThumbsInfo ~= nil then
if string.match(address, "voidboost%.net")
or string.match(address, "kinopoisk%.")
or string.match(address, "^*")
or string.match(address, "imdb%.")
then return true end
return false
end
if queryType == 'getThumbs' then
if not m_simpleTV.User.Rezka.ThumbsInfo or m_simpleTV.User.Rezka.ThumbsInfo == nil then
return false
end
local imgLen = m_simpleTV.User.Rezka.ThumbsInfo.samplingFrequency * m_simpleTV.User.Rezka.ThumbsInfo.thumbsPerImage
local index = math.floor(forTime / imgLen)
local t = {}
t.playAddress = address
t.url = m_simpleTV.User.Rezka.ThumbsInfo.urlPattern[index+1].url
t.httpParams = {}
t.httpParams.extHeader = 'referer:' .. address
t.elementWidth = m_simpleTV.User.Rezka.ThumbsInfo.thumbWidth
t.elementHeight = m_simpleTV.User.Rezka.ThumbsInfo.thumbHeight
t.startTime = index * imgLen
t.length = imgLen
t.elementsPerImage = m_simpleTV.User.Rezka.ThumbsInfo.thumbsPerImage
t.marginLeft = 0
t.marginRight = 3
t.marginTop = 0
t.marginBottom = 0
m_simpleTV.PositionThumbs.AppendThumb(t)
return true
end
end
local function play(adr, title)
local retAdr = rezkaGetStream(adr)
retAdr = GetRezkaAdr(retAdr)
if not retAdr then
m_simpleTV.Control.CurrentAddress = 'http://wonky.lostcut.net/vids/error_getlink.avi'
showError('3')
return
end
m_simpleTV.Control.CurrentAddress = retAdr
-- debug_in_file(retAdr .. '\n')
end
m_simpleTV.User.Rezka.isVideo = nil
m_simpleTV.User.Rezka.titleTab = nil
local title
if m_simpleTV.User.Rezka.title then
title = m_simpleTV.User.Rezka.title:gsub(' %(Сезон.-$','')
else
title = m_simpleTV.Control.CurrentTitle_UTF8:gsub(' %(Сезон.-$','')
end
if title == '' then title = title_v .. ', ' .. year_v end
local rc, answer = m_simpleTV.Http.Request(session, {url = inAdr})
if rc ~= 200 then
showError('4')
m_simpleTV.Http.Close(session)
return
end
if answer:match('<select name="season".-</select>') and not inAdr:match('%?s=') then
local episodes = answer:match('var seasons_episodes = %{(.-)%}')
local first_season, first_episodes = episodes:match('"(%d+)":%[.-(%d+)')
m_simpleTV.Control.ChangeAdress = 'Yes'
m_simpleTV.Control.SetNewAddress(inAdr:gsub('%?h=.-$','') .. '?s=' .. first_season .. '&e=' .. first_episodes .. '&h=voidboost.net&embed=' .. m_simpleTV.User.Rezka.embed)
return
end
if m_simpleTV.Control.MainMode == 0 and m_simpleTV.User.Rezka.background then
m_simpleTV.Interface.SetBackground({BackColor = 0, PictFileName = m_simpleTV.User.Rezka.background, TypeBackColor = 0, UseLogo = 3, Once = 1})
end
if m_simpleTV.Control.MainMode == 0 and not m_simpleTV.User.Rezka.background then
m_simpleTV.Interface.SetBackground({BackColor = 0, PictFileName = logo, TypeBackColor = 0, UseLogo = 1, Once = 1})
end
m_simpleTV.Control.SetTitle(title)
local playerjs_url = answer:match('src="([^"]+/playerjsdev[^"]+)')
if not playerjs_url then return end
m_simpleTV.User.Rezka.playerjs_url = playerjs_url
local translate = answer:match('<select name="translator".-</select>')
local thumb_url = answer:match("thumbnails\': \'(.-)\'")
if thumb_url and thumb_url ~= ''
then
thumb_url = 'https://voidboost.net' .. thumb_url
pars_thumb(thumb_url)
end
cur_translate = translate:match('selected=.->(.-)<') or 'Перевод'
if not answer:match('<select name="season".-</select>') then
local retAdr = inAdr
local t = {}
t[1] = {}
t[1].Id = 1
t[1].Name = title
t.ExtButton0 = {ButtonEnable = true, ButtonName = ' ⚙ ', ButtonScript = 'Qlty_rezka()'}
if translate then
title = title .. ' - ' .. cur_translate
m_simpleTV.Control.CurrentTitle_UTF8 = title
t.ExtButton1 = {ButtonEnable = true, ButtonName = ' 🔊 ', ButtonScript = 'Perevod_rezka(\'' .. m_simpleTV.Common.multiByteToUTF8(translate) .. '\', \'' .. 'movie' .. '\', \'' .. retAdr .. '\')'}
end
m_simpleTV.OSD.ShowSelect_UTF8('HDrezka' .. ' (' .. cur_translate .. ')', 0, t, 8000, 32 + 64 + 128)
else
local retAdr = inAdr
local season = answer:match('<select name="season".-</select>') or ''
local episodes = answer:match('var seasons_episodes = %{(.-)%}') or ''
local ep_in_season = answer:match('<select name="episode".-</select>') or ''
if not inAdr:match('%?s=') then
cur_season, cur_episodes = episodes:match('"(%d+)":%[.-(%d+)')
else
cur_season = season:match('<option value="(%d+)" selected') or 1
cur_episodes = ep_in_season:match('<option value="(%d+)" selected') or 1
end
local t,i = {},1
for w in ep_in_season:gmatch('<option.-</option>') do
local ep, ep_name = w:match('<option value="(%d+)".->(.-)</option>')
t[i] = {}
t[i].Id = i
t[i].Name = ep_name
if tonumber(ep) == tonumber(cur_episodes) then play_ep = i - 1 end
t[i].Address = inAdr:gsub('%?h=.-$',''):gsub('%?s=.-$','') .. '?s=' .. cur_season .. '&e=' .. ep .. '&h=voidboost.net&embed=' .. m_simpleTV.User.Rezka.embed
i = i + 1
end
m_simpleTV.User.Rezka.titleTab = t
t.ExtButton0 = {ButtonEnable = true, ButtonName = ' 🔊 ', ButtonScript = 'Perevod_rezka(\'' .. m_simpleTV.Common.multiByteToUTF8(translate) .. '\', \'' .. 'serial' .. '\', \'' .. retAdr .. '\')'}
t.ExtButton1 = {ButtonEnable = true, ButtonName = ' Сезоны ', ButtonScript = 'Season_rezka(\'' .. cur_season .. '\', \'' .. episodes .. '\', \'' .. retAdr .. '\', \'' .. translate .. '\')'}
m_simpleTV.OSD.ShowSelect_UTF8('Сезон ' .. cur_season .. ', ' .. cur_translate, play_ep, t, 8000, 32 + 64)
retAdr = inAdr:gsub('%?h=.-$',''):gsub('%?s=.-$','') .. '?s=' .. cur_season .. '&e=' .. cur_episodes .. '&h=voidboost.net&embed=' .. m_simpleTV.User.Rezka.embed
retAdr = rezkaGetStream(retAdr)
retAdr = GetRezkaAdr(retAdr)
title = title .. ' (Сезон ' .. cur_season .. ', Серия ' .. cur_episodes .. ') - ' .. cur_translate
inAdr = retAdr
m_simpleTV.Control.CurrentTitle_UTF8 = title
m_simpleTV.OSD.ShowMessageT({text = title, color = 0xff9999ff, showTime = 1000 * 5, id = 'channelName'})
m_simpleTV.Control.ChangeAdress = 'Yes'
m_simpleTV.Control.CurrentAddress = inAdr
return
end
play(inAdr, title) |
--[[
seq_logger, created by Nathan C (Era#1337)
Version: 1.0
seq_logger is a logging framework that can send events to Seq (https://datalust.co/seq),
a powerful logging aggregation tool.
PLEASE READ README.md AND IMPORTANT CONFIGURATION BEFORE USING.
MIT License
Copyright (c) 2020 Nathan C
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.
]]
-- DO NOT EDIT ANYTHING BELOW UNLESS YOU KNOW WHAT ARE DOING
-- Want to contribute? Fork me: (https://github.com/nathanctech/fivem_seqlogger)
local currentVersion = "1.0"
local doVersionCheck = GetConvar("seq.versioncheck", true)
local versionUrl = "https://github.com/nathanctech/fivem_seqlogger/blob/master/version.txt"
Citizen.CreateThread(function()
Wait(0)
if doVersionCheck then
PerformHttpRequest(versionUrl, function(errorCode, result, headers)
if result ~= nil then
if tostring(result) ~= currentVersion then
print("[seq_logger] An update is available! Pull new version or visit https://github.com/nathanctech/fivem_seqlogger.")
end
end
end, "GET")
end
end) |
slot0 = class("WSPortLeft", import("...BaseEntity"))
slot0.Fields = {
map = "table",
rtVanguard = "userdata",
rtFleet = "userdata",
gid = "number",
rtShip = "userdata",
transform = "userdata",
rtBG = "userdata",
rtMain = "userdata",
fleet = "table"
}
slot0.Listeners = {
onUpdateSelectedFleet = "OnUpdateSelectedFleet",
onUpdateShip = "OnUpdateShip"
}
slot0.Setup = function (slot0)
pg.DelegateInfo.New(slot0)
slot0:Init()
end
slot0.Dispose = function (slot0)
slot0:RemoveMapListener()
pg.DelegateInfo.Dispose(slot0)
slot0:Clear()
end
slot0.Init = function (slot0)
slot0.rtBG = slot0.transform.Find(slot1, "bg")
slot0.rtFleet = slot0.rtBG:Find("fleet")
slot0.rtMain = slot0.rtFleet:Find("main")
slot0.rtVanguard = slot0.rtFleet:Find("vanguard")
slot0.rtShip = slot0.rtFleet:Find("shiptpl")
setActive(slot0.rtShip, false)
end
slot0.UpdateMap = function (slot0, slot1)
if slot0.map ~= slot1 or slot0.gid ~= slot1.gid then
slot0:RemoveMapListener()
slot0.map = slot1
slot0.gid = slot1.gid
slot0:AddMapListener()
slot0:OnUpdateSelectedFleet()
end
end
slot0.AddMapListener = function (slot0)
if slot0.map then
slot0.map:AddListener(WorldMap.EventUpdateFIndex, slot0.onUpdateSelectedFleet)
end
end
slot0.RemoveMapListener = function (slot0)
if slot0.map then
slot0.map:RemoveListener(WorldMap.EventUpdateFIndex, slot0.onUpdateSelectedFleet)
slot0:RemoveFleetListener(slot0.fleet)
end
end
slot0.AddFleetListener = function (slot0, slot1)
if slot1 then
_.each(slot1:GetShips(true), function (slot0)
slot0:AddListener(WorldMapShip.EventHpRantChange, slot0.onUpdateShip)
end)
end
end
slot0.RemoveFleetListener = function (slot0, slot1)
if slot1 then
_.each(slot1:GetShips(true), function (slot0)
slot0:RemoveListener(WorldMapShip.EventHpRantChange, slot0.onUpdateShip)
end)
end
end
slot0.OnUpdateSelectedFleet = function (slot0)
if slot0.fleet ~= slot0.map:GetFleet() then
slot0:RemoveFleetListener(slot0.fleet)
slot0.fleet = slot1
slot0:AddFleetListener(slot0.fleet)
slot0:UpdateShipList(slot0.rtMain, slot0.fleet:GetTeamShipVOs(TeamType.Main, true))
slot0:UpdateShipList(slot0.rtVanguard, slot0.fleet:GetTeamShipVOs(TeamType.Vanguard, true))
end
end
slot0.OnUpdateShip = function (slot0, slot1, slot2)
if slot0.map:GetFleet(slot2.fleetId).GetFleetType(slot3) == FleetType.Normal then
slot0:UpdateShipList(slot0.rtMain, slot0.fleet:GetTeamShipVOs(TeamType.Main, true))
slot0:UpdateShipList(slot0.rtVanguard, slot0.fleet:GetTeamShipVOs(TeamType.Vanguard, true))
elseif slot4 == FleetType.Submarine then
slot0:UpdateShipList(slot0.rtSubmarine, slot0.submarineFleet:GetTeamShipVOs(TeamType.Submarine, true))
end
end
slot0.UpdateShipList = function (slot0, slot1, slot2)
slot3 = UIItemList.New(slot1, slot0.rtShip)
slot3:make(function (slot0, slot1, slot2)
if slot0 == UIItemList.EventUpdate then
updateShip(slot2, slot3)
slot5 = findTF(slot2, "HP_POP")
setActive(slot5, true)
setActive(findTF(slot5, "heal"), false)
setActive(findTF(slot5, "normal"), false)
setActive(slot7, not not WorldConst.FetchWorldShip(slot0[slot1 + 1].id).IsHpSafe(slot4))
setActive(slot8, slot9)
findTF(slot2, "blood"):GetComponent(typeof(Slider)).fillRect = (not WorldConst.FetchWorldShip(slot0[slot1 + 1].id).IsHpSafe(slot4) and slot8) or slot7
setSlider(slot6, 0, 10000, slot4.hpRant)
setActive(findTF(slot2, "blood").GetComponent(typeof(Slider)), slot9)
setActive(slot2:Find("broken"), slot4:IsBroken())
end
end)
slot3.align(slot3, #slot2)
end
return slot0
|
-----------------------------------------------
--- LDB:Init(): Initialize registry tables and metatable function closures.
--
function LibDataBroker.Init(lib)
-- One dataobject metatable (domt) for all dataobjects. Versions: 1 <= MINOR <= 4
lib.domt = lib.domt or {}
local domt = lib.domt
domt.NOTE = lib.MetaTableNote
-- Upvalues for __index and __newindex().
local attributestorage, namestorage, callbacks = lib.attributestorage, lib.namestorage, lib.callbacks
-- Since MINOR = 5 `attributestorage[dataobj]` is never nil. It exists from :NewDataObject(name, dataobj) until :RemoveDataObject(dataobj).
domt.__index = function(dataobj, key)
return attributestorage[dataobj][key]
-- return (attributestorage[dataobj] or dataobj)[key]
end
--- __newindex(dataobj, key, value): Triggered by changing a field/attribute/property on a dataobject.
-- This is achieved by intentionally keeping the dataobject as an empty proxy table.
domt.__newindex = function(dataobj, key, value)
local attributes = attributestorage[dataobj]
-- if not attributes then lib:LostDataObject(dataobj, key, value) ; return end
if attributes[key] == value then return end
attributes[key] = value
local name = namestorage[dataobj] or "?"
local callbacks = callbacks
callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value, dataobj)
callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value, dataobj)
callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value, dataobj)
-- This is the order since MINOR = 1, tho "__key" might be preferable before "_name" as it is more generic.
callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value, dataobj)
end
-- The functions in `lib.domt` keep copies of `lib.attributestorage, lib.namestorage, lib.callbacks` in upvalues,
-- therefore those fields cannot be changed without regenerating the functions by another call to lib:Init().
-- This restriction can be lifted for the price of +1 `lib.` lookup in __index() and +3 lookup in __newindex().
end -- LibDataBroker.Init(lib)
|
return{
Name="DragonEngine.ListModules",
Aliases={"de.listmod"},
Description="Dispalys a list of currently loaded modules.",
Group="DefaultAdmin",
Args={},
Run=function(Context)
Context:Reply(string.format("%-24s│ %-24s","Module Name","Module Type"))
Context:Reply(string.rep("▬",48))
for ModuleName,_ in pairs(shared.DragonEngine.Modules) do
Context:Reply(string.format("%-24s| %-24s",ModuleName,"N/A"))
Context:Reply(string.rep("-",48))
end
return "All modules listed."
end
} |
local hsl = require('lib.hsl')
local map
local function staleViewStencil()
local w, h = map.tile_width, map.tile_height
local seen = map.seen
for y=1,map.grid_height do
for x=1,map.grid_width do
if seen[y][x] then
g.rectangle('fill', (x - 1) * w, (y - 1) * h, w, h)
end
end
end
end
local function activeViewStencil()
local gx, gy = map.player:gridPosition()
local px, py = map:toPixel(gx, gy)
local w, h = map.tile_width, map.tile_height
if game.area_based_detection then
g.rectangle('fill', px - w * 2, py, w * 5, h)
g.rectangle('fill', px, py - h * 2, w, h * 5)
g.rectangle('fill', px - w, py - h, w * 3, h * 3)
else
g.rectangle('fill', 0, py, w * map.grid_width, h)
g.rectangle('fill', px, 0, w, h * map.grid_height)
end
end
return function(mapToRender)
map = mapToRender
if game.use_grayscale then g.setShader(game.grayscale.instance) end
if not game.debug then
g.stencil(staleViewStencil, 'replace', 1)
g.setStencilTest('greater', 0)
g.setColor(hsl(0, 1, 0.5 + math.sin(game.t) * 0.1))
g.draw(map.batch)
g.setStencilTest('equal', 0)
g.setColor(255, 255, 255)
g.push('all')
game.obscuring_mesh_shader:send('grid_dimensions', {map.grid_width, map.grid_height})
g.setShader(game.obscuring_mesh_shader.instance)
g.draw(map.obscuring_mesh)
g.pop()
g.setColor(255, 255, 255)
g.stencil(activeViewStencil, 'replace', 1)
g.setStencilTest('greater', 0)
end
g.draw(map.batch)
g.setShader()
for i,v in ipairs(map.enemies) do
v:draw()
end
if map.end_node then
local x, y = map:toPixel(map.end_node.x + 0.5, map.end_node.y + 0.5)
local w, h = map.tile_width, map.tile_height
g.draw(game.goal_texture, game.goal_body_quad, x, y, game.t, 1, 1, 16, 16)
g.setColor(100, 255, 50)
g.draw(game.goal_texture, game.goal_alpha_quad, x, y, game.t, 1, 1, 16, 16)
end
g.setStencilTest()
end
|
local PANEL = {}
AccessorFunc( PANEL, "m_iSelectedNumber", "SelectedNumber" )
Derma_Install_Convar_Functions( PANEL )
function PANEL:Init()
self:SetSelectedNumber( 0 )
self:SetSize( 60, 30 )
end
function PANEL:UpdateText()
local str = input.GetKeyName( self:GetSelectedNumber() )
if ( !str ) then str = "NONE" end
str = language.GetPhrase( str )
self:SetText( str )
end
function PANEL:DoClick()
self:SetText( "PRESS A KEY" )
input.StartKeyTrapping()
self.Trapping = true
end
function PANEL:DoRightClick()
self:SetText( "NONE" )
self:SetValue( 0 )
end
function PANEL:SetSelectedNumber( iNum )
self.m_iSelectedNumber = iNum
self:ConVarChanged( iNum )
self:UpdateText()
self:OnChange( iNum )
end
function PANEL:Think()
if ( input.IsKeyTrapping() && self.Trapping ) then
local code = input.CheckKeyTrapping()
if ( code ) then
if ( code == KEY_ESCAPE ) then
self:SetValue( self:GetSelectedNumber() )
else
self:SetValue( code )
end
self.Trapping = false
end
end
self:ConVarNumberThink()
end
function PANEL:SetValue( iNumValue )
self:SetSelectedNumber( iNumValue )
end
function PANEL:GetValue()
return self:GetSelectedNumber()
end
function PANEL:OnChange()
end
derma.DefineControl( "DBinder", "", PANEL, "DButton" )
|
local tostring, tonumber, select, type, getmetatable, setmetatable, rawget = tostring, tonumber, select, type, getmetatable, setmetatable, rawget
local Types = require('types')
local Any, Array = Types.Any, Types.Array
local OMeta = require('ometa')
local utils = require('utils')
local asc = require('abstractsyntax_commons')
local Literal, NilLiteral, BooleanLiteral, NumberLiteral, IntegerLiteral, RealLiteral, StringLiteral, Name, Keyword, Special, Node, Statement, Expression, Control, Iterative, Invocation = asc.Literal, asc.NilLiteral, asc.BooleanLiteral, asc.NumberLiteral, asc.IntegerLiteral, asc.RealLiteral, asc.StringLiteral, asc.Name, asc.Keyword, asc.Special, asc.Node, asc.Statement, asc.Expression, asc.Control, asc.Iterative, asc.Invocation
local las = require('lua_abstractsyntax')
local Get, Set, Group, Block, Chunk, Do, While, Repeat, If, ElseIf, For, ForIn, Function, MethodStatement, FunctionStatement, FunctionExpression, Return, Break, LastStatement, Call, Send, BinaryOperation, UnaryOperation, GetProperty, VariableArguments, TableConstructor, SetProperty, Goto, Label = las.Get, las.Set, las.Group, las.Block, las.Chunk, las.Do, las.While, las.Repeat, las.If, las.ElseIf, las.For, las.ForIn, las.Function, las.MethodStatement, las.FunctionStatement, las.FunctionExpression, las.Return, las.Break, las.LastStatement, las.Call, las.Send, las.BinaryOperation, las.UnaryOperation, las.GetProperty, las.VariableArguments, las.TableConstructor, las.SetProperty, las.lua52.Goto, las.lua52.Label
local LuaGrammar = require('lua_grammar')
local Lua52Grammar = OMeta.Grammar({_grammarName = 'Lua52Grammar', special = OMeta.Rule({behavior = function (input)
return input:applyWithArgs(input.grammar.choice, function (input)
return input:applyWithArgs(input.grammar.subsequence, [[::]])
end, function (input)
return input:apply(LuaGrammar.special)
end)
end, arity = 0, name = 'special'}), keyword = OMeta.Rule({behavior = function (input)
return input:applyWithArgs(input.grammar.choice, function (input)
return input:apply(LuaGrammar.keyword)
end, function (input)
return input:applyWithArgs(input.grammar.exactly, 'goto')
end)
end, arity = 0, name = 'keyword'}), stat = OMeta.Rule({behavior = function (input)
return input:applyWithArgs(input.grammar.choice, function (input)
return input:apply(LuaGrammar.stat)
end, function (input)
local labelName, __pass__
if not (input:applyWithArgs(input.grammar.token, "goto")) then
return false
end
__pass__, labelName = input:apply(input.grammar.name)
if not (__pass__) then
return false
end
return true, Goto({name = labelName})
end, function (input)
return input:apply(input.grammar.label)
end)
end, arity = 0, name = 'stat'}), label = OMeta.Rule({behavior = function (input)
local labelName, __pass__
return input:applyWithArgs(input.grammar.choice, function (input)
if not (input:applyWithArgs(input.grammar.token, "::")) then
return false
end
__pass__, labelName = input:apply(input.grammar.name)
if not (__pass__) then
return false
end
if not (input:applyWithArgs(input.grammar.token, "::")) then
return false
end
return true, Label({name = labelName})
end)
end, arity = 0, name = 'label'})})
Lua52Grammar:merge(LuaGrammar)
return Lua52Grammar
|
ConstraintMotion = {}
---@type number
ConstraintMotion.Free = 0
---@type number
ConstraintMotion.Locked = 2
---@type number
ConstraintMotion.Limited = 1
|
local L = LibStub("AceLocale-3.0"):GetLocale("EPGP")
local GP = LibStub("LibGearPoints-1.2")
local DLG = LibStub("LibDialog-1.0")
DLG:Register("EPGP_CONFIRM_GP_CREDIT", {
text = "Unknown Item",
icon = [[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]],
buttons = {
{
text = _G.ACCEPT,
on_click = function(self, data, reason)
local gp = tonumber(self.editboxes[1]:GetText())
EPGP:IncGPBy(data.name, data.item, gp)
end,
},
{
text = _G.CANCEL,
},
{
text = _G.GUILD_BANK,
on_click = function(self, data, reason)
EPGP:BankItem(data.item)
end,
},
},
editboxes = {
{
auto_focus = true,
},
},
on_show = function(self, data)
self.text:SetFormattedText("\n"..L["Credit GP to %s"].."\n", data.item)
self.icon:SetTexture(data.icon)
local gp1, gp2 = GP:GetValue(data.item)
if not gp1 then
self.editboxes[1]:SetText("")
elseif not gp2 then
self.editboxes[1]:SetText(tostring(gp1))
else
self.editboxes[1]:SetText(L["%d or %d"]:format(gp1, gp2))
end
self.editboxes[1]:HighlightText()
if not self.icon_frame then
local icon_frame = CreateFrame("Frame", nil, self)
icon_frame:ClearAllPoints()
icon_frame:SetAllPoints(self.icon)
icon_frame:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT", - 3, icon_frame:GetHeight() + 6)
GameTooltip:SetHyperlink(self:GetParent().data.item)
end)
icon_frame:SetScript("OnLeave", function(self)
GameTooltip:FadeOut()
end)
self.icon_frame = icon_frame
end
if self.icon_frame then
self.icon_frame:EnableMouse(true)
self.icon_frame:Show()
end
end,
on_hide = function(self, data)
if ChatEdit_GetActiveWindow() then
ChatEdit_FocusActiveWindow()
end
if self.icon_frame then
self.icon_frame:EnableMouse(false)
self.icon_frame:Hide()
end
end,
on_update = function(self, elapsed)
local gp = tonumber(self.editboxes[1]:GetText())
if EPGP:CanIncGPBy(self.data.item, gp) then
self.buttons[1]:Enable()
else
self.buttons[1]:Disable()
end
end,
hide_on_escape = true,
show_while_dead = true,
})
DLG:Register("EPGP_DECAY_EPGP", {
buttons = {
{
text = _G.ACCEPT,
on_click = function(self, data, reason)
EPGP:DecayEPGP()
end,
},
{
text = _G.CANCEL,
},
},
on_show = function(self, data)
self.text:SetFormattedText(L["Decay EP and GP by %d%%?"], data)
end,
on_update = function(self, elapsed)
if EPGP:CanDecayEPGP() then
self.buttons[1]:Enable()
else
self.buttons[1]:Disable()
end
end,
hide_on_escape = true,
show_while_dead = true,
})
DLG:Register("EPGP_RESET_EPGP", {
text = L["Reset all main toons' EP and GP to 0?"],
buttons = {
{
text = _G.ACCEPT,
on_click = function(self, data, reason)
EPGP:ResetEPGP()
end,
},
{
text = _G.CANCEL,
},
},
on_update = function(self, elapsed)
if EPGP:CanResetEPGP() then
self.buttons[1]:Enable()
else
self.buttons[1]:Disable()
end
end,
hide_on_escape = true,
show_while_dead = true,
})
DLG:Register("EPGP_RESET_GP", {
text = L["Reset all main toons' GP to 0?"],
buttons = {
{
text = _G.ACCEPT,
on_click = function(self, data, reason)
EPGP:ResetGP()
end,
},
{
text = _G.CANCEL,
},
},
on_update = function(self, elapsed)
if EPGP:CanResetEPGP() then
self.buttons[1]:Enable()
else
self.buttons[1]:Disable()
end
end,
hide_on_escape = true,
show_while_dead = true,
})
DLG:Register("EPGP_RESCALE_GP", {
text = L["Re-scale all main toons' GP to current tier?"],
buttons = {
{
text = _G.ACCEPT,
on_click = function(self, data, reason)
EPGP:RescaleGP()
end,
},
{
text = _G.CANCEL,
},
},
on_update = function(self, elapsed)
if EPGP:CanResetEPGP() then
self.buttons[1]:Enable()
else
self.buttons[1]:Disable()
end
end,
hide_on_escape = true,
show_while_dead = true,
})
DLG:Register("EPGP_BOSS_DEAD", {
buttons = {
{
text = _G.ACCEPT,
on_click = function(self, data, reason)
local ep = tonumber(self.editboxes[1]:GetText())
EPGP:IncMassEPBy(data, ep)
end,
},
{
text = _G.CANCEL,
},
},
editboxes = {
{
auto_focus = true,
},
},
on_show = function(self, data)
self.text:SetFormattedText(L["%s is dead. Award EP?"], data)
self.editboxes[1]:SetText("")
end,
on_hide = function(self, data)
if ChatEdit_GetActiveWindow() then
ChatEdit_FocusActiveWindow()
end
end,
on_update = function(self, elapsed)
local ep = tonumber(self.editboxes[1]:GetText())
if EPGP:CanIncEPBy(self.data, ep) then
self.buttons[1]:Enable()
else
self.buttons[1]:Disable()
end
end,
show_while_dead = true,
})
DLG:Register("EPGP_BOSS_ATTEMPT", {
buttons = {
{
text = _G.ACCEPT,
on_click = function(self, data, reason)
local ep = tonumber(self.editboxes[1]:GetText())
EPGP:IncMassEPBy(data .. " (attempt)", ep)
end,
},
{
text = _G.CANCEL,
},
},
editboxes = {
{
-- on_escape_pressed = function(editbox, data)
-- end,
-- on_text_changed = function(editbox, data)
-- end,
-- on_enter_pressed = function(editbox, data)
-- end,
auto_focus = true,
},
},
on_show = function(self, data)
self.text:SetFormattedText(L["Wiped on %s. Award EP?"], data)
self.editboxes[1]:SetText("")
end,
on_hide = function(self, data)
if ChatEdit_GetActiveWindow() then
ChatEdit_FocusActiveWindow()
end
end,
on_update = function(self, elapsed)
local ep = tonumber(self.editboxes[1]:GetText())
if EPGP:CanIncEPBy(self.data, ep) then
self.buttons[1]:Enable()
else
self.buttons[1]:Disable()
end
end,
show_while_dead = true,
})
DLG:Register("EPGP_LOOTMASTER_ASK_TRACKING", {
text = "You are the Loot Master, would you like to use EPGP Lootmaster to distribute loot?\r\n\r\n(You will be asked again next time. Use the configuration panel to change this behaviour)",
icon = [[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]],
buttons = {
{
text = _G.YES,
on_click = function(self)
EPGP:GetModule("lootmaster"):EnableTracking()
EPGP:Print('You have enabled loot tracking for this raid')
end,
},
{
text = _G.NO,
on_click = function(self)
EPGP:GetModule("lootmaster"):DisableTracking()
EPGP:Print('You have disabled loot tracking for this raid')
end,
},
},
hide_on_escape = true,
show_while_dead = true,
})
DLG:Register("EPGP_NEW_VERSION", {
text = "|cFFFFFF00EPGP " .. EPGP.version .. "|r\n" ..
L["You can now check your epgp standings and loot on the web: http://www.epgpweb.com"], -- /script EPGP.db.profile.last_version = nil
icon = [[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]],
buttons = {
{
text = _G.OKAY,
},
},
hide_on_escape = true,
show_while_dead = true,
})
DLG:Register("EPGP_NEW_TIER", {
text = "|cFFFFFF00EPGP " .. EPGP.version .. "|r\n" ..
L["A new tier is here! You should probably reset or rescale GP (Interface -> Options -> AddOns -> EPGP)!"], -- /script EPGP.db.profile.last_tier = nil
icon = [[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]],
buttons = {
{
text = _G.OKAY,
},
},
hide_on_escape = true,
show_while_dead = true,
})
|
-- Objects
local GuiService = Instance.new("ScreenGui")
local Menu = Instance.new("TextButton")
local Chat = Instance.new("Frame")
local MenuBG = Instance.new("ImageLabel")
local Close = Instance.new("TextButton")
local SetBounty = Instance.new("TextButton")
local Namee = Instance.new("TextBox")
local DeleteEnvironment = Instance.new("TextButton")
local FullEXP = Instance.new("TextButton")
local InfiniteAurem = Instance.new("TextButton")
local InfiniteLamina = Instance.new("TextButton")
local Namee_2 = Instance.new("TextBox")
local Legendary = Instance.new("TextButton")
local Namee_3 = Instance.new("TextBox")
local Level = Instance.new("TextButton")
local TextLabel = Instance.new("TextLabel")
local Namee_4 = Instance.new("TextBox")
local Nowipe = Instance.new("TextButton")
local Regenerate = Instance.new("TextButton")
local SetMagic = Instance.new("TextButton")
local Namee_5 = Instance.new("TextBox")
local SetSecondMagic = Instance.new("TextButton")
local Namee_6 = Instance.new("TextBox")
local SkillPoints = Instance.new("TextButton")
local Namee_7 = Instance.new("TextBox")
local AnimationPack = Instance.new("TextButton")
local Namee_8 = Instance.new("TextBox")
local Namee_9 = Instance.new("TextBox")
-- Properties
GuiService.Name = "Gui Service"
GuiService.Parent = game.CoreGui
Menu.Name = "Menu"
Menu.Parent = GuiService
Menu.BackgroundColor3 = Color3.new(0, 0.188235, 0.27451)
Menu.BackgroundTransparency = 0.5
Menu.BorderSizePixel = 0
Menu.Position = UDim2.new(0, 323, 0, 0)
Menu.Size = UDim2.new(0, 60, 0, 20)
Menu.Font = Enum.Font.SourceSansLight
Menu.FontSize = Enum.FontSize.Size18
Menu.Text = "Menu"
Menu.TextColor3 = Color3.new(1, 1, 1)
Open = false
Chat.Name = "Chat"
Chat.Parent = GuiService
Chat.Active = true
Chat.BackgroundColor3 = Color3.new(1, 1, 1)
Chat.BackgroundTransparency = 1
Chat.Draggable = true
Chat.Position = UDim2.new(0.28, 000, 0.55, 1000)
Chat.Selectable = true
Chat.Size = UDim2.new(0, 537, 0, 56)
Chat.Visible = false
MenuBG.Name = "MenuBG"
MenuBG.Parent = Chat
MenuBG.BackgroundColor3 = Color3.new(1, 1, 1)
MenuBG.BackgroundTransparency = 1
MenuBG.Size = UDim2.new(0, 593, 0, 361)
MenuBG.Image = "rbxassetid://491261712"
MenuBG.ImageTransparency = 0.10000000149012
Close.Name = "Close"
Close.Parent = Chat
Close.BackgroundColor3 = Color3.new(1, 1, 1)
Close.BackgroundTransparency = 1
Close.Position = UDim2.new(0, 537, 0, 28)
Close.Size = UDim2.new(0, 40, 0, 28)
Close.Font = Enum.Font.SourceSans
Close.FontSize = Enum.FontSize.Size14
Close.TextTransparency = 1
Close.MouseButton1Down:connect(function(open)
Chat:TweenPosition(UDim2.new(0.28, 0, 1.0, 1000), "In", "Sine",1,true)
Open = false
end)
Menu.MouseButton1Down:connect(function(open)
if Open == false then
Chat.Visible = true
Chat:TweenPosition(UDim2.new(0.28, 0, 0.55, -250), "Out", "Back",1.5,true)
Open = true
elseif Open == true then
Chat:TweenPosition(UDim2.new(0.28, 0, 1.0, 1000), "In", "Sine",1,true)
Open = false
end
end)
SetBounty.Name = "Set Bounty"
SetBounty.Parent = Chat
SetBounty.BackgroundColor3 = Color3.new(0, 1, 0.968628)
SetBounty.BackgroundTransparency = 0.60000002384186
SetBounty.BorderSizePixel = 0
SetBounty.Position = UDim2.new(0, 180, 0, 75)
SetBounty.Size = UDim2.new(0, 70, 0, 53)
SetBounty.Font = Enum.Font.SourceSansLight
SetBounty.FontSize = Enum.FontSize.Size18
SetBounty.Text = "Bounty"
SetBounty.TextColor3 = Color3.new(1, 1, 1)
SetBounty.TextStrokeColor3 = Color3.new(1, 1, 1)
DeleteEnvironment.Name = "Delete Environment"
DeleteEnvironment.Parent = Chat
DeleteEnvironment.BackgroundColor3 = Color3.new(0, 1, 0.968628)
DeleteEnvironment.BackgroundTransparency = 0.60000002384186
DeleteEnvironment.BorderSizePixel = 0
DeleteEnvironment.Position = UDim2.new(0, 20, 0, 75)
DeleteEnvironment.Size = UDim2.new(0, 70, 0, 70)
DeleteEnvironment.Font = Enum.Font.SourceSansLight
DeleteEnvironment.FontSize = Enum.FontSize.Size12
DeleteEnvironment.Text = "No Environment"
DeleteEnvironment.TextColor3 = Color3.new(1, 1, 1)
DeleteEnvironment.TextStrokeColor3 = Color3.new(1, 1, 1)
DeleteEnvironment.MouseButton1Down:connect(function(open)
game.Workspace.Environment:Remove()
end)
FullEXP.Name = "Full EXP"
FullEXP.Parent = Chat
FullEXP.BackgroundColor3 = Color3.new(0, 1, 0.968628)
FullEXP.BackgroundTransparency = 0.60000002384186
FullEXP.BorderSizePixel = 0
FullEXP.Position = UDim2.new(0, 100, 0, 75)
FullEXP.Size = UDim2.new(0, 70, 0, 70)
FullEXP.Font = Enum.Font.SourceSansLight
FullEXP.FontSize = Enum.FontSize.Size14
FullEXP.Text = "Full EXP"
FullEXP.TextColor3 = Color3.new(1, 1, 1)
FullEXP.TextStrokeColor3 = Color3.new(1, 1, 1)
FullEXP.MouseButton1Down:connect(function(open)
while true do
wait(5)
game.Workspace.Stats.SetStat:FireServer("EXP", 99999, "math.random() is the best thing ever")
end
end)
InfiniteAurem.Name = "Infinite Aurem"
InfiniteAurem.Parent = Chat
InfiniteAurem.BackgroundColor3 = Color3.new(0, 1, 0.968628)
InfiniteAurem.BackgroundTransparency = 0.60000002384186
InfiniteAurem.BorderSizePixel = 0
InfiniteAurem.Position = UDim2.new(0, 340, 0, 75)
InfiniteAurem.Size = UDim2.new(0, 70, 0, 70)
InfiniteAurem.Font = Enum.Font.SourceSansLight
InfiniteAurem.FontSize = Enum.FontSize.Size18
InfiniteAurem.Text = "Aurem"
InfiniteAurem.TextColor3 = Color3.new(1, 1, 1)
InfiniteAurem.TextStrokeColor3 = Color3.new(1, 1, 1)
InfiniteAurem.MouseButton1Down:connect(function(open)
while true do
wait(0.1)
game.Workspace.Stats.SetStat:FireServer("Aurem", 300, "math.random() is the best thing ever")
end
end)
InfiniteLamina.Name = "Infinite Lamina"
InfiniteLamina.Parent = Chat
InfiniteLamina.BackgroundColor3 = Color3.new(0, 1, 0.968628)
InfiniteLamina.BackgroundTransparency = 0.60000002384186
InfiniteLamina.BorderSizePixel = 0
InfiniteLamina.Position = UDim2.new(0, 180, 0, 155)
InfiniteLamina.Size = UDim2.new(0, 70, 0, 53)
InfiniteLamina.Font = Enum.Font.SourceSansLight
InfiniteLamina.FontSize = Enum.FontSize.Size14
InfiniteLamina.Text = "Lamina"
InfiniteLamina.TextColor3 = Color3.new(1, 1, 1)
InfiniteLamina.TextStrokeColor3 = Color3.new(1, 1, 1)
Legendary.Name = "Legendary"
Legendary.Parent = Chat
Legendary.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Legendary.BackgroundTransparency = 0.60000002384186
Legendary.BorderSizePixel = 0
Legendary.Position = UDim2.new(0, 260, 0, 75)
Legendary.Size = UDim2.new(0, 70, 0, 53)
Legendary.Font = Enum.Font.SourceSansLight
Legendary.FontSize = Enum.FontSize.Size14
Legendary.Text = "Reputation"
Legendary.TextColor3 = Color3.new(1, 1, 1)
Legendary.TextStrokeColor3 = Color3.new(1, 1, 1)
Level.Name = "Level"
Level.Parent = Chat
Level.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Level.BackgroundTransparency = 0.60000002384186
Level.BorderSizePixel = 0
Level.Position = UDim2.new(0, 420, 0, 75)
Level.Size = UDim2.new(0, 70, 0, 53)
Level.Font = Enum.Font.SourceSansLight
Level.FontSize = Enum.FontSize.Size18
Level.Text = "Level"
Level.TextColor3 = Color3.new(1, 1, 1)
Level.TextStrokeColor3 = Color3.new(1, 1, 1)
TextLabel.Parent = Level
TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
TextLabel.BackgroundTransparency = 1
TextLabel.Position = UDim2.new(0, 0, 0, 29)
TextLabel.Size = UDim2.new(0, 70, 0, 24)
TextLabel.ZIndex = 10
TextLabel.Font = Enum.Font.SourceSans
TextLabel.FontSize = Enum.FontSize.Size14
TextLabel.Text = "Detectable"
TextLabel.TextColor3 = Color3.new(0, 0, 0)
Nowipe.Name = "Nowipe"
Nowipe.Parent = Chat
Nowipe.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Nowipe.BackgroundTransparency = 0.60000002384186
Nowipe.BorderSizePixel = 0
Nowipe.Position = UDim2.new(0, 100, 0, 155)
Nowipe.Size = UDim2.new(0, 70, 0, 70)
Nowipe.Font = Enum.Font.SourceSansLight
Nowipe.FontSize = Enum.FontSize.Size18
Nowipe.Text = "No Wipe"
Nowipe.TextColor3 = Color3.new(1, 1, 1)
Nowipe.TextStrokeColor3 = Color3.new(1, 1, 1)
Nowipe.MouseButton1Down:connect(function(open)
game.Workspace.Stats.WipeInventory:Remove()
Instance.new("RemoteEvent", game.Workspace.Stats)
game.Workspace.Stats.RemoteEvent.Name = "WipeInventory"
end)
Regenerate.Name = "Regenerate"
Regenerate.Parent = Chat
Regenerate.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Regenerate.BackgroundTransparency = 0.60000002384186
Regenerate.BorderSizePixel = 0
Regenerate.Position = UDim2.new(0, 20, 0, 155)
Regenerate.Size = UDim2.new(0, 70, 0, 70)
Regenerate.Font = Enum.Font.SourceSansLight
Regenerate.FontSize = Enum.FontSize.Size18
Regenerate.Text = "Regenerate"
Regenerate.TextColor3 = Color3.new(1, 1, 1)
Regenerate.TextStrokeColor3 = Color3.new(1, 1, 1)
Regenerate.MouseButton1Down:connect(function(open)
while true do
wait(1)
game.Players.LocalPlayer.bin.MagicEnergy.Value = 99999
game.Players.LocalPlayer.bin.Stamina.Value = 99999
end
end)
SetMagic.Name = "Set Magic"
SetMagic.Parent = Chat
SetMagic.BackgroundColor3 = Color3.new(0, 1, 0.968628)
SetMagic.BackgroundTransparency = 0.60000002384186
SetMagic.BorderSizePixel = 0
SetMagic.Position = UDim2.new(0, 500, 0, 75)
SetMagic.Size = UDim2.new(0, 70, 0, 53)
SetMagic.Font = Enum.Font.SourceSansLight
SetMagic.FontSize = Enum.FontSize.Size18
SetMagic.Text = "First Magic"
SetMagic.TextColor3 = Color3.new(1, 1, 1)
SetMagic.TextStrokeColor3 = Color3.new(1, 1, 1)
SetSecondMagic.Name = "Set Second Magic"
SetSecondMagic.Parent = Chat
SetSecondMagic.BackgroundColor3 = Color3.new(0, 1, 0.968628)
SetSecondMagic.BackgroundTransparency = 0.60000002384186
SetSecondMagic.BorderSizePixel = 0
SetSecondMagic.Position = UDim2.new(0, 260, 0, 155)
SetSecondMagic.Size = UDim2.new(0, 70, 0, 53)
SetSecondMagic.Font = Enum.Font.SourceSansLight
SetSecondMagic.FontSize = Enum.FontSize.Size14
SetSecondMagic.Text = "Second Magic"
SetSecondMagic.TextColor3 = Color3.new(1, 1, 1)
SetSecondMagic.TextStrokeColor3 = Color3.new(1, 1, 1)
SkillPoints.Name = "Skill Points"
SkillPoints.Parent = Chat
SkillPoints.BackgroundColor3 = Color3.new(0, 1, 0.968628)
SkillPoints.BackgroundTransparency = 0.60000002384186
SkillPoints.BorderSizePixel = 0
SkillPoints.Position = UDim2.new(0, 340, 0, 155)
SkillPoints.Size = UDim2.new(0, 70, 0, 53)
SkillPoints.Font = Enum.Font.SourceSansLight
SkillPoints.FontSize = Enum.FontSize.Size18
SkillPoints.Text = "Skill Points"
SkillPoints.TextColor3 = Color3.new(1, 1, 1)
SkillPoints.TextStrokeColor3 = Color3.new(1, 1, 1)
AnimationPack.Name = "AnimationPack"
AnimationPack.Parent = Chat
AnimationPack.BackgroundColor3 = Color3.new(0, 1, 0.968628)
AnimationPack.BackgroundTransparency = 0.60000002384186
AnimationPack.BorderSizePixel = 0
AnimationPack.Position = UDim2.new(0, 420, 0, 155)
AnimationPack.Size = UDim2.new(0, 70, 0, 53)
AnimationPack.Font = Enum.Font.SourceSansLight
AnimationPack.FontSize = Enum.FontSize.Size12
AnimationPack.Text = "Animation Pack"
AnimationPack.TextColor3 = Color3.new(1, 1, 1)
AnimationPack.TextStrokeColor3 = Color3.new(1, 1, 1)
Namee.Name = "Namee"
Namee.Parent = SetBounty
Namee.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Namee.BackgroundTransparency = 0.60000002384186
Namee.Position = UDim2.new(0, 0, 0, 55)
Namee.Size = UDim2.new(0, 70, 0, 15)
Namee.Font = Enum.Font.SourceSansLight
Namee.FontSize = Enum.FontSize.Size14
Namee.Text = "[Amount]"
Namee.TextColor3 = Color3.new(1, 1, 1)
BountyA = Namee.Text
SetBounty.MouseButton1Down:connect(function(open)
BountyA = Namee.Text
game.Workspace.Stats.SetStat:FireServer("Bounty", tonumber(BountyA) + 0, "math.random() is the best thing ever")
end)
Namee_2.Name = "Namee"
Namee_2.Parent = InfiniteLamina
Namee_2.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Namee_2.BackgroundTransparency = 0.60000002384186
Namee_2.BorderSizePixel = 0
Namee_2.Position = UDim2.new(0, 0, 0, 55)
Namee_2.Size = UDim2.new(0, 70, 0, 15)
Namee_2.Font = Enum.Font.SourceSansLight
Namee_2.FontSize = Enum.FontSize.Size14
Namee_2.Text = "[Amount]"
Namee_2.TextColor3 = Color3.new(1, 1, 1)
LaminaA = Namee_2.Text
InfiniteLamina.MouseButton1Down:connect(function(open)
LaminaA = Namee_2.Text
game.Workspace.Stats.SetStat:FireServer("Lamina", tonumber(LaminaA) + 0, "math.random() is the best thing ever")
end)
Namee_3.Name = "Namee"
Namee_3.Parent = Legendary
Namee_3.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Namee_3.BackgroundTransparency = 0.60000002384186
Namee_3.BorderSizePixel = 0
Namee_3.Position = UDim2.new(0, 0, 0, 55)
Namee_3.Size = UDim2.new(0, 70, 0, 15)
Namee_3.Font = Enum.Font.SourceSansLight
Namee_3.FontSize = Enum.FontSize.Size14
Namee_3.Text = "[Amount]"
Namee_3.TextColor3 = Color3.new(1, 1, 1)
LegendaryA = Namee_3.Text
Legendary.MouseButton1Down:connect(function(open)
LegendaryA = Namee_3.Text
game.Workspace.Stats.SetStat:FireServer("Reputation", tonumber(LegendaryA) + 0, "math.random() is the best thing ever")
end)
Namee_4.Name = "Namee"
Namee_4.Parent = Level
Namee_4.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Namee_4.BackgroundTransparency = 0.60000002384186
Namee_4.BorderSizePixel = 0
Namee_4.Position = UDim2.new(0, 0, 0, 55)
Namee_4.Size = UDim2.new(0, 70, 0, 15)
Namee_4.Font = Enum.Font.SourceSansLight
Namee_4.FontSize = Enum.FontSize.Size14
Namee_4.Text = "[Amount]"
Namee_4.TextColor3 = Color3.new(1, 1, 1)
LevelA = Namee_4.Text
Level.MouseButton1Down:connect(function(open)
LevelA = Namee_4.Text
game.Workspace.Stats.SetStat:FireServer("Level", tonumber(LevelA) + 0, "math.random() is the best thing ever")
end)
Namee_5.Name = "Namee"
Namee_5.Parent = SetMagic
Namee_5.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Namee_5.BackgroundTransparency = 0.60000002384186
Namee_5.BorderSizePixel = 0
Namee_5.Position = UDim2.new(0, 0, 0, 55)
Namee_5.Size = UDim2.new(0, 70, 0, 15)
Namee_5.Font = Enum.Font.SourceSansLight
Namee_5.FontSize = Enum.FontSize.Size14
Namee_5.Text = "[Magic]"
Namee_5.TextColor3 = Color3.new(1, 1, 1)
MagicA = Namee_5.Text
SetMagic.MouseButton1Down:connect(function(open)
MagicA = Namee_5.Text
game.Workspace.Stats.SetStat:FireServer("Magic", tostring(MagicA), "math.random() is the best thing ever")
end)
Namee_6.Name = "Namee"
Namee_6.Parent = SetSecondMagic
Namee_6.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Namee_6.BackgroundTransparency = 0.60000002384186
Namee_6.BorderSizePixel = 0
Namee_6.Position = UDim2.new(0, 0, 0, 55)
Namee_6.Size = UDim2.new(0, 70, 0, 15)
Namee_6.Font = Enum.Font.SourceSansLight
Namee_6.FontSize = Enum.FontSize.Size14
Namee_6.Text = "[Magic]"
Namee_6.TextColor3 = Color3.new(1, 1, 1)
MagicA2 = Namee_6.Text
SetSecondMagic.MouseButton1Down:connect(function(open)
MagicA2 = Namee_6.Text
game.Workspace.Stats.SetStat:FireServer("Magic2", tostring(MagicA2), "math.random() is the best thing ever")
end)
Namee_7.Name = "Namee"
Namee_7.Parent = SkillPoints
Namee_7.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Namee_7.BackgroundTransparency = 0.60000002384186
Namee_7.BorderSizePixel = 0
Namee_7.Position = UDim2.new(0, 0, 0, 55)
Namee_7.Size = UDim2.new(0, 70, 0, 15)
Namee_7.Font = Enum.Font.SourceSansLight
Namee_7.FontSize = Enum.FontSize.Size14
Namee_7.Text = "[Amount]"
Namee_7.TextColor3 = Color3.new(1, 1, 1)
Namee_8.Name = "Namee"
Namee_8.Parent = AnimationPack
Namee_8.BackgroundColor3 = Color3.new(0, 1, 0.968628)
Namee_8.BackgroundTransparency = 0.60000002384186
Namee_8.BorderSizePixel = 0
Namee_8.Position = UDim2.new(0, 0, 0, 55)
Namee_8.Size = UDim2.new(0, 70, 0, 15)
Namee_8.Font = Enum.Font.SourceSansLight
Namee_8.FontSize = Enum.FontSize.Size14
Namee_8.Text = "[Pack]"
Namee_8.TextColor3 = Color3.new(1, 1, 1)
AP = Level.Namee_8.Text
AnimationPack.MouseButton1Down:connect(function(open)
AP = Level.Namee_8.Text
game.Workspace.Stats.SetStat:FireServer("Current Pack", tostring(AP), "math.random() is the best thing ever")
end)
SPA = Level.Namee_7.Text
SkillPoints.MouseButton1Down:connect(function(open)
SPA = Level.Namee_7.Text
game.Workspace.Stats.SetStat:FireServer("SP", tonumber(SPA) + 0, "math.random() is the best thing ever")
end)
------- |
local ffi = require "ffi"
local bit = require "bit"
local base = require "eelua.core.base"
local C = ffi.C
local ffi_new = ffi.new
local ffi_cast = ffi.cast
local send_message = base.send_message
ffi.cdef [[
typedef struct {
HMENU hmenu;
} Menu;
static const UINT MF_STRING = 0x00000000;
static const UINT MF_SEPARATOR = 0x00000800;
static const UINT MF_POPUP = 0x00000010;
static const UINT MF_BYPOSITION = 0x00000400;
HMENU CreatePopupMenu();
BOOL IsMenu(HMENU hMenu);
int GetMenuItemCount(HMENU hMenu);
BOOL AppendMenuA(
HMENU hMenu,
UINT uFlags,
UINT_PTR uIDNewItem,
const char* lpNewItem
);
BOOL InsertMenuA(
HMENU hMenu,
UINT uPosition,
UINT uFlags,
UINT_PTR uIDNewItem,
const char* lpNewItem
);
]]
local _M = {}
local mt = {
__index = function(self, k)
if k == "count" then
return _M.get_count(self)
end
return _M[k]
end
}
function _M.new(hmenu)
if hmenu == nil then
hmenu = C.CreatePopupMenu()
end
assert(C.IsMenu(hmenu) == 1)
return ffi_new("Menu", { hmenu })
end
function _M:get_count()
return C.GetMenuItemCount(self.hmenu)
end
function _M:add_item(cmd_id, text)
C.AppendMenuA(self.hmenu, C.MF_STRING, ffi_cast("UINT_PTR", cmd_id), text)
end
function _M:add_separator()
C.AppendMenuA(self.hmenu, C.MF_SEPARATOR, 0, nil)
end
function _M:add_subitem(text, submenu)
C.AppendMenuA(
self.hmenu,
bit.bor(C.MF_STRING, C.MF_POPUP),
submenu.hmenu,
text
)
end
function _M:insert_menu(pos, text, menu)
C.InsertMenuA(
self.hmenu,
pos,
bit.bor(C.MF_BYPOSITION, C.MF_STRING, C.MF_POPUP),
menu.hmenu,
text
)
end
ffi.metatype("Menu", mt)
return _M
|
addEventHandler("onResourceStart", resourceRoot,function()
setJetpackMaxHeight(101.82230377197)
setWaveHeight(0)
setFPSLimit(60)
setMapName("PSZ Freeroam")
setGameType("PSZ Freeroam")
setRuleValue("Gamemode", "PSZ Freeroam")
setRuleValue("WWW", "https://pszmta.pl")
setCloudsEnabled(false)
local realtime = getRealTime()
setTime(realtime.hour, realtime.minute)
setMinuteDuration(60000) -- 60000
setTimer ( every1min, 60000, 0)
end)
function every1min()
setJetpackMaxHeight(101.82230377197)
-- if isPlayerInCinema() then return end
local time = getRealTime()
-- synchronizacja czasu
setTime(time.hour, time.minute)
-- bicie dzwonu co godzine
end
function changeNicknameColor(plr,color)
if color then
setPlayerNametagColor(plr,color[1],color[2],color[3])
else
setPlayerNametagColor(plr,math.random(0,255),math.random(0,255),math.random(0,255))
end
end
function onPlayerDownloadFinished(plr)
setElementFrozen(plr,true)
setElementInterior(plr,0)
setElementDimension(plr,7)
setElementPosition(plr, 2134.67,-81.79,2.98-4)
triggerClientEvent(plr,"displayLoginBox",getRootElement())
end
function checkAccess()
local serial = getPlayerSerial(source)
local q = string.format("SELECT p.login FROM psz_accesslog a JOIN psz_players p ON p.id=a.user_id WHERE UNIX_TIMESTAMP(a.ts)<=UNIX_TIMESTAMP(NOW()) AND a.serial='%s' ORDER BY UNIX_TIMESTAMP(a.ts) DESC LIMIT 1",serial)
local wyniki = exports["psz-mysql"]:pobierzWyniki(q)
if (not wyniki or not wyniki.login) then
triggerClientEvent(source,"displayLoginBoxWindow",source)
return
end
triggerClientEvent(source,"displayLoginBoxWindow",source,wyniki.login)
end
addEvent("findAccount",true)
addEventHandler("findAccount",root,checkAccess)
function greetPlayer()
setElementData(source,'justConnected',true)
end
addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer )
function cmd_register(source,cmd,username,password)
if (password ~="" and password~=nil and username~="" and username~=nil) then
local level = getElementData(source,"auth:level") or 0
if (level and level>0) then
local accountAdded = addAccount(username,password)
if (accountAdded) then
outputChatBox("Konto zostało dodane. [login: "..username.." hasło: "..password.."]",source)
local c = getElementData(source,"character")
if (c and c.id) then
exports['psz-admin']:gameView_add("AC "..getPlayerSerial(source).."/"..getElementData(source,"auth:uid").."/"..getElementData(source,"auth:login").."/"..getElementData(source,"auth:level"))
end
else
outputChatBox("Wystąpił błąd, skontaktuj się z ROOT'em.",source)
end
else
outputChatBox("Zbyt niski poziom uprawnień.",source)
return
end
end
end
addCommandHandler("register", cmd_register)
addEventHandler("onPlayerJoin", getRootElement(), function()
local plrNick = getPlayerName(source)
if (string.len(plrNick)<3) then
kickPlayer(source,"Twój nick musi zawierać przynajmniej 3 znaki.")
return
end
if (string.find(plrNick,"#000000")) then
plrNick = string.gsub(plrNick,"#000000","")
setPlayerName(source,plrNick)
end
end)
function isPlayerHaveBJ(s)
local uid = getElementData(s,"auth:uid") or 0
local q = string.format("SELECT k.date_end FROM psz_kary k WHERE (k.id_player=%d OR k.serial='%s') AND k.date_end>NOW() AND rodzaj='Blokada Pracy' ORDER BY k.date_end DESC LIMIT 1",uid,getPlayerSerial(s))
pasujaca_kara = exports['psz-mysql']:pobierzWyniki(q)
if (pasujaca_kara) then
return true
end
return false
end
function znLog(oldNick, newNick,typ)
local serial = getPlayerSerial(source)
local uid = getElementData(source,"auth:uid")
local c = getElementData(source,"character")
--if (uid and tonumber(uid)~=1) then
-- outputChatBox("Możliwość zmiany nicku na serwerze będzie dostępna za kilkanaście minut.",source,255,0,0)
-- cancelEvent()
--return
--end
if (string.find(newNick,"#000000")) then
outputChatBox("Posiadanie czarnego koloru w nicku jest zabronione.",source,255,0,0)
cancelEvent()
return
end
local newNick = string.gsub(newNick,"#%x%x%x%x%x%x","")
local newNick = replaceIlleagalCharacters(newNick)
if (string.find(newNick,"'")) then
outputChatBox("W nicku nie możesz posiadać znaku '",source,255,0,0)
cancelEvent()
return
end
if (string.len(newNick)<3) then
outputChatBox("Nick musi mieć długość przynajmniej 3 znaków.",source,255,0,0)
cancelEvent()
return
end
if (not c or not c.id) then
cancelEvent()
return
end
local next_nc = exports['psz-mysql']:pobierzWyniki(string.format("SELECT TIMESTAMPDIFF(MINUTE, NOW(), next_nick_change) time FROM psz_players WHERE id=%d AND next_nick_change > NOW() LIMIT 1",tonumber(uid)))
if (next_nc and tonumber(next_nc.time)>0 and typ) then
outputChatBox("Kolejną zmianę nicku możesz wykonać za "..tonumber(next_nc.time).." minut.",source,255,0,0)
cancelEvent()
return
end
local wyniki = exports['psz-mysql']:pobierzWyniki(string.format("SELECT nick, userid FROM psz_postacie WHERE nick='%s'",newNick))
if ((not wyniki) or (wyniki and wyniki.userid == c.id)) then
exports['psz-mysql']:zapytanie(string.format("INSERT INTO psz_znlog SET serial='%s',playerid=%d,oldNick='%s',newNick='%s' ON DUPLICATE KEY UPDATE ts=NOW(), oldNick='%s',newNick='%s'",serial,uid,oldNick,newNick,oldNick,newNick))
exports['psz-mysql']:zapytanie(string.format("UPDATE psz_players SET next_nick_change=NOW()+INTERVAL 1 HOUR WHERE id=%d", tonumber(uid)))
local ac_login = exports['psz-mysql']:zapytanie(string.format("SELECT nick FROM psz_postacie WHERE userid=%d LIMIT 1",uid))
if not typ then
else
exports['psz-admin']:gameView_add(string.format("ZMIANA (NICK AND LOGIN) gracz ( %d ) %s, zmienia na %s",uid,oldNick,newNick))
outputChatBox("Twój nick został zmieniony, kolejną zmianę możesz wykonać za 1 godzinę.",source,255,0,0)
end
if (ac_login == newNick) then
else
exports['psz-mysql']:zapytanie(string.format("UPDATE psz_postacie SET nick='%s' WHERE userid=%d LIMIT 1",newNick,uid))
end
else
cancelEvent()
outputChatBox('Taki nick jest już w użyciu!',source,255,0,0)
setPlayerName(source,oldNick)
return
end
end
addEventHandler("onPlayerChangeNick", getRootElement(),znLog)
--[[
function onMKTimerWasted(ammo, attacker, weapon, bodypart)
if (attacker) then
if source == attacker then return end
if getElementData(attacker,"antyMKTimer") then
local cMK = getElementData(attacker,"antyMK:count") or 0
if cMK and cMK>0 then
local reason = "Zabicie gracza przed upływem czasu (AMK)"
local uid = getElementData(attacker,"auth:uid") or 0
local slogin = "System"
local auid = 5802
local serial = getPlayerSerial(attacker)
local kto=string.gsub(getPlayerName(attacker),"#%x%x%x%x%x%x","")
local czas = 3
local q = string.format("INSERT INTO psz_kary SET id_player=%d, serial='%s', rodzaj='Admin Jail', date_end=NOW()+INTERVAL %d MINUTE, reason='%s', player_given=%d" ,uid ,serial ,czas ,reason,auid)
exports['psz-mysql']:zapytanie(q)
exports['psz-mysql']:zapytanie(string.format("UPDATE psz_players SET blokada_aj=%d WHERE id=%d LIMIT 1", czas, uid))
exports['psz-admin']:adminView_add("SYSTEM - bAJ> "..kto..", powod: '".. reason.. "', przez:".. slogin,2)
exports['psz-admin']:gameView_add("SYSTEM - bAJ "..kto..", powod: '".. reason .."', przez: ".. slogin)
outputConsole(slogin.." nałożył/a AJ ("..czas.." min) na: "..kto..", powód: "..reason)
triggerClientEvent("gui_showOgloszenie", root, slogin.." nałożył/a AJ ("..czas.." min) na: "..kto..", powód: "..reason..".","Informacja o nadanej karze")
outputChatBox("Trafiłeś do Admin Jail'a, powód:"..reason.." czas do odsiedzenia: "..czas.." min.",attacker,255,0,0)
setElementData(attacker,"kary:blokada_aj",czas)
removePedFromVehicle(attacker)
setElementDimension(attacker,231)
setElementInterior(attacker,0)
setElementPosition(attacker,1775.42,-1574.87,1734.94)
removeElementData(attacker,"antyMK:count")
elseif cMK == 0 and getPlayerName(attacker) == "_kOx_" then
setElementData(attacker,"antyMK:count",1)
triggerClientEvent("onPlayerReceivedWarning", attacker, "Jeżeli zabijesz jeszcze jednego gracza przed skończeniem się czasu, trafisz do Admin Jaila.")
end
end
end
end
addEventHandler("onPlayerWasted", getRootElement(), onMKTimerWasted)
]]--
|
-----------------------------------
-- Area: Northern San d'Oria
-- NPC: Excenmille
-- Type: Ballista Pursuivant
-- !pos -229.344 6.999 22.976 231
--
-- Auto-Script: Requires Verification (Verified by Brawndo)
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
player:startEvent(29);
end;
function onEventUpdate(player,csid,option)
end;
function onEventFinish(player,csid,option)
end;
|
require("framework.shared.debug")
require("framework.shared.functions")
require("framework.shared.errors")
json = require("framework.shared.json")
|
--//////////////////////////////////////////////////////////////////////
--************************
--MessageLog
--************************
MessageLog = {}
MessageLog.__index = MessageLog
function MessageLog.new()
self = setmetatable({}, MessageLog)
self.messageQueue = {}
self.messageActive = {}
self.timer = 0
self:addMessage('Message1!!!')
self:addMessage('Message2!!!')
self:addMessage('Message3!!!')
self:addMessage('Message4 YO!!!')
return self
end
--function MessageLog:onInput(input)
--end
function MessageLog:update(dt)
if #self.messageQueue == 0 and #self.messageActive == 0 then
self.timer = 0
return
elseif #self.messageQueue ~= 0 and #self.messageActive == 0 then
local msg = table.remove(self.messageQueue, 1)
table.insert(self.messageActive, msg)
end
if #self.messageQueue ~= 0 and self.timer >= 1000 then
local msg = table.remove(self.messageQueue, 1)
table.insert(self.messageActive, msg)
self.timer = self.timer + dt
self.timer = 0
end
local toBeRemoved = nil
for i, msg in ipairs(self.messageActive) do
msg.timer = msg.timer + dt
if msg.timer >= 6000 then
toBeRemoved = i
end
end
if toBeRemoved ~= nil then
table.remove(self.messageActive, toBeRemoved)
end
self.timer = self.timer + dt
end
function MessageLog:render()
local x = 73
local bottom = 178
local offset = 7
for i, msg in ipairs(self.messageActive) do
engine.renderTextLine(msg.text, x, bottom - offset * (#self.messageActive - i ), false, 1);
end
-- engine.renderTextLine('Message1!!!', x, bottom - offset * 3, false, 1);
-- engine.renderTextLine('Message2.', x, bottom - offset * 2, false, 1);
-- engine.renderTextLine('Message3.', x, bottom - offset * 1, false, 1);
-- engine.renderTextLine('Message4.', x, bottom - offset * 0, false, 1);
end
function MessageLog:addMessage(text)
local msg = {text = text, timer = 0}
table.insert(self.messageQueue, msg )
end
return MessageLog
|
--- Test yielding within a tail call
run(function()
local function yieldTail(n)
assertEquals(1, coroutine.yield(1))
assertEquals(2, coroutine.yield(2))
if n > 0 then
return yieldTail(n - 1)
end
end
yieldTail(5)
end)
|
local config = require 'config'
local function getRange(start, finish, lines)
local start_row, start_col = lines:rowcol(start)
local finish_row, finish_col = lines:rowcol(finish)
return {
start = {
line = start_row - 1,
character = start_col - 1,
},
['end'] = {
line = finish_row - 1,
-- 这里不用-1,因为前端期待的是匹配完成后的位置
character = finish_col,
},
}
end
local function hsvToRgb(h, s, v, a)
local r, g, b
local i = math.floor(h * 6);
local f = h * 6 - i;
local p = v * (1 - s);
local q = v * (1 - f * s);
local t = v * (1 - (1 - f) * s);
i = i % 6
if i == 0 then r, g, b = v, t, p
elseif i == 1 then r, g, b = q, v, p
elseif i == 2 then r, g, b = p, v, t
elseif i == 3 then r, g, b = p, q, v
elseif i == 4 then r, g, b = t, p, v
elseif i == 5 then r, g, b = v, p, q
end
return r, g, b
end
local COLOR3_CONSTRUCTORS = {
["new"] = true,
["fromRGB"] = true,
["fromHSV"] = true
}
--- @param lsp LSP
--- @param params table
--- @return table
return function (lsp, params)
if not (config.isLuau() and config.config.misc.color3Picker) then
return
end
local vm, lines = lsp:getVM(params.textDocument.uri)
if not vm then
return
end
local results = {}
vm:eachSource(function(source)
if source.type ~= "call" then
return
end
local simple = source:get 'simple'
if not simple then
return
end
if #simple >= 4 and simple[1][1] == "Color3" then
if simple[3].type ~= "name" or simple[4].type ~= "call" then
return
end
local funcName = simple[3][1]
local callArgs = simple[4]
if COLOR3_CONSTRUCTORS[funcName] then
local rgb = {}
for _, arg in ipairs(callArgs) do
local number = vm:getArgNumber(arg)
if number then
rgb[#rgb+1] = number
end
end
if funcName == "fromRGB" then
for i, num in pairs(rgb) do
rgb[i] = num / 255
end
elseif funcName == "fromHSV" then
if #rgb ~= 3 then
return
end
rgb = {hsvToRgb(rgb[1], rgb[2], rgb[3], 1)}
end
results[#results+1] = {
range = getRange(simple[1].start, simple[1].start + 1, lines),
color = {
red = rgb[1] or 0,
green = rgb[2] or 0,
blue = rgb[3] or 0,
alpha = 1
}
}
end
end
end)
if #results == 0 then
return nil
end
return results
end
|
local s_find = string.find
local s_sub = string.sub
local t_insert = table.insert
--将hash表的key值转换为number类型输出
local _M = function(str,p,ismatch)
local r = {}
local last = str
local s,e = s_find(last,p,1,not ismatch)
while s do
local s1 = s_sub(last,1,s-1)
if #s1 > 0 then
t_insert(r,s1)
end
last = s_sub(last,e+1)
s,e = s_find(last,p,1,not ismatch)
end
t_insert(r,last)
return r
end
return _M |
local CUSTOMFAILSTR = GetModConfigData("CUSTOMFAILSTR")
local AddPlayerPostInit = AddPlayerPostInit
local AddPrefabPostInit = AddPrefabPostInit
-- local AddPrefabPostInitAny = AddPrefabPostInitAny
local AddClassPostConstruct = AddClassPostConstruct
local modimport = modimport
GLOBAL.setfenv(1, GLOBAL)
STRCODE_HEADER = "/strcode "
STRCODE_SUBFMT = {}
STRCODE_ANNOUNCE = {}
STRCODE_TALKER = {}
STRCODE_POSSIBLENAMES = {}
function IsStrCode(value)
return type(value) == "string" and value:find("^"..STRCODE_HEADER)
end
function SubStrCode(str)
return str:sub(#STRCODE_HEADER + 1, -1)
end
function EncodeStrCode(tbl)
return STRCODE_HEADER .. json.encode(tbl)
end
local function getmodifiedstring(base_str, topic_tab, modifier)
if type(modifier) == "table" then
local tab = topic_tab
for _, v in ipairs(modifier) do
if tab == nil then
return nil
end
tab = tab[v]
base_str = base_str .. "." .. v
end
return base_str
elseif modifier ~= nil then
local tab = topic_tab[modifier]
local postfix =
(type(tab) == "table" and #tab > 0 and modifier .. "." .. tostring(math.random(#tab)))
or (tab and modifier)
or (topic_tab.GENERIC and "GENERIC")
or (#topic_tab > 0 and tostring(math.random(#topic_tab)))
if postfix then
return base_str .. "." .. postfix
end
else
local postfix =
(topic_tab.GENERIC and "GENERIC")
or (#topic_tab > 0 and tostring(math.random(#topic_tab)))
if postfix then
return base_str .. "." .. postfix
end
end
end
local function getcharacterstring(base_str, tab, item, modifier)
if tab then
local topic_tab = tab[item]
if type(topic_tab) == "string" then
return base_str .. "." .. item
elseif type(topic_tab) == "table" then
base_str = base_str .. "." .. item
return getmodifiedstring(base_str, topic_tab, modifier)
end
end
end
function GetStringCode(inst, stringtype, modifier, stringformat, params)
local character =
type(inst) == "string"
and inst
or (inst ~= nil and inst.prefab or nil)
character = character ~= nil and string.upper(character) or nil
local specialcharacter =
type(inst) == "table"
and ((inst:HasTag("mime") and "mime") or
(inst:HasTag("playerghost") and "ghost"))
or character
if GetSpecialCharacterString(specialcharacter) then
return
end
if stringtype then
stringtype = string.upper(stringtype)
end
if modifier then
if type(modifier) == "table" then
for i, v in ipairs(modifier) do
modifier[i] = string.upper(v)
end
else
modifier = string.upper(modifier)
end
end
local str = character
and getcharacterstring("CHARACTERS."..character, STRINGS.CHARACTERS[character], stringtype, modifier)
or getcharacterstring("CHARACTERS.GENERIC", STRINGS.CHARACTERS.GENERIC, stringtype, modifier)
if str then
local ret = {
strtype = stringformat,
content = str,
params = params
}
return EncodeStrCode(ret)
end
end
local get_string = GetString
function GetString(inst, stringtype, modifier, ...)
return GetStringCode(inst, stringtype, modifier)
or get_string(inst, stringtype, modifier, ...)
end
function GetDescriptionCode(inst, item, modifier, strtype, params)
local character =
type(inst) == "string"
and inst
or (inst ~= nil and inst.prefab or nil)
character = character ~= nil and string.upper(character) or nil
local itemname = item.nameoverride or item.components.inspectable.nameoverride or item.prefab or nil
itemname = itemname ~= nil and string.upper(itemname) or nil
if modifier then
if type(modifier) == "table" then
for i, v in ipairs(modifier) do
modifier[i] = string.upper(v)
end
else
modifier = string.upper(modifier)
end
end
local specialcharacter =
type(inst) == "table"
and ((inst:HasTag("mime") and "mime") or
(inst:HasTag("playerghost") and "ghost"))
or character
if GetSpecialCharacterString(specialcharacter) then
return
end
local ret = {
strtype = strtype,
content = {},
params = params
}
local character_speech = character and STRINGS.CHARACTERS[character]
local str = character_speech
and getcharacterstring("CHARACTERS."..character..".DESCRIBE", character_speech.DESCRIBE, itemname, modifier)
or getcharacterstring("CHARACTERS.GENERIC.DESCRIBE", STRINGS.CHARACTERS.GENERIC.DESCRIBE, itemname, modifier)
if str then
table.insert(ret.content, str)
end
if item and item.components.repairable and not item.components.repairable.noannounce and item.components.repairable:NeedsRepairs() then
str = character
and getcharacterstring("CHARACTERS."..character, character_speech, "ANNOUNCE_CANFIX", modifier)
or getcharacterstring("CHARACTERS.GENERIC", STRINGS.CHARACTERS.GENERIC, "ANNOUNCE_CANFIX", modifier)
if str then
table.insert(ret.content, str)
end
end
return #ret.content > 0 and EncodeStrCode(ret) or nil
end
local get_description = GetDescription
function GetDescription(inst, item, modifier, ...)
return GetDescriptionCode(inst, item, modifier)
or get_description(inst, item, modifier, ...)
end
function GetActionFailStringCode(inst, action, reason, strtype, params)
local character =
type(inst) == "string"
and inst
or (inst ~= nil and inst.prefab or nil)
character = character ~= nil and string.upper(character) or nil
local specialcharacter =
type(inst) == "table"
and ((inst:HasTag("mime") and "mime") or
(inst:HasTag("playerghost") and "ghost"))
or character
if GetSpecialCharacterString(specialcharacter) then
return
end
if action then
action = string.upper(action)
end
if reason then
if type(reason) == "table" then
for i, v in ipairs(reason) do
reason[i] = string.upper(v)
end
else
reason = string.upper(reason)
end
end
local character_speech = character and STRINGS.CHARACTERS[character]
local str = character_speech
and getcharacterstring("CHARACTERS."..character..".ACTIONFAIL", character_speech.ACTIONFAIL, action, reason)
or getcharacterstring("CHARACTERS.GENERIC.ACTIONFAIL", STRINGS.CHARACTERS.GENERIC.ACTIONFAIL, action, reason)
or (
CUSTOMFAILSTR and character_speech
and "CHARACTERS."..character..".ACTIONFAIL_GENERIC"
or "CHARACTERS.GENERIC.ACTIONFAIL_GENERIC"
)
local ret = {
strtype = strtype,
content = str,
params = params
}
return EncodeStrCode(ret)
end
local get_action_fail_string = GetActionFailString
GetActionFailString = function(inst, action, reason, ...)
return GetActionFailStringCode(inst, action, reason)
or get_action_fail_string(inst, action, reason, ...)
end
local function vanilla_subfmt(s, tab)
return (s:gsub('(%b{})', function(w) return tab[w:sub(2, -2)] or w end))
end
function subfmt(s, tab)
local str = STRCODE_SUBFMT[s]
if str then
local ret = {
strtype = "subfmt",
content = str,
params = tab
}
return EncodeStrCode(ret)
end
return vanilla_subfmt(s, tab)
end
local function get_string_from_field(str)
local val = STRINGS
for v in str:gmatch("[^%.]+") do
local modifier = tonumber(v) or v
val = val[modifier]
if val == nil then
return
end
end
return val
end
function ResolveStrCode(message)
if type(message) ~= "string" then
return
end
local data = json.decode(message)
if not data then
return
end
local res = ""
if type(data.content) == "table" then
for _, str in ipairs(data.content) do
if str:find("^%$") then
res = res .. str:sub(2, -1)
else
local val = get_string_from_field(str)
if val then
res = res .. val
end
end
end
else
res = get_string_from_field(data.content)
end
if data.params then
for k, v in pairs(data.params) do
if IsStrCode(v) then
data.params[k] = get_string_from_field(SubStrCode(v))
end
end
else
data.params = {}
end
if data.strtype == "format" then
res = string.format(res, unpack(data.params))
elseif data.strtype == "subfmt" then
res = vanilla_subfmt(res, data.params)
end
return res
end
-- Components Talker --
local Talker = require("components/talker")
local enable_say_parse = true
local TalkerSay = Talker.Say
function Talker:Say(script, time, noanim, ...)
if enable_say_parse then
if IsStrCode(script) then
self:SpeakStrCode(SubStrCode(script), time, noanim)
return
elseif TheWorld.ismastersim then
local strcode = STRCODE_TALKER[script]
if strcode then
self:SpeakStrCode(json.encode({content = strcode}), time, noanim)
return
end
end
end
return TalkerSay(self, script, time, noanim, ...)
end
local function OnSpeakerDirty(inst)
local self = inst.components.talker
local strcode = self.str_code_speaker.strcode:value()
if #strcode > 0 then
local str = ResolveStrCode(strcode)
if str ~= nil then
local time = self.str_code_speaker.strtime:value()
local forcetext = self.str_code_speaker.forcetext:value()
enable_say_parse = false
self:Say(str, time > 0 and time or nil, forcetext, forcetext, true)
enable_say_parse = true
return
end
end
self:ShutUp()
end
function Talker:MakeStringCodeSpeaker()
if self.str_code_speaker == nil then
self.str_code_speaker =
{
strcode = net_string(self.inst.GUID, "talker.str_code_speaker.strcode", "speakerdirty"),
strtime = net_tinybyte(self.inst.GUID, "talker.str_code_speaker.strtime"),
forcetext = net_bool(self.inst.GUID, "talker.str_code_speaker.forcetext"),
}
if not TheWorld.ismastersim then
self.inst:ListenForEvent("speakerdirty", OnSpeakerDirty)
end
end
end
local function OnCancelSpeaker(inst, self)
self.str_code_speaker.task = nil
self.str_code_speaker.strcode:set_local("")
end
-- TODO: Make a net event for repeat speech
--NOTE: forcetext translates to noanim + force say
function Talker:SpeakStrCode(strcode, time, forcetext)
-- print("SpeakStrCode", strcode)
if self.str_code_speaker ~= nil and TheWorld.ismastersim then
self.str_code_speaker.strcode:set(strcode)
self.str_code_speaker.strtime:set(time or 0)
self.str_code_speaker.forcetext:set(forcetext == true)
if self.str_code_speaker.task ~= nil then
self.str_code_speaker.task:Cancel()
end
self.str_code_speaker.task = self.inst:DoTaskInTime(1, OnCancelSpeaker, self)
OnSpeakerDirty(self.inst)
end
end
local OnRemoveFromEntity = Talker.OnRemoveFromEntity
function Talker:OnRemoveFromEntity(...)
self.inst:RemoveEventCallback("speakerdirty", OnSpeakerDirty)
return OnRemoveFromEntity(self, ...)
end
AddPlayerPostInit(function(inst)
local talker = inst.components.talker
if talker then
talker:MakeStringCodeSpeaker()
end
end)
local ChatHistoryOnSay = ChatHistory.OnSay
function ChatHistory:OnSay(guid, userid, netid, name, prefab, message, ...)
if IsStrCode(message) then
message = ResolveStrCode(SubStrCode(message))
end
return ChatHistoryOnSay(self, guid, userid, netid, name, prefab, message, ...)
end
local networking_announcement = Networking_Announcement
function Networking_Announcement(message, ...)
if IsStrCode(message) then
message = ResolveStrCode(SubStrCode(message))
end
return networking_announcement(message, ...)
end
local announce = NetworkProxy.Announce
function NetworkProxy:Announce(message, ...)
local strcode = STRCODE_ANNOUNCE[message]
if strcode then
message = EncodeStrCode({content = strcode})
end
return announce(self, message, ...)
end
AddClassPostConstruct("components/named_replica", function(self, inst)
local function OnNameDirty(inst)
local name = inst.replica.named._name:value()
inst.name = name ~= ""
and (IsStrCode(name) and ResolveStrCode(SubStrCode(name)) or name)
or STRINGS.NAMES[string.upper(inst.prefab)]
end
if not TheWorld.ismastersim then
inst:ListenForEvent("namedirty", OnNameDirty)
end
end)
local Named = require("components/named")
local named_set_name = Named.SetName
function Named:SetName(name, ...)
named_set_name(self, name, ...)
if IsStrCode(name) then
self.inst.name = ResolveStrCode(SubStrCode(name))
end
end
function Named:PickNewName()
if self.possiblenames ~= nil and #self.possiblenames > 0 then
local num = math.random(#self.possiblenames)
local name = self.possiblenames[num]
local ret
if STRCODE_POSSIBLENAMES[self.inst.prefab] then
local message = STRCODE_POSSIBLENAMES[self.inst.prefab][name]
message = type(message) == "table" and message[math.random(#message)] or "NAMES.NONE"
ret = {
content = {
message,
}
}
end
self.name = self.possiblenames[num]
self.inst.name = self.nameformat ~= nil and string.format(self.nameformat, self.name) or self.name
self.inst.name_author_netid = self.name_author_netid
self.inst.replica.named:SetName(ret and EncodeStrCode(ret) or self.name, self.inst.name_author_netid or "")
end
end
-- fix strings code for specified prefabs
modimport("main/asscleaner/special_description_code")
|
local http = require "http"
local io = require "io"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[
Enumerates usernames in Wordpress blog/CMS installations by exploiting an
information disclosure vulnerability existing in versions 2.6, 3.1, 3.1.1,
3.1.3 and 3.2-beta2 and possibly others.
Original advisory:
* http://www.talsoft.com.ar/site/research/security-advisories/wordpress-user-id-and-user-name-disclosure/
]]
---
-- @usage
-- nmap -p80 --script http-wordpress-users <target>
-- nmap -sV --script http-wordpress-users --script-args limit=50 <target>
--
-- @output
-- PORT STATE SERVICE REASON
-- 80/tcp open http syn-ack
-- | http-wordpress-users:
-- | Username found: admin
-- | Username found: mauricio
-- | Username found: cesar
-- | Username found: lean
-- | Username found: alex
-- | Username found: ricardo
-- |_Search stopped at ID #25. Increase the upper limit if necessary with 'http-wordpress-users.limit'
--
-- @args http-wordpress-users.limit Upper limit for ID search. Default: 25
-- @args http-wordpress-users.basepath Base path to Wordpress. Default: /
-- @args http-wordpress-users.out If set it saves the username list in this file.
---
author = "Paulino Calderon <calderon@websec.mx>"
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
categories = {"auth", "intrusive", "vuln"}
portrule = shortport.http
---
-- Returns the username extracted from the url corresponding to the id passed
-- If user id doesn't exists returns false
-- @param host Host table
-- @param port Port table
-- @param path Base path to WP
-- @param id User id
-- @return false if not found otherwise it returns the username
---
local function get_wp_user(host, port, path, id)
stdnse.debug2("Trying to get username with id %s", id)
local req = http.get(host, port, path.."?author="..id, { no_cache = true})
if req.status then
stdnse.debug1("User id #%s returned status %s", id, req.status)
if req.status == 301 then
local _, _, user = string.find(req.header.location, 'https?://.*/.*/(.*)/')
return user
elseif req.status == 200 then
-- Users with no posts get a 200 response, but the name is in an RSS link.
-- http://seclists.org/nmap-dev/2011/q3/812
local _, _, user = string.find(req.body, 'https?://.-/author/([^/]+)/feed/')
return user
end
end
return false
end
---
--Returns true if WP installation exists.
--We assume an installation exists if wp-login.php is found
--@param host Host table
--@param port Port table
--@param path Path to WP
--@return True if WP was found
--
local function check_wp(host, port, path)
stdnse.debug2("Checking %swp-login.php ", path)
local req = http.get(host, port, path.."wp-login.php", {no_cache=true})
if req.status and req.status == 200 then
return true
end
return false
end
---
--Writes string to file
--Taken from: hostmap.nse
--@param filename Target filename
--@param contents String to save
--@return true when successful
local function write_file(filename, contents)
local f, err = io.open(filename, "w")
if not f then
return f, err
end
f:write(contents)
f:close()
return true
end
---
--MAIN
---
action = function(host, port)
local basepath = stdnse.get_script_args(SCRIPT_NAME .. ".basepath") or "/"
local limit = stdnse.get_script_args(SCRIPT_NAME .. ".limit") or 25
local filewrite = stdnse.get_script_args(SCRIPT_NAME .. ".out")
local output = {""}
local users = {}
--First, we check this is WP
if not(check_wp(host, port, basepath)) then
if nmap.verbosity() >= 2 then
return "[Error] Wordpress installation was not found. We couldn't find wp-login.php"
else
return
end
end
--Incrementing ids to enum users
for i=1, tonumber(limit) do
local user = get_wp_user(host, port, basepath, i)
if user then
stdnse.debug1("Username found -> %s", user)
output[#output+1] = string.format("Username found: %s", user)
users[#users+1] = user
end
end
if filewrite and #users>0 then
local status, err = write_file(filewrite, table.concat(users, "\n"))
if status then
output[#output+1] = string.format("Users saved to %s\n", filewrite)
else
output[#output+1] = string.format("Error saving %s: %s\n", filewrite, err)
end
end
if #output > 1 then
output[#output+1] = string.format("Search stopped at ID #%s. Increase the upper limit if necessary with 'http-wordpress-users.limit'", limit)
return table.concat(output, "\n")
end
end
|
AddCSLuaFile();
ENT.Base = "base_anim";
ENT.Type = "anim";
ENT.PrintName = "";
ENT.Author = "";
ENT.Contact = "";
ENT.Purpose = "";
ENT.Instructions = "";
ENT.Spawnable = false;
ENT.AdminSpawnable = false;
ENT.AutomaticFrameAdvance = true;
function ENT:PostEntityPaste( ply, ent, tab )
GAMEMODE:LogSecurity( ply:SteamID(), "n/a", ply:VisibleRPName(), "Tried to duplicate " .. ent:GetClass() .. "!" );
ent:Remove();
end
function ENT:Initialize()
self:SetModel( "models/props_combine/combine_dispenser.mdl" );
if( SERVER ) then
self:PhysicsInit( SOLID_BBOX );
self:SetMoveType( MOVETYPE_VPHYSICS );
self:SetSolid( SOLID_BBOX );
local phys = self:GetPhysicsObject();
if( phys and phys:IsValid() ) then
phys:EnableMotion( false );
end
self:SetUseType( SIMPLE_USE );
end
end
function ENT:Use( ply )
if( SERVER ) then
local flag = GAMEMODE:LookupCombineFlag( ply:CombineFlag() );
if( flag ) then
if( ply:CPRationDate() == "" or util.TimeSinceDate( ply:CPRationDate() ) > 180 ) then
if( !ply:CanTakeItem( "cpration" ) ) then
net.Start( "nCombineRationTooHeavy" );
net.Send( ply );
return;
end
self:ResetSequence( self:LookupSequence( "dispense_package" ) );
self:EmitSound( Sound( "Buttons.snd6" ) );
net.Start( "nCombineRation" );
net.Send( ply );
ply:GiveItem( "cpration" );
ply:SetCPRationDate( os.date( "!%m/%d/%y %H:%M:%S" ) );
ply:UpdateCharacterField( "CPRationDate", ply:CPRationDate() );
else
self:EmitSound( Sound( "Buttons.snd10" ) );
net.Start( "nCombineRationTooEarly" );
net.Send( ply );
end
else
self:EmitSound( Sound( "Buttons.snd10" ) );
net.Start( "nCombineRationNotCP" );
net.Send( ply );
end
end
end
function ENT:Think()
self:NextThink( CurTime() );
return true;
end
if( CLIENT ) then
function nCombineRation( len )
GAMEMODE:AddChat( Color( 200, 200, 200, 255 ), "CombineControl.ChatNormal", "You take your ration.", { CB_ALL, CB_IC } );
end
net.Receive( "nCombineRation", nCombineRation );
function nCombineRationNotCP( len )
GAMEMODE:AddChat( Color( 200, 0, 0, 255 ), "CombineControl.ChatNormal", "You're not a Civil Protection officer. Stealing is illegal, you know!", { CB_ALL, CB_IC } );
end
net.Receive( "nCombineRationNotCP", nCombineRationNotCP );
function nCombineRationTooHeavy( len )
GAMEMODE:AddChat( Color( 200, 0, 0, 255 ), "CombineControl.ChatNormal", "Your inventory is too full to carry the ration.", { CB_ALL, CB_IC } );
end
net.Receive( "nCombineRationTooHeavy", nCombineRationTooHeavy );
function nCombineRationTooEarly( len )
GAMEMODE:AddChat( Color( 200, 0, 0, 255 ), "CombineControl.ChatNormal", "The distribution machine only distributes one ration every three hours.", { CB_ALL, CB_IC } );
end
net.Receive( "nCombineRationTooEarly", nCombineRationTooEarly );
end
function ENT:CanPhysgun()
return false;
end |
local paq = require("paq")
local g = vim.g
local opt = vim.opt
local cmd = vim.api.nvim_command
g.mapleader = "\\"
g.maplocalleader = ","
paq {
"savq/paq-nvim",
"nvim-lualine/lualine.nvim",
"ckipp01/stylua-nvim",
"rktjmp/lush.nvim",
}
opt.runtimepath:append("~/kitchen/teaspoon.nvim")
opt.termguicolors = true
opt.syntax = "ON"
cmd("colorscheme teaspoon")
require("lualine").setup {
theme = "teaspoon",
}
opt.number = true
opt.relativenumber = false
opt.cursorline = true
opt.colorcolumn = "80"
opt.scrolloff = 1
opt.errorbells = false
opt.visualbell = false
opt.signcolumn = "yes"
opt.autoindent = true
opt.smartindent = true
opt.mouse = "a"
opt.pumheight = 10
opt.encoding = "utf-8"
opt.fileencoding = "utf-8"
opt.tabstop = 2
opt.shiftwidth = 2
opt.expandtab = true
opt.softtabstop = 2
opt.list = true
opt.listchars = { tab = "→ ", trail = "¬" }
opt.showbreak = "···"
opt.ignorecase = true
opt.smartcase = true
opt.incsearch = true
opt.hlsearch = true
|
local M = {}
local g = vim.g
local config = vim.g
M.get_theme_tb = function(name, type)
local default_path = "base46.themes." .. name
local user_path = "custom.themes." .. name
local present1, default_theme = pcall(require, default_path)
local present2, user_theme = pcall(require, user_path)
if present1 then
return default_theme[type]
elseif present2 then
return user_theme[type]
else
error "No such theme bruh >_< "
end
end
M.get_colors = function(type)
local i, j = string.find(vim.g.theme, "-NvChad")
local name = ""
if i then
name = string.sub(vim.g.theme, 1, (i - 1))
end
return M.get_theme_tb(name, type)
end
M.merge_tb = function(table1, table2)
return vim.tbl_deep_extend("force", table1, table2)
end
-- credits to https://github.com/max397574 for this function
M.clear_highlights = function(hl_group)
local highlights_raw = vim.split(vim.api.nvim_exec("filter " .. hl_group .. " hi", true), "\n")
local highlight_groups = {}
for _, raw_hi in ipairs(highlights_raw) do
table.insert(highlight_groups, string.match(raw_hi, hl_group .. "%a+"))
end
for _, highlight in ipairs(highlight_groups) do
vim.cmd([[hi clear ]] .. highlight)
end
end
M.load_theme = function()
-- set bg option
local theme_type = M.get_colors "type" -- dark/light
vim.opt.bg = theme_type
local reload = require("plenary.reload").reload_module
local clear_hl = require("base46").clear_highlights
clear_hl "BufferLine"
clear_hl "TS"
-- reload highlights for theme switcher
reload "base46.integrations"
reload "base46.chadlights"
require "base46.term"
require "base46.chadlights"
end
M.override_theme = function(default_theme, theme_name)
local changed_themes = config.ui.changed_themes
if changed_themes[theme_name] then
return M.merge_tb(default_theme, changed_themes[theme_name])
else
return default_theme
end
end
M.toggle_theme = function()
local themes = config.ui.theme_toggle
local theme1 = themes[1]
local theme2 = themes[2]
if g.nvchad_theme == theme1 or g.nvchad_theme == theme2 then
if g.toggle_theme_icon == " " then
g.toggle_theme_icon = " "
else
g.toggle_theme_icon = " "
end
end
if g.nvchad_theme == theme1 then
g.nvchad_theme = theme2
require("nvchad").reload_theme()
require("nvchad").change_theme(theme1, theme2)
elseif g.nvchad_theme == theme2 then
g.nvchad_theme = theme1
require("nvchad").reload_theme()
require("nvchad").change_theme(theme2, theme1)
else
vim.notify "Set your current theme to one of those mentioned in the theme_toggle table (chadrc)"
end
end
M.toggle_transparency = function()
local transparency_status = require("core.utils").load_config().ui.transparency
local write_data = require("nvchad").write_data
local function save_chadrc_data()
local old_data = "transparency = " .. tostring(transparency_status)
local new_data = "transparency = " .. tostring(g.transparency)
write_data(old_data, new_data)
end
if g.transparency then
g.transparency = false
M.load_theme()
save_chadrc_data()
else
g.transparency = true
M.load_theme()
save_chadrc_data()
end
end
return M
|
local name = 'icons'
local utils = require('utils').start_script(name)
local M = {}
M.sign_icons = {
Error = "",
Warn = "",
Hint = "",
Info = "",
Okay = "✅",
}
M.kind_icons = {
Text = "",
Method = "m",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
utils.end_script(name)
return M
|
slot0 = class("AmusementParkShopMediator", import("view.base.ContextMediator"))
slot0.ON_ACT_SHOPPING = "AmusementParkShopMediator:ON_ACT_SHOPPING"
slot0.GO_SCENE = "GO_SCENE"
slot0.register = function (slot0)
slot2 = getProxy(ActivityProxy).getActivityByType(slot1, ActivityConst.ACTIVITY_TYPE_SHOP_PROGRESS_REWARD)
slot0:TransActivity2ShopData(slot2)
slot0:AddSpecialList(slot2)
slot0:bind(slot0.ON_ACT_SHOPPING, function (slot0, slot1, slot2, slot3, slot4)
slot0:sendNotification(GAME.ACTIVITY_SHOP_PROGRESS_REWARD, {
activity_id = slot1,
cmd = slot2,
arg1 = slot3,
arg2 = slot4
})
end)
slot0.bind(slot0, slot0.GO_SCENE, function (slot0, slot1, ...)
slot0:sendNotification(GAME.GO_SCENE, slot1, ...)
end)
slot0.HandleSpecialReach(slot0, slot2)
end
slot0.TransActivity2ShopData = function (slot0, slot1)
if slot1 and not slot1:isEnd() then
slot0.viewComponent:SetShop(ActivityShop.New(slot1))
end
end
slot0.AddSpecialList = function (slot0, slot1)
slot2 = {}
if pg.gameset.activity_lottery_rewards then
slot3 = ipairs
slot4 = pg.gameset.activity_lottery_rewards.description or {}
for slot6, slot7 in slot3(slot4) do
table.insert(slot2, {
type = slot7[2][1],
id = slot7[2][2],
count = slot7[2][3],
HasGot = table.contains(slot1.data3_list, slot7[1])
})
end
end
slot0.viewComponent:SetSpecial(slot2)
end
slot0.HandleSpecialReach = function (slot0, slot1)
if not pg.gameset.activity_lottery_rewards or not pg.gameset.activity_lottery_rewards.description then
return
end
slot2 = _.reduce(slot1.data2_list, 0, function (slot0, slot1)
return slot0 + slot1
end)
for slot6, slot7 in ipairs(pg.gameset.activity_lottery_rewards.description) do
if slot7[1] <= slot2 and not table.contains(slot1.data3_list, slot7[1]) then
slot0.sendNotification(slot0, GAME.ACTIVITY_SHOP_PROGRESS_REWARD, {
cmd = 2,
arg2 = 0,
activity_id = slot1.id,
arg1 = slot7[1]
})
return true
end
end
return false
end
slot0.listNotificationInterests = function (slot0)
return {
ActivityProxy.ACTIVITY_UPDATED,
ActivityShopWithProgressRewardCommand.SHOW_SHOP_REWARD
}
end
slot0.handleNotification = function (slot0, slot1)
slot3 = slot1:getBody()
if slot1:getName() == ActivityProxy.ACTIVITY_UPDATED then
if slot3:getConfig("type") == ActivityConst.ACTIVITY_TYPE_SHOP_PROGRESS_REWARD then
slot0:TransActivity2ShopData(slot4)
slot0:AddSpecialList(slot4)
slot0.viewComponent:UpdateView()
slot0:HandleSpecialReach(slot3)
end
elseif slot2 == ActivityShopWithProgressRewardCommand.SHOW_SHOP_REWARD then
slot0.viewComponent:emit(BaseUI.ON_ACHIEVE, slot3.awards, function ()
if slot0.shopType == 1 then
slot1.viewComponent:ShowShipWord(i18n("amusementpark_shop_success"))
elseif slot0.shopType == 2 then
slot1.viewComponent:ShowShipWord(i18n("amusementpark_shop_special"))
end
existCall(slot0.callback)
end)
end
end
return slot0
|
--[[
file:gameEnum.lua
desc:游戏枚举
auth:Caorl Luo
]]
local mgrEnum = require("managerEnum")
local class = require("class")
---@class gameEnum:managerEnum @游戏枚举
local enum = class(mgrEnum)
local this = enum
---构造
function enum:ctor()
end
---清除数据
function enum:dataClear()
end
---游戏单元
---@return senum
function enum.unit()
return "unit"
end
---人数
---@return senum
function enum.people()
return "people"
end
---准备
---@return senum
function enum.ready()
return "ready"
end
---定时
---@return senum
function enum.timer()
return "timer"
end
---百人
---@return senum
function enum.hundred()
return "hundred"
end
---旁观
---@return senum
function enum.lookon()
return "lookon"
end
---私聊
---@return senum
function enum.private()
return "private"
end
---广播
---@return senum
function enum.public()
return "public"
end
---托管
---@return senum
function enum.trustee()
return "trustee"
end
---托管-取消
---@return senum
function enum.not_trustee()
return "no_trustee"
end
---超时
---@return senum
function enum.timeout()
return "timeout"
end
---旁观
---@return senum
function enum.lookon()
return "lookon"
end
---坐下
---@return senum
function enum.sitdown()
return "sitdown"
end
---起立
---@return senum
function enum.standup()
return "standup"
end
---进入
---@return senum
function enum.enter()
return "enter"
end
---离开
---@return senum
function enum.leave()
return "leave"
end
---踢出
---@return senum
function enum.kickout()
return "kickout"
end
---空闲
---@return senum
function enum.idle()
return "idle"
end
---游戏
---@return senum
function enum.game()
return "game"
end
---场景
---@return senum
function enum.scene()
return "scene"
end
---扣分
---@return senum
function enum.deduct()
return "deduct"
end
---庄
---@return senum
function enum.banker()
return "banker"
end
---闲
---@return senum
function enum.player()
return "player"
end
return enum |
sptbl["biquad"] = {
files = {
module = "biquad.c",
header = "biquad.h",
--example = "ex_tone.c",
},
func = {
create = "sp_biquad_create",
destroy = "sp_biquad_destroy",
init = "sp_biquad_init",
compute = "sp_biquad_compute",
},
params = {
optional = {
{
name = "b0",
type = "SPFLOAT",
description = "biquad coefficient.",
default = 0
},
{
name = "b1",
type = "SPFLOAT",
description = "biquad coefficient.",
default = 0
},
{
name = "b2",
type = "SPFLOAT",
description = "biquad coefficient.",
default = 0
},
{
name = "a0",
type = "SPFLOAT",
description = "biquad coefficient.",
default = 0
},
{
name = "a1",
type = "SPFLOAT",
description = "biquad coefficient.",
default = 0
},
{
name = "a2",
type = "SPFLOAT",
description = "biquad coefficient.",
default = 0
}
}
},
modtype = "module",
description = [[A sweepable biquadratic general purpose filter
]],
ninputs = 1,
noutputs = 1,
inputs = {
{
name = "input",
description = "Signal input."
},
},
outputs = {
{
name = "out",
description = "Signal output."
},
}
}
|
-- * _JOKER_VERSION: 0.0.1 ** Please do not modify this line.
--[[----------------------------------------------------------
Joker - Jokes, Riddles, Fun Facts, & Other Tomfoolery
----------------------------------------------------------
*
* COMPILATION: Your Custom Ready Check messages!
*
* SOURCES:
* It's common practice & kindess to cite any non-original jokes:
* e.g. https://icanhazdadjoke.com,
* Reddit Search,
* Reader's Digest,
* My Friend Bob,
* etc
*
]]--
JokerData = JokerData or {}
JokerData.Config = JokerData.Config or {}
JokerData.CustomReadyChecks = {
"Go get 'em, Tiger!",
"Life is like a box of chocolates..."
}
|
local item_dao = LoadApplication('models.dao.item'):new()
local page_dao = LoadApplication('models.dao.page'):new()
local ItemService = {}
function ItemService:getItem(uid)
return item_dao:getItem(uid)
end
function ItemService:save(data)
return item_dao:save(data)
end
function ItemService:getPage(item_id)
return item_dao:getPage(item_id)
end
function ItemService:getItemList(item_id)
return page_dao:getItemList(item_id)
end
function ItemService:catList(item_id)
return item_dao:catList(item_id)
end
function ItemService:cat(cat_id)
return item_dao:cat(cat_id)
end
function ItemService:savecat(data)
return item_dao:savecat(data)
end
function ItemService:delcat(cat_id)
return item_dao:delcat(cat_id)
end
return ItemService |
local typedefs = require "kong.db.schema.typedefs"
local strings_array = {
type = "array",
default = {},
elements = { type = "string" },
}
local strings_array_record = {
type = "record",
fields = {
{ body = strings_array },
{ headers = strings_array },
{ querystring = strings_array },
},
}
local colon_strings_array = {
type = "array",
default = {},
elements = { type = "string", match = "^[^:]+:.*$" },
}
local colon_strings_array_record = {
type = "record",
fields = {
{ body = colon_strings_array },
{ headers = colon_strings_array },
{ querystring = colon_strings_array },
},
}
return {
name = "request-transformer",
fields = {
{ run_on = typedefs.run_on_first },
{ protocols = typedefs.protocols_http },
{ config = {
type = "record",
fields = {
{ http_method = typedefs.http_method },
{ remove = strings_array_record },
{ rename = colon_strings_array_record },
{ replace = colon_strings_array_record },
{ add = colon_strings_array_record },
{ append = colon_strings_array_record },
}
},
},
}
}
|
local json = require 'json-beautify'
local VERSION = "2.4.2"
local package = require 'package.package'
local fsu = require 'fs-utility'
package.version = VERSION
package.__metadata = {
id = "3a15b5a7-be12-47e3-8445-88ee3eabc8b2",
publisherDisplayName = "sumneko",
publisherId = "fb626675-24cf-4881-8c13-b465f29bec2f",
}
local encodeOption = {
newline = '\r\n',
indent = ' ',
}
print('生成 package.json')
fsu.saveFile(ROOT / 'package.json', json.beautify(package, encodeOption) .. '\r\n')
print('生成 package.nls.json')
fsu.saveFile(ROOT / 'package.nls.json', json.beautify(require 'package.nls', encodeOption))
print('生成 package.nls.zh-cn.json')
fsu.saveFile(ROOT / 'package.nls.zh-cn.json', json.beautify(require 'package.nls-zh-cn', encodeOption))
|
local json = require("lib/json")
barrel = {}
barrel.new = function(x, y, physicsWorld)
local self = {}
self.x = x
self.y = y
self.playerX = 0
self.playerY = 0
self.scale = 0
self.enemySize = 1
self.enemyOffsetX = 32
self.enemyOffsetY = 32
self.visible = true
self.physics = {}
self.physics.world = physicsWorld
self.physics.body = love.physics.newBody(
self.physics.world,
self.x,
self.y,
"dynamic")
self.physics.shape = love.physics.newCircleShape(32)
self.physics.fixture = love.physics.newFixture(
self.physics.body,
self.physics.shape,
1
)
self.physics.fixture:setUserData(self)
self.elapsedTime = 0
self.currentFrame = 1
self.enemySprites = love.graphics.newImage("assets/characters/barrel/barrel.png")
self.frames = {}
self.enemySpritesJson = json.decode(love.filesystem.read('assets/characters/barrel/barrel.json'))
for k, v in pairs(self.enemySpritesJson.frames) do
self.frames[k] = love.graphics.newQuad(
v.frame.x, v.frame.y, v.frame.w, v.frame.h,
self.enemySprites:getDimensions()
)
end
self.destroy = function()
self.visible = false
self.physics.fixture:destroy()
end
self.destroyed = function()
return not self.visible
end
self.activeFrame = self.frames[self.currentFrame]
self.draw = function(self, screenX, screenY)
if not self.visible then
return
end
love.graphics.draw(
self.enemySprites,
self.activeFrame,
self.playerX + screenX,
self.playerY + screenY,
0,
self.scale,
self.enemySize
)
end
self.type = function()
return "spawnable"
end
self.canHurt = function()
return 1
end
self.getX = function()
return self.playerX
end
self.getY = function()
return self.playerY
end
self.update = function(self, dt, map)
self.elapsedTime = self.elapsedTime + dt
if(self.elapsedTime > 0.01) then
self.currentFrame = self.currentFrame + 1
if(self.currentFrame > table.getn(self.frames)) then
self.currentFrame = 1
end
self.elapsedTime = 0
end
self.activeFrame = self.frames[self.currentFrame]
local velocity = ({self.physics.body:getLinearVelocity()})[1];
self.scale = -self.enemySize
local offset = self.enemyOffsetX
if(velocity > 0) then
offset = -self.enemyOffsetX
self.scale = self.enemySize
end
self.playerX = self.physics.body:getX() + offset
self.playerY = self.physics.body:getY() - self.enemyOffsetY
end
return self
end |
ITEM.name = "Light body armor"
ITEM.desc = ""
ITEM.model = "models/Items/BoxMRounds.mdl"
ITEM.defDurability = 1000
ITEM.damageReduction = 0.15
ITEM.replacement = nil
ITEM.noCollisionGroup = true
ITEM.price = 50000
ITEM.speedModify = -10
ITEM.rarity = { weight = 20 }
-- ix.anim.SetModelClass(ITEM.replacement, "player") |
resource_type 'gametype' { name = 'DevoNetwork' }
client_script 'fivem_client.lua' |
DefineClass.XCreditsWindow = {
__parents = { "XScrollArea" },
paused = false,
time_step = 100,
Clip = "self",
Background = RGBA(0, 0, 0, 58),
Margins = box(0, 0, 0, -200),
ChildrenHandleMouse = false,
VScroll = "idScrollCredits",
}
function XCreditsWindow:Init()
XText:new({
Id = "idCredits",
HAlign = "center",
ChildrenHandleMouse = false,
TextStyle = "UICredits",
TextHAlign = "center",
}, self)
XScroll:new({
Id = "idScrollCredits",
}, self)
self:SetTextData()
self:MoveThread()
self:SetFocus()
end
function XCreditsWindow:SetTextData()
local texts = {}
local lang = GetLanguage()
local voice_lang = GetVoiceLanguage()
for i = 1, #CreditContents do
local section = CreditContents[i]
if (not section.platform or Platform[section.platform])
and (not section.language or section.language == lang)
and (not section.voice_language or section.voice_language == voice_lang)
then
if section.company_name then
texts[#texts + 1] = _InternalTranslate("<style UICreditsCompanyName>" .. section.company_name .. "</style>")
texts[#texts + 1] = "\n\n\n\n\n\n\n\n\n\n\n\n\n"
end
for _, text in ipairs(section) do
local translated = _InternalTranslate(text)
if translated and translated ~= "" and translated ~= "-" then
texts[#texts + 1] = translated
texts[#texts + 1] = "\n\n\n\n\n\n\n\n\n\n\n\n\n"
end
end
if section.footer then
texts[#texts + 1] = _InternalTranslate(section.footer)
texts[#texts + 1] = "\n\n\n\n\n\n\n\n\n\n\n\n\n"
end
texts[#texts + 1] = "\n\n\n\n\n\n\n\n"
end
end
self.idCredits:SetText(table.concat(texts))
end
function XCreditsWindow:MoveThread()
self:CreateThread("scroll", function()
local text_ctrl = self.idCredits
local height = text_ctrl.text_height
local tStart = GetPreciseTicks()
local screeny = UIL.GetScreenSize():y()
local per_second = screeny * 60 / 1000
self:ScrollTo(0, -screeny)
local pos = -screeny
while pos < height do
if self.paused then
while self.paused do
Sleep(self.time_step)
tStart = tStart + self.time_step
end
tStart = tStart - self.time_step
end
pos = -screeny + (GetPreciseTicks() - tStart) * per_second / 1000
self:ScrollTo(0, pos)
text_ctrl:AddInterpolation{
id = "pos",
type = const.intRect,
duration = 2*self.time_step,
startRect = text_ctrl.box,
endRect = Offset(text_ctrl.box, point(0, -per_second *2*self.time_step / 1000)),
}
Sleep(self.time_step)
end
SetBackDialogMode(self.parent)
end)
end
function XCreditsWindow:OnMouseButtonUp(pt, button)
if button == "L" then
self.paused = not self.paused
return "break"
end
if button == "R" then
SetBackDialogMode(self.parent)
return "break"
end
end
function XCreditsWindow:OnShortcut(shortcut, source)
if shortcut == "Space" or shortcut == "ButtonA" then
self.paused = not self.paused
return "break"
elseif shortcut == "Escape" or shortcut == "ButtonB" then
SetBackDialogMode(self.parent)
return "break"
end
end
|
--[[*]]-- RotatorsLib --[[*]]--
require "rLib.Shared"
require "rLib.Commands"
require "rLib.ContextMenu"
require "rLib.SidePanel"
require "rLib.UI"
require "rLib.Vehicles.Armor"
require "rLib.Events/Debug"
require "rLib.Events/Vehicle"
require "rLib.UI/VehicleOverlayEditor"
return rLib
|
if require("Internet").run("https://raw.githubusercontent.com/XaverXD/OSBX/master/Installer/Main.lua") == nil then
computer.shutdown(true)
end
|
mystical_agriculture.register_normal_ore_crop("lapis_stone","lapis:lapis_stone","Lapis",2,4,mystical_agriculture.get_inv_image("lapis:lapis_stone"))
mystical_agriculture.register_normal_ore_crop("pyrite_lump","lapis:pyrite_lump","Pyrite",2,4,mystical_agriculture.get_inv_image("lapis:pyrite_lump")) |
-- EFM clipboard? - http://www.extrabit.com/copyfilenames/
-- =============================================================
-- Copyright Roaming Gamer, LLC. 2009-2016
-- =============================================================
-- License
-- =============================================================
--[[
> SSK is free to use.
> SSK is free to edit.
> SSK is free to use in a free or commercial game.
> SSK is free to use in a free or commercial non-game app.
> SSK is free to use without crediting the author (credits are still appreciated).
> SSK is free to use without crediting the project (credits are still appreciated).
> SSK is NOT free to sell for anything.
> SSK is NOT free to credit yourself with.
]]
-- =============================================================
local lfs = require "lfs"
local json = require "json"
local strGSub = string.gsub
local strSub = string.sub
local strFormat = string.format
local strFind = string.find
local pathSep = ( onWin ) and "\\" or "//"
local private = {}
local RGFiles = {}
-- =====================================================
-- HELPERS
-- =====================================================
--
-- isFolder( path ) -- Returns 'true' if path is a folder.
--
function RGFiles.isFolder( path )
if not path then
return false
end
return lfs.attributes( path, "mode" ) == "directory"
end
--
-- isFile( path ) -- Returns 'true' if path is a file.
--
function RGFiles.isFile( path )
if not path then
return false
end
return lfs.attributes( path, "mode" ) == "file"
end
--
-- dumpAttributes( path ) -- Returns 'true' if path is a file.
--
function RGFiles.dumpAttributes( path )
table.print_r( lfs.attributes( path ) or { result = tostring( path ) .. " : not found?" } )
end
--
-- repairPath( path ) -- Converts path to 'OS' correct style of back- or forward- slashes
--
function RGFiles.repairPath( path )
if( onOSX or onAndroid ) then
path = strGSub( path, "\\", "/" )
path = path strGSub( path, "//", "/" )
elseif( onWin ) then
path = strGSub( path, "/", "\\" )
end
return path
end
--
-- getPath( path [, base ] ) -- Generate and OS correct path for the specified path and base.
--
function RGFiles.getPath( path, base )
base = base or RGFiles.DocumentsDirectory
local root
if( base == RGFiles.DocumentsDirectory ) then
root = private.documentRoot
elseif( base == system.ResourceDirectory ) then
root = private.resourceRoot
elseif( base == RGFiles.TemporaryDirectory ) then
root = private.temporaryRoot
elseif( base == RGFiles.DesktopDirectory ) then
root = private.desktopPath
elseif( base == RGFiles.MyDocumentsDirectory ) then
root = private.myDocumentsPath
else
root = base
end
local fullPath = root .. path
fullPath = RGFiles.repairPath( fullPath )
return fullPath
end
--
-- explore( path ) -- Open file browser to explore a specific path.
--
-- http://www.howtogeek.com/howto/15781/open-a-file-browser-from-your-current-command-promptterminal-directory/
function RGFiles.explore( path )
local retVal
if(onWin) then
local command = "explorer " .. '"' .. path .. '"'
--print(command)
retVal = (os.execute( command ) == 0)
elseif( onOSX ) then
local command = "open " .. '"' .. path .. '"'
--print(command)
retVal = (os.execute( command ) == 0)
else -- Must be on Mobile device
-- print("No file explorer for Mobile devices (yet).""
return false
end
return retVal
end
-- =====================================================
-- System Standard Folders
-- =====================================================
private.resourceRoot = system.pathForFile('main.lua', system.ResourceDirectory)
private.documentRoot = system.pathForFile('', system.DocumentsDirectory) .. pathSep
if( not private.resourceRoot ) then
private.resourceRoot = ""
else
private.resourceRoot = private.resourceRoot:sub(1, -9)
end
private.temporaryRoot = system.pathForFile('', system.TemporaryDirectory) .. pathSep
function RGFiles.getResourceRoot() return private.resourceRoot end
function RGFiles.getDocumentsRoot() return private.documentRoot end
function RGFiles.getTemporaryRoot() return private.temporaryRoot end
RGFiles.DocumentsDirectory = system.DocumentsDirectory
RGFiles.ResourceDirectory = system.ResourceDirectory
RGFiles.TemporaryDirectory = system.TemporaryDirectory
-- =====================================================
-- Desktop ( OSX and Windows) Standard Folders
-- =====================================================
RGFiles.DesktopDirectory = {}
RGFiles.MyDocumentsDirectory = {}
--
-- getDesktop() - Returns the desktop path as a string.
--
private.desktopPath = ""
if( onWin ) then
private.desktopPath = os.getenv("appdata")
local appDataStart = string.find( private.desktopPath, "AppData" )
if( appDataStart ) then
private.desktopPath = string.sub( private.desktopPath, 1, appDataStart-1 )
private.desktopPath = private.desktopPath .. "Desktop"
end
elseif( onOSX ) then
private.desktopPath = "TBD"
end
private.desktopPath = private.desktopPath .. pathSep
function RGFiles.getDesktop( ) return private.desktopPath end
--
-- getMyDocuments() - Returns the users' documents path as a string.
--
private.myDocumentsPath = ""
if( onWin ) then
private.myDocumentsPath = os.getenv("appdata")
local appDataStart = string.find( private.myDocumentsPath, "AppData" )
if( appDataStart ) then
private.myDocumentsPath = string.sub( private.myDocumentsPath, 1, appDataStart-1 )
if( RGFiles.isFolder(private.myDocumentsPath .. "Documents") ) then
private.myDocumentsPath = private.myDocumentsPath .. "Documents"
else
private.myDocumentsPath = private.myDocumentsPath .. "My Documents" -- EFM - is this right? Win 7 and before?
end
end
elseif( onOSX ) then
private.myDocumentsPath = "TBD"
end
private.myDocumentsPath = private.myDocumentsPath .. pathSep
function RGFiles.getMyDocuments( ) return private.myDocumentsPath end
-- =====================================================
-- File Operations (excluding read, write, append which are further down in this module)
-- =====================================================
function RGFiles.copyFile( src, dst )
local retVal
if(onWin) then
local command = "copy /Y " .. '"' .. src .. '" "' .. dst .. '"'
--print(command)
retVal = (os.execute( command ) == 0)
elseif( onOSX ) then
local command = "cp " .. '"' .. src .. '" "' .. dst .. '"'
--print(command)
retVal = (os.execute( command ) == 0)
else -- Must be on Mobile device
local data = RGFiles.readFileDirect( src ) or ""
--print("Mobile Copy via read() ... write()")
retVal = RGFiles.writeFileDirect( data, dst )
end
return retVal
end
RGFiles.removeFile = os.remove
RGFiles.moveFile = os.rename
RGFiles.renameFile = os.rename
-- =====================================================
-- Folder Operations
-- =====================================================
function RGFiles.copyFolder( src, dst )
local retVal
if(onWin) then
local command = "xcopy /Y /S " .. '"' .. src .. '" "' .. dst .. '\\"'
--print(command)
retVal = (os.execute( command ) == 0)
elseif( onOSX ) then
local command = "cp -r" .. '"' .. src .. '" "' .. dst .. '"'
--print(command)
retVal = (os.execute( command ) == 0)
else -- Must be on Mobile device
error("Sorry mobile folder to folder copies not supported yet!")
-- EFM NO SOLUTION YET
retVal = false
end
return retVal
end
function RGFiles.removeFolder( path )
local retVal
if(onWin) then
local command = "rmdir /q /s " .. '"' .. path .. '"'
--print(command)
retVal = (os.execute( command ) == 0)
elseif( onOSX ) then
local command = "rm -rf " .. '"' .. path .. '"'
--print(command)
retVal = (os.execute( command ) == 0)
else -- Must be on Mobile device
error("Sorry mobile folder to folder copies not supported yet!")
retVal = lfs.rmdir( path ) -- EFM only works for empty folders
end
return retVal
end
function RGFiles.makeFolder( path )
return lfs.mkdir( path )
end
RGFiles.moveFolder = os.rename
RGFiles.renameFolder = os.rename
-- =====================================================
-- Smart Operations (figures out if it is dealing with file or folder
-- =====================================================
function RGFiles.cp( src, dst )
if( RGFiles.isFolder( src ) ) then
RGFiles.copyFolder( src, dst )
else
RGFiles.copyFile( src, dst )
end
end
function RGFiles.rm( path )
if( RGFiles.isFolder( path ) ) then
RGFiles.removeFolder( path )
else
RGFiles.removeFile( path )
end
end
RGFiles.mv = os.rename
-- =====================================================
-- Table Save & Load
-- =====================================================
--function RGFiles.saveTable() end
--function RGFiles.loadTable() end
--
-- saveTable( tbl, path, base ) -- Save a table. (base defaults to rgFile.DesktopDirectory)
--
function RGFiles.saveTable( tbl, path, base )
path = RGFiles.getPath( path, base )
--print(path)
local fh = io.open( path, "w" )
if( fh ) then
fh:write(json.encode( tbl ))
--fh:flush()
io.close( fh )
return true
end
return false
end
--
-- loadTable( path, base ) -- Load a table. (base defaults to rgFile.DesktopDirectory)
--
function RGFiles.loadTable( path, base )
path = RGFiles.getPath( path, base )
--print(path)
local fh = io.open( path, "r" )
if( fh ) then
local contents = fh:read( "*a" )
io.close( fh )
local newTable = json.decode( contents )
return newTable
else
return nil
end
end
-- =====================================================
-- File Exists, Read, Write, Append, ReadFileTable
-- =====================================================
function RGFiles.exists( path, base )
path = RGFiles.getPath( path, base )
--print(path)
if not path then return false end
local f=io.open(path,"r")
if (f == nil) then
return false
end
io.close(f)
return true
end
function RGFiles.readFile( path, base )
path = RGFiles.getPath( path, base )
--print(path)
local fileContents
local f=io.open(path,"rb")
if (f == nil) then
return nil
end
fileContents = f:read( "*a" )
io.close(f)
return fileContents
end
function RGFiles.writeFile( dataToWrite, path, base )
--print( dataToWrite, path, base )
path = RGFiles.getPath( path, base )
--print(path)
local f=io.open(path,"wb")
if (f == nil) then
return nil
end
f:write( dataToWrite )
io.close(f)
end
function RGFiles.appendFile( dataToWrite, path, base )
path = RGFiles.getPath( path, base )
--print(path)
local f=io.open(path,"a")
if (f == nil) then
return nil
end
f:write( dataToWrite )
io.close(f)
end
function RGFiles.readFileTable( path, base )
path = RGFiles.getPath( path, base )
--print(path)
local fileContents = {}
local f=io.open(path,"r")
if (f == nil) then
return fileContents
end
for line in f:lines() do
fileContents[ #fileContents + 1 ] = line
end
io.close( f )
return fileContents
end
function RGFiles.readFileDirect( path )
local file = io.open( path, "rb" )
if file then
local data = file:read( "*all" )
io.close( file )
return data
end
return nil
end
function RGFiles.writeFileDirect( content, path )
local file = io.open( path, "wb" )
if file then
file:write( content )
io.close( file )
file = nil
end
end
function RGFiles.readFileTableDirect( path )
local fileContents = {}
local f=io.open(path,"r")
if (f == nil) then
return fileContents
end
for line in f:lines() do
fileContents[ #fileContents + 1 ] = line
end
io.close( f )
return fileContents
end
-- =====================================================
-- Folder Scanners
-- =====================================================
--
-- getFilesInFolder( path ) -- Returns table of file names in folder
--
function RGFiles.getFilesInFolder( path )
if path then
local files = {}
for file in lfs.dir( path ) do
if file ~= "." and file ~= ".." and file ~= ".DS_Store" then
files[ #files + 1 ] = file
end
end
return files
end
end
--
-- findAllFiles( path ) -- Returns table of all files in folder.
--
function RGFiles.findAllFiles( path )
local tmp = RGFiles.getFilesInFolder( path )
local files = {}
for k,v in pairs( tmp ) do
files[v] = v
end
for k,v in pairs( files ) do
local newPath = path and (path .. "/" .. v) or v
local isDir = RGFiles.isFolder( newPath )
if( isDir ) then
files[v] = RGFiles.findAllFiles( newPath )
else
end
end
return files
end
--
-- flattenNames -- EFM
--
function RGFiles.flattenNames( t, sep, prefix )
local flatNames = {}
local function flatten(t,indent,_prefix)
local path
if (type(t)=="table") then
for k,v in pairs(t) do
if (type(v)=="table") then
path = (_prefix) and (_prefix .. indent .. tostring(k)) or tostring(k)
path = flatten(v,indent,path)
path = (prefix) and (prefix .. path) or path
else
path = (_prefix) and (_prefix .. indent .. tostring(k)) or tostring(k)
path = (prefix) and (prefix .. path) or path
flatNames[path] = path
end
end
else
path = (_prefix) and (_prefix .. indent .. tostring(t)) or tostring(t)
path = (prefix) and (prefix .. path) or path
flatNames[path] = path
end
return _prefix or ""
end
if (type(t)=="table") then
flatten(t,sep)
else
flatten(t,sep)
end
return flatNames
end
--
-- getLuaFiles - EFM
--
function RGFiles.getLuaFiles( files )
local luaFiles = RGFiles.flattenNames( files, "." )
for k,v in pairs(luaFiles) do
if( string.match( k, "%.lua" ) ) then
luaFiles[k] = v:gsub( "%.lua", "" )
else
luaFiles[k] = nil
end
end
local tmp = luaFiles
luaFiles = {}
for k,v in pairs(tmp) do
luaFiles[v] = v
end
return luaFiles
end
--
-- getResourceFiles - EFM could be better...
--
function RGFiles.getResourceFiles( files )
local resourceFiles = RGFiles.flattenNames( files, "/" )
for k,v in pairs(resourceFiles) do
if( string.match( k, "%.lua" ) ) then
resourceFiles[k] = nil
end
end
local tmp = resourceFiles
resourceFiles = {}
for k,v in pairs(tmp) do
resourceFiles[v] = v
end
return resourceFiles
end
--
-- keepFileTypes - EFM ??
--
function RGFiles.keepFileTypes( files, extensions )
for i = 1, #extensions do
extensions[i] = strGSub( extensions[i], "%.", "" )
end
local filesToKeep = {}
for k,v in pairs(files) do
local isMatch = false
for i = 1, #extensions do
if( string.match( v, "%." .. extensions[i] ) ) then
isMatch = true
--print(v)
end
end
if( isMatch ) then
filesToKeep[k] = v
end
end
return filesToKeep
end
----------------------------------------------------------------------
-- Attach To SSK and return
----------------------------------------------------------------------
if( _G.ssk ) then
ssk.RGFiles = RGFiles
else
_G.ssk = { RGFiles = RGFiles }
end
return RGFiles
|
local path = (...):gsub('%.[^%.]+$', '')
local util = require(path .. '.util')
local ffi = require('ffi')
local format = string.format
local function error(...)
return _G.error(..., 0)
end
local types = {}
local registered_types = {}
local global_schema = '__global__'
function types.get_env(schema_name)
if schema_name == nil then
schema_name = global_schema
end
registered_types[schema_name] = registered_types[schema_name] or {}
return registered_types[schema_name]
end
local function initFields(kind, fields)
assert(type(fields) == 'table', 'fields table must be provided')
local result = {}
for fieldName, field in pairs(fields) do
field = field.__type and { kind = field } or field
result[fieldName] = {
name = fieldName,
kind = field.kind,
description = field.description,
deprecationReason = field.deprecationReason,
arguments = field.arguments or {},
resolve = kind == 'Object' and field.resolve or nil
}
end
return result
end
function types.nonNull(kind)
assert(kind, 'Must provide a type')
return {
__type = 'NonNull',
ofType = kind
}
end
function types.list(kind)
assert(kind, 'Must provide a type')
local instance = {
__type = 'List',
ofType = kind
}
instance.nonNull = types.nonNull(instance)
return instance
end
function types.nullable(kind)
assert(type(kind) == 'table', 'kind must be a table, got ' .. type(kind))
if kind.__type ~= 'NonNull' then return kind end
assert(kind.ofType ~= nil, 'kind.ofType must not be nil')
return types.nullable(kind.ofType)
end
function types.bare(kind)
assert(type(kind) == 'table', 'kind must be a table, got ' .. type(kind))
if kind.ofType == nil then return kind end
assert(kind.ofType ~= nil, 'kind.ofType must not be nil')
return types.bare(kind.ofType)
end
function types.scalar(config)
assert(type(config.name) == 'string', 'type name must be provided as a string')
assert(type(config.serialize) == 'function', 'serialize must be a function')
assert(type(config.isValueOfTheType) == 'function', 'isValueOfTheType must be a function')
assert(type(config.parseLiteral) == 'function', 'parseLiteral must be a function')
if config.parseValue then
assert(type(config.parseValue) == 'function', 'parseValue must be a function')
end
local instance = {
__type = 'Scalar',
name = config.name,
description = config.description,
serialize = config.serialize,
parseValue = config.parseValue,
parseLiteral = config.parseLiteral,
isValueOfTheType = config.isValueOfTheType,
}
instance.nonNull = types.nonNull(instance)
return instance
end
function types.object(config)
assert(type(config.name) == 'string', 'type name must be provided as a string')
if config.isTypeOf then
assert(type(config.isTypeOf) == 'function', 'must provide isTypeOf as a function')
end
local fields
if type(config.fields) == 'function' then
fields = util.compose(util.bind1(initFields, 'Object'), config.fields)
else
fields = initFields('Object', config.fields)
end
local instance = {
__type = 'Object',
name = config.name,
description = config.description,
isTypeOf = config.isTypeOf,
fields = fields,
interfaces = config.interfaces
}
instance.nonNull = types.nonNull(instance)
types.get_env(config.schema)[config.name] = instance
return instance
end
function types.interface(config)
assert(type(config.name) == 'string', 'type name must be provided as a string')
assert(type(config.fields) == 'table', 'fields table must be provided')
if config.resolveType then
assert(type(config.resolveType) == 'function', 'must provide resolveType as a function')
end
local fields
if type(config.fields) == 'function' then
fields = util.compose(util.bind1(initFields, 'Interface'), config.fields)
else
fields = initFields('Interface', config.fields)
end
local instance = {
__type = 'Interface',
name = config.name,
description = config.description,
fields = fields,
resolveType = config.resolveType
}
instance.nonNull = types.nonNull(instance)
types.get_env(config.schema)[config.name] = instance
return instance
end
function types.enum(config)
assert(type(config.name) == 'string', 'type name must be provided as a string')
assert(type(config.values) == 'table', 'values table must be provided')
local instance
local values = {}
for name, entry in pairs(config.values) do
entry = type(entry) == 'table' and entry or { value = entry }
values[name] = {
name = name,
description = entry.description,
deprecationReason = entry.deprecationReason,
value = entry.value
}
end
instance = {
__type = 'Enum',
name = config.name,
description = config.description,
values = values,
serialize = function(name)
return instance.values[name] and instance.values[name].value or name
end
}
instance.nonNull = types.nonNull(instance)
types.get_env(config.schema)[config.name] = instance
return instance
end
function types.union(config)
assert(type(config.name) == 'string', 'type name must be provided as a string')
assert(type(config.types) == 'table', 'types table must be provided')
local instance = {
__type = 'Union',
name = config.name,
types = config.types
}
instance.nonNull = types.nonNull(instance)
types.get_env(config.schema)[config.name] = instance
return instance
end
function types.inputObject(config)
assert(type(config.name) == 'string', 'type name must be provided as a string')
local fields = {}
for fieldName, field in pairs(config.fields) do
field = field.__type and { kind = field } or field
fields[fieldName] = {
name = fieldName,
kind = field.kind
}
end
local instance = {
__type = 'InputObject',
name = config.name,
description = config.description,
fields = fields
}
types.get_env(config.schema)[config.name] = instance
return instance
end
-- Based on the code from tarantool/checks.
local function isInt(value)
if type(value) == 'number' then
return value >= -2^31 and value < 2^31 and math.floor(value) == value
end
if type(value) == 'cdata' then
if ffi.istype('int64_t', value) then
return value >= -2^31 and value < 2^31
elseif ffi.istype('uint64_t', value) then
return value < 2^31
end
end
return false
end
local function coerceInt(value)
if value ~= nil then
value = tonumber(value)
if not isInt(value) then return end
end
return value
end
types.int = types.scalar({
name = 'Int',
description = "The `Int` scalar type represents non-fractional signed whole numeric values. " ..
"Int can represent values from -(2^31) to 2^31 - 1, inclusive.",
serialize = coerceInt,
parseLiteral = function(node)
return coerceInt(node.value)
end,
isValueOfTheType = isInt,
})
-- The code from tarantool/checks.
local function isLong(value)
if type(value) == 'number' then
-- Double floating point format has 52 fraction bits. If we want to keep
-- integer precision, the number must be less than 2^53.
return value > -2^53 and value < 2^53 and math.floor(value) == value
end
if type(value) == 'cdata' then
if ffi.istype('int64_t', value) then
return true
elseif ffi.istype('uint64_t', value) then
return value < 2^63
end
end
return false
end
local function coerceLong(value)
if value ~= nil then
value = tonumber64(value)
if not isLong(value) then return end
end
return value
end
types.long = types.scalar({
name = 'Long',
description = "The `Long` scalar type represents non-fractional signed whole numeric values. " ..
"Long can represent values from -(2^52) to 2^52 - 1, inclusive.",
serialize = coerceLong,
parseLiteral = function(node)
return coerceLong(node.value)
end,
isValueOfTheType = isLong,
})
local function isFloat(value)
return type(value) == 'number'
end
local function coerceFloat(value)
if value ~= nil then
value = tonumber(value)
if not isFloat(value) then return end
end
return value
end
types.float = types.scalar({
name = 'Float',
serialize = coerceFloat,
parseLiteral = function(node)
return coerceFloat(node.value)
end,
isValueOfTheType = isFloat,
})
local function isString(value)
return type(value) == 'string'
end
local function coerceString(value)
if value ~= nil then
value = tostring(value)
if not isString(value) then return end
end
return value
end
types.string = types.scalar({
name = 'String',
description = "The `String` scalar type represents textual data, represented as UTF-8 character sequences. " ..
"The String type is most often used by GraphQL to represent free-form human-readable text.",
serialize = coerceString,
parseLiteral = function(node)
return coerceString(node.value)
end,
isValueOfTheType = isString,
})
local function toboolean(x)
return (x and x ~= 'false') and true or false
end
local function isBoolean(value)
return type(value) == 'boolean'
end
local function coerceBoolean(value)
if value ~= nil then
value = toboolean(value)
if not isBoolean(value) then return end
end
return value
end
types.boolean = types.scalar({
name = 'Boolean',
description = "The `Boolean` scalar type represents `true` or `false`.",
serialize = coerceBoolean,
parseLiteral = function(node)
if node.kind ~= 'boolean' then
error(('Could not coerce value "%s" with type "%s" to type boolean'):format(node.value, node.kind))
end
return coerceBoolean(node.value)
end,
isValueOfTheType = isBoolean,
})
--[[
The ID scalar type represents a unique identifier,
often used to refetch an object or as the key for a cache.
The ID type is serialized in the same way as a String;
however, defining it as an ID signifies that it is not intended to be human‐readable.
--]]
types.id = types.scalar({
name = 'ID',
serialize = coerceString,
parseLiteral = function(node)
return coerceString(node.value)
end,
isValueOfTheType = isString,
})
function types.directive(config)
assert(type(config.name) == 'string', 'type name must be provided as a string')
local instance = {
__type = 'Directive',
name = config.name,
description = config.description,
arguments = config.arguments,
onQuery = config.onQuery,
onMutation = config.onMutation,
onField = config.onField,
onFragmentDefinition = config.onFragmentDefinition,
onFragmentSpread = config.onFragmentSpread,
onInlineFragment = config.onInlineFragment
}
return instance
end
types.include = types.directive({
name = 'include',
description = 'Directs the executor to include this field or fragment only when the `if` argument is true.',
arguments = {
['if'] = { kind = types.boolean.nonNull, description = 'Included when true.'}
},
onField = true,
onFragmentSpread = true,
onInlineFragment = true
})
types.skip = types.directive({
name = 'skip',
description = 'Directs the executor to skip this field or fragment when the `if` argument is true.',
arguments = {
['if'] = { kind = types.boolean.nonNull, description = 'Skipped when true.' }
},
onField = true,
onFragmentSpread = true,
onInlineFragment = true
})
types.resolve = function(type_name_or_obj, schema)
if type(type_name_or_obj) == 'table' then
return type_name_or_obj
end
if type(type_name_or_obj) ~= 'string' then
error('types.resolve() expects type to be string or table')
end
local type_obj = types.get_env(schema)[type_name_or_obj]
if type_obj == nil then
error(format("No type found named '%s'", type_name_or_obj))
end
return type_obj
end
return types
|
local Migration = {}
function Migration.pack(data, migrations)
return {
data = data,
migrationVersion = #migrations,
}
end
local function assertValidMigration(oldValue, migrated, migrationVersion)
if typeof(migrated) ~= "table" then
error(string.format("Migration %i must return a table", migrationVersion))
end
if typeof(migrated.validate) ~= "function" then
error(string.format("Migration %i must return a validate function", migrationVersion))
end
if oldValue == migrated.value then
error(string.format("Migration %i changed value mutably", migrationVersion))
end
local ok, err = migrated.validate(oldValue)
if not ok then
error(string.format("Migration %i failed validation: %s", migrationVersion, err))
end
end
function Migration.unpack(migration, migrations)
local data = migration.data
local version = migration.migrationVersion
if version < #migrations then
for migrationVersion = version + 1, #migrations do
local currentData = data.data
local migrated = migrations[migrationVersion](currentData)
assertValidMigration(currentData, migrated, migrationVersion)
data.data = migrated.value
end
end
return data
end
return Migration
|
#!/usr/bin/env tarantool
local inspect = require 'libs/inspect'
local box = box
local scripts = require 'scripts'
local http_system = require 'http_system'
local scripts_drivers = require 'scripts_drivers' --TODO: переименовать в соотвествии с официальной семантикой
local scripts_webevents = require 'scripts_webevents'
local scripts_busevents = require 'scripts_busevents'
local scripts_timerevents = require 'scripts_timerevents'
local scripts_sheduleevents = require 'scripts_sheduleevents'
local bus = require 'bus'
local system = require "system"
local logger = require "logger"
local config = require 'config'
local backup_restore = require 'backup_restore'
local settings = require 'settings'
local function start()
local tarantool_bin_port = tonumber(os.getenv('TARANTOOL_BIN_PORT'))
local glial_http_port = tonumber(os.getenv('HTTP_PORT')) or config.HTTP_PORT
local tarantool_wal_dir = os.getenv('TARANTOOL_WAL_DIR') or config.dir.DATABASE
local log_type = os.getenv('LOG_TYPE') or "PIPE"
local log_point
if (log_type ~= "NONE") then
log_point = "pipe: PORT="..glial_http_port.." ./http_pipe_logger.lua"
end
system.dir_check(tarantool_wal_dir)
system.dir_check(config.dir.BACKUP)
system.dir_check(config.dir.DUMP_FILES)
box.cfg {
hot_standby = true,
listen = tarantool_bin_port,
log_level = 4,
memtx_dir = tarantool_wal_dir,
vinyl_dir = tarantool_wal_dir,
wal_dir = tarantool_wal_dir,
log = log_point
}
if (tarantool_bin_port ~= nil) then
print("Tarantool server runned on "..tarantool_bin_port.." port")
end
box.schema.user.grant('guest', 'read,write,execute', 'universe', nil, {if_not_exists = true})
logger.storage_init()
local msg_reboot = "GLIAL, "..system.version()..", tarantool "..require('tarantool').version
logger.add_entry(logger.REBOOT, "------------", msg_reboot, nil, "Tarantool pid "..require('tarantool').pid())
http_system.init(glial_http_port)
logger.http_init()
logger.add_entry(logger.INFO, "System", "HTTP subsystem initialized")
require('system_webevent').init()
settings.init()
logger.add_entry(logger.INFO, "System", "Settings database initialized")
bus.init()
logger.add_entry(logger.INFO, "System", "Bus and FIFO worker initialized")
logger.add_entry(logger.INFO, "System", "Starting script subsystem...")
scripts.init()
if (tonumber(os.getenv('SAFEMODE')) == 1 and tonumber(os.getenv('TARANTOOL_CONSOLE')) ~= 1) then
scripts.safe_mode_error_all()
else
logger.add_entry(logger.INFO, "System", "Starting web-events...")
scripts_webevents.init()
logger.add_entry(logger.INFO, "System", "Starting bus-events...")
scripts_busevents.init()
logger.add_entry(logger.INFO, "System", "Starting timer-events...")
scripts_timerevents.init()
logger.add_entry(logger.INFO, "System", "Starting shedule-events...")
scripts_sheduleevents.init()
logger.add_entry(logger.INFO, "System", "Starting drivers...")
scripts_drivers.init()
end
backup_restore.init()
backup_restore.create_backup("Backup after start")
logger.add_entry(logger.INFO, "System", "Backup created")
backup_restore.remove_old_files()
logger.add_entry(logger.INFO, "System", "System started")
if (tonumber(os.getenv('TARANTOOL_CONSOLE')) == 1) then
logger.add_entry(logger.INFO, "System", "Console active")
if pcall(require('console').start) then
os.exit(0)
end
end
end
return {start = start}
|
-- hypercube.
--
-- @eigen
--
--
-- K1 held is SHIFT
--
-- E1: zoom in/out
-- E2: camera x axis
-- E3: camera y axis
--
-- SHIFT+K2: toggle multi-axis
-- SHIFT+E1: rotate x axis
-- SHIFT+E2: rotate y axis
-- SHIFT+E3: rotate z axis
-- K2: toggle auto-rotate
-- K3: emmergency stop
-- ------------------------------------------------------------------------
-- requires
include('lib/3d/utils/core')
local Wireframe = include('lib/3d/wireframe')
local Sphere = include('lib/3d/sphere')
local draw_mode = include('lib/3d/enums/draw_mode')
-- ------------------------------------------------------------------------
-- conf
local fps = 30
-- ------------------------------------------------------------------------
-- init
function init()
screen.aa(1)
-- screen.aa(0)
screen.line_width(1)
end
redraw_clock = clock.run(
function()
local step_s = 1 / fps
while true do
clock.sleep(step_s)
redraw()
end
end)
function cleanup()
clock.cancel(redraw_clock)
end
-- ------------------------------------------------------------------------
-- state
model_s = Sphere.new(10)
model = Wireframe.new(
{{-1,-1,-1}, -- points
{-1,-1,1},
{1,-1,1},
{1,-1,-1},
{-1,1,-1},
{-1,1,1},
{1,1,1},
{1,1,-1},
{-0.5,-0.5,-0.5}, -- inside
{-0.5,-0.5,0.5},
{0.5,-0.5,0.5},
{0.5,-0.5,-0.5},
{-0.5,0.5,-0.5},
{-0.5,0.5,0.5},
{0.5,0.5,0.5},
{0.5,0.5,-0.5}},
{{1,2}, -- lines
{2,3},
{3,4},
{4,1},
{5,6},
{6,7},
{7,8},
{8,5},
{1,5},
{2,6},
{3,7},
{4,8},
{8+1,8+2}, -- inside
{8+2,8+3},
{8+3,8+4},
{8+4,8+1},
{8+5,8+6},
{8+6,8+7},
{8+7,8+8},
{8+8,8+5},
{8+1,8+5},
{8+2,8+6},
{8+3,8+7},
{8+4,8+8},
{1,9},--
{2,10},
{3,11},
{4,12},
{5,13},
{6,14},
{7,15},
{8,16}})
-- init
cam = {0,0,-4} -- Initilise the camera position
mult = 64 -- View multiplier
a = flr(rnd(3))+1 -- Angle for random rotation
t = flr(rnd(50))+25 -- Time until next angle change
rot_speed = 0
rot_speed_a = {0,0,0} -- Independant angle rotation
independant_rot_a = False
prev_a = nil
random_angle = false
is_shift = false
-- ------------------------------------------------------------------------
-- USER INPUT
function key(id,state)
if id == 1 then
if state == 0 then
is_shift = false
else
is_shift = true
end
elseif id == 2 then
if state == 0 then
if is_shift then
independant_rot_a = not independant_rot_a
if not independant_rot_a then
print("independant angle rotation off")
rot_speed = rot_speed_a[1] + rot_speed_a[2] + rot_speed_a[3]
else
print("independant angle rotation on")
rot_speed_a = {0,0,0}
rot_speed_a[a] = rot_speed
end
else
random_angle = not random_angle
if not random_angle then
print("random rotation off")
rot_speed = 0
else
print("random rotation on")
independant_rot_a = false
rot_speed = 0.01
end
end
end
elseif id == 3 then
if state == 0 then
print("emergency stop!")
random_angle = False
rot_speed = 0
rot_speed_a = {0,0,0}
end
end
end
function enc(id,delta)
if id == 1 then
if is_shift then
a = 3
else
cam[3] = cam[3] + delta / 5
end
elseif id == 2 then
if is_shift then
a = 2
else
cam[1] = cam[1] - delta / 10
end
elseif id == 3 then
if is_shift then
a = 1
else
cam[2] = cam[2] - delta / 10
end
end
if is_shift then
local sign = 1
if delta < 0 then
sign = -1
end
if id == 2 then
sign = -sign
end
if not independant_rot_a then
if prev_a == a then
rot_speed = util.clamp(rot_speed + 0.01 * sign, -0.05, 0.05)
else
rot_speed = 0.01 * sign
end
prev_a = a
else
rot_speed_a[a] = util.clamp(rot_speed_a[a] + 0.005 * sign, -0.03, 0.03)
end
end
end
-- ------------------------------------------------------------------------
-- MAIN LOOP
function redraw()
if random_angle then
t = t - 1 -- Decrease time until next angle change
if t <= 0 then -- If t is 0 then change the random angle and restart the timer
t = flr(rnd(50))+25 -- Restart timer
a = flr(rnd(3))+1 -- Update angle
end
end
local nClock = os.clock()
if not independant_rot_a then
model:rotate(a, rot_speed)
else
model:rotate(1, rot_speed_a[1])
model:rotate(2, rot_speed_a[2])
model:rotate(3, rot_speed_a[3])
end
-- print("rotation took "..os.clock()-nClock)
screen.clear()
nClock = os.clock()
model:draw(5, draw_mode.WIREFRAME, mult, cam)
-- print("drawing took "..os.clock()-nClock)
-- model_s:draw(10, nil, mult, cam)
screen.update()
end
|
-- StandService.lua
-- Coltrane Willsey
-- 2022-03-13 [13:33]
local common = game:GetService("ReplicatedStorage").common
local Packages = common.Packages
local Promise = require(Packages.promise)
local Trove = require(Packages.trove)
local Tween = require(Packages.tween)
local Knit = require(Packages.knit)
local new = require(Packages.new)
local StandService = Knit.CreateService {
Name = "StandService";
Client = {};
}
-- Server
function StandService.GetStand(desiredStand: string): Model?
local Stands = game.ServerStorage.private.Assets.Stands
return (Stands:FindFirstChild(desiredStand or "Default") or Stands.Default):Clone()
end
-- Client
function StandService.Client.SetStand(_, player: Player, desiredStand: string)
local stand = StandService.GetStand(desiredStand)
local standFolder = new("Folder", workspace.PlayerStands, {
Name = player.Name.."Stand"
})
stand.Parent = standFolder
new("WeldConstraint", stand.PrimaryPart, {
Name = "StandWeld";
Part0 = stand.HumanoidRootPart;
Part1 = player.Character.HumanoidRootPart;
})
local charCF = player.Character:GetPrimaryPartCFrame()
local offset = CFrame.new(1.5, 1, 1.5)
stand:SetPrimaryPartCFrame(charCF * offset)
local connection
connection = player.Character.Humanoid.Died:Connect(function()
standFolder:Destroy()
connection:Disconnect()
end)
return stand
end
-- Knit
function StandService:KnitInit()
end
function StandService:KnitStart()
end
return StandService
|
-----------------------------------
-- Area: North Gustaberg
-- NPC: Hunting Bear
-- Involved in Quest "The Gustaberg Tour"
-- !pos -232.415 40.465 426.495 106
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
player:startEvent(20)
end
function onEventUpdate(player, csid, option)
end
function onEventFinish(player, csid, option)
end
|
-- two library
-- bgfx dependency module
group "bgfx"
if _OPTIONS["webgpu"] then
_OPTIONS["with-webgpu"] = ""
end
dofile(path.join(BX_DIR, "scripts/bx.lua"))
dofile(path.join(BIMG_DIR, "scripts/bimg.lua"))
dofile(path.join(BIMG_DIR, "scripts/bimg_decode.lua"))
dofile(path.join(BIMG_DIR, "scripts/bimg_encode.lua"))
dofile(path.join(BGFX_DIR, "scripts/bgfx.lua"))
bgfxProject("", "StaticLib", {})
if _OPTIONS["webgpu"] then
project "bgfx"
includedirs {
path.join(DAWN_DIR, "src"),
path.join(DAWN_DIR, "src/include"),
path.join(DAWN_DIR, "out/Default/gen")
}
defines {
"BGFX_CONFIG_RENDERER_WEBGPU=1",
}
configuration { "wasm*" }
defines {
"BGFX_CONFIG_RENDERER_OPENGL=0",
"BGFX_CONFIG_RENDERER_OPENGLES=0",
}
configuration {}
end
project "bgfx"
defines {
--"BGFX_CONFIG_RENDERER_OPENGL=31",
--"BGFX_CONFIG_RENDERER_OPENGL=46",
}
configuration { "Debug" }
defines {
"BGFX_CONFIG_DEBUG_UNIFORM=0",
}
configuration { "osx" }
defines {
"BGFX_CONFIG_RENDERER_OPENGL=31",
}
if not _OPTIONS["webgpu"] then
configuration { "wasm*" }
defines {
"BGFX_CONFIG_RENDERER_OPENGLES=30",
}
end
configuration {}
project "bimg_encode"
configuration { "wasm*" }
buildoptions {
"-Wno-fortify-source",
"-Wno-deprecated-copy",
}
configuration { "mingw* or linux or osx or wasm*" }
buildoptions {
"-Wno-undef",
"-Wno-class-memaccess",
}
configuration { "osx or *-clang* or wasm*" }
buildoptions {
"-Wno-shadow",
"-Wno-macro-redefined",
"-Wno-tautological-compare",
}
configuration { "vs*", "not wasm*" }
buildoptions {
"/wd4244", -- warning C4244: '=': conversion from 'int' to 'vtype', possible loss of data
}
configuration {}
dofile(path.join(TWO_DIR, "scripts/3rdparty/bgfx/shaderc.lua"))
function uses_bx()
includedirs {
path.join(BX_DIR, "include"),
}
configuration { "vs*", "not orbis", "not wasm*" }
includedirs { path.join(BX_DIR, "include/compat/msvc") }
configuration {}
end
function uses_bimg()
includedirs {
path.join(BIMG_DIR, "include"),
}
end
function uses_bgfx()
includedirs {
path.join(BX_DIR, "include"),
path.join(BGFX_DIR, "include"),
}
if _OPTIONS["webgpu"] then
usesWebGPU()
end
configuration { "linux", "not wasm*" }
links {
"X11",
"GLU",
"GL",
"Xext",
}
configuration { "osx" }
linkoptions {
"-framework Metal",
"-framework QuartzCore",
}
configuration { "vs20*", "not wasm*" }
links {
"psapi",
}
configuration { "osx or linux*", "not wasm*" }
links {
"pthread",
}
configuration {}
end
function uses_shaderc()
defines { "TWO_LIVE_SHADER_COMPILER" }
--print(" links fcpp, glslang, etc...")
links {
"fcpp",
"glslang",
"glsl-optimizer",
"spirv-opt",
"spirv-cross",
}
end
fcpp = dep(nil, "fcpp", false, nil)
glslang = dep(nil, "glslang", false, nil)
glslopt = dep(nil, "glsl-optimizer",false, nil)
spirvopt = dep(nil, "spirv-opt", false, nil)
spirvcross = dep(nil, "spirv-cross", false, nil)
bx = dep(nil, "bx", false, uses_bx)
bimg = dep(nil, "bimg", false, uses_bimg, { bx })
bimg.decode = dep(nil, "bimg_decode", false, uses_bimg { bx })
bimg.encode = dep(nil, "bimg_encode", false, uses_bimg { bx })
bgfx = dep(nil, "bgfx", false, uses_bgfx, { bx, bimg })
shaderc = dep(nil, "shaderc", false, uses_shaderc, { bx, bimg, bgfx })
|
-- This file is part of SUIT, copyright (c) 2016 Matthias Richter
local BASE = (...):match('(.-)[^%.]+$')
local theme = {}
theme.cornerRadius = 4
theme.color = {
normal = {bg = { 0.25, 0.25, 0.25}, fg = {0.73,0.73,0.73}},
hovered = {bg = { 0.19,0.6,0.73}, fg = {1,1,1}},
active = {bg = {1,0.6, 0}, fg = {1,1,1}}
}
-- HELPER
function theme.getColorForState(opt)
local s = opt.state or "normal"
return (opt.color and opt.color[opt.state]) or theme.color[s]
end
function theme.drawBox(x,y,w,h, colors, cornerRadius)
cornerRadius = cornerRadius or theme.cornerRadius
w = math.max(cornerRadius/2, w)
if h < cornerRadius/2 then
y,h = y - (cornerRadius - h), cornerRadius/2
end
love.graphics.setColor(colors.bg)
love.graphics.rectangle('fill', x,y, w,h, cornerRadius)
end
function theme.getVerticalOffsetForAlign(valign, font, h)
if valign == "top" then
return 0
elseif valign == "bottom" then
return h - font:getHeight()
end
-- else: "middle"
return (h - font:getHeight()) / 2
end
-- WIDGET VIEWS
function theme.Label(text, opt, x,y,w,h)
y = y + theme.getVerticalOffsetForAlign(opt.valign, opt.font, h)
love.graphics.setColor((opt.color and opt.color.normal or {}).fg or theme.color.normal.fg)
love.graphics.setFont(opt.font)
love.graphics.printf(text, x+2, y, w-4, opt.align or "center")
end
function theme.Button(text, opt, x,y,w,h)
local c = theme.getColorForState(opt)
theme.drawBox(x,y,w,h, c, opt.cornerRadius)
love.graphics.setColor(c.fg)
love.graphics.setFont(opt.font)
y = y + theme.getVerticalOffsetForAlign(opt.valign, opt.font, h)
love.graphics.printf(text, x+2, y, w-4, opt.align or "center")
end
function theme.Checkbox(chk, opt, x,y,w,h)
local c = theme.getColorForState(opt)
local th = opt.font:getHeight()
theme.drawBox(x+h/10,y+h/10,h*.8,h*.8, c, opt.cornerRadius)
love.graphics.setColor(c.fg)
if chk.checked then
love.graphics.setLineStyle('smooth')
love.graphics.setLineWidth(5)
love.graphics.setLineJoin("bevel")
love.graphics.line(x+h*.2,y+h*.55, x+h*.45,y+h*.75, x+h*.8,y+h*.2)
end
if chk.text then
love.graphics.setFont(opt.font)
y = y + theme.getVerticalOffsetForAlign(opt.valign, opt.font, h)
love.graphics.printf(chk.text, x + h, y, w - h, opt.align or "left")
end
end
function theme.Slider(fraction, opt, x,y,w,h)
local xb, yb, wb, hb -- size of the progress bar
local r = math.min(w,h) / 2.1
if opt.vertical then
x, w = x + w*.25, w*.5
xb, yb, wb, hb = x, y+h*(1-fraction), w, h*fraction
else
y, h = y + h*.25, h*.5
xb, yb, wb, hb = x,y, w*fraction, h
end
local c = theme.getColorForState(opt)
theme.drawBox(x,y,w,h, c, opt.cornerRadius)
theme.drawBox(xb,yb,wb,hb, {bg=c.fg}, opt.cornerRadius)
if opt.state ~= nil and opt.state ~= "normal" then
love.graphics.setColor((opt.color and opt.color.active or {}).fg or theme.color.active.fg)
if opt.vertical then
love.graphics.circle('fill', x+wb/2, yb, r)
else
love.graphics.circle('fill', x+wb, yb+hb/2, r)
end
end
end
function theme.Input(input, opt, x,y,w,h)
local utf8 = require 'utf8'
theme.drawBox(x,y,w,h, (opt.color and opt.color.normal) or theme.color.normal, opt.cornerRadius)
x = x + 3
w = w - 6
local th = opt.font:getHeight()
-- set scissors
local sx, sy, sw, sh = love.graphics.getScissor()
love.graphics.setScissor(x-1,y,w+2,h)
x = x - input.text_draw_offset
-- text
love.graphics.setColor((opt.color and opt.color.normal and opt.color.normal.fg) or theme.color.normal.fg)
love.graphics.setFont(opt.font)
love.graphics.print(input.text, x, y+(h-th)/2)
-- candidate text
local tw = opt.font:getWidth(input.text)
local ctw = opt.font:getWidth(input.candidate_text.text)
love.graphics.setColor((opt.color and opt.color.normal and opt.color.normal.fg) or theme.color.normal.fg)
love.graphics.print(input.candidate_text.text, x + tw, y+(h-th)/2)
-- candidate text rectangle box
love.graphics.rectangle("line", x + tw, y+(h-th)/2, ctw, th)
-- cursor
if opt.hasKeyboardFocus and (love.timer.getTime() % 1) > .5 then
local ct = input.candidate_text;
local ss = ct.text:sub(1, utf8.offset(ct.text, ct.start))
local ws = opt.font:getWidth(ss)
if ct.start == 0 then ws = 0 end
love.graphics.setLineWidth(1)
love.graphics.setLineStyle('rough')
love.graphics.line(x + opt.cursor_pos + ws, y + (h-th)/2,
x + opt.cursor_pos + ws, y + (h+th)/2)
end
-- reset scissor
love.graphics.setScissor(sx,sy,sw,sh)
end
return theme
|
-- Sentry.io integration for remote error monitoring
-- @filtering Server
-- @author Validark
--[[
Example, client:
local Try = require("Try")
local Sentry = require("Sentry")
Try(function(x) error("test client error " .. x) end, "1")
:Catch(Sentry.Post)
--]]
-- Configuration
local DSN = "https://c65bfdd4c0804f19b48c70c495260da1:3df69ad66506495b876819441affeee7@sentry.io/1197144"
local ENABLE_WARNINGS = true -- Doesn't affect uploading, just puts them in the Server Logs
local MAX_CLIENT_ERROR_COUNT = 10
-- Module Data
local SDK_NAME = "Sentry"
local SDK_VERSION = "RoStrap"
local SENTRY_VERSION = "7"
-- Assertions
local Protocol, PublicKey, SecretKey, Host, DSNPath, ProjectId = DSN:match("^([^:]+)://([^:]+):([^@]+)@([^/]+)(.*/)(%d+)$")
assert(Protocol and Protocol:match("^https?$"), "invalid DSN: protocol not valid")
assert(PublicKey, "invalid DSN: public key not valid")
assert(SecretKey, "invalid DSN: secret key not valid")
assert(Host, "invalid DSN: host not valid")
assert(DSNPath, "invalid DSN: path not valid")
assert(ProjectId, "invalid DSN: project ID not valid")
-- Constants
local RequestUrl = ("%s://%s%sapi/%d/store/"):format(Protocol, Host, DSNPath, ProjectId)
local AuthHeader = ("Sentry sentry_version=%d,sentry_timestamp=%%s,sentry_key=%s,sentry_secret=%s,sentry_client=%s/%s"):format(SENTRY_VERSION, PublicKey, SecretKey, SDK_NAME, SDK_VERSION)
-- Services
local HttpService = game:GetService("HttpService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- RoStrap Core
local Resources = require(ReplicatedStorage:WaitForChild("Resources"))
-- Libraries
local Try = Resources:LoadLibrary("Try")
local Date = Resources:LoadLibrary("Date")
local Table = Resources:LoadLibrary("Table")
local Enumeration = Resources:LoadLibrary("Enumeration")
Enumeration.IssueType = {"Debug", "Info", "Warning", "Error", "Fatal"}
local IssueTypes = Enumeration.IssueType:GetEnumerationItems()
for i = 1, #IssueTypes do
IssueTypes[i - 1] = IssueTypes[i].Name:gsub("^%u", string.lower, 1)
end
-- RemoteEvent
local RemoteEvent = Resources:GetRemoteEvent("Sentry")
-- Module Table
local Sentry = {}
-- Mute Warnings if ENABLE_WARNINGS is not true
local warn = ENABLE_WARNINGS and warn or function() end
local LockedSentry = Table.Lock(Sentry)
local function Post(self, Message, Traceback, MessageType, Logger)
if self ~= LockedSentry then
Message, Traceback, MessageType, Logger = self, Message, Traceback, MessageType
end
local Level
if type(MessageType) == "number" then
Level = IssueTypes[MessageType]
elseif typeof(MessageType) == "EnumItem" then
Level = MessageType.Name:gsub("Message", "", 1):gsub("^%u", string.lower, 1):gsub("output", "debug", 1)
elseif type(MessageType) == "userdata" then
Level = IssueTypes[MessageType.Value]
end
local Timestamp = Date("!%Y-%m-%dT%H:%M:%S")
local Packet = {
level = Level or "error";
message = Message;
event_id = HttpService:GenerateGUID(false):gsub("%-", "");
timestamp = Timestamp;
logger = Logger or "server";
platform = "other";
sdk = {
name = SDK_NAME;
version = SDK_VERSION;
}
}
local Headers = {
Authorization = AuthHeader:format(Timestamp);
}
local StackTrace = {}
local Count = 0
Traceback = (Traceback or debug.traceback()):gsub("([\r\n])[^\r\n]+upvalue Error[\r\n]", "%1", 1)
for Line in Traceback:gmatch("[^\n\r]+") do
if Line ~= "Stack Begin" and Line ~= "Stack End" then
local Path, LineNum, Value = Line:match("^Script '(.-)', Line (%d+)%s?%-?%s?(.*)$")
if Path and LineNum and Value then
Count = Count + 1
StackTrace[Count] = {
["filename"] = Path;
["function"] = Value;
["lineno"] = LineNum;
}
else
Count = 0
break
end
end
end
if Count == 0 then
warn("[Sentry] Failed to convert string traceback to stacktrace: invalid traceback:", Traceback)
else
Packet.culprit = StackTrace[1].filename
-- Flip StackTrace around
for a = 1, 0.5 * Count do
local b = 1 + Count - a
StackTrace[a], StackTrace[b] = StackTrace[b], StackTrace[a]
end
Packet.exception = {{
type = Packet.logger:gsub("^%l", string.upper, 1) .. Packet.level:gsub("^%l", string.upper, 1);
value = Message;
stacktrace = {frames = StackTrace}
}}
end
Try(function()
return HttpService:JSONEncode(Packet)
end)
:Then(function(JSONPacket)
HttpService:PostAsync(RequestUrl, JSONPacket, Enum.HttpContentType.ApplicationJson, true, Headers)
end)
:Catch("HTTP 429", function()
warn("[Sentry] HTTP 429 Retry-After in TrySend, disabling SDK for this server.")
end)
:Catch("HTTP 401", function()
warn("[Sentry] Please check the validity of your DSN.")
end)
:Catch("HTTP 4", function(Error, StackTraceback, Attempt)
local HeaderString = ""
for i, v in next, Headers do
HeaderString = HeaderString .. "\t" .. i .. " " .. v .. "\n"
end
warn(("[Sentry] HTTP %d in TrySend, JSON packet:"):format(Error:match("^HTTP (%d+)")), "\n", Attempt.LastArguments[1], "\nHeaders:\n", HeaderString, "Response:", Error)
end)
return true
end
function Sentry:Post(Message, Traceback, MessageType)
-- Post(string Message [string MessageType, string Traceback])
-- Posts parameters to Sentry.io
-- Supports hybrid syntax calling
return Post(self, Message, Traceback, MessageType, "server")
end
local ErrorCount = {}
RemoteEvent.OnServerEvent:Connect(function(Player, Message, Traceback, MessageType)
local PlayerName = Player.Name
local Count = ErrorCount[PlayerName] or MAX_CLIENT_ERROR_COUNT
if Count ~= 0 then
if type(Message) == "string" and type(MessageType) == "number" and (type(Traceback) == "string" or Traceback == nil) and Post(Message, Traceback, MessageType, "client") then
ErrorCount[PlayerName] = Count - 1
else
error(("[Sentry] Player '%s' tried to send spoofed data, their ability to report errors has been disabled. Message:\n%s\nTraceback:\n%s"):format(PlayerName, tostring(Message), tostring(Traceback)))
ErrorCount[PlayerName] = 0
end
end
end)
return LockedSentry
|
local SyntaxKind = require("lunar.ast.syntax_kind")
local SyntaxNode = require("lunar.ast.syntax_node")
local SequentialFieldDeclaration = setmetatable({}, {
__index = SyntaxNode,
})
SequentialFieldDeclaration.__index = setmetatable({}, SyntaxNode)
function SequentialFieldDeclaration.new(value)
return SequentialFieldDeclaration.constructor(setmetatable({}, SequentialFieldDeclaration), value)
end
function SequentialFieldDeclaration.constructor(self, value)
SyntaxNode.constructor(self, SyntaxKind.sequential_field_declaration)
self.value = value
return self
end
return SequentialFieldDeclaration
|
local theme = {}
function theme.highlights(colors, config)
local function remove_background(group)
group["bg"] = colors.none
end
local function load_syntax()
-- Syntax highlight groups
local syntax = {
-- int, long, char, etc.
Type = { fg = colors.yellow },
-- static, register, volatile, etc.
StorageClass = { fg = colors.purple },
-- struct, union, enum, etc.
Structure = { fg = colors.purple },
-- any constant
Constant = { fg = colors.blue },
-- any character constant: 'c', '\n'
Character = { fg = colors.green },
-- a number constant: 5
Number = { fg = colors.orange },
-- a boolean constant: TRUE, false
Boolean = { fg = colors.orange },
-- a floating point constant: 2.3e10
Float = { fg = colors.orange },
-- any statement
Statement = { fg = colors.purple },
-- case, default, etc.
Label = { fg = colors.purple },
-- sizeof", "+", "*", etc.
Operator = { fg = colors.purple },
-- try, catch, throw
Exception = { fg = colors.purple },
-- generic Preprocessor
PreProc = { fg = colors.purple },
-- preprocessor #include
Include = { fg = colors.blue },
-- preprocessor #define
Define = { fg = colors.red },
-- same as Define
Macro = { fg = colors.red },
-- A typedef
Typedef = { fg = colors.purple },
-- preprocessor #if, #else, #endif, etc.
PreCondit = { fg = colors.purple },
-- any special symbol
Special = { fg = colors.light_red },
-- special character in a constant
SpecialChar = { fg = colors.light_red },
-- you can use CTRL-] on this
Tag = { fg = colors.green },
-- character that needs attention like , or .
Delimiter = { fg = colors.dark_blue },
-- special things inside a comment
SpecialComment = { fg = colors.light_gray },
-- debugging statements
Debug = { fg = colors.yellow },
-- text that stands out, HTML links
Underlined = { fg = colors.green, style = "underline" },
-- left blank, hidden
Ignore = { fg = colors.cyan, bg = colors.bg, style = "bold" },
-- any erroneous construct
Error = { fg = colors.error, bg = colors.none, style = "bold,underline" },
-- anything that needs extra attention; mostly the keywords TODO FIXME and XXX
Todo = { fg = colors.yellow, bg = colors.none, style = "bold,italic" },
Comment = { fg = colors.light_gray, style = config.styles.comments }, -- normal comments
-- normal if, then, else, endif, switch, etc.
Conditional = { fg = colors.purple, style = config.styles.keywords },
-- normal for, do, while, etc.
Keyword = { fg = colors.purple, style = config.styles.keywords },
-- normal any other keyword
Repeat = { fg = colors.purple, style = config.styles.keywords },
-- normal function names
Function = { fg = colors.blue, style = config.styles.functions },
-- any variable name
Identifier = { fg = colors.fg, style = config.styles.variables },
-- any string
String = { fg = colors.green, config.styles.strings },
htmlLink = { fg = colors.green, style = "underline" },
htmlH1 = { fg = colors.cyan, style = "bold" },
htmlH2 = { fg = colors.red, style = "bold" },
htmlH3 = { fg = colors.green, style = "bold" },
htmlH4 = { fg = colors.yellow, style = "bold" },
htmlH5 = { fg = colors.purple, style = "bold" },
markdownBlockquote = { fg = colors.light_gray },
markdownBold = { fg = colors.purple, style = "bold" },
markdownCode = { fg = colors.green },
markdownCodeBlock = { fg = colors.green },
markdownCodeDelimiter = { fg = colors.green },
markdownH1 = { fg = colors.dark_blue, style = "bold" },
markdownH2 = { fg = colors.blue, style = "bold" },
markdownH3 = { fg = colors.cyan, style = "bold" },
markdownH4 = { fg = colors.light_green },
markdownH5 = { fg = colors.light_green },
markdownH6 = { fg = colors.light_green },
markdownH1Delimiter = { fg = colors.dark_blue },
markdownH2Delimiter = { fg = colors.blue },
markdownH3Delimiter = { fg = colors.cyan },
markdownH4Delimiter = { fg = colors.light_green },
markdownH5Delimiter = { fg = colors.light_green },
markdownH6Delimiter = { fg = colors.light_green },
markdownId = { fg = colors.yellow },
markdownIdDeclaration = { fg = colors.purple },
markdownIdDelimiter = { fg = colors.light_gray },
markdownLinkDelimiter = { fg = colors.light_gray },
markdownItalic = { fg = colors.yellow, style = "italic" },
markdownLinkText = { fg = colors.purple },
markdownListMarker = { fg = colors.red },
markdownOrderedListMarker = { fg = colors.red },
markdownRule = { fg = colors.purple },
markdownUrl = { fg = colors.cyan, style = "underline" },
}
return syntax
end
local function load_editor()
-- Editor highlight groups
local editor = {
-- normal text and background color for floating windows
NormalFloat = { fg = colors.fg, bg = colors.active },
-- floating window border
FloatBorder = { fg = colors.blue, bg = colors.active },
-- used for the columns set with 'colorcolumn'
ColorColumn = { fg = colors.none, bg = colors.float },
-- placeholder characters substituted for concealed text (see 'conceallevel')
Conceal = { bg = colors.bg },
-- the character under the cursor
Cursor = { fg = colors.fg, bg = colors.none, style = "reverse" },
-- like Cursor, but used when in IME mode
CursorIM = { fg = colors.fg, bg = colors.none, style = "reverse" },
-- directory names (and other special names in listings)
Directory = { fg = colors.blue, bg = colors.none },
-- diff mode: Added line
DiffAdd = { fg = colors.none, bg = colors.diff_add_bg },
-- diff mode: Changed line
DiffChange = { fg = colors.none, bg = colors.diff_change_bg },
-- diff mode: Deleted line
DiffDelete = { fg = colors.none, bg = colors.diff_remove_bg },
-- diff mode: Changed text within a changed line
DiffText = { fg = colors.none, bg = colors.diff_text_bg },
-- error messages
ErrorMsg = { fg = colors.error },
-- line used for closed folds
Folded = { fg = colors.dark_blue, bg = colors.none, style = "italic" },
-- 'foldcolumn'
FoldColumn = { fg = colors.light_gray },
-- 'incsearch' highlighting; also used for the text replaced with ":s///c"
IncSearch = { fg = colors.yellow, bg = colors.selection, style = "bold,underline" },
-- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
LineNr = { fg = colors.light_gray },
-- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
CursorLineNr = { fg = colors.fg },
-- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt|
MatchParen = { fg = colors.yellow, bg = colors.none, style = "bold" },
-- 'showmode' message (e.g., "-- INSERT -- ")
ModeMsg = { fg = colors.blue, style = "bold" },
-- |more-prompt|
MoreMsg = { fg = colors.blue, style = "bold" },
-- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist
-- in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line).
-- See also |hl-EndOfBuffer|.
NonText = { fg = colors.gray },
-- normal item |hl-Pmenu|
Pmenu = { fg = colors.fg, bg = colors.float },
-- selected item |hl-PmenuSel|
PmenuSel = { bg = colors.selection },
-- scrollbar |hl-PmenuSbar|
PmenuSbar = { bg = colors.float },
-- thumb of the scrollbar |hl-PmenuThumb|
PmenuThumb = { bg = colors.fg },
-- |hit-enter| prompt and yes/no questions
Question = { fg = colors.green },
-- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
QuickFixLine = { bg = colors.float, style = "bold,italic" },
-- Line numbers for quickfix lists
qfLineNr = { fg = colors.purple },
-- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
Search = { fg = colors.blue, bg = colors.selection, style = "bold" },
-- Unprintable characters: text displayed differently from what it really is.
-- But not 'listchars' whitespace. |hl-Whitespace|
SpecialKey = { fg = colors.dark_blue },
-- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
SpellBad = { fg = colors.red, bg = colors.none, style = "italic,underline", sp = colors.red },
-- Word that should start with a capital. |spell| Combined with the highlighting used otherwise.
SpellCap = { fg = colors.yellow, bg = colors.none, style = "italic,underline", sp = colors.yellow },
-- Word that is recognized by the spellchecker as one that is used in another region.
-- |spell| Combined with the highlighting used otherwise.
SpellLocal = { fg = colors.cyan, bg = colors.none, style = "italic,underline", sp = colors.cyan },
-- Word that is recognized by the spellchecker as one that is hardly ever used.
-- |spell| Combined with the highlighting used otherwise.
SpellRare = { fg = colors.purple, bg = colors.none, style = "italic,underline", sp = colors.purple },
-- status line of current window
StatusLine = { fg = colors.fg, bg = colors.active },
-- status lines of not-current windows Note: if this is equal to "StatusLine"
-- Vim will use "^^^" in the status line of the current window.
StatusLineNC = { fg = colors.light_gray, bg = colors.active },
-- status line of current terminal window
StatusLineTerm = { fg = colors.fg, bg = colors.active },
-- status lines of not-current terminal windows Note: if this is equal to "StatusLine"
-- Vim will use "^^^" in the status line of the current window.
StatusLineTermNC = { fg = colors.light_gray, bg = colors.active },
-- tab pages line, where there are no labels
TabLineFill = { fg = colors.light_gray, bg = colors.active },
-- tab pages line, active tab page label
TablineSel = { fg = colors.cyan, bg = colors.bg },
Tabline = { fg = colors.light_gray, bg = colors.active },
-- titles for output from ":set all", ":autocmd" etc.
Title = { fg = colors.green, bg = colors.none, style = "bold" },
-- Visual mode selection
Visual = { fg = colors.none, bg = colors.highlight },
-- Visual mode selection when vim is "Not Owning the Selection".
VisualNOS = { fg = colors.none, bg = colors.highlight },
-- warning messages
WarningMsg = { fg = colors.warn },
-- "nbsp", "space", "tab" and "trail" in 'listchars'
Whitespace = { fg = colors.gray },
-- current match in 'wildmenu' completion
WildMenu = { fg = colors.yellow, bg = colors.none, style = "bold" },
-- window bar of current window
WinBar = { fg = colors.fg, bg = colors.bg },
-- window bar of not-current windows
WinBarNC = { fg = colors.light_gray, bg = colors.bg },
-- Screen-column at the cursor, when 'cursorcolumn' is set.
CursorColumn = { fg = colors.none, bg = colors.float },
-- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
CursorLine = { fg = colors.none, bg = colors.active },
-- Normal mode message in the cmdline
NormalMode = { fg = colors.cyan, bg = colors.none, style = "reverse" },
-- Insert mode message in the cmdline
InsertMode = { fg = colors.green, bg = colors.none, style = "reverse" },
-- Replace mode message in the cmdline
ReplacelMode = { fg = colors.red, bg = colors.none, style = "reverse" },
-- Visual mode message in the cmdline
VisualMode = { fg = colors.purple, bg = colors.none, style = "reverse" },
-- Command mode message in the cmdline
CommandMode = { fg = colors.yellow, bg = colors.none, style = "reverse" },
Warnings = { fg = colors.warn },
healthError = { fg = colors.error },
healthSuccess = { fg = colors.green },
healthWarning = { fg = colors.warn },
-- Dashboard
DashboardShortCut = { fg = colors.cyan },
DashboardHeader = { fg = colors.blue },
DashboardCenter = { fg = colors.purple },
DashboardFooter = { fg = colors.green, style = "italic" },
-- normal text and background color
Normal = { fg = colors.fg, bg = colors.bg },
NormalNC = { bg = colors.bg },
SignColumn = { fg = colors.fg, bg = colors.none },
-- the column separating vertically split windows
VertSplit = { fg = colors.bg },
EndOfBuffer = { fg = colors.gray },
}
-- Options:
-- Set non-current background
if config.fade_nc then
editor.NormalNC["bg"] = colors.active
editor.NormalFloat["bg"] = colors.bg
editor.FloatBorder["bg"] = colors.bg
end
-- Set transparent background
if config.disable.background then
remove_background(editor.Normal)
remove_background(editor.NormalNC)
remove_background(editor.SignColumn)
end
-- Set transparent cursorline
if config.disable.cursorline then
remove_background(editor.CursorLine)
end
-- Set transparent eob lines
if config.disable.eob_lines then
editor.EndOfBuffer["fg"] = colors.bg
end
-- Inverse highlighting
if config.inverse.match_paren then
editor.MatchParen["style"] = "reverse,bold"
end
-- Add window split borders
if config.borders then
editor.VertSplit["fg"] = colors.selection
end
return editor
end
local function load_treesitter()
-- TreeSitter highlight groups
local treesitter = {
-- Annotations that can be attached to the code to denote some kind of meta information. e.g. C++/Dart attributes.
TSAttribute = { fg = colors.purple },
-- Boolean literals: `True` and `False` in Python.
TSBoolean = { fg = colors.orange },
-- Character literals: `'a'` in C.
TSCharacter = { fg = colors.green },
-- Line comments and block comments.
TSComment = { fg = colors.light_gray, style = config.styles.comments },
-- Keywords related to conditionals: `if`, `when`, `cond`, etc.
TSConditional = { fg = colors.purple, style = config.styles.keywords },
-- Constants identifiers. These might not be semantically constant. E.g. uppercase variables in Python.
TSConstant = { fg = colors.cyan },
-- Built-in constant values: `nil` in Lua.
TSConstBuiltin = { fg = colors.orange },
-- Constants defined by macros: `NULL` in C.
TSConstMacro = { fg = colors.red },
-- Constructor calls and definitions: `{}` in Lua, and Java constructors.
TSConstructor = { fg = colors.yellow },
-- Syntax/parser errors. This might highlight large sections of code while the user is typing
-- still incomplete code, use a sensible highlight.
TSError = { fg = colors.error },
-- Exception related keywords: `try`, `except`, `finally` in Python.
TSException = { fg = colors.purple },
-- Object and struct fields.
TSField = { fg = colors.blue },
-- Floating-point number literals.
TSFloat = { fg = colors.orange },
-- Function calls and definitions.
TSFunction = { fg = colors.blue, style = config.styles.functions },
-- Built-in functions: `print` in Lua.
TSFuncBuiltin = { fg = colors.cyan, style = config.styles.functions },
-- Macro defined functions (calls and definitions): each `macro_rules` in Rust.
TSFuncMacro = { fg = colors.blue },
-- File or module inclusion keywords: `#include` in C, `use` or `extern crate` in Rust.
TSInclude = { fg = colors.blue },
-- Keywords that don't fit into other categories.
TSKeyword = { fg = colors.purple, style = config.styles.keywords },
-- Keywords used to define a function: `function` in Lua, `def` and `lambda` in Python.
TSKeywordFunction = { fg = colors.purple, style = config.styles.keywords },
-- Unary and binary operators that are English words: `and`, `or` in Python; `sizeof` in C.
TSKeywordOperator = { fg = colors.purple },
-- Keywords like `return` and `yield`.
TSKeywordReturn = { fg = colors.purple },
-- GOTO labels: `label:` in C, and `::label::` in Lua.
TSLabel = { fg = colors.purple },
-- Method calls and definitions.
TSMethod = { fg = colors.blue, style = config.styles.functions },
-- Identifiers referring to modules and namespaces.
TSNamespace = { fg = colors.yellow },
-- Numeric literals that don't fit into other categories.
TSNumber = { fg = colors.orange },
-- Binary or unary operators: `+`, and also `->` and `*` in C.
TSOperator = { fg = colors.purple },
-- Parameters of a function.
TSParameter = { fg = colors.red },
-- References to parameters of a function.
TSParameterReference = { fg = colors.red },
-- Same as `TSField`.
TSProperty = { fg = colors.blue },
-- Punctuation delimiters: Periods, commas, semicolons, etc.
TSPunctDelimiter = { fg = colors.dark_blue },
-- Brackets, braces, parentheses, etc.
TSPunctBracket = { fg = colors.dark_blue },
-- Special punctuation that doesn't fit into the previous categories.
TSPunctSpecial = { fg = colors.dark_blue },
-- Keywords related to loops: `for`, `while`, etc.
TSRepeat = { fg = colors.purple, style = config.styles.keywords },
-- String literals.
TSString = { fg = colors.green, style = config.styles.strings },
-- Regular expression literals.
TSStringRegex = { fg = colors.orange },
-- Escape characters within a string: `\n`, `\t`, etc.
TSStringEscape = { fg = colors.orange },
-- Identifiers referring to symbols or atoms.
TSSymbol = { fg = colors.cyan },
-- Tags like HTML tag names.
TSTag = { fg = colors.yellow },
-- HTML tag attributes.
TSTagAttribute = { fg = colors.blue },
-- Tag delimiters like `<` `>` `/`.
TSTagDelimiter = { fg = colors.dark_blue },
-- Non-structured text. Like text in a markup language.
TSText = { fg = colors.fg },
-- Text to be represented in bold.
TSStrong = { fg = colors.purple, style = "bold" },
-- Text to be represented with emphasis.
TSEmphasis = { fg = colors.yellow, style = "italic" },
-- Text to be represented with an underline.
TSUnderline = { style = "underline" },
-- Text that is part of a title.
TSTitle = { fg = colors.blue, style = "bold" },
-- Literal or verbatim text.
TSLiteral = { fg = colors.green },
-- URIs like hyperlinks or email addresses.
TSURI = { fg = colors.cyan, style = "underline" },
-- Math environments like LaTeX's `$ ... $`
TSMath = { fg = colors.fg },
-- Footnotes, text references, citations, etc.
TSTextReference = { fg = colors.purple },
-- Text environments of markup languages.
TSEnvironment = { fg = colors.fg },
-- Text/string indicating the type of text environment. Like the name of a `\begin` block in LaTeX.
TSEnvironmentName = { fg = colors.fg },
-- Text representation of an informational note.
TSNote = { fg = colors.info, style = "bold" },
-- Text representation of a warning note.
TSWarning = { fg = colors.warn, style = "bold" },
-- Text representation of a danger note.
TSDanger = { fg = colors.error, style = "bold" },
-- Type (and class) definitions and annotations.
TSType = { fg = colors.yellow },
-- Built-in types: `i32` in Rust.
TSTypeBuiltin = { fg = colors.orange },
-- Variable names that don't fit into other categories.
TSVariable = { fg = colors.fg, style = config.styles.variables },
-- Variable names defined by the language: `this` or `self` in Javascript.
TSVariableBuiltin = { fg = colors.red, style = config.styles.variables },
}
return treesitter
end
local function load_lsp()
-- Lsp highlight groups
local lsp = {
-- used for "Error" diagnostic virtual text
LspDiagnosticsDefaultError = { fg = colors.error },
-- used for "Error" diagnostic signs in sign column
LspDiagnosticsSignError = { fg = colors.error },
-- used for "Error" diagnostic messages in the diagnostics float
LspDiagnosticsFloatingError = { fg = colors.error },
-- Virtual text "Error"
LspDiagnosticsVirtualTextError = { fg = colors.error },
-- used to underline "Error" diagnostics.
LspDiagnosticsUnderlineError = { style = config.styles.diagnostics, sp = colors.error },
-- used for "Warning" diagnostic signs in sign column
LspDiagnosticsDefaultWarning = { fg = colors.warn },
-- used for "Warning" diagnostic signs in sign column
LspDiagnosticsSignWarning = { fg = colors.warn },
-- used for "Warning" diagnostic messages in the diagnostics float
LspDiagnosticsFloatingWarning = { fg = colors.warn },
-- Virtual text "Warning"
LspDiagnosticsVirtualTextWarning = { fg = colors.warn },
-- used to underline "Warning" diagnostics.
LspDiagnosticsUnderlineWarning = { style = config.styles.diagnostics, sp = colors.warn },
-- used for "Information" diagnostic virtual text
LspDiagnosticsDefaultInformation = { fg = colors.info },
-- used for "Information" diagnostic signs in sign column
LspDiagnosticsSignInformation = { fg = colors.info },
-- used for "Information" diagnostic messages in the diagnostics float
LspDiagnosticsFloatingInformation = { fg = colors.info },
-- Virtual text "Information"
LspDiagnosticsVirtualTextInformation = { fg = colors.info },
-- used to underline "Information" diagnostics.
LspDiagnosticsUnderlineInformation = { style = config.styles.diagnostics, sp = colors.info },
-- used for "Hint" diagnostic virtual text
LspDiagnosticsDefaultHint = { fg = colors.hint },
-- used for "Hint" diagnostic signs in sign column
LspDiagnosticsSignHint = { fg = colors.hint },
-- used for "Hint" diagnostic messages in the diagnostics float
LspDiagnosticsFloatingHint = { fg = colors.hint },
-- Virtual text "Hint"
LspDiagnosticsVirtualTextHint = { fg = colors.hint },
-- used to underline "Hint" diagnostics.
LspDiagnosticsUnderlineHint = { style = config.styles.diagnostics, sp = colors.hint },
-- used for highlighting "text" references
LspReferenceText = { style = "underline", sp = colors.yellow },
-- used for highlighting "read" references
LspReferenceRead = { style = "underline", sp = colors.yellow },
-- used for highlighting "write" references
LspReferenceWrite = { style = "underline", sp = colors.yellow },
LspSignatureActiveParameter = { fg = colors.none, bg = colors.highlight_dark, style = "bold" },
LspCodeLens = { fg = colors.light_gray },
DiagnosticError = { link = "LspDiagnosticsDefaultError" },
DiagnosticWarn = { link = "LspDiagnosticsDefaultWarning" },
DiagnosticInfo = { link = "LspDiagnosticsDefaultInformation" },
DiagnosticHint = { link = "LspDiagnosticsDefaultHint" },
DiagnosticVirtualTextWarn = { link = "LspDiagnosticsVirtualTextWarning" },
DiagnosticUnderlineWarn = { link = "LspDiagnosticsUnderlineWarning" },
DiagnosticFloatingWarn = { link = "LspDiagnosticsFloatingWarning" },
DiagnosticSignWarn = { link = "LspDiagnosticsSignWarning" },
DiagnosticVirtualTextError = { link = "LspDiagnosticsVirtualTextError" },
DiagnosticUnderlineError = { link = "LspDiagnosticsUnderlineError" },
DiagnosticFloatingError = { link = "LspDiagnosticsFloatingError" },
DiagnosticSignError = { link = "LspDiagnosticsSignError" },
DiagnosticVirtualTextInfo = { link = "LspDiagnosticsVirtualTextInformation" },
DiagnosticUnderlineInfo = { link = "LspDiagnosticsUnderlineInformation" },
DiagnosticFloatingInfo = { link = "LspDiagnosticsFloatingInformation" },
DiagnosticSignInfo = { link = "LspDiagnosticsSignInformation" },
DiagnosticVirtualTextHint = { link = "LspDiagnosticsVirtualTextHint" },
DiagnosticUnderlineHint = { link = "LspDiagnosticsUnderlineHint" },
DiagnosticFloatingHint = { link = "LspDiagnosticsFloatingHint" },
DiagnosticSignHint = { link = "LspDiagnosticsSignHint" },
}
return lsp
end
local function load_plugins()
-- Plugins highlight groups
local plugins = {
-- Cmp
CmpItemAbbr = { fg = colors.fg },
CmpItemAbbrDeprecated = { fg = colors.fg },
CmpItemAbbrMatch = { fg = colors.blue, style = "bold" },
CmpItemAbbrMatchFuzzy = { fg = colors.blue, underline = true },
CmpItemMenu = { fg = colors.light_gray },
CmpItemKindText = { fg = colors.orange },
CmpItemKindMethod = { fg = colors.blue },
CmpItemKindFunction = { fg = colors.blue },
CmpItemKindConstructor = { fg = colors.yellow },
CmpItemKindField = { fg = colors.blue },
CmpItemKindClass = { fg = colors.yellow },
CmpItemKindInterface = { fg = colors.yellow },
CmpItemKindModule = { fg = colors.blue },
CmpItemKindProperty = { fg = colors.blue },
CmpItemKindValue = { fg = colors.orange },
CmpItemKindEnum = { fg = colors.yellow },
CmpItemKindKeyword = { fg = colors.purple },
CmpItemKindSnippet = { fg = colors.green },
CmpItemKindFile = { fg = colors.blue },
CmpItemKindEnumMember = { fg = colors.cyan },
CmpItemKindConstant = { fg = colors.orange },
CmpItemKindStruct = { fg = colors.yellow },
CmpItemKindTypeParameter = { fg = colors.yellow },
-- Notify
NotifyERRORBorder = { fg = colors.error },
NotifyWARNBorder = { fg = colors.warn },
NotifyINFOBorder = { fg = colors.info },
NotifyDEBUGBorder = { fg = colors.light_gray },
NotifyTRACEBorder = { fg = colors.hint },
NotifyERRORIcon = { fg = colors.error },
NotifyWARNIcon = { fg = colors.warn },
NotifyINFOIcon = { fg = colors.info },
NotifyDEBUGIcon = { fg = colors.light_gray },
NotifyTRACEIcon = { fg = colors.hint },
NotifyERRORTitle = { fg = colors.error },
NotifyWARNTitle = { fg = colors.warn },
NotifyINFOTitle = { fg = colors.info },
NotifyDEBUGTitle = { fg = colors.light_gray },
NotifyTRACETitle = { fg = colors.hint },
-- Trouble
TroubleCount = { fg = colors.purple },
TroubleNormal = { fg = colors.fg },
TroubleText = { fg = colors.fg },
-- Diff
diffAdded = { fg = colors.diff_add },
diffRemoved = { fg = colors.diff_remove },
diffChanged = { fg = colors.diff_change },
diffOldFile = { fg = colors.yellow },
diffNewFile = { fg = colors.orange },
diffFile = { fg = colors.blue },
diffLine = { fg = colors.light_gray },
diffIndexLine = { fg = colors.purple },
-- Neogit
NeogitBranch = { fg = colors.purple },
NeogitRemote = { fg = colors.orange },
NeogitHunkHeader = { fg = colors.fg, bg = colors.highlight },
NeogitHunkHeaderHighlight = { fg = colors.yellow, bg = colors.highlight },
NeogitDiffContextHighlight = { bg = colors.active },
NeogitDiffDeleteHighlight = { fg = colors.diff_remove, bg = colors.diff_remove_bg },
NeogitDiffAddHighlight = { fg = colors.diff_add, bg = colors.diff_add_bg },
NeogitNotificationInfo = { fg = colors.info },
NeogitNotificationWarning = { fg = colors.warn },
NeogitNotificationError = { fg = colors.error },
-- GitGutter
GitGutterAdd = { fg = colors.diff_add }, -- diff mode: Added line |diff.txt|
GitGutterChange = { fg = colors.diff_change }, -- diff mode: Changed line |diff.txt|
GitGutterDelete = { fg = colors.diff_remove }, -- diff mode: Deleted line |diff.txt|
-- GitSigns
GitSignsAdd = { fg = colors.diff_add }, -- diff mode: Added line |diff.txt|
GitSignsAddNr = { fg = colors.diff_add }, -- diff mode: Added line |diff.txt|
GitSignsAddLn = { fg = colors.diff_add }, -- diff mode: Added line |diff.txt|
GitSignsChange = { fg = colors.diff_change }, -- diff mode: Changed line |diff.txt|
GitSignsChangeNr = { fg = colors.diff_change }, -- diff mode: Changed line |diff.txt|
GitSignsChangeLn = { fg = colors.diff_change }, -- diff mode: Changed line |diff.txt|
GitSignsDelete = { fg = colors.diff_remove }, -- diff mode: Deleted line |diff.txt|
GitSignsDeleteNr = { fg = colors.diff_remove }, -- diff mode: Deleted line |diff.txt|
GitSignsDeleteLn = { fg = colors.diff_remove }, -- diff mode: Deleted line |diff.txt|
-- Telescope
TelescopeNormal = { fg = colors.fg, bg = colors.bg },
TelescopePromptPrefix = { fg = colors.purple },
TelescopePromptBorder = { fg = colors.blue },
TelescopeResultsBorder = { fg = colors.blue },
TelescopePreviewBorder = { fg = colors.blue },
TelescopeSelectionCaret = { fg = colors.cyan },
TelescopeSelection = { fg = colors.cyan },
TelescopeMatching = { fg = colors.yellow, style = "bold" },
-- NvimTree
NvimTreeSymlink = { fg = colors.cyan, style = "bold" },
NvimTreeRootFolder = { fg = colors.green, style = "bold" },
NvimTreeFolderName = { fg = colors.blue },
NvimTreeFolderIcon = { fg = colors.dark_blue },
NvimTreeEmptyFolderName = { fg = colors.light_gray },
NvimTreeOpenedFolderName = { fg = colors.yellow, style = "italic" },
NvimTreeIndentMarker = { fg = colors.blue },
NvimTreeGitDirty = { fg = colors.yellow },
NvimTreeGitNew = { fg = colors.diff_add },
NvimTreeGitStaged = { fg = colors.purple },
NvimTreeGitDeleted = { fg = colors.diff_remove },
NvimTreeExecFile = { fg = colors.green, style = "bold" },
NvimTreeOpenedFile = { fg = colors.none },
NvimTreeSpecialFile = { fg = colors.orange, style = "underline" },
NvimTreeImageFile = { fg = colors.purple, style = "bold" },
NvimTreeNormal = { fg = colors.fg, bg = colors.active },
NvimTreeCursorLine = { bg = colors.float },
NvimTreeVertSplit = { fg = colors.active, bg = colors.active },
LspDiagnosticsError = { fg = colors.error },
LspDiagnosticsWarning = { fg = colors.warn },
LspDiagnosticsInformation = { fg = colors.info },
LspDiagnosticsHint = { fg = colors.hint },
-- WhichKey
WhichKey = { fg = colors.purple, style = "bold" },
WhichKeyGroup = { fg = colors.cyan },
WhichKeyDesc = { fg = colors.blue, style = "italic" },
WhichKeySeperator = { fg = colors.green },
WhichKeyFloat = { bg = colors.active },
-- LspSaga
LspFloatWinNormal = { fg = colors.fg, bg = colors.bg },
LspFloatWinBorder = { fg = colors.purple },
DiagnosticError = { fg = colors.error },
DiagnosticWarning = { fg = colors.warn },
DiagnosticInformation = { fg = colors.info },
DiagnosticHint = { fg = colors.hint },
LspSagaDiagnosticBorder = { fg = colors.gray },
LspSagaDiagnosticHeader = { fg = colors.blue },
LspSagaDiagnosticTruncateLine = { fg = colors.highlight },
ProviderTruncateLine = { fg = colors.highlight },
LspSagaShTruncateLine = { fg = colors.highlight },
LspSagaDocTruncateLine = { fg = colors.highlight },
LineDiagTruncateLine = { fg = colors.highlight },
LspSagaBorderTitle = { fg = colors.cyan },
LspSagaHoverBorder = { fg = colors.blue },
LspSagaRenameBorder = { fg = colors.green },
LspSagaDefPreviewBorder = { fg = colors.green },
LspSagaCodeActionTitle = { fg = colors.blue },
LspSagaCodeActionContent = { fg = colors.purple },
LspSagaCodeActionBorder = { fg = colors.blue },
LspSagaCodeActionTruncateLine = { fg = colors.highlight },
LspSagaSignatureHelpBorder = { fg = colors.light_red },
LspSagaFinderSelection = { fg = colors.green },
LspSagaAutoPreview = { fg = colors.red },
ReferencesCount = { fg = colors.purple },
DefinitionCount = { fg = colors.purple },
DefinitionPreviewTitle = { fg = colors.green },
DefinitionIcon = { fg = colors.blue },
ReferencesIcon = { fg = colors.blue },
TargetWord = { fg = colors.cyan },
-- BufferLine
BufferLineIndicatorSelected = { fg = colors.yellow },
BufferLineFill = { bg = colors.bg },
-- barbar
BufferCurrent = { fg = colors.fg, bg = colors.bg },
BufferCurrentIndex = { fg = colors.fg, bg = colors.bg },
BufferCurrentMod = { fg = colors.yellow, bg = colors.bg, style = "bold" },
BufferCurrentSign = { fg = colors.cyan, bg = colors.bg },
BufferCurrentTarget = { fg = colors.red, bg = colors.bg, style = "bold" },
BufferVisible = { fg = colors.fg, bg = colors.bg },
BufferVisibleIndex = { fg = colors.fg, bg = colors.bg },
BufferVisibleMod = { fg = colors.yellow, bg = colors.bg, style = "bold" },
BufferVisibleSign = { fg = colors.light_gray, bg = colors.bg },
BufferVisibleTarget = { fg = colors.red, bg = colors.bg, style = "bold" },
BufferInactive = { fg = colors.light_gray, bg = colors.active },
BufferInactiveIndex = { fg = colors.light_gray, bg = colors.active },
BufferInactiveMod = { fg = colors.yellow, bg = colors.active },
BufferInactiveSign = { fg = colors.light_gray, bg = colors.active },
BufferInactiveTarget = { fg = colors.red, bg = colors.active, style = "bold" },
-- Sneak
Sneak = { fg = colors.bg, bg = colors.fg },
SneakScope = { bg = colors.selection },
-- Indent Blankline
IndentBlanklineChar = { fg = colors.selection, style = "nocombine" },
IndentBlanklineContextChar = { fg = colors.purple, style = "nocombine" },
-- Nvim dap
DapBreakpoint = { fg = colors.red },
DapStopped = { fg = colors.green },
-- Illuminate
illuminatedWord = { bg = colors.highlight },
illuminatedCurWord = { bg = colors.highlight },
-- Hop
HopNextKey = { fg = colors.fg_light, style = "bold" },
HopNextKey1 = { fg = colors.cyan, style = "bold" },
HopNextKey2 = { fg = colors.purple },
HopUnmatched = { fg = colors.light_gray },
-- Fern
FernBranchText = { fg = colors.blue },
-- Lightspeed
LightspeedLabel = { fg = colors.pink, style = "bold,underline" },
LightspeedLabelOverlapped = { fg = colors.dark_pink, style = "underline" },
LightspeedLabelDistant = { fg = colors.cyan, style = "bold,underline" },
LightspeedLabelDistantOverlapped = { fg = colors.blue, style = "underline" },
LightspeedShortcut = { fg = "#E5E9F0", bg = colors.pink, style = "bold,underline" },
LightspeedMaskedChar = { fg = colors.light_purple },
LightspeedGreyWash = { fg = colors.gray },
LightspeedUnlabeledMatch = { fg = colors.fg_light, style = "bold" },
LightspeedOneCharMatch = { fg = colors.yellow, style = "bold,reverse" },
}
-- Options:
-- Make telescope look a bit better with alternate non-current background
if config.fade_nc then
plugins.TelescopePromptBorder["bg"] = colors.bg
plugins.TelescopeResultsBorder["bg"] = colors.bg
plugins.TelescopePreviewBorder["bg"] = colors.bg
end
-- Disable nvim-tree background
if config.disable.background then
remove_background(plugins.NvimTreeNormal)
end
return plugins
end
function theme.load_terminal()
-- dark
vim.g.terminal_color_0 = colors.float
vim.g.terminal_color_8 = colors.selection
-- light
vim.g.terminal_color_7 = colors.fg
vim.g.terminal_color_15 = colors.fg_light
-- colors
vim.g.terminal_color_1 = colors.red
vim.g.terminal_color_9 = colors.red
vim.g.terminal_color_2 = colors.green
vim.g.terminal_color_10 = colors.green
vim.g.terminal_color_3 = colors.yellow
vim.g.terminal_color_11 = colors.yellow
vim.g.terminal_color_4 = colors.blue
vim.g.terminal_color_12 = colors.blue
vim.g.terminal_color_5 = colors.purple
vim.g.terminal_color_13 = colors.purple
vim.g.terminal_color_6 = colors.cyan
vim.g.terminal_color_14 = colors.cyan
end
return vim.tbl_deep_extend("error", load_syntax(), load_editor(), load_treesitter(), load_lsp(), load_plugins())
end
return theme
|
local bytecode = require "luavm.bytecode"
require "luavm.compiler"
require "luavm.vm51"
local hello = io.open("hello.bcasm","r"):read("*a")
hello = compiler.compile(hello)
print(assert(loadstring(bytecode.save(hello)))())
print(vm.lua51.run(hello))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.