content
stringlengths
5
1.05M
--[[ -- -- Copyright (c) 2013-2017 Wilson Kazuo Mizutani -- -- 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, mo...
--[[ Copyright 2019 Teverse @File core/server/characterController.lua @Author(s) Jay --]] local controller = {} controller.defaultSpeed = 50 controller.characters = {} controller.chat = nil update = function(client, cameraDirection) local totalForce = vector3() local moved = false for i, pressed in pa...
local ESM = Narci_EquipmentSetManager; --defined in EquipmentSetManager.lua local IconPresets = {}; IconPresets.tank = { 951819, --Shield_draenorcrafted_d_02_b_alliance 951820, --Shield_draenorcrafted_d_02_b_horde 2398168, --Inv_shield_1h_bloodelfguard_d_01 }; ...
--- @class GFile --- This is the file object. It used used primarily to read or write binary data from files. --- The object is returned by file.Open. local GFile = {} --- Dumps the file changes to disk and closes the file handle which makes the handle useless. function GFile:Close() end --- Returns whether the ...
-- Remember to use the cop group or this won't work -- K > Admin > Add Group > User ID > cop local Tunnel = module("vrp", "lib/Tunnel") local Proxy = module("vrp", "lib/Proxy") vRP = Proxy.getInterface("vRP") vRPclient = Tunnel.getInterface("vRP","vRP_bank") local banks = { ["fleeca"] = { position = { ['x'] = 147...
-- MIT License Copyright (c) 2021 Evgeni Chasnovski ---@brief [[ --- Custom minimal and fast Lua module which implements --- [base16](http://chriskempson.com/projects/base16/) color scheme (with --- Copyright (C) 2012 Chris Kempson) adapated for modern Neovim 0.5 Lua --- plugins. Extra features: --- - Configurable aut...
local event = require "event" local network = require "network" local pipes = require "pipes" local component = require "component" local args = {...} local chanel = args[1] local AUTH = 0 local ENCRYPTED = 1 local TEXT = 2 local AUTHOK = 3 local passwdf = io.open("/etc/passwd","r") local pwHmac, pwHash = string.unp...
--*********************************************************** --** ROBERT JOHNSON ** --*********************************************************** require "TimedActions/ISBaseTimedAction" ---@class ISShovelAction : ISBaseTimedAction ISShovelAction = ISBaseTimedAction:derive("ISS...
local M = {} function M.setup() local opts = { silent = true, noremap = true } vim.api.nvim_set_keymap( 'n', '<space>h', '<cmd>lua require"harpoon.ui".toggle_quick_menu()<CR>', opts ) vim.cmd [[ autocmd FileType harpoon nnoremap <buffer> q :q<cr> ]] -- vim.api.nvim_...
local spec = require('cmp.utils.spec') local context = require('cmp.context') describe('context', function() before_each(spec.before) describe('new', function() it('middle of text', function() vim.fn.setline('1', 'function! s:name() abort') vim.bo.filetype = 'vim' vim.fn.execute('normal! fm...
--[[-------------------------------------------------- GUI Editor client settings.lua manages the gui editor settings (loading / saving / interface) --]]-------------------------------------------------- Settings = { gui = {}, default = { --guieditor_tutorial_completed = {value = false, type = "boolean"}, ...
local boo = { value = 7, compute= function(self, i) return self.value*i+1 end } print(boo:compute(3) + boo:compute(7))
fs_animation={} fs_ease={} fs_ease["사인인"] = function(a) return pini.Anim.EaseSineIn(a) end fs_ease["사인아웃"] = function(a) return pini.Anim.EaseSineOut(a) end fs_ease["사인인아웃"] = function(a) return pini.Anim.EaseSineInOut(a) end fs_ease["바운스인"] = function(a) return pini.Anim.EaseBounceIn(a) end fs_ease["바운스아웃"] = ...
----------------------------------- -- Area: Heavens Tower -- NPC: Celebratory Chest -- Type: Merchant NPC -- !pos -7.600 0.249 25.239 242 ----------------------------------- local ID = require("scripts/zones/Windurst_Walls/IDs") require("scripts/globals/shop") ----------------------------------- function onTrade(pla...
local t = Def.ActorFrame {}; t[#t+1] = StandardDecorationFromFileOptional("Header","Header"); t[#t+1] = StandardDecorationFromFileOptional("Footer","Footer"); t[#t+1] = StandardDecorationFromFileOptional("StyleIcon","StyleIcon"); return t
local BasePlugin = require "kong.plugins.base_plugin" local URLRewriter = BasePlugin:extend() URLRewriter.PRIORITY = 700 function URLRewriter:new() URLRewriter.super.new(self, "url-rewriter") end function resolveUrlParams(requestParams, url) for paramValue in requestParams do local requestParamValue = ngx.c...
-- Use Include 'prosody-posix-ldap.cfg.lua' from prosody.cfg.lua to include this file authentication = 'ldap2' -- Indicate that we want to use LDAP for authentication storage = 'ldap' -- Indicate that we want to use LDAP for roster/vcard storage ldap = { hostname = 'localhost', -- L...
function func(a) print(a) end
-- ----------------------------------------------------------------------------- -- Parse -- ----------------------------------------------------------------------------- describe('Pipe.parse', function() spec('ruleName', function() assert.are.equal('Pipe', parse.Expr('(1, 2) >> y()').ruleName) assert.are.eq...
Weapon.PrettyName = "SMG1" Weapon.WeaponID = "weapon_smg1" Weapon.DamageMultiplier = 1 Weapon.WeaponType = WEAPON_PRIMARY
require"lanesutils" local SCUDP = require"sc_comm_loop.scudp" local SCTCP = require"sc_comm_loop.sctcp" local SCFFI = require"sc_comm_loop.scinternal" local SCCOMMLOOP = {} local numsccomm = 0 function SCCOMMLOOP:init(types,options,linda) print"SCCOMMLOOP init" numsccomm = numsccomm + 1 assert(not self.inited)...
--Kozmo-ダーク・ローズ Hero inferno function c93302689.initial_effect(c) --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(93302689,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_D...
local M = {} local formatters_by_ft = {} local null_ls = require "null-ls" local services = require "lsp.null-ls.services" local Log = require "core.log" local function list_names(formatters, options) options = options or {} local filter = options.filter or "supported" return vim.tbl_keys(formatters[filter]) e...
local playsession = { {"amadey18", {550495}}, {"FailedSoul", {4781}}, {"kaimix", {302704}}, {"tykak", {81675}}, {"NerZurg", {1257}}, {"exabyte", {58391}}, {"iceskaarj", {549644}}, {"Order", {541083}}, {"Factorian12321", {419457}}, {"lintaba", {40929}}, {"cogito123", {26396}}, {"WiktorSPL", {4390}}, {"tyce1...
--- -- C Display = {} --- funktionslos function Display.DbgDestroyAllOrnamentalItemsRegions() end --- funktionslos function Display.DbgDumpLoopCounters() end --- funktionslos function Display.DbgSetCalcVisibilityBits() end --- funktionslos function Display.DbgSetDepthBias32() end --- setzt model parameter, um lic...
local playsession = { {"MatoPlayz", {26897}}, {"cawsey21", {6931}}, {"okan009", {686}}, {"itinker", {16915}}, {"sirvorlon", {3826}}, {"boogi310", {1515}}, {"DuaneOli4", {6881}}, {"Menander", {1441801}}, {"Kissthisangel", {243521}}, {"busterwoods", {1329575}}, {"bobeyzilla", {939208}}, {"illiander42", {84830...
function post() if session:isLogged() then http:redirect("/") return end if app.Captcha.Enabled then if not captcha:verify(http.postValues["g-recaptcha-response"]) then session:setFlash("validationError", "Invalid captcha answer") http:redirect("/subtopic/reg...
-- Tab for weapons-related interaction. local WeaponCheatsTab = {} local Logger = require("utility/logger") local Widget = require("utility/widget") local Style = require("ui/style") local Layout = require("ui/layout") local State = require("ui/state") local Glossary = require("data/glossary") local ItemHandler = requ...
json = require "json" utils = require "utils" -- Insert json folder path here, required for getTrackInfo local jsonPath = "./plugins" -- default should be correct if countryCodes.json is inside plugins folder local contentPath = "./assetto/content" -- depends on assetto server location -- these are lua hooks related ...
local View = {} function View:Start(data) self.view = SGK.UIReference.Setup(self.gameObject); CS.UGUIClickEventListener.Get(self.view.root.bg.commitBtn.gameObject).onClick = function () DialogStack.Pop() end CS.UGUIClickEventListener.Get(self.view.root.mask.gameObject).onClick = function () Di...
local Badge = require "widgets/badge" local UIAnim = require "widgets/uianim" local HealthBadge = Class(Badge, function(self, owner) Badge._ctor(self, "health", owner) self.sanityarrow = self.underNumber:AddChild(UIAnim()) self.sanityarrow:GetAnimState():SetBank("sanity_arrow") self.sanityarrow:GetAnimState():Set...
--[[ © 2021 Tony Ferguson, do not share, re-distribute or modify without permission of its author ( devultj@gmail.com - Tony Ferguson, http://www.tferguson.co.uk/ ) ]] local function registerAll() for sClass, tData in pairs( scripted_ents.GetList() ) do if string.find( sClass, "_base" ) then continue en...
----------------------------------- -- Area: Nashmau -- NPC: Chichiroon -- Standard Merchant NPC ----------------------------------- local ID = require("scripts/zones/Nashmau/IDs") require("scripts/globals/shop") function onTrade(player, npc, trade) end function onTrigger(player, npc) local stock = { ...
function start() local ip = loadfile("/bin/ip.lua") local fs = require "filesystem" local text = require "text" print("\x1b[32m>>\x1b[39m Configure network") if not fs.exists("/etc/netctl") then print("\x1b[31m!!\x1b[39m /etc/netctl DOES NOT EXIST!") return end for line ...
-- -- -- -- -- -- -- Function Locals -- -- -- -- -- -- -- local setmetatable, pairs, type = setmetatable, pairs, type local encode, decode, url_encode = json.encode, json.decode, json.url_encode local concat = table.concat local find, sub, tostring = string.find, string.sub, tostring local http = require("ssl.https"...
return {[1]={lang={English={[1]={limit={[1]={[1]="#",[2]="#"},[2]={[1]="#",[2]="#"}},text="%1% to %2% Base Off Hand Physical Damage"}}},stats={[1]="off_hand_local_minimum_added_physical_damage",[2]="off_hand_local_maximum_added_physical_damage"}},[2]={lang={English={[1]={limit={[1]={[1]="#",[2]="#"},[2]={[1]="#",[2]="#...
local BasePlugin = require "kong.plugins.base_plugin" local constants = require "kong.constants" local meta = require "kong.meta" local http = require "resty.http" local cjson = require "cjson.safe" local multipart = require "multipart" local kong = kong local tostring ...
function onSay(player, words, param) local hasAccess = player:getGroup():getAccess() local players = Game.getPlayers() local playerCount = Game.getPlayerCount() player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, playerCount .. " players online.") local i = 0 local msg = "" for k, targetPlayer in ipairs(player...
fx_version 'cerulean' game 'gta5' author 'Andreww z7rwastaken <andreww@shadowct.eu>' description 'Scaffold for your TypeScript FiveM resource, replace this with your resource description.' version '1.0.0' name 'ad-scaffold' client_scripts { 'dist/client/*.bundle.js' } server_scripts { 'dist/server/*.bundle....
require "ISUI/ISUIElement" ---@class ISPanel : ISUIElement ISPanel = ISUIElement:derive("ISPanel"); --************************************************************************-- --** ISPanel:initialise --** --************************************************************************-- function ISPanel:initialise() IS...
-- --The MIT License (MIT) --Copyright (c) 2014 CoolDark -- --See LICENSE file -- addCommandHandler ( "pm", function ( player, cmd, id, ... ) local tableText = { ... } local text = table.concat ( tableText, " " ) if player ~= g_Players[tonumber ( id )] then if g_Players[tonumber ( id )] ~= nil th...
local map = require 'utils.map' require("zen-mode").setup{ window = { options = { number = false, relativenumber = false, cursorline = false } } } map('n', '<leader>z', ':ZenMode<cr>')
local RechargePreroItem = class(CommonGameLayer, false); RechargePreroItem.s_controls = { item = 1, bg = 2, }; RechargePreroItem.ctor = function(self, data) super(self, require(RechargeViewPath.."rechargePreroItem") ); self:setSize(170, 140); self.m_data = data; self.m_item = self:findViewById(sel...
function love.load() end local init=require "init" local version=init.version local alg=require "alg.alg_basic" local inspect=require "inspect" local functions, my_functions=require("alg.functions")() local ffi=require "ffi" local networks=require"network" --------------------------------------------------------------...
----------------------------------------------------------------------------------------------------------------------- -- RedFlat simple line desktop widget -- --------------------------------------------------------------------------------...
---@type PresetData local p = Classes.PresetData Data.Presets = { Start = { Battlemage = p:Create("Battlemage", "Class_Battlemage_Start", "Class_Battlemage", "Class_Battlemage_Start_Undead"), Cleric = p:Create("Cleric", "Class_Cleric_Start", "Class_Cleric", "Class_Cleric_Start_Undead"), Enchanter = p:Create("En...
require("mineunit") mineunit("core") mineunit("player") describe("CNC API", function() fixture("default") fixture("basic_materials") fixture("digilines") sourcefile("init") -- Our player Sam will be helping, he promised to place some nodes local Sam = Player("Sam") -- Construct test world with CNC machines...
newTalentType{ type="thief/thief", name = "thief", description = "Standard thief abilities" } newTalent{ name = "Pick Pockets", type = {"thief/thief", 1}, info = "Liberate items from the confines of pockets", mode = "activated", -- Naw, allow pick pockets while Hide is on, I like that tactic --...
local util = require("spec.util") local script = require("cyan.script") describe("script", function() describe("load", function() it("should load a script from a given path", function() local dirname = util.write_tmp_dir(finally, { ["foo.lua"] = [[print("foo")]], }) loca...
local vector_meta = global_metatable("vector") local quat_meta = global_metatable("quaternion") local transform_meta = global_metatable("transformation") function IsTransformation(v) return type(v) == "table" and v.pos and v.rot end function MakeTransformation(t) setmetatable(t.pos, vector_meta) setmetata...
-------------------------------------------------------------------------------- -- LAYOUTS -- SINTAX: -- { -- name = "App name" ou { "App name", "App name" } -- title = "Window title" (optional) -- func = function(index, win) -- COMMANDS -- end -- }, -- -- It searches for application "name" and call...
--[[ 3p8_collector_pizza Uses: It is a pizza box! Todo: ]] AddCSLuaFile() ENT.Base = "3p8_collector" ENT.HeldObject = "3p8_pizza" ENT.ItemName = "Pizza Box" ENT.ItemModel = "models/props_c17/consolebox01a.mdl" --money printer model xD ENT.Material = "models/items/boxsniperrounds" ENT.MaxCount...
local eonz = require 'eonz' local table = eonz.pf.table local string = eonz.pf.string local Production = require 'eonz.lexer.production' local Grammar = eonz.class "eonz::lexer::Grammar" do function Grammar.new(productions, opt) for i, prod in ipairs(productions) do if getmetatable(prod) ~= Production the...
function halve(a) return a/2 end function double(a) return a*2 end function isEven(a) return a%2 == 0 end function ethiopian(x, y) local result = 0 while (x >= 1) do if not isEven(x) then result = result + y end x = math.floor(halve(x)) y = double(y) ...
local sk1 = hslk_ability_ring({ Name = "月神强击", Art = "ReplaceableTextures\\PassiveButtons\\PASBTNTrueShot.blp", TargetArt = "Abilities\\Spells\\NightElf\\TrueshotAura\\TrueshotAura.mdl", Area = { 600 }, Hotkey = "E", race = "human", _ring = { attr = { attack_green = "+90"...
-- Evaluate performance of trained model. -- -- Yujia Li, 10/2015 -- require 'lfs' babi_data = require 'babi_data' seq_data = require 'seq_data' eval_util = require 'eval_util' ggnn = require '../ggnn' cmd = torch.CmdLine() cmd:option('-modeldir', '', 'Path to the root model output directory.') cmd:option('-mb', 10...
-- -- luaunit.lua -- -- Description: A unit testing framework -- Homepage: http://phil.freehackers.org/luaunit/ -- Initial author: Ryu, Gwang (http://www.gpgstudy.com/gpgiki/LuaUnit) -- Lot of improvements by Philippe Fremy <phil@freehackers.org> -- More improvements by Ryan P. <rjpcomputing@gmail.com> -- Furt...
-- ======= Copyright (c) 2003-2012, Unknown Worlds Entertainment, Inc. All rights reserved. ===== -- -- lua\ArmsLab.lua -- -- Created by: Charlie Cleveland (charlie@unknownworlds.com) -- -- ========= For more information, visit us at http://www.unknownworlds.com ===================== Script.Load("lua/Mixins/Clien...
require 'olua.lexer' module(..., package.seeall) local result local recursivelyunparse local recursivelyunparsebinop local function emit(s) result[#result + 1] = s end local typetable = { chunk = function(ast) for _, statement in ipairs(ast) do recursivelyunparse(statement) end end, doend = function(as...
return Component.create("DrawableCircle", {"radius", "fill", "ox", "oy"})
RESOURCES_BASE_PATH = "GuardioesDeArda/Lupa/Resources/"; instanceEnum = { default = "default", am = "am", ad = "ad", fokd = "fokd", rako = "rako", stairs = "stairs", woe = "woe", harrow = "harrow", remm = "remm", pel = "pel", }; instances = { [instanceEnum.a...
picList = {} picIndex = 1 mon = peripheral.wrap("left") mon.setCursorPos(1,1) mon.write("< 1 >") mon.setCursorPos(1,2) mon.write(" SET") mon.setCursorPos(1,3) mon.write(" PLAY") function ShowPicture(pic) for i=0,3,1 do rs.setBundledOutput("top",bit.brshift(pic,i*4)) rs.setBundledOutput("back",bit.blshift...
local mod = getfenv(1) assert(mod) local self = getfenv(1) function OnCombat(Unit, _, mTarget) self[tostring(Unit)] = { shock = math.random(2, 6), chain = math.random(10, 15), summon_phase = 1, isHeroic = (mTarget:IsPlayer() and mTarget:IsHeroic()) } Unit:RegisterAIUpdateEvent(1000) local say_text = math.r...
local custom_lib = require("__Constructron-Continued__.script.custom_lib") local ctron = require("__Constructron-Continued__.script.constructron") local Spidertron_Pathfinder = require("__Constructron-Continued__.script.Spidertron-pathfinder") local cmd = require("__Constructron-Continued__.script.command_functions") ...
local function sizeOf(n) if n < 0x100 then return 1 elseif n < 0x10000 then return 2 elseif n < 0x1000000 then return 3 elseif n < 0x100000000 then return 4 end end return sizeOf
require("scene.lua"); require("utils.lua"); require("rrpgScene_TouchNav.lua"); require("rrpgScene_InertialMov.lua"); require("rrpgScene_MovementHistory.lua"); require("rrpgScene_Undo.dlua"); require("rrpgScene_UserDrawingDetails.lua"); --[[ PLUGIN para fazer user drawings ]]-- local SETTINGS_CATEGORY = "settings"...
local helpers = require "helpers" local function refresh_acl() ngx.log(ngx.INFO, "REFRESHING") local client = helpers.apiclient("http://app:5000") local acl = client.get("/acl") if client and acl then helpers.update_acl(acl) end end ngx.timer.at(0, refresh_acl) ngx.timer.every(10, refresh_...
-- 房间管理器 local M = {} function M:init() self.tbl = {} end function M:get(id) return self.tbl[id] end function M:add(obj) self.tbl[obj.id] = obj end function M:remove(obj) self.tbl[obj.id] = nil end return M
-- copy all globals into locals, some locals are prefixed with a G to reduce name clashes local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,Gload,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,un...
if settings.startup["enable-reactorinterface"] and settings.startup["enable-reactorinterface"].value == true then require("prototypes/reactorinterface") end if settings.startup["enable-tesla"] and settings.startup["enable-tesla"].value == true then require("prototypes/TeslaTurret") end if settings.startup["enab...
-- bless this library, my god local class = require('pl.class') local MAX_FLOORS = 16 ---- "Abstract" Elevator ---- local Elevator = class() function Elevator:_init(numFloors) if not numFloors or numFloors < 1 or numFloors > MAX_FLOORS then error("numFloors must be defined and between 1 and 16!") e...
surface.CreateFont("LoadingDownloads", { font = "Coolvetica", size = 20, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, }) PANEL.Base = "Panel" function ...
local playsession = { {"mewmew", {76636}}, {"Giatros", {50823}}, {"zbirka", {637}}, {"aledeludx", {51595}}, {"AcidWizard", {38533}}, {"Dinnopum", {859}}, {"Howolf", {2358}}, {"Arin", {4733}} } return playsession
--------------------------------------------------------------------------------------------------- -- Client Lua Script for RaidCore Addon on WildStar Game. -- -- Copyright (C) 2015 RaidCore --------------------------------------------------------------------------------------------------- ----------------------------...
require 'torch' -- torch require 'image' -- for color transforms require 'nn' -- provides a normalization operator require 'xlua' -- xlua provides useful tools, like progress bars require 'optim' -- an optimization package, for online and batch methods require 'cunn' dofile './csv.lua' ------------------...
-- Require all common stage_intro modules (used across various scripts in game project) -- that define globals and don't return a module table -- Equivalent to engine/common.lua but for stage_intro cartridge. -- Usage: add require("common_stage_intro") at the top of each of your stage_intro main scripts -- (along wit...
-- -- Created by IntelliJ IDEA. -- User: macbookair -- Date: 30/03/17 -- Time: 19:07 -- To change this template use File | Settings | File Templates. -- local dateTime = { } function dateTime:newDateTime(options) local newDateTime = {} setmetatable(newDateTime, {__index=dateTime}) newDateTime._nativeObje...
DefineClass.ShiftsBuilding = { __parents = { "Building"}, properties = { { template = true,id = "active_shift", name = T(738, "Single Active shift"), default = 0, category = "ShiftsBuilding", editor = "number"}, { template = true,id = "closed_shifts_persist", name = T(739, "Persisted closed shift"), ...
function trunc(x) return x>=0 and math.floor(x) or math.ceil(x) end buffer = "" function readint() if buffer == "" then buffer = io.read("*line") end local num, buffer0 = string.match(buffer, '^([%-%d]*)(.*)') buffer = buffer0 return tonumber(num) end function stdinsep() if buffer == "" then bu...
------------------------------------------------------------------------------ -- -- This file is part of the Corona game engine. -- For overview and more information on licensing please refer to README.md -- Home page: https://github.com/coronalabs/corona -- Contact: support@coronalabs.com -- ------------------------...
local playsession = { {"Gerkiz", {7171}}, {"rlidwka", {14203}}, {"tobot", {1171}}, {"realDonaldTrump", {47679}}, {"ChinaNumba1", {8189}}, {"Siphon098", {5748}} } return playsession
function mytransform(rec, offset) --rec['age'] = rec['age'] + offset rec['age'] = rec['age'] + 2 aerospike:update(rec) end
local helpers = require('test.gs_helpers') local clear = helpers.clear local exec_lua = helpers.exec_lua local edit = helpers.edit local eq = helpers.eq local setup_test_repo = helpers.setup_test_repo local cleanup = helpers.cleanup local command = helpers.comma...
-- Copyright 2021 Kafka-Tarantool-Loader -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or...
----------------------------------- -- Area: Windurst Waters -- NPC: Funpo-Shipo -- Type: Standard NPC -- !pos -44.091 -4.499 41.728 238 ----------------------------------- require("scripts/globals/quests") ----------------------------------- function onTrade(player, npc, trade) end function onTrigger(player, npc) ...
-------------------------------------------------------------------------------- -- КСАУП - Комплексная Система АвтоУправления поездом -------------------------------------------------------------------------------- Metrostroi.DefineSystem("KSAUP") TRAIN_SYSTEM.DontAccelerateSimulation = true function TRAIN_SYST...
-- This file is used to track and simplify dealing with all enumerations -- currently implemented in packets enumerations = {} enumerations.ai = { CANCEL = 0, ACTIVATE = 1, COMBAT = 2, ESCORT = 3, FOLLOW = 4, TRAVEL = 5, WANDER = 6 } enumerations.aiPrintableAction = { CANCEL = "cancelling current AI", ACTIVATE = "acti...
local present, nvimtree = pcall(require, 'nvim-tree') if not present then return end nvimtree.setup({ update_cwd = true, diagnostics = { enable = true, icons = { hint = '', info = '', warning = '', error = '', }, }, actions = { open_file = { quit_on_open = fa...
local class = require('middleclass') local HasSignals = require('HasSignals') local LocalSettings = class('LocalSettings'):include(HasSignals) local cjson = require('cjson') local function savename() return cc.FileUtils:getInstance():getWritablePath() .. '.LocalSettings' end local function saveCreateRoomCo...
require "lunit" module(..., lunit.testcase, package.seeall) function test() local net = require "luanode.net" local common = dofile("common.lua") -- Makes sure that remoteAddress is available even after the socket has disconnected -- socket:address is not available though local server = net.createServer(...
local meta = FindMetaTable( "Entity" ); function meta:IsTerminal() return self:GetClass() == "nss_terminal"; end function GM:MapHasTerminals() local etab = ents.FindByClass( "nss_terminal" ); if( #etab == 0 ) then return false end for _, v in pairs( etab ) do if( v:MapCreationID() >= 0 ) then return ...
-- This file is under copyright, and is bound to the agreement stated in the EULA. -- Any 3rd party content has been used as either public domain or with permission. -- © Copyright 2016-2017 Aritz Beobide-Cardinal All rights reserved. -- TODO: STOP MESSING WITH APP.Tiles and do the stuff properly!! local APP = AR...
local JSON = require("App42-Lua-API.JSON") local App42Exception = require("App42-Lua-API.App42Exception") local App42ExceptionRequest = {} function App42ExceptionRequest:buildInternalExceptionRequest(exceptionString) local app42Exception = App42Exception:new() app42Exception:setMessage(exceptionString) ap...
-------------------------------------------------------------------------- -- Consistent-Hashing balancer -- -- This balancer implements a consistent-hashing algorithm based on the -- Ketama algorithm. -- -- This load balancer is designed to make sure that every time a load -- balancer object is built, it is built the ...
-------------------------------- -- @module TileMapAtlas -- @extend AtlasNode -------------------------------- -- @function [parent=#TileMapAtlas] initWithTileFile -- @param self -- @param #string str -- @param #string str -- @param #int int -- @param #int int -- @return bool#bool ret (return value: bool) -...
local library = require("CoronaLibrary") -- Create library local lib = library:new{name = "plugin.teads", publisherId = "com.coronalabs", version = 1} -- Default implementations local function defaultFunction() print("WARNING: The '" .. lib.name .. "' library is not available on this platform.") end -- Stub functio...
local st = {} function st:draw() State.menu:draw() end local hot function st:update(dt) love.graphics.setFont(Font[80]) gui.group.push{grow = 'down', pos = {20,20}, size={WIDTH-40,30}} gui.Label{text = "panoptes", align = "center", size={nil,80}} love.graphics.setFont(Font[40]) gui.Label{text = "", align = "cen...
-- game_reset [game_session_key_prefix] local keys = redis.call('KEYS', KEYS[1] .. '*') for i=#keys,1,-1 do if keys[i]:find("players") then table.remove(keys, i) end end return redis.call('DEL', unpack(keys))
-- By calling atan2 we receive the radian rotation angle between the player.x pos and player.y pos and entity.y and entity.x function entityToPlayerAngle(entity) local px = player:getX() local py = player:getY() return math.atan2(py - entity.y, px - entity.x) end -- Distance formula which will be then used...
print 'remove 2' for i = 1,5 do print('-------',i) local mytable = {10,20,30,40} print(table.remove(mytable,i)) for k,v in ipairs(mytable) do print (k,v) end end print 'remove 1' do local mytable = {10,20,30,40} local x repeat ...