content
stringlengths
5
1.05M
-- Created by LuaView. -- Copyright (c) 2017, Alibaba Group. All rights reserved. -- -- This source code is licensed under the MIT. -- For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. local screenWidth, screenHeight = System.screenSize() -- Test La...
local CCSReader4Scene = class("CCSReader4Scene", function() return display.newScene("CCSReader4Scene") end) function CCSReader4Scene:ctor() app:createTitle(self, "CCS Reader4") app:createNextButton(self) ccs.GUIReader:getInstance():widgetFromJsonFile("DemoShop/DemoShop.ExportJson") :addTo(self) end return ...
local M = {} local memory = _G.memory local u8 = memory.readbyte function M.bus(address) if address < 0 or address >= 0x1000000 then return false, 'address is out of bounds' end local bank = math.floor(address / 0x10000) local offset = address % 0x10000 if bank >= 0x40 and bank < 0x70 then i...
local MailItem = {} function MailItem:new(content, button, object) -- TODO: Load the MailItemLayout.ini into MailItemConfig object = object or { title="", content = content, daySent=0, button = button, background = nil, callback = {}, callbackFlag = {}, ...
return require "Module:transliteration module testcases" { module = "cjs-translit", examples = [[ эм em эмчи emči кем kem чыл čïl кел kel тӧрт tört эмеш emeš кебе kebe ат at ]], sc = "Cyrl", lang = "cjs", }
AddCSLuaFile("shared.lua") include('shared.lua') /*----------------------------------------------- *** Copyright (c) 2012-2019 by DrVrej, All rights reserved. *** No parts of this code or any of its contents may be reproduced, copied, modified or adapted, without the prior written consent of the author, unless other...
return { init_effect = "", name = "boss akua", time = 0, color = "yellow", picture = "", desc = "", stack = 1, id = 8655, icon = 8655, last_effect = "", effect_list = { { type = "BattleBuffCastSkill", trigger = { "onAttach" }, arg_list = { skill_id = 8655, target = "TargetSelf" }...
local skynet = require "skynet" local gate_mgr = require "gate.gate_mgr" local client_msg = require "gate.client_msg" local sproto_helper = require "sproto_helper" local json = require "json" local uuid = require "uuid" local socket_msg = {} function socket_msg.open(fd, ip) uuid.seed() local c = {} c.fd = fd c.ip ...
--[[ Netherstorm -- Nether Drake.lua This script was written and is protected by the GPL v2. This script was released by BlackHer0 of the BLUA Scripting Project. Please give proper accredidations when re-releasing or sharing this script with others in the emulation community. ~~End of License Agreement -- BlackHer0, ...
function surfaceWithIndex(index) for name,surface in pairs(game.surfaces) do if surface.index == index then return surface end end warn("Surface with index "..tostring(index).." was not found") return nil end
local AddonName, Addon = ... local AceDB = LibStub("AceDB-3.0") local AceConfigRegistry = LibStub("AceConfigRegistry-3.0") _G[AddonName] = LibStub("AceAddon-3.0"):NewAddon(Addon, AddonName, "AceConsole-3.0") local Addon = Addon local OptionTable = { name = AddonName .. " Options", type = "group", childGro...
-- Credit to Stravant --[[ class Signal Description: Lua-side duplication of the API of Events on Roblox objects. Needed for nicer syntax, and to ensure that for local events objects are passed by reference rather than by value where possible, as the BindableEvent objects always pass their signal arguments ...
timer = 0; require "libs/vector" require "libs/matrix" require "libs/mesh" require "libs/basics" require "libs/run" require "libs/drawing" require "libs/controller" function love.load() rWidth = 320; rHeight = 240; rZoom = 1; rFullscreen = true; love.window.setTitle("PSX ENGINE v1.0.0") flags = {fullscreen...
-- local args, commands = { ... }, { }; local headers = { Accept = 'application/lua', ['User-Agent'] = 'CCPM-Client/0.1.0' }; local registryURL = 'https://ccpm-schroffl.rhcloud.com/registry/'; local packageFile, moduleBaseDir, cfgFile = 'package.ccp', 'modules', '.ccpm'; -- Read and parse the ccpm config local functio...
local BasePlugin = require "kong.plugins.base_plugin" local req_set_header = ngx.req.set_header local UpstreamAuthBasicHandler = BasePlugin:extend() function UpstreamAuthBasicHandler:new() UpstreamAuthBasicHandler.super.new(self, "upstream-auth-basic") end function UpstreamAuthBasicHandler:access(conf) UpstreamA...
local x = 0 z = 0 for j = 1, 200 do local x = 0 for i = 1, 5000000 do x = x + i end local y = x z = y end print(z)
local ITEM = {}; ITEM.ID = 120; ITEM.Reference = "item_lawbook"; ITEM.Name = "Book of the Law"; ITEM.Description = "This book sells you the current laws and limits."; ITEM.Weight = 5; ITEM.Cost = 250; ITEM.MaxStack = 100; ITEM.InventoryModel = "models/props_lab/bindergreenlabe...
local Data = require('__stdlib__/stdlib/data/data') local Recipe = require('__stdlib__/stdlib/data/recipe') --(( Woodless Recipes ))-- if settings.startup["picker-replace-wood"].value then Data('small-electric-pole', 'item'):remove_fields({'fuel_category', 'fuel_value'}) Recipe('small-electric-pole'):replace_i...
--- everything that handles the connection to the Hub, --- send and receive messages local diffMicroSeconds = function(time) local now = tmr.now() if now < time then return now + (2^32 - time) else return now - time end end local listenPort = 7411 local listenSocket = nil local timeLastPackageReceived = nil...
-- forces any level to be dark, even bosses set_callback(function() state.level_flags = set_flag(state.level_flags, 18) end, ON.POST_ROOM_GENERATION)
local Helper = require('spec.helper.helper') local Promise = require('promise') local dummy = { dummy = 'dummy' } -- we fulfill or reject with this when we don't intend to test against it local sentinel = { sentinel = 'sentinel' } -- a sentinel fulfillment value to test for with strict equality local function testPro...
AddCSLuaFile() if !Flux then require_relative 'flux_struct' end -- Environment stuff FLUX_ENV_PATH = file.Exists('flux/config/environment.local.lua', 'LUA') and 'flux/config/environment.local.lua' or 'flux/config/environment.lua' setenv('FLUX_ENV', string.lower(include(FLUX_ENV_PATH) or 'development')) IS_PRODU...
function GetImageScaleForNewDimensions(image, newWidth, newHeight) local currentWidth, currentHeight = image:getDimensions() return (newWidth / currentWidth), (newHeight / currentHeight) end function GetAngle(x1, y1, x2, y2) return math.deg(math.atan2(y2 - y1, x2 - x1)) end
repeat f() until a repeat if b then f() end until a repeat repeat f() until b g() until a repeat f() repeat g() until b until a
--[[ Copyright © 2018 Neph <neph@crypt.lol> This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. Se...
if onClient() then return end package.path = package.path .. ";data/scripts/lib/?.lua" local Placer = include("placer") local PlanGenerator = include("plangenerator") local StyleGenerator = include ("internal/stylegenerator.lua") local Azimuth, Config, Log = unpack(include("gatefounderinit")) -- namespace GateFounde...
local GenerateProject = function() local base_dir = GetModulesDirectory("Camera") project "Camera" if _ACTION then location(GetModulesLocation()) end kind "StaticLib" language "C++" files { base_dir .. "**.h", base_dir .. "**.cpp", base_dir .. "**.inl" } defines { "SHIB_STATIC" } ModuleGen("Camer...
function Initialize() if SKIN:GetVariable('Note') == '' then SKIN:Bang('[!SetOption Note StringStyle Italic][!SetOption Note Text "Write something..."]') end end function EditItemA() SKIN:Bang('[!SetVariable NoteOrig "'..SKIN:GetVariable('Note'):gsub('\n', '\r\n')..'"][!CommandMeasure mInput "Exec...
game.action = stead.hook(game.action, function(f, s, cmd, ...) if cmd == 'user_kbd' then local r,v; if stead.here().kbd then r,v = stead.call(stead.here(), 'kbd', input.key_event.down, input.key_event.key); elseif s.kbd then r,v = stead.call(s, 'kbd', input.key_event.down, input.key_event.key); e...
local ProcessMD = require("src.process_md") local Utils = require("spec.utils") local assets_dir = './spec/assets/' describe("process_md", function() describe("get_file_content", function() it("Gets content of file test.txt", function() assert.equal( "![Tux, the Linux mascot](h...
local oldBuildClassToGrid = BuildClassToGrid function BuildClassToGrid() local classToGrid = oldBuildClassToGrid() classToGrid["TunnelExit"] = {3,8} return classToGrid end
-- Copyright (c) 2010-2011 by Robert G. Jakabosky <bobby@neoawareness.com> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -...
return { equipment = { { type = "energy-shield-equipment", name = "yi_equip_shield_a", chassis = { "player" }, minimum_tier = 3, }, { type = "energy-shield-equipment", name = "yi_equip_shield_b", chassis = { "player" }, minimum_tier = 4, }, { type = "battery-equipment", name = "yi_equip_battery_a", chassis = { ...
function map_ctf_chiom.init() ctf.init() ctf.makeTeam(181, 266, 1) ctf.makeTeam(818, 266, 2) end
local _, addon = ...; addon.officialCourses = {}
--[[ AscendScripting Script - This software is provided as free and open source by the staff of The AscendScripting Team.This script was written and is protected by the GPL v2. The following script was released by a AscendScripting Staff Member. Please give credit where credit is due, if modifying, redistributing and/...
env = require('test_run') test_run = env.new() -- gh-3018: typeless columns are prohibited. -- box.execute("CREATE TABLE t1 (id PRIMARY KEY);") box.execute("CREATE TABLE t1 (a, id INT PRIMARY KEY);") box.execute("CREATE TABLE t1 (id PRIMARY KEY, a INT);") box.execute("CREATE TABLE t1 (id INT PRIMARY KEY, a);") box.exe...
local DESTROYED_ELEMENT_DIMENSION = getWorkingDimension() + 1 local rootElement = getRootElement() -- ACTION CLASSES ActionMove = {} -- private ActionMove.element = false ActionMove.name = "move" ActionMove.oldPosX, ActionMove.curPosX = 0, 0 ActionMove.oldPosY, ActionMove.curPosY = 0, 0 ActionMove.oldPosZ, ActionMo...
dofile("table_show.lua") dofile("urlcode.lua") JSON = (loadfile "JSON.lua")() local item_type = os.getenv('item_type') local item_value = os.getenv('item_value') local item_dir = os.getenv('item_dir') local warc_file_base = os.getenv('warc_file_base') local url_count = 0 local tries = 0 local downloaded = {} local ad...
local vim = vim local M = { __display = require'aosp_nvim.display':new() } local default_options = { native_tests = false, host_module = false, include_fakes = false, } local parse_options = function(opts) local module_info = require('aosp_nvim.module_info') local fulfills_requirements = fun...
local mod = DBM:NewMod("VoWTrash", "DBM-Party-Legion", 10) local L = mod:GetLocalizedStrings() mod:SetRevision(("$Revision: 17522 $"):sub(12, -3)) --mod:SetModelID(47785) mod:SetZone() mod.isTrashMod = true mod:RegisterEvents( "SPELL_CAST_START 196799 193069 196799 196249", "SPELL_AURA_APPLIED 202615 1...
--------- [ Element Data returns ] --------- local function getData( theElement, key ) local key = tostring(key) if isElement(theElement) and (key) then return exports['[ars]anticheat-system']:c_callData( theElement, tostring(key) ) else return false end end --------- [ Commands ] --------- local generalCm...
--- --- Generated by MLN Team (https://www.immomo.com) --- Created by MLN Team. --- DateTime: 15-01-2020 17:35 --- --- --- String工具类,可进行json与Map、Array之间互相转换,获取字符串长度,计算字符串尺寸 --- ---@class StringUtil @parent class ---@public field name string ---@type StringUtil StringUtil= { _priveta_class_name = "StringUtil"} --- ...
if IsValid(TESTP) && ispanel(TESTP) then TESTP:Remove() end -- Create a table of models local models = { ["models/props_c17/oildrum001_explosive.mdl"] = {}, ["models/props_c17/oildrum001.mdl"] = {}, ["models/props_junk/TrafficCone001a.mdl"] = {}, ["models/props_c17/gravestone004a.mdl"] = {} } local frame = vgu...
--[[ Name: gui/pages/executorPage.lua Description: Program the executor page Author: misrepresenting ]] local notify, newTab do local ui = import('ui') notify, newTab = ui.notify, ui.newTab end local onClick = import('gui/helpers').onClick local syntaxHighlighter = import('gui/syntaxHighlighter') l...
-- Copyright (C) by Midoks(midoks@163.com) -- https://www.elastic.co/guide/en/elasticsearch/client/index.html -- https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html local cjson = require "cjson" local http = require "resty.elasticsearch.http" local setmetatable = setmetatable local _M = { _VERS...
class "Program" { ps = nil; id = nil; typus = 0; state= 0; __init__ = function(self, typus) self.ps = psGenerator_generatePS(typus) end, update = function(self, dt) self.ps:update(dt) end }
local class = require 'class' local Scene = require 'Scene' local IntroScene = class('IntroScene', Scene) function IntroScene:initialize() Scene.initialize(self, "IntroScene") self.timer = require 'engine.Timer':new(5000) self.font = love.graphics.newFont("assets/fonts/ki_kokugo/font_1_kokugl_1.00_rls.t...
<%- partial('../sidebar') %> <div id='content'> <div class='panel'> <div class='header'> <ul class='breadcrumb'> <li><a href='/'>主页</a><span class='divider'>/</span></li> </ul> </div> <div class='inner userinfo'> <div class='user_big_avatar'> <img src="<%- avatar(user.a...
local ttl for i, val in ipairs(KEYS) do if i == 1 then ttl = struct.unpack('>h', val) else redis.call('expire', val, ttl) end end
-- local pattern_time = require("pattern") local GGrid={} function GGrid:new(args) local m=setmetatable({},{__index=GGrid}) local args=args==nil and {} or args m.grid_on=args.grid_on==nil and true or args.grid_on -- initiate the grid local grid_device=util.file_exists(_path.code.."midigrid") and include "m...
include( "vgui_scoreboard_team.lua" ) include( "vgui_scoreboard_small.lua" ) local PANEL = {} Derma_Hook( PANEL, "Paint", "Paint", "ScoreHeader" ) Derma_Hook( PANEL, "ApplySchemeSettings", "Scheme", "ScoreHeader" ) Derma_Hook( PANEL, "PerformLayout", "Layout", "ScoreHeader" ) function PANEL:Init() se...
local menu = { { "Home", "index.html", { "Overview", "index.html#overview" }, { "Status", "index.html#status" }, { "Download", "index.html#download" }, { "Dependencies", "index.html#dependencies" }, { "History", "index.html#history" }, { "Credits", "index.html#credits" }, { "Contact", "index.html#contac...
--- === cp.apple.finalcutpro.timeline.Index === --- --- Timeline Index Module. -- local log = require("hs.logger").new "Index" local go = require("cp.rx.go") local axutils = require("cp.ui.axutils") local SplitGroup ...
--[[----------------------------------------------------------------------------- * Infected Wars, an open source Garry's Mod game-mode. * * Infected Wars is the work of multiple authors, * a full list can be found in CONTRIBUTORS.md. * For more information, visit https://github.com/JarnoVgr/InfectedWars * * Inf...
local Mutator = class(BaseMutator) Mutator.Id = "AllBulldozerSpawns" Mutator.OptionsName = "Bomb Squad" Mutator.OptionsDesc = "Replace all spawning units with various Bulldozers and backup" Mutator.Incompatibilities = { "AllCloakerSpawns", "AllTaserSpawns", "AllShieldSpawns", "AllBlueSpawns" } Mutator.HookTaskData = ...
local L = BigWigs:NewBossLocale("Ahn'kahet Trash", "zhTW") if not L then return end if L then --L.spellflinger = "Ahn'kahar Spell Flinger" --L.eye = "Eye of Taldaram" --L.darkcaster = "Twilight Darkcaster" end
local nkf = require("nkf") local konnicihwa_sjis = "\130\177\130\241\130\201\130\191\130\205" local konnicihwa_utf8 = "\227\129\147\227\130\147\227\129\171\227\129\161\227\129\175" local konnichiwa_jis_base64 = "GyRCJDMkcyRLJEEkTxsoQg==" print(nkf.convert("-S -w", konnicihwa_sjis)) print(nkf.convert("-W -j -MB", konn...
-- --basic diamond items -- --Industrial Diamond minetest.register_craftitem("gocm_carbon:industrial_diamond", { description = "An Industrial Grade Diamond", groups = {compressable=1}, returns = 'gocm_carbon:recompressed_diamond', inventory_image = "tgg_compressedrawdiamondv2.png", }) --Recompressed Diamond minetest....
local m = {} -- Do nothing function m.noop() end -- Return the value of an environment variable or default if it isn't set or is -- empty. function m.getenv(variable, default) local value = os.getenv(variable) if not value or value == "" then return default end return value end -- Return the first valid path f...
ys = ys or {} ys.Battle.BattleBuffHPLink = class("BattleBuffHPLink", ys.Battle.BattleBuffEffect) ys.Battle.BattleBuffHPLink.__name = "BattleBuffHPLink" ys.Battle.BattleBuffHPLink.FX_TYPE = ys.Battle.BattleBuffEffect.FX_TYPE_LINK ys.Battle.BattleBuffHPLink.Ctor = function (slot0, slot1) slot0.super.Ctor(slot0, slot1) ...
--[[ TheNexusAvenger Attack for a bomb. Class is static (should not be created). --]] local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedStorageProject = require(ReplicatedStorage:WaitForChild("Project"):WaitForChild("ReplicatedStorage")) local NexusObject = ReplicatedStorageProject:GetR...
C_IncomingSummon = {} ---@param unit string ---@return boolean summon ---[Documentation](https://wow.gamepedia.com/API_C_IncomingSummon.HasIncomingSummon) function C_IncomingSummon.HasIncomingSummon(unit) end ---@param unit string ---@return SummonStatus status ---[Documentation](https://wow.gamepedia.com/API_C_Incom...
function SpecterStartup(deck) -- function called at the start of the duel, if the AI was detected playing your deck. --AI.Chat("Startup functions loaded.") AI.Chat("You are now playing against AI_Majespecter version 1.5 by Xaddgx.") AI.Chat("Good luck!") -- Your links to the important AI functions. If you don...
------------------------------------------------------------ -- Copyright (c) 2016 tacigar. All rights reserved. -- https://github.com/tacigar/maidroid ------------------------------------------------------------ do -- register core writer local dye_item_map = { ["dye:red"] = "maidroid_core:basic", ["dye:yell...
local Draw = require("api.Draw") local Gui = require("api.Gui") local IUiList = require("api.gui.IUiList") local UiList = require("api.gui.UiList") local UiTheme = require("api.gui.UiTheme") local ListModel = require("api.gui.ListModel") local IInput = require("api.gui.IInput") local InputHandler = require("api.gui.Inp...
print("Please wait while Clockwork initializes...") CloudAuthX = CWUtil; CloudAuthX.kernel = {}; function CloudAuthX.GetVersion() return CLOUDAUTHX_VERSION; end; function CloudAuthX.kernel:IncludeSchema() local schemaFolder = Clockwork.kernel:GetSchemaFolder(); if (schemaFolder == "") then return; end; Cloc...
local AO = require(script:GetCustomProperty("API")) local HELPER = script:GetCustomProperty("Helper") local COMPONENT_ROOT = script:GetCustomProperty("ComponentRoot"):WaitForObject() local CONTAINER = script:GetCustomProperty("Container"):WaitForObject() local SNAP_SCREEN_OFFSET = COMPONENT_ROOT:GetCustomProperty("Sna...
#!/usr/local/bin/lua local sql = require'carlos.sqlite' local fd = require'carlos.fold' local fs = require'carlos.files' local aux = require'ferre.aux' local function records( q ) local conn = sql.connect'/db/inventario.db' assert( q.clave and q.gps ) assert(conn.exec(string.format('UPDATE inventario S...
local mxml = require("moonxml") local loadkit = require("loadkit") local inspect = require("inspect") local html = mxml.html:buffered() local moonxmlFind = loadkit.make_loader("lua") local generate generate = function(tbl) html.buffer:truncate(0) local template = html:loadluafile(moonxmlFind("tableview.template")) ...
--[[ Name: "sh_coms.lua". Product: "nexus". --]] local MOUNT = MOUNT; local COMMAND; COMMAND = {}; COMMAND.tip = "Set whether a door is false."; COMMAND.text = "<bool IsFalse>"; COMMAND.flags = CMD_DEFAULT; COMMAND.access = "a"; COMMAND.arguments = 1; -- Called when the command has been run. function COMMAND:OnRun(p...
local b64 = require "plugin.nakama.util.b64" local json = require "plugin.nakama.util.json" local log = require "plugin.nakama.util.log" local M = {} local JWT_TOKEN = "^(.-)%.(.-)%.(.-)$" function M.expired(session) assert(session and session.expires, "You must provide a session") return os.time() > session.expi...
fig = {"правоугаоник", "квадрат", "троугао"} fig1 = {"Правоугаоник", "Квадрат", "Троугао"} fig2 = {"правоугаоника", "квадрата", "троугла"} remark_str = "(Помоћ: дужина странице NP је 10 дужина квадратића мреже.)"
local log = hs.logger.new('persistvpn', 'debug') local cache = { shouldConnect = hs.settings.get('vpnShouldConnect') or false } local module = { cache = cache } local keys = require('ext.table').keys local notify = require('utils.controlplane.notify') local ICON_OFF = os.getenv('HOME') .. '/.hammerspoon/a...
local state = { variables = {} } -- | 16 | -- Удержание -- --------------------------------------------------------------------- function state:Processing(object,s) if object.wait == 0 then if s.a ~= nil and object:pressed("attack") then object:setFrame(s.a) end if s.j ~= nil and object:pressed("jump") then objec...
dbDefaults = { profile = { --general all = false, arena = true, battleground = true, field = true, myself = false, enemyinrange = true, sapath = SA_LOCALEPATH[GetLocale()] or "Interface\\Addons\\SoundAlerter\\voice\\", debugmode = false, trinket = true, drinking = true, class = true, --chat ale...
----------------------------------------------------- ITEM.name = "Francois Bedel 1897" ITEM.desc = "Bottle of Francois Bedel Champagne, 1897." ITEM.category = "Alcohols" ITEM.model = "models/foodnhouseholditems/champagne3.mdl" ITEM.hunger = 15 ITEM.thirst = 50 ITEM.empty = false ITEM.permit = "consumables" ...
------------------------------------------------------------------------------- -- -- tek.ui.layout.default -- Written by Timm S. Mueller <tmueller at schulze-mueller.de> -- See copyright notice in COPYRIGHT -- -- OVERVIEW:: -- [[#ClassOverview]] : -- [[#tek.class : Class]] / -- [[#tek.ui.class.layout : Layout]] / -...
function LoadCDMMx1(property) local loader = require("CdmLoader")() loader:LoadMx1(property.filepath) return loader end
local tag = "Canvas" local canvas_order = 3300 local function addProp(name, config) config.Order = canvas_order canvas_order = canvas_order + 1 properties.Add(name, config) end local function isCanvas(_, ent, ply) return IsValid(ent) and IsValid(ply) and ent.GetURL and ent:GetURL() ~= "" end local...
-- we use async to detect Prosody 0.10 and earlier local have_async = pcall(require, 'util.async'); if not have_async then return; end local unlimited_jids = module:get_option_inherited_set("unlimited_jids", {}); -- rises the limit of the stanza size for the unlimited jids, default is 10MB local unlimited...
RUN_TESTS = false if RUN_TESTS then print('Running tests') end local utility = nil LOCALIZATION = nil STATE = { PATHS = { GAMES = 'games.json' }, GAME = nil, ALL_GAMES = nil, GAMES_VERSION = nil, CENTERED = false, ACTIVE_INPUT = false, PROGRESS = 1 } local COMPONENTS = { STATUS = nil, SETTINGS...
local Data = require('__stdlib__/stdlib/data/data') require('prototypes/adjustment-pad') require('prototypes/styles') require('prototypes/pointer-beam') Data { type = 'flying-text', name = 'picker-flying-text', flags = {'placeable-off-grid', 'not-on-map'}, time_to_live = 150, speed = 0.05 } Data ...
local increasingThreatTraitTable = {"vengeful", "craven", "tempered", "covetous", "brutish", "wily"} Diplomacy._Debug = 0 if onServer() then function Diplomacy.sendFactionsWithIncreasingThreatTraits() local _MethodName = "Send Factions With IT Traits" Diplomacy.Log(_MethodName, "sending factions w...
local M = {} M.__index = M function M.new() return setmetatable({ }, M) end function M:drawObject(img, x, y, w, h) local iw, ih = img:getDimensions() lg.draw(img, x, y, 0, w / iw, h / ih) end function M:renderTextInBox(text, x, y, width, height, font) local lineHeight = font:getHeight() local true...
--[[ Fragmented Furniture: Karl wants to invite his friends over for a party. However, he doesn't have a lot of chairs, and he wants to make sure that nobody will have to stand, including himself. So he tells each friend to bring as many chairs as they can. With that help, what's the maximum number of friends he can ...
require 'spec.fixPackagePath' local interpolate = require 'i18n.interpolate' describe('i18n.interpolate', function() it("exists", function() assert_equal('function', type(interpolate)) end) it("performs standard interpolation via string.format", function() assert_equal("My name is John, I am ...
local Llama = script.Parent local t = require(Llama.t) local validate = t.table local function isEmpty(table) assert(validate(table)) return next(table) == nil end return isEmpty
-- Load configuration options up front ScriptHost:LoadScript("scripts/settings.lua") ScriptHost:LoadScript("scripts/logic_common.lua") ScriptHost:LoadScript("scripts/logic_custom.lua") Tracker:AddMaps("maps/maps.json") Tracker:AddItems("items/common.json") Tracker:AddItems("items/dungeon_items.json") Tracker:AddItem...
skills = {} function skills:attack01() -- função a ser ativada local me = Client.myPlayerUnit local target = nil local range = 32*15 -- distancia x.* y. local skillID = 1 -- id da skill target = Client.field.FindNearUnit(me.x, me.y, range, 2, me) if (target ~= nil) then local dist = (me.x - target.x)^2 + (...
local _, ns = ... local B, C, L, DB, P = unpack(ns) local CH = P:GetModule("Chat") ---------------------- -- Credit: TinyChat ---------------------- local function GetHyperlink(hyperlink, texture) if (not texture) then return hyperlink else return "|T" .. texture .. ":0:0:0:0:64:64:5:59:5:59|t" .. hyperlink end ...
local lpeg = require'lpeg' local pp = require'pp' local number = lpeg.R'09' ^ 1 / tonumber local space = lpeg.P(" ") ^ 0 local pattern = number * ',' * space * number local minx, miny, maxx, maxy local input = {} for line in io.lines("6.txt") do local x, y = lpeg.match(pattern, line) input[#input + 1] = { x, y } ...
local f = require "functional" local location = { mobs = {}, rooms = {} } function location:addmob(mobid, roomid) self.mobs[mobid] = roomid table.insert(self.rooms[roomid], mobid) end function location:removemob(mobid, roomid) f.first(self.rooms[roomid], function(m) if m == mobid then table.remov...
local string_format = string.format local clog = function(type, file, line, funname, str) print(string_format("[%s:%s:%s:LEV_%d] %s", file, line, funname, type, str)) end local function __FILE__() return debug.getinfo(4,'S').source end local function __LINE__() return debug.getinfo(4, 'l').currentline end local f...
-- Copyright 2018 Karl Palsson <karlp@tweak.net.au> -- Licensed to the public under the Apache License 2.0. module("luci.controller.pagekitec", package.seeall) function index() entry({"admin", "services", "pagekitec"}, cbi("pagekitec"), _("PageKite")) end
local vendor_spec_file_path = vim.fn.tempname() local f = io.open(vendor_spec_file_path, "w") f:write([[ return { "notomo/example_target.nvim/lua/example_target/init.lua", }]]) f:close() require("vendorlib").install("example", vendor_spec_file_path)
-- Autogenerated with DRAKON Editor 1.32 require('strict').on() local table = table local string = string local pairs = pairs local ipairs = ipairs local io = io local pcall = pcall local xpcall = xpcall local debug = debug local math = math local tostring = tostring local tonumber = tonumber local clock = require("cl...
-- -- Author: Ab-47; State: Complete. -- Additional Notes; N/A; Rights: All Rights Reserved by Developers and Ab-47. -- Project: NGCaghost/client.lua consisting of 2 files. -- function init_blips(plr, string) if (plr) then if (string == "enable") then exports.DENblips:readdPlayerBlip(plr) elseif (string == "di...
---@class PlayerExtState : zombie.ai.states.PlayerExtState ---@field private _instance PlayerExtState PlayerExtState = {} ---@public ---@param arg0 IsoGameCharacter ---@return void function PlayerExtState:exit(arg0) end ---@public ---@param arg0 IsoGameCharacter ---@return void function PlayerExtState:enter(arg0) end...
slot0 = class("BattleGateDebug") ys.Battle.BattleGateDebug = slot0 slot0.__name = "BattleGateDebug" slot0.Entrance = function (slot0, slot1) if getProxy(FleetProxy):getFleetById(1) == nil or slot3:isEmpty() then pg.TipsMgr.GetInstance():ShowTips(i18n("stage_beginStage_error_fleetEmpty")) return end slot1:send...