content
stringlengths
5
1.05M
-- BETA VERSION, net tested yet -- Instruction: -- creaturescripts.xml <event type="extendedopcode" name="Shop" script="shop.lua" /> -- and in login.lua player:registerEvent("Shop") -- create sql table shop_history -- set variables -- set up function init(), add there items and categories, follow examples...
--Copyright (C) 2009 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. module(..., package.seeall) local engine = require("core.app") local app_graph = require("core.config") local lib = require("core.lib") local cpuset = require("lib.cpuset") local yang = require("lib.yang.yang") local ptree...
-- Like a TextLine, but displays an in-game entity tile and name. local Window = require 'ui.Window' local EntityLine = Window:subclass { can_focus = true; -- cmd_activate will emit this verb if set default_verb = nil; size = { inf, 0 }; } function EntityLine:__init(...) ui.Window.__init(self, ...) assertf...
local tinyECS = require("lib/tiny-ecs") local gamera = require("lib/gamera") local globals = require("code/globals") local WorldDrawerSystem = require("code/systems/worldDrawer").WorldDrawerSystem local FOVDrawerSystem = require("code/systems/fovDrawer").FOVDrawerSystem local LightUpdaterSystem = require("code...
--- Simple timer class. local mod = {} local libmoon = require "libmoon" local timer = {} timer.__index = timer function mod:new(time) return setmetatable({ time = time or 0, stop = libmoon.getTime() + (time or 0) }, timer) end function timer:running() return self.stop > libmoon.getTime() end function time...
XMH_LANG = { ["en"] = { ["server_invisibility_console_on"] = "[XMH] The invisibility for players has been disabled", ["server_invisibility_console_off"] = "[XMH] The invisibility for players has been enabled", ["server_invisibility_warning_off"] = "chat.AddText(Color( 100, 255, 100 ), 'Invisibility is dis...
--MachineControlUpdate by Tomodachi94 --Feel free to use this for commerical and non-commercial use --If you modify it, please give credit. --MachineControl Pastebin: https://pastebin.com/TfbP996B --Lock program Pastebin: https://pastebin.com/LhAt2bPW --Last modified: 7/19/2020 --By: Tomodachi94 --Fixed/Updated by: Rol...
local Font = {} Font.info = { face = "Chilopod-Regular", file = "chilopod_gd.png", size = 64, bold = 0, italic = 0, charset = "", unicode = 0, stretchH = 100, smooth = 1, ...
local paths = require('paths') local lfs = require('lfs') local common = {} package.path = '../../th/?/init.lua;' .. package.path function common.walk_paths(root, ext) local function walk_paths_(d, ps) for path in paths.iterdirs(d) do local path = paths.concat(d, path) walk_paths_(path, ps) e...
--- === mjolnir.application === --- --- Manipulate running applications. local application = require "mjolnir.application.internal" local fnutils = require "mjolnir.fnutils" local window = require "mjolnir.window" --- mjolnir.application:visiblewindows() -> win[] --- Method --- Returns only the app's windows that are...
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) local area = createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4) combat:setArea(area) function onGetFormulaValues(player, level, maglevel) min = -8 max = -11 return min, max e...
return { [6872274481] = "bedwars-game", [347401822] = "the-plaza" }
local kRenderQueueGroup_JumpPoint = RENDER_QUEUE_7 -- two after default function JumpPointGfx_Init (gfx,r) gfx:SetMesh(CreateJumpPointMesh(r)) gfx:GetEntity():setRenderQueueGroup(kRenderQueueGroup_JumpPoint) SetDiffuse("jumppointmat",0,0, 0,0,0, 1) end function JumpPointGfx_Step (gfx) gfx:SetOrientation(GetMainCa...
local config = require 'lir.config' local a = vim.api local lir = require 'lir' ----------------------------- -- Private ----------------------------- local MARK_TEXT = '* ' local SPACES = ' ' ---@return number local get_start_col = function() return config.values.hide_cursor and 0 or 1 end ---@return number loca...
function checkPlate(theText) return true end
-- Copyright (C) 2012 Nicholas Carlson -- -- Permission is hereby granted, free of charge, to any person obtaining a -- copy of this software and associated documentation files (the "Software"), -- to deal in the Software without restriction, including without limitation -- the rights to use, copy, modify, merge, publi...
--异态魔女·溜-03 local m=14000503 local cm=_G["c"..m] cm.named_with_Spositch=1 xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end) function cm.initial_effect(c) --splimit spo.splimit(c) --spelleffect spo.SpositchSpellEffect(c,CATEGORY_REMOVE+CATEGORY_TOEXTRA,...
dofile('../../include.lua') print('\n\t== UDP Test ==') -- Send data to MATLAB local msg = 'hello'; local udp = require 'udp' local udp_receiver = udp.new_receiver(54321) assert(udp_receiver,"Bad udp receiver!") local unix = require'unix' for i=1,100 do while udp_receiver:size()<1 do unix.usleep(1e5) end local f...
-------------------------------------------------------------------------------- -- Easy Doorbell Shared Init -------------------------------------------------------------------------------- EasyDoorbell = EasyDoorbell or {} EasyDoorbell.Config = EasyDoorbell.Config or {} EasyDoorbell.Version = "2.0.1"
-- =========================================================================== -- CityBannerManager for Expansion 1 and Expansion 2 -- =========================================================================== -- Functions and objects common to basegame and expansions -- The CityBannerManager code specific to the expa...
-- TrafficConeGod return function(Sunshine, entity) local collider = entity.collider local model = entity.model if collider and model then collider.hitEntities = {} Sunshine:addConnection(model.model.PrimaryPart.Touched, function(part) if collider.trigger and part.Parent and par...
local self_session_library = {} function self_session_library:exists(file) local ok, err, code = os.rename(file, file) if not ok then if code == 13 then -- Permission denied, but it exists return true end end return ok, err end function self_session_library:get_current_time()...
local ITEM_IDS = { [2041] = 2042, [2042] = 2041, [2044] = 2045, [2045] = 2044, [2047] = 2048, [2048] = 2047, [2050] = 2051, [2051] = 2050, [2052] = 2053, [2053] = 2051, [2054] = 2055, [2054] = 2055, -- crystal pedestals [9976] = 9977, [9977] = 9978, [9978] = 9979, [9979] = 9976 } function onUse(cid, i...
--[[ __ __ |__) _ _ _ _ _ _ _ _ _ / _ | |_ _ _ | | (_) (_) | (_| ||| ||| (- | \__ (_) | |_ (_) | ) _/ __________________________________________________________ RbxThemeparkAPI by ProgrammerColton A simple API that gets ...
local vmf = get_mod("VMF") -- ##################################################################################################################### -- ##### Local functions ############################################################################################### -- ###############################################...
local torch = require 'torch' local ros = require 'ros' local capture_spec = ros.SrvSpec('ximea_msgs/Capture', [[ string[] serials # serial numbers of cameras to use (empty means all cameras) --- string[] serials # serial numbers of cameras sensor_msgs/Image[] images ...
local gcvars = slib.Components.GlobalCvar local AccessComponent = slib.Components.Access function gcvars.Update(cvar_name) if cvar_name then local data = slib.Storage.GlobalCvar[cvar_name] if data then data.value = GetConVar(cvar_name):GetString() end else for cvar_name_key, _ in pairs(slib.Storage.Globa...
local typedefs = require("kong.db.schema.typedefs") local enable = require("kong.db.schema.typedefs") local meta = require("kong.db.schema.typedefs") local selectors = require("kong.db.schema.typedefs") return { no_consumer = false,--available on APIs as well as on Consumers, -- 配置plugin 's configuration 's sc...
--- get in-game timestamp in miliseconds local function getGameTimestamp() return getGameTime():getCalender():getTimeInMillis() end local isClient = isClient; local isServer = isServer; --- check if attack was critical hit (always false in case of B40) -- @entity attacker local function isCriticalHit(entit...
solution "packr" configurations { "release" } project "packr" kind "ConsoleApp" language "C++" buildoptions { "-Wall", "-mmacosx-version-min=10.6" } files { "**.h", "src/launcher.cpp" } includedirs { "include", "include/jni-headers" } defines { "NDEBUG" } flags { "Optimize" } defines { "MACOSX" } ...
local module = {} local ax = require("hs._asm.axuielement") local fnutils = require("hs.fnutils") local inspect = require("hs.inspect") local hierarchy hierarchy = function(obj, indent, seen) indent = indent or 0 seen = seen or {} if getmetatable(obj) == hs.getObjectMetatable("hs._asm.axuielement") th...
local table_util = require "table_util" local tb = {1,2,3, {}} local gc_sweep = table_util.dirty_check(tb, "__dirty", 100) print("foreach table tb") for k,v in pairs(tb) do print(k,v) end print("table dirty 1", tb.__dirty) tb[3]=1 print("table dirty 2", tb.__dirty) tb.__dirty = nil tb[3]=2 print("tab...
object_draft_schematic_item_item_event_empire_day_console_component = object_draft_schematic_item_shared_item_event_empire_day_console_component:new { } ObjectTemplates:addTemplate(object_draft_schematic_item_item_event_empire_day_console_component, "object/draft_schematic/item/item_event_empire_day_console_component...
require "lang.Signal" local SpecProtocol = require("specs.SpecProtocol") describe("Method", function() local subject describe("when required", function() before_each(function() subject = Method("foo", true) end) it("should have correct name", function() assert...
-- DaVec.lua: @darltrash's Vector library local vector = {} vector.__index = vector vector.__type = "vector" local function isVector(a) return getmetatable(a) == vector end vector.is_vector = isVector vector.new = function (x, y) return setmetatable( { x = x, y = y, instance = true }, vector ) e...
--Decoration minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass","default:desert_sand"}, sidelen = 1, noise_params = { offset = 0, scale = 0.001, spread = {x=60,y=60,z=60}, seed = math.random(1,100), octaves = math.random(1,3), persist = 0.6, }, y_...
local MapConstants = require("app.map.MapConstants") local BehaviorBase = require("app.map.behaviors.BehaviorBase") local DestroyedBehavior = class("DestroyedBehavior", BehaviorBase) function DestroyedBehavior:ctor() DestroyedBehavior.super.ctor(self, "DestroyedBehavior", {"CampBehavior", "CollisionBehavior"}, 1...
return Def.Quad{ Name="Header", InitCommand=function(self) self:diffuse(0,0,0,0.01):valign(0):xy( _screen.cx, 0 ) self:zoomtowidth(_screen.w):zoomtoheight(80) end }
local addUserData = function(self, key, value) self.userdata[key] = value end local getUserData = function(self, key) return self.userdata[key] end local push = function(self) njli.World.getInstance():getScene():getStateMachine():pushState(self.sceneState) end local renderHUD = function(self) end local pause = f...
-- -- Created by IntelliJ IDEA. -- User: seletz -- Date: 26.02.18 -- Time: 21:24 -- To change this template use File | Settings | File Templates. -- local Stats = Object:extend() function Stats:new(name, base, max, multiplier, value) self.name = name self.base = base or 100 self.max = max or self.base ...
local Grindon = LibStub("AceAddon-3.0"):GetAddon("Grindon") local Plugin = Grindon:GetModule("Plugin") local Currency = Plugin:NewModule("Currency", "AceConsole-3.0", "AceEvent-3.0") local Widget = Grindon:GetModule("Widget") local L = LibStub("AceLocale-3.0"):GetLocale("Grindon_Currency") local database local defa...
------------------------------------------------------------ -- Experiencer by Sonaza (https://sonaza.com) -- Licensed under MIT License -- See attached license text in file LICENSE ------------------------------------------------------------ local ADDON_NAME, Addon = ...; local module = Addon:RegisterModule("artifac...
-- Shamelessly ripped from SDL_sdlksym.h. Huzzah! sdlk = {} sdlk.BACKSPACE = 8 sdlk.TAB = 9 sdlk.CLEAR = 12 sdlk.RETURN = 13 sdlk.PAUSE = 19 sdlk.ESCAPE = 27 sdlk.SPACE = 32 sdlk.EXCLAIM = 33 sdlk.QUOTEDBL = 34 sdlk.HASH = 35 sdlk.DOLLAR = 36 sdlk.AMPERSAND = 38 sdlk.QUOTE = 39 sdlk.LEFTPAREN = 40 sdlk...
-- Basic GPU Volume Rendering -- <Resource> -- shaders/volraycast.shd -- gpuprogs/volraycast.cg -- shaders/volpos.shd -- gpuprogs/volpos.cg -- shaders/volfrontplane.shd -- In this tutorial we create a basic volume -- raycaster. -- obligatory hardware check if (not ( technique.cg_sm3():supported() and capabil...
-- Examples converted from http://www.alsacreations.com/tuto/lire/1511-introduction-canvas.html window.extract() ui = { canvas = { element, context } } function init() local canvas = document:querySelector(".canvas") -- if canvas == nil or canvas == js.null then -- return -- end local context...
Dntg_Scene = { scene = { { map = "Map_0.jpg", next = 2, time = 600, id = 1, bmg = "bgm1.mp3" }, { map = "Map_1.jpg", next = 3, time = 600, id = 2, bmg = "bgm2.mp3" }, { map = "Map_2.jpg", next = 4, time = 600, id = 3, bmg = "bgm3.mp3" }, { map = "Map_1.jpg"...
--*********************************************************** --** ROBERT JOHNSON ** --*********************************************************** require "TimedActions/ISBaseTimedAction" ---@class ISRemoveBullet : ISBaseTimedAction ISRemoveBullet = ISBaseTimedAction:derive("ISR...
function getMirroredRecipes(force) local mirrored = {} for i,recipe in pairs(force.recipes) do if (type(recipe.ingredients) == "table" and recipe.ingredients[1] and recipe.ingredients[1].type) or (type(recipe.products) == "table" and recipe.products[1] and recipe.products[1].type) then local keysI...
-- Enable new recipes Cursix Technology unlocks for i, force in pairs(game.forces) do if force.technologies["cursix-technology"].researched then force.recipes["cursix-beacon"].enabled = true end end game.reload_script()
local DecisionTree={}; DecisionTree.__index=DecisionTree; function DecisionTree.create(scriptPath, _cls) local tree={}; setmetatable(tree, DecisionTree); tree.scriptPath=scriptPath; local treeNodeFactory=dofile(scriptPath .. "\\TreeNode.lua"); tree.root=treeNodeFactory.create(_cls); return tree; end functio...
local skynet = require "skynet" local queue = require "skynet.queue" local snax = require "skynet.smg" local test_smg_hotfix=require"test_smg_hotfix" local i = 0 local hello = "hello" function response.ping(hello) skynet.sleep(100) return hello end function wait.ping2(hello) local r=skynet.response() r(true,hell...
--- -- Wrap paragraphs of text along word boundaries while preserving line -- prefixes. -- -- @module wraptor local M = {} -- Uncomment this line when running unit tests. --local lpeg = require 'lpeg' --- -- The maximum length of a line of text when wrapping. M.max_line_length = 80 --- -- Check whether the given arg...
-- -- created with TexturePacker (http://www.codeandweb.com/texturepacker) -- -- $TexturePacker:SmartUpdate:89a1bf7f13d902c90f503bb2c531b4b3:1322872e560ec0da9abcc67bdaedad35:7d98ba9467eea5163282f4663ed7a5c6$ -- -- local sheetInfo = require("mysheet") -- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetI...
local function getControlName(dermaInstance) return table.KeyFromValue(derma.GetControlList(), dermaInstance) end --[[ Somehow gmod fucks up the last entry and we would end up in and infine loop. A quirk is that the class name doesn't match the panel anymore ]]-- local function endOfChain(dermaInstance) ...
--[[ LuCI E2Guardian module Copyright (C) 2015, Itus Networks, Inc. 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 Author: Marko Ratkaj <marko.ratkaj...
local lang = gmodI18n.registerLanguage("rpgm", "en", "Tom.bat", 1.0) lang:addPhrase("noRecentConversation", "No Recent Conversation") lang:addPhrase("haventRecentlySpoken", "You haven't recently spoken to anyone via private message.") lang:addPhrase("yellPrefix", "Yell") lang:addPhrase("whisperPrefix", "Whisper") la...
-- Test type creation and inheritance. package.path = "src/?.lua;"..package.path local xtype = require("xtype") local being = xtype.create("being") local animal = xtype.create("animal", being) local mammal = xtype.create("mammal", animal) local carnivorous = xtype.create("carnivorous") local omnivorous = xtype.create(...
local suffixes = { "s"; "ms"; "μs"; "ns"; } local function suffixedTime(num) local suffix = 1 while num < 1 do num *= 1e3 suffix += 1 end return string.format("%.01f", num) .. suffixes[suffix] end return function(results, counts, config) local formattedCounts = string.format( "%d Passed, %d Skipped, %d Fai...
require("settings") require("maps") require("theme") require("plugins")
local lanes = require 'packagemanager/lanes' local Task = require 'packagemanager/Task' local unpack = unpack or table.unpack -- backward compatibility to 5.1 local Manager = {} local ManagerMT = { __index = Manager } local function WorkerFn( ThreadName, TaskQueueLinda, TaskLinda, Processor ) local unpack = _G.u...
-- -- Please see the readme.txt file included with this distribution for -- attribution and copyright information. -- function setActiveState(sUserState) if sUserState == "idle" then statewidget.setBitmap("indicator_idling"); elseif sUserState == "typing" then statewidget.setBitmap("indicator_typing"); elseif...
local xml_monster_dir = 'data/world/canary-monster.xml' local new_file_name = 'monster_count.txt' local count_monsters = TalkAction("/countmonsters") function count_monsters.onSay(player, words, param) if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT...
local class = require 'ext.class' local table = require 'ext.table' local Function = require 'symmath.Function' local Heaviside = class(Function) Heaviside.name = 'Heaviside' Heaviside.nameForExporterTable = {} Heaviside.nameForExporterTable.LaTeX = '\\mathcal{H}' Heaviside.code = 'function(x) return x >= 0 and 1 or ...
local m = {} function m.testRectangle(x1, y1, x2, y2, w2, h2) return x1 <= x2 + w2 and x1 >= x2 and y1 <= y2 + h2 and y1 >= y2; end function m.testCircle(x1, y1, r1, x2, y2, r2) local dX = x1 - x2; local dY = y1 - y2; return dX * dX + dY * dY <= (r1 + r2) * (r1 + r2); end return m;
-- define all language properties local lang = { common = { welcome = "Välkommen till servern. tryck K för att öppna menyn.~n~", no_player_near = "~r~ingen spelare nära.", invalid_value = "~r~Ogiltig värde.", invalid_name = "~r~Ogiltig namn.", not_found = "~r~Hittades inte.", request_refused...
 local MyApp = class("MyApp", cc.load("mvc").AppBase) function MyApp:onCreate() math.randomseed(os.time()) pb.Reset{ device.writablePath .. 'src/app/p/' } end return MyApp
ys = ys or {} ys.Battle.BattleGuideWave = class("BattleGuideWave", ys.Battle.BattleWaveInfo) ys.Battle.BattleGuideWave.__name = "BattleGuideWave" ys.Battle.BattleGuideWave.Ctor = function (slot0) slot0.super.Ctor(slot0) end ys.Battle.BattleGuideWave.SetWaveData = function (slot0, slot1) slot0.super.SetWaveData(slot...
---------------------------------------------------------------------------------------------------- -- This is a table that defines the alignment of the text. -- -- @author Makoto -- @release V3.0.0 ---------------------------------------------------------------------------------------------------- local TextAli...
--Created by Alex Crowley --On August 7, 2016 --Copyright (c) 2016, TBD --Licensed under the MIT license --See LICENSE file for terms require "preparser/common" --TODO: Consider traits after classes are working properly --[[ Checks the hierarchy of the traits to ensure descending traits agree in class specif...
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9' server_scripts { --"config.lua", "server.lua", } client_scripts { "@NativeUI/NativeUI.lua", --"config.lua", "gui_c.lua", } ui_page "index.html" files { "index.html", "sound.ogg" }
workspace "RayMarcher" architecture "x86_64" startproject "Sandbox" configurations { "Debug", "Release" } outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" IncludeDir = {} IncludeDir["GLFW"] = "Engine/ThirdParty/GLFW/include" IncludeDir["GLAD"] = "Engine/ThirdParty/GLAD/include" IncludeDir...
local M = {} local cooldown_timer = 2 M.received_transform = { position = vec3(0, 0, 0), rotation = quat(0, 0, 0, 1), velocity = vec3(0, 0, 0), angular_velocity = vec3(0, 0, 0), acceleration = vec3(0, 0, 0), angular_acceleration = vec3(0, 0, 0), sent_at = 0, time_past = 0 } M.target_transform = { po...
return {[1]=true,[4]=true,[30212101]=true,[22020103]=true,[1114120]=true,[10]=true,[13]=true,[30212110]=true,[22020112]=true,[112001041]=true,[201130003]=true,[22]=true,[22020121]=true,[201130012]=true,[131101]=true,[31]=true,[131104]=true,[22020130]=true,[3211300]=true,[301400101]=true,[123011110]=true,[220201000]=tru...
CP1251_toUTF8 = { [128]= 1026, [129]= 1027, [130]= 8218, [131]= 1107, [132]= 8222, [133]= 8214, [134]= 8224, [135]= 8225, [136]= 8364, [137]= 8240, [138]= 1033, [139]= 8249, [140]= 1034, [141]= 1036, [142]= 1035, [143]= 1039, [144]= 1106, [145]= 8216, [146]= 8217, [147]= 8220, [148]= 8221, [149]= ...
SystemMgr = { } function SystemMgr:init_self() --缓存system self.sysShortPool = { } self.sysLongPool = { } --需要初始化的sys self.shortPool = { } self.longPool = { } end function SystemMgr:init() self:init_self() self:addSystem() TimeMgr:addEveryMillHandler(Bind(self.tickShort,self),10) TimeMgr:addEver...
local E, C, L, M = select(2, ...):unpack() if E.client ~= "zhCN" then return end L.ValueFormat = function(value) if value >= 1e12 then return format("%.2f兆", value / 1e12) elseif value >= 1e8 then return format("%.2f亿", value / 1e8) elseif value >= 1e4 then return format("%.1f万", value / 1e4) else return ...
local Class = require 'lib.hump.class' local Expression = getClass 'wyx.component.Expression' local property = require 'wyx.component.property' local json = require 'lib.dkjson' local format, match, tostring = string.format, string.match, tostring local gsub = string.gsub local warning, error, pairs, verify = warning...
local utils = require 'utils' local save = require 'save' local state = { autorepeat = data.ar.menu } function state:load() local langs = utils.keysSorted(data.languages) self.buttons = ui.buttons:new("lang", "med", { lang = { label = "language", x = 100, y = 150, u = "back", d = "mdas", type ...
-- standard load and start functions -- first line of code should be a help string (e.g. see tiny.lua) -- last line of code should call this code, pass in table of actions -- e.g -- the(go) -- .__ -- [__) _ _ . . _ __ -- | \(_)(_](_|(/,_) -- ._| -- at load time, remember the...
--[[ Follow the instructions explained in the Book. --]] local ServerStorage = game:GetService("ServerStorage") local toolsStorage = ServerStorage.Tools local flashlightGiver = workspace.FlashlightGiver local proximityPrompt = flashlightGiver.GiveTool -- function proximityPromptTriggered(player) -- Checking if...
local config = require "config" local vector = require "lib.vector" local sensor = require "lib.sensor" local tiles = require "lib.tiles" local blast_door_entity = {} ; blast_door_entity.__index = blast_door_entity local quad function blast_door_entity.create (env, args) -- initialize entity local instance...
---@class CS.UnityEngine.ParticleSystemForceField : CS.UnityEngine.Component ---@field public shape number ---@field public startRange number ---@field public endRange number ---@field public length number ---@field public gravityFocus number ---@field public rotationRandomness CS.UnityEngine.Vector2 ---@field public m...
local helper = require('arken.Helper') local test = {} test.should_return_html = function() local result = helper:textArea("name", "John") local html = [[<textarea id="name" name="name" style="width:250px;height:65px">John</textarea>]] assert( result == html, result ) end test.should_return_html_with_onblur...
function event_combat(e) if (e.joined == true) then e.self:Emote("the archway leading deeper into the caves, a chill runs up your spine."); eq.depop_with_timer(); end end
local function Main() require 'framework.behavior.script' end Main()
local Action = require(script.Parent.Action) return Action("StampRotationSet", function(max) return { max = max } end)
local ManorManufactureModule = require "module.ManorManufactureModule" local ItemHelper = require "utils.ItemHelper" local HeroModule = require "module.HeroModule" local ManorModule = require "module.ManorModule" local Time = require "module.Time" local ItemModule = require "module.ItemModule" local TipConfig = require...
object_tangible_loot_npc_loot_spice_booster_blue_generic = object_tangible_loot_npc_loot_shared_spice_booster_blue_generic:new { } ObjectTemplates:addTemplate(object_tangible_loot_npc_loot_spice_booster_blue_generic, "object/tangible/loot/npc/loot/spice_booster_blue_generic.iff")
local config = { outfits = {"rat", "green frog", "chicken"}, -- possible outfits duration = 45, -- duration of the outfit in seconds breakChance = 1 -- a chance of losing the wand } function onUse(cid, item, fromPosition, itemEx, toPosition) if(math.random(1, 100) <= config.breakChance) then doSummonCreature("Sh...
local bin = require "plc52.bin" local basexx = require "basexx" local Reader = require("lightning-dissector.utils").Reader local convert_signature_der = require("lightning-dissector.utils").convert_signature_der local OrderedDict = require("lightning-dissector.utils").OrderedDict local f = require("lightning-dissector....
local Item = require("api.Item") local Enum = require("api.Enum") local Feat = require("api.Feat") local Pos = require("api.Pos") local Map = require("api.Map") local InstancedMap = require("api.InstancedMap") local Rand = require("api.Rand") local Charagen = require("mod.elona.api.Charagen") local Itemgen = require("m...
local utils = require "typesystem_utils" -- Get the two parts of a constructor as tuple function constructorParts( constructor) if type(constructor) == "table" then return constructor.out,(constructor.code or "") else return tostring(constructor),"" end end -- Get a constructor structure fu...
require 'concurrent' function leaf(n) concurrent.register('leaf', concurrent.self()) for i = 1, n do local msg = concurrent.receive() print('leaf received message from internal') end print('leaf exiting') concurrent.exit('test') end concurrent.spawn(leaf, 2) concurrent.init('leaf...
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) local lspconfig = require('lspconfig') local configs = require('lspconfig.configs') capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) -- Code from max local codes = { no_matching_functi...
----------------------------------- -- Area: Bastok Mines -- NPC: Door_House (Corsair's Bottes) -- !pos 10 0 -16 234 ----------------------------------- local ID = require("scripts/zones/Bastok_Mines/IDs") require("scripts/globals/keyitems") require("scripts/globals/npc_util") ----------------------------------- func...
object_tangible_furniture_ep3_rewards_ep3_kash_reward_trophy_uller = object_tangible_furniture_ep3_rewards_shared_ep3_kash_reward_trophy_uller:new { } ObjectTemplates:addTemplate(object_tangible_furniture_ep3_rewards_ep3_kash_reward_trophy_uller, "object/tangible/furniture/ep3_rewards/ep3_kash_reward_trophy_uller.iff...
scope = 'global' scope_abbr = 'g' dofile 'scope-tests.lua'
minetest.register_chatcommand("heal", { description = "sets maximum HP, thirst, breath and hunger values", privs = {fly = true}, func = function(name) local player = minetest.get_player_by_name(name) thirst.set_player_thirst(name, 20) hbhunger.heal(player) player:set_hp(20) player:set_bre...
local Term = require('FTerm.terminal') local t = Term:new() local M = {} ---To create a custom terminal by overriding the default command ---@param cfg table ---@return table function M:new(cfg) return Term:new():setup(cfg) end ---(optional) Configure the default terminal ---@param cfg table function M.setup(cf...