content
stringlengths
5
1.05M
badges = { [0] = { -- Halloween2019 png = '16de63ec86f.png', }, [1] = { -- meet Fofinhoppp png = '171e0f4e290.png', }, [2] = { -- fish 500 times png = '171dba5770c.png', }, [3] = { -- mine 1000 gold nuggets png = '171e1010745.png', }, [4] = { -- harvested 500 plants png = '171e0f9de0e.png', }, [5] = { -- Rob 500 times png = '16f1a7af2f0.png', }, [6] = { -- Christmas2019 png = '16f23df7a05.png', }, [7] = { -- Buy the sleigh png = '16f1fe3812d.png', }, [8] = { -- Sell 500 seeds png = '171db390cbe.png', }, [9] = { -- Fulfill 500 orders png = '174b20f6c7d.png', }, [10] = { -- Arrest 500 players png = '171db99a9e3.png', }, [11] = { -- Season 1 reward png = '1733ad217ba.png', }, [12] = { -- Season 2 reward png = '17479ba02f4.png', }, [13] = { -- Season 3 reward png = '17479ba7052.png', }, [14] = { -- Cook 500 dishes png = '171db534474.png', }, [15] = { -- Sold 300 yellow crystals png = '174b2214c49.png', }, [16] = { -- Sold 150 blue crystals png = '174b2221bf9.png', }, [17] = { -- Sold 75 purple crystals png = '174b2224164.png', }, [18] = { -- Sold 30 green crystals png = '174b2226e7d.png', }, [19] = { -- Sold 10 red crystals png = '174b22294f7.png', }, }
require("firecast.lua"); local __o_rrpgObjs = require("rrpgObjs.lua"); require("rrpgGUI.lua"); require("rrpgDialogs.lua"); require("rrpgLFM.lua"); require("ndb.lua"); require("locale.lua"); local __o_Utils = require("utils.lua"); local function constructNew_frmSelColor() local obj = GUI.fromHandle(_obj_newObject("popupForm")); local self = obj; local sheet = nil; rawset(obj, "_oldSetNodeObjectFunction", rawget(obj, "setNodeObject")); function obj:setNodeObject(nodeObject) sheet = nodeObject; self.sheet = nodeObject; self:_oldSetNodeObjectFunction(nodeObject); end; function obj:setNodeDatabase(nodeObject) self:setNodeObject(nodeObject); end; _gui_assignInitialParentForForm(obj.handle); obj:beginUpdate(); obj:setName("frmSelColor"); obj:setWidth(300); obj:setHeight(160); obj:setDrawContainer(true); obj:setResizable(true); obj:setPlacement("center"); obj:setCancelable(false); require("system.lua"); self.onRetorno = nil; -- preencher este callback para processar obj.scrollBox1 = GUI.fromHandle(_obj_newObject("scrollBox")); obj.scrollBox1:setParent(obj); obj.scrollBox1:setAlign("client"); obj.scrollBox1:setName("scrollBox1"); obj.flaContent = GUI.fromHandle(_obj_newObject("flowLayout")); obj.flaContent:setParent(obj.scrollBox1); obj.flaContent:setAlign("top"); obj.flaContent:setAutoHeight(true); obj.flaContent:setMaxControlsPerLine(1); obj.flaContent:setName("flaContent"); obj.flowPart1 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart1:setParent(obj.flaContent); obj.flowPart1:setName("flowPart1"); obj.flowPart1:setHeight(30); obj.flowPart1:setMinWidth(50); obj.flowPart1:setMaxWidth(5000); obj.flowPart1:setMargins({left=2, right=2, top=2, bottom=2}); obj.labGroupHeader = GUI.fromHandle(_obj_newObject("label")); obj.labGroupHeader:setParent(obj.flowPart1); obj.labGroupHeader:setName("labGroupHeader"); obj.labGroupHeader:setAlign("left"); obj.labGroupHeader:setAutoSize(true); obj.labGroupHeader:setWordWrap(false); obj.labGroupHeader:setHorzTextAlign("leading"); obj.labGroupHeader:setVertTextAlign("center"); obj.labGroupHeader:setMargins({left=10, right=5}); obj.labGroupHeader:setFontSize(15); obj.labGroupHeader:setFontColor("#FFCC66"); obj.horzLine1 = GUI.fromHandle(_obj_newObject("horzLine")); obj.horzLine1:setParent(obj.flowPart1); obj.horzLine1:setAlign("bottom"); obj.horzLine1:setStrokeColor("#FFCC6670"); obj.horzLine1:setMargins({left=10}); obj.horzLine1:setName("horzLine1"); self.labGroupHeader.text = lang("scene.selectColor.title"); obj.flowPart2 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart2:setParent(obj.flaContent); obj.flowPart2:setName("flowPart2"); obj.flowPart2:setHeight(30); obj.flowPart2:setMinWidth(50); obj.flowPart2:setMaxWidth(5000); obj.flowPart2:setMargins({left=2, right=2, top=2, bottom=2}); obj.labDefinirCor = GUI.fromHandle(_obj_newObject("label")); obj.labDefinirCor:setParent(obj.flowPart2); obj.labDefinirCor:setName("labDefinirCor"); obj.labDefinirCor:setAlign("left"); obj.labDefinirCor:setWidth(20); obj.labDefinirCor:setAutoSize(false); obj.labDefinirCor:setHorzTextAlign("trailing"); obj.labDefinirCor:setVertTextAlign("center"); obj.labDefinirCor:setMargins({right=5}); obj.cbxDefinirCor = GUI.fromHandle(_obj_newObject("checkBox")); obj.cbxDefinirCor:setParent(obj.flowPart2); obj.cbxDefinirCor:setName("cbxDefinirCor"); obj.cbxDefinirCor:setAlign("client"); obj.cbxDefinirCor:setMargins({right=20}); obj.flowPart3 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart3:setParent(obj.flaContent); obj.flowPart3:setName("flowPart3"); obj.flowPart3:setHeight(30); obj.flowPart3:setMinWidth(50); obj.flowPart3:setMaxWidth(5000); obj.flowPart3:setMargins({left=2, right=2, top=2, bottom=2}); obj.labACor = GUI.fromHandle(_obj_newObject("label")); obj.labACor:setParent(obj.flowPart3); obj.labACor:setName("labACor"); obj.labACor:setAlign("left"); obj.labACor:setWidth(20); obj.labACor:setAutoSize(false); obj.labACor:setHorzTextAlign("trailing"); obj.labACor:setVertTextAlign("center"); obj.labACor:setMargins({right=5}); obj.cmbCor = GUI.fromHandle(_obj_newObject("colorComboBox")); obj.cmbCor:setParent(obj.flowPart3); obj.cmbCor:setName("cmbCor"); obj.cmbCor:setUseAlpha(true); obj.cmbCor:setAlign("client"); obj.cmbCor:setMargins({right=20}); obj.layout1 = GUI.fromHandle(_obj_newObject("layout")); obj.layout1:setParent(obj); obj.layout1:setName("layout1"); obj.layout1:setAlign("bottom"); obj.layout1:setMargins({top=2, bottom=2}); obj.layout1:setHeight(40); obj.btnOk1 = GUI.fromHandle(_obj_newObject("button")); obj.btnOk1:setParent(obj.layout1); obj.btnOk1:setWidth(100); obj.btnOk1:setHorzTextAlign("center"); obj.btnOk1:setAlign("right"); obj.btnOk1:setName("btnOk1"); obj.btnOk1:setMargins({left=4, right=4}); obj.btnCancel1 = GUI.fromHandle(_obj_newObject("button")); obj.btnCancel1:setParent(obj.layout1); obj.btnCancel1:setHorzTextAlign("center"); obj.btnCancel1:setAlign("right"); obj.btnCancel1:setName("btnCancel1"); obj.btnCancel1:setWidth(100); obj.btnCancel1:setMargins({left=4, right=4}); self.btnOk1.text = lang("Ok"); self.btnCancel1.text = lang("cancelar"); self.title = lang('scene.selectColor.title'); self.cbxDefinirCor.text = lang("scene.selectColor.defineColor"); function self:prepareForShow(corInicial, theOptions) theOptions = theOptions or {}; self:beginUpdate(); if theOptions.title ~= nil then self.labGroupHeader.text = theOptions.title; self.title = theOptions.title; else self.labGroupHeader.text = lang('scene.selectColor.title'); self.title = lang('scene.selectColor.title'); end; if theOptions.defineTitle ~= nil then self.cbxDefinirCor.text = theOptions.defineTitle; end; local isNullColor = corInicial == "Null" or corInicial == "#00000000" or corInicial == "Transparent" or corInicial == "None" or corInicial == nil; if isNullColor then if theOptions.defaultColor ~= nil then self.cbxDefinirCor.checked = true; self.cmbCor.color = theOptions.defaultColor; else self.cbxDefinirCor.checked = false; self.cmbCor.color = "#000000FF"; end; else self.cbxDefinirCor.checked = true; self.cmbCor.color = corInicial; end; if theOptions.useAlpha ~= nil then self.cmbCor.useAlpha = theOptions.useAlpha; end; self.cmbCor.enabled = self.cbxDefinirCor.checked; self:endUpdate(); end; function self:processarOK() if self.onRetorno ~= nil then self.onRetorno(self.cmbCor.color, self.cbxDefinirCor.checked); end; self:close(); end; function self:processarCancel() self:close(); end; obj._e_event0 = obj:addEventListener("onKeyUp", function (_, event) if (event.keyCode == 0x89) or (event.keyCode == 0x1B) then setTimeout( function() self:processarCancel(); end, 1); event.keyCode = 0; event.key = ""; end; end, obj); obj._e_event1 = obj:addEventListener("onCancelRequest", function (_) self:processarCancel(); end, obj); obj._e_event2 = obj.cbxDefinirCor:addEventListener("onChange", function (_) self.cmbCor.enabled = self.cbxDefinirCor.checked; end, obj); obj._e_event3 = obj.btnOk1:addEventListener("onClick", function (_) self:processarOK() end, obj); obj._e_event4 = obj.btnCancel1:addEventListener("onClick", function (_) self:processarCancel() end, obj); function obj:_releaseEvents() __o_rrpgObjs.removeEventListenerById(self._e_event4); __o_rrpgObjs.removeEventListenerById(self._e_event3); __o_rrpgObjs.removeEventListenerById(self._e_event2); __o_rrpgObjs.removeEventListenerById(self._e_event1); __o_rrpgObjs.removeEventListenerById(self._e_event0); end; obj._oldLFMDestroy = obj.destroy; function obj:destroy() self:_releaseEvents(); if (self.handle ~= 0) and (self.setNodeDatabase ~= nil) then self:setNodeDatabase(nil); end; if self.flowPart3 ~= nil then self.flowPart3:destroy(); self.flowPart3 = nil; end; if self.labGroupHeader ~= nil then self.labGroupHeader:destroy(); self.labGroupHeader = nil; end; if self.flowPart1 ~= nil then self.flowPart1:destroy(); self.flowPart1 = nil; end; if self.labACor ~= nil then self.labACor:destroy(); self.labACor = nil; end; if self.labDefinirCor ~= nil then self.labDefinirCor:destroy(); self.labDefinirCor = nil; end; if self.flaContent ~= nil then self.flaContent:destroy(); self.flaContent = nil; end; if self.flowPart2 ~= nil then self.flowPart2:destroy(); self.flowPart2 = nil; end; if self.cmbCor ~= nil then self.cmbCor:destroy(); self.cmbCor = nil; end; if self.horzLine1 ~= nil then self.horzLine1:destroy(); self.horzLine1 = nil; end; if self.cbxDefinirCor ~= nil then self.cbxDefinirCor:destroy(); self.cbxDefinirCor = nil; end; if self.btnOk1 ~= nil then self.btnOk1:destroy(); self.btnOk1 = nil; end; if self.layout1 ~= nil then self.layout1:destroy(); self.layout1 = nil; end; if self.scrollBox1 ~= nil then self.scrollBox1:destroy(); self.scrollBox1 = nil; end; if self.btnCancel1 ~= nil then self.btnCancel1:destroy(); self.btnCancel1 = nil; end; self:_oldLFMDestroy(); end; obj:endUpdate(); return obj; end; function newfrmSelColor() local retObj = nil; __o_rrpgObjs.beginObjectsLoading(); __o_Utils.tryFinally( function() retObj = constructNew_frmSelColor(); end, function() __o_rrpgObjs.endObjectsLoading(); end); assert(retObj ~= nil); return retObj; end; local _frmSelColor = { newEditor = newfrmSelColor, new = newfrmSelColor, name = "frmSelColor", dataType = "", formType = "undefined", formComponentName = "popupForm", title = "", description=""}; frmSelColor = _frmSelColor; Firecast.registrarForm(_frmSelColor); return _frmSelColor;
local Pipeline = require("refactoring.pipeline") local Point = require("refactoring.point") local refactor_setup = require("refactoring.tasks.refactor_setup") local debug_utils = require("refactoring.debug.debug_utils") local function get_path(bufnr, config) local out = nil Pipeline :from_task(refactor_setup(bufnr, config)) :add_task(function(refactor) local point = Point:from_cursor() local debug_path = debug_utils.get_debug_path(refactor, point) refactor.return_value = debug_path return true, refactor end) :run(function(ok, res) if ok then out = res.return_value end end) return out end return get_path
-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -- -- ───────────────────────────────────────────────── -- -- Plugin: LuaSnip -- Github: github.com/L3MON4D3/LuaSnip -- ───────────────────────────────────────────────── -- -- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -- local ls = require("luasnip") ls.config.set_config({ history = true, -- Update more often, :h events for more info. updateevents = "TextChanged,TextChangedI" }) require'luasnip/loaders/from_vscode'.lazy_load({paths = {"~/.config/nvim/snippets"}}) -- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -- -- ━━━━━━━━━━━━━━━━━━━❰ configs ❱━━━━━━━━━━━━━━━━━━━ -- -- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ --
local M = {} M.config = function() O.lang.java = { java_tools = { active = false, }, formatter = { exe = "prettier", args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" }, }, } end M.format = function() local root_dir = require("project_nvim.project").find_lsp_root() or "" -- use the global prettier if you didn't find the local one local prettier_instance = root_dir .. "/node_modules/.bin/prettier" if vim.fn.executable(prettier_instance) ~= 1 then prettier_instance = O.lang.tsserver.formatter.exe end O.formatters.filetype["java"] = { function() return { exe = prettier_instance, -- TODO: allow user to override this args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0) }, stdin = true, } end, } require("formatter.config").set_defaults({ logging = false, filetype = O.formatters.filetype, }) end M.lint = function() -- TODO: implement linters (if applicable) return "No linters configured!" end M.lsp = function() local util = require("lspconfig/util") require("utils.lua").setup_lsp('jdtls', { filetypes = { "java" }, root_dir = util.root_pattern({ ".git", "build.gradle", "pom.xml" }), }) end M.dap = function() -- TODO: implement dap return "No DAP configured!" end return M
local isCustomizationScript=sim.getScriptAttribute(sim.getScriptHandle(sim.handle_self),sim.scriptattribute_scripttype)==sim.scripttype_customizationscript if not sim.isPluginLoaded('Bwf') then function sysCall_init() end else function sysCall_init() model={} model.dlg={} model.handle=sim.getObjectAssociatedWithScript(sim.handle_self) if isCustomizationScript then -- Customization script require("/bwf/scripts/ragnarRef/customization_main") else -- Child script end sysCall_init() -- one of above's 'require' redefined that function end end
if not MergingChests then MergingChests = {} end local HardMaxSize = 42 require("config") if MergingChests.MaxSize < 2 then MergingChests.MaxSize = 2 elseif MergingChests.MaxSize > HardMaxSize then MergingChests.MaxSize = HardMaxSize end require("prototypes.entity") require("prototypes.item") require("prototypes.recipe")
Script.ReloadScript("Scripts/Entities/Vehicles/VehicleBase.lua"); Script.ReloadScript("Scripts/Entities/Vehicles/VehicleBaseAI.lua"); Log("Executing Vehiclepool.."); VEHICLE_SCRIPT_TIMER = 100; --define constant timer id AISOUND_TIMER = VEHICLE_SCRIPT_TIMER + 2 --define timeout for ai sound AISOUND_TIMEOUT = 250 -- create table for each vehicle impl for i,vehicle in pairs(VehicleSystem.VehicleImpls) do local gVehicle = { Properties = { bDisableEngine = 0, Paint = "", bFrozen = 0, FrozenModel = "", Modification = "", soclasses_SmartObjectClass = "", bAutoGenAIHidePts = 0, teamName = "", }, PropertiesInstance = { AITerritoryAndWave = { aiterritory_Territory = "<None>", aiwave_Wave = "<None>", }, }, Editor = { Icon="Vehicle.bmp", IconOnTop=1, }, Client = {}, Server = { OnStartGame = function(self) self:SetupTerritoryAndWave(); end, }, }; AddHeavyObjectProperty(gVehicle); MakeInterestingToAI(gVehicle, 1); MakeAICoverEntity(gVehicle); MakeSpawnable(gVehicle) -------------------------------------------------------------------------- -- execute optional lua script local scriptName = Vehicle.GetOptionalScript(vehicle); if (scriptName) then Script.ReloadScript(scriptName); if (_G[vehicle]) then mergef(gVehicle, _G[vehicle], 1); end end gVehicle.OnSpawn = function(self) mergef(self, VehicleBase, 1); self:SpawnVehicleBase(); end; gVehicle.Server.OnShutDown = function(self) if (g_gameRules) then g_gameRules.game:RemoveSpawnGroup(self.id); end end; gVehicle.OnReset = function(self) self:ResetVehicleBase(); if (CryAction.IsServer() and g_gameRules) then local teamId=g_gameRules.game:GetTeamId(self.Properties.teamName); if (teamId and teamId~=0) then g_gameRules.game:SetTeam(teamId, self.id); else g_gameRules.game:SetTeam(0, self.id); end end end; gVehicle.OnFrost = function(self, shooterId, weaponId, frost) local f=self.vehicle:GetFrozenAmount() + frost; self.vehicle:SetFrozenAmount(f); end; gVehicle.OnUnlocked = function(self, playerId) if (g_gameRules and g_gameRules.OnVehicleUnlocked) then g_gameRules.OnVehicleUnlocked(g_gameRules, self.id, playerId); end end; -------------------------------------------------------------------------- gVehicle.Client.OnTimer = function(self, timerId, mSec) if (timerId == AISOUND_TIMER) then if(self.AISoundRadius and self:HasDriver()) then self:SetTimer(AISOUND_TIMER, mSec); AI.SoundEvent(self:GetWorldPos(self.State.pos), self.AISoundRadius, AISOUND_MOVEMENT_LOUD, self.id); -- --System.Log(">>> gVehicle.Client.OnTimer sound "..mSec); end end end gVehicle.Server.OnEnterArea=function(self,entity, areaId) if (self.OnEnterArea) then self.OnEnterArea(self, entity, areaId); end end gVehicle.Server.OnLeaveArea = function(self, entity, areaId) if (self.OnLeaveArea) then self.OnLeaveArea(self, entity, areaId); end end gVehicle.Event_Enable = function(self) self:Hide(0); BroadcastEvent(self, "Enable"); end gVehicle.Event_Disable = function(self) self:Hide(1); BroadcastEvent(self, "Disable"); end gVehicle.Event_EnableEngine = function(self) self.vehicle:DisableEngine(0); BroadcastEvent(self, "EnableEngine"); end gVehicle.Event_DisableEngine = function(self) self.vehicle:DisableEngine(1); BroadcastEvent(self, "DisableEngine"); end gVehicle.Event_EnableMovement = function(self) self.vehicle:EnableMovement(1); BroadcastEvent(self, "EnableMovement"); end gVehicle.Event_DisableMovement = function(self) self.vehicle:EnableMovement(0); BroadcastEvent(self, "DisableMovement"); end function MakeRespawnable(entity) if (entity.Properties) then entity.Properties.Respawn={ nTimer=30, bUnique=0, bRespawn=0, }; end end MakeRespawnable(gVehicle); gVehicle.Properties.Respawn.bAbandon=1; gVehicle.Properties.Respawn.nAbandonTimer=90; local FlowEvents = { Inputs = { Enable = { gVehicle.Event_Enable, "bool" }, Disable = { gVehicle.Event_Disable, "bool" }, EnableEngine = { gVehicle.Event_EnableEngine, "bool" }, DisableEngine = { gVehicle.Event_DisableEngine, "bool" }, EnableMovement = { gVehicle.Event_EnableMovement, "bool" }, DisableMovement = { gVehicle.Event_DisableMovement, "bool" }, }, Outputs = { Enable = "bool", Disable = "bool", EnableEngine = "bool", DisableEngine = "bool", EnableMovement = "bool", DisableMovement = "bool", Dead = "bool", }, }; if (not gVehicle.FlowEvents) then gVehicle.FlowEvents = FlowEvents; else mergef(gVehicle.FlowEvents, FlowEvents, 1); end _G[vehicle] = gVehicle; if (_G[vehicle].AIProperties) then CreateVehicleAI(_G[vehicle]); end ExposeVehicleToNetwork( _G[vehicle] ); end
name = "Stacks Reborn" description = "Configurable item stacks compatible with Vanilla / Tropical Experience mod" author = "fl01" version = "0.1" forumthread = "" api_version = 10 dont_starve_compatible = false reign_of_giants_compatible = false dst_compatible = true all_clients_require_mod = true icon_atlas = "modicon.xml" icon = "modicon.tex" configuration_options = { { name = "small_stack_size", label = "Small stack size", hover = "Small stack size", options = { {description = "40", data = 40}, {description = "45", data = 45}, {description = "50", data = 50}, {description = "55", data = 55}, {description = "60", data = 60}, {description = "65", data = 65}, {description = "70", data = 70}, {description = "75", data = 75}, {description = "80", data = 80}, {description = "85", data = 85}, {description = "90", data = 90}, }, default = 40, }, { name = "medium_stack_size", label = "Medium stack size", hover = "Medium stack size", options = { {description = "20", data = 20}, {description = "25", data = 25}, {description = "30", data = 30}, {description = "35", data = 35}, {description = "40", data = 40}, {description = "45", data = 45}, {description = "50", data = 50}, {description = "55", data = 55}, {description = "60", data = 60}, {description = "65", data = 65}, {description = "70", data = 70}, }, default = 20, }, { name = "large_stack_size", label = "Large stack size", hover = "Large stack size", options = { {description = "10", data = 10}, {description = "15", data = 15}, {description = "20", data = 20}, {description = "25", data = 25}, {description = "30", data = 30}, {description = "35", data = 35}, {description = "40", data = 40}, {description = "45", data = 45}, {description = "50", data = 50}, {description = "55", data = 55}, {description = "60", data = 60}, }, default = 10, } }
#!/usr/bin/env tarantool cfg = require('config') require('storage_template')
--!strict --[[ Constructs and returns a new instance, with options for setting properties, event handlers and other attributes on the instance right away. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local defaultProps = require(Package.Instances.defaultProps) local semiWeakRef = require(Package.Instances.semiWeakRef) local applyInstanceProps = require(Package.Instances.applyInstanceProps) local logError= require(Package.Logging.logError) local function New(className: string) return function(props: PubTypes.PropertyTable): Instance local ok, instance = pcall(Instance.new, className) if not ok then logError("cannotCreateClass", nil, className) end local classDefaults = defaultProps[className] if classDefaults ~= nil then for defaultProp, defaultValue in pairs(classDefaults) do instance[defaultProp] = defaultValue end end applyInstanceProps(props, semiWeakRef(instance)) return instance end end return New
local M = {} local json = require "json" local data local getLocale , getLanguageData , getFilename , isFileExists function M.setLang(locale) local lang = getLocale(locale) data = getLanguageData(lang) if not data then error( "Localization file is corrupted" ) end end function M.get(key) return data[key] or ( "<" .. key .. ">" ) end function getLocale(lang) local lang = lang or system.getPreference("locale", "language") local filename = getFilename(lang) if not isFileExists(filename) then lang = "en" end return lang end function getLanguageData(lang) return json.decodeFile(system.pathForFile(getFilename(lang))) end function getFilename(lang) return ("Lang/" .. lang .. ".json") end function isFileExists(filename, baseDir) assert(filename, "filename is missing") local pathForFile = system.pathForFile(filename, baseDir) or "" local isExists = false local fh = io.open(pathForFile, "r") if fh then isExists = true io.close(fh) end return isExists end return M
-- leaderboard module by berezaa local module = {} local player = game.Players.localPlayer local playerGui = player.PlayerGui local ui = playerGui.gameUI.leaderboard function module.init(Modules) local network = Modules.network local httpService = game:GetService("HttpService") -- server browser hookup spawn(function() local serversDataValue = game.ReplicatedStorage:WaitForChild("serversData") local function update() local servers = serversDataValue.Value ~= "" and httpService:JSONDecode(serversDataValue.Value) local serverCount = 0 if servers then for serverId, serverData in pairs(servers) do if serverId ~= game.JobId then serverCount = serverCount + 1 end end end ui.top.leave.Visible = servers and serverCount > 0 end update() serversDataValue.Changed:connect(update) -- can't direct ref .open bc of init race condition ui.top.leave.Activated:Connect(function() Modules.serverBrowser.open() end) end) local function repareRender(viewport, player, data) if viewport:FindFirstChild("entity") then viewport.entity:Destroy() end if viewport:FindFirstChild("entity2") then viewport.entity2:Destroy() end local camera = viewport.CurrentCamera if camera == nil then camera = Instance.new("Camera") camera.Parent = viewport viewport.CurrentCamera = camera end local client = player local character = player.Character local mask = viewport.characterMask local characterAppearanceData = {} characterAppearanceData.equipment = data.equipment or {} characterAppearanceData.accessories = data.accessories or {} local characterRender = network:invoke("createRenderCharacterContainerFromCharacterAppearanceData",mask, characterAppearanceData or {}, client) characterRender.Parent = workspace.CurrentCamera local animationController = characterRender.entity:WaitForChild("AnimationController") --[[ local track = animationController:LoadAnimation(mask.idle) track.Looped = true track.Priority = Enum.AnimationPriority.Idle track:Play() ]] local currentEquipment = network:invoke("getCurrentlyEquippedForRenderCharacter", characterRender.entity) --[[ local weaponType do if currentEquipment["1"] then weaponType = currentEquipment["1"].baseData.equipmentType end end ]] local weaponType local track = network:invoke("getMovementAnimationForCharacter", animationController, "idling", weaponType, nil) if track then if typeof(track) == "Instance" then track:Play() elseif typeof(track) == "table" then for ii, obj in pairs(track) do obj:Play() end end spawn(function() while true do wait() if typeof(track) == "Instance" then if track.Length > 0 then break end elseif typeof(track) == "table" then local isGood = true for ii, obj in pairs(track) do if track.Length == 0 then isGood = false end end if isGood then break end end end if characterRender then if viewport:FindFirstChild("entity") then viewport.entity:Destroy() end local entity = characterRender.entity entity.Parent = viewport characterRender:Destroy() local focus = CFrame.new(entity.PrimaryPart.Position + entity.PrimaryPart.CFrame.lookVector * 6.3, entity.PrimaryPart.Position) * CFrame.new(3,0,0) camera.CFrame = CFrame.new(focus.p + Vector3.new(0,1.5,0), entity.PrimaryPart.Position + Vector3.new(0,0.5,0)) end end) else local track = animationController:LoadAnimation(mask.idle) track.Looped = true track.Priority = Enum.AnimationPriority.Idle track:Play() end end local playerCardTemplate = ui.content.sample:Clone() ui.content.sample:Destroy() local selectedPlayerCard local function update() -- update player cards local playerCardCount = 0 for i, player in pairs(game.Players:GetPlayers()) do if player:FindFirstChild("DataLoaded") then if player.Character and player.Character.PrimaryPart and player.Character.PrimaryPart:FindFirstChild("appearance") then local appearance = player.Character.PrimaryPart.appearance.Value local data = game:GetService("HttpService"):JSONDecode(appearance) if data then local playerCard = ui.content:FindFirstChild(player.Name) if playerCard == nil then playerCard = playerCardTemplate:Clone() playerCard.Name = player.Name playerCard.Parent = ui.content playerCard.Visible = true playerCard.Activated:connect(function() Modules.inspectPlayer.open(player) Modules.inspectPlayerPreview.close() end) playerCard.MouseEnter:connect(function() selectedPlayerCard = playerCard Modules.inspectPlayerPreview.open(player, playerCard) end) playerCard.SelectionGained:connect(function() selectedPlayerCard = playerCard Modules.inspectPlayerPreview.open(player, playerCard) end) playerCard.MouseLeave:connect(function() if selectedPlayerCard == playerCard then selectedPlayerCard = nil Modules.inspectPlayerPreview.close() end end) playerCard.SelectionLost:connect(function() if selectedPlayerCard == playerCard then selectedPlayerCard = nil Modules.inspectPlayerPreview.close() end end) playerCard.LayoutOrder = 22 end if playerCard.appearance.Value ~= appearance and Modules.loadingScreen.loaded then playerCard.appearance.Value = appearance repareRender(playerCard.character.ViewportFrame, player, data) end local gold = player:FindFirstChild("gold") and player.gold.Value or 0 Modules.money.setLabelAmount(playerCard.content.money, gold) local level = player:FindFirstChild("level") and player.level.Value or 0 playerCard.content.level.value.Text = "Lvl." .. level playerCard.content.icon.ImageLabel.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. player.userId .. "&width=100&height=100&format=png" playerCard.content.username.Text = player.Name local localPlayer = game.Players.LocalPlayer local origin = localPlayer.Character and localPlayer.Character.PrimaryPart and localPlayer.Character.PrimaryPart.Position origin = origin or Vector3.new() local class = player:FindFirstChild("class") and player.class.Value:lower() or "unknown" local emblemVisible if class:lower() ~= "adventurer" then playerCard.content.emblem.Image = "rbxgameasset://Images/emblem_"..class:lower() playerCard.content.emblem.Visible = true emblemVisible = true else playerCard.content.emblem.Visible = false end local playerColor = Color3.fromRGB(208, 208, 208) local distance = (player.Character.PrimaryPart.Position - origin).magnitude -- do not update layoutOrder based on distance when leaderboard is selected local layoutOrder = (selectedPlayerCard == nil) and math.clamp(math.ceil(math.sqrt(distance)), 1, 20) if player == localPlayer then layoutOrder = -1 playerColor = Color3.fromRGB(255, 206, 89) else local partyInfo = network:invoke("getCurrentPartyInfo") if partyInfo and partyInfo.members then for i,partyMemberInfo in pairs(partyInfo.members) do if player == partyMemberInfo.player then layoutOrder = 0 playerColor = Color3.fromRGB(87, 255, 255) break end end end end playerCard.content.icon.BorderColor3 = playerColor playerCard.content.emblem.ImageColor3 = playerColor playerCard.content.username.TextColor3 = playerColor --playerCard.premium.ImageColor3 = playerColor --playerCard.premium.Visible = player.MembershipType == Enum.MembershipType.Premium if layoutOrder then playerCard.LayoutOrder = layoutOrder end playerCardCount = playerCardCount + 1 end end end end ui.content.CanvasSize = UDim2.new(0, 0, 0, 35 * playerCardCount) -- remove un-used cards for i, card in pairs(ui.content:GetChildren()) do if card:IsA("GuiObject") and game.Players:FindFirstChild(card.Name) == nil then card:Destroy() end end end spawn(function() while wait(1) do update() end end) end return module
local metadata = { plugin = { format = 'jar', manifest = { permissions = {}, usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.ACCESS_NETWORK_STATE" }, usesFeatures = {}, applicationChildElements = { [[<activity android:name="com.vungle.warren.ui.VungleActivity" android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize" android:launchMode="singleTop" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>]], [[<activity android:name="com.vungle.warren.ui.VungleFlexViewActivity" android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize" android:launchMode="singleTop" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>]], }, }, }, coronaManifest = { dependencies = { ["shared.android.support.v4"] = "com.coronalabs" } } } return metadata
-- See LICENSE for terms local properties = {} local c = 0 local PhotoFilterPresetMap = PhotoFilterPresetMap for id, item in pairs(PhotoFilterPresetMap) do if id ~= "None" then c = c + 1 properties[c] = PlaceObj("ModItemOptionToggle", { "name", id, "DisplayName", T(item.displayName), "Help", T(item.desc), "DefaultValue", false, }) end end local CmpLower = CmpLower local _InternalTranslate = _InternalTranslate table.sort(properties, function(a, b) return CmpLower(_InternalTranslate(a.DisplayName), _InternalTranslate(b.DisplayName)) end) return properties
-- Copyright (C) Miracle -- Copyright (C) OpenWAF local _M = { _VERSION = "1.1.1" } local twaf_func = require "lib.twaf.inc.twaf_func" local twaf_action = require "lib.twaf.inc.action" local cidr = require "lib.twaf.inc.cidr" local ssl = require "ngx.ssl" local event_id = "910001" local event_severity = "low" local modules_name = "twaf_access_rule" local rule_name = "exception.req.access_rule" local ngx_var = ngx.var local ngx_shared = ngx.shared local ngx_re_find = ngx.re.find local io_open = io.open local _type = type local string_format = string.format local table_insert = table.insert local is_type = {table = 1, string = 2} local function _log_action(_twaf, cf, ctx) local actx = {} local _ctx = ctx or {} actx.id = event_id actx.severity = event_severity actx.rule_name = rule_name actx.action = cf.action actx.action_meta = _ctx.resp_code or cf.action_meta actx.version = _M._VERSION actx.log_state = cf.log_state return twaf_func:rule_log(_twaf, actx) end function _M.access_rule_rfast(self, ckey, ctx) local server = nil local access_rule_flag = true for _, rule in ipairs(ctx.rfast[ckey] or {}) do if ngx_re_find(ctx.uri, rule.path, rule.url_case_option) ~= 1 then access_rule_flag = false end if access_rule_flag == true then server = rule break end ctx.para = {} access_rule_flag = true end return server end --[[ ctx.rules ctx.host ctx.https ctx.uri ctx.request_port ]] function _M.access_rule(self, _twaf, ctx) local server = nil local mhost = nil local tflag = false for _, rule in ipairs(ctx.rules) do local access_rule_flag = true -- enable if access_rule_flag and not rule.enable then access_rule_flag = false end -- ngx ssl if access_rule_flag and ctx.https ~= rule.ngx_ssl then access_rule_flag = false end -- host if access_rule_flag then mhost = rule.host if rule.host_type == 1 then -- "table" for _, h in ipairs(rule.host) do local bool = cidr.contains(cidr.from_str(ctx.host), cidr.from_str(h)) -- ipv6 if bool == true or ngx_re_find(ctx.host, h, "jio") then mhost = h tflag = true break end end if not tflag then access_rule_flag = false end else -- "string" local bool = cidr.contains(cidr.from_str(ctx.host), cidr.from_str(rule.host)) -- ipv6 if bool ~= true and not ngx_re_find(ctx.host, rule.host, "jio") then access_rule_flag = false end end end if access_rule_flag and ngx_re_find(ctx.uri, rule.path, rule.url_case_option) ~= 1 then access_rule_flag = false end if access_rule_flag and rule.port ~= ctx.request_port then access_rule_flag = false end if access_rule_flag then server = rule break end mhost = nil tflag = false end return server end function _M.handler(self, _twaf) local cf = _twaf.config.twaf_access_rule if not cf.state then return end local ctx = _twaf:ctx() local req = ctx.req local uri = _twaf:get_vars("URI", req) local is_https = _twaf:get_vars("SCHEME", req) == "https" and true or false local request_host = _twaf:get_vars("REMOTE_HOST", req) local request_port = _twaf:get_vars("SERVER_PORT", req) local _ctx = {} _ctx.rules = cf.rules _ctx.rfast = cf.rfast _ctx.host = request_host _ctx.https = is_https _ctx.uri = uri _ctx.request_port = request_port _ctx.req = req local server, ckey, key local dict = ngx_shared[cf.shm] if cf.dict_state and dict then key = string_format("%s%s%d", is_https, request_host, request_port) ckey = dict:get(key) if ckey then server = _M:access_rule_rfast(ckey, _ctx) end end if not ckey then server = _M:access_rule(_twaf, _ctx) end if not server then return _log_action(_twaf, cf) end if key and not ckey and server.cache_key then dict:set(key, server.cache_key) end local server_scheme = server.server_ssl and "https" or "http" ngx_var.twaf_upstream_server = string_format("%s://%s", server_scheme, server.forward) req.ACCESS_RULE = server req.POLICYID = server.policy req.USERID = server.user req.ACCESS_ID = server.uuid local gcf = _twaf:get_config_param("twaf_global") if gcf["twaf_x_real_ip"] == "twaf_x_forwarded_for" then req.REMOTE_ADDR = _twaf:get_vars("REAL_IP", req) ngx_var.twaf_x_real_ip = req.REMOTE_ADDR end ctx.balancer = {} ctx.balancer.timeout = server.forward_timeout ctx.balancer.addr = server.forward_addr ctx.balancer.port = server.forward_port return true end function _M.rules_cache_init(rules) local dst = {} for _, r in ipairs(rules) do if r.cache_key then dst[r.cache_key] = dst[r.cache_key] or {} table_insert(dst[r.cache_key], r) end end return dst end function _M.rule_init(r, err) if not err then err = {} end local cache_key = true r.enable = r.enable == nil and true or r.enable twaf_func.type_check(r.enable, "enable", "boolean", err) r.user = r.user or "-" twaf_func.type_check(r.user, "user", "string", err) r.client_ssl = r.client_ssl or false twaf_func.type_check(r.client_ssl, "client_ssl", "boolean", err) if r.client_ssl == true then twaf_func.type_check(r.client_ssl_cert, "client_ssl_cert", "string", err) --[[ local f = io_open(r.client_ssl_cert) if f then local pem_cert_chain = f:read("*a") f:close() local der_cert_chain, err = ssl.cert_pem_to_der(pem_cert_chain) if not der_cert_chain then table_insert(err, "failed to convert certificate chain from PEM to DER: ", err) end r.client_ssl_cert_chain = der_cert_chain else table_insert(err, "open client cert failed: " .. r.client_ssl_cert) end]] end r.ngx_ssl = r.ngx_ssl or false twaf_func.type_check(r.ngx_ssl, "ngx_ssl", "boolean", err) if r.ngx_ssl == true then twaf_func.type_check(r.ngx_ssl_key, "ngx_ssl_key", "string", err) twaf_func.type_check(r.ngx_ssl_cert, "ngx_ssl_cert", "string", err) --[[ local f = io_open(r.ngx_ssl_cert) if f then local pem_cert_chain = f:read("*a") f:close() local der_cert_chain, err = ssl.cert_pem_to_der(pem_cert_chain) if not der_cert_chain then table_insert(err, "failed to convert certificate chain from PEM to DER: ", err) end r.ngx_ssl_cert_chain = der_cert_chain else table_insert(err, "open ngx cert failed: " .. r.ngx_ssl_cert) end local f = io_open(r.ngx_ssl_key) if f then local pem_pkey = f:read("*a") f:close() local der_pkey, err = ssl.priv_key_pem_to_der(pem_pkey) if not der_pkey then table_insert(err, "failed to convert pkey from PEM to DER: ", err) end r.ngx_ssl_pkey = der_pkey else table_insert(err, "open ngx pkey failed: " .. r.ngx_ssl_key) end]] end -- server r.is_star = r.is_star or false twaf_func.type_check(r.is_star, "is_star", "boolean", err) if _type(r.host) == "table" and not r.host[2] then r.host = r.host[1] end if _type(r.host) == "string" then r.host_type = is_type.string if r.host == ".*" then r.is_star = true cache_key = false end elseif _type(r.host) == "table" then r.host_type = is_type.table for j, h in ipairs(r.host) do if h == ".*" then r.is_star = true end twaf_func.type_check(h, "host", "string", err) end else table_insert(err, "host: string or table expected, got " .. _type(r.host)) end if not r.port then r.port = r.ngx_ssl and 443 or 80 end twaf_func.type_check(r.port, "port", "number", err) r.path = r.path or "/" twaf_func.type_check(r.path, "path", "string", err) r.url_case_sensitive = r.url_case_sensitive or false twaf_func.type_check(r.url_case_sensitive, "url_case_sensitive", "boolean", err) r.url_case_option = r.url_case_sensitive and "jo" or "jio" r.server_ssl = r.server_ssl or false twaf_func.type_check(r.server_ssl, "server_ssl", "boolean", err) r.forward = r.forward or "" twaf_func.type_check(r.forward, "forward", "string", err) if r.forward_addr then if _type(r.forward_addr) == "string" then r.forward_addr_type = is_type.string if not r.forward_port then r.forward_port = r.server_ssl and 443 or 80 end twaf_func.type_check(r.forward_port, "forward_port", "number", err) if r.forward_addr == ".*" then r.tflag = true cache_key = false end elseif _type(r.forward_addr) == "table" then r.forward_addr_type = is_type.table twaf_func.type_check(r.forward_port, "forward_port", "table", err) for j, a in ipairs(r.forward_addr) do twaf_func.type_check(a, "forward_addr", "string", err) twaf_func.type_check(r.forward_port[j], "forward_port", "number", err) if a == ".*" then cache_key = false table_insert(err, "not allow * in forward_addr array") end end else table_insert(err, "forward_addr: string or table expected, got " .. _type(r.forward_addr)) end else -- r.forward_addr == nil r.forward_addr = "" r.forward_port = r.forward_port or 80 end r.policy = r.policy or twaf.config.global_conf_uuid twaf_func.type_check(r.policy, "policy", "string", err) r.uuid = r.uuid or twaf_func:random_id(16, true) twaf_func.type_check(r.uuid, "uuid", "string", err) -------------------------------------- local ft = r.forward_timeout if ft then if ft < 0 then table_insert(err, "forward_timeout must greater than 0") end if ft == 0 then r.forward_timeout = nil end end if cache_key == true then r.cache_key = string_format("%s%d%s", twaf_func:table_to_string(r.host), r.port, r.ngx_ssl) else r.cache_key = nil end if #err > 0 then return false, err end return true end function _M.init(_twaf, cf) local err = {} -- state cf.state = cf.state == nil and true or cf.state twaf_func.type_check(cf.state, "state", "boolean", err) if not cf.state then -- cf.state == false return true end -- log_state cf.log_state = cf.log_state == nil and true or cf.log_state twaf_func.type_check(cf.log_state, "log_state", "boolean", err) twaf_func.type_check(cf.shm, "shm", "string", err) cf.dict_state = cf.dict_state or false twaf_func.type_check(cf.dict_state, "dict_state", "boolean", err) -- action action_meta cf.action = cf.action or "DENY" local f, a, m = twaf_action.is_action(cf.action, cf.action_meta) if not f then table_insert(err, a) end cf.action = a cf.action_meta = m -- rules if _type(cf.rules) ~= "table" then table_insert(err, "rules: table expected, got " .. _type(cf.rules)) return false, err end for _, r in ipairs(cf.rules) do _M.rule_init(r, err) end cf.rfast = _M.rules_cache_init(cf.rules) if #err > 0 then return false, err end return true end return _M
AddCSLuaFile("shared.lua") AddCSLuaFile("cl_init.lua") include("shared.lua") function ENT:Initialize() self:SetModel("models/psychedelics/lsd/phosphorus_oxychloride.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetSolid(SOLID_VPHYSICS) self:GetPhysicsObject():Wake() self:Activate() end function ENT:Use( activator, caller ) end function ENT:Touch(entity) if entity:GetClass()=="psychedelics_flask" and entity.level==1 then entity.level = 2 entity:SetNWString("psychedelicsTipText","Add phosphorus pentachloride") self:Remove() end end function ENT:Think() end
--[[ Copyright (c) 2016 Technicolor Delivery Technologies, SAS The source code form of this Transformer component is subject to the terms of the Clear BSD license. You can redistribute it and/or modify it under the terms of the Clear BSD License (http://directory.fsf.org/wiki/License:ClearBSD) See LICENSE file for more details. ]] -- Change this if you change the output of the generator! local version = "2.3" local function printHeader(out, datamodel) out:write("-- Automatically generated from ", datamodel, "\n", "-- using generator version ", version, "\n") end --- Prints a mapping for a datamodel to an output stream. -- @param out The output stream to which the datamodel will be written. -- @param datamodel The datamodel for which a mapping will be written. -- @return nil local function printMapping(out, datamodel, numEntriesInfo) local printOrderedTable local function printUnOrderedTable(out, table, indent, conversionTable) local indent = indent or '' local conversion = {} for _, value in pairs(table) do conversion = conversionTable[value] if not (conversion == false) then if type(value) == 'table' and #value > 0 and not value[value[1]] then out:write(indent,'{\n') printUnOrderedTable(out, value, indent..' ', conversionTable) out:write(indent, '}') elseif type(value) == 'table' then out:write(indent,'{\n') printOrderedTable(out, value, indent..' ', conversionTable) out:write(indent, '}') elseif type(conversion) == 'function' then out:write(indent,conversion(value)) elseif type(value) == 'boolean' then out:write(indent,tostring(value)) else out:write(indent,'"', value, '"') end out:write(',\n') end end end --- Prints a table in the order specified by the #table first elements. -- @param out The output stream to which the table will be written. -- @param table The datamodel for which a mapping will be created. -- @param indent The indentation that will be printed before each table entry. -- @param conversionTable A table that specifies how certain keys should be converted. -- Keys can be ignored if the conversionTable for it returns false. -- @return nil printOrderedTable = function(out, table, indent, conversionTable) local indent = indent or '' conversion = conversion or {} for i=1,#table do local key = table[i] local value = table[key] or table[i] conversion = conversionTable[key] if not (conversion == false) then out:write(indent, key, ' = ') if type(value) == 'table' and #value > 0 and not value[value[1]] then out:write('{\n') printUnOrderedTable(out, value, indent..' ', conversionTable) out:write(indent, '}') elseif type(value) == 'table' then out:write('{\n') printOrderedTable(out, value, indent..' ', conversionTable) out:write(indent, '}') elseif type(conversion) == 'function' then out:write(conversion(value)) elseif type(value) == 'boolean' then out:write(tostring(value)) else out:write('"', value, '"') end out:write(',\n') end end end -- A conversion function for Min and MaxEntries. local function entriesConversion(value) if value == "unbounded" then return "math.huge" end return value end -- Loop over the datamodel and write it to out stream. for objectIndex=1,#datamodel do local objectName = datamodel[objectIndex] local objectAttributes = datamodel[objectName] -- Converts and collapses series of non-alphanumeric characters to underscores. local objectNameVar = string.gsub(objectName, "%W+", "_") out:write('local ', objectNameVar, ' = {\n') out:write(' objectType = {\n') printOrderedTable(out, objectAttributes, ' ', { ["dmr:version"] = false, ["dmr:noUniqueKeys"] = false, ["dmr:fixedObject"] = false, maxEntries = entriesConversion, minEntries = entriesConversion }) out:write(' parameters = {\n') local numEntries = numEntriesInfo[objectName] or {} for parameterIndex=1,#objectAttributes.params do local parameterName = objectAttributes.params[parameterIndex] if not numEntries[parameterName] then local parameterAttributes = objectAttributes.params[parameterName] out:write(' ', parameterName, ' = {\n') printOrderedTable(out, parameterAttributes, ' ', { name = false, ["dmr:version"] = false }) out:write(' },\n') else out:write(" -- ", parameterName, "\n", " -- automatically created when ", numEntries[parameterName], " is loaded\n") end end out:write(' }\n') out:write(' }\n') out:write('}\n\n') out:write('register(', objectNameVar, ')\n\n') end end function listObjectTypes(out, datamodel) local allNames = {} for idx=1,#datamodel do allNames[#allNames+1] = datamodel[idx] end table.sort(allNames) for idx=1,#allNames do out:write(allNames[idx],"\n") end end -- Main program local args = require('lapp') ([[ Generates a mapping file for Transformer (version ]] ..version.. [[). -o, --output (default stdout) The path to which the mapping file will be written. -d, --datamodel (default ']] .. string.gsub(arg[0],'/[^/]*$',"") .. [[/dm/Dev-2.11.xml') The path of the BBF XML description on which the mapping should be created. <path> (string) The BBF path for which a datamodel should be created. ('?' to list them) ]]) local list = false local path=args.path if path=='?' then path = nil list = true else path = "^"..path.."$" end local dataModel, numEntries = require('dmParser').parse(args.datamodel, path) if not list then printHeader(args.output, dataModel["name"]) dataModel["name"] = nil printMapping(args.output, dataModel, numEntries) else listObjectTypes(args.output, dataModel) end
local names = setmetatable( { __index = setmetatable( { raw = function (self, key) return rawget(self, key) end, len = function (self) local maxlen = 0 for _, name in pairs(self) do if #name > maxlen then maxlen = #name end end return maxlen end, }, { __index = function (self, key) return "???" end, }), }, { __call = function (self, tbl) return setmetatable(tbl, self) end, }) names.command = names { [0x0190] = "SHELL_CONSOLE", [0x0191] = "PING", [0x0192] = "SERVER_CLIENTINFO", [0x0193] = "USER_CLIENTINFO", [0x0194] = "SERVER_SESSION_MSG", [0x0195] = "USER_SESSION_MSG", [0x0196] = "SERVER_MESSAGE", [0x0197] = "USER_MESSAGE", [0x0198] = "SERVER_REGISTER", [0x0199] = "USER_REGISTER", [0x019A] = "SERVER_AUTHENTICATE", [0x019B] = "USER_AUTHENTICATE", [0x019C] = "SERVER_SESSION_CREATE", [0x019D] = "USER_SESSION_CREATE", [0x019E] = "SERVER_SESSION_JOIN", [0x019F] = "USER_SESSION_JOIN", [0x01A0] = "SERVER_SESSION_LEAVE", [0x01A1] = "USER_SESSION_LEAVE", [0x01A2] = "SERVER_SESSION_LOCK", [0x01A3] = "USER_SESSION_LOCK", [0x01A4] = "SERVER_SESSION_INFO", [0x01A5] = "USER_SESSION_INFO", [0x01A6] = "USER_CONNECTED", [0x01A7] = "USER_DISCONNECTED", [0x01A8] = "SERVER_USER_EXIST", [0x01A9] = "USER_USER_EXIST", [0x01AA] = "SERVER_SESSION_UPDATE", [0x01AB] = "SERVER_SESSION_CLIENT_UPDATE", [0x01AC] = "USER_SESSION_CLIENT_UPDATE", [0x01AD] = "SERVER_VERSION_INFO", [0x01AE] = "USER_VERSION_INFO", [0x01AF] = "SERVER_SESSION_CLOSE", [0x01B0] = "USER_SESSION_CLOSE", [0x01B1] = "SERVER_GET_TOP_USERS", [0x01B2] = "USER_GET_TOP_USERS", [0x01B3] = "SERVER_UPDATE_INFO", [0x01B4] = "USER_UPDATE_INFO", [0x01B5] = "SERVER_SESSION_KICK", [0x01B6] = "USER_SESSION_KICK", [0x01B7] = "SERVER_SESSION_CLSCORE", [0x01B8] = "USER_SESSION_CLSCORE", [0x01B9] = "SERVER_FORGOT_PSW", [0x01BA] = "SERVER_SESSION_WRONG_CLOSE", [0x01BB] = "SERVER_SESSION_PARSER", [0x01BC] = "USER_SESSION_PARSER", [0x01BD] = "USER_SESSION_RECREATE", [0x01BE] = "USER_SESSION_REJOIN", [0x01BF] = "SERVER_PING_TEST", [0x01C0] = "USER_PING_TEST", [0x01C1] = "SERVER_SESSION_REJOIN", [0x01C2] = "SERVER_SELECT_FRIENDS", [0x01C3] = "USER_SELECT_FRIENDS", [0x01C4] = "SERVER_UPDATE_FRIENDS", [0x01C5] = "SERVER_DELETE_FRIENDS", [0x01C6] = "SERVER_SELECT_CHATS", [0x01C7] = "USER_SELECT_CHATS", [0x01C8] = "SERVER_INSERT_CHATS", [0x01C9] = "SERVER_UPDATE_CHATS", [0x01CA] = "SERVER_DELETE_CHATS", [0x01CB] = "SERVER_SELECT_CLANS", [0x01CC] = "USER_SELECT_CLANS", [0x01CD] = "SERVER_INSERT_CLANS", [0x01CE] = "SERVER_UPDATE_CLANS", [0x01CF] = "SERVER_DELETE_CLANS", [0x01D0] = "SERVER_SELECT_MEMBERS", [0x01D1] = "USER_SELECT_MEMBERS", [0x01D2] = "SERVER_INSERT_MEMBERS", [0x01D3] = "SERVER_DELETE_MEMBERS", [0x01D4] = "SERVER_SELECT_ADMINS", [0x01D5] = "USER_SELECT_ADMINS", [0x01D6] = "SERVER_UPDATE_ADMINS", [0x01D7] = "SERVER_DELETE_ADMINS", [0x01D8] = "SERVER_BANNING_ADMINS", [0x01D9] = "SERVER_RESERV0_ADMINS", [0x01DA] = "SERVER_RESERV1_ADMINS", [0x01DB] = "SERVER_RESERV2_ADMINS", [0x01DC] = "SERVER_SELECT_STATS", [0x01DD] = "USER_SELECT_STATS", [0x01DE] = "SERVER_UPDATE_STATS", [0x01DF] = "SERVER_DELETE_STATS", [0x01E0] = "SERVER_GET_SESSIONS", [0x01E1] = "USER_GET_SESSIONS", [0x01E2] = "SERVER_PING_LOCK", [0x01E3] = "SERVER_PING_UNLOCK", [0x01E4] = "SERVER_CHECKSUM", [0x01E5] = "USER_CHECKSUM", [0x01E6] = "USER_CHECKSUM_FAILED", [0x0001] = "0x0001", [0x0002] = "0x0002", [0x0003] = "0x0003", [0x0004] = "0x0004", [0x0032] = "LAN_PARSER", [0x0064] = "LAN_CLIENT_INFO", [0x0065] = "0x0065", [0x0066] = "0x0066", [0x0067] = "0x0067", [0x00C8] = "LAN_SERVER_INFO", [0x00C9] = "0x00C9", [0x00CA] = "0x00CA", [0x00CB] = "0x00CB", [0x0456] = "LAN_DO_START", [0x0457] = "LAN_DO_START_GAME", [0x0460] = "LAN_DO_READY", [0x0461] = "LAN_DO_READY_DONE", [0x04B0] = "LAN_RECORD", } names.register = names { [0] = "Success", [1] = "This e-mail is already in use", [3] = "Incorrect Internet game key", [4] = "Core version is outdated", [5] = "Data version is outdated", [6] = "Incorrect registration data", } names.authenticate = names { [0] = "Success", [1] = "Invalid password", [2] = "This account is blocked", [3] = "Incorrect Internet game key", [4] = "Core version is outdated", [5] = "Data version is outdated", } names.parser = names { [1] = "LAN_GENERATE", [2] = "LAN_READYSTART", [3] = "LAN_START", [4] = "LAN_ROOM_READY", [5] = "LAN_ROOM_START", [6] = "LAN_ROOM_CLIENT_CHANGES", [7] = "LAN_GAME_READY", [8] = "LAN_GAME_ANSWER_READY", [9] = "LAN_GAME_START", [10] = "LAN_GAME_SURRENDER", [11] = "LAN_GAME_SURRENDER_CONFIRM", [12] = "LAN_GAME_SERVER_LEAVE", [13] = "LAN_GAME_SESSION_RESULTS", [14] = "LAN_GAME_SYNC_REQUEST", [15] = "LAN_GAME_SYNC_DATA", [16] = "LAN_GAME_SYNC_GAMETIME", [17] = "LAN_GAME_SYNC_ALIVE", [100] = "LAN_ROOM_SERVER_DATASYNC", [101] = "LAN_ROOM_SERVER_DATACHANGE", [102] = "LAN_ROOM_CLIENT_DATACHANGE", [103] = "LAN_ROOM_CLIENT_LEAVE", [200] = "LAN_MODS_MODSYNC_REQUEST", [201] = "LAN_MODS_MODSYNC_PARSER", [202] = "LAN_MODS_CHECKSUM_REQUEST", [203] = "LAN_MODS_CHECKSUM_ANSWER", [204] = "LAN_MODS_CHECKSUM_REQUESTCANJOIN", [205] = "LAN_MODS_CHECKSUM_ANSWERCANJOIN", [206] = "LAN_MODS_CHECKSUM_ANSWERCANNOTJOIN", [300] = "LAN_ADVISER_CLIENT_DATACHANGE", } names.client = names { [0] = "ALL", } names.state = names { [0] = "online", [1] = "session", [2] = "master", [3] = "played", } names.difficulty = names { [0] = "Normal", [1] = "Hard", [2] = "Very Hard", [3] = "Impossible", } names.nation = names { [-2] = "SPECTATOR", [0] = "Austria", [1] = "France", [2] = "England", [3] = "Spain", [4] = "Russia", [5] = "Ukraine", [6] = "Poland", [7] = "Sweden", [8] = "Prussia", [9] = "Venice", [10] = "Turkey", [11] = "Algeria", [12] = "Originals", [13] = "Netherlands", [14] = "Denmark", [15] = "Portugal", [16] = "Piedmont", [17] = "Saxony", [18] = "Bavaria", [19] = "Hungary", [20] = "Switzerland", [21] = "Scotland", [24] = "Random", } names.color = names { [0] = "red", [1] = "blue", [2] = "cyan", [3] = "purple", [4] = "orange", [5] = "green", [6] = "white", [7] = "pink", [8] = "yellow", [9] = "teal", [10] = "ltgreen", [11] = "olive", } names.season = names { [-1] = "Random", [0] = "Summer", [2] = "Winter", [3] = "Desert", } names.terraintype = { names { vdata = 0x00000000, [0] = "Land", [1] = "Mediterranean", [2] = "Peninsulas", [3] = "Islands", [4] = "Several Continents", [5] = "Single Continent", [6] = "Random", }, names { vdata = 0x00020105, [0] = "Land", [1] = "Mediterranean", [2] = "Peninsulas", [3] = "Islands", [4] = "Several Continents", [5] = "Single Continent", [6] = "Coastal", [7] = "Lakes", [8] = "Rivers", [9] = "Random", }, } names.relieftype = names { [0] = "Plain", [1] = "Low Mountains", [2] = "High Mountains", [3] = "Highlands", [4] = "Plateaus", [5] = "Random", } names.resourcestart = names { [0] = "Normal", [1] = "Rich", [2] = "Thousands", [3] = "Millions", [4] = "Random", } names.resourcemines = names { [0] = "Poor", [1] = "Medium", [2] = "Rich", [3] = "Random", } names.mapsize = names { [0] = "Normal", [1] = "Large 2x", [2] = "Huge 4x", [3] = "Tiny", } names.startingunits = { names { vdata = 0x00000000, [0] = "Default", [1] = "Army", [2] = "Big Army", [3] = "Huge Army", [4] = "Army of Peasants", [5] = "Different Nations", [6] = "Towers", [7] = "Cannons", [8] = "Cannons and Howitzers", [9] = "18th Century Barracks", }, names { vdata = 0x00020105, [0] = "Default", [1] = "Army", [2] = "Big Army", [3] = "Huge Army", [4] = "Army of Peasants", [5] = "Different Nations", [6] = "Towers", [7] = "Cannons", [8] = "Cannons and Howitzers", [9] = "18th Century Barracks", [10] = "17th Century Barracks", [11] = "Village", [12] = "Log Cabins", [13] = "Union", }, } names.balloon = names { [0] = "Default", [1] = "No Balloons", [2] = "Balloons", } names.cannons = names { [0] = "Default", [1] = "No Cannons, Towers and Walls", [2] = "Expensive Cannons", } names.peacetime = names { [0] = "No Peace Time", [1] = "10 min", [2] = "20 min", [3] = "30 min", [4] = "45 min", [5] = "60 min", [6] = "1.5 hours", [7] = "2 hours", [8] = "3 hours", [9] = "4 hours", [11] = "15 min", } names.century18 = names { [0] = "Default", [1] = "Never", [2] = "Immediately", } names.capture = names { [0] = "Default", [1] = "No Capturing Peasants", [2] = "No Capturing Peasants or Centres", [3] = "Artillery Only", } names.marketdip = { names { vdata = 0x00000000, [0] = "Default", [1] = "Without dip. center", [2] = "Without market", [3] = "Without both", }, names { vdata = 0x00020105, [0] = "Default", [1] = "Without dip. center", [2] = "Without market", [3] = "Without both", [4] = "Expensive Mercenaries", }, } names.teams = names { [0] = "Default", [1] = "Nearby", } names.limit = names { [0] = "Without limitation", [1] = "500 units", [2] = "750 units", [3] = "1000 units", [4] = "1500 units", [5] = "2200 units", [6] = "3000 units", [7] = "5000 units", [8] = "8000 units", } names.gamespeed = names { [-1] = "Adjustable", [0] = "Normal", [1] = "Fast", [2] = "Very Fast", } names.adviserassistant = names { [0] = "Default", [1] = "Without adviser", } names.battle = names { [-1] = "none", [0] = "Battle of Nieuwpoort (1600)", [1] = "Battle of Pyliavtsi (1648)", [2] = "Battle of Prostki (1656)", [3] = "Battle of Saint Gotthard (1664)", [4] = "Battle of Villaviciosa (1710)", [5] = "Battle of Sheriffmuir (1715)", [6] = "Oran (1732)", [7] = "Battle of Soor(1745)", } local cmd = {} for code, name in pairs(names.command) do cmd[name] = code end function str_states(b_value) local states = {} for i = 0, 3 do if b_value:bitfield(7 - i) ~= 0 then table.insert(states, names.state[i]) end end return "[" .. table.concat(states, ", ") .. "]" end local cp1251 = { [128] = "\208\130", [129] = "\208\131", [130] = "\226\128\154", [131] = "\209\147", [132] = "\226\128\158", [133] = "\226\128\166", [134] = "\226\128\160", [135] = "\226\128\161", [136] = "\226\130\172", [137] = "\226\128\176", [138] = "\208\137", [139] = "\226\128\185", [140] = "\208\138", [141] = "\208\140", [142] = "\208\139", [143] = "\208\143", [144] = "\209\146", [145] = "\226\128\152", [146] = "\226\128\153", [147] = "\226\128\156", [148] = "\226\128\157", [149] = "\226\128\162", [150] = "\226\128\147", [151] = "\226\128\148", [152] = nil, [153] = "\226\132\162", [154] = "\209\153", [155] = "\226\128\186", [156] = "\209\154", [157] = "\209\156", [158] = "\209\155", [159] = "\209\159", [160] = "\78\66\83\80", [161] = "\208\142", [162] = "\209\158", [163] = "\208\136", [164] = "\194\164", [165] = "\210\144", [166] = "\194\166", [167] = "\194\167", [168] = "\208\129", [169] = "\194\169", [170] = "\208\132", [171] = "\194\171", [172] = "\194\172", [173] = "\83\72\89", [174] = "\194\174", [175] = "\208\135", [176] = "\194\176", [177] = "\194\177", [178] = "\208\134", [179] = "\209\150", [180] = "\210\145", [181] = "\194\181", [182] = "\194\182", [183] = "\194\183", [184] = "\209\145", [185] = "\226\132\150", [186] = "\209\148", [187] = "\194\187", [188] = "\209\152", [189] = "\208\133", [190] = "\209\149", [191] = "\209\151", [192] = "\208\144", [193] = "\208\145", [194] = "\208\146", [195] = "\208\147", [196] = "\208\148", [197] = "\208\149", [198] = "\208\150", [199] = "\208\151", [200] = "\208\152", [201] = "\208\153", [202] = "\208\154", [203] = "\208\155", [204] = "\208\156", [205] = "\208\157", [206] = "\208\158", [207] = "\208\159", [208] = "\208\160", [209] = "\208\161", [210] = "\208\162", [211] = "\208\163", [212] = "\208\164", [213] = "\208\165", [214] = "\208\166", [215] = "\208\167", [216] = "\208\168", [217] = "\208\169", [218] = "\208\170", [219] = "\208\171", [220] = "\208\172", [221] = "\208\173", [222] = "\208\174", [223] = "\208\175", [224] = "\208\176", [225] = "\208\177", [226] = "\208\178", [227] = "\208\179", [228] = "\208\180", [229] = "\208\181", [230] = "\208\182", [231] = "\208\183", [232] = "\208\184", [233] = "\208\185", [234] = "\208\186", [235] = "\208\187", [236] = "\208\188", [237] = "\208\189", [238] = "\208\190", [239] = "\208\191", [240] = "\209\128", [241] = "\209\129", [242] = "\209\130", [243] = "\209\131", [244] = "\209\132", [245] = "\209\133", [246] = "\209\134", [247] = "\209\135", [248] = "\209\136", [249] = "\209\137", [250] = "\209\138", [251] = "\209\139", [252] = "\209\140", [253] = "\209\141", [254] = "\209\142", [255] = "\209\143", } function utf8(str) return str:gsub("[^\t\n\r\32-\126]", function (c) return cp1251[c:byte()] or "?" end) end local function convert_version(str) local version = 0 for part in str:gmatch("[0-9]+") do version = version * 256 + tonumber(part) end return version end local function strip_color(nickname) return nickname:gsub("%%color%([0-9A-Fa-f]+%)%%", "") end local data_version = convert_version("2.2.3") local reader = setmetatable( { formats = { ["1"] = "byte", ["b"] = "boolean", ["d"] = "datetime", ["t"] = "timestamp", ["s"] = "byte_string", ["w"] = "word_string", ["z"] = "dword_string", ["v"] = "byte_string", ["p"] = "parser", ["q"] = "parser_with_size", ["e"] = "states", ["i"] = "dword", ["j"] = "dword", ["c"] = "packet", ["n"] = "gamename", ["m"] = "mapname", }, remain = function (self) return math.max(0, self.range:len() - self.position) end, check = function (self, size) return (size <= self:remain()) end, buffer = function (self, size) if not self:check(size) then return end self.position = self.position + size return (tostring(self.range(self.position - size, size):bytes()) :gsub("..", function (hex) return string.char(tonumber(hex, 16)) end)) end, number = function (self, size) if not self:check(size) then return end self.position = self.position + size return self.range(self.position - size, size):le_uint() end, byte = function (self) return self:number(1) end, boolean = function (self) local byte = self:byte() if not byte then return end return byte ~= 0 end, word = function (self) return self:number(2) end, dword = function (self) return self:number(4) end, datetime = function (self) if not self:check(8) then return end self.position = self.position + 8 return self.range(self.position - 8, 8):le_float() end, timestamp = function (self) local dt = self:datetime() if not dt then return end return (dt - 25569.0) * 86400.0 end, string = function (self, len_size) local len = self:number(len_size) if not len then return end return self:buffer(len) end, byte_string = function (self) return self:string(1) end, word_string = function (self) return self:string(2) end, dword_string = function (self) return self:string(4) end, parser = function (self, tree, title) local parser = {} parser.position = {} parser.position.key = self.position parser.key = self:dword_string() parser.position.value = self.position parser.value = self:dword_string() parser.position.count = self.position local count = self:dword() if not (parser.key and parser.value and count) then return end local caption = ("%s = '%s'"):format(utf8(parser.key), utf8(parser.value)) if title then caption = ("%s: %s"):format(title, caption) end if count > 0 then caption = ("%s (%d)"):format(caption, count) end parser.tree = tree:add(self.range(parser.position.key, 1), caption) for _ = 1, count do table.insert(parser.position, self.position) local node = self:parser(parser.tree) if not node then return end table.insert(parser, node) end parser.position.size = self.position - parser.position.key parser.tree:set_len(parser.position.size) return parser end, parser_with_size = function (self, tree, title) local size = self:dword() if not size then return end tree:add(self.range(self.position - 4, 4), ("Parser Size: %d bytes"):format(size)) if size == 0 then return true end return self:parser(tree, title) end, states = function (self) if not self:check(1) then return end self.position = self.position + 1 return self.range(self.position - 1, 1) end, packet = function (self, tree, code) return self[code](self, tree) end, gamename = function (self, tree, title) local position = self.position local gamename = self:byte_string() if not gamename then return end tree = tree:add(self.range(position, self.position - position), ("%s: '%s'"):format(title, utf8(gamename))) local index = 0 local titles = {"real_name", "real_pass", "checksum"} position = position + 1 for part in gamename:gmatch("[^\t]+") do index = index + 1 title = titles[index] or ("field_" .. index) local value = part:match('^"(.*)"$') or part self.result[title] = value tree:add(self.range(position, #part), ("%s: '%s'"):format(title, utf8(value))) position = position + #part + 1 end return gamename end, mapname = function (self, tree, title) local position = self.position local mapname = self:byte_string() if not mapname then return end tree = tree:add(self.range(position, self.position - position), ("%s: '%s'"):format(title, utf8(mapname))) local i = 0 position = position + 1 for str in mapname:gmatch("[^|]+") do local istr = tonumber(str) local title if i == 0 then title = ("state_tag: %d"):format(istr) elseif i == 1 then title = ("human_count: %d"):format(istr) elseif i == 2 then title = ("ai_count: %d"):format(istr) elseif i == 3 then title = ("close_count: %d"):format(istr) elseif i == 4 then title = ("ping: %d"):format(istr) elseif i == 5 then title = ("rank: %d"):format(istr) elseif i == 6 then title = ("lanid_1: %d"):format(istr) elseif i == 7 then title = ("lanid_2: %d"):format(istr) elseif i == 8 then title = ("search_time: %d"):format(istr) elseif i == 9 then title = ("qp_state: %d"):format(istr) else title = ("unknown: %d"):format(istr) end tree:add(self.range(position, #str), title) i = i + 1 position = position + #str + 1 end return mapname end, parser_datasync = function (self) local parser = self.result.parser local parser_s = parser and parser[1] and parser[1].value or nil if not parser_s then return end local max_player_count = 9 if data_version >= 0x00020100 then max_player_count = 12 end local tree = parser[1].tree local i = 0 local pos = parser[1].position.value + 4 for str in parser_s:gmatch("[^|]+") do local istr = tonumber(str) local function tadd(title, value) parser[title] = value local value_names = names[title] if not value_names then title = ("%s: %d"):format(title, value) else local name = "" if getmetatable(value_names) == names then name = value_names[value] else for _, ns in ipairs(value_names) do if data_version >= ns.vdata then name = ns[value] end end end title = ("%s: %d (%s)"):format(title, value, name) end tree:add(self.range(pos, #str), title) end if i < max_player_count then if str == "0" then tree:add(self.range(pos, 1), "{none}") elseif str == "x" then tree:add(self.range(pos, 1), "{closed}") else local t_player = tree:add(self.range(pos, #str), "") local j = 0 local pos = pos local is_human, id, difficulty, cid, team, title for val in str:gmatch("[^,]+") do local ival = tonumber(val) if j == 0 then is_human = (ival > 0) if is_human then id = ival title = ("id: %d (%s)"):format(id, names.client[id]) else difficulty = math.abs(ival) title = ("difficulty: %d (%s)"):format(difficulty, names.difficulty[difficulty]) end elseif j == 1 then cid = names.nation[ival] title = ("cid: %d (%s)"):format(ival, cid) elseif j == 2 then team = (ival > 0) and ival or "-" title = ("team: %d"):format(ival) elseif j == 3 then title = ("color: %d (%s)"):format(ival, names.color[ival]) elseif j == 4 then title = ("ready: %d (%s)"):format(ival, tostring(ival ~= 0)) else title = ("unknown: %d"):format(ival) end t_player:add(self.range(pos, #val), title) j = j + 1 pos = pos + #val + 1 end if is_human then title = ("{human} [%d] %s"):format(id, names.client[id]) else title = ("{ai} [%d] %s"):format(difficulty, names.difficulty[difficulty]) end t_player:set_text(("%s / team: %s / nation: %s"):format(title, team, cid)) end elseif i == max_player_count + 0 then tadd("season", istr) elseif i == max_player_count + 1 then tadd("terraintype", istr) elseif i == max_player_count + 2 then tadd("relieftype", istr) elseif i == max_player_count + 3 then tadd("resourcestart", istr) elseif i == max_player_count + 4 then tadd("resourcemines", istr) elseif i == max_player_count + 5 then tadd("mapsize", istr) elseif i == max_player_count + 6 then tadd("startingunits", istr) elseif i == max_player_count + 7 then tadd("balloon", istr) elseif i == max_player_count + 8 then tadd("cannons", istr) elseif i == max_player_count + 9 then tadd("peacetime", istr) elseif i == max_player_count + 10 then tadd("century18", istr) elseif i == max_player_count + 11 then tadd("capture", istr) elseif i == max_player_count + 12 then tadd("marketdip", istr) elseif i == max_player_count + 13 then tadd("teams", istr) elseif i == max_player_count + 14 then tadd("autosave", istr) elseif i == max_player_count + 15 then tadd("limit", istr) elseif i == max_player_count + 16 then tadd("gamespeed", istr) elseif i == max_player_count + 17 then tadd("adviserassistant", istr) elseif i == max_player_count + 18 then tadd("battle", istr) elseif i == max_player_count + 19 then tadd("battlestage", istr) else tadd("unknown", istr) end i = i + 1 pos = pos + #str + 1 end end, parser_datachange = function (self) local parser = self.result.parser local parser_s = parser and parser[1] and parser[1].value or nil if not parser_s then return end local tree = parser[1].tree local i = 0 local pos = parser[1].position.value + 4 for str in parser_s:gmatch("[^|]+") do local istr = tonumber(str) if i == 0 then title = ("cid: %d (%s)"):format(istr, names.nation[istr]) elseif i == 1 then title = ("team: %s"):format((istr > 0) and istr or "-") elseif i == 2 then title = ("color: %d (%s)"):format(istr, names.color[istr]) else title = ("unknown: %d"):format(istr) end tree:add(self.range(pos, #str), title) i = i + 1 pos = pos + #str + 1 end end, object = function (self, tree, format, ...) for i = 1, #format do local position = self.position local title = select(i, ...) local fmt, value = format:sub(i, i), nil local ftype = self.formats[fmt] if ftype then value = self[ftype](self, tree, title) else fmt = assert(tonumber(fmt), "invalid format") value = self:number(fmt) end if value == nil then local line = "Read error, format: " .. fmt tree:add(self.range(position, 1), line) error(line) return end self.result[title] = value if fmt == "p" or fmt == "q" then if self.result.parser_id == 100 then self:parser_datasync() elseif self.result.parser_id == 102 then self:parser_datachange() end elseif fmt ~= "c" and fmt ~= "n" and fmt ~= "m" then if fmt == "b" then value = value and "true" or "false" elseif fmt == "d" then value = ("%g sec"):format(value * 86400) elseif fmt == "t" then value = format_date(value):gsub(" ", " "):match("^(.-)%.") elseif fmt == "s" or fmt == "w" or fmt == "z" then value = ("'%s'"):format(utf8(value)) elseif fmt == "e" then value = str_states(value) elseif fmt == "i" then value = ("%d (%s)"):format(value, names.client[value]) elseif fmt == "j" then value = ("%d (%s)"):format(value, names.parser[value]) end tree:add(self.range(position, self.position - position), ("%s: %s"):format(title, value)) end end return true end, clients = function (self, tree, format, ...) local position = self.position local t_clients = tree:add(self.range(position, 1), "Clients") local count = self:dword() if count == nil then return end t_clients:add(self.range(position, 4), ("Count: %d"):format(count)) for _ = 1, count do local position = self.position local t_client = t_clients:add(self.range(position, 1), "client") if not self:object(t_client, format, ...) then return end if self.result.id then t_client:set_text(("[%d] %s"):format(self.result.id, names.client[self.result.id])) end t_client:set_len(self.position - position) end t_clients:set_len(self.position - position) t_clients:append_text((" (%d)"):format(count)) return true end, server_clients = function (self, tree) local count = 0 local position = self.position local t_clients = tree:add(self.range(position, 1), "Clients") while true do local position = self.position local id = self:dword() if id == nil then return elseif id == 0 then t_clients:add(self.range(position, 4), "[End]") break end count = count + 1 local t_client = t_clients:add(self.range(position, 1), ("[%d] "):format(id)) t_client:add(self.range(position, 4), ("id: %d"):format(id)) if not self:object(t_client, "esss", "states", "nickname", "country", "info") then return end names.client[id] = strip_color(self.result.nickname) if data_version >= 0x00020100 then if not self:object(t_client, "444td", "score", "games_played", "games_win", "last_game", "pingtime") then return end end t_client:set_len(self.position - position) t_client:append_text(names.client[id]) end t_clients:set_len(self.position - position) t_clients:append_text((" (%d)"):format(count)) return true end, server_sessions = function (self, tree) local count = 0 local position = self.position local t_sessions = tree:add(self.range(position, 1), "Sessions") while true do local position = self.position local id_master = self:dword() if id_master == nil then return elseif id_master == 0 then t_sessions:add(self.range(position, 4), "[End]") break end count = count + 1 local t_session = t_sessions:add(self.range(position, 1), ("[%s] "):format(names.client[id_master])) t_session:add(self.range(position, 4), ("id_master: %d (%s)"):format(id_master, names.client[id_master])) if not self:object(t_session, "4nm4b1", "max_players", "gamename", "mapname", "money", "fog_of_war", "battlefield") then return end t_session:append_text(utf8(self.result.real_name)) if self.result.real_pass ~= "" then t_session:append_text((" (pass: %s)"):format(self.result.real_pass)) end if not self:clients(t_session, "i", "id") then return end t_session:set_len(self.position - position) end t_sessions:set_len(self.position - position) t_sessions:append_text((" (%d)"):format(count)) return true end, authenticate = function (self, tree) local position = self.position local error_code = self:byte() if not error_code then return end local error_names = (self.result.code == cmd.USER_REGISTER and names.register or names.authenticate) tree:add(self.range(position, self.position - position), ("error_code: %s (%s)"):format(error_code, error_names[error_code])) if error_code ~= 0 then return true end if not self:object(tree, "ss444ts", "nickname", "country", "score", "games_played", "games_win", "last_game", "info") then return end if not self:server_clients(tree) then return end return self:server_sessions(tree) end, [cmd.PING] = function (self, tree) if self.result.id_from ~= 0 then return self:object(tree, "d", "pingtime") else return self:clients(tree, "id", "id", "pingtime") end end, [cmd.SERVER_CLIENTINFO] = function (self, tree) return self:object(tree, "i", "id") end, [cmd.USER_CLIENTINFO] = function (self, tree) if not self:object(tree, "iess444ts", "id", "states", "nickname", "country", "score", "games_played", "games_win", "last_game", "info") then return end if data_version >= 0x00020100 then if not self:object(tree, "d", "pingtime") then return end end return true end, [cmd.SERVER_SESSION_MSG] = function (self, tree) return self:object(tree, "s", "message") end, [cmd.USER_SESSION_MSG] = function (self, tree) return self:object(tree, "s", "message") end, [cmd.SERVER_MESSAGE] = function (self, tree) return self:object(tree, "s", "message") end, [cmd.USER_MESSAGE] = function (self, tree) return self:object(tree, "s", "message") end, [cmd.SERVER_REGISTER] = function (self, tree) if not self:object(tree, "vvssssss", "vcore", "vdata", "email", "password", "cdkey", "nickname", "country", "info") then return end data_version = convert_version(self.result.vdata) return true end, [cmd.USER_REGISTER] = function (self, tree) return self:authenticate(tree) end, [cmd.SERVER_AUTHENTICATE] = function (self, tree) if not self:object(tree, "vvsss", "vcore", "vdata", "email", "password", "cdkey") then return end data_version = convert_version(self.result.vdata) return true end, [cmd.USER_AUTHENTICATE] = function (self, tree) return self:authenticate(tree) end, [cmd.SERVER_SESSION_CREATE] = function (self, tree) return self:object(tree, "4snm4b1", "max_players", "password", "gamename", "mapname", "money", "fog_of_war", "battlefield") end, [cmd.USER_SESSION_CREATE] = function (self, tree) return self:object(tree, "e4nm4b1", "states", "max_players", "gamename", "mapname", "money", "fog_of_war", "battlefield") end, [cmd.SERVER_SESSION_JOIN] = function (self, tree) return self:object(tree, "i", "id_master") end, [cmd.USER_SESSION_JOIN] = function (self, tree) return self:object(tree, "ie", "id_master", "states") end, [cmd.SERVER_SESSION_LEAVE] = function (self, tree) return true end, [cmd.USER_SESSION_LEAVE] = function (self, tree) if not self:object(tree, "b", "is_master") then return end return self:clients(tree, "ie", "id", "states") end, [cmd.SERVER_SESSION_LOCK] = function (self, tree) return self:clients(tree, "i1", "id", "team") end, [cmd.USER_SESSION_LOCK] = function (self, tree) local position = self.position local t_clients = tree:add(self.range(position, 1), "Clients") local count = self:dword() if count == nil then return end t_clients:add(self.range(position, 4), ("Count: %d"):format(count)) local real_count = 0 for _ = 1, count do local position = self.position local id = self:dword() if id == nil then return elseif id == 0 then if not self:object(tree, "4", "session_id") then return end else local t_client = t_clients:add(self.range(position, 1), ("[%d] %s"):format(id, names.client[id])) t_client:add(self.range(position, self.position - position), ("id: %d (%s)"):format(id, names.client[id])) if not self:object(t_client, "e", "states") then return end t_client:set_len(self.position - position) real_count = real_count + 1 end end t_clients:set_len(self.position - position) t_clients:append_text((" (%d)"):format(real_count)) return true end, [cmd.SERVER_SESSION_INFO] = function (self, tree) return true end, [cmd.USER_SESSION_INFO] = function (self, tree) if not self:object(tree, "4nm4b1", "max_players", "gamename", "mapname", "money", "fog_of_war", "battlefield") then return end return self:clients(tree, "ie", "id", "states") end, [cmd.USER_CONNECTED] = function (self, tree) if not self:object(tree, "ssse", "nickname", "country", "info", "states") then return end names.client[self.result.id_from] = strip_color(self.result.nickname) if data_version >= 0x00020100 then if not self:object(tree, "444td", "score", "games_played", "games_win", "last_game", "pingtime") then return end end return true end, [cmd.USER_DISCONNECTED] = function (self, tree) return true end, [cmd.SERVER_USER_EXIST] = function (self, tree) return self:object(tree, "s", "email") end, [cmd.USER_USER_EXIST] = function (self, tree) return self:object(tree, "sb", "email", "exist") end, [cmd.SERVER_SESSION_UPDATE] = function (self, tree) return self:object(tree, "nm4b1", "gamename", "mapname", "money", "fog_of_war", "battlefield") end, [cmd.SERVER_SESSION_CLIENT_UPDATE] = function (self, tree) return self:object(tree, "1", "team") end, [cmd.USER_SESSION_CLIENT_UPDATE] = function (self, tree) return self:object(tree, "1", "team") end, [cmd.SERVER_VERSION_INFO] = function (self, tree) if not self:object(tree, "v", "vdata") then return end data_version = convert_version(self.result.vdata) return true end, [cmd.USER_VERSION_INFO] = function (self, tree) if not self:object(tree, "vvq", "vcore", "vdata", "parser") then return end data_version = convert_version(self.result.vdata) return true end, [cmd.SERVER_SESSION_CLOSE] = function (self, tree) return true end, [cmd.USER_SESSION_CLOSE] = function (self, tree) if not self:object(tree, "t", "timestamp") then return nil end return self:clients(tree, "i4", "id", "score") end, [cmd.SERVER_GET_TOP_USERS] = function (self, tree) return self:object(tree, "4", "count") end, [cmd.USER_GET_TOP_USERS] = function (self, tree) local count = 0 local position = self.position local t_clients = tree:add(self.range(position, 1), "Clients") while true do local position = self.position local mark = self:byte() if mark == nil then return nil elseif mark == 0 then t_clients:add(self.range(position, 1), "[End]") break end count = count + 1 local t_client = t_clients:add(self.range(position, 1), "") if not self:object(t_client, "ss444t", "nickname", "country", "score", "games_played", "games_win", "last_game") then return end local nickname_strip = strip_color(self.result.nickname) if mark >= 2 then if not self:object(t_client, "i", "id") then return end t_client:append_text(("[%d] "):format(self.result.id)) names.client[self.result.id] = nickname_strip end t_client:set_len(self.position - position) t_client:append_text(nickname_strip) end t_clients:set_len(self.position - position) t_clients:append_text((" (%d)"):format(count)) return true end, [cmd.SERVER_UPDATE_INFO] = function (self, tree) return self:object(tree, "ssss", "password", "nickname", "country", "info") end, [cmd.USER_UPDATE_INFO] = function (self, tree) return self:object(tree, "c", cmd.USER_CONNECTED) end, [cmd.SERVER_SESSION_KICK] = function (self, tree) return self:object(tree, "i", "id") end, [cmd.USER_SESSION_KICK] = function (self, tree) return self:object(tree, "i", "id") end, [cmd.SERVER_SESSION_CLSCORE] = function (self, tree) return self:object(tree, "i4", "id", "score") end, [cmd.USER_SESSION_CLSCORE] = function (self, tree) return self:object(tree, "i4", "id", "score") end, [cmd.SERVER_FORGOT_PSW] = function (self, tree) return self:object(tree, "s", "email") end, [cmd.SERVER_SESSION_PARSER] = function (self, tree) return self:object(tree, "jp", "parser_id", "parser") end, [cmd.USER_SESSION_PARSER] = function (self, tree) if not self:object(tree, "jp", "parser_id", "parser") then return end if self:remain() > 0 then self:object(tree, "4", "unk_dw") end return true end, [cmd.USER_SESSION_RECREATE] = function (self, tree) return self:object(tree, "q", "parser") end, [cmd.USER_SESSION_REJOIN] = function (self, tree) return true end, [cmd.SERVER_GET_SESSIONS] = function (self, tree) return true end, [cmd.USER_GET_SESSIONS] = function (self, tree) return self:server_sessions(tree) end, [cmd.SERVER_CHECKSUM] = function (self, tree) return self:object(tree, "w", "checksum") end, [cmd.LAN_PARSER] = function (self, tree) return self:object(tree, "jp", "parser_id", "parser") end, [cmd.LAN_CLIENT_INFO] = function (self, tree) if not self:object(tree, "wwbi1411", "player", "nickname", "spectator", "id", "team", "score", "field_1C", "field_1D") then return end names.client[self.result.id] = strip_color(self.result.nickname) return true end, [0x0065] = function (self, tree) return self:object(tree, "wc", "password", cmd.LAN_CLIENT_INFO) end, [0x0066] = function (self, tree) return self:object(tree, "c", cmd.LAN_CLIENT_INFO) end, [cmd.LAN_SERVER_INFO] = function (self, tree) return self:object(tree, "ww44wb1b4", "gamename", "mapname", "max_players", "protocol_ver", "host", "secured", "battlefield", "fog_of_war", "money") end, [0x00C9] = function (self, tree) if not self:object(tree, "ic", "id_master", cmd.LAN_SERVER_INFO) then return end return self:clients(tree, "ic", "id", cmd.LAN_CLIENT_INFO) end, [cmd.LAN_RECORD] = function (self, tree) self.position = self.position + self:remain() tree:add(self.range, ("Data: %d bytes"):format(self.range:len())) return true end, }, { __call = function (reader, range) return setmetatable( { range = range, position = 0, result = {}, }, { __index = reader, } ) end, }) local Cossacks3 = Proto("cossacks3", "Cossacks 3") Cossacks3.fields.code = ProtoField.uint16("cossacks3.code", "Command code", base.HEX) Cossacks3.fields.command = ProtoField.string("cossacks3.command", "Command name") Cossacks3.fields.id_from = ProtoField.uint16("cossacks3.id_from", "ID from", base.DEC) Cossacks3.fields.id_to = ProtoField.uint16("cossacks3.id_to", "ID to", base.DEC) Cossacks3.dissector = function (range, pinfo, root) pinfo.cols.protocol = "cossacks3" pinfo.cols.info = "" function reassemble_hint() local hint = "Edit→Preferences→Protocols→TCP→Allow subdissector to reassemble TCP streams" pinfo.cols.info = ("%s%s"):format(pinfo.cols.info, hint) root:add(Cossacks3, range(), ("Cossacks 3 [%s]"):format(hint)) end while range:len() > 4 do local r_length = range(0, 4) local length = r_length:le_uint() local pdu_length = 4 + 2 + 4 + 4 + length if range:len() < pdu_length then pinfo.desegment_len = pdu_length - range:len() reassemble_hint() return nil end local r_command = range(4, 2) local command = r_command:le_uint() local command_name = names.command:raw(command) or ("0x%04X"):format(command) local r_id_from = range(6, 4) local id_from = r_id_from:le_uint() local r_id_to = range(10, 4) local id_to = r_id_to:le_uint() pinfo.cols.info = ("%s[%s] %d → %d "):format(pinfo.cols.info, command_name, id_from, id_to) local tree = root:add(Cossacks3, range(0, pdu_length), ("Cossacks 3 [%s] From: %s, To: %s, Length: %d bytes") :format(command_name, names.client:raw(id_from) or id_from, names.client:raw(id_to) or id_to, pdu_length)) tree:add(r_length, ("Payload length: %d bytes"):format(length)) tree:add(Cossacks3.fields.code, r_command, command) tree:add(Cossacks3.fields.command, r_command, names.command:raw(command) or "UNKNOWN") tree:add(Cossacks3.fields.id_from, r_id_from, id_from):append_text(" (" .. names.client[id_from] .. ")") tree:add(Cossacks3.fields.id_to, r_id_to, id_to):append_text(" (" .. names.client[id_to] .. ")") if (length > 0) and reader[command] then local rr = reader(range(14, length)) rr.result.code = command rr.result.id_from = id_from rr.result.id_to = id_to if not rr[command](rr, tree) then local msg = "Read error" tree:add(range, msg) error(msg) elseif rr:remain() > 0 then local msg = "Unknown data" tree:add(rr.range(rr.position), msg) error(msg) end end if range:len() - pdu_length == 0 then break end range = range(pdu_length) end return nil end DissectorTable.get("tcp.port"):add(31523, Cossacks3)
--「A」細胞組み換え装置 function c91231901.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c91231901.target) e1:SetOperation(c91231901.activate) c:RegisterEffect(e1) --to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(91231901,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) e2:SetCost(aux.bfgcost) e2:SetTarget(c91231901.thtg) e2:SetOperation(c91231901.thop) c:RegisterEffect(e2) end c91231901.counter_add_list={0x100e} function c91231901.filter(c) return c:GetLevel()>0 and c:IsSetCard(0xc) and c:IsAbleToGrave() end function c91231901.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x100e,1) and Duel.IsExistingMatchingCard(c91231901.filter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x100e,1) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0x100e,1) end function c91231901.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c91231901.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then local sg=g:GetFirst() if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and sg:IsLocation(LOCATION_GRAVE) then local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then tc:AddCounter(0x100e,sg:GetLevel()) end end end end function c91231901.thfilter(c) return c:IsSetCard(0xc) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function c91231901.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c91231901.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c91231901.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c91231901.thfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end
checkPlayer = function(xPlayer) if xPlayer.get('linventory') ~= true then Citizen.Wait(1500) count = 0 while true do if count > 3 then return false end Citizen.Wait(1000) end count = count + 1 else return true end end getInventoryItem = function(xPlayer, name, metadata) if checkPlayer(xPlayer) ~= true then return end if name then local xItem = Items[name] if not xItem then print(('^1[error]^7 %s does not exist'):format(name)) return end xItem.count = 0 for k, v in pairs(Inventories[xPlayer.source].inventory) do if v.name == name then if not v.metadata then v.metadata = {} end if not metadata or is_table_equal(v.metadata, metadata) then xItem.count = xItem.count + v.count end end end return xItem end return end exports('getInventoryItem', getInventoryItem) addInventoryItem = function(xPlayer, item, count, metadata, slot) if checkPlayer(xPlayer) ~= true then return end local xItem = Items[item] if xPlayer and xItem and count > 0 then local isWeapon = item:find('WEAPON_') if metadata == 'setname' then metadata = {description = xPlayer.getName()} elseif not isWeapon then metadata = setMetadata(metadata) end local toSlot, existing if slot then slot = getPlayerSlot(xPlayer, slot, item, metadata).slot else for i=1, Config.PlayerSlots do if xItem.stackable and Inventories[xPlayer.source].inventory[i] and Inventories[xPlayer.source].inventory[i].name == item and is_table_equal(Inventories[xPlayer.source].inventory[i].metadata, metadata) then toSlot = i existing = true break elseif not toSlot and Inventories[xPlayer.source].inventory[i] == nil then toSlot = i existing = false end end slot = toSlot end if isWeapon then xItem.stackable = false if Config.Throwable[item] then metadata = {throwable=1} xItem.stackable = true elseif Config.Melee[item] or Config.Miscellaneous[item] then count = 1 metadata = {} if not metadata.durability then metadata.durability = 100 end else count = 1 if type(metadata) ~= 'table' then metadata = {} end if not metadata.durability then metadata.durability = 100 end if xItem.ammoType then metadata.ammo = 0 end if not metadata.components then metadata.components = {} end if metadata.registered ~= false then metadata.registered = xPlayer.getName() metadata.serial = GenerateSerial(metadata.serial) end end Inventories[xPlayer.source].inventory[slot] = {name = item, label = xItem.label, weight = xItem.weight, slot = slot, count = count, description = xItem.description, metadata = metadata, stackable = xItem.stackable, closeonuse = true} if xItem.ammoType then Inventories[xPlayer.source].inventory[slot].ammoType = xItem.ammoType end if xItem.weight > 0 or xItem.name:find('money') then updateWeight(xPlayer) end ItemNotify(xPlayer, Inventories[xPlayer.source].inventory[slot], count, slot, _U('added')) elseif item:find('identification') then count = 1 if next(metadata) == nil then metadata = {} metadata.type = xPlayer.getName() metadata.description = GetPlayerIdentification(xPlayer) end local added = count if existing then count = Inventories[xPlayer.source].inventory[slot].count + count end Inventories[xPlayer.source].inventory[slot] = {name = item, label = xItem.label, weight = xItem.weight, slot = slot, count = count, description = xItem.description, metadata = metadata, stackable = xItem.stackable, closeonuse = true} if xItem.weight > 0 or xItem.name:find('money') then updateWeight(xPlayer) end ItemNotify(xPlayer, Inventories[xPlayer.source].inventory[slot], added, slot, _U('added')) elseif slot then local added = count if existing then count = Inventories[xPlayer.source].inventory[slot].count + count end Inventories[xPlayer.source].inventory[slot] = {name = item, label = xItem.label, weight = xItem.weight, slot = slot, count = count, description = xItem.description, metadata = metadata or {}, stackable = xItem.stackable, closeonuse = xItem.closeonuse} if xItem.weight > 0 or xItem.name:find('money') then updateWeight(xPlayer) end ItemNotify(xPlayer, Inventories[xPlayer.source].inventory[slot], added, slot, _U('added')) end if slot then TriggerClientEvent('linden_inventory:refreshInventory', xPlayer.source, Inventories[xPlayer.source]) end end end exports('addInventoryItem', addInventoryItem) removeInventoryItem = function(xPlayer, item, count, metadata, slot) if checkPlayer(xPlayer) ~= true then return end local xItem = Items[item] if xPlayer and xItem and count > 0 then if metadata then metadata = setMetadata(metadata) end if slot and Inventories[xPlayer.source].inventory[slot].count == count and Inventories[xPlayer.source].inventory[slot].name == xItem.name then ItemNotify(xPlayer, Inventories[xPlayer.source].inventory[slot], count, slot, _U('removed')) Inventories[xPlayer.source].inventory[slot] = nil if xItem.weight > 0 or xItem.name:find('money') then updateWeight(xPlayer) end TriggerClientEvent('linden_inventory:refreshInventory', xPlayer.source, Inventories[xPlayer.source]) elseif slot and Inventories[xPlayer.source].inventory[slot].count > count and Inventories[xPlayer.source].inventory[slot].name == xItem.name then local newCount = Inventories[xPlayer.source].inventory[slot].count - count ItemNotify(xPlayer, Inventories[xPlayer.source].inventory[slot], count, slot, _U('removed')) Inventories[xPlayer.source].inventory[slot] = {name = item, label = xItem.label, weight = xItem.weight, slot = slot, count = newCount, description = xItem.description, metadata = Inventories[xPlayer.source].inventory[slot].metadata, stackable = xItem.stackable, closeonuse = xItem.closeonuse} if xItem.weight > 0 or xItem.name:find('money') then updateWeight(xPlayer) end TriggerClientEvent('linden_inventory:refreshInventory', xPlayer.source, Inventories[xPlayer.source]) else local itemSlots, totalCount = getInventoryItemSlots(xPlayer, item, metadata) if itemSlots and totalCount > 0 then if count > totalCount then count = totalCount end local removed, total = 0, count for k, v in pairs(itemSlots) do -- k = slot, v = count if removed < total then if v == count then removed = total Inventories[xPlayer.source].inventory[k] = nil elseif v > count then removed = total count = v - count Inventories[xPlayer.source].inventory[k] = {name = item, label = xItem.label, weight = xItem.weight, slot = k, count = count, description = xItem.description, metadata = Inventories[xPlayer.source].inventory[k].metadata, stackable = xItem.stackable, closeonuse = xItem.closeonuse} else -- v < count removed = v count = count - v Inventories[xPlayer.source].inventory[k] = nil end end end if xItem.weight > 0 or xItem.name:find('money') then updateWeight(xPlayer) end ItemNotify(xPlayer, xItem, removed, itemSlots, _U('removed')) TriggerClientEvent('linden_inventory:refreshInventory', xPlayer.source, Inventories[xPlayer.source]) end end end end exports('removeInventoryItem', removeInventoryItem) setInventoryItem = function(xPlayer, name, count, metadata) if checkPlayer(xPlayer) ~= true then return end local item = getInventoryItem(xPlayer, name, metadata) if item and count >= 0 then count = ESX.Math.Round(count) if count > item.count then count = count - item.count addInventoryItem(xPlayer, item.name, count, metadata, false) else count = item.count - count removeInventoryItem(xPlayer, item.name, count, metadata, false) end end end exports('setInventoryItem', setInventoryItem) updateWeight = function(xPlayer, force) local newWeight = getWeight(xPlayer) if force or newWeight ~= Inventories[xPlayer.source].weight then Inventories[xPlayer.source].weight = newWeight TriggerClientEvent('linden_inventory:updateStorage', xPlayer.source, {newWeight, Inventories[xPlayer.source].maxWeight, Inventories[xPlayer.source].slots}) end SyncAccounts(xPlayer, 'money') SyncAccounts(xPlayer, 'black_money') end getWeight = function(xPlayer) local weight = 0 if Inventories[xPlayer.source] then for k, v in pairs(Inventories[xPlayer.source].inventory) do weight = weight + (v.weight * v.count) end end return weight end exports('getWeight', getWeight) getMaxWeight = function(xPlayer) if not Inventories[xPlayer.source] then return ESX.GetConfig().MaxWeight else return Inventories[xPlayer.source].maxWeight end end exports('getMaxWeight', getMaxWeight) setMaxWeight = function(xPlayer, newWeight) Inventories[xPlayer.source].maxWeight = newWeight end exports('setMaxWeight', setMaxWeight) canCarryItem = function(xPlayer, name, count, metadata) if checkPlayer(xPlayer) ~= true then return end local xItem = Items[name] if xItem then local freeSlot = false local itemSlots, totalCount, emptySlots = getInventoryItemSlots(xPlayer, name, metadata) if #itemSlots > 0 or emptySlots > 0 then if xItem.weight == 0 then return true end if count == nil then count = 1 end local curWeight, itemWeight = Inventories[xPlayer.source].weight, xItem.weight local newWeight = curWeight + (itemWeight * count) return newWeight <= Inventories[xPlayer.source].maxWeight end end return false end exports('canCarryItem', canCarryItem) canSwapItem = function(xPlayer, firstItem, firstItemCount, testItem, testItemCount) if checkPlayer(xPlayer) ~= true then return end local curWeight = Inventories[xPlayer.source].weight local firstItemObject = getInventoryItem(xPlayer, firstItem) local testItemObject = getInventoryItem(xPlayer, testItem) if firstItemObject.count >= firstItemCount then local weightWithoutFirstItem = curWeight - (firstItemObject.weight * firstItemCount) local weightWithTestItem = weightWithoutFirstItem + (testItemObject.weight * testItemCount) return weightWithTestItem <= Inventories[xPlayer.source].maxWeight end return false end exports('canSwapItem', canSwapItem) getPlayerInventory = function(xPlayer, minimal) if Inventories[xPlayer.source] then local inventory = {} for k, v in pairs(Inventories[xPlayer.source].inventory) do if v.count > 0 then if minimal and v.metadata and next(v.metadata) == nil then v.metadata = nil end inventory[#inventory+1] = { name = v.name, count = v.count, slot = k, metadata = v.metadata } end end return inventory end end exports('getPlayerInventory', getPlayerInventory) getPlayerSlot = function(xPlayer, slot, item, metadata) if checkPlayer(xPlayer) ~= true then return end if slot > Config.PlayerSlots then return nil end local getSlot = Inventories[xPlayer.source].inventory[slot] if item and getSlot and getSlot.name ~= item then slot = nil end if slot and metadata and not is_table_equal(getSlot.metadata, metadata) then slot = nil end if getSlot then return getSlot end return {} end exports('getPlayerSlot', getPlayerSlot) getInventoryItemSlots = function(xPlayer, name, metadata) if checkPlayer(xPlayer) ~= true then return end local xItem = Items[name] if not xItem then print(('^1[error]^7 %s does not exist'):format(name)) return end local totalCount, slots, emptySlots = 0, {}, Config.PlayerSlots for k, v in pairs(Inventories[xPlayer.source].inventory) do emptySlots = emptySlots - 1 if v.name == name then if metadata and not v.metadata then v.metadata = {} end if not metadata or is_table_equal(v.metadata, metadata) then totalCount = totalCount + v.count slots[k] = v.count end end end return slots, totalCount, emptySlots end exports('getInventoryItemSlots', getInventoryItemSlots)
math.randomseed(os.time()) math.random(); math.random(); math.random() firstNames = {'Aachen', 'Aaliyah', 'Aaron', 'Abbas', 'Abbott', 'Abby', 'Abdul', 'Abe', 'Abidjan', 'Abigail', 'Abilene', 'Abner', 'Abraham', 'Abram', 'Absalom', 'Abuja', 'Abyssinia', 'Ac', 'Acevedo', 'Achaean', 'Achebe', 'Achernar', 'Acheson', 'Achilles', 'Aconcagua', 'Acosta', 'Acropolis', 'Acrux', 'Actaeon', 'Acton', 'Acts', 'Acuff', 'Ada', 'Addams', 'Adderley', 'Addie', 'Addison', 'Adela', 'Adele', 'Adeline', 'Aden', 'Adenauer', 'Adhara', 'Adidas', 'Adirondack', 'Adirondacks', 'Adkins', 'Adler', 'Adolf', 'Adolfo', 'Adolph', 'Adonis', 'Adonises', 'Adrian', 'Adriatic', 'Adrienne', 'Advent', 'Advil', 'Aegean', 'Aelfric', 'Aeneas', 'Aeneid', 'Aeolus', 'Aeroflot', 'Aeschylus', 'Aesculapius', 'Aesop', 'Afghan', 'Africa', 'Afrikaans', 'Afrikaner', 'Afrikaners', 'Afro', 'Afros', 'Ag'} surNames = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'} request = function() rangeFirstNames = table.getn(firstNames) - 1 rangeSurNames = table.getn(surNames) - 1 path = "/public/search-users?firstName=" .. firstNames[math.random(rangeFirstNames)] .. "&surName=" .. surNames[math.random(rangeSurNames)] -- Return the request object with the current URL path return wrk.format('GET', path, {['Host'] = 'localhost'}) end logfile = io.open("wrk-" .. os.date('%Y-%m-%d_%H_%M_%S') .. ".log", "a+"); response = function(status, header, body) logfile:write("status:" .. status .. "\n" .. body .. "\n-------------------------------------------------\n"); end
-- Requirements summary: -- [PolicyTableUpdate] "timeout" countdown start -- -- Description: -- SDL must forward OnSystemRequest(request_type=PROPRIETARY, url, appID) with encrypted PTS -- snapshot as a hybrid data to mobile application with <appID> value. "fileType" must be -- assigned as "JSON" in mobile app notification. -- 1. Used preconditions -- SDL is built with "-DEXTENDED_POLICY: PROPRIETARY" flag -- Application is registered. -- PTU is requested. -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL->HMI:SDL.PolicyUpdate(file, timeout, retry[]) -- HMI -> SDL: SDL.GetURLs (<service>) -- HMI->SDL: BasicCommunication.OnSystemRequest ('url', requestType:PROPRIETARY, appID="default") -- SDL->app: OnSystemRequest ('url', requestType:PROPRIETARY, fileType="JSON", appID) -- 2. Performed steps -- Do not send SystemRequest from <app_ID> -- -- Expected result: -- SDL waits for SystemRequest response from <app ID> within 'timeout' value, if no obtained, -- it starts retry sequence --------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local testCasesForPolicyTableSnapshot = require('user_modules/shared_testcases/testCasesForPolicyTableSnapshot') --[[ Local Functions ]] local function timestamp() local f = io.popen("date +%s") local o = f:read("*all") f:close() return (o:gsub("\n", "")) end --[[ General Precondition before ATF start ]] commonFunctions:SDLForceStop() commonSteps:DeleteLogsFileAndPolicyTable() --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 --[[ General Settings for configuration ]] Test = require('connecttest') require('cardinalities') require('user_modules/AppTypes') --[[ Test ]] commonFunctions:newTestCasesGroup("Test") function Test:TestStep_Sending_PTS_to_mobile_application() local time_system_request = {} local is_test_fail = false local RequestId_GetUrls = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) EXPECT_HMIRESPONSE(RequestId_GetUrls) :Do(function() self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest",{ requestType = "PROPRIETARY", fileName = "PolicyTableUpdate" }) --first retry sequence local seconds_between_retries = {} local timeout_pts = testCasesForPolicyTableSnapshot:get_data_from_PTS("module_config.timeout_after_x_seconds") for i = 1, #testCasesForPolicyTableSnapshot.pts_seconds_between_retries do seconds_between_retries[i] = testCasesForPolicyTableSnapshot.pts_seconds_between_retries[i].value end local time_wait = (timeout_pts*seconds_between_retries[1]*1000 + 10000) local function verify_retry_sequence() local time_1 = timestamp() -- time PolicyUpdate local time_2 = time_system_request[#time_system_request] local timeout = (time_1 - time_2) if( ( timeout > (timeout_pts + 2) ) or ( timeout < (timeout_pts - 2) )) then is_test_fail = true commonFunctions:printError("ERROR: timeout for first retry sequence is not as expected: "..timeout_pts.." sec (5 sec tolerance). real: "..timeout.." sec") else print("timeout is as expected: "..timeout_pts.." sec. real: "..timeout) end end EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY", fileType = "JSON"}) :Do(function() time_system_request[#time_system_request + 1] = timestamp() end) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") :Do(function(exp,data) if(exp.occurences > 1) then is_test_fail = true commonFunctions:printError("ERROR: PTU sequence is restarted again!") end verify_retry_sequence() self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) :Timeout(time_wait) end) if(is_test_fail == true) then self:FailTestCase("Test is FAILED. See prints.") end end --[[ Postconditions ]] commonFunctions:newTestCasesGroup("Postconditions") function Test.Postcondition_Force_Stop_SDL() StopSDL() end return Test
local ores = { ["omnite"] = { guft_tier = 1, guft_rarity = 1, }, ["infinite-omnite"] = { guft_tier = 1, guft_rarity = 5, } } if not settings.startup["guft-enableores-omni"].value then ores["omnite"] = false ores["infinite-omnite"] = false end if settings.startup["guft-enableores-base"].value then ores["omnite"].guft_rarity = ores["omnite"].guft_rarity + 1 end if settings.startup["guft-enableores-angel"].value and mods["angelsrefining"] then ores["omnite"].guft_rarity = ores["omnite"].guft_rarity + 1 end if settings.startup["guft-enableores-bob"].value and mods["bobores"] then ores["omnite"].guft_rarity = ores["omnite"].guft_rarity + 2 end if not settings.startup["guft-enableores-base"].value and not settings.startup["guft-enableores-bob"].value and not settings.startup["guft-enableores-angel"].value then ores["omnite"].guft_start = true end return ores
---@class ShipMake_RecievePopup 显示产物 弹框 ---@field listProducts table<ShipMgr_Products> local M = DClass("ShipMake_RecievePopup", BaseWindow) _G.ShipMake_RecievePopup = M function M:ctor(...) local data = ... self.listProducts = data[1] end function M:onInit() self.coverCallBack = self.close self:onInitUI() end function M:onInitUI() if not self.listProducts then self:close() return end self:handleShowProducts() self.nodes.text_High.text = string.format("·高级 %d", self.rates[3]) self.nodes.text_Middle.text = string.format("·中级 %d", self.rates[2]) self.nodes.text_Low.text = string.format("·低级 %d", self.rates[1]) local listShowItems = {} local listShow = self.listShow self.nodes.content:InitPool( #listShow, function(index, obj) ---@type ShipMgr_Products local data = listShow[index] local idItem = data.id local numItem = data.num local item = table.findOne( listShowItems, function(d) return d.id == data.id end ) if not item then item = {} item.id = data.id item.num = data.num item.nodes = {} item.nodes.imgIcon = obj.transform:Find("Image_Icon"):GetComponent(typeof(Image)) item.nodes.imgQuality = obj.transform:Find("Image_Quality"):GetComponent(typeof(Image)) item.nodes.textCount = obj.transform:Find("Text_Count"):GetComponent(typeof(Text)) item.nodes.btn = obj.transform:GetComponent(typeof(Button)) self:addEventHandler( item.nodes.btn.onClick, function() MsgCenter.sendMessage(Msg.ITEM_SHOWINFO, data.id) end ) table.insert(listShowItems, item) end local cfg = Config.Item[data.id] BagManager.setItemIcon(self, item.nodes.imgIcon, data.id) EquipManager:setQuility(self, item.nodes.imgQuality, cfg.star, EquipManager.STAGE_TYPE.BG_CUBE) item.nodes.textCount.text = data.num end ) end function M:handleShowProducts() self.rates = {} self.listShow = {} for type = 1, 3 do --设置不同类型比例 self.rates[type] = 0 end if self.listProducts then for key, value in pairs(self.listProducts) do self.rates[value.grade] = value.num for k, v in pairs(value.product) do --归总道具信息 local dataContains = table.findOne( self.listShow, function(a) return a.id == v.id end ) if dataContains then dataContains.num = dataContains.num + v.num else table.insert(self.listShow, v) end end end return {} end end
return Device { strManufacturer = "TeenyUSB", strProduct = "TeenyUSB CMSIS-DAP V2", strSerial = "TUSB123456HS", idVendor = 0x0d28, idProduct = 0x0204, bcdUSB = 0x200, prefix = "DAPV2", Config { Interface{ strInterface = "CMSIS-DAP v2", -- DAP link GUID extDesc=WinUSB("{CDB3B5AD-293B-4663-AA36-1AAE46463776}"), bInterfaceClass = 0xff, bInterfaceSubClass = 0x00, -- Unknown issue, On Win10 -- if bcdUSB is 0x210, and High speed port used -- the max packet size must not small than 512, -- DO NOT change the Endpoint sequence, PyOCD will check it EndPoint(OUT(1), Bulk, 512), EndPoint(IN(2), Bulk, 512), }, } }
local A while 1 do local a,b=read("*w","*w") if a==nil then break end if a~=A then A=a write("\n",a,":\n") end write(b," ") end
SKILL.name = "Firestorm" SKILL.LevelReq = 10 SKILL.SkillPointCost = 3 SKILL.Incompatible = { } SKILL.RequiredSkills = { } SKILL.icon = "vgui/skills/Dow2_sm_explosive_cannon_barrage.png" SKILL.category = "Primaris"-- Common Passives, Warrior, Stealth, Lore of Light, Dark Magic SKILL.slot = "MELEE" -- ULT, RANGED, MELEE, AOE, PASSIVE SKILL.class = { "aggressor", } SKILL.toggle = false SKILL.desc = [[ A toggle ability, you have increased Fire Rate and Accuracy though you're locked immobile. - Inspired by Sgtteddybear Class Restriction: Aggressor Ability Slot: 1 Level Requirement: ]] .. SKILL.LevelReq .. [[ Skill Point Cost:]] .. SKILL.SkillPointCost .. [[ ]] SKILL.coolDown = 1 local function ability( SKILL, ply ) local nospam = ply:GetNWBool( "nospamMelee" ) // nospamRanged, nospamUlt, nospamAOE, nospamMelee local active = ply:GetNWBool( "meleeActive") // meleeActive, rangedActive, aoeActive, ultActive if (nospam) then if timer.Exists(ply:SteamID().."nospamMelee") then return end timer.Create(ply:SteamID().."nospamMelee", SKILL.coolDown, 1, function() ply:SetNWBool( "nospamMelee", false ) end) return end local RunSpeed = ply:GetNWFloat("runSpeed") local WalkSpeed = ply:GetNWFloat("walkSpeed") local weapon = ply:GetActiveWeapon() local weaponTable = weapon:GetTable() local weaponBase = weaponTable.Base local fireRate = 100 local recoil = 0.5 if !(active) then if weaponBase == "tfa_gun_base" and (weapon) then weapon.trueRecoil = weaponTable.Primary.KickUp weapon.trueFireRate = weaponTable.Primary.RPM weaponTable.Primary.RPM = weaponTable.Primary.RPM + fireRate weaponTable.Primary.KickUp = math.max(weaponTable.Primary.KickUp - recoil,0) weapon:ClearStatCache("Primary.RPM") weapon:ClearStatCache("Primary.KickUp") ply:SetRunSpeed(1) ply:SetWalkSpeed(1) ply:SetNWBool( "meleeActive", true ) SKILL.toggle = true end else if weaponBase == "tfa_gun_base" and (weapon) then weaponTable.Primary.RPM = weapon.trueFireRate weaponTable.Primary.KickUp = weapon.trueRecoil weapon:ClearStatCache("Primary.RPM") weapon:ClearStatCache("Primary.KickUp") ply:SetRunSpeed(RunSpeed) ply:SetWalkSpeed(WalkSpeed) ply:SetNWBool( "meleeActive", false ) SKILL.toggle = false end end if (SERVER) then ply:SetNWBool( "nospamMelee", true ) net.Start( "MeleeActivated" ) // RangedActivated, UltActivated, AOEActivated, MeleeActivated net.Send( ply ) if timer.Exists(ply:SteamID().."nospamMelee") then return end timer.Create(ply:SteamID().."nospamMelee", SKILL.coolDown, 1, function() ply:SetNWBool( "nospamMelee", false ) end) end end SKILL.ability = ability
local composer = require( "composer" ) local fx = require( "com.ponywolf.ponyfx" ) local tiled = require( "com.ponywolf.ponytiled" ) local physics = require( "physics" ) local json = require( "json" ) local scene = composer.newScene() local heartBar = require( "scenes.game.lib.health" ) local inventory = require( "scenes.game.lib.inventory" ) local widget = require( "widget" ) local maskValue = 2.75 local sceneGroup -- local variables local map, player, lives -- ----------------------------------------------------------------------------------- -- Code outside of the scene event functions below will only be executed ONCE unless -- the scene is removed entirely (not recycled) via "composer.removeScene()" -- ----------------------------------------------------------------------------------- -- --------- -- Function to scroll the map local function enterFrame( event ) local elapsed = event.time -- Easy way to scroll a map based on a character if player and player.x and player.y and not player.isDead then local x, y = player:localToContent( 0, 0 ) x, y = display.contentCenterX - x, display.contentCenterY - y map.x, map.y = map.x + x, map.y + y sceneGroup.maskX = display.contentCenterX sceneGroup.maskY = display.contentCenterY sceneGroup.maskScaleX = player.lightValue sceneGroup.maskScaleY = player.ligthValue end end local function torchGoingOut() if player.lightValue > 0.25 then player.lightValue = player.lightValue - .01 end end -------------------------------------------------------------------------- -- Scene event functions -- ----------------------------------------------------------------------------------- -- create() function scene:create( event ) sceneGroup = self.view -- Code here runs when the scene is first created but has not yet appeared on screen -- Start physics physics.start() physics.setGravity( 0, 32 ) -- load the map local filename = event.params.map or "scenes/game/maps/level1.json" local mapData = json.decodeFile( system.pathForFile( filename, system.ResourceDirectory ) ) if (mapData) then map = tiled.new( mapData, "scenes/game/maps" ) map.xScale, map.yScale = 0.85, 0.85 -- Find our player map.extensions = "scenes.game.lib." map:extend( "player" ) player = map:findObject( "player" ) player.filename = filename local mask = graphics.newMask( "particle.png" ) timer.performWithDelay( 736, torchGoingOut, 0 ) -- Create the widget local btnLeft = widget.newButton( { left = 50, top = display.contentHeight - 100, id = "left", fontSize = 24, label = "<<", width = 150, onPress = player.btnPressLeft, onRelease = player.btnReleaseLeft, shape = "roundedRect" } ) local btnRight = widget.newButton( { left = 210, top = display.contentHeight - 100, id = "right", label = ">>", fontSize = 24, width = 150, onPress = player.btnPressRight, onRelease = player.btnReleaseRight, shape = "roundedRect" } ) local btnJump = widget.newButton( { left = display.contentWidth -160, top = display.contentHeight - 100, id = "up", label = "^", fontSize = 24, width = 150, onPress = player.btnPressJump, shape = "roundedRect" } ) local btnDrop = widget.newButton( { left = display.contentWidth -370, top = display.contentHeight - 100, id = "down", label = "drop", fontSize = 24, width = 150, onPress = player.btnPressDown, shape = "roundedRect" } ) -- enemies map:extend("fly", "key", "ghost", "matches") -- Add our hearts module lives = heartBar.new() lives.x = 48 lives.y = display.screenOriginY + lives.contentHeight / 2 + 16 -- Add inventory itemsBar = inventory.new() itemsBar.x = display.contentWidth - 128 itemsBar.y = display.screenOriginY + itemsBar.contentHeight / 2 + 32 itemsBar.scene = self player.items = itemsBar player.lives = lives sceneGroup:setMask( mask ) sceneGroup.maskX = player.x sceneGroup.maskY = player.y sceneGroup.maskScaleX = maskValue sceneGroup.maskScaleY = maskValue scene.player = player self.map = map sceneGroup:insert( map ) end end -- show() function scene:show( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then -- Code here runs when the scene is still off screen (but is about to come on screen) fx.fadeIn() -- Fade up from black Runtime:addEventListener( "enterFrame", enterFrame ) elseif ( phase == "did" ) then -- Code here runs when the scene is entirely on screen end end function scene:insertIntoMap(imageName, x, y, type, name) newObject = display.newImageRect( self.map, imageName, 64, 64) newObject.type = type newObject.name = name newObject.x = player.x + x newObject.y = player.y + y -- physics.addBody(newObject, "static", { isSensor=true }) physics.addBody(newObject, "dynamic") end -- hide() function scene:hide( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then -- Code here runs when the scene is on screen (but is about to go off screen) elseif ( phase == "did" ) then -- Code here runs immediately after the scene goes entirely off screen Runtime:removeEventListener( "enterFrame", enterFrame ) end end -- destroy() function scene:destroy( event ) local sceneGroup = self.view -- Code here runs prior to the removal of scene's view end -- ----------------------------------------------------------------------------------- -- Scene event function listeners -- ----------------------------------------------------------------------------------- scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) -- ----------------------------------------------------------------------------------- return scene
----------------------------------- -- Area: Windurst Walls -- NPC: Koru-Moru -- Starts & Ends Quest: Star Struck -- Involved in Quest: Making the Grade, Riding on the Clouds -- !pos -120 -6 124 239 ----------------------------------- local ID = require("scripts/zones/Windurst_Walls/IDs") require("scripts/globals/keyitems") require("scripts/globals/settings") require("scripts/globals/quests") require("scripts/globals/titles") ----------------------------------- function onTrade(player,npc,trade) local qStarStruck = player:getQuestStatus(WINDURST,tpz.quest.id.windurst.STAR_STRUCK); local count = trade:getItemCount(); if (trade:hasItemQty(544,1) and count == 1 and trade:getGil() == 0) then if (player:getQuestStatus(WINDURST,tpz.quest.id.windurst.MAKING_THE_GRADE) == QUEST_ACCEPTED) then if (player:getCharVar("QuestMakingTheGrade_prog") == 1) then player:startEvent(285); -- MAKING THE GRADE: Turn in Test Answer & Told to go back to Fuepepe & Chomoro else player:startEvent(287); -- MAKING THE GRADE: Have test answers but not talked/given to Fuepepe end end elseif (trade:hasItemQty(584,1) and count == 1 and trade:getGil() == 0) then player:startEvent(199); elseif (qStarStruck == QUEST_ACCEPTED and trade:hasItemQty(582,1) and count == 1 and trade:getGil() == 0) then player:startEvent(211); elseif (trade:hasItemQty(1127,1) and trade:getItemCount() == 1) then -- Trade Kindred seal if (player:getQuestStatus(JEUNO,tpz.quest.id.jeuno.RIDING_ON_THE_CLOUDS) == QUEST_ACCEPTED and player:getCharVar("ridingOnTheClouds_4") == 4) then player:setCharVar("ridingOnTheClouds_4",0); player:tradeComplete(); player:addKeyItem(tpz.ki.SPIRITED_STONE); player:messageSpecial(ID.text.KEYITEM_OBTAINED,tpz.ki.SPIRITED_STONE); end elseif (trade:hasItemQty(16511,1) and count == 1 and trade:getGil() == 0) then if (player:getQuestStatus(WINDURST,tpz.quest.id.windurst.BLAST_FROM_THE_PAST) == QUEST_ACCEPTED) then player:startEvent(224); -- Complete quest! else player:startEvent(225); -- not the shell end elseif (trade:hasItemQty(829,1) and count == 1 and trade:getGil() == 0) then if (player:getQuestStatus(WINDURST,tpz.quest.id.windurst.THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED) then player:startEvent(349); player:tradeComplete(); player:setCharVar("rootProblem",2); end elseif (trade:hasItemQty(17299,4) and count == 4 and trade:getGil() == 0) then -- trade:getItemCount() is apparently checking total of all 8 slots combined. Could have sworn that wasn't how it worked before. if (player:getQuestStatus(WINDURST,tpz.quest.id.windurst.CLASS_REUNION) == QUEST_ACCEPTED and player:getCharVar("ClassReunionProgress") == 2) then player:startEvent(407); -- now Koru remembers something that you need to inquire his former students. end; end; end; function onTrigger(player,npc) local qStarStruck = player:getQuestStatus(WINDURST,tpz.quest.id.windurst.STAR_STRUCK); local blastFromPast = player:getQuestStatus(WINDURST,tpz.quest.id.windurst.BLAST_FROM_THE_PAST); local blastProg = player:getCharVar("BlastFromThePast_Prog"); local rootProblem = player:getQuestStatus(WINDURST,tpz.quest.id.windurst.THE_ROOT_OF_THE_PROBLEM); local ThePuppetMaster = player:getQuestStatus(WINDURST,tpz.quest.id.windurst.THE_PUPPET_MASTER); local ThePuppetMasterProgress = player:getCharVar("ThePuppetMasterProgress"); local ClassReunion = player:getQuestStatus(WINDURST,tpz.quest.id.windurst.CLASS_REUNION); local ClassReunionProgress = player:getCharVar("ClassReunionProgress"); local talk1 = player:getCharVar("ClassReunion_TalkedToFupepe"); local talk2 = player:getCharVar("ClassReunion_TalkedToFurakku"); local CarbuncleDebacle = player:getQuestStatus(WINDURST,tpz.quest.id.windurst.CARBUNCLE_DEBACLE); local CarbuncleDebacleProgress = player:getCharVar("CarbuncleDebacleProgress"); if (blastFromPast == QUEST_AVAILABLE and qStarStruck == QUEST_COMPLETED and player:getQuestStatus(WINDURST,tpz.quest.id.windurst.CLASS_REUNION) ~= QUEST_ACCEPTED and player:getFameLevel(WINDURST) >= 3 and player:needToZone() == false) then player:startEvent(214); elseif (blastFromPast == QUEST_ACCEPTED and blastProg >= 2) then player:startEvent(215); elseif (blastFromPast == QUEST_ACCEPTED) then player:startEvent(216); elseif (player:getQuestStatus(WINDURST,tpz.quest.id.windurst.MAKING_THE_GRADE) == QUEST_ACCEPTED) then local makingGradeProg = player:getCharVar("QuestMakingTheGrade_prog"); if (makingGradeProg == 0 and player:hasItem(544)) then player:startEvent(287); -- MAKING THE GRADE: Have test answers but not talked/given to Fuepepe elseif (makingGradeProg == 1) then player:startEvent(285); -- MAKING THE GRADE: Turn in Test Answer & Told to go back to Fuepepe & Chomoro elseif (makingGradeProg >= 2) then player:startEvent(286); -- MAKING THE GRADE: Reminder to go away else player:startEvent(193); end elseif (qStarStruck == QUEST_ACCEPTED) then player:startEvent(198); elseif ((qStarStruck == QUEST_AVAILABLE) and (ClassReunion ~= QUEST_ACCEPTED) and player:hasItem(584)) then player:startEvent(197); ---------------------------------------------------------- -- Carbuncle Debacle elseif (CarbuncleDebacle == QUEST_ACCEPTED and CarbuncleDebacleProgress == 1 or CarbuncleDebacleProgress == 2) then player:startEvent(416); -- go and see Ripapa elseif (CarbuncleDebacle == QUEST_ACCEPTED and CarbuncleDebacleProgress == 4) then player:startEvent(417); -- now go and see Agado-Pugado elseif (CarbuncleDebacle == QUEST_ACCEPTED and CarbuncleDebacleProgress == 5) then player:startEvent(418); -- Uran-Mafran must be stopped elseif (CarbuncleDebacle == QUEST_ACCEPTED and CarbuncleDebacleProgress == 7) then player:startEvent(419); -- ending cs elseif (ThePuppetMaster == QUEST_COMPLETED and ClassReunion == QUEST_COMPLETED and CarbuncleDebacle == QUEST_COMPLETED) then player:startEvent(420); -- new cs after all 3 SMN AFs done ---------------------------------------------------------- -- Class Reunion elseif (ClassReunion == QUEST_ACCEPTED and ClassReunionProgress == 1) then player:startEvent(412,0,450,17299,0,0,0,0,0); -- bring Koru 4 astragaloi elseif (ClassReunion == QUEST_ACCEPTED and ClassReunionProgress == 2) then player:startEvent(414,0,0,17299,0,0,0,0,0); -- reminder to bring 4 astragaloi elseif ((ClassReunion == QUEST_ACCEPTED and ClassReunionProgress >= 3) and (talk1 ~= 1 or talk2 ~= 1)) then player:startEvent(408); -- reminder to visit the students elseif (ClassReunion == QUEST_ACCEPTED and ClassReunionProgress == 6 and talk1 == 1 and talk2 == 1) then player:startEvent(410); -- ending cs elseif (ThePuppetMaster == QUEST_COMPLETED and ClassReunion == QUEST_COMPLETED) then player:startEvent(411); -- new cs after completed AF2 ---------------------------------------------------------- -- The Puppet Master elseif (ThePuppetMaster == QUEST_ACCEPTED and ThePuppetMasterProgress == 4) then player:startEvent(404); -- ending cs elseif (ThePuppetMaster == QUEST_COMPLETED and ClassReunion ~= 2) then player:startEvent(405); -- new cs after completed AF1 ---------------------------------------------------------- elseif (rootProblem == QUEST_ACCEPTED and player:getCharVar("rootProblem") == 1) then player:startEvent(348,0,829); else if (qStarStruck == QUEST_COMPLETED) then player:startEvent(213); else player:startEvent(193); end end end; function onEventUpdate(player,csid,option) end; function onEventFinish(player,csid,option) if (csid == 285) then -- Giving him KI from Principle player:tradeComplete(); player:addKeyItem(tpz.ki.TATTERED_TEST_SHEET); player:messageSpecial(ID.text.KEYITEM_OBTAINED,tpz.ki.TATTERED_TEST_SHEET); player:setCharVar("QuestMakingTheGrade_prog",2); elseif (csid == 211) then player:tradeComplete(); player:addItem(12502); player:messageSpecial(ID.text.ITEM_OBTAINED,12502); player:completeQuest(WINDURST,tpz.quest.id.windurst.STAR_STRUCK); player:needToZone(true); player:addFame(WINDURST,20); elseif (csid == 199) then player:tradeComplete(); player:messageSpecial(ID.text.GIL_OBTAINED,50); player:addGil(50); elseif (csid == 197 and option == 0) then player:addQuest(WINDURST,tpz.quest.id.windurst.STAR_STRUCK); elseif (csid == 214 and option == 0) then player:addQuest(WINDURST,tpz.quest.id.windurst.BLAST_FROM_THE_PAST); elseif (csid == 224) then player:tradeComplete(); player:setCharVar("BlastFromThePast_Prog",0); player:completeQuest(WINDURST,tpz.quest.id.windurst.BLAST_FROM_THE_PAST); player:addItem(17030); player:messageSpecial(ID.text.ITEM_OBTAINED,17030); player:addTitle(tpz.title.FOSSILIZED_SEA_FARER); player:addFame(WINDURST,30); player:needToZone(true); elseif (csid == 404) then if (player:getFreeSlotsCount() ~= 0) then player:addItem(17532); player:messageSpecial(ID.text.ITEM_OBTAINED,17532); player:completeQuest(WINDURST,tpz.quest.id.windurst.THE_PUPPET_MASTER); player:setCharVar("ThePuppetMasterProgress",0); player:needToZone(true); player:addFame(WINDURST,20); else player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED,17532); end; elseif (csid == 412) then player:delKeyItem(tpz.ki.CARBUNCLES_TEAR); player:setCharVar("ClassReunionProgress",2); elseif (csid == 407) then player:tradeComplete(); player:setCharVar("ClassReunionProgress",3); elseif (csid == 410) then if (player:getFreeSlotsCount() ~= 0) then player:addItem(14228); player:messageSpecial(ID.text.ITEM_OBTAINED,14228); player:completeQuest(WINDURST,tpz.quest.id.windurst.CLASS_REUNION); player:setCharVar("ClassReunionProgress",0); player:setCharVar("ClassReunion_TalkedToFurakku",0); player:setCharVar("ClassReunion_TalkedToFupepe",0); player:needToZone(true); player:addFame(WINDURST,40); else player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED,14228); end; elseif (csid == 416) then player:setCharVar("CarbuncleDebacleProgress",2); elseif (csid == 417) then player:setCharVar("CarbuncleDebacleProgress",5); player:addKeyItem(tpz.ki.DAZEBREAKER_CHARM); player:messageSpecial(ID.text.KEYITEM_OBTAINED,tpz.ki.DAZEBREAKER_CHARM); elseif (csid == 419) then if (player:getFreeSlotsCount() ~= 0) then player:addItem(12520); -- Evoker's Horn player:messageSpecial(ID.text.ITEM_OBTAINED,12520); player:addTitle(tpz.title.PARAGON_OF_SUMMONER_EXCELLENCE); player:completeQuest(WINDURST,tpz.quest.id.windurst.CARBUNCLE_DEBACLE); player:addFame(WINDURST,60); player:setCharVar("CarbuncleDebacleProgress",0); player:needToZone(true); else player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED,12520); end; end; end;
--!A cross-platform build utility based on Lua -- -- 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- Copyright (C) 2015-2020, TBOOX Open Source Group. -- -- @author ruki -- @file version.lua -- -- imports import("core.ui.log") import("core.ui.rect") import("core.ui.event") import("core.ui.textdialog") import("core.ui.application") -- the application local app = application() -- init app function app:init() -- init name application.init(self, "app") -- init background self:background_set("blue") -- disable color code output os.setenv("COLORTERM", "nocolor") -- get version info local version = os.iorun("xmake --version") -- init main dialog local dialog_main = textdialog:new("dialog.main", rect {1, 1, self:width() - 1, self:height() - 1}, "version info") dialog_main:text():text_set(version or "unknown version!") dialog_main:button_add("exit", "< Exit >", function (v) self:quit() end) self:insert(dialog_main) end -- main entry function main(...) app:run(...) end
local null_ls = require 'null-ls' local function has_executable(name) return function() return vim.fn.executable(name) > 0 end end local function has_file(name) return function(utils) return utils.root_has_file(name) end end local function has_any_file(names) return function(utils) for _, name in ipairs(names) do if utils.root_has_file(name) then return true end end return false end end local code_actions = null_ls.builtins.code_actions local diagnostics = null_ls.builtins.diagnostics local formatting = null_ls.builtins.formatting null_ls.setup { sources = { -- General code_actions.gitsigns, -- Vim diagnostics.vint.with { condition = has_any_file { '.vintrc.yml', '.vintrc' } }, -- Lua diagnostics.selene.with { condition = has_file 'selene.toml' }, formatting.stylua.with { condition = has_any_file { 'stylua.toml', '.stylua.toml' } }, -- Nix -- code_actions.statix.with({ condition = has_file("statix.toml") }), -- formatting.nixfmt.with({ condition = has_executable("nixfmt") }), -- Bash diagnostics.shellcheck.with { condition = has_file '.shellcheckrc' }, -- formatting.shfmt.with({ condition = has_file(".editorconfig") }), -- Fish formatting.fish_indent.with { condition = has_executable 'fish_indent' }, -- Python diagnostics.flake8.with { condition = has_file '.flake8' }, formatting.black.with { condition = has_file 'pyproject.toml' }, formatting.isort.with { condition = has_any_file { '.isort.cfg', 'pyproject.toml' } }, }, on_attach = require('my.plugins.lspconfig').on_attach, }
-- Decompiled using luadec 2.2 rev: for Lua 5.2 from https://github.com/viruscamp/luadec -- Command line: A:\Steam\twd-definitive\scripteditor-10-31-20\definitive_lighting_improvements\WDC_pc_WalkingDead201_data\BackwoodsStream_temp.lua -- params : ... -- function num : 0 , upvalues : _ENV local kScript = "BackwoodsStream" local kScene = "adv_backwoodsStream" local envMeshes = {} envMeshes.forest = {"obj_backwoodsStreamTileA", "obj_backwoodsStreamTileB", "obj_backwoodsStreamTileC", "obj_backwoodsStreamTileD", "obj_backwoodsStreamTileEnd", "ZombieWoodsA", "ZombieWoodsB", "ZombieWoodsC"} envMeshes.stream = {"adv_backwoodsStream_meshesA", "adv_backwoodsStream_meshesB", "adv_backwoodsStream_meshesC", "adv_backwoodsStream_meshesD", "adv_backwoodsStream_meshesE", "adv_backwoodsStream_meshesF", "adv_backwoodsStream_meshesG", "adv_backwoodsStream_meshesH", "adv_backwoodsStream_meshesI", "adv_backwoodsStream_meshesJ", "adv_backwoodsStream_meshesK", "adv_backwoodsStream_meshesL", "adv_backwoodsStream_meshesM", "obj_coolerFish", "obj_panelMetalBackwoodsStream", "obj_rockFormationBackwoodsStreamA", "obj_rockFormationBackwoodsStreamB", "obj_rockFormationBackwoodsStreamC", "obj_rockFormationBackwoodsStreamD", "obj_rockFormationBackwoodsStreamE", "obj_stonesStepping", "obj_coolerFish", "obj_treeFallen", "obj_treeRocksA", "obj_treeRocksB"} envMeshes.streamWithTraps = {"adv_backwoodsStream_meshesA", "adv_backwoodsStream_meshesB", "adv_backwoodsStream_meshesC", "adv_backwoodsStream_meshesD", "adv_backwoodsStream_meshesE", "adv_backwoodsStream_meshesF", "adv_backwoodsStream_meshesG", "adv_backwoodsStream_meshesH", "adv_backwoodsStream_meshesI", "adv_backwoodsStream_meshesJ", "adv_backwoodsStream_meshesK", "adv_backwoodsStream_meshesL", "adv_backwoodsStream_meshesM", "obj_coolerFish", "obj_panelMetalBackwoodsStream", "obj_rockFormationBackwoodsStreamA", "obj_rockFormationBackwoodsStreamB", "obj_rockFormationBackwoodsStreamC", "obj_rockFormationBackwoodsStreamD", "obj_rockFormationBackwoodsStreamE", "obj_stonesStepping", "obj_trapBase", "obj_trapFishBase", "obj_trapFishA", "obj_trapFishB", "obj_trapFishC", "obj_trapFishDraped", "obj_coolerFish", "obj_treeFallen", "obj_treeRocksA", "obj_treeRocksB"} local mBanterDialogID, mZombiesApproachPeteDeathTimerID, mFishEscapeDialogID = nil, nil, nil local PreloadAssets = function() -- function num : 0_0 , upvalues : _ENV PreLoad("env_backwoodsStream_cs_walkAndTalk_2_rails.chore") PreLoad("env_backwoodsStream_cs_walkerBite_1.chore") PreLoad("env_backwoodsStream_cs_walkerBite_10.chore") PreLoad("env_backwoodsStream_timer_choiceCam_1.chore") PreLoad("env_backwoodsStream_cs_peteOrNick_peek_C_to_L_1.chore") PreLoad("env_backwoodsStream_cs_peteOrNick_peek_C_to_R_1.chore") PreLoad("env_backwoodsStream_cs_peteOrNick_peek_L_to_R_1.chore") PreLoad("env_backwoodsStream_cs_peteOrNick_peek_R_to_L_1.chore") PreLoad("env_backwoodsStream_cs_goWithPete_1.chore") PreLoad("env_backwoodsStream_timer_PeteGrabbed_1.chore") PreLoad("env_backwoodsStream_timer_PeteGrabbed_2.chore") PreLoad("env_backwoodsStream_timer_PeteGrabbed_clemHasBoard_1.chore") PreLoad("env_backwoodsStream_timer_PeteGrabbed_2.chore") PreLoad("env_backwoodsStream_cs_clemFreesPete_2.chore") PreLoad("env_backwoodsStream_cs_goWithNick_1.chore") PreLoad("env_backwoodsStream_cs_goWithNick_2.chore") PreLoad("env_backwoodsStream_cs_goWithNick_6.chore") PreLoad("env_backwoodsStream_cs_goWithNick_5.chore") if Platform_NeedShaderPreload() then RenderPreloadShader("Mesh_QLo.t3fxb", "14") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "263") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "135") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "3") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "135") RenderPreloadShader("Mesh_DTL_QLo.t3fxb", "134") RenderPreloadShader("Mesh_DTL_QLo.t3fxb", "132") RenderPreloadShader("Mesh_DTL_VCOL_QLo.t3fxb", "135") RenderPreloadShader("Mesh_DTL_VCOL_QLo.t3fxb", "140") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "74") RenderPreloadShader("Mesh_QLo.t3fxb", "74") RenderPreloadShader("Mesh_QLo.t3fxb", "330") RenderPreloadShader("Mesh_DTL_VCOL_SDTL_QLo.t3fxb", "71") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "334") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "270") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "78") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "76") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "78") RenderPreloadShader("Mesh_QLo.t3fxb", "6") RenderPreloadShader("ScenePreZ_QLo.t3fxb", "128") RenderPreloadShader("SceneShadowMap_QLo.t3fxb", "0") RenderPreloadShader("SceneShadowMapAlpha_QLo.t3fxb", "0") RenderPreloadShader("Mesh_QLo.t3fxb", "71") RenderPreloadShader("Mesh_LGT_DTL_QLo.t3fxb", "71") RenderPreloadShader("Mesh_LGT_DTL_QLo.t3fxb", "327") RenderPreloadShader("Mesh_QLo.t3fxb", "327") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "327") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "327") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "263") RenderPreloadShader("FX_Null_QLo.t3fxb", "0") RenderPreloadShader("DirectionalLightShadow_QLo.t3fxb", "1024") RenderPreloadShader("SceneToonOutline2_QLo.t3fxb", "0") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "3") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "334") RenderPreloadShader("Mesh_DTL_QLo.t3fxb", "198") RenderPreloadShader("Mesh_DTL_QLo.t3fxb", "196") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "199") RenderPreloadShader("SceneShadowMap_1SKN_QLo.t3fxb", "0") RenderPreloadShader("SceneShadowMapAlpha_1SKN_QLo.t3fxb", "0") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "3") RenderPreloadShader("Mesh_LGT_DTL_QLo.t3fxb", "263") RenderPreloadShader("SceneToonOutline2_QLo.t3fxb", "64") RenderPreloadShader("SceneToonOutline2_QLo.t3fxb", "256") RenderPreloadShader("SceneToonOutline2_1SKN_QLo.t3fxb", "0") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "6") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "70") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "4") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "6") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "68") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "70") RenderPreloadShader("Mesh_1SKN_DTL_SDTL_QLo.t3fxb", "6") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "259") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "326") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "270") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "199") RenderPreloadShader("Mesh_LGT_DTL_VCOL_QLo.t3fxb", "71") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "327") RenderPreloadShader("Mesh_LGT_DTL_VCOL_QLo.t3fxb", "263") RenderPreloadShader("Mesh_LGT_DTL_VCOL_QLo.t3fxb", "327") RenderPreloadShader("Mesh_DTL_VCOL_QLo.t3fxb", "199") RenderPreloadShader("Mesh_DTL_VCOL_QLo.t3fxb", "204") RenderPreloadShader("Mesh_QLo.t3fxb", "10") RenderPreloadShader("Mesh_QLo.t3fxb", "78") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "10") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "10") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "266") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "134") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "134") RenderPreloadShader("Mesh_QLo.t3fxb", "134") RenderPreloadShader("Mesh_QLo.t3fxb", "142") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "199") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "135") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "67") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "67") RenderPreloadShader("Mesh_QLo.t3fxb", "199") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "199") RenderPreloadShader("Mesh_DTL_VCOL_SDTL_QLo.t3fxb", "7") RenderPreloadShader("SceneShadowMap_VCOL_QLo.t3fxb", "0") RenderPreloadShader("SceneShadowMapAlpha_VCOL_QLo.t3fxb", "0") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "263") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "67") RenderPreloadShader("Mesh_QLo.t3fxb", "266") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "138") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "138") RenderPreloadShader("Mesh_QLo.t3fxb", "138") RenderPreloadShader("Mesh_QLo.t3fxb", "70") RenderPreloadShader("Mesh_QLo.t3fxb", "68") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "262") RenderPreloadShader("SceneToonOutline2_QLo.t3fxb", "320") RenderPreloadShader("SceneToonOutline2_1SKN_QLo.t3fxb", "64") RenderPreloadShader("Mesh_1SKN_DTL_SDTL_QLo.t3fxb", "70") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "323") end end BackwoodsStream_GreatFishEscape = function() -- function num : 0_1 , upvalues : mFishEscapeDialogID, _ENV mFishEscapeDialogID = Game_RunDialog("amb_escapingFish", false) end BackwoodsStream_GreatFishEscape_Pause = function(bPause) -- function num : 0_2 , upvalues : mFishEscapeDialogID, _ENV if mFishEscapeDialogID then if bPause then DlgPause(mFishEscapeDialogID) else DlgResume(mFishEscapeDialogID) end end end BackwoodsStream_EscapingFishCheck = function() -- function num : 0_3 , upvalues : _ENV, mFishEscapeDialogID print("*** escaping fish check! ***") if LogicGet("3BackwoodsStream - Escaping Fish") <= 1 then if mFishEscapeDialogID then DlgStop(mFishEscapeDialogID) end Game_RunDialog("cs_lastFishGetsAway") end end BackwoodsStream_EscapingFish_KillCallback = function() -- function num : 0_4 , upvalues : _ENV PropertyRemoveKeyCallback(AgentGetProperties("logic_game"), "3BackwoodsStream - Escaping Fish", BackwoodsStream_EscapingFishCheck) end BackwoodsStream_ZombiesApproachPeteTimer_Start = function() -- function num : 0_5 , upvalues : _ENV, mZombiesApproachPeteDeathTimerID print("Zombies approaching Pete -- timer started!") mZombiesApproachPeteDeathTimerID = Game_RunDialog("timer_zombiesApproachPete", false) end BackwoodsStream_ZombiesApproachPeteTimer_Stop = function() -- function num : 0_6 , upvalues : _ENV, mZombiesApproachPeteDeathTimerID print("Zombies approaching Pete -- stop timer?") print("mZombiesApproachPeteDeathTimerID is " .. tostring(mZombiesApproachPeteDeathTimerID)) if mZombiesApproachPeteDeathTimerID then print("Timer STOPPED!") DlgStop(mZombiesApproachPeteDeathTimerID) end end BackwoodsStream_MakeAllObjsUnselectable = function() -- function num : 0_7 , upvalues : _ENV, kScene for key,value in pairs(SceneGetAgents(kScene)) do if AgentHasProperty(value, "Game Selectable") then AgentSetSelectable(value, false) end end end BackwoodsStream_ConnectiveTissuePause = function() -- function num : 0_8 , upvalues : _ENV while Game_ModeIsOnStack(eModeCutscene) do Yield() end if not LogicGet("3BackwoodsStream - Started Fishing") then Dialog_Run(Game_GetSceneDialog(), "cs_connectiveTissue") end end BackwoodsStream_StartWalkAcrossLog = function() -- function num : 0_9 , upvalues : _ENV AgentSetProperty(Game_GetPlayer(), "Chored Movement - Chore Forward", "env_backwoodsStream_cs_walkAndTalk_2_rails.chore") AgentSetProperty(Game_GetPlayer(), "Chored Movement - Dialog End", "cs_walkerBite") ChoredMovement_Start() end BackwoodsStream_SetEnvironment = function(state) -- function num : 0_10 , upvalues : _ENV, envMeshes local meshesToShow = nil for key,value in pairs(envMeshes) do if state == key then meshesToShow = envMeshes[state] break end end do if not meshesToShow then print("BackwoodsStream_SetEnvironment() didn\'t get a valid state!") return end for key,value in pairs(envMeshes) do for key,value in pairs(value) do AgentHide(value, true) end end for key,value in pairs(meshesToShow) do AgentHide(value, false) end end end BackwoodsStream_BanterStart = function() -- function num : 0_11 , upvalues : mBanterDialogID, _ENV mBanterDialogID = Dialog_Run(Game_GetSceneDialog(), "amb_fishingBanter", false) print("^^STARTING^^ fishing banter! Dialog ID: " .. tostring(mBanterDialogID)) end BackwoodsStream_BanterPause = function(bPause) -- function num : 0_12 , upvalues : _ENV, mBanterDialogID if not bPause then print("** RESUMING ** fishing banter! Dialog ID: " .. tostring(mBanterDialogID)) DlgResume(mBanterDialogID) else print(">> PAUSING << fishing banter! Dialog ID: " .. tostring(mBanterDialogID)) DlgPause(mBanterDialogID) end end BackwoodsStream_BanterEnd = function() -- function num : 0_13 , upvalues : _ENV, mBanterDialogID print("-> STOPPING <- fishing banter! Dialog ID: " .. tostring(mBanterDialogID)) if DlgIsRunning(mBanterDialogID) then DlgStop(mBanterDialogID) else print("...but the banter wasn\'t running!") end end BackwoodsStream = function() -- function num : 0_14 , upvalues : _ENV, kScene, kScript, PreloadAssets Game_NewScene(kScene, kScript) PreloadAssets() Game_StartScene(true) end SceneOpen(kScene, kScript)
local v1 = { } local v2 v2 = function(v3) local v4 = { } _ENV["setmetatable"](v4, v3) v3[ "__index" ] = v3 return v4 end v1[ "InitWithTop" ] = function(v5) local v6 = v2(v5) v6[ "tag" ] = "Top" return v6 end v1[ "InitWithNil" ] = function(v7) local v8 = v2(v7) v8[ "tag" ] = "Nil" return v8 end v1[ "InitWithBottom" ] = function(v9) local v10 = v2(v9) v10[ "tag" ] = "Bot" return v10 end v1[ "InitWithNumber" ] = function(v11, v12) local v13 = v2(v11) v13[ "tag" ] = "Number" v13[ "constant" ] = v12 return v13 end v1[ "InitWithBool" ] = function(v14, v15) local v16 = v2(v14) v16[ "tag" ] = "Bool" v16[ "constant" ] = v15 return v16 end v1[ "InitWithString" ] = function(v17, v18) local v19 = v2(v17) v19[ "tag" ] = "String" v19[ "constant" ] = v18 return v19 end v1[ "InitWithFunc" ] = function(v20, v21) local v22 = v2(v20) v22[ "tag" ] = "Func" v22[ "number" ] = v21 return v22 end v1[ "getNumber" ] = function(v23) if (v23["tag"] == "Number") then return true, v23["constant"] else return false end end v1[ "getBool" ] = function(v24) if (v24["tag"] == "Bool") then return true, v24["constant"] else return false end end v1[ "getString" ] = function(v25) if (v25["tag"] == "String") then return true, v25["constant"] else return false end end v1[ "getFunc" ] = function(v26) if (v26["tag"] == "Func") then return true, v26["number"] else return false end end v1[ "getConstant" ] = function(v27) if (v27["tag"] == "Nil") then return true, nil, "Nil" else if (v27["tag"] == "String") then return true, v27["constant"], "StringLiteral" else if (v27["tag"] == "Number") then return true, v27["constant"], "NumberLiteral" else if (v27["tag"] == "Bool") then return true, v27["constant"], "BoolLiteral" else return false end end end end end v1[ "isTop" ] = function(v28) return (v28["tag"] == "Top") end v1[ "isBottom" ] = function(v29) return (v29["tag"] == "Bot") end v1[ "isNil" ] = function(v30) return (v30["tag"] == "Nil") end v1[ "test" ] = function(v31) if v31:isBottom() then return false else local v32, v33 = v31:getBool() if v31:isNil() then return true, false else if v32 then return true, v33 else return true, true end end end end v1[ "compare" ] = function(v34, v35) for v36, v37 in _ENV["pairs"](v34) do if (v37 ~= v35[v36]) then return false end end return true end v1[ "meet" ] = function(v38, v39) if v38:isBottom() then return false else if v38:isTop() then v38:assign(v39) return (not v39:isTop()) else if (not v38:compare(v39)) then v38:assign(v1:InitWithBottom()) return true else return false end end end end v1[ "copy" ] = function(v40) local v41 = { } for v42, v43 in _ENV["pairs"](v40) do v41[ v42 ] = v43 end _ENV["setmetatable"](v41, _ENV["getmetatable"](v40)) return v41 end v1[ "assign" ] = function(v44, v45) for v46, v47 in _ENV["pairs"](v44) do v44[ v46 ] = nil end for v48, v49 in _ENV["pairs"](v45) do v44[ v48 ] = v49 end end return v1
local M = {} function M.report_start(msg) vim.fn['health#report_start'](msg) end function M.report_info(msg) vim.fn['health#report_info'](msg) end function M.report_ok(msg) vim.fn['health#report_ok'](msg) end function M.report_warn(msg, ...) vim.fn['health#report_warn'](msg, ...) end function M.report_error(msg, ...) vim.fn['health#report_error'](msg, ...) end return M
LinkLuaModifier("modifier_kahmeka_fly", "heroes/kahmeka/kahmeka_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_kahmeka_ignite", "heroes/kahmeka/kahmeka_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_kahmeka_wounding_spear", "heroes/kahmeka/kahmeka_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_kahmeka_wounding_spear_debuff", "heroes/kahmeka/kahmeka_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_kahmeka_fungwarb", "heroes/kahmeka/kahmeka_modifiers.lua", LUA_MODIFIER_MOTION_NONE) kahmeka_ignite = class({}) kahmeka_fly = class({}) function kahmeka_fly:OnUpgrade() self:GetCaster():FindAbilityByName('kahmeka_fly_down_divebomb'):SetLevel(1) if self:GetLevel() == 1 then self:GetCaster():FindAbilityByName('kahmeka_fly_down_divebomb'):SetActivated(false) end end function kahmeka_fly:GetAssociatedSecondaryAbilities() return 'kahmeka_fly_down_divebomb' end function kahmeka_fly:OnSpellStart() local hCaster = self:GetCaster() hCaster:FindAbilityByName('kahmeka_fly_down_divebomb'):SetActivated(true) self:SetActivated(false) hCaster:AddNewModifier(hCaster, self, 'modifier_kahmeka_fly', nil) end function kahmeka_fly:GetCooldown(iLevel) if not self.bSpecial then self.hSpecial = Entities:First() while self.hSpecial and (self.hSpecial:GetName() ~= "special_bonus_unique_kahmeka_2" or self.hSpecial:GetCaster() ~= self:GetCaster()) do self.hSpecial = Entities:Next(self.hSpecial) end self.bSpecial = true end if self.hSpecial then return self.BaseClass.GetCooldown(self, iLevel)-self.hSpecial:GetSpecialValueFor("value") else return self.BaseClass.GetCooldown(self, iLevel) end end kahmeka_fly_down_divebomb = class({}) function kahmeka_fly_down_divebomb:OnSpellStart() local hCaster = self:GetCaster() hCaster:FindAbilityByName('kahmeka_fly'):SetActivated(true) self:SetActivated(false) hCaster:RemoveModifierByName('modifier_kahmeka_fly') end kahmeka_fly_down_divebomb.GetCooldown = kahmeka_fly.GetCooldown function kahmeka_fly_down_divebomb:GetAssociatedPrimaryAbilities() return 'kahmeka_fly' end kahmeka_wounding_spear = class({}) function kahmeka_wounding_spear:GetIntrinsicModifierName() return "modifier_kahmeka_wounding_spear" end kahmeka_fungwarb = class({}) function kahmeka_fungwarb:OnSpellStart() local hCaster = self:GetCaster() hCaster:EmitSound('Hero_Batrider.FlamingLasso.Cast') hCaster:AddNewModifier(hCaster, self, "modifier_kahmeka_fungwarb", {Duration = self:GetSpecialValueFor('duration')+CheckTalent(hCaster, 'special_bonus_unique_kahmeka_4')}) end kahmeka_ignite = class({}) function kahmeka_ignite:OnSpellStart() local hCaster = self:GetCaster() hCaster:EmitSound('Hero_OgreMagi.Ignite.Cast') ProjectileManager:CreateTrackingProjectile({ Target = self:GetCursorTarget(), Source = hCaster, Ability = self, EffectName = "particles/units/heroes/hero_ogre_magi/ogre_magi_ignite.vpcf", iMoveSpeed = self:GetSpecialValueFor('projectile_speed'), vSourceLoc= hCaster:GetAttachmentOrigin(hCaster:ScriptLookupAttachment('attach_attack1')) , -- Optional (HOW) bDrawsOnMinimap = false, -- Optional bDodgeable = true, -- Optional bIsAttack = false, -- Optional bVisibleToEnemies = true, -- Optional bReplaceExisting = false, -- Optional flExpireTime = GameRules:GetGameTime() + 20, -- Optional but recommended bProvidesVision = false, -- Optional }) end function kahmeka_ignite:OnProjectileHit(hTarget, vLocation) if hTarget:TriggerSpellAbsorb(self) then return end hTarget:AddNewModifier(self:GetCaster(), self, 'modifier_kahmeka_ignite', {Duration = self:GetSpecialValueFor('duration')*(1-hTarget:GetStatusResistance())}) hTarget:EmitSound('Hero_OgreMagi.Ignite.Target') ParticleManager:CreateParticle('particles/units/heroes/hero_ogre_magi/ogre_magi_ignite_explosion.vpcf', PATTACH_ABSORIGIN_FOLLOW, hTarget) end
local _, private = ... -- Lua Globals -- -- luacheck: globals select tonumber ipairs tinsert -- Libs -- local Aurora = _G.Aurora local Color = Aurora.Color -- Shamelessly copied from PTRFeedback_Tooltips local TooltipTypes = { spell = "Spell", item = "Item", unit = "Creature", quest = "Quest", achievement = "Achievement", currency = "Currency", petBattleAbility = "Pet Battle Ability", petBattleCreature = "Pet Battle Creature", azerite = "Azerite Essence", } local formatString = "%s ID: %d" local function AddToTooltip(tooltip, tooltipType, tooltipID) if not tooltip._id then local tooltipText = formatString:format(tooltipType, tooltipID) tooltip:AddLine(tooltipText, Color.gray.r, Color.gray.g, Color.gray.b) tooltip._id = tooltipID tooltip:Show() end end local function SetupSpellTooltips() local function setAuraTooltipFunction(self, unit, slotNumber, auraType) local id = select(10, _G.UnitAura(unit, slotNumber, auraType)) if id then AddToTooltip(self, TooltipTypes.spell, id) end end _G.hooksecurefunc(_G.GameTooltip, "SetUnitAura", setAuraTooltipFunction) _G.hooksecurefunc(_G.GameTooltip, "SetUnitBuff", function(self, unit, slotNumber) setAuraTooltipFunction(self, unit, slotNumber, "HELPFUL") end) _G.hooksecurefunc(_G.GameTooltip, "SetUnitDebuff", function(self, unit, slotNumber) setAuraTooltipFunction(self, unit, slotNumber, "HARMFUL") end) private.AddHook("OnTooltipSetSpell", function(self) local _, id = self:GetSpell() if id then AddToTooltip(self, TooltipTypes.spell, id) end end, true) end local function SetupItemTooltips() private.AddHook("OnTooltipSetItem", function(self) local _, link = self:GetItem() if link then local id = link:match("item:(%d*)") if (id == "" or id == "0") and _G.TradeSkillFrame ~= nil and _G.TradeSkillFrame:IsVisible() and _G.GetMouseFocus().reagentIndex then local selectedRecipe = _G.TradeSkillFrame.RecipeList:GetSelectedRecipeID() for i = 1, 8 do if _G.GetMouseFocus().reagentIndex == i then id = _G.C_TradeSkillUI.GetRecipeReagentItemLink(selectedRecipe, i):match("item:(%d+):") or nil break end end end if id then AddToTooltip(self, TooltipTypes.item, id) end end end, true) end local function SetupUnitTooltips() private.AddHook("OnTooltipSetUnit", function(self) if _G.C_PetBattles.IsInBattle() then return end local _, unit = self:GetUnit() if unit then local guid = _G.UnitGUID(unit) or "" local id = tonumber(guid:match("-(%d+)-%x+$"), 10) if id and (guid:match("%a+") ~= "Player") then AddToTooltip(self, TooltipTypes.unit, id) end end end, true) end local function SetupQuestTooltips() _G.hooksecurefunc("QuestMapLogTitleButton_OnEnter", function(self) if self.questID then AddToTooltip(_G.GameTooltip, TooltipTypes.quest, self.questID) end end) end local function SetupAchievementTooltips() local frame = _G.CreateFrame("frame") frame:RegisterEvent("ADDON_LOADED") frame:SetScript("OnEvent", function(_, _, addonName) if addonName == "Blizzard_AchievementUI" then for i, button in ipairs(_G.AchievementFrameAchievementsContainer.buttons) do button:HookScript("OnEnter", function() if not _G.GameTooltip:IsOwned(button) then _G.GameTooltip:SetOwner(button, "ANCHOR_NONE") _G.GameTooltip:SetPoint("TOPLEFT", button, "TOPRIGHT", 0, 0) end if button.id then AddToTooltip(_G.GameTooltip, TooltipTypes.achievement, button.id) end end) button:HookScript("OnLeave", function() _G.GameTooltip:Hide() end) end frame:UnregisterEvent("ADDON_LOADED") end end) end local function SetupCurrencyTooltips() local function setCurrencyTooltipFunction(self, link) local currencyID = link:match("currency:(%d+)") if currencyID then AddToTooltip(self, TooltipTypes.currency, currencyID) end end private.AddHook("SetHyperlink", setCurrencyTooltipFunction) private.AddHook("SetCurrencyToken", function(self, index) setCurrencyTooltipFunction(self, _G.GetCurrencyListLink(index)) end) end local function SetupAzeriteTooltips() private.AddHook("SetAzeriteEssence", function(self, azeriteID, rank) if azeriteID then AddToTooltip(self, TooltipTypes.azerite, azeriteID) end end) end function private.SetupIDTips() SetupSpellTooltips() SetupItemTooltips() SetupUnitTooltips() SetupQuestTooltips() SetupAchievementTooltips() SetupCurrencyTooltips() SetupAzeriteTooltips() end
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false) local RollTheBones = IceCore_CreateClass(IceUnitBar) local IceHUD = _G.IceHUD local baseTime = 12 local gapPerComboPoint = 6 local maxComboPoints = 5 local rtbEndTime = 0 local rtbDuration = 0 local rtbCount = 0 local sixComboPointsTalentID = 19240 local behaviorDependsOnComboPoints = IceHUD.WowVer < 90000 local CurrMaxRtBDuration = 0 local PotentialRtBDuration = 0 local RtBBuffs = {199603, 193358, 193357, 193359, 199600, 193356} local RtBSet = {} for _, v in ipairs(RtBBuffs) do RtBSet[v] = true end local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS if Enum and Enum.PowerType then SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints end -- Constructor -- function RollTheBones.prototype:init() RollTheBones.super.prototype.init(self, "RollTheBones", "player") self.moduleSettings = {} self.moduleSettings.desiredLerpTime = 0 self.moduleSettings.shouldAnimate = false self:SetDefaultColor("RollTheBones", 1, 0.6, 0.2) if behaviorDependsOnComboPoints then self:SetDefaultColor("RollTheBones2", 0.75, 1, 0.2) self:SetDefaultColor("RollTheBones3", 0.4, 1, 0.2) self:SetDefaultColor("RollTheBones4", 0.4, 1, 0.2) self:SetDefaultColor("RollTheBones5", 0.1, 1, 0.7) self:SetDefaultColor("RollTheBones6", 0.1, 1, 0.7) self:SetDefaultColor("RollTheBonesPotential", 1, 1, 1) end self.bTreatEmptyAsFull = true end -- 'Public' methods ----------------------------------------------------------- -- OVERRIDE function RollTheBones.prototype:Enable(core) RollTheBones.super.prototype.Enable(self, core) self:RegisterEvent("UNIT_AURA", "UpdateRollTheBones") if behaviorDependsOnComboPoints then self:RegisterEvent(IceHUD.UnitPowerEvent, "ComboPointsChanged") end if not self.moduleSettings.alwaysFullAlpha then self:Show(false) else self:UpdateRollTheBones() end self:SetBottomText1("") end function RollTheBones.prototype:Disable(core) RollTheBones.super.prototype.Disable(self, core) end function RollTheBones.prototype:ComboPointsChanged(...) if select('#', ...) >= 3 and select(1, ...) == IceHUD.UnitPowerEvent and select(3, ...) ~= "COMBO_POINTS" then return end self:TargetChanged() self:UpdateDurationBar() end -- OVERRIDE function RollTheBones.prototype:GetDefaultSettings() local settings = RollTheBones.super.prototype.GetDefaultSettings(self) settings["enabled"] = false settings["shouldAnimate"] = false settings["desiredLerpTime"] = nil settings["lowThreshold"] = 0 settings["side"] = IceCore.Side.Right settings["offset"] = 6 settings["upperText"]="RtB:" settings["showAsPercentOfMax"] = true settings["durationAlpha"] = 0.6 settings["usesDogTagStrings"] = false settings["lockLowerFontAlpha"] = false settings["lowerTextString"] = "" settings["lowerTextVisible"] = false settings["hideAnimationSettings"] = true settings["bAllowExpand"] = true settings["bShowWithNoTarget"] = true settings["bUseMultipleBuffColors"] = true return settings end -- OVERRIDE function RollTheBones.prototype:GetOptions() local opts = RollTheBones.super.prototype.GetOptions(self) opts["textSettings"].args["upperTextString"]["desc"] = "The text to display under this bar. # will be replaced with the number of Roll the Bones seconds remaining." opts["textSettings"].args["upperTextString"].hidden = false if behaviorDependsOnComboPoints then opts["showAsPercentOfMax"] = { type = 'toggle', name = L["Show bar as % of maximum"], desc = L["If this is checked, then the RtB buff time shows as a percent of the maximum attainable (taking set bonuses and talents into account). Otherwise, the bar always goes from full to empty when applying RtB no matter the duration."], get = function() return self.moduleSettings.showAsPercentOfMax end, set = function(info, v) self.moduleSettings.showAsPercentOfMax = v end, disabled = function() return not self.moduleSettings.enabled end } opts["durationAlpha"] = { type = "range", name = L["Potential RtB time bar alpha"], desc = L["What alpha value to use for the bar that displays how long your RtB will last if you activate it. (This gets multiplied by the bar's current alpha to stay in line with the bar on top of it)"], min = 0, max = 100, step = 5, get = function() return self.moduleSettings.durationAlpha * 100 end, set = function(info, v) self.moduleSettings.durationAlpha = v / 100.0 self:Redraw() end, disabled = function() return not self.moduleSettings.enabled end } opts["bUseMultipleBuffColors"] = { type = 'toggle', name = L["Use multiple buff colors"], desc = L["If this is checked, then the bar uses different colors depending on how many RtB buffs you have"], get = function() return self.moduleSettings.bUseMultipleBuffColors end, set = function(info, v) self.moduleSettings.bUseMultipleBuffColors = v self:Redraw() end, disabled = function() return not self.moduleSettings.enabled end, } end opts["bShowWithNoTarget"] = { type = 'toggle', name = L["Show with no target"], desc = L["Whether or not to display when you have no target selected but have combo points available"], get = function() return self.moduleSettings.bShowWithNoTarget end, set = function(info, v) self.moduleSettings.bShowWithNoTarget = v self:ComboPointsChanged() end, disabled = function() return not self.moduleSettings.enabled end, } return opts end function RollTheBones.prototype:CreateFrame() RollTheBones.super.prototype.CreateFrame(self) self:CreateDurationBar() end function RollTheBones.prototype:CreateDurationBar() if not behaviorDependsOnComboPoints then return end self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK", "Duration") -- Rokiyo: Do we need to call this here? self.CurrScale = 0 self.durationFrame.bar:SetVertexColor(self:GetColor("RollTheBonesPotential", self.moduleSettings.durationAlpha)) self.durationFrame.bar:SetHeight(0) self:UpdateBar(1, "undef") -- force update the bar...if we're in here, then either the UI was just loaded or the player is jacking with the options. -- either way, make sure the duration bar matches accordingly self:UpdateDurationBar() end function RollTheBones.prototype:RotateHorizontal() RollTheBones.super.prototype.RotateHorizontal(self) if self.durationFrame then self:RotateFrame(self.durationFrame) end end function RollTheBones.prototype:ResetRotation() RollTheBones.super.prototype.ResetRotation(self) if self.durationFrame and self.durationFrame.anim then self.durationFrame.anim:Stop() end end -- 'Protected' methods -------------------------------------------------------- function RollTheBones.prototype:GetBuffDuration(unitName, ids) local i = 1 local buff, _, type, duration, endTime, spellId if IceHUD.WowVer < 80000 then buff, _, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i) else buff, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i) end local realDuration, remaining, count local now = GetTime() count = 0 while buff do if (spellId and ids[spellId]) then if endTime then realDuration = duration remaining = endTime - now count = count + 1 end end i = i + 1; if IceHUD.WowVer < 80000 then buff, _, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i) else buff, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i) end end if count > 0 then return realDuration, remaining, count else return nil, nil, 0 end end function RollTheBones.prototype:MyOnUpdate() RollTheBones.super.prototype.MyOnUpdate(self) if self.bUpdateRtb then self:UpdateRollTheBones(nil, self.unit, true) end if self.target or self.moduleSettings.bShowWithNoTarget then self:UpdateDurationBar() end end local function RTBGetComboPoints(unit) return UnitPower(unit, SPELL_POWER_COMBO_POINTS) end -- use this to figure out if Roll the Bones is available or not. neither IsSpellKnown nor IsPlayerSpell are correct for it -- when SnD is known, but this is. local function HasSpell(id) local spell = GetSpellInfo(id) return spell == GetSpellInfo(spell) end local function ShouldHide() return not HasSpell(193316) end function RollTheBones.prototype:UpdateRollTheBones(event, unit, fromUpdate) if unit and unit ~= self.unit then return end local now = GetTime() local remaining = nil if not fromUpdate then rtbDuration, remaining, rtbCount = self:GetBuffDuration(self.unit, RtBSet) if not remaining then rtbEndTime = 0 else rtbEndTime = remaining + now end end if rtbEndTime and rtbEndTime >= now then if not fromUpdate then self.bUpdateRtb = true end self:Show(true) if not remaining then remaining = rtbEndTime - now end local denominator = ((self.moduleSettings.showAsPercentOfMax and behaviorDependsOnComboPoints) and CurrMaxRtBDuration or rtbDuration) self:UpdateBar(denominator ~= 0 and remaining / denominator or 0, self:GetColorName(rtbCount)) else self:UpdateBar(0, "RollTheBones") if RTBGetComboPoints(self.unit) == 0 or (not UnitExists("target") and not self.moduleSettings.bShowWithNoTarget) or ShouldHide() then if self.bIsVisible then self.bUpdateRtb = nil end if not self.moduleSettings.alwaysFullAlpha or ShouldHide() then self:Show(false) end end end -- somewhat redundant, but we also need to check potential remaining time if (remaining ~= nil) or PotentialRtBDuration > 0 then local potText = behaviorDependsOnComboPoints and " (" .. PotentialRtBDuration .. ")" or "" self:SetBottomText1(self.moduleSettings.upperText .. tostring(floor(remaining or 0)) .. (self.moduleSettings.durationAlpha ~= 0 and potText or "")) end end function RollTheBones.prototype:GetColorName(count) if behaviorDependsOnComboPoints and self.moduleSettings.bUseMultipleBuffColors and count >= 2 then return "RollTheBones"..count else return "RollTheBones" end end function RollTheBones.prototype:TargetChanged() if self.moduleSettings.bShowWithNoTarget and RTBGetComboPoints(self.unit) > 0 then self.target = true else self.target = UnitExists("target") end self:Update(self.unit) self:UpdateDurationBar() self:UpdateRollTheBones() end function RollTheBones.prototype:UpdateDurationBar(event, unit) if not self.durationFrame then return end if unit and unit ~= self.unit then return end local points = RTBGetComboPoints(self.unit) -- check for Deeper Stratagem local _, _, _, DeeperStratagem = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup()) if DeeperStratagem then -- first, set the cached upper limit of RtB duration CurrMaxRtBDuration = self:GetMaxBuffTime(maxComboPoints + 1) else CurrMaxRtBDuration = self:GetMaxBuffTime(maxComboPoints) end if event then self:UpdateRollTheBones() end -- player doesn't want to show the percent of max or the alpha is zeroed out, so don't bother with the duration bar if not self.moduleSettings.showAsPercentOfMax or self.moduleSettings.durationAlpha == 0 or (points == 0 and not self:IsVisible()) or ShouldHide() then self.durationFrame:Hide() return end self.durationFrame:Show() -- if we have combo points and a target selected, go ahead and show the bar so the duration bar can be seen if points > 0 and (UnitExists("target") or self.moduleSettings.bShowWithNoTarget) then self:Show(true) end if self.moduleSettings.durationAlpha > 0 then PotentialRtBDuration = self:GetMaxBuffTime(points) -- compute the scale from the current number of combo points local scale = IceHUD:Clamp(PotentialRtBDuration / CurrMaxRtBDuration, 0, 1) -- sadly, animation uses bar-local variables so we can't use the animation for 2 bar textures on the same bar element if (self.moduleSettings.reverse) then scale = 1 - scale end self.durationFrame.bar:SetVertexColor(self:GetColor("RollTheBonesPotential", self.moduleSettings.durationAlpha)) self:SetBarCoord(self.durationFrame, scale) end if rtbEndTime < GetTime() then local potText = " (" .. PotentialRtBDuration .. ")" self:SetBottomText1(self.moduleSettings.upperText .. "0" .. (self.moduleSettings.durationAlpha > 0 and potText or "")) end end function RollTheBones.prototype:GetMaxBuffTime(numComboPoints) local maxduration if numComboPoints == 0 then return 0 end maxduration = baseTime + ((numComboPoints - 1) * gapPerComboPoint) return maxduration end function RollTheBones.prototype:GetItemIdFromItemLink(linkStr) local itemId local _ if linkStr then _, itemId, _, _, _, _, _, _, _ = strsplit(":", linkStr) end return itemId or 0 end function RollTheBones.prototype:IsItemIdInList(itemId, list) for i=1,#list do if string.match(itemId, list[i]) then return true end end return false end function RollTheBones.prototype:OutCombat() RollTheBones.super.prototype.OutCombat(self) self:UpdateRollTheBones() end local _, unitClass = UnitClass("player") -- Load us up if unitClass == "ROGUE" and IceHUD.WowVer >= 70000 then IceHUD.RollTheBones = RollTheBones:new() end
class("GridNumbersLeft").extends(gfx.sprite) function GridNumbersLeft:init() GridNumbersLeft.super.init(self, gfx.image.new(CELL * 8, CELL * 10 + 1)) self:setCenter(0, 0) self:setZIndex(Z_INDEX_GRID_NUMBERS) end function GridNumbersLeft:enter(puzzle, gridNumbers, doneNumbers, x, y, hintStyle) self.puzzle = puzzle self.gridNumbers = gridNumbers self.doneNumbers = doneNumbers self.gridX = x self.gridY = y self.hintStyle = hintStyle self:moveTo(SEPARATOR_WIDTH, GRID_OFFSET_Y) self:add() self:redraw() end function GridNumbersLeft:updateForPosition() self:redrawPosition() if not self.cursorHidden then self:redrawLeftCursor(self.gridY) end end function GridNumbersLeft:updateHintStyle(hintStyle) self.hintStyle = hintStyle self:redraw() end function GridNumbersLeft:leave() self:remove() end function GridNumbersLeft:setCursor(x, y) if not self.cursorHidden and self.gridY ~= y then self:redrawLeftCursor(self.gridY, true) self:redrawLeftCursor(y) end self.gridX = x self.gridY = y end function GridNumbersLeft:hideCursor() self.cursorHidden = true self:redraw() end function GridNumbersLeft:redraw() self:getImage():clear(gfx.kColorClear) gfx.lockFocus(self:getImage()) do gfx.setDrawOffset(GRID_OFFSET_X - SEPARATOR_WIDTH + CELL * (15 - self.puzzle.width), 0) -- numbers for y, numbers in ipairs(self.gridNumbers.left) do local done = self.doneNumbers.left[y] local lenNumbers = #numbers for i, v in ipairs(numbers) do imgGrid:drawImage( NUM_STYLE_OFFSETS[done[i] and self.hintStyle or 1] + v, (CELL - 1) * (i - 1 - lenNumbers) - 1, CELL * (y - 1) + 1 ) end end -- cursor gfx.setColor(gfx.kColorBlack) if not self.cursorHidden then gfx.drawLine(CELL * -8 + 3, CELL * self.gridY - CELL, -3, CELL * self.gridY - CELL) gfx.drawLine(CELL * -8 + 3, CELL * self.gridY, -3, CELL * self.gridY) end end gfx.unlockFocus() end function GridNumbersLeft:redrawPosition() gfx.lockFocus(self:getImage()) gfx.setColor(gfx.kColorClear) gfx.fillRect(0, CELL * (self.gridY - 1), CELL * 8, CELL + 1) gfx.setDrawOffset(GRID_OFFSET_X - SEPARATOR_WIDTH + CELL * (15 - self.puzzle.width), 0) do local numbers = self.gridNumbers.left[self.gridY] local done = self.doneNumbers.left[self.gridY] local lenNumbers = #numbers for i, v in ipairs(numbers) do imgGrid:drawImage( NUM_STYLE_OFFSETS[done[i] and self.hintStyle or 1] + v, (CELL - 1) * (i - 1 - lenNumbers) - 1, CELL * (self.gridY - 1) + 1 ) end end gfx.unlockFocus() end function GridNumbersLeft:redrawLeftCursor(gridY, hide) gfx.lockFocus(self:getImage()) do gfx.setDrawOffset(GRID_OFFSET_X - SEPARATOR_WIDTH + CELL * (15 - self.puzzle.width), 0) gfx.setColor(hide and gfx.kColorClear or gfx.kColorBlack) gfx.drawLine(CELL * -8 + 3, CELL * gridY - CELL, -3, CELL * gridY - CELL) gfx.drawLine(CELL * -8 + 3, CELL * gridY, -3, CELL * gridY) end gfx.unlockFocus() end
local hungerTimer = false local thirstTimer = false function OnPlayerSpawn(player) -- Hunger if not hungerTimer then CallRemoteEvent("removePlayerHunger", 0) hungerTimer = true CreateTimer(function() CallRemoteEvent("removePlayerHunger", 1) end, 120000) end -- Thirst if not thirstTimer then CallRemoteEvent("removePlayerThirst", 0) thirstTimer = true CreateTimer(function() CallRemoteEvent("removePlayerThirst", 1) end, 60000) end end AddEvent("OnPlayerSpawn", OnPlayerSpawn)
-- Game of life -- Now with graphics!! function switchlevel(level) -- Load new level l = require(level) if l.load then l.load() end -- Update callbacks love.update = l.update love.draw = l.draw love.keypressed = l.keypressed love.keyreleased = l.keyreleased love.mousepressed = l.mousepressed love.mousemoved = l.mousemoved love.mousereleased = l.mousereleased love.wheelmoved = l.wheelmoved end function love.load() switchlevel("intro") end
local Utils = require "Utils" local Persist = require "Persist" local function createGate(unit, id, t) local bdata = t.branches[id] local cb = unit:addControlBranch("Gate", id, bdata) unit:placeControl(id, "expanded") local cdata = t.controls and t.controls[id] if cdata then cb.control:deserialize(cdata) end cb.control:customize{ outputMode = app.COMPARATOR_GATE } return cb end local function createToggle(unit, id, t) local cb = createGate(unit, id, t) cb.control:customize{ outputMode = app.COMPARATOR_TOGGLE } return cb end local function createTrigger(unit, id, t) local cb = createGate(unit, id, t) cb.control:customize{ outputMode = app.COMPARATOR_TRIGGER_ON_RISE } return cb end local function createLinear(unit, id, t) local bdata = t.branches[id] local cb = unit:addControlBranch("GainBias", id, bdata) unit:placeControl(id, "expanded") local cdata = t.controls and t.controls[id] if cdata then cb.control:deserialize(cdata) end local odata = t.objects[id .. "_gainbias"] if odata then local o = cb.objects[1] Persist.deserializeObject(o, odata) end return cb end local function createDecibel(unit, id, t) local cb = createLinear(unit, id, t) cb.control:customize{ biasUnits = app.unitDecibels, biasMin = -60, biasMax = 12, biasSuperCoarseStep = 6, biasCoarseStep = 1, biasFineStep = 0.1, biasSuperFineStep = 0.01 } return cb end local function createPitch(unit, id, t) local bdata = t.branches[id] local cb = unit:addControlBranch("Pitch", id, bdata) unit:placeControl(id, "expanded") local cdata = t.controls and t.controls[id] if cdata then cb.control:deserialize(cdata) end local odata = t.objects[id .. "_tune"] if odata then local o = cb.objects[1] Persist.deserializeObject(o, odata) end return cb end local descriptors = { { description = "Linear", prefix = "lin", aliases = { "linear", "Ax+B" }, create = createLinear }, { description = "Decibel", prefix = "dB", aliases = { "decibel", "dB(Ax+B)" }, create = createDecibel }, { description = "Pitch", prefix = "V/oct", aliases = { "pitch", "V/oct" }, create = createPitch }, { description = "Gate", prefix = "gate", aliases = { "gate", "Gate" }, create = createGate }, { description = "Toggle", prefix = "sw", aliases = { "toggle" }, create = createToggle }, { description = "Trigger", prefix = "trig", aliases = { "trigger" }, create = createTrigger } } -- hash aliases local aliases = {} for i, czd in ipairs(descriptors) do czd.type = czd.aliases[1] for j, alias in ipairs(czd.aliases) do aliases[alias] = czd end end local function lookup(type) return aliases[type] end local function fixLegacyData(data) if data then local keys = {} local prefixes = { ["Ax+B"] = "cv", ["Gate"] = "gate", ["V/oct"] = "V/oct", ["db(Ax+B)"] = "dB" } for i, czd in ipairs(data) do if czd.id == nil and czd.controlName == nil then local prefix = prefixes[czd.controlType] if prefix then czd.controlName = Utils.generateUniqueKey(keys, prefix) keys[czd.controlName] = true end end end end end local function insertCustomization(unit, type, id, objects) local czd = lookup(type) if czd == nil then app.logInfo("%s: Unknown customization type [%s %s]", unit, type, id) return end app.logInfo("%s: insert customization [%s %s]", unit, type, id) czd.create(unit, id, objects) end local function deserializeCustomizations(unit, t) if t.customizations then -- v0.3 legacy support fixLegacyData(t.customizations) for i, czd in ipairs(t.customizations) do local name = czd.controlName or czd.id insertCustomization(unit, czd.controlType, name, t) end end if t.patch and unit.patch then unit.patch:deserialize(t.patch) end end return { deserializeCustomizations = deserializeCustomizations }
local diagnostics_format = "[#{c}] #{m} (#{s})]" local lspconfig = require("lspconfig") local null_ls = require("null-ls") local b = null_ls.builtins local sources = { b.formatting.prettierd.with({ filetypes = { "html", "json", "yaml", "markdown", "typescript", "typescriptreact", "svelte" }, }), b.formatting.stylua, b.formatting.trim_whitespace.with({ filetypes = { "tmux", "teal", "zsh" } }), b.formatting.shfmt, b.diagnostics.write_good, b.diagnostics.markdownlint, b.diagnostics.teal, b.diagnostics.shellcheck.with({ diagnostics_format = diagnostics_format }), b.code_actions.gitsigns, } local M = {} M.setup = function(on_attach) null_ls.config({ debug = true, sources = sources, }) lspconfig["null-ls"].setup({ on_attach = on_attach }) end return M
local types=require("moonscript.types")local ntype,mtype,is_value,NOOP ntype,mtype,is_value,NOOP=types.ntype,types.mtype,types.is_value,types.NOOP local comprehension_has_value comprehension_has_value=require("moonscript.transform.comprehension").comprehension_has_value local Run do local _class_0 local _base_0={call=function(self,state)return self.fn(state)end}_base_0.__index=_base_0 _class_0=setmetatable({__init=function(self,fn)self.fn=fn self[1]="run"end,__base=_base_0,__name="Run"},{__index=_base_0,__call=function(cls,...)local _self_0=setmetatable({},_base_0)cls.__init(_self_0,...)return _self_0 end})_base_0.__class=_class_0 Run=_class_0 end local last_stm last_stm=function(stms)local last_exp_id=0 for i=#stms,1,-1 do local stm=stms[i]if stm and mtype(stm)~=Run then if ntype(stm)=="group"then return last_stm(stm[2])end last_exp_id=i break end end return stms[last_exp_id],last_exp_id,stms end local transform_last_stm transform_last_stm=function(stms,fn)local _,last_idx,_stms=last_stm(stms)if _stms~=stms then error("cannot transform last node in group")end return(function()local _accum_0={}local _len_0=1 for i,stm in ipairs(stms)do if i==last_idx then _accum_0[_len_0]={"transform",stm,fn}else _accum_0[_len_0]=stm end _len_0=_len_0+1 end return _accum_0 end)()end local chain_is_stub chain_is_stub=function(chain)local stub=chain[#chain]return stub and ntype(stub)=="colon"end local implicitly_return implicitly_return=function(scope)local is_top=true local fn fn=function(stm)local t=ntype(stm)if t=="decorated"then stm=scope.transform.statement(stm)t=ntype(stm)end if types.cascading[t]then is_top=false return scope.transform.statement(stm,fn)elseif types.manual_return[t]or not is_value(stm)then if is_top and t=="return"and stm[2]==""then return NOOP else return stm end else if t=="comprehension"and not comprehension_has_value(stm)then return stm else return{"return",stm}end end end return fn end return{Run=Run,last_stm=last_stm,transform_last_stm=transform_last_stm,chain_is_stub=chain_is_stub,implicitly_return=implicitly_return}
local ERROR_CHECKED_SPECIFIC_GAME_WRAPPER = require "error_checked_specific_game_wrapper" -- NOTE: Other games might simply have a "Sword"-element. return ERROR_CHECKED_SPECIFIC_GAME_WRAPPER.get_module("buff_effects", GAME_ID, "sword_chip_damage_increase")
StatLinks = { Version = "0.4", Author = "Zhur", Original_ChatEdit_AddItemLink = nil, ManaStoneTier1ID = 202840, ManaStoneTier20ID = 202859, ManaStoneTier4ID = 202843, NameAndStat = { -- Balanced accessories [229698] = true, [229699] = true, [229700] = true, -- Blue crap from KBN [227700] = true, [227701] = true, [227702] = true, [227703] = true, [227704] = true, [227705] = true, [227706] = true, [227707] = true, [227708] = true, [227709] = true, [227710] = true, [227711] = true, }, }; function StatLinks:parse_item_link(link) if(not link) then return nil; end local itemID, bindType, runes_plus_tier_max_dur, stat12, stat34, stat56, rune1, rune2, rune3, rune4, dur, hash, color, name = string.match(link, "|Hitem:([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+)|h|c([0-9a-f]+)%[(.+)%]|[hr]"); if(not name) then --try without color color = "ffffff"; itemID, bindType, runes_plus_tier_max_dur, stat12, stat34, stat56, rune1, rune2, rune3, rune4, dur, hash, name = string.match(link, "|Hitem:([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+) ([0-9a-f]+)|h%[(.+)%]|[hr]"); if(not name) then --try it without any modifiers OR color (vendor link) bindType, runes_plus_tier_max_dur, stat12, stat34, stat56, rune1, rune2, rune3, rune4, dur, hash = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 itemID, name = string.match(link, "|Hitem:([0-9a-f]+)|h%[(.+)%]|[hr]"); if(not name) then --try it without any modifiers (vendor link) itemID, color, name = string.match(link, "|Hitem:([0-9a-f]+)|h|c([0-9a-f]+)%[(.+)%]|[hr]"); if(not name) then return nil; end end end end if(string.len(color) == 8) then color = string.sub(color, 3); end local stats = {}; for n,v in pairs({stat12, stat34, stat56}) do if(v ~= "0") then -- we have at least one stat. if(string.len(v) < 5) then --single stat table.insert(stats, tonumber(v, 16)); else local s1 = string.sub(v, 1, 4); local s2 = string.sub(v, 5); table.insert(stats, tonumber(s1, 16)); table.insert(stats, tonumber(s2, 16)); end end end local unknown, rune_plus, rarity_tier, max_dur = string.match("0000000"..runes_plus_tier_max_dur, "([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$"); rune_plus = tonumber(rune_plus, 16); rarity_tier = tonumber(rarity_tier, 16); local plus = rune_plus % 32; local emptyRuneSlots = math.floor(rune_plus/32); local rarity = math.floor(rarity_tier/32); local tier = rarity_tier % 32; -- bindType contains the following information: -- 0x001 - item unbound -- 0x002 - has been previously unbound -- 0x100 - prevent hijack - whatever that means -- 0x200 - hide durability -- 0x400 - Skill Set Extracted -- 0x10000 - unknown, but seen on real items. local bindType = tonumber(bindType, 16); local unbound = ((bindType%2) == 1); local bindOnEquip = ((math.floor(bindType/2)%2) == 1); local skillExtracted = ((math.floor(bindType/0x400)%2) == 1); local result = { itemID=tonumber(itemID, 16), bindType=bindType, unbound=unbound, bindOnEquip=bindOnEquip, skillExtracted=skillExtracted, stats=stats, runes = { tonumber(rune1, 16), tonumber(rune2, 16), tonumber(rune3, 16), tonumber(rune4, 16), }, emptyRuneSlots=emptyRuneSlots, plus=plus, tier_add=tier-10, rarity_add=rarity, max_dur=tonumber(max_dur, 16), dur=tonumber(dur, 16)/100, hash=tonumber(hash, 16), color=color, misc=tonumber(unknown, 16), name=name }; return result; end function StatLinks:_getStatName(id) local sns, name; if(id > 500000) then --try it directly. sns = 'Sys' .. id .. '_name'; name = TEXT(sns); if(name ~= sns) then return name; end end -- Off by 0x70000 is the most common. sns = 'Sys' .. (id + 0x70000) .. '_name'; name = TEXT(sns); if(name ~= sns) then return name; end -- Last ditch effort, try 500000 sns = 'Sys' .. (id + 500000) .. '_name'; return(TEXT(sns)); end function StatLinks:OnLoad(this) this:RegisterEvent("VARIABLES_LOADED"); end function StatLinks:Toggle() if(StatLinksSettings.enabled) then StatLinks.Disable(); else StatLinks.Enable(); end end function StatLinks.Enable() StatLinksSettings.enabled = true; DEFAULT_CHAT_FRAME:AddMessage("StatLinks has been enabled."); end function StatLinks.Disable() StatLinksSettings.enabled = false; DEFAULT_CHAT_FRAME:AddMessage("StatLinks has been disabled."); end function StatLinks.RewriteLink(link) -- Looking specifically for mana stones. local item = StatLinks:parse_item_link(link); if(item and item.itemID >= StatLinks.ManaStoneTier1ID and item.itemID <= StatLinks.ManaStoneTier20ID) then --we have a mana stone. if(item.stats and #item.stats == 1) then -- We have a stone with only one stat local statName = StatLinks:_getStatName(item.stats[1]); link = string.gsub(link, "%["..item.name.."%]", "["..statName.."]"); end end -- Not sure I actually want this... --if(item and StatLinks.NameAndStat[item.itemID]) then -- if(item.stats and #item.stats == 1) then -- -- We have a stone with only one stat -- local statName = StatLinks:_getStatName(item.stats[1]); -- link = string.gsub(link, "%["..item.name.."%]", "["..item.name..": "..statName.."]"); -- end --end return(link); end function StatLinks.ChatEdit_AddItemLink(link) if(StatLinksSettings.enabled) then link = StatLinks.RewriteLink(link); end StatLinks.Original_ChatEdit_AddItemLink(link); end --- This is a patch for AAH which displays stat names in the list --- function StatLinks.BrowseAddItemToList(pageNumber, itemIndex) StatLinks.Original_BrowseAddItemToList(pageNumber, itemIndex); if(StatLinksSettings.enabled) then local list = AuctionBrowseList.list local index = #(AuctionBrowseList.list) --Look specifically for Mana Stone items. local itemid = AAHVar.AuctionBrowseCache.CACHEDDATA[pageNumber][itemIndex].itemid; if(list[index] and itemid >= StatLinks.ManaStoneTier1ID and itemid <= StatLinks.ManaStoneTier20ID) then local link = GetAuctionBrowseItemLink(list[index].auctionid); local item = StatLinks:parse_item_link(link); if(item and item.stats and #item.stats == 1) then -- We have a stone with only one stat list[index].name = StatLinks:_getStatName(item.stats[1]); end end if(list[index] and StatLinks.NameAndStat[itemid]) then local link = GetAuctionBrowseItemLink(list[index].auctionid); local item = StatLinks:parse_item_link(link); if(item.stats and #item.stats == 1) then -- We have an item with only one stat local statName = StatLinks:_getStatName(item.stats[1]); list[index].name = item.name..": "..statName; end end end end function StatLinks.AAH3_BrowseAddItemToList(pageNumber, itemIndex) StatLinks.Original_AAH3_BrowseAddItemToList(pageNumber, itemIndex); if(StatLinksSettings.enabled) then local list = AAH.Browse.Results.list local index = #(AAH.Browse.Results.list) --Look specifically for Mana Stone items. local listing = AAH.Browse.Cache.CACHEDDATA[pageNumber][itemIndex]; local itemid = listing.itemid; if(list[index] and itemid >= StatLinks.ManaStoneTier1ID and itemid <= StatLinks.ManaStoneTier20ID) then local link = GetAuctionBrowseItemLink(list[index].auctionid); local item = StatLinks:parse_item_link(link); if(item and item.stats and #item.stats == 1) then -- We have a stone with only one stat list[index].name = StatLinks:_getStatName(item.stats[1]); end end if(list[index] and StatLinks.NameAndStat[itemid]) then local link = GetAuctionBrowseItemLink(list[index].auctionid); local item = StatLinks:parse_item_link(link); if(item.stats and #item.stats == 1) then -- We have an item with only one stat local statName = StatLinks:_getStatName(item.stats[1]); list[index].name = item.name..": "..statName; end end end end function StatLinks:OnEvent(event) if (event == "VARIABLES_LOADED") then SLASH_StatLinks1 = "/StatLinks"; SlashCmdList["StatLinks"] = function (editbox, msg) StatLinks:Toggle(); end if(not StatLinksSettings) then StatLinksSettings = { enabled = true }; end SaveVariables("StatLinksSettings"); --Hook the normal method. if(not self.Original_ChatEdit_AddItemLink) then self.Original_ChatEdit_AddItemLink = _G.ChatEdit_AddItemLink; _G.ChatEdit_AddItemLink = self.ChatEdit_AddItemLink; end --Hook AAH if installed. if(AAHFunc and not self.Original_BrowseAddItemToList) then self.Original_BrowseAddItemToList = AAHFunc.BrowseAddItemToList; AAHFunc.BrowseAddItemToList = self.BrowseAddItemToList; end --Newer versions of AAH if(AAH and AAH.Browse and not self.Original_AAH3_BrowseAddItemToList) then self.Original_AAH3_BrowseAddItemToList = AAH.Browse.AddItemToList; AAH.Browse.AddItemToList = self.AAH3_BrowseAddItemToList; end if AddonManager then local addon = { name = "StatLinks", version = StatLinks.Version, author = StatLinks.Author, description = "More readable stat item links", -- icon = "Interface/Addons/FriendNotes/FriendNotes.png", category = "Other", configFrame = false, slashCommand = "/StatLinks", miniButton = false, onClickScript = false, disableScript = StatLinks.Disable, enableScript = StatLinks.Enable, } if AddonManager.RegisterAddonTable then AddonManager.RegisterAddonTable(addon) else AddonManager.RegisterAddon(addon.name, addon.description, addon.icon, addon.category, addon.configFrame, addon.slashCommand, addon.miniButton, addon.onClickScript, addon.version, addon.author) end end end end
--双天将 金剛 -- --Script by JustFish function c101102034.initial_effect(c) --fusion material c:EnableReviveLimit() aux.AddFusionProcCodeFun(c,101102014,aux.FilterBoolFunction(Card.IsFusionSetCard,0x24d),2,true,false) --actlimit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(0,1) e1:SetValue(1) e1:SetCondition(c101102034.actcon) c:RegisterEffect(e1) --tohand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(101102034,0)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_BATTLED) e2:SetCondition(c101102034.thcon) e2:SetTarget(c101102034.thtg) e2:SetOperation(c101102034.thop) c:RegisterEffect(e2) --negate local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(101102034,1)) e3:SetCategory(CATEGORY_NEGATE) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_CHAINING) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,101102034) e3:SetCondition(c101102034.discon) e3:SetTarget(c101102034.distg) e3:SetOperation(c101102034.disop) c:RegisterEffect(e3) end function c101102034.actcon(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end function c101102034.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==e:GetHandler() end function c101102034.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_MZONE,nil) if chk==0 then return #g>0 end Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function c101102034.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) if #g>0 then Duel.HintSelection(g) Duel.SendtoHand(g,nil,REASON_EFFECT) end end function c101102034.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_FUSION) end function c101102034.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsContains(c) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(c101102034.cfilter,tp,LOCATION_MZONE,0,2,nil) end function c101102034.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) end function c101102034.disop(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end end
function start_game_event(frame) end
local mimetypes = require 'mimetypes' local File = require 'pegasus.file' -- solution by @cwarden - https://gist.github.com/cwarden/1207556 local function catch(what) return what[1] end local function try(what) local status, result = pcall(what[1]) if not status then what[2](result) end return result end function DEC_HEX(IN) local B,K,OUT,I,D=16,"0123456789ABCDEF", "", 0 while IN>0 do I=I+1 local m = IN- math.floor(IN/B)*B IN,D=math.floor(IN/B), m + 1 OUT=string.sub(K,D,D)..OUT end return OUT end local STATUS_TEXT = { [100] = 'Continue', [101] = 'Switching Protocols', [200] = 'OK', [201] = 'Created', [202] = 'Accepted', [203] = 'Non-Authoritative Information', [204] = 'No Content', [205] = 'Reset Content', [206] = 'Partial Content', [300] = 'Multiple Choices', [301] = 'Moved Permanently', [302] = 'Found', [303] = 'See Other', [304] = 'Not Modified', [305] = 'Use Proxy', [307] = 'Temporary Redirect', [400] = 'Bad Request', [401] = 'Unauthorized', [402] = 'Payment Required', [403] = 'Forbidden', [404] = 'Not Found', [405] = 'Method Not Allowed', [406] = 'Not Acceptable', [407] = 'Proxy Authentication Required', [408] = 'Request Time-out', [409] = 'Conflict', [410] = 'Gone', [411] = 'Length Required', [412] = 'Precondition Failed', [413] = 'Request Entity Too Large', [414] = 'Request-URI Too Large', [415] = 'Unsupported Media Type', [416] = 'Requested range not satisfiable', [417] = 'Expectation Failed', [500] = 'Internal Server Error', [501] = 'Not Implemented', [502] = 'Bad Gateway', [503] = 'Service Unavailable', [504] = 'Gateway Time-out', [505] = 'HTTP Version not supported', } local DEFAULT_ERROR_MESSAGE = [[ <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'> <html> <head> <meta http-equiv='Content-Type' content='text/html;charset=utf-8'> <title>Error response</title> </head> <body> <h1>Error response</h1> <p>Error code: {{ STATUS_CODE }}</p> <p>Message: {{ STATUS_TEXT }}</p> </body> </html> ]] local Response = {} function Response:new(client) local newObj = {} self.__index = self newObj.body = '' newObj.headers_sended = false newObj.templateFirstLine = 'HTTP/1.1 {{ STATUS_CODE }} {{ STATUS_TEXT }}\r\n' newObj.headFirstLine = '' newObj.headers = {} newObj.status = 200 newObj.filename = '' self.closed = false self.client = client return setmetatable(newObj, self) end function Response:_process(request, location) self.filename = '.' .. location .. request:path() local body = File:open(self.filename) if not body then self:_prepareWrite(body, 404) return end try { function() self:_prepareWrite(body, 200) end } catch { function(error) self:_prepareWrite(body, 500) end } end function Response:addHeader(key, value) self.headers[key] = value return self end function Response:addHeaders(params) for key, value in pairs(params) do self.headers[key] = value end return self end function Response:contentType(value) self.headers['Content-Type'] = value return self end function Response:statusCode(statusCode, statusText) self.status = statusCode self.headFirstLine = string.gsub(self.templateFirstLine, '{{ STATUS_CODE }}', statusCode) self.headFirstLine = string.gsub(self.headFirstLine, '{{ STATUS_TEXT }}', statusText or STATUS_TEXT[statusCode]) return self end function Response:_getHeaders() local headers = '' for key, value in pairs(self.headers) do headers = headers .. key .. ': ' .. value .. '\r\n' end return headers end function Response:_prepareWrite(body, statusCode) self:statusCode(statusCode or 200) local content = body if statusCode >= 400 then content = string.gsub(DEFAULT_ERROR_MESSAGE, '{{ STATUS_CODE }}', statusCode) content = string.gsub(content, '{{ STATUS_TEXT }}', STATUS_TEXT[statusCode]) end self:write(content) end function Response:_setDefaultHeaders() if self.closed then self:addHeader('Content-Length', self.body:len() ) else self:addHeader('Transfer-Encoding', 'chunked') end if not self.headers['Content-Type'] then self:addHeader('Content-Type', mimetypes.guess(self.filename or '') or 'text/html') end end function Response:close() self.client:send('0\r\n\r\n') end function Response:write(body, stayopen) self.body = body self.closed = not (stayopen or false) self:_setDefaultHeaders() local cont = self:_content() self.client:send(cont) self.body = '' self.headers_sended = true if self.closed then self.client:close() end return self end function Response:_content() if self.headers_sended then return DEC_HEX(self.body:len())..'\r\n'..self.body..'\r\n' else local head = self:_getHeaders() result = self.headFirstLine .. head if self.closed then result = result ..'\r\n' .. self.body else result = result ..'\r\n'.. DEC_HEX(self.body:len())..'\r\n'..self.body..'\r\n' end return result end end function Response:writeFile(file) local file = io.open(file, 'r') local value = file:read('*all') self:write(value) return self end return Response
---@alias WowEvent ---| '"ACHIEVEMENT_EARNED"' # `achievementID, alreadyEarned` ---| '"ACHIEVEMENT_PLAYER_NAME"' # `achievementID` ---| '"ACHIEVEMENT_SEARCH_UPDATED"' ---| '"ACTIONBAR_HIDEGRID"' ---| '"ACTIONBAR_PAGE_CHANGED"' ---| '"ACTIONBAR_SHOWGRID"' ---| '"ACTIONBAR_SHOW_BOTTOMLEFT"' ---| '"ACTIONBAR_SLOT_CHANGED"' # `slot` ---| '"ACTIONBAR_UPDATE_COOLDOWN"' ---| '"ACTIONBAR_UPDATE_STATE"' ---| '"ACTIONBAR_UPDATE_USABLE"' ---| '"ACTION_WILL_BIND_ITEM"' ---| '"ACTIVATE_GLYPH"' # `spellID` ---| '"ACTIVE_TALENT_GROUP_CHANGED"' # `curr, prev` ---| '"ADAPTER_LIST_CHANGED"' ---| '"ADDONS_UNLOADING"' # `closingClient` ---| '"ADDON_ACTION_BLOCKED"' # `isTainted, function` ---| '"ADDON_ACTION_FORBIDDEN"' # `isTainted, function` ---| '"ADDON_LOADED"' # `addOnName` ---| '"ADVENTURE_MAP_CLOSE"' ---| '"ADVENTURE_MAP_OPEN"' # `followerTypeID` ---| '"ADVENTURE_MAP_QUEST_UPDATE"' # `questID` ---| '"ADVENTURE_MAP_UPDATE_INSETS"' ---| '"ADVENTURE_MAP_UPDATE_POIS"' ---| '"AJ_DUNGEON_ACTION"' # `lfgDungeonID` ---| '"AJ_OPEN"' ---| '"AJ_PVE_LFG_ACTION"' ---| '"AJ_PVP_ACTION"' # `battleMasterListID` ---| '"AJ_PVP_LFG_ACTION"' ---| '"AJ_PVP_RBG_ACTION"' ---| '"AJ_PVP_SKIRMISH_ACTION"' ---| '"AJ_QUEST_LOG_OPEN"' # `questID, uiMapID` ---| '"AJ_RAID_ACTION"' # `lfgDungeonID` ---| '"AJ_REFRESH_DISPLAY"' # `newAdventureNotice` ---| '"AJ_REWARD_DATA_RECEIVED"' ---| '"ALERT_REGIONAL_CHAT_DISABLED"' ---| '"ALLIED_RACE_CLOSE"' ---| '"ALLIED_RACE_OPEN"' # `raceID` ---| '"ALTERNATIVE_DEFAULT_LANGUAGE_CHANGED"' ---| '"ANIMA_DIVERSION_CLOSE"' ---| '"ANIMA_DIVERSION_OPEN"' # `info` ---| '"ANIMA_DIVERSION_TALENT_UPDATED"' ---| '"ARCHAEOLOGY_CLOSED"' ---| '"ARCHAEOLOGY_FIND_COMPLETE"' # `numFindsCompleted, totalFinds, researchBranchID` ---| '"ARCHAEOLOGY_SURVEY_CAST"' # `numFindsCompleted, totalFinds, researchBranchID, successfulFind` ---| '"ARCHAEOLOGY_TOGGLE"' ---| '"AREA_POIS_UPDATED"' ---| '"AREA_SPIRIT_HEALER_IN_RANGE"' ---| '"AREA_SPIRIT_HEALER_OUT_OF_RANGE"' ---| '"ARENA_COOLDOWNS_UPDATE"' # `unitTarget` ---| '"ARENA_CROWD_CONTROL_SPELL_UPDATE"' # `unitTarget, spellID` ---| '"ARENA_OPPONENT_UPDATE"' # `unitToken, updateReason` ---| '"ARENA_PREP_OPPONENT_SPECIALIZATIONS"' ---| '"ARENA_SEASON_WORLD_STATE"' ---| '"ARTIFACT_CLOSE"' ---| '"ARTIFACT_DIGSITE_COMPLETE"' # `researchBranchID` ---| '"ARTIFACT_ENDGAME_REFUND"' # `numRefundedPowers, refundedTier, bagOrSlotIndex, slotIndex` ---| '"ARTIFACT_RELIC_FORGE_CLOSE"' ---| '"ARTIFACT_RELIC_FORGE_PREVIEW_RELIC_CHANGED"' ---| '"ARTIFACT_RELIC_FORGE_UPDATE"' ---| '"ARTIFACT_RELIC_INFO_RECEIVED"' ---| '"ARTIFACT_RESPEC_PROMPT"' ---| '"ARTIFACT_TIER_CHANGED"' # `newTier, bagOrSlotIndex, slotIndex` ---| '"ARTIFACT_UPDATE"' # `newItem` ---| '"ARTIFACT_XP_UPDATE"' ---| '"AUCTION_CANCELED"' # `auctionID` ---| '"AUCTION_HOUSE_AUCTION_CREATED"' # `auctionID` ---| '"AUCTION_HOUSE_BROWSE_FAILURE"' ---| '"AUCTION_HOUSE_BROWSE_RESULTS_ADDED"' # `addedBrowseResults` ---| '"AUCTION_HOUSE_BROWSE_RESULTS_UPDATED"' ---| '"AUCTION_HOUSE_CLOSED"' ---| '"AUCTION_HOUSE_DISABLED"' ---| '"AUCTION_HOUSE_FAVORITES_UPDATED"' ---| '"AUCTION_HOUSE_NEW_BID_RECEIVED"' # `auctionID` ---| '"AUCTION_HOUSE_NEW_RESULTS_RECEIVED"' # `itemKey` ---| '"AUCTION_HOUSE_SCRIPT_DEPRECATED"' ---| '"AUCTION_HOUSE_SHOW"' ---| '"AUCTION_HOUSE_SHOW_COMMODITY_WON_NOTIFICATION"' # `commodityName, commodityQuantity` ---| '"AUCTION_HOUSE_SHOW_ERROR"' # `error` ---| '"AUCTION_HOUSE_SHOW_FORMATTED_NOTIFICATION"' # `notification, text` ---| '"AUCTION_HOUSE_SHOW_NOTIFICATION"' # `notification` ---| '"AUCTION_HOUSE_THROTTLED_MESSAGE_DROPPED"' ---| '"AUCTION_HOUSE_THROTTLED_MESSAGE_QUEUED"' ---| '"AUCTION_HOUSE_THROTTLED_MESSAGE_RESPONSE_RECEIVED"' ---| '"AUCTION_HOUSE_THROTTLED_MESSAGE_SENT"' ---| '"AUCTION_HOUSE_THROTTLED_SYSTEM_READY"' ---| '"AUCTION_MULTISELL_FAILURE"' ---| '"AUCTION_MULTISELL_START"' # `numRepetitions` ---| '"AUCTION_MULTISELL_UPDATE"' # `createdCount, totalToCreate` ---| '"AUTOFOLLOW_BEGIN"' # `name` ---| '"AUTOFOLLOW_END"' ---| '"AVATAR_LIST_UPDATED"' # `clubType` ---| '"AVOIDANCE_UPDATE"' ---| '"AZERITE_EMPOWERED_ITEM_EQUIPPED_STATUS_CHANGED"' # `isHeartEquipped` ---| '"AZERITE_EMPOWERED_ITEM_LOOTED"' # `itemLink` ---| '"AZERITE_EMPOWERED_ITEM_SELECTION_UPDATED"' # `azeriteEmpoweredItemLocation` ---| '"AZERITE_ESSENCE_ACTIVATED"' # `slot, essenceID` ---| '"AZERITE_ESSENCE_ACTIVATION_FAILED"' # `slot, essenceID` ---| '"AZERITE_ESSENCE_CHANGED"' # `essenceID, newRank` ---| '"AZERITE_ESSENCE_FORGE_CLOSE"' ---| '"AZERITE_ESSENCE_FORGE_OPEN"' ---| '"AZERITE_ESSENCE_MILESTONE_UNLOCKED"' # `milestoneID` ---| '"AZERITE_ESSENCE_UPDATE"' ---| '"AZERITE_ITEM_ENABLED_STATE_CHANGED"' # `enabled` ---| '"AZERITE_ITEM_EXPERIENCE_CHANGED"' # `azeriteItemLocation, oldExperienceAmount, newExperienceAmount` ---| '"AZERITE_ITEM_POWER_LEVEL_CHANGED"' # `azeriteItemLocation, oldPowerLevel, newPowerLevel, unlockedEmpoweredItemsInfo` ---| '"BAG_CLOSED"' # `bagID` ---| '"BAG_NEW_ITEMS_UPDATED"' ---| '"BAG_OPEN"' # `bagID` ---| '"BAG_OVERFLOW_WITH_FULL_INVENTORY"' ---| '"BAG_SLOT_FLAGS_UPDATED"' # `slot` ---| '"BAG_UPDATE"' # `bagID` ---| '"BAG_UPDATE_COOLDOWN"' ---| '"BAG_UPDATE_DELAYED"' ---| '"BANKFRAME_CLOSED"' ---| '"BANKFRAME_OPENED"' ---| '"BANK_BAG_SLOT_FLAGS_UPDATED"' # `slot` ---| '"BARBER_SHOP_APPEARANCE_APPLIED"' ---| '"BARBER_SHOP_CAMERA_VALUES_UPDATED"' ---| '"BARBER_SHOP_CLOSE"' ---| '"BARBER_SHOP_COST_UPDATE"' ---| '"BARBER_SHOP_FORCE_CUSTOMIZATIONS_UPDATE"' ---| '"BARBER_SHOP_OPEN"' ---| '"BARBER_SHOP_RESULT"' # `success` ---| '"BATTLEFIELDS_CLOSED"' ---| '"BATTLEFIELDS_SHOW"' # `isArena, battleMasterListID` ---| '"BATTLEFIELD_QUEUE_TIMEOUT"' ---| '"BATTLEGROUND_OBJECTIVES_UPDATE"' ---| '"BATTLEGROUND_POINTS_UPDATE"' ---| '"BATTLEPET_FORCE_NAME_DECLENSION"' # `name, battlePetGUID` ---| '"BATTLETAG_INVITE_SHOW"' # `name` ---| '"BATTLE_PET_CURSOR_CLEAR"' ---| '"BEHAVIORAL_NOTIFICATION"' # `notificationType, dbId` ---| '"BIDS_UPDATED"' ---| '"BID_ADDED"' # `bidID` ---| '"BIND_ENCHANT"' ---| '"BLACK_MARKET_BID_RESULT"' # `marketID, resultCode` ---| '"BLACK_MARKET_CLOSE"' ---| '"BLACK_MARKET_ITEM_UPDATE"' ---| '"BLACK_MARKET_OPEN"' ---| '"BLACK_MARKET_OUTBID"' # `marketID, itemID` ---| '"BLACK_MARKET_UNAVAILABLE"' ---| '"BLACK_MARKET_WON"' # `marketID, itemID` ---| '"BNET_REQUEST_INVITE_CONFIRMATION"' # `gameAccountID, questSessionActive, tank, healer, dps` ---| '"BN_BLOCK_FAILED_TOO_MANY"' # `blockType` ---| '"BN_BLOCK_LIST_UPDATED"' ---| '"BN_CHAT_MSG_ADDON"' # `prefix, text, channel, senderID` ---| '"BN_CHAT_WHISPER_UNDELIVERABLE"' # `senderID` ---| '"BN_CONNECTED"' # `suppressNotification` ---| '"BN_CUSTOM_MESSAGE_CHANGED"' # `id` ---| '"BN_CUSTOM_MESSAGE_LOADED"' ---| '"BN_DISCONNECTED"' # `result, suppressNotification` ---| '"BN_FRIEND_ACCOUNT_OFFLINE"' # `friendId, isCompanionApp` ---| '"BN_FRIEND_ACCOUNT_ONLINE"' # `friendId, isCompanionApp` ---| '"BN_FRIEND_INFO_CHANGED"' # `friendIndex` ---| '"BN_FRIEND_INVITE_ADDED"' # `accountID` ---| '"BN_FRIEND_INVITE_LIST_INITIALIZED"' # `listSize` ---| '"BN_FRIEND_INVITE_REMOVED"' ---| '"BN_FRIEND_LIST_SIZE_CHANGED"' # `accountID` ---| '"BN_INFO_CHANGED"' ---| '"BN_REQUEST_FOF_SUCCEEDED"' ---| '"BONUS_ROLL_ACTIVATE"' ---| '"BONUS_ROLL_DEACTIVATE"' ---| '"BONUS_ROLL_FAILED"' ---| '"BONUS_ROLL_RESULT"' # `typeIdentifier, itemLink, quantity, specID, sex, personalLootToast, currencyID, isSecondaryResult, corrupted` ---| '"BONUS_ROLL_STARTED"' ---| '"BOSS_KILL"' # `encounterID, encounterName` ---| '"CALENDAR_ACTION_PENDING"' # `pending` ---| '"CALENDAR_CLOSE_EVENT"' ---| '"CALENDAR_EVENT_ALARM"' # `title, hour, minute` ---| '"CALENDAR_NEW_EVENT"' # `isCopy` ---| '"CALENDAR_OPEN_EVENT"' # `calendarType` ---| '"CALENDAR_UPDATE_ERROR"' # `errorReason` ---| '"CALENDAR_UPDATE_ERROR_WITH_COUNT"' # `errorReason, count` ---| '"CALENDAR_UPDATE_ERROR_WITH_PLAYER_NAME"' # `errorReason, playerName` ---| '"CALENDAR_UPDATE_EVENT"' ---| '"CALENDAR_UPDATE_EVENT_LIST"' ---| '"CALENDAR_UPDATE_GUILD_EVENTS"' ---| '"CALENDAR_UPDATE_INVITE_LIST"' # `hasCompleteList` ---| '"CALENDAR_UPDATE_PENDING_INVITES"' ---| '"CANCEL_GLYPH_CAST"' ---| '"CANCEL_LOOT_ROLL"' # `rollID` ---| '"CANCEL_SUMMON"' ---| '"CAPTUREFRAMES_FAILED"' ---| '"CAPTUREFRAMES_SUCCEEDED"' ---| '"CEMETERY_PREFERENCE_UPDATED"' ---| '"CHALLENGE_MODE_COMPLETED"' ---| '"CHALLENGE_MODE_DEATH_COUNT_UPDATED"' ---| '"CHALLENGE_MODE_KEYSTONE_RECEPTABLE_OPEN"' ---| '"CHALLENGE_MODE_KEYSTONE_SLOTTED"' # `keystoneID` ---| '"CHALLENGE_MODE_LEADERS_UPDATE"' ---| '"CHALLENGE_MODE_MAPS_UPDATE"' ---| '"CHALLENGE_MODE_MEMBER_INFO_UPDATED"' ---| '"CHALLENGE_MODE_RESET"' # `mapID` ---| '"CHALLENGE_MODE_START"' # `mapID` ---| '"CHANNEL_COUNT_UPDATE"' # `displayIndex, count` ---| '"CHANNEL_FLAGS_UPDATED"' # `displayIndex` ---| '"CHANNEL_INVITE_REQUEST"' # `channelID, name` ---| '"CHANNEL_LEFT"' # `chatChannelID, name` ---| '"CHANNEL_PASSWORD_REQUEST"' # `channelID` ---| '"CHANNEL_ROSTER_UPDATE"' # `displayIndex, count` ---| '"CHANNEL_UI_UPDATE"' ---| '"CHARACTER_ITEM_FIXUP_NOTIFICATION"' # `fixupVersion` ---| '"CHARACTER_POINTS_CHANGED"' # `change` ---| '"CHARACTER_UPGRADE_SPELL_TIER_SET"' # `tierIndex` ---| '"CHAT_COMBAT_MSG_ARENA_POINTS_GAIN"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_DISABLED_CHANGED"' # `disabled` ---| '"CHAT_DISABLED_CHANGE_FAILED"' # `disabled` ---| '"CHAT_MSG_ACHIEVEMENT"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_ADDON"' # `prefix, text, channel, sender, target, zoneChannelID, localID, name, instanceID` ---| '"CHAT_MSG_ADDON_LOGGED"' # `prefix, text, channel, sender, target, zoneChannelID, localID, name, instanceID` ---| '"CHAT_MSG_AFK"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BG_SYSTEM_ALLIANCE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BG_SYSTEM_HORDE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BG_SYSTEM_NEUTRAL"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BN"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BN_INLINE_TOAST_ALERT"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BN_INLINE_TOAST_BROADCAST"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BN_INLINE_TOAST_BROADCAST_INFORM"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BN_INLINE_TOAST_CONVERSATION"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BN_WHISPER"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BN_WHISPER_INFORM"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_BN_WHISPER_PLAYER_OFFLINE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_CHANNEL"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_CHANNEL_JOIN"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_CHANNEL_LEAVE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_CHANNEL_LEAVE_PREVENTED"' # `channelName` ---| '"CHAT_MSG_CHANNEL_LIST"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_CHANNEL_NOTICE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_CHANNEL_NOTICE_USER"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_COMBAT_FACTION_CHANGE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_COMBAT_HONOR_GAIN"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_COMBAT_MISC_INFO"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_COMBAT_XP_GAIN"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_COMMUNITIES_CHANNEL"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_CURRENCY"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_DND"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_EMOTE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_FILTERED"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_GUILD"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_GUILD_ACHIEVEMENT"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_GUILD_ITEM_LOOTED"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_IGNORED"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_INSTANCE_CHAT"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_INSTANCE_CHAT_LEADER"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_LOOT"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_MONEY"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_MONSTER_EMOTE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_MONSTER_PARTY"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_MONSTER_SAY"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_MONSTER_WHISPER"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_MONSTER_YELL"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_OFFICER"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_OPENING"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_PARTY"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_PARTY_LEADER"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_PET_BATTLE_COMBAT_LOG"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_PET_BATTLE_INFO"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_PET_INFO"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_RAID"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_RAID_BOSS_EMOTE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_RAID_BOSS_WHISPER"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_RAID_LEADER"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_RAID_WARNING"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_RESTRICTED"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_SAY"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_SKILL"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_SYSTEM"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_TARGETICONS"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_TEXT_EMOTE"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_TRADESKILLS"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_VOICE_TEXT"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_WHISPER"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_WHISPER_INFORM"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_MSG_YELL"' # `text, playerName, languageName, channelName, playerName2, specialFlags, zoneChannelID, channelIndex, channelBaseName, languageID, lineID, guid, bnSenderID, isMobile, isSubtitle, hideSenderInLetterbox, supressRaidIcons` ---| '"CHAT_REGIONAL_SEND_FAILED"' ---| '"CHAT_REGIONAL_STATUS_CHANGED"' # `isServiceAvailable` ---| '"CHAT_SERVER_DISCONNECTED"' # `isInitialMessage` ---| '"CHAT_SERVER_RECONNECTED"' ---| '"CHROMIE_TIME_CLOSE"' ---| '"CHROMIE_TIME_OPEN"' ---| '"CINEMATIC_START"' # `canBeCancelled` ---| '"CINEMATIC_STOP"' ---| '"CLASS_TRIAL_TIMER_START"' ---| '"CLASS_TRIAL_UPGRADE_COMPLETE"' ---| '"CLEAR_BOSS_EMOTES"' ---| '"CLICKBINDINGS_SET_HIGHLIGHTS_SHOWN"' # `showHighlights` ---| '"CLOSE_INBOX_ITEM"' # `mailIndex` ---| '"CLOSE_TABARD_FRAME"' ---| '"CLUB_ADDED"' # `clubId` ---| '"CLUB_ERROR"' # `action, error, clubType` ---| '"CLUB_FINDER_APPLICANT_INVITE_RECIEVED"' # `clubFinderGUIDs` ---| '"CLUB_FINDER_APPLICATIONS_UPDATED"' # `type, clubFinderGUIDs` ---| '"CLUB_FINDER_CLUB_LIST_RETURNED"' # `type` ---| '"CLUB_FINDER_CLUB_REPORTED"' # `type, clubFinderGUID` ---| '"CLUB_FINDER_COMMUNITY_OFFLINE_JOIN"' # `clubId` ---| '"CLUB_FINDER_ENABLED_OR_DISABLED"' ---| '"CLUB_FINDER_LINKED_CLUB_RETURNED"' # `clubInfo` ---| '"CLUB_FINDER_MEMBERSHIP_LIST_CHANGED"' ---| '"CLUB_FINDER_PLAYER_PENDING_LIST_RECIEVED"' # `type` ---| '"CLUB_FINDER_POST_UPDATED"' # `clubFinderGUIDs` ---| '"CLUB_FINDER_RECRUITMENT_POST_RETURNED"' # `type` ---| '"CLUB_FINDER_RECRUITS_UPDATED"' # `type` ---| '"CLUB_FINDER_RECRUIT_LIST_CHANGED"' ---| '"CLUB_INVITATIONS_RECEIVED_FOR_CLUB"' # `clubId` ---| '"CLUB_INVITATION_ADDED_FOR_SELF"' # `invitation` ---| '"CLUB_INVITATION_REMOVED_FOR_SELF"' # `invitationId` ---| '"CLUB_MEMBER_ADDED"' # `clubId, memberId` ---| '"CLUB_MEMBER_PRESENCE_UPDATED"' # `clubId, memberId, presence` ---| '"CLUB_MEMBER_REMOVED"' # `clubId, memberId` ---| '"CLUB_MEMBER_ROLE_UPDATED"' # `clubId, memberId, roleId` ---| '"CLUB_MEMBER_UPDATED"' # `clubId, memberId` ---| '"CLUB_MESSAGE_ADDED"' # `clubId, streamId, messageId` ---| '"CLUB_MESSAGE_HISTORY_RECEIVED"' # `clubId, streamId, downloadedRange, contiguousRange` ---| '"CLUB_MESSAGE_UPDATED"' # `clubId, streamId, messageId` ---| '"CLUB_REMOVED"' # `clubId` ---| '"CLUB_REMOVED_MESSAGE"' # `clubName, clubRemovedReason` ---| '"CLUB_SELF_MEMBER_ROLE_UPDATED"' # `clubId, roleId` ---| '"CLUB_STREAMS_LOADED"' # `clubId` ---| '"CLUB_STREAM_ADDED"' # `clubId, streamId` ---| '"CLUB_STREAM_REMOVED"' # `clubId, streamId` ---| '"CLUB_STREAM_SUBSCRIBED"' # `clubId, streamId` ---| '"CLUB_STREAM_UNSUBSCRIBED"' # `clubId, streamId` ---| '"CLUB_STREAM_UPDATED"' # `clubId, streamId` ---| '"CLUB_TICKETS_RECEIVED"' # `clubId` ---| '"CLUB_TICKET_CREATED"' # `clubId, ticketInfo` ---| '"CLUB_TICKET_RECEIVED"' # `ticket` ---| '"CLUB_UPDATED"' # `clubId` ---| '"COMBAT_LOG_EVENT"' ---| '"COMBAT_LOG_EVENT_UNFILTERED"' ---| '"COMBAT_RATING_UPDATE"' ---| '"COMBAT_TEXT_UPDATE"' # `combatTextType` ---| '"COMMENTATOR_ENTER_WORLD"' ---| '"COMMENTATOR_HISTORY_FLUSHED"' ---| '"COMMENTATOR_IMMEDIATE_FOV_UPDATE"' # `fov` ---| '"COMMENTATOR_MAP_UPDATE"' ---| '"COMMENTATOR_PLAYER_NAME_OVERRIDE_UPDATE"' # `nameToOverride, overrideName` ---| '"COMMENTATOR_PLAYER_UPDATE"' ---| '"COMMENTATOR_RESET_SETTINGS"' ---| '"COMMENTATOR_TEAMS_SWAPPED"' # `swapped` ---| '"COMMENTATOR_TEAM_NAME_UPDATE"' # `teamName` ---| '"COMMODITY_PRICE_UNAVAILABLE"' ---| '"COMMODITY_PRICE_UPDATED"' # `updatedUnitPrice, updatedTotalPrice` ---| '"COMMODITY_PURCHASED"' # `itemID, quantity` ---| '"COMMODITY_PURCHASE_FAILED"' ---| '"COMMODITY_PURCHASE_SUCCEEDED"' ---| '"COMMODITY_SEARCH_RESULTS_ADDED"' # `itemID` ---| '"COMMODITY_SEARCH_RESULTS_UPDATED"' # `itemID` ---| '"COMMUNITIES_STREAM_CURSOR_CLEAR"' ---| '"COMPACT_UNIT_FRAME_PROFILES_LOADED"' ---| '"COMPANION_LEARNED"' ---| '"COMPANION_UNLEARNED"' ---| '"COMPANION_UPDATE"' # `companionType` ---| '"CONFIRM_BEFORE_USE"' ---| '"CONFIRM_BINDER"' # `areaName` ---| '"CONFIRM_DISENCHANT_ROLL"' # `rollID, rollType` ---| '"CONFIRM_LOOT_ROLL"' # `rollID, rollType, confirmReason` ---| '"CONFIRM_SUMMON"' # `summonReason, skippingStartExperience` ---| '"CONFIRM_TALENT_WIPE"' # `cost, respecType` ---| '"CONFIRM_XP_LOSS"' ---| '"CONSOLE_CLEAR"' ---| '"CONSOLE_COLORS_CHANGED"' ---| '"CONSOLE_FONT_SIZE_CHANGED"' ---| '"CONSOLE_LOG"' # `message` ---| '"CONSOLE_MESSAGE"' # `message, colorType` ---| '"CONTRIBUTION_CHANGED"' # `state, result, name, contributionID` ---| '"CONTRIBUTION_COLLECTOR_CLOSE"' ---| '"CONTRIBUTION_COLLECTOR_OPEN"' ---| '"CONTRIBUTION_COLLECTOR_PENDING"' # `contributionID, isPending, result` ---| '"CONTRIBUTION_COLLECTOR_UPDATE"' ---| '"CONTRIBUTION_COLLECTOR_UPDATE_SINGLE"' # `contributionID` ---| '"CONVERT_TO_RAID_CONFIRMATION"' ---| '"CORPSE_IN_INSTANCE"' ---| '"CORPSE_IN_RANGE"' ---| '"CORPSE_OUT_OF_RANGE"' ---| '"COVENANT_CALLINGS_UPDATED"' # `callings` ---| '"COVENANT_CHOSEN"' # `covenantID` ---| '"COVENANT_PREVIEW_CLOSE"' ---| '"COVENANT_PREVIEW_OPEN"' # `previewInfo` ---| '"COVENANT_RENOWN_CATCH_UP_STATE_UPDATE"' ---| '"COVENANT_RENOWN_INTERACTION_ENDED"' ---| '"COVENANT_RENOWN_INTERACTION_STARTED"' ---| '"COVENANT_SANCTUM_INTERACTION_ENDED"' ---| '"COVENANT_SANCTUM_INTERACTION_STARTED"' ---| '"COVENANT_SANCTUM_RENOWN_LEVEL_CHANGED"' # `newRenownLevel, oldRenownLevel` ---| '"CRITERIA_COMPLETE"' # `criteriaID` ---| '"CRITERIA_EARNED"' # `achievementID, description` ---| '"CRITERIA_UPDATE"' ---| '"CURRENCY_DISPLAY_UPDATE"' # `currencyType, quantity, quantityChange, quantityGainSource, quantityLostSource` ---| '"CURRENT_SPELL_CAST_CHANGED"' # `cancelledCast` ---| '"CURSOR_CHANGED"' # `isDefault, newCursorType, oldCursorType, oldCursorVirtualID` ---| '"CURSOR_UPDATE"' ---| '"CVAR_UPDATE"' # `eventName, value` ---| '"DELETE_ITEM_CONFIRM"' # `itemName, qualityID, bonding, questWarn` ---| '"DISABLE_DECLINE_GUILD_INVITE"' ---| '"DISABLE_LOW_LEVEL_RAID"' ---| '"DISABLE_TAXI_BENCHMARK"' ---| '"DISABLE_XP_GAIN"' ---| '"DISPLAY_EVENT_TOASTS"' ---| '"DISPLAY_EVENT_TOAST_LINK"' # `link` ---| '"DISPLAY_SIZE_CHANGED"' ---| '"DUEL_FINISHED"' ---| '"DUEL_INBOUNDS"' ---| '"DUEL_OUTOFBOUNDS"' ---| '"DUEL_REQUESTED"' # `playerName` ---| '"DYNAMIC_GOSSIP_POI_UPDATED"' ---| '"EJ_DIFFICULTY_UPDATE"' # `difficultyID` ---| '"EJ_LOOT_DATA_RECIEVED"' # `itemID` ---| '"ENABLE_DECLINE_GUILD_INVITE"' ---| '"ENABLE_LOW_LEVEL_RAID"' ---| '"ENABLE_TAXI_BENCHMARK"' ---| '"ENABLE_XP_GAIN"' ---| '"ENCOUNTER_END"' # `encounterID, encounterName, difficultyID, groupSize, success` ---| '"ENCOUNTER_LOOT_RECEIVED"' # `encounterID, itemID, itemLink, quantity, itemName, fileName` ---| '"ENCOUNTER_START"' # `encounterID, encounterName, difficultyID, groupSize` ---| '"END_BOUND_TRADEABLE"' # `reason` ---| '"ENTERED_DIFFERENT_INSTANCE_FROM_PARTY"' ---| '"ENTITLEMENT_DELIVERED"' # `entitlementType, textureID, name, payloadID, showFancyToast` ---| '"EQUIPMENT_SETS_CHANGED"' ---| '"EQUIPMENT_SWAP_FINISHED"' # `result, setID` ---| '"EQUIPMENT_SWAP_PENDING"' ---| '"EQUIP_BIND_CONFIRM"' # `slot` ---| '"EQUIP_BIND_REFUNDABLE_CONFIRM"' # `slot` ---| '"EQUIP_BIND_TRADEABLE_CONFIRM"' # `slot` ---| '"EXECUTE_CHAT_LINE"' # `chatLine` ---| '"EXTRA_BROWSE_INFO_RECEIVED"' # `itemID` ---| '"FIRST_FRAME_RENDERED"' ---| '"FOG_OF_WAR_UPDATED"' ---| '"FORBIDDEN_NAME_PLATE_CREATED"' # `namePlateFrame` ---| '"FORBIDDEN_NAME_PLATE_UNIT_ADDED"' # `unitToken` ---| '"FORBIDDEN_NAME_PLATE_UNIT_REMOVED"' # `unitToken` ---| '"FRAME_MANAGER_UPDATE_ALL"' ---| '"FRAME_MANAGER_UPDATE_FRAME"' # `type, show` ---| '"FRIENDLIST_UPDATE"' ---| '"GAME_PAD_ACTIVE_CHANGED"' # `isActive` ---| '"GAME_PAD_CONFIGS_CHANGED"' ---| '"GAME_PAD_CONNECTED"' ---| '"GAME_PAD_DISCONNECTED"' ---| '"GARRISON_ARCHITECT_CLOSED"' ---| '"GARRISON_ARCHITECT_OPENED"' # `followerTypeID` ---| '"GARRISON_BUILDING_ACTIVATABLE"' # `buildingName, garrisonType` ---| '"GARRISON_BUILDING_ACTIVATED"' # `garrisonPlotInstanceID, garrisonBuildingID` ---| '"GARRISON_BUILDING_ERROR"' ---| '"GARRISON_BUILDING_LIST_UPDATE"' # `categoryID` ---| '"GARRISON_BUILDING_PLACED"' # `garrisonPlotInstanceID, newPlacement` ---| '"GARRISON_BUILDING_REMOVED"' # `garrPlotInstanceID, garrBuildingID` ---| '"GARRISON_BUILDING_UPDATE"' # `garrisonBuildingID, garrPlotInstanceID` ---| '"GARRISON_FOLLOWER_ADDED"' # `followerDbID, followerName, followerClassName, followerLevel, followerQuality, isUpgraded, textureKit, followerTypeID` ---| '"GARRISON_FOLLOWER_CATEGORIES_UPDATED"' ---| '"GARRISON_FOLLOWER_DURABILITY_CHANGED"' # `garrFollowerTypeID, followerDbID, followerDurability` ---| '"GARRISON_FOLLOWER_HEALED"' # `followerID` ---| '"GARRISON_FOLLOWER_LIST_UPDATE"' # `followerTypeID` ---| '"GARRISON_FOLLOWER_REMOVED"' # `followerTypeID` ---| '"GARRISON_FOLLOWER_UPGRADED"' # `followerDbID` ---| '"GARRISON_FOLLOWER_XP_CHANGED"' # `garrFollowerTypeID, followerDbID, xpChange, oldFollowerXp, oldFollowerLevel, oldFollowerQuality` ---| '"GARRISON_HIDE_LANDING_PAGE"' ---| '"GARRISON_INVASION_AVAILABLE"' ---| '"GARRISON_INVASION_UNAVAILABLE"' ---| '"GARRISON_LANDINGPAGE_SHIPMENTS"' ---| '"GARRISON_MISSION_AREA_BONUS_ADDED"' # `garrisonMissonBonusAbilityID` ---| '"GARRISON_MISSION_BONUS_ROLL_COMPLETE"' # `missionID, success` ---| '"GARRISON_MISSION_BONUS_ROLL_LOOT"' # `itemID, quantity` ---| '"GARRISON_MISSION_COMPLETE_RESPONSE"' # `missionID, canComplete, success, bonusRollSuccess, followerDeaths, autoCombatResult` ---| '"GARRISON_MISSION_FINISHED"' # `followerTypeID, missionID` ---| '"GARRISON_MISSION_LIST_UPDATE"' # `garrFollowerTypeID` ---| '"GARRISON_MISSION_NPC_CLOSED"' ---| '"GARRISON_MISSION_NPC_OPENED"' # `followerTypeID` ---| '"GARRISON_MISSION_REWARD_INFO"' # `missionID, followerDbID` ---| '"GARRISON_MISSION_STARTED"' # `garrFollowerTypeID, missionID` ---| '"GARRISON_MONUMENT_CLOSE_UI"' ---| '"GARRISON_MONUMENT_LIST_LOADED"' # `success` ---| '"GARRISON_MONUMENT_REPLACED"' # `success` ---| '"GARRISON_MONUMENT_SELECTED_TROPHY_ID_LOADED"' # `success` ---| '"GARRISON_MONUMENT_SHOW_UI"' ---| '"GARRISON_RANDOM_MISSION_ADDED"' # `followerTypeID, missionID` ---| '"GARRISON_RECALL_PORTAL_LAST_USED_TIME"' # `success, recallPortalLastUsedTime` ---| '"GARRISON_RECALL_PORTAL_USED"' # `success` ---| '"GARRISON_RECRUITMENT_FOLLOWERS_GENERATED"' ---| '"GARRISON_RECRUITMENT_NPC_CLOSED"' ---| '"GARRISON_RECRUITMENT_NPC_OPENED"' # `followerTypeID` ---| '"GARRISON_RECRUITMENT_READY"' ---| '"GARRISON_RECRUIT_FOLLOWER_RESULT"' ---| '"GARRISON_SHIPMENT_RECEIVED"' ---| '"GARRISON_SHIPYARD_NPC_CLOSED"' ---| '"GARRISON_SHIPYARD_NPC_OPENED"' # `followerTypeID` ---| '"GARRISON_SHOW_LANDING_PAGE"' ---| '"GARRISON_SPEC_GROUPS_CLEARED"' # `garrTypeID` ---| '"GARRISON_SPEC_GROUP_UPDATED"' # `garrTypeID, specID` ---| '"GARRISON_TALENT_COMPLETE"' # `garrTypeID, doAlert` ---| '"GARRISON_TALENT_EVENT_UPDATE"' # `eventType, eventID` ---| '"GARRISON_TALENT_NPC_CLOSED"' ---| '"GARRISON_TALENT_NPC_OPENED"' # `garrisonTypeID, garrisonTalentTreeID` ---| '"GARRISON_TALENT_RESEARCH_STARTED"' # `garrTypeID, garrisonTalentTreeID, garrTalentID` ---| '"GARRISON_TALENT_UNLOCKS_RESULT"' ---| '"GARRISON_TALENT_UPDATE"' # `garrTypeID` ---| '"GARRISON_TRADESKILL_NPC_CLOSED"' ---| '"GARRISON_UPDATE"' ---| '"GARRISON_UPGRADEABLE_RESULT"' # `garrisonUpgradeable` ---| '"GARRISON_USE_PARTY_GARRISON_CHANGED"' ---| '"GDF_SIM_COMPLETE"' ---| '"GENERIC_ERROR"' # `errorMessage` ---| '"GET_ITEM_INFO_RECEIVED"' # `itemID, success` ---| '"GLOBAL_MOUSE_DOWN"' # `button` ---| '"GLOBAL_MOUSE_UP"' # `button` ---| '"GLUE_CONSOLE_LOG"' # `message` ---| '"GLUE_SCREENSHOT_FAILED"' ---| '"GM_PLAYER_INFO"' # `name, info` ---| '"GOSSIP_CLOSED"' ---| '"GOSSIP_CONFIRM"' # `gossipIndex, text, cost` ---| '"GOSSIP_CONFIRM_CANCEL"' ---| '"GOSSIP_ENTER_CODE"' # `gossipIndex` ---| '"GOSSIP_OPTIONS_REFRESHED"' ---| '"GOSSIP_SHOW"' # `uiTextureKit` ---| '"GROUP_FORMED"' # `category, partyGUID` ---| '"GROUP_INVITE_CONFIRMATION"' ---| '"GROUP_JOINED"' # `category, partyGUID` ---| '"GROUP_LEFT"' # `category, partyGUID` ---| '"GROUP_ROSTER_UPDATE"' ---| '"GUILDBANKBAGSLOTS_CHANGED"' ---| '"GUILDBANKFRAME_CLOSED"' ---| '"GUILDBANKFRAME_OPENED"' ---| '"GUILDBANKLOG_UPDATE"' ---| '"GUILDBANK_ITEM_LOCK_CHANGED"' ---| '"GUILDBANK_TEXT_CHANGED"' # `guildBankTab` ---| '"GUILDBANK_UPDATE_MONEY"' ---| '"GUILDBANK_UPDATE_TABS"' ---| '"GUILDBANK_UPDATE_TEXT"' # `guildBankTab` ---| '"GUILDBANK_UPDATE_WITHDRAWMONEY"' ---| '"GUILDTABARD_UPDATE"' ---| '"GUILD_CHALLENGE_COMPLETED"' # `challengeType, currentCount, maxCount, goldAwarded` ---| '"GUILD_CHALLENGE_UPDATED"' ---| '"GUILD_EVENT_LOG_UPDATE"' ---| '"GUILD_INVITE_CANCEL"' ---| '"GUILD_INVITE_REQUEST"' # `inviter, guildName, guildAchievementPoints, oldGuildName, isNewGuild, tabardInfo` ---| '"GUILD_MOTD"' # `motdText` ---| '"GUILD_NEWS_UPDATE"' ---| '"GUILD_PARTY_STATE_UPDATED"' # `inGuildParty` ---| '"GUILD_RANKS_UPDATE"' ---| '"GUILD_RECIPE_KNOWN_BY_MEMBERS"' ---| '"GUILD_REGISTRAR_CLOSED"' ---| '"GUILD_REGISTRAR_SHOW"' ---| '"GUILD_RENAME_REQUIRED"' # `flagSet` ---| '"GUILD_REWARDS_LIST"' ---| '"GUILD_ROSTER_UPDATE"' # `canRequestRosterUpdate` ---| '"GUILD_TRADESKILL_UPDATE"' ---| '"GX_RESTARTED"' ---| '"HEARTHSTONE_BOUND"' ---| '"HEIRLOOMS_UPDATED"' # `itemID, updateReason, hideUntilLearned` ---| '"HEIRLOOM_UPGRADE_TARGETING_CHANGED"' # `pendingHeirloomUpgradeSpellcast` ---| '"HIDE_SUBTITLE"' ---| '"HONOR_LEVEL_UPDATE"' # `isHigherLevel` ---| '"HONOR_XP_UPDATE"' # `unitTarget` ---| '"IGNORELIST_UPDATE"' ---| '"INCOMING_RESURRECT_CHANGED"' # `unitTarget` ---| '"INCOMING_SUMMON_CHANGED"' # `unitTarget` ---| '"INITIAL_CLUBS_LOADED"' ---| '"INITIAL_HOTFIXES_APPLIED"' ---| '"INSPECT_ACHIEVEMENT_READY"' # `guid` ---| '"INSPECT_HONOR_UPDATE"' ---| '"INSPECT_READY"' # `inspecteeGUID` ---| '"INSTANCE_BOOT_START"' ---| '"INSTANCE_BOOT_STOP"' ---| '"INSTANCE_ENCOUNTER_ADD_TIMER"' # `timeRemaining` ---| '"INSTANCE_ENCOUNTER_ENGAGE_UNIT"' ---| '"INSTANCE_ENCOUNTER_OBJECTIVE_COMPLETE"' # `objectiveID` ---| '"INSTANCE_ENCOUNTER_OBJECTIVE_START"' # `objectiveID, objectiveProgress` ---| '"INSTANCE_ENCOUNTER_OBJECTIVE_UPDATE"' # `objectiveID, objectiveProgress` ---| '"INSTANCE_GROUP_SIZE_CHANGED"' ---| '"INSTANCE_LOCK_START"' ---| '"INSTANCE_LOCK_STOP"' ---| '"INSTANCE_LOCK_WARNING"' ---| '"INVENTORY_SEARCH_UPDATE"' ---| '"INVITE_TO_PARTY_CONFIRMATION"' # `targetName, willConvertToRaid, questSessionActive` ---| '"INVITE_TRAVEL_PASS_CONFIRMATION"' # `targetName, targetGUID, willConvertToRaid, questSessionActive` ---| '"ISLANDS_QUEUE_CLOSE"' ---| '"ISLANDS_QUEUE_OPEN"' ---| '"ISLAND_AZERITE_GAIN"' # `amount, gainedByPlayer, factionIndex, gainedBy, gainedFrom` ---| '"ISLAND_COMPLETED"' # `mapID, winner` ---| '"ITEM_CHANGED"' # `previousHyperlink, newHyperlink` ---| '"ITEM_CONVERSION_DATA_READY"' # `itemGUID` ---| '"ITEM_DATA_LOAD_RESULT"' # `itemID, success` ---| '"ITEM_INTERACTION_CHARGE_INFO_UPDATED"' ---| '"ITEM_INTERACTION_CLOSE"' ---| '"ITEM_INTERACTION_ITEM_SELECTION_UPDATED"' # `itemLocation` ---| '"ITEM_INTERACTION_OPEN"' ---| '"ITEM_KEY_ITEM_INFO_RECEIVED"' # `itemID` ---| '"ITEM_LOCKED"' # `bagOrSlotIndex, slotIndex` ---| '"ITEM_LOCK_CHANGED"' # `bagOrSlotIndex, slotIndex` ---| '"ITEM_PURCHASED"' # `itemID` ---| '"ITEM_PUSH"' # `bagSlot, iconFileID` ---| '"ITEM_RESTORATION_BUTTON_STATUS"' ---| '"ITEM_SEARCH_RESULTS_ADDED"' # `itemKey` ---| '"ITEM_SEARCH_RESULTS_UPDATED"' # `itemKey, newAuctionID` ---| '"ITEM_TEXT_BEGIN"' ---| '"ITEM_TEXT_CLOSED"' ---| '"ITEM_TEXT_READY"' ---| '"ITEM_TEXT_TRANSLATION"' # `delay` ---| '"ITEM_UNLOCKED"' # `bagOrSlotIndex, slotIndex` ---| '"ITEM_UPGRADE_FAILED"' ---| '"ITEM_UPGRADE_MASTER_CLOSED"' ---| '"ITEM_UPGRADE_MASTER_OPENED"' ---| '"ITEM_UPGRADE_MASTER_SET_ITEM"' ---| '"JAILERS_TOWER_LEVEL_UPDATE"' # `level, type` ---| '"KNOWLEDGE_BASE_ARTICLE_LOAD_FAILURE"' ---| '"KNOWLEDGE_BASE_ARTICLE_LOAD_SUCCESS"' ---| '"KNOWLEDGE_BASE_QUERY_LOAD_FAILURE"' ---| '"KNOWLEDGE_BASE_QUERY_LOAD_SUCCESS"' ---| '"KNOWLEDGE_BASE_SERVER_MESSAGE"' ---| '"KNOWLEDGE_BASE_SETUP_LOAD_FAILURE"' ---| '"KNOWLEDGE_BASE_SETUP_LOAD_SUCCESS"' ---| '"KNOWLEDGE_BASE_SYSTEM_MOTD_UPDATED"' ---| '"KNOWN_TITLES_UPDATE"' # `unitTarget` ---| '"LANGUAGE_LIST_CHANGED"' ---| '"LEARNED_SPELL_IN_TAB"' # `spellID, skillInfoIndex, isGuildPerkSpell` ---| '"LEAVE_PARTY_CONFIRMATION"' ---| '"LEAVING_TUTORIAL_AREA"' ---| '"LFG_BOOT_PROPOSAL_UPDATE"' ---| '"LFG_COMPLETION_REWARD"' ---| '"LFG_GROUP_DELISTED_LEADERSHIP_CHANGE"' # `listingName, automaticDelistTimeRemaining` ---| '"LFG_INVALID_ERROR_MESSAGE"' # `reason, subReason1, subReason2` ---| '"LFG_LIST_ACTIVE_ENTRY_UPDATE"' # `created` ---| '"LFG_LIST_APPLICANT_LIST_UPDATED"' # `newPendingEntry, newPendingEntryWithData` ---| '"LFG_LIST_APPLICANT_UPDATED"' # `applicantID` ---| '"LFG_LIST_APPLICATION_STATUS_UPDATED"' # `searchResultID, newStatus, oldStatus, groupName` ---| '"LFG_LIST_AVAILABILITY_UPDATE"' ---| '"LFG_LIST_ENTRY_CREATION_FAILED"' ---| '"LFG_LIST_ENTRY_EXPIRED_TIMEOUT"' ---| '"LFG_LIST_ENTRY_EXPIRED_TOO_MANY_PLAYERS"' ---| '"LFG_LIST_JOINED_GROUP"' # `searchResultID, groupName` ---| '"LFG_LIST_SEARCH_FAILED"' # `reason` ---| '"LFG_LIST_SEARCH_RESULTS_RECEIVED"' ---| '"LFG_LIST_SEARCH_RESULT_UPDATED"' # `searchResultID` ---| '"LFG_LOCK_INFO_RECEIVED"' ---| '"LFG_OFFER_CONTINUE"' # `name, lfgDungeonsID, typeID` ---| '"LFG_OPEN_FROM_GOSSIP"' # `dungeonID` ---| '"LFG_PROPOSAL_DONE"' ---| '"LFG_PROPOSAL_FAILED"' ---| '"LFG_PROPOSAL_SHOW"' ---| '"LFG_PROPOSAL_SUCCEEDED"' ---| '"LFG_PROPOSAL_UPDATE"' ---| '"LFG_QUEUE_STATUS_UPDATE"' ---| '"LFG_READY_CHECK_DECLINED"' # `name` ---| '"LFG_READY_CHECK_HIDE"' ---| '"LFG_READY_CHECK_PLAYER_IS_READY"' # `name` ---| '"LFG_READY_CHECK_SHOW"' # `isRequeue` ---| '"LFG_READY_CHECK_UPDATE"' ---| '"LFG_ROLE_CHECK_DECLINED"' ---| '"LFG_ROLE_CHECK_HIDE"' ---| '"LFG_ROLE_CHECK_ROLE_CHOSEN"' # `name, isTank, isHealer, isDamage` ---| '"LFG_ROLE_CHECK_SHOW"' # `isRequeue` ---| '"LFG_ROLE_CHECK_UPDATE"' ---| '"LFG_ROLE_UPDATE"' ---| '"LFG_UPDATE"' ---| '"LFG_UPDATE_RANDOM_INFO"' ---| '"LIFESTEAL_UPDATE"' ---| '"LOADING_SCREEN_DISABLED"' ---| '"LOADING_SCREEN_ENABLED"' ---| '"LOCALPLAYER_PET_RENAMED"' ---| '"LOC_RESULT"' # `result` ---| '"LOGOUT_CANCEL"' ---| '"LOOT_BIND_CONFIRM"' # `lootSlot` ---| '"LOOT_CLOSED"' ---| '"LOOT_HISTORY_AUTO_SHOW"' # `rollID, isMasterLoot` ---| '"LOOT_HISTORY_FULL_UPDATE"' ---| '"LOOT_HISTORY_ROLL_CHANGED"' # `historyIndex, playerIndex` ---| '"LOOT_HISTORY_ROLL_COMPLETE"' ---| '"LOOT_ITEM_AVAILABLE"' # `itemTooltip, lootHandle` ---| '"LOOT_ITEM_ROLL_WON"' # `itemLink, rollQuantity, rollType, roll, upgraded` ---| '"LOOT_OPENED"' # `autoLoot, isFromItem` ---| '"LOOT_READY"' # `autoloot` ---| '"LOOT_ROLLS_COMPLETE"' # `lootHandle` ---| '"LOOT_SLOT_CHANGED"' # `lootSlot` ---| '"LOOT_SLOT_CLEARED"' # `lootSlot` ---| '"LORE_TEXT_UPDATED_CAMPAIGN"' # `campaignID, textEntries` ---| '"LOSS_OF_CONTROL_ADDED"' # `effectIndex` ---| '"LOSS_OF_CONTROL_COMMENTATOR_ADDED"' # `victim, effectIndex` ---| '"LOSS_OF_CONTROL_COMMENTATOR_UPDATE"' # `victim` ---| '"LOSS_OF_CONTROL_UPDATE"' ---| '"LUA_WARNING"' # `warnType, warningText` ---| '"MACRO_ACTION_BLOCKED"' # `function` ---| '"MACRO_ACTION_FORBIDDEN"' # `function` ---| '"MAIL_CLOSED"' ---| '"MAIL_FAILED"' # `itemID` ---| '"MAIL_INBOX_UPDATE"' ---| '"MAIL_LOCK_SEND_ITEMS"' # `attachSlot, itemLink` ---| '"MAIL_SEND_INFO_UPDATE"' ---| '"MAIL_SEND_SUCCESS"' ---| '"MAIL_SHOW"' ---| '"MAIL_SUCCESS"' # `itemID` ---| '"MAIL_UNLOCK_SEND_ITEMS"' ---| '"MAP_EXPLORATION_UPDATED"' ---| '"MASTERY_UPDATE"' ---| '"MAX_EXPANSION_LEVEL_UPDATED"' ---| '"MAX_SPELL_START_RECOVERY_OFFSET_CHANGED"' # `clampedNewQueueWindowMs` ---| '"MENTORSHIP_STATUS_CHANGED"' ---| '"MERCHANT_CLOSED"' ---| '"MERCHANT_CONFIRM_TRADE_TIMER_REMOVAL"' # `itemLink` ---| '"MERCHANT_FILTER_ITEM_UPDATE"' # `itemID` ---| '"MERCHANT_SHOW"' ---| '"MERCHANT_UPDATE"' ---| '"MINIMAP_PING"' # `unitTarget, y, x` ---| '"MINIMAP_UPDATE_TRACKING"' ---| '"MINIMAP_UPDATE_ZOOM"' ---| '"MIN_EXPANSION_LEVEL_UPDATED"' ---| '"MIRROR_TIMER_PAUSE"' # `timerName, paused` ---| '"MIRROR_TIMER_START"' # `timerName, value, maxValue, scale, paused, timerLabel` ---| '"MIRROR_TIMER_STOP"' # `timerName` ---| '"MODIFIER_STATE_CHANGED"' # `key, down` ---| '"MOUNT_CURSOR_CLEAR"' ---| '"MOUNT_EQUIPMENT_APPLY_RESULT"' # `success` ---| '"MOUNT_JOURNAL_SEARCH_UPDATED"' ---| '"MOUNT_JOURNAL_USABILITY_CHANGED"' ---| '"MUTELIST_UPDATE"' ---| '"MYTHIC_PLUS_CURRENT_AFFIX_UPDATE"' ---| '"MYTHIC_PLUS_NEW_WEEKLY_RECORD"' # `mapChallengeModeID, completionMilliseconds, level` ---| '"NAME_PLATE_CREATED"' # `namePlateFrame` ---| '"NAME_PLATE_UNIT_ADDED"' # `unitToken` ---| '"NAME_PLATE_UNIT_REMOVED"' # `unitToken` ---| '"NAVIGATION_FRAME_CREATED"' # `region` ---| '"NAVIGATION_FRAME_DESTROYED"' ---| '"NEUTRAL_FACTION_SELECT_RESULT"' # `success` ---| '"NEWCOMER_GRADUATION"' ---| '"NEW_MOUNT_ADDED"' # `mountID` ---| '"NEW_PET_ADDED"' # `battlePetGUID` ---| '"NEW_RECIPE_LEARNED"' # `recipeID, recipeLevel, baseRecipeID` ---| '"NEW_RUNEFORGE_POWER_ADDED"' # `powerID` ---| '"NEW_TOY_ADDED"' # `itemID` ---| '"NEW_WMO_CHUNK"' ---| '"NOTCHED_DISPLAY_MODE_CHANGED"' ---| '"NOTIFY_CHAT_SUPPRESSED"' ---| '"NOTIFY_PVP_AFK_RESULT"' # `offender, numBlackMarksOnOffender, numPlayersIHaveReported` ---| '"NPE_TUTORIAL_UPDATE"' ---| '"OBJECT_ENTERED_AOI"' # `guid` ---| '"OBJECT_LEFT_AOI"' # `guid` ---| '"OBLITERUM_FORGE_CLOSE"' ---| '"OBLITERUM_FORGE_PENDING_ITEM_CHANGED"' ---| '"OBLITERUM_FORGE_SHOW"' ---| '"OPEN_MASTER_LOOT_LIST"' ---| '"OPEN_REPORT_PLAYER"' # `token, reportType, playerName` ---| '"OPEN_SPLASH_SCREEN"' # `info` ---| '"OPEN_TABARD_FRAME"' ---| '"OWNED_AUCTIONS_UPDATED"' ---| '"OWNED_AUCTION_BIDDER_INFO_RECEIVED"' # `auctionID, bidderName` ---| '"PARTY_INVITE_CANCEL"' ---| '"PARTY_INVITE_REQUEST"' # `name, isTank, isHealer, isDamage, isNativeRealm, allowMultipleRoles, inviterGUID, questSessionActive` ---| '"PARTY_LEADER_CHANGED"' ---| '"PARTY_LFG_RESTRICTED"' ---| '"PARTY_LOOT_METHOD_CHANGED"' ---| '"PARTY_MEMBER_DISABLE"' # `unitTarget` ---| '"PARTY_MEMBER_ENABLE"' # `unitTarget` ---| '"PENDING_AZERITE_ESSENCE_CHANGED"' # `essenceID` ---| '"PETITION_CLOSED"' ---| '"PETITION_SHOW"' ---| '"PET_ATTACK_START"' ---| '"PET_ATTACK_STOP"' ---| '"PET_BAR_HIDEGRID"' ---| '"PET_BAR_SHOWGRID"' ---| '"PET_BAR_UPDATE"' ---| '"PET_BAR_UPDATE_COOLDOWN"' ---| '"PET_BAR_UPDATE_USABLE"' ---| '"PET_BATTLE_ABILITY_CHANGED"' # `owner, petIndex, abilityID` ---| '"PET_BATTLE_ACTION_SELECTED"' ---| '"PET_BATTLE_AURA_APPLIED"' # `owner, petIndex, auraInstanceID` ---| '"PET_BATTLE_AURA_CANCELED"' # `owner, petIndex, auraInstanceID` ---| '"PET_BATTLE_AURA_CHANGED"' # `owner, petIndex, auraInstanceID` ---| '"PET_BATTLE_CAPTURED"' # `owner, petIndex` ---| '"PET_BATTLE_CLOSE"' ---| '"PET_BATTLE_FINAL_ROUND"' # `owner` ---| '"PET_BATTLE_HEALTH_CHANGED"' # `owner, petIndex, healthChange` ---| '"PET_BATTLE_LEVEL_CHANGED"' # `owner, petIndex, newLevel` ---| '"PET_BATTLE_LOOT_RECEIVED"' # `typeIdentifier, itemLink, quantity` ---| '"PET_BATTLE_MAX_HEALTH_CHANGED"' # `owner, petIndex, healthChange` ---| '"PET_BATTLE_OPENING_DONE"' ---| '"PET_BATTLE_OPENING_START"' ---| '"PET_BATTLE_OVER"' ---| '"PET_BATTLE_OVERRIDE_ABILITY"' # `abilityIndex` ---| '"PET_BATTLE_PET_CHANGED"' # `owner` ---| '"PET_BATTLE_PET_ROUND_PLAYBACK_COMPLETE"' # `roundNumber` ---| '"PET_BATTLE_PET_ROUND_RESULTS"' # `roundNumber` ---| '"PET_BATTLE_PET_TYPE_CHANGED"' # `owner, petIndex, stateValue` ---| '"PET_BATTLE_PVP_DUEL_REQUESTED"' # `fullName` ---| '"PET_BATTLE_PVP_DUEL_REQUEST_CANCEL"' ---| '"PET_BATTLE_QUEUE_PROPOSAL_ACCEPTED"' ---| '"PET_BATTLE_QUEUE_PROPOSAL_DECLINED"' ---| '"PET_BATTLE_QUEUE_PROPOSE_MATCH"' ---| '"PET_BATTLE_QUEUE_STATUS"' ---| '"PET_BATTLE_XP_CHANGED"' # `owner, petIndex, xpChange` ---| '"PET_DISMISS_START"' # `delay` ---| '"PET_FORCE_NAME_DECLENSION"' # `name, declinedName1, declinedName2, declinedName3, declinedName4, declinedName5` ---| '"PET_JOURNAL_AUTO_SLOTTED_PET"' # `slotIndex, battlePetGUID` ---| '"PET_JOURNAL_CAGE_FAILED"' ---| '"PET_JOURNAL_LIST_UPDATE"' ---| '"PET_JOURNAL_NEW_BATTLE_SLOT"' ---| '"PET_JOURNAL_PETS_HEALED"' ---| '"PET_JOURNAL_PET_DELETED"' # `battlePetGUID` ---| '"PET_JOURNAL_PET_RESTORED"' # `battlePetGUID` ---| '"PET_JOURNAL_PET_REVOKED"' # `battlePetGUID` ---| '"PET_JOURNAL_TRAP_LEVEL_SET"' # `trapLevel` ---| '"PET_SPECIALIZATION_CHANGED"' ---| '"PET_SPELL_POWER_UPDATE"' ---| '"PET_STABLE_CLOSED"' ---| '"PET_STABLE_SHOW"' ---| '"PET_STABLE_UPDATE"' ---| '"PET_STABLE_UPDATE_PAPERDOLL"' ---| '"PET_UI_CLOSE"' ---| '"PET_UI_UPDATE"' ---| '"PLAYERBANKBAGSLOTS_CHANGED"' ---| '"PLAYERBANKSLOTS_CHANGED"' # `slot` ---| '"PLAYERREAGENTBANKSLOTS_CHANGED"' # `slot` ---| '"PLAYER_ALIVE"' ---| '"PLAYER_AVG_ITEM_LEVEL_UPDATE"' ---| '"PLAYER_CAMPING"' ---| '"PLAYER_CHOICE_CLOSE"' ---| '"PLAYER_CHOICE_UPDATE"' ---| '"PLAYER_CONTROL_GAINED"' ---| '"PLAYER_CONTROL_LOST"' ---| '"PLAYER_DAMAGE_DONE_MODS"' # `unitTarget` ---| '"PLAYER_DEAD"' ---| '"PLAYER_DIFFICULTY_CHANGED"' ---| '"PLAYER_ENTERING_BATTLEGROUND"' ---| '"PLAYER_ENTERING_WORLD"' # `isInitialLogin, isReloadingUi` ---| '"PLAYER_ENTER_COMBAT"' ---| '"PLAYER_EQUIPMENT_CHANGED"' # `equipmentSlot, hasCurrent` ---| '"PLAYER_FARSIGHT_FOCUS_CHANGED"' ---| '"PLAYER_FLAGS_CHANGED"' # `unitTarget` ---| '"PLAYER_FOCUS_CHANGED"' ---| '"PLAYER_GAINS_VEHICLE_DATA"' # `unitTarget, vehicleUIIndicatorID` ---| '"PLAYER_GUILD_UPDATE"' # `unitTarget` ---| '"PLAYER_LEARN_PVP_TALENT_FAILED"' ---| '"PLAYER_LEARN_TALENT_FAILED"' ---| '"PLAYER_LEAVE_COMBAT"' ---| '"PLAYER_LEAVING_WORLD"' ---| '"PLAYER_LEVEL_CHANGED"' # `oldLevel, newLevel, real` ---| '"PLAYER_LEVEL_UP"' # `level, healthDelta, powerDelta, numNewTalents, numNewPvpTalentSlots, strengthDelta, agilityDelta, staminaDelta, intellectDelta` ---| '"PLAYER_LOGIN"' ---| '"PLAYER_LOGOUT"' ---| '"PLAYER_LOOT_SPEC_UPDATED"' ---| '"PLAYER_LOSES_VEHICLE_DATA"' # `unitTarget` ---| '"PLAYER_MONEY"' ---| '"PLAYER_MOUNT_DISPLAY_CHANGED"' ---| '"PLAYER_PVP_KILLS_CHANGED"' # `unitTarget` ---| '"PLAYER_PVP_RANK_CHANGED"' # `unitTarget` ---| '"PLAYER_PVP_TALENT_UPDATE"' ---| '"PLAYER_QUITING"' ---| '"PLAYER_REGEN_DISABLED"' ---| '"PLAYER_REGEN_ENABLED"' ---| '"PLAYER_REPORT_SUBMITTED"' # `invitedByGUID` ---| '"PLAYER_ROLES_ASSIGNED"' ---| '"PLAYER_SKINNED"' # `hasFreeRepop` ---| '"PLAYER_SPECIALIZATION_CHANGED"' # `unitTarget` ---| '"PLAYER_STARTED_LOOKING"' ---| '"PLAYER_STARTED_MOVING"' ---| '"PLAYER_STARTED_TURNING"' ---| '"PLAYER_STOPPED_LOOKING"' ---| '"PLAYER_STOPPED_MOVING"' ---| '"PLAYER_STOPPED_TURNING"' ---| '"PLAYER_TALENT_UPDATE"' ---| '"PLAYER_TARGET_CHANGED"' ---| '"PLAYER_TOTEM_UPDATE"' # `totemSlot` ---| '"PLAYER_TRADE_CURRENCY"' ---| '"PLAYER_TRADE_MONEY"' ---| '"PLAYER_TRIAL_XP_UPDATE"' # `unitTarget` ---| '"PLAYER_UNGHOST"' ---| '"PLAYER_UPDATE_RESTING"' ---| '"PLAYER_XP_UPDATE"' # `unitTarget` ---| '"PLAY_MOVIE"' # `movieID` ---| '"PORTRAITS_UPDATED"' ---| '"POST_MATCH_CURRENCY_REWARD_UPDATE"' # `reward` ---| '"POST_MATCH_ITEM_REWARD_UPDATE"' ---| '"PROVING_GROUNDS_SCORE_UPDATE"' # `points` ---| '"PVPQUEUE_ANYWHERE_SHOW"' ---| '"PVPQUEUE_ANYWHERE_UPDATE_AVAILABLE"' ---| '"PVP_BRAWL_INFO_UPDATED"' ---| '"PVP_MATCH_ACTIVE"' ---| '"PVP_MATCH_COMPLETE"' # `winner, duration` ---| '"PVP_MATCH_INACTIVE"' ---| '"PVP_POWER_UPDATE"' ---| '"PVP_RATED_STATS_UPDATE"' ---| '"PVP_REWARDS_UPDATE"' ---| '"PVP_ROLE_POPUP_HIDE"' # `roleQueueInfo` ---| '"PVP_ROLE_POPUP_JOINED_MATCH"' ---| '"PVP_ROLE_POPUP_SHOW"' # `roleQueueInfo` ---| '"PVP_ROLE_UPDATE"' ---| '"PVP_SPECIAL_EVENT_INFO_UPDATED"' ---| '"PVP_TIMER_UPDATE"' # `unitTarget` ---| '"PVP_TYPES_ENABLED"' # `wargameBattlegrounds, ratedBattlegrounds, ratedArenas` ---| '"PVP_VEHICLE_INFO_UPDATED"' ---| '"PVP_WORLDSTATE_UPDATE"' ---| '"QUESTLINE_UPDATE"' # `requestRequired` ---| '"QUEST_ACCEPTED"' # `questId` ---| '"QUEST_ACCEPT_CONFIRM"' # `name, questTitle` ---| '"QUEST_AUTOCOMPLETE"' # `questId` ---| '"QUEST_BOSS_EMOTE"' # `text, playerName, displayTime, enableBossEmoteWarningSound` ---| '"QUEST_COMPLETE"' ---| '"QUEST_CURRENCY_LOOT_RECEIVED"' # `questID, currencyId, quantity` ---| '"QUEST_DATA_LOAD_RESULT"' # `questID, success` ---| '"QUEST_DETAIL"' # `questStartItemID` ---| '"QUEST_FINISHED"' ---| '"QUEST_GREETING"' ---| '"QUEST_ITEM_UPDATE"' ---| '"QUEST_LOG_CRITERIA_UPDATE"' # `questID, specificTreeID, description, numFulfilled, numRequired` ---| '"QUEST_LOG_UPDATE"' ---| '"QUEST_LOOT_RECEIVED"' # `questID, itemLink, quantity` ---| '"QUEST_POI_UPDATE"' ---| '"QUEST_PROGRESS"' ---| '"QUEST_REMOVED"' # `questID, wasReplayQuest` ---| '"QUEST_SESSION_CREATED"' ---| '"QUEST_SESSION_DESTROYED"' ---| '"QUEST_SESSION_ENABLED_STATE_CHANGED"' # `enabled` ---| '"QUEST_SESSION_JOINED"' ---| '"QUEST_SESSION_LEFT"' ---| '"QUEST_SESSION_MEMBER_CONFIRM"' ---| '"QUEST_SESSION_MEMBER_START_RESPONSE"' # `guid, response` ---| '"QUEST_SESSION_NOTIFICATION"' # `result, guid` ---| '"QUEST_TURNED_IN"' # `questID, xpReward, moneyReward` ---| '"QUEST_WATCH_LIST_CHANGED"' # `questID, added` ---| '"QUEST_WATCH_UPDATE"' # `questID` ---| '"QUICK_TICKET_SYSTEM_STATUS"' ---| '"QUICK_TICKET_THROTTLE_CHANGED"' ---| '"RAF_ENTITLEMENT_DELIVERED"' # `entitlementType, textureID, name, payloadID, showFancyToast` ---| '"RAF_INFO_UPDATED"' # `info` ---| '"RAF_RECRUITING_ENABLED_STATUS"' # `enabled` ---| '"RAF_SYSTEM_ENABLED_STATUS"' # `enabled` ---| '"RAF_SYSTEM_INFO_UPDATED"' # `systemInfo` ---| '"RAID_BOSS_EMOTE"' # `text, playerName, displayTime, enableBossEmoteWarningSound` ---| '"RAID_BOSS_WHISPER"' # `text, playerName, displayTime, enableBossEmoteWarningSound` ---| '"RAID_INSTANCE_WELCOME"' # `mapname, timeLeft, locked, extended` ---| '"RAID_ROSTER_UPDATE"' ---| '"RAID_TARGET_UPDATE"' ---| '"RAISED_AS_GHOUL"' ---| '"READY_CHECK"' # `initiatorName, readyCheckTimeLeft` ---| '"READY_CHECK_CONFIRM"' # `unitTarget, isReady` ---| '"READY_CHECK_FINISHED"' # `preempted` ---| '"REAGENTBANK_PURCHASED"' ---| '"REAGENTBANK_UPDATE"' ---| '"RECEIVED_ACHIEVEMENT_LIST"' ---| '"RECEIVED_ACHIEVEMENT_MEMBER_LIST"' # `achievementID` ---| '"REPLACE_ENCHANT"' # `existingStr, replacementStr` ---| '"REPLICATE_ITEM_LIST_UPDATE"' ---| '"REPORT_PLAYER_RESULT"' # `success` ---| '"REQUEST_CEMETERY_LIST_RESPONSE"' # `isGossipTriggered` ---| '"REQUEST_INVITE_CONFIRMATION"' # `targetName, partyLevelLink, questSessionActive, tank, healer, dps` ---| '"REQUIRED_GUILD_RENAME_RESULT"' # `success` ---| '"RESEARCH_ARTIFACT_COMPLETE"' # `name` ---| '"RESEARCH_ARTIFACT_DIG_SITE_UPDATED"' ---| '"RESEARCH_ARTIFACT_HISTORY_READY"' ---| '"RESEARCH_ARTIFACT_UPDATE"' ---| '"RESPEC_AZERITE_EMPOWERED_ITEM_CLOSED"' ---| '"RESPEC_AZERITE_EMPOWERED_ITEM_OPENED"' ---| '"RESURRECT_REQUEST"' # `inviter` ---| '"ROLE_CHANGED_INFORM"' # `changedName, fromName, oldRole, newRole` ---| '"ROLE_POLL_BEGIN"' # `fromName` ---| '"RUNEFORGE_LEGENDARY_CRAFTING_CLOSED"' ---| '"RUNEFORGE_LEGENDARY_CRAFTING_OPENED"' # `isUpgrade` ---| '"RUNEFORGE_POWER_INFO_UPDATED"' # `powerID` ---| '"RUNE_POWER_UPDATE"' # `runeIndex, added` ---| '"SAVED_VARIABLES_TOO_LARGE"' # `addOnName` ---| '"SCENARIO_BONUS_OBJECTIVE_COMPLETE"' # `bonusObjectiveID` ---| '"SCENARIO_BONUS_VISIBILITY_UPDATE"' ---| '"SCENARIO_COMPLETED"' # `questID, xp, money` ---| '"SCENARIO_CRITERIA_SHOW_STATE_UPDATE"' # `show` ---| '"SCENARIO_CRITERIA_UPDATE"' # `criteriaID` ---| '"SCENARIO_POI_UPDATE"' ---| '"SCENARIO_SPELL_UPDATE"' ---| '"SCENARIO_UPDATE"' # `newStep` ---| '"SCRAPPING_MACHINE_CLOSE"' ---| '"SCRAPPING_MACHINE_ITEM_REMOVED_OR_CANCELLED"' # `index` ---| '"SCRAPPING_MACHINE_PENDING_ITEM_CHANGED"' ---| '"SCRAPPING_MACHINE_SCRAPPING_FINISHED"' ---| '"SCRAPPING_MACHINE_SHOW"' ---| '"SCREENSHOT_FAILED"' ---| '"SCREENSHOT_STARTED"' ---| '"SCREENSHOT_SUCCEEDED"' ---| '"SCRIPTED_ANIMATIONS_UPDATE"' ---| '"SEARCH_DB_LOADED"' ---| '"SECURE_TRANSFER_CANCEL"' ---| '"SECURE_TRANSFER_CONFIRM_SEND_MAIL"' ---| '"SECURE_TRANSFER_CONFIRM_TRADE_ACCEPT"' ---| '"SELF_RES_SPELL_CHANGED"' ---| '"SEND_MAIL_COD_CHANGED"' ---| '"SEND_MAIL_MONEY_CHANGED"' ---| '"SHIPMENT_CRAFTER_CLOSED"' ---| '"SHIPMENT_CRAFTER_INFO"' # `success, shipmentCount, maxShipments, ownedShipments, plotInstanceID` ---| '"SHIPMENT_CRAFTER_OPENED"' # `charShipmentContainerID` ---| '"SHIPMENT_CRAFTER_REAGENT_UPDATE"' ---| '"SHIPMENT_UPDATE"' # `shipmentStarted, hasAttachedFollower` ---| '"SHOW_FACTION_SELECT_UI"' ---| '"SHOW_LFG_EXPAND_SEARCH_PROMPT"' ---| '"SHOW_LOOT_TOAST"' # `typeIdentifier, itemLink, quantity, specID, sex, personalLootToast, toastMethod, lessAwesome, upgraded, corrupted` ---| '"SHOW_LOOT_TOAST_LEGENDARY_LOOTED"' # `itemLink` ---| '"SHOW_LOOT_TOAST_UPGRADE"' # `itemLink, quantity, specID, sex, baseQuality, personalLootToast, lessAwesome` ---| '"SHOW_PVP_FACTION_LOOT_TOAST"' # `typeIdentifier, itemLink, quantity, specID, sex, personalLootToast, lessAwesome` ---| '"SHOW_RATED_PVP_REWARD_TOAST"' # `typeIdentifier, itemLink, quantity, specID, sex, personalLootToast, lessAwesome` ---| '"SHOW_SUBSCRIPTION_INTERSTITIAL"' # `type` ---| '"SIMPLE_BROWSER_WEB_ERROR"' # `errorCode` ---| '"SIMPLE_BROWSER_WEB_PROXY_FAILED"' ---| '"SIMPLE_CHECKOUT_CLOSED"' ---| '"SKILL_LINES_CHANGED"' ---| '"SOCIAL_ITEM_RECEIVED"' ---| '"SOCIAL_QUEUE_CONFIG_UPDATED"' ---| '"SOCIAL_QUEUE_UPDATE"' # `groupGUID, numAddedItems` ---| '"SOCKET_INFO_ACCEPT"' ---| '"SOCKET_INFO_BIND_CONFIRM"' ---| '"SOCKET_INFO_CLOSE"' ---| '"SOCKET_INFO_FAILURE"' ---| '"SOCKET_INFO_REFUNDABLE_CONFIRM"' ---| '"SOCKET_INFO_SUCCESS"' ---| '"SOCKET_INFO_UPDATE"' ---| '"SOULBIND_ACTIVATED"' # `soulbindID` ---| '"SOULBIND_CONDUIT_COLLECTION_CLEARED"' ---| '"SOULBIND_CONDUIT_COLLECTION_REMOVED"' # `conduitID` ---| '"SOULBIND_CONDUIT_COLLECTION_UPDATED"' # `collectionData` ---| '"SOULBIND_CONDUIT_INSTALLED"' # `nodeID, data` ---| '"SOULBIND_CONDUIT_UNINSTALLED"' # `nodeID, data` ---| '"SOULBIND_FORGE_INTERACTION_ENDED"' ---| '"SOULBIND_FORGE_INTERACTION_STARTED"' ---| '"SOULBIND_NODE_LEARNED"' # `nodeID` ---| '"SOULBIND_NODE_UNLEARNED"' # `nodeID` ---| '"SOULBIND_NODE_UPDATED"' # `nodeID` ---| '"SOULBIND_PATH_CHANGED"' ---| '"SOULBIND_PENDING_CONDUIT_CHANGED"' # `nodeID, conduitID` ---| '"SOUNDKIT_FINISHED"' # `soundHandle` ---| '"SOUND_DEVICE_UPDATE"' ---| '"SPEC_INVOLUNTARILY_CHANGED"' # `isPet` ---| '"SPEED_UPDATE"' ---| '"SPELLS_CHANGED"' ---| '"SPELL_ACTIVATION_OVERLAY_GLOW_HIDE"' # `spellID` ---| '"SPELL_ACTIVATION_OVERLAY_GLOW_SHOW"' # `spellID` ---| '"SPELL_ACTIVATION_OVERLAY_HIDE"' # `spellID` ---| '"SPELL_ACTIVATION_OVERLAY_SHOW"' # `spellID, overlayFileDataID, locationName, scale, r, g, b` ---| '"SPELL_CONFIRMATION_PROMPT"' # `spellID, effectValue, message, duration, currencyTypesID, currencyCost, currentDifficulty` ---| '"SPELL_CONFIRMATION_TIMEOUT"' # `spellID, effectValue` ---| '"SPELL_DATA_LOAD_RESULT"' # `spellID, success` ---| '"SPELL_FLYOUT_UPDATE"' # `flyoutID, spellID, isLearned` ---| '"SPELL_POWER_CHANGED"' ---| '"SPELL_PUSHED_TO_ACTIONBAR"' # `spellID, slot, page` ---| '"SPELL_TEXT_UPDATE"' # `spellID` ---| '"SPELL_UPDATE_CHARGES"' ---| '"SPELL_UPDATE_COOLDOWN"' ---| '"SPELL_UPDATE_ICON"' ---| '"SPELL_UPDATE_USABLE"' ---| '"START_AUTOREPEAT_SPELL"' ---| '"START_LOOT_ROLL"' # `rollID, rollTime, lootHandle` ---| '"START_TIMER"' # `timerType, timeRemaining, totalTime` ---| '"STOP_AUTOREPEAT_SPELL"' ---| '"STOP_MOVIE"' ---| '"STREAMING_ICON"' # `streamingStatus` ---| '"STREAM_VIEW_MARKER_UPDATED"' # `clubId, streamId, lastReadTime` ---| '"STURDINESS_UPDATE"' ---| '"SUPER_TRACKING_CHANGED"' ---| '"SYSMSG"' # `string, r, g, b` ---| '"TABARD_CANSAVE_CHANGED"' ---| '"TABARD_SAVE_PENDING"' ---| '"TALENTS_INVOLUNTARILY_RESET"' # `isPetTalents` ---| '"TALKINGHEAD_CLOSE"' ---| '"TALKINGHEAD_REQUESTED"' ---| '"TASK_PROGRESS_UPDATE"' ---| '"TAXIMAP_CLOSED"' ---| '"TAXIMAP_OPENED"' # `system` ---| '"TIME_PLAYED_MSG"' # `totalTimePlayed, timePlayedThisLevel` ---| '"TOGGLE_CONSOLE"' # `showConsole` ---| '"TOKEN_AUCTION_SOLD"' ---| '"TOKEN_BUY_CONFIRM_REQUIRED"' ---| '"TOKEN_BUY_RESULT"' # `result` ---| '"TOKEN_CAN_VETERAN_BUY_UPDATE"' # `result` ---| '"TOKEN_DISTRIBUTIONS_UPDATED"' # `result` ---| '"TOKEN_MARKET_PRICE_UPDATED"' # `result` ---| '"TOKEN_REDEEM_BALANCE_UPDATED"' ---| '"TOKEN_REDEEM_CONFIRM_REQUIRED"' # `choiceType` ---| '"TOKEN_REDEEM_FRAME_SHOW"' ---| '"TOKEN_REDEEM_GAME_TIME_UPDATED"' ---| '"TOKEN_REDEEM_RESULT"' # `result, choiceType` ---| '"TOKEN_SELL_CONFIRMED"' ---| '"TOKEN_SELL_CONFIRM_REQUIRED"' ---| '"TOKEN_SELL_RESULT"' # `result` ---| '"TOKEN_STATUS_CHANGED"' ---| '"TOYS_UPDATED"' # `itemID, isNew, hasFanfare` ---| '"TRACKED_ACHIEVEMENT_LIST_CHANGED"' # `achievementID, added` ---| '"TRACKED_ACHIEVEMENT_UPDATE"' # `achievementID, criteriaID, elapsed, duration` ---| '"TRADE_ACCEPT_UPDATE"' # `playerAccepted, targetAccepted` ---| '"TRADE_CLOSED"' ---| '"TRADE_CURRENCY_CHANGED"' ---| '"TRADE_MONEY_CHANGED"' ---| '"TRADE_PLAYER_ITEM_CHANGED"' # `tradeSlotIndex` ---| '"TRADE_POTENTIAL_BIND_ENCHANT"' # `canBecomeBoundForTrade` ---| '"TRADE_POTENTIAL_REMOVE_TRANSMOG"' # `itemLink, tradeSlotIndex` ---| '"TRADE_REPLACE_ENCHANT"' # `existing, replacement` ---| '"TRADE_REQUEST"' # `name` ---| '"TRADE_REQUEST_CANCEL"' ---| '"TRADE_SHOW"' ---| '"TRADE_SKILL_CLOSE"' ---| '"TRADE_SKILL_DATA_SOURCE_CHANGED"' ---| '"TRADE_SKILL_DATA_SOURCE_CHANGING"' ---| '"TRADE_SKILL_DETAILS_UPDATE"' ---| '"TRADE_SKILL_LIST_UPDATE"' ---| '"TRADE_SKILL_NAME_UPDATE"' ---| '"TRADE_SKILL_OPTIONAL_REAGENT_BONUS_TEXT_UPDATED"' # `itemID` ---| '"TRADE_SKILL_SHOW"' ---| '"TRADE_TARGET_ITEM_CHANGED"' # `tradeSlotIndex` ---| '"TRADE_UPDATE"' ---| '"TRAINER_CLOSED"' ---| '"TRAINER_DESCRIPTION_UPDATE"' ---| '"TRAINER_SERVICE_INFO_NAME_UPDATE"' ---| '"TRAINER_SHOW"' ---| '"TRAINER_UPDATE"' ---| '"TRANSMOGRIFY_CLOSE"' ---| '"TRANSMOGRIFY_ITEM_UPDATE"' ---| '"TRANSMOGRIFY_OPEN"' ---| '"TRANSMOGRIFY_SUCCESS"' # `transmogLocation` ---| '"TRANSMOGRIFY_UPDATE"' # `transmogLocation, action` ---| '"TRANSMOG_COLLECTION_CAMERA_UPDATE"' ---| '"TRANSMOG_COLLECTION_ITEM_UPDATE"' ---| '"TRANSMOG_COLLECTION_SOURCE_ADDED"' # `itemModifiedAppearanceID` ---| '"TRANSMOG_COLLECTION_SOURCE_REMOVED"' # `itemModifiedAppearanceID` ---| '"TRANSMOG_COLLECTION_UPDATED"' # `collectionIndex, modID, itemAppearanceID, reason` ---| '"TRANSMOG_COSMETIC_COLLECTION_SOURCE_ADDED"' # `itemModifiedAppearanceID` ---| '"TRANSMOG_OUTFITS_CHANGED"' ---| '"TRANSMOG_SEARCH_UPDATED"' # `searchType, collectionType` ---| '"TRANSMOG_SETS_UPDATE_FAVORITE"' ---| '"TRANSMOG_SOURCE_COLLECTABILITY_UPDATE"' # `itemModifiedAppearanceID, collectable` ---| '"TREASURE_PICKER_CACHE_FLUSH"' ---| '"TRIAL_CAP_REACHED_MONEY"' ---| '"TUTORIAL_HIGHLIGHT_SPELL"' # `spellID, tutorialGlobalStringTag` ---| '"TUTORIAL_TRIGGER"' # `tutorialIndex, forceShow` ---| '"TUTORIAL_UNHIGHLIGHT_SPELL"' ---| '"TWITTER_LINK_RESULT"' # `isLinked, screenName, error` ---| '"TWITTER_POST_RESULT"' # `result` ---| '"TWITTER_STATUS_UPDATE"' # `isTwitterEnabled, isLinked, screenName` ---| '"UI_ERROR_MESSAGE"' # `errorType, message` ---| '"UI_ERROR_POPUP"' # `errorType, message` ---| '"UI_INFO_MESSAGE"' # `errorType, message` ---| '"UI_MODEL_SCENE_INFO_UPDATED"' ---| '"UI_SCALE_CHANGED"' ---| '"UNIT_ABSORB_AMOUNT_CHANGED"' # `unitTarget` ---| '"UNIT_AREA_CHANGED"' # `unitTarget` ---| '"UNIT_ATTACK"' # `unitTarget` ---| '"UNIT_ATTACK_POWER"' # `unitTarget` ---| '"UNIT_ATTACK_SPEED"' # `unitTarget` ---| '"UNIT_AURA"' # `unitTarget` ---| '"UNIT_CHEAT_TOGGLE_EVENT"' ---| '"UNIT_CLASSIFICATION_CHANGED"' # `unitTarget` ---| '"UNIT_COMBAT"' # `unitTarget, event, flagText, amount, schoolMask` ---| '"UNIT_CONNECTION"' # `unitTarget, isConnected` ---| '"UNIT_CTR_OPTIONS"' # `unitTarget` ---| '"UNIT_DAMAGE"' # `unitTarget` ---| '"UNIT_DEFENSE"' # `unitTarget` ---| '"UNIT_DISPLAYPOWER"' # `unitTarget` ---| '"UNIT_ENTERED_VEHICLE"' # `unitTarget, showVehicleFrame, isControlSeat, vehicleUIIndicatorID, vehicleGUID, mayChooseExit, hasPitch` ---| '"UNIT_ENTERING_VEHICLE"' # `unitTarget, showVehicleFrame, isControlSeat, vehicleUIIndicatorID, vehicleGUID, mayChooseExit, hasPitch` ---| '"UNIT_EXITED_VEHICLE"' # `unitTarget` ---| '"UNIT_EXITING_VEHICLE"' # `unitTarget` ---| '"UNIT_FACTION"' # `unitTarget` ---| '"UNIT_FLAGS"' # `unitTarget` ---| '"UNIT_HEALTH"' # `unitTarget` ---| '"UNIT_HEAL_ABSORB_AMOUNT_CHANGED"' # `unitTarget` ---| '"UNIT_HEAL_PREDICTION"' # `unitTarget` ---| '"UNIT_INVENTORY_CHANGED"' # `unitTarget` ---| '"UNIT_LEVEL"' # `unitTarget` ---| '"UNIT_MANA"' # `unitTarget` ---| '"UNIT_MAXHEALTH"' # `unitTarget` ---| '"UNIT_MAXPOWER"' # `unitTarget, powerType` ---| '"UNIT_MODEL_CHANGED"' # `unitTarget` ---| '"UNIT_NAME_UPDATE"' # `unitTarget` ---| '"UNIT_OTHER_PARTY_CHANGED"' # `unitTarget` ---| '"UNIT_PET"' # `unitTarget` ---| '"UNIT_PET_EXPERIENCE"' # `unitTarget` ---| '"UNIT_PHASE"' # `unitTarget` ---| '"UNIT_PORTRAIT_UPDATE"' # `unitTarget` ---| '"UNIT_POWER_BAR_HIDE"' # `unitTarget` ---| '"UNIT_POWER_BAR_SHOW"' # `unitTarget` ---| '"UNIT_POWER_BAR_TIMER_UPDATE"' # `unitTarget` ---| '"UNIT_POWER_FREQUENT"' # `unitTarget, powerType` ---| '"UNIT_POWER_POINT_CHARGE"' # `unitTarget` ---| '"UNIT_POWER_UPDATE"' # `unitTarget, powerType` ---| '"UNIT_QUEST_LOG_CHANGED"' # `unitTarget` ---| '"UNIT_RANGEDDAMAGE"' # `unitTarget` ---| '"UNIT_RANGED_ATTACK_POWER"' # `unitTarget` ---| '"UNIT_RESISTANCES"' # `unitTarget` ---| '"UNIT_SPELLCAST_CHANNEL_START"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELLCAST_CHANNEL_STOP"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELLCAST_CHANNEL_UPDATE"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELLCAST_DELAYED"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELLCAST_FAILED"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELLCAST_FAILED_QUIET"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELLCAST_INTERRUPTED"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELLCAST_INTERRUPTIBLE"' # `unitTarget` ---| '"UNIT_SPELLCAST_NOT_INTERRUPTIBLE"' # `unitTarget` ---| '"UNIT_SPELLCAST_SENT"' # `unit, target, castGUID, spellID` ---| '"UNIT_SPELLCAST_START"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELLCAST_STOP"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELLCAST_SUCCEEDED"' # `unitTarget, castGUID, spellID` ---| '"UNIT_SPELL_HASTE"' # `unitTarget` ---| '"UNIT_STATS"' # `unitTarget` ---| '"UNIT_TARGET"' # `unitTarget` ---| '"UNIT_TARGETABLE_CHANGED"' # `unitTarget` ---| '"UNIT_THREAT_LIST_UPDATE"' # `unitTarget` ---| '"UNIT_THREAT_SITUATION_UPDATE"' # `unitTarget` ---| '"UPDATE_ACTIVE_BATTLEFIELD"' ---| '"UPDATE_ALL_UI_WIDGETS"' ---| '"UPDATE_BATTLEFIELD_SCORE"' ---| '"UPDATE_BATTLEFIELD_STATUS"' # `battleFieldIndex` ---| '"UPDATE_BINDINGS"' ---| '"UPDATE_BONUS_ACTIONBAR"' ---| '"UPDATE_CHAT_COLOR"' # `name, r, g, b` ---| '"UPDATE_CHAT_COLOR_NAME_BY_CLASS"' # `name, colorNameByClass` ---| '"UPDATE_CHAT_WINDOWS"' ---| '"UPDATE_EXHAUSTION"' ---| '"UPDATE_EXTRA_ACTIONBAR"' ---| '"UPDATE_FACTION"' ---| '"UPDATE_FLOATING_CHAT_WINDOWS"' ---| '"UPDATE_INSTANCE_INFO"' ---| '"UPDATE_INVENTORY_ALERTS"' ---| '"UPDATE_INVENTORY_DURABILITY"' ---| '"UPDATE_LFG_LIST"' ---| '"UPDATE_MACROS"' ---| '"UPDATE_MASTER_LOOT_LIST"' ---| '"UPDATE_MOUSEOVER_UNIT"' ---| '"UPDATE_MULTI_CAST_ACTIONBAR"' ---| '"UPDATE_OVERRIDE_ACTIONBAR"' ---| '"UPDATE_PENDING_MAIL"' ---| '"UPDATE_POSSESS_BAR"' ---| '"UPDATE_SHAPESHIFT_COOLDOWN"' ---| '"UPDATE_SHAPESHIFT_FORM"' ---| '"UPDATE_SHAPESHIFT_FORMS"' ---| '"UPDATE_SHAPESHIFT_USABLE"' ---| '"UPDATE_STEALTH"' ---| '"UPDATE_SUMMONPETS_ACTION"' ---| '"UPDATE_TRADESKILL_RECAST"' ---| '"UPDATE_UI_WIDGET"' # `widgetInfo` ---| '"UPDATE_VEHICLE_ACTIONBAR"' ---| '"UPDATE_WEB_TICKET"' # `hasTicket, numTickets, ticketStatus, caseIndex, waitTimeMinutes, waitMessage` ---| '"USER_WAYPOINT_UPDATED"' ---| '"USE_BIND_CONFIRM"' ---| '"USE_GLYPH"' # `spellID` ---| '"USE_NO_REFUND_CONFIRM"' ---| '"VARIABLES_LOADED"' ---| '"VEHICLE_ANGLE_SHOW"' # `shouldShow` ---| '"VEHICLE_ANGLE_UPDATE"' # `normalizedPitch, radians` ---| '"VEHICLE_PASSENGERS_CHANGED"' ---| '"VEHICLE_POWER_SHOW"' # `shouldShow` ---| '"VEHICLE_UPDATE"' ---| '"VIGNETTES_UPDATED"' ---| '"VIGNETTE_MINIMAP_UPDATED"' # `vignetteGUID, onMinimap` ---| '"VOICE_CHAT_ACTIVE_INPUT_DEVICE_UPDATED"' ---| '"VOICE_CHAT_ACTIVE_OUTPUT_DEVICE_UPDATED"' ---| '"VOICE_CHAT_AUDIO_CAPTURE_ENERGY"' # `isSpeaking, energy` ---| '"VOICE_CHAT_AUDIO_CAPTURE_STARTED"' ---| '"VOICE_CHAT_AUDIO_CAPTURE_STOPPED"' ---| '"VOICE_CHAT_CHANNEL_ACTIVATED"' # `channelID` ---| '"VOICE_CHAT_CHANNEL_DEACTIVATED"' # `channelID` ---| '"VOICE_CHAT_CHANNEL_DISPLAY_NAME_CHANGED"' # `channelID, channelDisplayName` ---| '"VOICE_CHAT_CHANNEL_JOINED"' # `status, channelID, channelType, clubId, streamId` ---| '"VOICE_CHAT_CHANNEL_MEMBER_ACTIVE_STATE_CHANGED"' # `memberID, channelID, isActive` ---| '"VOICE_CHAT_CHANNEL_MEMBER_ADDED"' # `memberID, channelID` ---| '"VOICE_CHAT_CHANNEL_MEMBER_ENERGY_CHANGED"' # `memberID, channelID, speakingEnergy` ---| '"VOICE_CHAT_CHANNEL_MEMBER_GUID_UPDATED"' # `memberID, channelID` ---| '"VOICE_CHAT_CHANNEL_MEMBER_MUTE_FOR_ALL_CHANGED"' # `memberID, channelID, isMutedForAll` ---| '"VOICE_CHAT_CHANNEL_MEMBER_MUTE_FOR_ME_CHANGED"' # `memberID, channelID, isMutedForMe` ---| '"VOICE_CHAT_CHANNEL_MEMBER_REMOVED"' # `memberID, channelID` ---| '"VOICE_CHAT_CHANNEL_MEMBER_SILENCED_CHANGED"' # `memberID, channelID, isSilenced` ---| '"VOICE_CHAT_CHANNEL_MEMBER_SPEAKING_STATE_CHANGED"' # `memberID, channelID, isSpeaking` ---| '"VOICE_CHAT_CHANNEL_MEMBER_STT_MESSAGE"' # `memberID, channelID, message, language` ---| '"VOICE_CHAT_CHANNEL_MEMBER_VOLUME_CHANGED"' # `memberID, channelID, volume` ---| '"VOICE_CHAT_CHANNEL_MUTE_STATE_CHANGED"' # `channelID, isMuted` ---| '"VOICE_CHAT_CHANNEL_PTT_CHANGED"' # `channelID, pushToTalkSetting` ---| '"VOICE_CHAT_CHANNEL_REMOVED"' # `channelID` ---| '"VOICE_CHAT_CHANNEL_TRANSCRIBING_CHANGED"' # `channelID, isTranscribing` ---| '"VOICE_CHAT_CHANNEL_TRANSMIT_CHANGED"' # `channelID, isTransmitting` ---| '"VOICE_CHAT_CHANNEL_VOLUME_CHANGED"' # `channelID, volume` ---| '"VOICE_CHAT_COMMUNICATION_MODE_CHANGED"' # `communicationMode` ---| '"VOICE_CHAT_CONNECTION_SUCCESS"' ---| '"VOICE_CHAT_DEAFENED_CHANGED"' # `isDeafened` ---| '"VOICE_CHAT_ERROR"' # `platformCode, statusCode` ---| '"VOICE_CHAT_INPUT_DEVICES_UPDATED"' ---| '"VOICE_CHAT_LOGIN"' # `status` ---| '"VOICE_CHAT_LOGOUT"' # `status` ---| '"VOICE_CHAT_MUTED_CHANGED"' # `isMuted` ---| '"VOICE_CHAT_OUTPUT_DEVICES_UPDATED"' ---| '"VOICE_CHAT_PENDING_CHANNEL_JOIN_STATE"' # `channelType, clubId, streamId, pendingJoin` ---| '"VOICE_CHAT_PTT_BUTTON_PRESSED_STATE_CHANGED"' # `isPressed` ---| '"VOICE_CHAT_SILENCED_CHANGED"' # `isSilenced` ---| '"VOICE_CHAT_SPEAK_FOR_ME_ACTIVE_STATUS_UPDATED"' ---| '"VOICE_CHAT_SPEAK_FOR_ME_FEATURE_STATUS_UPDATED"' ---| '"VOICE_CHAT_TTS_PLAYBACK_FAILED"' # `status, utteranceID, destination` ---| '"VOICE_CHAT_TTS_PLAYBACK_FINISHED"' # `numConsumers, utteranceID, destination` ---| '"VOICE_CHAT_TTS_PLAYBACK_STARTED"' # `numConsumers, utteranceID, durationMS, destination` ---| '"VOICE_CHAT_TTS_SPEAK_TEXT_UPDATE"' # `status, utteranceID` ---| '"VOICE_CHAT_TTS_VOICES_UPDATE"' ---| '"VOID_DEPOSIT_WARNING"' # `slot, link` ---| '"VOID_STORAGE_CLOSE"' ---| '"VOID_STORAGE_CONTENTS_UPDATE"' ---| '"VOID_STORAGE_DEPOSIT_UPDATE"' # `slot` ---| '"VOID_STORAGE_OPEN"' ---| '"VOID_STORAGE_UPDATE"' ---| '"VOID_TRANSFER_DONE"' ---| '"VOID_TRANSFER_SUCCESS"' ---| '"VOTE_KICK_REASON_NEEDED"' # `name, resultGUID` ---| '"WARFRONT_COMPLETED"' # `mapID, winner` ---| '"WARGAME_REQUESTED"' # `opposingPartyMemberName, battlegroundName, timeoutSeconds, tournamentRules` ---| '"WAR_MODE_STATUS_UPDATE"' # `warModeEnabled` ---| '"WAYPOINT_UPDATE"' ---| '"WEAR_EQUIPMENT_SET"' # `setID` ---| '"WEEKLY_REWARDS_HIDE"' ---| '"WEEKLY_REWARDS_ITEM_CHANGED"' ---| '"WEEKLY_REWARDS_SHOW"' ---| '"WEEKLY_REWARDS_UPDATE"' ---| '"WHO_LIST_UPDATE"' ---| '"WORLD_MAP_CLOSE"' ---| '"WORLD_MAP_OPEN"' # `uiMapID` ---| '"WORLD_QUEST_COMPLETED_BY_SPELL"' # `questID` ---| '"WORLD_STATE_TIMER_START"' # `timerID` ---| '"WORLD_STATE_TIMER_STOP"' # `timerID` ---| '"WOW_MOUSE_NOT_FOUND"' ---| '"ZONE_CHANGED"' ---| '"ZONE_CHANGED_INDOORS"' ---| '"ZONE_CHANGED_NEW_AREA"'
-- beds/beds.lua -- support for MT game translation. local S = beds.get_translator -- Fancy shaped bed beds.register_bed("beds:fancy_bed", { description = S("Fancy Bed"), inventory_image = "beds_bed_fancy.png", wield_image = "beds_bed_fancy.png", tiles = { bottom = { "beds_bed_top1.png", "beds_bed_under.png", "beds_bed_side1.png", "beds_bed_side1.png^[transformFX", "beds_bed_foot.png", "beds_bed_foot.png", }, top = { "beds_bed_top2.png", "beds_bed_under.png", "beds_bed_side2.png", "beds_bed_side2.png^[transformFX", "beds_bed_head.png", "beds_bed_head.png", } }, nodebox = { bottom = { {-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375}, {0.375, -0.5, -0.5, 0.5, -0.065, -0.4375}, {-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375}, {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, {-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5}, }, top = { {-0.5, -0.5, 0.4375, -0.375, 0.1875, 0.5}, {0.375, -0.5, 0.4375, 0.5, 0.1875, 0.5}, {-0.5, 0, 0.4375, 0.5, 0.125, 0.5}, {-0.5, -0.375, 0.4375, 0.5, -0.125, 0.5}, {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, {-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375}, } }, selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, recipe = { {"", "", "group:stick"}, {"wool:white", "wool:white", "wool:white"}, {"group:wood", "group:wood", "group:wood"}, }, }) -- Simple shaped bed beds.register_bed("beds:bed", { description = S("Simple Bed"), inventory_image = "beds_bed.png", wield_image = "beds_bed.png", tiles = { bottom = { "beds_bed_top_bottom.png^[transformR90", "beds_bed_under.png", "beds_bed_side_bottom_r.png", "beds_bed_side_bottom_r.png^[transformfx", "beds_transparent.png", "beds_bed_side_bottom.png" }, top = { "beds_bed_top_top.png^[transformR90", "beds_bed_under.png", "beds_bed_side_top_r.png", "beds_bed_side_top_r.png^[transformfx", "beds_bed_side_top.png", "beds_transparent.png", } }, nodebox = { bottom = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5}, top = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5}, }, selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, recipe = { {"wool:white", "wool:white", "wool:white"}, {"group:wood", "group:wood", "group:wood"} }, }) -- Aliases for PilzAdam's beds mod minetest.register_alias("beds:bed_bottom_red", "beds:bed_bottom") minetest.register_alias("beds:bed_top_red", "beds:bed_top") -- Fuel minetest.register_craft({ type = "fuel", recipe = "beds:fancy_bed_bottom", burntime = 13, }) minetest.register_craft({ type = "fuel", recipe = "beds:bed_bottom", burntime = 12, })
local sX, sY = guiGetScreenSize() local dxMessages = {} local dxMessagesY = {-25, -25, -25, -25} local dxMessagesTick = {} local isMoving = false function drawMessages() for index, messageData in pairs(dxMessages) do dxDrawText(messageData[1], sX / 4 + 1, (sY / 900) * (dxMessagesY[index] * 2) + 1, (sX / 4) * 3 + 1, (sY / 900) * 25 + 1, tocolor(0, 0, 0, 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false) dxDrawText(messageData[1], sX / 4 + 1, (sY / 900) * (dxMessagesY[index] * 2) - 1, (sX / 4) * 3 + 1, (sY / 900) * 25 - 1, tocolor(0, 0, 0, 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false) dxDrawText(messageData[1], sX / 4 - 1, (sY / 900) * (dxMessagesY[index] * 2) + 1, (sX / 4) * 3 - 1, (sY / 900) * 25 + 1, tocolor(0, 0, 0, 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false) dxDrawText(messageData[1], sX / 4 - 1, (sY / 900) * (dxMessagesY[index] * 2) - 1, (sX / 4) * 3 - 1, (sY / 900) * 25 - 1, tocolor(0, 0, 0, 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false) dxDrawText(messageData[1], sX / 4, (sY / 900) * (dxMessagesY[index] * 2), (sX / 4) * 3, (sY / 900) * 25, tocolor(messageData[2], messageData[3], messageData[4], 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false) end end addEventHandler("onClientRender", root, drawMessages) function new(message, r, g, b) message = tostring(message) if (dxGetTextWidth(message, (sX / 1440), "default-bold") > 750) then new(message:sub(1, 747).."...", 255, 0, 0) return end r, g, b = r or 255, g or 255, b or 255 if (#dxMessages == 4 or isMoving) then Timer(new, 1000, 1, message, r, g, b) return end table.insert(dxMessages, {message, r, g, b}) dxMessagesTick[#dxMessages] = getTickCount() addEventHandler("onClientRender", root, addMessage) isMoving = true outputConsole(message) end addEvent("UCDdx.new", true) addEventHandler("UCDdx.new", root, new) function addMessage() local index = #dxMessages local difference = (sY / 900) * 1.5 dxMessagesY[index] = dxMessagesY[index] + difference if dxMessagesY[index] >= (index - 1) * 25 then dxMessagesY[index] = (index - 1) * 25 if #dxMessages == 4 then isMoving = true addEventHandler("onClientRender", root, removeMessage) removeEventHandler("onClientRender", root, addMessage) else isMoving = false removeEventHandler("onClientRender", root, addMessage) end end end function removeMessage() local difference = (sY / 900) * 1.5 for index = 1, #dxMessages do dxMessagesY[index] = dxMessagesY[index] - difference end if dxMessagesY[1] <= -25 then for index = 1, #dxMessages do dxMessages[index] = dxMessages[index + 1] dxMessagesTick[index] = dxMessagesTick[index + 1] dxMessagesY[index] = (index - 1) * 25 end isMoving = false removeEventHandler("onClientRender", root, removeMessage) for index = 1, #dxMessagesY do if not dxMessages[index] then dxMessagesY[index] = -25 end end end end function removeReadMessages() for index, message in pairs(dxMessages) do local currentTick = getTickCount() if currentTick - dxMessagesTick[index] >= 7500 then removeMessage() end end end addEventHandler("onClientRender", root, removeReadMessages) function clear() for i = 1, #dxMessages do removeMessage() end dxMessages = {} dxMessagesY = {-25, -25, -25, -25} dxMessagesTick = {} isMoving = false if (#getEventHandlers("onClientRender", root, removeMessage) > 0) then removeEventHandler("onClientRender", root, removeMessage) end if (#getEventHandlers("onClientRender", root, addMessage) > 0) then removeEventHandler("onClientRender", root, addMessage) end end addCommandHandler("cleardx", clear, false, false)
data:extend( { { type = 'bool-setting', name = 'mi-easy-mode', setting_type = 'startup', default_value = false, order = 'aa' }, { type = 'bool-setting', name = 'mi-iron-gear-wheel', setting_type = 'startup', default_value = true, order = 'aa' }, { type = 'bool-setting', name = 'mi-electronic-circuit', setting_type = 'startup', default_value = true, order = 'ab' }, { type = 'bool-setting', name = 'mi-advanced-circuit', setting_type = 'startup', default_value = true, order = 'ac' }, { type = 'bool-setting', name = 'mi-processing-unit', setting_type = 'startup', default_value = true, order = 'ad' }, { type = 'bool-setting', name = 'mi-battery', setting_type = 'startup', default_value = true, order = 'ad' } } )
require("neogit").setup({})
#!/usr/bin/env lua require 'Test.More' plan(6) if not require_ok 'Spore.Middleware.Logging' then skip_rest "no Spore.Middleware.Logging" os.exit() end local mw = require 'Spore.Middleware.Logging' local req = require 'Spore.Request'.new({ sporex = {} }) type_ok( req, 'table', "Spore.Request.new" ) local r = mw.call( {}, req ) is( req.env.sporex.logger, nil, "sporex.logger is not set" ) is( r, nil ) r = mw.call( { logger = "MyLogger" }, req ) is( req.env.sporex.logger, "MyLogger", "sporex.logger is set" ) is( r, nil )
-- Conexão local Tunnel = module("vrp","lib/Tunnel") local Proxy = module("vrp","lib/Proxy") vRP = Proxy.getInterface("vRP") kinG = {} Tunnel.bindInterface("emp_construcao",kinG) ------------------------------------------------------------------------------------- -- CREDITS zKinG#8563 -- ------------------------------------------------------------------------------------- local salario = math.random(100, 800) -- Salário entre 70 a 100 -- Funções function kinG.Payment() local source = source local user_id = vRP.getUserId(source) TriggerClientEvent("vrp_sound:source",source,'coins',0.5) vRP.giveMoney(user_id, parseInt(salario)) TriggerClientEvent("Notify", source, "sucesso", "Você ganhou +R$"..salario.." por entregar.") end ------------------------------------------------------------------------------------- -- CREDITS zKinG#8563 -- -------------------------------------------------------------------------------------
local local0 = 0.35 local local1 = 0.35 - local0 local local2 = 0.35 - local0 local local3 = 0.35 - local0 local local4 = 0.35 - local0 local local5 = 0.35 - local0 function OnIf_102061(arg0, arg1, arg2) if arg2 == 0 then CrowdA_HandAxe_and_Shield_abura102061_ActAfter_RealTime(arg0, arg1) end return end function CrowdA_HandAxe_and_Shield_abura102061Battle_Activate(arg0, arg1) local local0 = {} local local1 = {} local local2 = {} Common_Clear_Param(local0, local1, local2) local local3 = arg0:GetDist(TARGET_ENE_0) local local4 = arg0:GetEventRequest() local local5 = arg0:GetRandam_Int(1, 100) local local6 = arg0:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) if local4 == 10 then arg0:AddTopGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 0.5, TARGET_SELF, false, -1) elseif local4 == 20 then arg0:AddTopGoal(GOAL_COMMON_ApproachTarget, 30, POINT_INITIAL, 0.5, TARGET_SELF, true, -1) elseif local6 == 1 and arg0:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_kankyaku then local0[10] = 30 local0[11] = 30 elseif local6 == 1 and arg0:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then if arg0:GetNpcThinkParamID() <= 102065 then local0[1] = 10 local0[10] = 45 local0[11] = 45 else local0[5] = 10 local0[10] = 45 local0[11] = 45 end elseif arg0:GetNpcThinkParamID() <= 102064 then if arg0:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 240) then local0[20] = 100 elseif arg0:IsTargetGuard(TARGET_ENE_0) == true and local5 <= 80 then if 5 <= local3 then local0[1] = 100 end elseif 5 <= local3 then local0[1] = 100 local0[2] = 0 local0[3] = 0 local0[4] = 0 local0[5] = 0 local0[11] = 0 elseif 3 <= local3 then local0[1] = 35 local0[2] = 10 local0[3] = 5 local0[4] = 10 local0[5] = 0 local0[11] = 40 elseif 1.5 <= local3 then local0[1] = 10 local0[2] = 30 local0[3] = 15 local0[4] = 25 local0[5] = 0 local0[11] = 20 else local0[1] = 0 local0[2] = 25 local0[3] = 40 local0[4] = 25 local0[5] = 0 local0[11] = 10 end elseif arg0:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 240) then local0[20] = 100 elseif arg0:IsTargetGuard(TARGET_ENE_0) == true and local5 <= 80 then if 5 <= local3 then local0[5] = 100 end elseif 5 <= local3 then local0[1] = 0 local0[2] = 0 local0[3] = 0 local0[4] = 0 local0[5] = 100 local0[11] = 0 elseif 3 <= local3 then local0[1] = 0 local0[2] = 10 local0[3] = 5 local0[4] = 10 local0[5] = 35 local0[11] = 40 elseif 1.5 <= local3 then local0[1] = 0 local0[2] = 30 local0[3] = 15 local0[4] = 25 local0[5] = 10 local0[11] = 20 else local0[1] = 0 local0[2] = 25 local0[3] = 40 local0[4] = 25 local0[5] = 0 local0[11] = 10 end local1[1] = REGIST_FUNC(arg0, arg1, CrowdA_HandAxe_and_Shield_abura102061_Act01) local1[2] = REGIST_FUNC(arg0, arg1, CrowdA_HandAxe_and_Shield_abura102061_Act02) local1[3] = REGIST_FUNC(arg0, arg1, CrowdA_HandAxe_and_Shield_abura102061_Act03) local1[4] = REGIST_FUNC(arg0, arg1, CrowdA_HandAxe_and_Shield_abura102061_Act04) local1[5] = REGIST_FUNC(arg0, arg1, CrowdA_HandAxe_and_Shield_abura102061_Act05) local1[10] = REGIST_FUNC(arg0, arg1, CrowdA_HandAxe_and_Shield_abura102061_Act10) local1[11] = REGIST_FUNC(arg0, arg1, CrowdA_HandAxe_and_Shield_abura102061_Act11) local1[20] = REGIST_FUNC(arg0, arg1, CrowdA_HandAxe_and_Shield_abura102061_Act20) Common_Battle_Activate(arg0, arg1, local0, local1, REGIST_FUNC(arg0, arg1, CrowdA_HandAxe_and_Shield_abura102061_ActAfter_AdjustSpace), local2) return end local0 = 16.35 - local0 function CrowdA_HandAxe_and_Shield_abura102061_Act01(arg0, arg1, arg2) local local0 = 100 local local1 = UPVAL0 local local2 = UPVAL0 local local3 = UPVAL0 + 2 if arg0:GetDist(TARGET_ENE_0) <= 5 then arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3017, TARGET_ENE_0, local1, 0, 0) elseif arg0:GetRandam_Int(1, 100) <= 65 then arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3017, TARGET_ENE_0, local1, 0, 0) else arg1:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0, 0, 0, 0) end GetWellSpace_Odds = 0 return GetWellSpace_Odds end local0 = 1.45 - local0 function CrowdA_HandAxe_and_Shield_abura102061_Act02(arg0, arg1, arg2) local local0 = UPVAL0 if local0 <= arg0:GetDist(TARGET_ENE_0) then Approach_Act(arg0, arg1, local0, UPVAL0 + 3.9, 100, 3) end arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3018, TARGET_ENE_0, UPVAL0, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end local0 = 1.35 - local0 function CrowdA_HandAxe_and_Shield_abura102061_Act03(arg0, arg1, arg2) local local0 = UPVAL0 if local0 <= arg0:GetDist(TARGET_ENE_0) then Approach_Act(arg0, arg1, local0, UPVAL0 + 4, 100, 3) end arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3019, TARGET_ENE_0, UPVAL0, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end local0 = 1.75 - local0 function CrowdA_HandAxe_and_Shield_abura102061_Act04(arg0, arg1, arg2) local local0 = UPVAL0 if local0 <= arg0:GetDist(TARGET_ENE_0) then Approach_Act(arg0, arg1, local0, UPVAL0 + 3.6, 100, 3) end arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3020, TARGET_ENE_0, UPVAL0, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end local0 = 16.35 - local0 function CrowdA_HandAxe_and_Shield_abura102061_Act05(arg0, arg1, arg2) local local0 = 100 local local1 = UPVAL0 local local2 = UPVAL0 local local3 = UPVAL0 + 2 if arg0:GetDist(TARGET_ENE_0) <= 5 then arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3022, TARGET_ENE_0, local1, 0, 0) elseif arg0:GetRandam_Int(1, 100) <= 65 then arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3022, TARGET_ENE_0, local1, 0, 0) else arg1:AddSubGoal(GOAL_COMMON_Wait, 1, TARGET_ENE_0, 0, 0, 0) end GetWellSpace_Odds = 0 return GetWellSpace_Odds end function CrowdA_HandAxe_and_Shield_abura102061_Act10(arg0, arg1, arg2) local local0 = arg0:GetDist(TARGET_ENE_0) local local1 = 10 if local1 <= arg0:GetDist(TARGET_ENE_0) then Approach_Act(arg0, arg1, local1, 12, 0, 3) end arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, 5, TARGET_ENE_0, 10, TARGET_ENE_0, true, 9910) return end function CrowdA_HandAxe_and_Shield_abura102061_Act11(arg0, arg1, arg2) local local0 = arg0:GetDist(TARGET_ENE_0) local local1 = arg0:GetRandam_Int(1, 100) local local2 = arg0:GetRandam_Float(1, 1.5) if arg0:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Kankyaku then arg1:AddSubGoal(GOAL_COMMON_SidewayMove, 5, TARGET_ENE_0, arg0:GetRandam_Int(0, 1), arg0:GetRandam_Int(30, 45), true, true, 9910, true) elseif arg0:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then arg1:AddSubGoal(GOAL_COMMON_SidewayMove, 5, TARGET_ENE_0, arg0:GetRandam_Int(0, 1), arg0:GetRandam_Int(30, 45), true, true, 9910, true) else if 4.5 <= local0 then arg1:AddSubGoal(GOAL_COMMON_ApproachTarget, 5, TARGET_ENE_0, arg0:GetRandam_Float(3, 4), TARGET_SELF, true, 9910) elseif local0 <= 1.5 and local1 <= 50 then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, arg0:GetRandam_Float(3, 3.5), TARGET_ENE_0, arg0:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 9910) elseif local0 <= 0.5 and local1 <= 90 then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, arg0:GetRandam_Float(3, 3.5), TARGET_ENE_0, arg0:GetRandam_Float(2.5, 3.5), TARGET_ENE_0, true, 9910) end arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local2, TARGET_ENE_0, arg0:GetRandam_Int(0, 1), arg0:GetRandam_Float(30, 50), true, true, 9910, true) arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local2, TARGET_ENE_0, arg0:GetRandam_Int(0, 1), arg0:GetRandam_Float(30, 50), true, true, 9910, true) end return end function CrowdA_HandAxe_and_Shield_abura102061_Act20(arg0, arg1, arg2) if arg0:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3016, TARGET_ENE_0, DIST_None, 0, 90) else arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3015, TARGET_ENE_0, DIST_None, 0, 90) end return end function CrowdA_HandAxe_and_Shield_abura102061_ActAfter_AdjustSpace(arg0, arg1, arg2) arg1:AddSubGoal(GOAL_COMMON_If, 10, 0) return end function CrowdA_HandAxe_and_Shield_abura102061_ActAfter_RealTime(arg0, arg1) local local0 = arg0:GetDist(TARGET_ENE_0) local local1 = arg0:GetRandam_Int(1, 100) local local2 = arg0:GetRandam_Int(0, 1) local local3 = arg0:GetRandam_Float(2.5, 3) local local4 = arg0:GetRandam_Float(1.5, 2.5) if arg0:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Attack then if arg0:IsTargetGuard(TARGET_ENE_0) == true then if local0 <= 1.5 then if local1 <= 80 then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, local3, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) end elseif local0 <= 2.5 then if local1 <= 70 then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, local3, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) end elseif local0 <= 3.5 then if local1 <= 50 then arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local4, TARGET_ENE_0, local2, arg0:GetRandam_Int(45, 60), true, true, 9910, true) end elseif local0 <= 5.5 then if local1 <= 50 then arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local4, TARGET_ENE_0, local2, arg0:GetRandam_Int(45, 60), true, true, 9910, true) else arg1:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 3, TARGET_SELF, true, 9910) end elseif local1 <= 70 then arg1:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 5.5, TARGET_SELF, true, 9910) else arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local4, TARGET_ENE_0, local2, arg0:GetRandam_Int(45, 60), true, true, 9910, true) end elseif local0 <= 1.5 then if local1 <= 30 then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, local3, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) end elseif local0 <= 2.5 then if local1 <= 40 then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, local3, TARGET_ENE_0, 3, TARGET_ENE_0, true, 9910) end elseif local0 <= 3.5 then if local1 <= 50 then arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local4, TARGET_ENE_0, local2, arg0:GetRandam_Int(45, 60), true, true, 9910, true) end elseif local0 <= 5.5 then if local1 <= 50 then arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local4, TARGET_ENE_0, local2, arg0:GetRandam_Int(45, 60), true, true, 9910, true) elseif local1 <= 80 then arg1:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 3, TARGET_SELF, true, 9910) end elseif local1 <= 70 then arg1:AddSubGoal(GOAL_COMMON_ApproachTarget, 10, TARGET_ENE_0, 5.5, TARGET_SELF, true, 9910) else arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local4, TARGET_ENE_0, local2, arg0:GetRandam_Int(45, 60), true, true, 9910, true) end elseif arg0:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Torimaki then if local0 <= 6 then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, local3, TARGET_ENE_0, 8, TARGET_ENE_0, true, 9910) else arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local4, TARGET_ENE_0, local2, arg0:GetRandam_Int(45, 60), true, true, 9910, true) end elseif arg0:GetTeamOrder(ORDER_TYPE_Role) == ROLE_TYPE_Kankyaku then if local0 <= 6 then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, local3, TARGET_ENE_0, 8, TARGET_ENE_0, true, 9910) else arg1:AddSubGoal(GOAL_COMMON_SidewayMove, local4, TARGET_ENE_0, local2, arg0:GetRandam_Int(45, 60), true, true, 9910, true) end end return end function CrowdA_HandAxe_and_Shield_abura102061Battle_Update(arg0, arg1) return GOAL_RESULT_Continue end function CrowdA_HandAxe_and_Shield_abura102061Battle_Terminate(arg0, arg1) return end function CrowdA_HandAxe_and_Shield_abura102061Battle_Interupt(arg0, arg1) if arg0:IsLadderAct(TARGET_SELF) then return false else local local0 = arg0:GetRandam_Int(1, 100) local local1 = arg0:GetRandam_Int(1, 100) local local2 = arg0:GetRandam_Int(1, 100) local local3 = arg0:GetDist(TARGET_ENE_0) if arg0:IsInterupt(INTERUPT_SuccessGuard) and local3 <= 3.5 and local0 <= 50 then arg1:ClearSubGoal() if local3 <= 1 then arg1:AddSubGoal(GOAL_COMMON_Attack, 10, 3018, TARGET_ENE_0, DIST_Middle, 0) elseif local3 <= 1.5 then arg1:AddSubGoal(GOAL_COMMON_Attack, 10, 3020, TARGET_ENE_0, DIST_Middle, 0) elseif arg0:GetNpcThinkParamID() <= 102064 then arg1:AddSubGoal(GOAL_COMMON_Attack, 10, 3017, TARGET_ENE_0, DIST_Middle, 0) else arg1:AddSubGoal(GOAL_COMMON_Attack, 10, 3022, TARGET_ENE_0, DIST_Middle, 0) end return true elseif arg0:IsInterupt(INTERUPT_GuardFinish) and local3 <= 8 and local0 <= 10 then arg1:ClearSubGoal() if local3 <= 1 then arg1:AddSubGoal(GOAL_COMMON_Attack, 10, 3018, TARGET_ENE_0, DIST_Middle, 0) elseif local3 <= 1.5 then arg1:AddSubGoal(GOAL_COMMON_Attack, 10, 3020, TARGET_ENE_0, DIST_Middle, 0) elseif arg0:GetNpcThinkParamID() <= 102064 then arg1:AddSubGoal(GOAL_COMMON_Attack, 10, 3017, TARGET_ENE_0, DIST_Middle, 0) else arg1:AddSubGoal(GOAL_COMMON_Attack, 10, 3022, TARGET_ENE_0, DIST_Middle, 0) end return true else return false end end end return
return {'brit','brits','britse','bricoleren','bridge','bridgeavond','bridgeclub','bridgedrive','bridgen','bridgepartij','bridger','bridgeseizoen','bridgespel','bridgespeler','bridgetafel','bridgeteam','bridgevereniging','bridgewedstrijd','brie','brief','briefaanhef','briefadres','briefbom','briefdrager','briefen','brieffragment','briefgeheim','briefhoofd','briefing','briefje','briefkaart','briefkaartje','briefkaartjes','briefmodel','briefnummer','briefomslag','briefopener','briefopening','briefpapier','briefport','briefporto','briefpost','briefroman','briefschrijfster','briefschrijver','briefsoort','briefstijl','brieftelegram','briefvorm','briefweger','briefwisseling','bries','briesen','briesje','brievenactie','brievenbesteller','brievenboek','brievenbundel','brievenbus','brievenbusfirma','brievenbusmaatschappij','brievenbuspost','brievencampagne','brievengaarder','brievenhoofd','brievenmaal','brievenpost','brievenroman','brievenrubriek','brievenschrijver','brieventas','brievenweger','brievenzak','brigade','brigadecommandant','brigadegeneraal','brigadier','brigantijn','brij','brijachtig','brijen','brijn','brijnen','brijpot','brijzel','brik','briket','brikken','briksteen','bril','brildragend','brildrager','brilduiker','brileend','briljant','briljanten','briljantslijper','brillantine','brille','brillen','brillendoos','brillenglas','brillenhuis','brillenkoker','brillenmaker','brillenman','brillenslijper','brillenwinkel','brilmontuur','brilscore','brilslang','brink','brinkdorp','brio','brioche','brique','brisant','brisantbom','brisantgranaat','bristolpapier','brits','britsen','briefhoofding','bridgetitel','briefkaartactie','briefkaartformaat','briet','brillenjood','brilsterkte','briefgeld','brilcorrectie','brilstand','brijvoer','briefadel','brievenhanger','brijbek','brijberg','brian','bridget','bridgetown','brielen','brielle','briellenaar','briels','brigit','brigitte','brink','brioni','britt','brittannie','brinkhorst','brice','brick','briek','brigitta','britney','britta','britte','brienen','brinksma','brinks','brinke','brinkman','brito','briene','brinker','brinkerink','brijder','brinkmann','brinkhoff','briggeman','brinkmans','brinckman','brittijn','brienesse','briel','britser','britten','bridgeavonden','bridgede','bridgeden','bridgedrives','bridgepartijen','bridgers','bridgespelers','bridgespellen','bridget','bridgewedstrijden','briefde','briefden','briefdragers','brieffragmenten','briefhoofden','briefjes','briefkaarten','briefomslagen','briefopeningen','briefporten','briefschrijvers','briefstijlen','briefte','briefwegers','briesjes','briest','brieste','briesten','brieven','brievenbestellers','brievenboeken','brievenbussen','brievenbussleutels','brievengaarders','brievenmalen','brievenrubrieken','brieventassen','brigadecommandanten','brigaden','brigades','brigadiers','brigantijnen','brijachtige','brijzelde','brijzelen','brijzelt','briketten','brilde','brilden','briljante','briljanter','briljantere','briljantje','briljantst','briljantste','brillendozen','brillenglazen','brillenmakers','brillenslijpers','brillenwinkels','brilletje','brilletjes','brilmonturen','brilslangen','brilt','brinken','brioches','brisantbommen','brisante','brisantgranaten','britst','britste','bricoleerde','bridgeclubs','bridgete','briefbommen','briefings','briefopeners','briefromans','brieft','brieftelegrammen','briefwisselingen','briesend','briesende','brievenhoofden','brievenschrijvers','brievenwegers','brigadegeneraals','brildragende','brildragers','brilduikers','brileenden','brillenhuizen','brillenkokers','brillenmannen','bridgeclubje','brievenbusfirmas','bridgetafels','briefhoofdingen','brillenglaasje','brians','brices','bricks','bridgets','brieks','brigits','brigittas','brigittes','britneys','britts','brittas','brittes','brinkdorpen','briefgeheimen','briefpapieren','briefpapiertje','brilscores','brinkmannetjes'}
local Range = {}; function Range.create(from, to) if from > to then from, to = to, from; end local t = {}; t.from = from; t.to = to; return t; end function Range.contains(range, i) return i >= range.from and i <= range.to; end return Range;
newRandomEmotes("townperson", { "Hello.", "Howdy.", "Good sir!", "Hey!", "Hrmph.", "...", "... tell ME to go ...", "Let him! Let him!", "A stranger...?", "You there!", "Can you spare any change?", "Help a man down on his luck?", "Did you see that?", "Did you hear?", "That's incredible!", "Some people...", "They'll let anyone in the gates", "Where's my wallet?", "Hey you!", "Wait!", "What the ...", "What are you doing?", "Step aside!", })
object_building_general_bunker_imperial_kashyyyk_01 = object_building_general_shared_bunker_imperial_kashyyyk_01:new { } ObjectTemplates:addTemplate(object_building_general_bunker_imperial_kashyyyk_01, "object/building/general/bunker_imperial_kashyyyk_01.iff")
--------------------------------------------------------------------------------------------------- -- Issue: https://github.com/smartdevicelink/sdl_core/issues/977 --------------------------------------------------------------------------------------------------- -- Description: -- SDL has to process required language struct in jsons for SDL4.0 feature -- -- Precondition: -- SDL4.0 feature is enabled in .ini file, SDL and HMI are started. -- In case: -- 1) App is registered app via 4th protocol. -- 2) App sends via 'SystemRequest' json files -- - JSONWithLanguageDefaultVrTtsLowerBound.json -- - JSONWithLanguageDefaultVrTtsUpperBound.json -- SDL does: -- - SDL sends in BC.UpdateAppList values of 'vrSynonyms' and 'ttsName' from json file --------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('user_modules/sequences/actions') local utils = require("user_modules/utils") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false config.defaultProtocolVersion = 4 common.getConfigAppParams().appHMIType = { "DEFAULT" } --[[ Local Variables ]] local pathToJsonFiles = "files/jsons/JSON_Language_parameter" local jsonFiles = { "JSONWithLanguageDefaultVrTtsLowerBound.json", "JSONWithLanguageDefaultVrTtsUpperBound.json" } --[[ Local Functions ]] local function checkParams(pAppData, pJsonFile) local tbl = utils.jsonFileToTable(pathToJsonFiles .. "/" .. pJsonFile) local isAppFound = false for _, item in ipairs(tbl.response) do if pAppData.appName == common.getConfigAppParams().appName then return true end if item.name == pAppData.appName then isAppFound = true local deviceInfo if item.ios ~= nil then deviceInfo = item.ios else deviceInfo = item.android end local exp = deviceInfo.languages[1].default local act = pAppData if exp.ttsName ~= act.ttsName[1] then return false, "Expected 'ttsName' is '" .. tostring(exp.ttsName) .. "', actual '" .. tostring(act.ttsName[1]) .. "'" end if not utils.isTableEqual(exp.vrSynonyms, act.vrSynonyms) then return false, "Expected 'vrSynonyms' is:\n" .. utils.tableToString(exp.vrSynonyms) .. "\nactual:\n" .. utils.tableToString(act.vrSynonyms) end return end end if isAppFound == false then return false, "App wasn't found" end return true end local function registerAppWithOnSystemRequestQueryApps(pJsonFile) local session = common.mobile.createSession() session:StartService(7) :Do(function() local cid = session:SendRPC("RegisterAppInterface", common.getConfigAppParams()) common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppRegistered") session:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) :Do(function() common.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) :Do(function() local msg = { serviceType = 7, frameInfo = 0, rpcType = 2, rpcFunctionId = 32768, rpcCorrelationId = common.getMobileSession().correlationId + 30, payload = '{"hmiLevel":"FULL", "audioStreamingState":"NOT_AUDIBLE", "systemContext":"MAIN"}' } common.getMobileSession():Send(msg) end) end) end) common.getMobileSession():ExpectNotification("OnSystemRequest", { requestType = "LOCK_SCREEN_ICON_URL" }, { requestType = "QUERY_APPS" }) :Times(2) :Do(function(_, data) if data.payload.requestType == "QUERY_APPS" then local cid = common.getMobileSession():SendRPC("SystemRequest", { requestType = "QUERY_APPS", fileName = pJsonFile }, pathToJsonFiles .. "/" .. pJsonFile) common.getHMIConnection():ExpectRequest("BasicCommunication.UpdateAppList") :ValidIf(function(_, data) for _, appData in ipairs(data.params.applications) do local result, msg = checkParams(appData, pJsonFile) if result == false then return result, msg end end return true end) :Do(function(_, data) common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) end end) end local function unregisterApp() local cid = common.getMobileSession():SendRPC("UnregisterAppInterface",{}) common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) common.getHMIConnection():ExpectRequest("BasicCommunication.UpdateAppList") :Do(function(_, data) common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) end --[[ Scenario ]] for _, v in pairs(jsonFiles) do runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions) runner.Step("Create mobile connection and session", common.start) runner.Title("Test") runner.Step("Register App with OnSystemRequest Query_Apps " .. _, registerAppWithOnSystemRequestQueryApps, { v }) runner.Step("App unregistered", unregisterApp) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) end
--壱世壊を劈く弦声 -- --Script by Trishula9 function c101110058.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --to grave local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DECKDES) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetRange(LOCATION_SZONE) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCountLimit(1,101110058) e2:SetCondition(c101110058.discon) e2:SetTarget(c101110058.distg) e2:SetOperation(c101110058.disop) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) --to hand local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_TO_GRAVE) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCountLimit(1,101110058+100) e4:SetCondition(c101110058.thcon) e4:SetTarget(c101110058.thtg) e4:SetOperation(c101110058.thop) c:RegisterEffect(e4) end function c101110058.disfilter(c) return ((c:IsSetCard(0x181) and c:IsLocation(LOCATION_MZONE)) or c:IsCode(56099748)) and c:IsFaceup() end function c101110058.discon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c101110058.disfilter,tp,LOCATION_ONFIELD,0,1,nil) end function c101110058.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) end function c101110058.disop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.DiscardDeck(p,d,REASON_EFFECT) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(-500) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function c101110058.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end function c101110058.thfilter(c) return c:IsSetCard(0x181) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() end function c101110058.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c101110058.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c101110058.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c101110058.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end
-- -- Autogenerated by Thrift -- -- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -- @generated -- local Thrift = require 'Thrift' local ttype = Thrift.ttype local terror = Thrift.terror local ttable_size = Thrift.ttable_size local TType = Thrift.TType local TMessageType = Thrift.TMessageType local __TObject = Thrift. __TObject local thrift_print_r = Thrift.thrift_print_r local TException = Thrift.TException local TApplicationException = Thrift.TApplicationException local __TClient = Thrift.__TClient local __TProcessor= Thrift.__TProcessor local hbase_ttypes = require 'hbase_ttypes' local TTimeRange = hbase_ttypes.TTimeRange local TColumn= hbase_ttypes.TColumn local TColumnValue= hbase_ttypes.TColumnValue local TColumnIncrement = hbase_ttypes.TColumnIncrement local TResult = hbase_ttypes.TResult local TAuthorization= hbase_ttypes.TAuthorization local TCellVisibility= hbase_ttypes.TCellVisibility local TGet= hbase_ttypes.TGet local TPut= hbase_ttypes.TPut local TDelete= hbase_ttypes.TDelete local TIncrement= hbase_ttypes.TIncrement local TAppend= hbase_ttypes.TAppend local TScan= hbase_ttypes.TScan local TMutation= hbase_ttypes.TMutation local TRowMutations= hbase_ttypes.TRowMutations local TIOError= hbase_ttypes.TIOError local TIllegalArgument= hbase_ttypes.TIllegalArgument -- HELPER FUNCTIONS AND STRUCTURES local exists_args = __TObject:new{ table = nil, get = nil } function exists_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.get = TGet:new{} self.get:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function exists_args:write(oprot) oprot:writeStructBegin('exists_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.get ~= nil then oprot:writeFieldBegin('get', TType.STRUCT, 2) self.get:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local exists_result = __TObject:new{ success = nil, io = nil } function exists_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.BOOL then self.success = iprot:readBool() else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function exists_result:write(oprot) oprot:writeStructBegin('exists_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.BOOL, 0) oprot:writeBool(self.success) oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local get_args = __TObject:new{ table = nil, get = nil } function get_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.get = TGet:new{} self.get:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function get_args:write(oprot) oprot:writeStructBegin('get_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.get ~= nil then oprot:writeFieldBegin('get', TType.STRUCT, 2) self.get:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local get_result = __TObject:new{ success = nil, io = nil } function get_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.STRUCT then self.success = TResult:new{} self.success:read(iprot) else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function get_result:write(oprot) oprot:writeStructBegin('get_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local getMultiple_args = __TObject:new{ table = nil, gets = nil } function getMultiple_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.LIST then self.gets = {} local _etype105, _size102 = iprot:readListBegin() for _i=1,_size102 do local _elem106 = TGet:new{} _elem106:read(iprot) table.insert(self.gets, _elem106) end iprot:readListEnd() else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function getMultiple_args:write(oprot) oprot:writeStructBegin('getMultiple_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.gets ~= nil then oprot:writeFieldBegin('gets', TType.LIST, 2) oprot:writeListBegin(TType.STRUCT, #self.gets) for _,iter107 in ipairs(self.gets) do iter107:write(oprot) end oprot:writeListEnd() oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local getMultiple_result = __TObject:new{ success = nil, io = nil } function getMultiple_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.LIST then self.success = {} local _etype111, _size108 = iprot:readListBegin() for _i=1,_size108 do local _elem112 = TResult:new{} _elem112:read(iprot) table.insert(self.success, _elem112) end iprot:readListEnd() else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function getMultiple_result:write(oprot) oprot:writeStructBegin('getMultiple_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.LIST, 0) oprot:writeListBegin(TType.STRUCT, #self.success) for _,iter113 in ipairs(self.success) do iter113:write(oprot) end oprot:writeListEnd() oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local put_args = __TObject:new{ table = nil, put = nil } function put_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.put = TPut:new{} self.put:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function put_args:write(oprot) oprot:writeStructBegin('put_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.put ~= nil then oprot:writeFieldBegin('put', TType.STRUCT, 2) self.put:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local put_result = __TObject:new{ io = nil } function put_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function put_result:write(oprot) oprot:writeStructBegin('put_result') if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local checkAndPut_args = __TObject:new{ table = nil , row = nil, family = nil , qualifier = nil , value = nil , put = nil } function checkAndPut_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRING then self.row = iprot:readString() else iprot:skip(ftype) end elseif fid == 3 then if ftype == TType.STRING then self.family = iprot:readString() else iprot:skip(ftype) end elseif fid == 4 then if ftype == TType.STRING then self.qualifier = iprot:readString() else iprot:skip(ftype) end elseif fid == 5 then if ftype == TType.STRING then self.value = iprot:readString() else iprot:skip(ftype) end elseif fid == 6 then if ftype == TType.STRUCT then self.put = TPut:new{} self.put:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function checkAndPut_args:write(oprot) oprot:writeStructBegin('checkAndPut_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.row ~= nil then oprot:writeFieldBegin('row', TType.STRING, 2) oprot:writeString(self.row) oprot:writeFieldEnd() end if self.family ~= nil then oprot:writeFieldBegin('family', TType.STRING, 3) oprot:writeString(self.family) oprot:writeFieldEnd() end if self.qualifier ~= nil then oprot:writeFieldBegin('qualifier', TType.STRING, 4) oprot:writeString(self.qualifier) oprot:writeFieldEnd() end if self.value ~= nil then oprot:writeFieldBegin('value', TType.STRING, 5) oprot:writeString(self.value) oprot:writeFieldEnd() end if self.put ~= nil then oprot:writeFieldBegin('put', TType.STRUCT, 6) self.put:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local checkAndPut_result = __TObject:new{ success = nil, io = nil } function checkAndPut_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.BOOL then self.success = iprot:readBool() else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function checkAndPut_result:write(oprot) oprot:writeStructBegin('checkAndPut_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.BOOL, 0) oprot:writeBool(self.success) oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local putMultiple_args = __TObject:new{ table = nil, puts = nil } function putMultiple_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.LIST then self.puts = {} local _etype117, _size114 = iprot:readListBegin() for _i=1,_size114 do local _elem118 = TPut:new{} _elem118:read(iprot) table.insert(self.puts, _elem118) end iprot:readListEnd() else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function putMultiple_args:write(oprot) oprot:writeStructBegin('putMultiple_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.puts ~= nil then oprot:writeFieldBegin('puts', TType.LIST, 2) oprot:writeListBegin(TType.STRUCT, #self.puts) for _,iter119 in ipairs(self.puts) do iter119:write(oprot) end oprot:writeListEnd() oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local putMultiple_result = __TObject:new{ io = nil } function putMultiple_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function putMultiple_result:write(oprot) oprot:writeStructBegin('putMultiple_result') if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local deleteSingle_args = __TObject:new{ table = nil, deleteSingle = nil } function deleteSingle_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.deleteSingle = TDelete:new{} self.deleteSingle:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function deleteSingle_args:write(oprot) oprot:writeStructBegin('deleteSingle_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.deleteSingle ~= nil then oprot:writeFieldBegin('deleteSingle', TType.STRUCT, 2) self.deleteSingle:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local deleteSingle_result = __TObject:new{ io = nil } function deleteSingle_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function deleteSingle_result:write(oprot) oprot:writeStructBegin('deleteSingle_result') if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local deleteMultiple_args = __TObject:new{ table = nil, deletes = nil } function deleteMultiple_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.LIST then self.deletes = {} local _etype123, _size120 = iprot:readListBegin() for _i=1,_size120 do local _elem124 = TDelete:new{} _elem124:read(iprot) table.insert(self.deletes, _elem124) end iprot:readListEnd() else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function deleteMultiple_args:write(oprot) oprot:writeStructBegin('deleteMultiple_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.deletes ~= nil then oprot:writeFieldBegin('deletes', TType.LIST, 2) oprot:writeListBegin(TType.STRUCT, #self.deletes) for _,iter125 in ipairs(self.deletes) do iter125:write(oprot) end oprot:writeListEnd() oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local deleteMultiple_result = __TObject:new{ success = nil, io = nil } function deleteMultiple_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.LIST then self.success = {} local _etype129, _size126 = iprot:readListBegin() for _i=1,_size126 do local _elem130 = TDelete:new{} _elem130:read(iprot) table.insert(self.success, _elem130) end iprot:readListEnd() else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function deleteMultiple_result:write(oprot) oprot:writeStructBegin('deleteMultiple_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.LIST, 0) oprot:writeListBegin(TType.STRUCT, #self.success) for _,iter131 in ipairs(self.success) do iter131:write(oprot) end oprot:writeListEnd() oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local checkAndDelete_args = __TObject:new{ table = nil, row = nil, family = nil , qualifier = nil , value = nil, deleteSingle = nil } function checkAndDelete_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRING then self.row = iprot:readString() else iprot:skip(ftype) end elseif fid == 3 then if ftype == TType.STRING then self.family = iprot:readString() else iprot:skip(ftype) end elseif fid == 4 then if ftype == TType.STRING then self.qualifier = iprot:readString() else iprot:skip(ftype) end elseif fid == 5 then if ftype == TType.STRING then self.value = iprot:readString() else iprot:skip(ftype) end elseif fid == 6 then if ftype == TType.STRUCT then self.deleteSingle = TDelete:new{} self.deleteSingle:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function checkAndDelete_args:write(oprot) oprot:writeStructBegin('checkAndDelete_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.row ~= nil then oprot:writeFieldBegin('row', TType.STRING, 2) oprot:writeString(self.row) oprot:writeFieldEnd() end if self.family ~= nil then oprot:writeFieldBegin('family', TType.STRING, 3) oprot:writeString(self.family) oprot:writeFieldEnd() end if self.qualifier ~= nil then oprot:writeFieldBegin('qualifier', TType.STRING, 4) oprot:writeString(self.qualifier) oprot:writeFieldEnd() end if self.value ~= nil then oprot:writeFieldBegin('value', TType.STRING, 5) oprot:writeString(self.value) oprot:writeFieldEnd() end if self.deleteSingle ~= nil then oprot:writeFieldBegin('deleteSingle', TType.STRUCT, 6) self.deleteSingle:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local checkAndDelete_result = __TObject:new{ success = nil, io = nil } function checkAndDelete_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.BOOL then self.success = iprot:readBool() else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function checkAndDelete_result:write(oprot) oprot:writeStructBegin('checkAndDelete_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.BOOL, 0) oprot:writeBool(self.success) oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local increment_args = __TObject:new{ table = nil, increment = nil } function increment_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.increment = TIncrement:new{} self.increment:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function increment_args:write(oprot) oprot:writeStructBegin('increment_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.increment ~= nil then oprot:writeFieldBegin('increment', TType.STRUCT, 2) self.increment:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local increment_result = __TObject:new{ success = nil, io = nil } function increment_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.STRUCT then self.success = TResult:new{} self.success:read(iprot) else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function increment_result:write(oprot) oprot:writeStructBegin('increment_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local append_args = __TObject:new{ table = nil, append = nil } function append_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.append = TAppend:new{} self.append:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function append_args:write(oprot) oprot:writeStructBegin('append_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.append ~= nil then oprot:writeFieldBegin('append', TType.STRUCT, 2) self.append:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local append_result = __TObject:new{ success = nil, io = nil } function append_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.STRUCT then self.success = TResult:new{} self.success:read(iprot) else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function append_result:write(oprot) oprot:writeStructBegin('append_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local openScanner_args = __TObject:new{ table = nil , scan = nil } function openScanner_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.scan = TScan:new{} self.scan:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function openScanner_args:write(oprot) oprot:writeStructBegin('openScanner_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.scan ~= nil then oprot:writeFieldBegin('scan', TType.STRUCT, 2) self.scan:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local openScanner_result = __TObject:new{ success = nil, io = nil } function openScanner_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.I32 then self.success = iprot:readI32() else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function openScanner_result:write(oprot) oprot:writeStructBegin('openScanner_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.I32, 0) oprot:writeI32(self.success) oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local getScannerRows_args = __TObject:new{ scannerId = nil, numRows = nil } function getScannerRows_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.I32 then self.scannerId = iprot:readI32() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.I32 then self.numRows = iprot:readI32() else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function getScannerRows_args:write(oprot) oprot:writeStructBegin('getScannerRows_args') if self.scannerId ~= nil then oprot:writeFieldBegin('scannerId', TType.I32, 1) oprot:writeI32(self.scannerId) oprot:writeFieldEnd() end if self.numRows ~= nil then oprot:writeFieldBegin('numRows', TType.I32, 2) oprot:writeI32(self.numRows) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local getScannerRows_result = __TObject:new{ success = nil, io = nil, ia = nil } function getScannerRows_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.LIST then self.success = {} local _etype135, _size132 = iprot:readListBegin() for _i=1,_size132 do local _elem136 = TResult:new{} _elem136:read(iprot) table.insert(self.success, _elem136) end iprot:readListEnd() else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.ia = TIllegalArgument:new{} self.ia:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function getScannerRows_result:write(oprot) oprot:writeStructBegin('getScannerRows_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.LIST, 0) oprot:writeListBegin(TType.STRUCT, #self.success) for _,iter137 in ipairs(self.success) do iter137:write(oprot) end oprot:writeListEnd() oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end if self.ia ~= nil then oprot:writeFieldBegin('ia', TType.STRUCT, 2) self.ia:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local closeScanner_args = __TObject:new{ scannerId = nil } function closeScanner_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.I32 then self.scannerId = iprot:readI32() else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function closeScanner_args:write(oprot) oprot:writeStructBegin('closeScanner_args') if self.scannerId ~= nil then oprot:writeFieldBegin('scannerId', TType.I32, 1) oprot:writeI32(self.scannerId) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local closeScanner_result = __TObject:new{ io = nil, ia = nil } function closeScanner_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.ia = TIllegalArgument:new{} self.ia:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function closeScanner_result:write(oprot) oprot:writeStructBegin('closeScanner_result') if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end if self.ia ~= nil then oprot:writeFieldBegin('ia', TType.STRUCT, 2) self.ia:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local mutateRow_args = __TObject:new{ table = nil, rowMutations = nil } function mutateRow_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.rowMutations = TRowMutations:new{} self.rowMutations:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function mutateRow_args:write(oprot) oprot:writeStructBegin('mutateRow_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.rowMutations ~= nil then oprot:writeFieldBegin('rowMutations', TType.STRUCT, 2) self.rowMutations:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local mutateRow_result = __TObject:new{ io = nil } function mutateRow_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function mutateRow_result:write(oprot) oprot:writeStructBegin('mutateRow_result') if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local getScannerResults_args = __TObject:new{ table = nil, scan = nil , numRows = nil } function getScannerResults_args:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 1 then if ftype == TType.STRING then self.table = iprot:readString() else iprot:skip(ftype) end elseif fid == 2 then if ftype == TType.STRUCT then self.scan = TScan:new{} self.scan:read(iprot) else iprot:skip(ftype) end elseif fid == 3 then if ftype == TType.I32 then self.numRows = iprot:readI32() else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function getScannerResults_args:write(oprot) oprot:writeStructBegin('getScannerResults_args') if self.table ~= nil then oprot:writeFieldBegin('table', TType.STRING, 1) oprot:writeString(self.table) oprot:writeFieldEnd() end if self.scan ~= nil then oprot:writeFieldBegin('scan', TType.STRUCT, 2) self.scan:write(oprot) oprot:writeFieldEnd() end if self.numRows ~= nil then oprot:writeFieldBegin('numRows', TType.I32, 3) oprot:writeI32(self.numRows) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local getScannerResults_result = __TObject:new{ success = nil, io = nil } function getScannerResults_result:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = iprot:readFieldBegin() if ftype == TType.STOP then break elseif fid == 0 then if ftype == TType.LIST then self.success = {} local _etype141, _size138 = iprot:readListBegin() for _i=1,_size138 do local _elem142 = TResult:new{} _elem142:read(iprot) table.insert(self.success, _elem142) end iprot:readListEnd() else iprot:skip(ftype) end elseif fid == 1 then if ftype == TType.STRUCT then self.io = TIOError:new{} self.io:read(iprot) else iprot:skip(ftype) end else iprot:skip(ftype) end iprot:readFieldEnd() end iprot:readStructEnd() end function getScannerResults_result:write(oprot) oprot:writeStructBegin('getScannerResults_result') if self.success ~= nil then oprot:writeFieldBegin('success', TType.LIST, 0) oprot:writeListBegin(TType.STRUCT, #self.success) for _,iter143 in ipairs(self.success) do iter143:write(oprot) end oprot:writeListEnd() oprot:writeFieldEnd() end if self.io ~= nil then oprot:writeFieldBegin('io', TType.STRUCT, 1) self.io:write(oprot) oprot:writeFieldEnd() end oprot:writeFieldStop() oprot:writeStructEnd() end local THBaseServiceClient = __TObject.new(__TClient, { __type = 'THBaseServiceClient' }) function THBaseServiceClient:exists(table, get) self:send_exists(table, get) return self:recv_exists(table, get) end function THBaseServiceClient:send_exists(table, get) self.oprot:writeMessageBegin('exists', TMessageType.CALL, self._seqid) local args = exists_args:new{} args.table = table args.get = get args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_exists(table, get) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = exists_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:get(table, get) self:send_get(table, get) return self:recv_get(table, get) end function THBaseServiceClient:send_get(table, get) self.oprot:writeMessageBegin('get', TMessageType.CALL, self._seqid) local args = get_args:new{} args.table = table args.get = get args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_get(table, get) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = get_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:getMultiple(table, gets) self:send_getMultiple(table, gets) return self:recv_getMultiple(table, gets) end function THBaseServiceClient:send_getMultiple(table, gets) self.oprot:writeMessageBegin('getMultiple', TMessageType.CALL, self._seqid) local args = getMultiple_args:new{} args.table = table args.gets = gets args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_getMultiple(table, gets) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = getMultiple_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:put(table, put) self:send_put(table, put) self:recv_put(table, put) end function THBaseServiceClient:send_put(table, put) self.oprot:writeMessageBegin('put', TMessageType.CALL, self._seqid) local args = put_args:new{} args.table = table args.put = put args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_put(table, put) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = put_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() end function THBaseServiceClient:checkAndPut(table, row, family, qualifier, value, put) self:send_checkAndPut(table, row, family, qualifier, value, put) return self:recv_checkAndPut(table, row, family, qualifier, value, put) end function THBaseServiceClient:send_checkAndPut(table, row, family, qualifier, value, put) self.oprot:writeMessageBegin('checkAndPut', TMessageType.CALL, self._seqid) local args = checkAndPut_args:new{} args.table = table args.row = row args.family = family args.qualifier = qualifier args.value = value args.put = put args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_checkAndPut(table, row, family, qualifier, value, put) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = checkAndPut_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:putMultiple(table, puts) self:send_putMultiple(table, puts) self:recv_putMultiple(table, puts) end function THBaseServiceClient:send_putMultiple(table, puts) self.oprot:writeMessageBegin('putMultiple', TMessageType.CALL, self._seqid) local args = putMultiple_args:new{} args.table = table args.puts = puts args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_putMultiple(table, puts) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = putMultiple_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() end function THBaseServiceClient:deleteSingle(table, deleteSingle) self:send_deleteSingle(table, deleteSingle) self:recv_deleteSingle(table, deleteSingle) end function THBaseServiceClient:send_deleteSingle(table, deleteSingle) self.oprot:writeMessageBegin('deleteSingle', TMessageType.CALL, self._seqid) local args = deleteSingle_args:new{} args.table = table args.deleteSingle = deleteSingle args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_deleteSingle(table, deleteSingle) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = deleteSingle_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() end function THBaseServiceClient:deleteMultiple(table, deletes) self:send_deleteMultiple(table, deletes) return self:recv_deleteMultiple(table, deletes) end function THBaseServiceClient:send_deleteMultiple(table, deletes) self.oprot:writeMessageBegin('deleteMultiple', TMessageType.CALL, self._seqid) local args = deleteMultiple_args:new{} args.table = table args.deletes = deletes args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_deleteMultiple(table, deletes) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = deleteMultiple_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:checkAndDelete(table, row, family, qualifier, value, deleteSingle) self:send_checkAndDelete(table, row, family, qualifier, value, deleteSingle) return self:recv_checkAndDelete(table, row, family, qualifier, value, deleteSingle) end function THBaseServiceClient:send_checkAndDelete(table, row, family, qualifier, value, deleteSingle) self.oprot:writeMessageBegin('checkAndDelete', TMessageType.CALL, self._seqid) local args = checkAndDelete_args:new{} args.table = table args.row = row args.family = family args.qualifier = qualifier args.value = value args.deleteSingle = deleteSingle args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_checkAndDelete(table, row, family, qualifier, value, deleteSingle) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = checkAndDelete_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:increment(table, increment) self:send_increment(table, increment) return self:recv_increment(table, increment) end function THBaseServiceClient:send_increment(table, increment) self.oprot:writeMessageBegin('increment', TMessageType.CALL, self._seqid) local args = increment_args:new{} args.table = table args.increment = increment args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_increment(table, increment) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = increment_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:append(table, append) self:send_append(table, append) return self:recv_append(table, append) end function THBaseServiceClient:send_append(table, append) self.oprot:writeMessageBegin('append', TMessageType.CALL, self._seqid) local args = append_args:new{} args.table = table args.append = append args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_append(table, append) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = append_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:openScanner(table, scan) self:send_openScanner(table, scan) return self:recv_openScanner(table, scan) end function THBaseServiceClient:send_openScanner(table, scan) self.oprot:writeMessageBegin('openScanner', TMessageType.CALL, self._seqid) local args = openScanner_args:new{} args.table = table args.scan = scan args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_openScanner(table, scan) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = openScanner_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:getScannerRows(scannerId, numRows) self:send_getScannerRows(scannerId, numRows) return self:recv_getScannerRows(scannerId, numRows) end function THBaseServiceClient:send_getScannerRows(scannerId, numRows) self.oprot:writeMessageBegin('getScannerRows', TMessageType.CALL, self._seqid) local args = getScannerRows_args:new{} args.scannerId = scannerId args.numRows = numRows args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_getScannerRows(scannerId, numRows) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = getScannerRows_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) elseif result.ia then error(result.ia) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end function THBaseServiceClient:closeScanner(scannerId) self:send_closeScanner(scannerId) self:recv_closeScanner(scannerId) end function THBaseServiceClient:send_closeScanner(scannerId) self.oprot:writeMessageBegin('closeScanner', TMessageType.CALL, self._seqid) local args = closeScanner_args:new{} args.scannerId = scannerId args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_closeScanner(scannerId) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = closeScanner_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() end function THBaseServiceClient:mutateRow(table, rowMutations) self:send_mutateRow(table, rowMutations) self:recv_mutateRow(table, rowMutations) end function THBaseServiceClient:send_mutateRow(table, rowMutations) self.oprot:writeMessageBegin('mutateRow', TMessageType.CALL, self._seqid) local args = mutateRow_args:new{} args.table = table args.rowMutations = rowMutations args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_mutateRow(table, rowMutations) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = mutateRow_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() end function THBaseServiceClient:getScannerResults(table, scan, numRows) self:send_getScannerResults(table, scan, numRows) return self:recv_getScannerResults(table, scan, numRows) end function THBaseServiceClient:send_getScannerResults(table, scan, numRows) self.oprot:writeMessageBegin('getScannerResults', TMessageType.CALL, self._seqid) local args = getScannerResults_args:new{} args.table = table args.scan = scan args.numRows = numRows args:write(self.oprot) self.oprot:writeMessageEnd() self.oprot.trans:flush() end function THBaseServiceClient:recv_getScannerResults(table, scan, numRows) local fname, mtype, rseqid = self.iprot:readMessageBegin() if mtype == TMessageType.EXCEPTION then local x = TApplicationException:new{} x:read(self.iprot) self.iprot:readMessageEnd() error(x) end local result = getScannerResults_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() if result.success ~= nil then return result.success elseif result.io then error(result.io) end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) end local THBaseServiceIface = __TObject:new{ __type = 'THBaseServiceIface' } local THBaseServiceProcessor = __TObject.new(__TProcessor , { __type = 'THBaseServiceProcessor' }) function THBaseServiceProcessor:process(iprot, oprot, server_ctx) local name, mtype, seqid = iprot:readMessageBegin() local func_name = 'process_' .. name if not self[func_name] or ttype(self[func_name]) ~= 'function' then iprot:skip(TType.STRUCT) iprot:readMessageEnd() local x = TApplicationException:new{ errorCode = TApplicationException.UNKNOWN_METHOD } oprot:writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() else self[func_name](self, seqid, iprot, oprot, server_ctx) end end function THBaseServiceProcessor:process_exists(seqid, iprot, oprot, server_ctx) local args =exists_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = exists_result:new{} local status, res = pcall(self.handler.exists, self.handler, args.table, args.get) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('exists', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_get(seqid, iprot, oprot, server_ctx) local args = get_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = get_result:new{} local status, res = pcall(self.handler.get, self.handler, args.table, args.get) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('get', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_getMultiple(seqid, iprot, oprot, server_ctx) local args = getMultiple_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = getMultiple_result:new{} local status, res = pcall(self.handler.getMultiple, self.handler, args.table, args.gets) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('getMultiple', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_put(seqid, iprot, oprot, server_ctx) local args = put_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = put_result:new{} local status, res = pcall(self.handler.put, self.handler, args.table, args.put) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('put', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_checkAndPut(seqid, iprot, oprot, server_ctx) local args = checkAndPut_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = checkAndPut_result:new{} local status, res = pcall(self.handler.checkAndPut, self.handler, args.table, args.row, args.family, args.qualifier, args.value, args.put) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('checkAndPut', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_putMultiple(seqid, iprot, oprot, server_ctx) local args = putMultiple_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = putMultiple_result:new{} local status, res = pcall(self.handler.putMultiple, self.handler, args.table, args.puts) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('putMultiple', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_deleteSingle(seqid, iprot, oprot, server_ctx) local args = deleteSingle_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = deleteSingle_result:new{} local status, res = pcall(self.handler.deleteSingle, self.handler, args.table, args.deleteSingle) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('deleteSingle', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_deleteMultiple(seqid, iprot, oprot, server_ctx) local args = deleteMultiple_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = deleteMultiple_result:new{} local status, res = pcall(self.handler.deleteMultiple, self.handler, args.table, args.deletes) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('deleteMultiple', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_checkAndDelete(seqid, iprot, oprot, server_ctx) local args = checkAndDelete_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = checkAndDelete_result:new{} local status, res = pcall(self.handler.checkAndDelete, self.handler, args.table, args.row, args.family, args.qualifier, args.value, args.deleteSingle) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('checkAndDelete', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_increment(seqid, iprot, oprot, server_ctx) local args = increment_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = increment_result:new{} local status, res = pcall(self.handler.increment, self.handler, args.table, args.increment) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('increment', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_append(seqid, iprot, oprot, server_ctx) local args = append_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = append_result:new{} local status, res = pcall(self.handler.append, self.handler, args.table, args.append) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('append', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_openScanner(seqid, iprot, oprot, server_ctx) local args = openScanner_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = openScanner_result:new{} local status, res = pcall(self.handler.openScanner, self.handler, args.table, args.scan) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('openScanner', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_getScannerRows(seqid, iprot, oprot, server_ctx) local args = getScannerRows_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = getScannerRows_result:new{} local status, res = pcall(self.handler.getScannerRows, self.handler, args.scannerId, args.numRows) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res elseif ttype(res) == 'TIllegalArgument' then result.ia = res else result.success = res end oprot:writeMessageBegin('getScannerRows', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_closeScanner(seqid, iprot, oprot, server_ctx) local args = closeScanner_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = closeScanner_result:new{} local status, res = pcall(self.handler.closeScanner, self.handler, args.scannerId) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res elseif ttype(res) == 'TIllegalArgument' then result.ia = res else result.success = res end oprot:writeMessageBegin('closeScanner', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_mutateRow(seqid, iprot, oprot, server_ctx) local args = mutateRow_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = mutateRow_result:new{} local status, res = pcall(self.handler.mutateRow, self.handler, args.table, args.rowMutations) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('mutateRow', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end function THBaseServiceProcessor:process_getScannerResults(seqid, iprot, oprot, server_ctx) local args = getScannerResults_args:new{} local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() local result = getScannerResults_result:new{} local status, res = pcall(self.handler.getScannerResults, self.handler, args.table, args.scan, args.numRows) if not status then reply_type = TMessageType.EXCEPTION result = TApplicationException:new{message = res} elseif ttype(res) == 'TIOError' then result.io = res else result.success = res end oprot:writeMessageBegin('getScannerResults', reply_type, seqid) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() end local _M = { append_args = append_args, append_result =append_result, checkAndDelete_args = checkAndDelete_args, checkAndDelete_result = checkAndDelete_result, checkAndPut_args = checkAndPut_args, checkAndPut_result = checkAndPut_result, closeScanner_args = closeScanner_args, closeScanner_result = closeScanner_result, deleteMultiple_args = deleteMultiple_args, deleteMultiple_result = deleteMultiple_result, deleteSingle_args = deleteSingle_args, deleteSingle_result = deleteSingle_result, exists_args = exists_args, exists_result = exists_result, get_args = get_args, getMultiple_args = getMultiple_args, getMultiple_result = getMultiple_result, get_result = get_result, getScannerResults_args = getScannerResults_args, getScannerResults_result = getScannerResults_result, getScannerRows_args = getScannerRows_args, getScannerRows_result = getScannerRows_result, increment_args = increment_args, increment_result = increment_result, mutateRow_args = mutateRow_args, mutateRow_result = mutateRow_result, openScanner_args = openScanner_args, openScanner_result = openScanner_result, put_args = put_args, putMultiple_args = putMultiple_args, putMultiple_result = putMultiple_result, put_result = put_result, THBaseServiceClient = THBaseServiceClient, THBaseServiceProcessor = THBaseServiceProcessor } return _M
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(creature, type, msg) if not (msgcontains(msg, 'hi') or msgcontains(msg, 'hello')) then npcHandler:say('LEAVE THE DRAGONS\' CEMETERY AT ONCE!', creature.uid) end npcHandler:onCreatureSay(creature, type, msg) end function onThink() npcHandler:onThink() end local voices = { {text = 'AHHHH THE PAIN OF AGESSS! THE PAIN!'} } npcHandler:addModule(VoiceModule:new(voices)) local function greetCallback(cid) local player = Player(cid) if player:getStorageValue(Storage.Dragonfetish) == 1 then npcHandler:say('LEAVE THE DRAGONS\' CEMETERY AT ONCE!', cid) return false end if not player:removeItem(2787, 1) then npcHandler:say('AHHHH THE PAIN OF AGESSS! I NEED MUSSSSHRROOOMSSS TO EASSSE MY PAIN! BRRRING ME MUSHRRROOOMSSS!', cid) return false end player:setStorageValue(Storage.Dragonfetish, 1) player:addItem(2319, 1) npcHandler:say('AHHH MUSHRRROOOMSSS! NOW MY PAIN WILL BE EASSSED FOR A WHILE! TAKE THISS AND LEAVE THE DRAGONSSS\' CEMETERY AT ONCE!', cid) return false end npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:addModule(FocusModule:new())
function(allstates, event, unit) if event == "GROUP_ROSTER_UPDATE" then for _, state in pairs(allstates) do state.show = false state.changed = true end for unit in WA_IterateGroupMembers() do if UnitGroupRolesAssigned(unit) == "HEALER" then local p, m = 0,1 if UnitIsVisible(unit) then p,m = UnitPower(unit, 0) or 0, UnitPowerMax(unit, 0) or 1 end allstates[unit] = { show = true, changed = true, name = WA_ClassColorName(unit), progressType = "static", value = p, total = m, unit = unit, class = select(2, UnitClass(unit)), resort = true, perc = p/m, percent = Round( (p/m)*100 ) .."%" } end end end if event == "UNIT_MAXPOWER" and allstates[unit] then local p, m = 0,1 if UnitIsVisible(unit) then p,m = UnitPower(unit, 0) or 0, UnitPowerMax(unit, 0) or 1 end allstates[unit].value = p allstates[unit].total = m allstates[unit].perc = p/m allstates[unit].percent = Round( (p/m)*100 ) .."%" allstates[unit].changed = true end if event == "UNIT_POWER_UPDATE" and allstates[unit] then local p, m = 0,1 if UnitIsVisible(unit) then p,m = UnitPower(unit, 0) or 0, UnitPowerMax(unit, 0) or 1 end allstates[unit].value = p allstates[unit].total = m allstates[unit].perc = p/m allstates[unit].percent = Round( (p/m)*100 ) .."%" allstates[unit].changed = true end return true end -- GROUP_ROSTER_UPDATE, UNIT_MAXPOWER, UNIT_POWER_UPDATE
local map_class = require('map') local object_count = 100000 local step_count = 20 local results = {} collectgarbage('stop') local function start_world(classes_name) local start_memory = collectgarbage('count') local classes = require('classes.' .. classes_name) local map = map_class.new(1000, 1000) math.randomseed(69) local start_time = os.clock() for i = 1, math.floor(object_count) do local flower = classes.new_flower(math.random(0, map.width - 1), math.random(0, map.height - 1)) map:enter(flower) table.insert(map.objects, flower) end for i = 1, object_count do local human = classes.new_human(math.random(0, map.width - 1), math.random(0, map.height - 1)) map:enter(human) table.insert(map.objects, human) end for i = 1, object_count do local zombie = classes.new_zombie(math.random(0, map.width - 1), math.random(0, map.height - 1)) map:enter(zombie) table.insert(map.objects, zombie) end local creation_time = os.clock() for i = 1, step_count do for j = 1, #map.objects do local object = map.objects[j] if not object.is_invalid and object.update then object:update(map) end end end local simulation_time = os.clock() local result = { name = classes_name, creation = creation_time - start_time, simulation = simulation_time - creation_time, flowers = 0, humans = 0, zombies = 0, memory = collectgarbage('count') - start_memory } previous_memory = memory for i = 1, #map.objects do local object = map.objects[i] if not object.is_invalid then if object.is_flower then result.flowers = result.flowers + 1 elseif object.is_human then result.humans = result.humans + 1 elseif object.is_zombie then result.zombies = result.zombies + 1 end end end table.insert(results, result) end start_world('plain') start_world('predef') start_world('mt') -- Find minimal times. local min_creation_time, min_simulation_time = results[1].creation, results[1].simulation for i = 2, #results do local r = results[i] if r.creation < min_creation_time then min_creation_time = r.creation end if r.simulation < min_simulation_time then min_simulation_time = r.simulation end end -- Sort. --table.sort(results, function(a, b) return a.creation < b.creation end) --table.sort(results, function(a, b) return a.simulation < b.simulation end) -- Print results. local f = function(n, p) return string.format('%.' .. (tostring(p or 2)) .. 'f', n) end print('object count: ' .. f(object_count, 0), 'step count: ' .. f(step_count, 0)) for i = 1, #results do local r = results[i] print( r.name, 'create: ' .. f(r.creation, 5) .. 's' .. ' (' .. f(100 * r.creation / min_creation_time, 1) .. '%)', 'simulate: ' .. f(r.simulation) .. 's' .. ' (' .. f(100 * r.simulation / min_simulation_time, 1) .. '%)', 'memory: ' .. f(r.memory / 1024, 1) .. 'MB', 'f: ' .. f(r.flowers, 0) .. ' h: ' .. f(r.humans, 0) .. ' z: ' .. f(r.zombies, 0) ) end
local social_key = ARGV[1]..":s:u:"..KEYS[1]..":u" if redis.call("EXISTS", social_key) == 0 then local repos = redis.call("ZREVRANGE", ARGV[1]..":u:"..KEYS[1]..":r", 0, 5,"withscores") for i,repo_or_score in ipairs(repos) do if i%2 == 1 then local repo = repo_or_score local repo_score = repos[i+1] local users = redis.call("ZREVRANGE", ARGV[1]..":r:"..repo..":u", 0, 5, "withscores") for j,user_or_score in ipairs(users) do if j%2 == 1 then local user = user_or_score if user ~= KEYS[1] then redis.call("ZINCRBY", social_key, repo_score + users[j+1], user) end end end end end redis.call("EXPIRE", social_key, 172800) end return redis.call("ZREVRANGE", social_key, 0, 4, "withscores")
require("rrpg.lua"); local __o_rrpgObjs = require("rrpgObjs.lua"); require("rrpgGUI.lua"); require("rrpgDialogs.lua"); require("rrpgLFM.lua"); require("ndb.lua"); function newfrmSkills() __o_rrpgObjs.beginObjectsLoading(); local obj = gui.fromHandle(_obj_newObject("form")); local self = obj; local sheet = nil; rawset(obj, "_oldSetNodeObjectFunction", rawget(obj, "setNodeObject")); function obj:setNodeObject(nodeObject) sheet = nodeObject; self.sheet = nodeObject; self:_oldSetNodeObjectFunction(nodeObject); end; function obj:setNodeDatabase(nodeObject) self:setNodeObject(nodeObject); end; _gui_assignInitialParentForForm(obj.handle); obj:beginUpdate(); obj:setName("frmSkills"); obj:setAlign("client"); local skills = {}; skills[1] = {}; skills[2] = {}; skills[3] = {}; skills[4] = {}; skills[5] = {}; skills[6] = {}; skills[7] = {}; skills[8] = {}; skills[9] = {}; skills[10] = {}; skills[11] = {}; skills[12] = {}; skills[13] = {}; skills[14] = {}; skills[15] = {}; skills[16] = {}; skills[17] = {}; skills[18] = {}; skills[19] = {}; skills[20] = {}; skills[21] = {}; skills[22] = {}; skills[23] = {}; skills[24] = {}; skills[25] = {}; skills[26] = {}; skills[27] = {}; skills[28] = {}; skills[29] = {}; skills[30] = {}; skills[31] = {}; skills[32] = {}; skills[33] = {}; skills[34] = {}; skills[35] = {}; skills[36] = {}; skills[37] = {}; skills[38] = {}; skills[39] = {}; skills[40] = {}; skills[41] = {}; skills[42] = {}; skills[43] = {}; skills[44] = {}; skills[45] = {}; skills[46] = {}; skills[47] = {}; skills[48] = {}; skills[49] = {}; skills[50] = {}; skills[51] = {}; skills[52] = {}; skills[53] = {}; skills[54] = {}; skills[55] = {}; skills[1].nome = "Abrir Fechaduras "; skills[1].chave = "2"; skills[2].nome = "Acrobacia "; skills[2].chave = "2"; skills[3].nome = "Adestrar Animais "; skills[3].chave = "6"; skills[4].nome = "Arte da Fuga "; skills[4].chave = "2"; skills[5].nome = "Atuação "; skills[5].chave = "6"; skills[6].nome = "Avaliação "; skills[6].chave = "4"; skills[7].nome = "Blefar "; skills[7].chave = "6"; skills[8].nome = "Cavalgar "; skills[8].chave = "2"; skills[9].nome = "Concentração "; skills[9].chave = "3"; skills[10].nome = "Conhecimento Arcano "; skills[10].chave = "4"; skills[11].nome = "Conhecimento Arte "; skills[11].chave = "4"; skills[12].nome = "Conhecimento Atualidades "; skills[12].chave = "4"; skills[13].nome = "Conhecimento Ciências Comportamentais "; skills[13].chave = "4"; skills[14].nome = "Conhecimento Ciências Físicas "; skills[14].chave = "4"; skills[15].nome = "Conhecimento Ciências Naturais "; skills[15].chave = "4"; skills[16].nome = "Conhecimento Civil "; skills[16].chave = "4"; skills[17].nome = "Conhecimento Cultura Popular "; skills[17].chave = "4"; skills[18].nome = "Conhecimento Estratégia "; skills[18].chave = "4"; skills[19].nome = "Conhecimento História "; skills[19].chave = "4"; skills[20].nome = "Conhecimento Manha "; skills[20].chave = "4"; skills[21].nome = "Conhecimento Negócios "; skills[21].chave = "4"; skills[22].nome = "Conhecimento Tecnologia "; skills[22].chave = "4"; skills[23].nome = "Conhecimento Teologia e Filosofia "; skills[23].chave = "4"; skills[24].nome = "Cura "; skills[24].chave = "5"; skills[25].nome = "Decifrar Escrita "; skills[25].chave = "4"; skills[26].nome = "Demolição "; skills[26].chave = "4"; skills[27].nome = "Diplomacia "; skills[27].chave = "6"; skills[28].nome = "Disfarce "; skills[28].chave = "6"; skills[29].nome = "Equilíbrio "; skills[29].chave = "2"; skills[30].nome = "Escalar "; skills[30].chave = "1"; skills[31].nome = "Esconder-se "; skills[31].chave = "2"; skills[32].nome = "Falar Idioma "; skills[32].chave = "4"; skills[33].nome = "Furtividade "; skills[33].chave = "2"; skills[34].nome = "Identificar Magia "; skills[34].chave = "4"; skills[35].nome = "Intimidar "; skills[35].chave = "6"; skills[36].nome = "Investigar "; skills[36].chave = "4"; skills[37].nome = "Jogos "; skills[37].chave = "5"; skills[38].nome = "Natação "; skills[38].chave = "1"; skills[39].nome = "Navegação "; skills[39].chave = "4"; skills[40].nome = "Observar "; skills[40].chave = "5"; skills[41].nome = "Obter Informações "; skills[41].chave = "6"; skills[42].nome = "Ofícios "; skills[42].chave = "4"; skills[43].nome = "Operar Mecanismo "; skills[43].chave = "4"; skills[44].nome = "Ouvir "; skills[44].chave = "5"; skills[45].nome = "Pesquisa "; skills[45].chave = "4"; skills[46].nome = "Pilotar "; skills[46].chave = "2"; skills[47].nome = "Prestidigitação "; skills[47].chave = "2"; skills[48].nome = "Procurar "; skills[48].chave = "4"; skills[49].nome = "Profissão "; skills[49].chave = "5"; skills[50].nome = "Reparos "; skills[50].chave = "4"; skills[51].nome = "Saltar "; skills[51].chave = "1"; skills[52].nome = "Sentir Motivação "; skills[52].chave = "5"; skills[53].nome = "Sobrevivência "; skills[53].chave = "5"; skills[54].nome = "Usar Computador "; skills[54].chave = "4"; skills[55].nome = "Usar Cordas "; skills[55].chave = "2"; local function updateAtributes(num) local atr = "" .. num; local mod = 0; if num == 1 then mod = tonumber(sheet.mod_for) or 0; elseif num == 2 then mod = tonumber(sheet.mod_des) or 0; elseif num == 3 then mod = tonumber(sheet.mod_con) or 0; elseif num == 4 then mod = tonumber(sheet.mod_int) or 0; elseif num == 5 then mod = tonumber(sheet.mod_sab) or 0; elseif num == 6 then mod = tonumber(sheet.mod_car) or 0; end; local nodes = ndb.getChildNodes(sheet.listaDePericias); for i=1, #nodes, 1 do if nodes[i].chave == atr then nodes[i].atributo = mod; end; end end; local function defaultSkills() local nodes = ndb.getChildNodes(sheet.listaDePericias); for i=1, #nodes, 1 do ndb.deleteNode(nodes[i]); end for i=1, 55, 1 do local pericia = self.rclPericias:append(); pericia.nome = skills[i].nome; pericia.chave = skills[i].chave; end; self.rclPericias:sort(); end; obj.scrollBox1 = gui.fromHandle(_obj_newObject("scrollBox")); obj.scrollBox1:setParent(obj); obj.scrollBox1:setAlign("client"); obj.scrollBox1:setName("scrollBox1"); obj.rectangle1 = gui.fromHandle(_obj_newObject("rectangle")); obj.rectangle1:setParent(obj.scrollBox1); obj.rectangle1:setLeft(0); obj.rectangle1:setTop(0); obj.rectangle1:setWidth(880); obj.rectangle1:setHeight(600); obj.rectangle1:setColor("black"); obj.rectangle1:setName("rectangle1"); obj.button1 = gui.fromHandle(_obj_newObject("button")); obj.button1:setParent(obj.rectangle1); obj.button1:setLeft(5); obj.button1:setTop(5); obj.button1:setWidth(25); obj.button1:setHeight(25); obj.button1:setText("+"); obj.button1:setName("button1"); obj.button2 = gui.fromHandle(_obj_newObject("button")); obj.button2:setParent(obj.rectangle1); obj.button2:setLeft(30); obj.button2:setTop(5); obj.button2:setWidth(50); obj.button2:setHeight(25); obj.button2:setText("Todas"); obj.button2:setName("button2"); obj.label1 = gui.fromHandle(_obj_newObject("label")); obj.label1:setParent(obj.rectangle1); obj.label1:setLeft(215); obj.label1:setTop(5); obj.label1:setWidth(50); obj.label1:setHeight(25); obj.label1:setHorzTextAlign("center"); obj.label1:setText("Total"); obj.label1:setFontSize(13); obj.label1:setName("label1"); obj.label2 = gui.fromHandle(_obj_newObject("label")); obj.label2:setParent(obj.rectangle1); obj.label2:setLeft(275); obj.label2:setTop(5); obj.label2:setWidth(40); obj.label2:setHeight(25); obj.label2:setHorzTextAlign("center"); obj.label2:setText("Mod"); obj.label2:setFontSize(13); obj.label2:setName("label2"); obj.label3 = gui.fromHandle(_obj_newObject("label")); obj.label3:setParent(obj.rectangle1); obj.label3:setLeft(315); obj.label3:setTop(5); obj.label3:setWidth(40); obj.label3:setHeight(25); obj.label3:setHorzTextAlign("center"); obj.label3:setText("Grad"); obj.label3:setFontSize(13); obj.label3:setName("label3"); obj.label4 = gui.fromHandle(_obj_newObject("label")); obj.label4:setParent(obj.rectangle1); obj.label4:setLeft(355); obj.label4:setTop(5); obj.label4:setWidth(40); obj.label4:setHeight(25); obj.label4:setHorzTextAlign("center"); obj.label4:setText("Outros"); obj.label4:setFontSize(10); obj.label4:setName("label4"); obj.label5 = gui.fromHandle(_obj_newObject("label")); obj.label5:setParent(obj.rectangle1); obj.label5:setLeft(640); obj.label5:setTop(5); obj.label5:setWidth(50); obj.label5:setHeight(25); obj.label5:setHorzTextAlign("center"); obj.label5:setText("Total"); obj.label5:setFontSize(13); obj.label5:setName("label5"); obj.label6 = gui.fromHandle(_obj_newObject("label")); obj.label6:setParent(obj.rectangle1); obj.label6:setLeft(700); obj.label6:setTop(5); obj.label6:setWidth(40); obj.label6:setHeight(25); obj.label6:setHorzTextAlign("center"); obj.label6:setText("Mod"); obj.label6:setFontSize(13); obj.label6:setName("label6"); obj.label7 = gui.fromHandle(_obj_newObject("label")); obj.label7:setParent(obj.rectangle1); obj.label7:setLeft(740); obj.label7:setTop(5); obj.label7:setWidth(40); obj.label7:setHeight(25); obj.label7:setHorzTextAlign("center"); obj.label7:setText("Grad"); obj.label7:setFontSize(13); obj.label7:setName("label7"); obj.label8 = gui.fromHandle(_obj_newObject("label")); obj.label8:setParent(obj.rectangle1); obj.label8:setLeft(780); obj.label8:setTop(5); obj.label8:setWidth(40); obj.label8:setHeight(25); obj.label8:setHorzTextAlign("center"); obj.label8:setText("Outros"); obj.label8:setFontSize(10); obj.label8:setName("label8"); obj.rclPericias = gui.fromHandle(_obj_newObject("recordList")); obj.rclPericias:setParent(obj.rectangle1); obj.rclPericias:setLeft(5); obj.rclPericias:setTop(30); obj.rclPericias:setWidth(870); obj.rclPericias:setHeight(565); obj.rclPericias:setName("rclPericias"); obj.rclPericias:setField("listaDePericias"); obj.rclPericias:setTemplateForm("frmSkillListForm"); obj.rclPericias:setLayout("verticalTiles"); obj.rectangle2 = gui.fromHandle(_obj_newObject("rectangle")); obj.rectangle2:setParent(obj.scrollBox1); obj.rectangle2:setLeft(885); obj.rectangle2:setTop(0); obj.rectangle2:setWidth(240); obj.rectangle2:setHeight(60); obj.rectangle2:setColor("black"); obj.rectangle2:setName("rectangle2"); obj.label9 = gui.fromHandle(_obj_newObject("label")); obj.label9:setParent(obj.rectangle2); obj.label9:setLeft(0); obj.label9:setTop(5); obj.label9:setWidth(240); obj.label9:setHeight(25); obj.label9:setHorzTextAlign("center"); obj.label9:setText("Grupos de Perícias"); obj.label9:setName("label9"); obj.edit1 = gui.fromHandle(_obj_newObject("edit")); obj.edit1:setParent(obj.rectangle2); obj.edit1:setLeft(5); obj.edit1:setTop(30); obj.edit1:setWidth(230); obj.edit1:setHeight(25); obj.edit1:setField("pericias"); obj.edit1:setName("edit1"); obj._e_event0 = obj.button1:addEventListener("onClick", function (self) self.rclPericias:append(); end, obj); obj._e_event1 = obj.button2:addEventListener("onClick", function (self) defaultSkills(); end, obj); obj._e_event2 = obj.rclPericias:addEventListener("onCompare", function (self, nodeA, nodeB) return utils.compareStringPtBr(nodeA.nome, nodeB.nome); end, obj); function obj:_releaseEvents() __o_rrpgObjs.removeEventListenerById(self._e_event2); __o_rrpgObjs.removeEventListenerById(self._e_event1); __o_rrpgObjs.removeEventListenerById(self._e_event0); end; obj._oldLFMDestroy = obj.destroy; function obj:destroy() self:_releaseEvents(); if (self.handle ~= 0) and (self.setNodeDatabase ~= nil) then self:setNodeDatabase(nil); end; if self.label5 ~= nil then self.label5:destroy(); self.label5 = nil; end; if self.button1 ~= nil then self.button1:destroy(); self.button1 = nil; end; if self.label1 ~= nil then self.label1:destroy(); self.label1 = nil; end; if self.label8 ~= nil then self.label8:destroy(); self.label8 = nil; end; if self.rectangle2 ~= nil then self.rectangle2:destroy(); self.rectangle2 = nil; end; if self.label3 ~= nil then self.label3:destroy(); self.label3 = nil; end; if self.label6 ~= nil then self.label6:destroy(); self.label6 = nil; end; if self.label4 ~= nil then self.label4:destroy(); self.label4 = nil; end; if self.button2 ~= nil then self.button2:destroy(); self.button2 = nil; end; if self.label9 ~= nil then self.label9:destroy(); self.label9 = nil; end; if self.rclPericias ~= nil then self.rclPericias:destroy(); self.rclPericias = nil; end; if self.scrollBox1 ~= nil then self.scrollBox1:destroy(); self.scrollBox1 = nil; end; if self.rectangle1 ~= nil then self.rectangle1:destroy(); self.rectangle1 = nil; end; if self.label7 ~= nil then self.label7:destroy(); self.label7 = nil; end; if self.edit1 ~= nil then self.edit1:destroy(); self.edit1 = nil; end; if self.label2 ~= nil then self.label2:destroy(); self.label2 = nil; end; self:_oldLFMDestroy(); end; obj:endUpdate(); __o_rrpgObjs.endObjectsLoading(); return obj; end; local _frmSkills = { newEditor = newfrmSkills, new = newfrmSkills, name = "frmSkills", dataType = "", formType = "undefined", formComponentName = "form", title = "", description=""}; frmSkills = _frmSkills; rrpg.registrarForm(_frmSkills); return _frmSkills;
solution 'profi_all' configurations { "Debug", "Release", "Debug Dynamic", "Release Dynamic" } platforms { 'x32', 'x64' } include './src' include './samples/simple' include './samples/mt' include './tests/profi_tests'
local tbTable = GameMain:GetMod("_ModifierScript") local tbModifier = tbTable:GetModifier("DJTG_DD") local RADIUS = 10 function tbModifier:Enter(modifier, npc) self.targetIDs = self.targetIDs or {} self.targetIDs[npc.ID] = self.targetIDs[npc.ID] or {} self.indices = self.indices or {} self.indices[npc.ID] = self.indices[npc.ID] or 1 GridMgr:DoAroundKeyLua( npc.Key, RADIUS, function(i, grid) local npcs = Map.Things:GetNpcByKey(grid) if npcs then for _, n in pairs(npcs) do if n.Camp == g_emFightCamp.Enemy and n.ID ~= npc.ID then print(n.ID) table.insert(self.targetIDs[npc.ID], n.ID) end end end return true end ) end function tbModifier:Step(modifier, npc, dt) if #self.targetIDs[npc.ID] ~= 0 then npc:SetCamp(g_emFightCamp.Friend) if self.indices[npc.ID] <= #self.targetIDs[npc.ID] then local cur_npc = ThingMgr:FindThingByID(self.targetIDs[npc.ID][self.indices[npc.ID]]) if cur_npc and cur_npc.FightBody.TargetID == npc.ID then self.indices[npc.ID] = self.indices[npc.ID] + 1 elseif cur_npc then npc:FightWith(cur_npc) cur_npc:FightWith(npc) end end else npc.FightBody:FightEnd() end end function tbModifier:UpdateStack(modifier, npc, add) end function tbModifier:Leave(modifier, npc) for _, id in pairs(self.targetIDs) do local n = ThingMgr:FindThingByID(id) if n then n.FightBody:FightEnd() end end npc.FightBody:FightEnd() if npc.Camp == g_emFightCamp.Friend then npc:SetCamp(g_emFightCamp.Enemy) end end function tbModifier:OnGetSaveData() return { targetIDs = self.targetIDs, indices = self.indices } end function tbModifier:OnLoadData(modifier, npc, tbData) tbData = tbData or {} self.targetIDs = tbData.targetIDs or {} self.indices = self.indices or {} end
if CONFIG["WeaponControls"]["Enable"] then local taserSight_Enabled = false local taserSight_TaskDelay = 1000 if CONFIG["WeaponControls"]["DisableAutoReload"] then SetWeaponsNoAutoreload(true) else SetWeaponsNoAutoreload(false) end if CONFIG["WeaponControls"]["DisableAutoSwap"] then SetWeaponsNoAutoswap(true) else SetWeaponsNoAutoswap(false) end if CONFIG["WeaponControls"]["PersistentWeaponFlashlights"] then SetFlashLightKeepOnWhileMoving(true) else SetFlashLightKeepOnWhileMoving(false) end -- Prep the weapon state icon on the screen if CONFIG["WeaponControls"]["EnableWeaponSafety"] or CONFIG["WeaponControls"]["EnableWeaponFireModes"] then Citizen.CreateThread(function() local x = CONFIG["WeaponControls"]["WeaponStateIcon"].x local y = CONFIG["WeaponControls"]["WeaponStateIcon"].y Citizen.Wait(300) SendNUIMessage({ module = "weapon-state", data = { type = "setWeaponStateImgRight", name = x } }) SendNUIMessage({ module = "weapon-state", data = { type = "setWeaponStateImgBottom", name = y } }) Citizen.Wait(300) hideWeaponIcon() end) end -- Register the commands and keybinds for the script if CONFIG["WeaponControls"]["EnableWeaponSafety"] then RegisterCommand("safety", function(source, args, rawCommands) local playerWeaponObject = getPedCurrentWeaponObject() if (doesWeaponHaveSafety(playerWeaponObject)) then toggleSaftey() end end, false) TriggerEvent("chat:addSuggestion", "/safety", _U("satefyCommandSug")) RegisterKeyMapping("safety", _U("satefyCommandSug"), 'keyboard', CONFIG["WeaponControls"]["ToggleSafteyDefaultKey"]) end if CONFIG["WeaponControls"]["EnableWeaponFireModes"] then RegisterCommand("firemode", function(source, args, rawCommands) local playerWeaponObject = getPedCurrentWeaponObject() if (doesWeaponHaveFiringModes(playerWeaponObject)) then cycleFireMode() end end, false) TriggerEvent("chat:addSuggestion", "/firemode", _U("firemodeCommandSug")) RegisterKeyMapping("firemode", _U("firemodeCommandSug"), 'keyboard', CONFIG["WeaponControls"]["ChangeFireModeDefaultKey"]) end if CONFIG["WeaponControls"]["EnableTaserLaserSight"] then RegisterCommand("tasersight", function(source, args, rawCommands) taserSight_Enabled = not taserSight_Enabled if taserSight_Enabled then drawNotificationColour(_("laserSightEnabled"), _("greenHex")) else drawNotificationColour(_("laserSightDisabled"), _("redHex")) end end, false) TriggerEvent("chat:addSuggestion", "/tasersight", _U("tasersightCommandSug")) RegisterKeyMapping("tasersight", _U("tasersightCommandSug"), 'keyboard', CONFIG["WeaponControls"]["TaserLaserSightDefaultToggleKey"]) end -- Handle the laser sight Citizen.CreateThread(function() local player = PlayerId() local playerPed = GetPlayerPed(-1) local playerPedId = PlayerPedId() while true do local playerWeaponObject = getPedCurrentWeaponObject() -- Handle the laser sight if IsPlayerFreeAiming(player) and isPedRealAndAlive(playerPed) and taserSight_Enabled and (playerWeaponObject.Hash == WEAPONS["911657153"].Hash or playerWeaponObject.Hash == WEAPONS["1171102963"].Hash) then taserSight_TaskDelay = 0 local playerCameraRotation = GetGameplayCamRot() local playerWeaponEntity = GetCurrentPedWeaponEntityIndex(playerPedId) local startPoint = GetOffsetFromEntityInWorldCoords(playerWeaponEntity, 0, 0, -0.01) local direction = RotationToDirection(playerCameraRotation) local _x1, castHit, castCoords, _x2, _x3 = GetShapeTestResult( StartShapeTestRay( startPoint.x, startPoint.y, startPoint.z, startPoint.x + direction.x * 150, startPoint.y + direction.y * 150 , startPoint.z + direction.z * 150, -1, playerPedId, 1 ) ) if castHit ~= 0 then DrawLine( startPoint.x, startPoint.y, startPoint.z, castCoords.x, castCoords.y, castCoords.z, CONFIG["WeaponControls"]["TaserLaserColour"].r, CONFIG["WeaponControls"]["TaserLaserColour"].g, CONFIG["WeaponControls"]["TaserLaserColour"].b, CONFIG["WeaponControls"]["TaserLaserColour"].alpha ) DrawMarker( 28, castCoords.x, castCoords.y, castCoords.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.01, 0.01, CONFIG["WeaponControls"]["TaserLaserColour"].r, CONFIG["WeaponControls"]["TaserLaserColour"].g, CONFIG["WeaponControls"]["TaserLaserColour"].b, CONFIG["WeaponControls"]["TaserLaserColour"].alpha, false, false, 2, nil, nil, false ) end else taserSight_TaskDelay = 1000 end Citizen.Wait(taserSight_TaskDelay) end end) Citizen.CreateThread(function() local player = PlayerId() local playerPed = GetPlayerPed(-1) local playerPedId = PlayerPedId() if isPedRealAndAlive(playerPed) then while true do playerWeaponObject = getPedCurrentWeaponObject() -- Handle the reticles if (GetFollowPedCamViewMode() ~= 4 and IsPlayerFreeAiming(player) and not doesArrayHaveValue(CONFIG["WeaponControls"]["ReticleWeapons"], playerWeaponObject)) then HideHudComponentThisFrame(14) end -- Handle showing the icon if doesWeaponHaveSafety(playerWeaponObject) or doesWeaponHaveFiringModes(playerWeaponObject) then showWeaponIcon() else hideWeaponIcon() end if IsPedArmed(playerPed, 4) then -- Handle while safety is enabled if WeaponSafety then DisablePlayerFiring(player, true) if IsControlJustPressed(0, 24) or IsDisabledControlJustPressed(0, 24) then PlaySoundFrontend(-1, "Place_Prop_Fail", "DLC_Dmod_Prop_Editor_Sounds", false); end else if WeaponFireMode == 1 then -- Handle single shot mode --[[ Let the player shoot once, while the player holds the control disable it when the player releases the control enable it ]] if IsControlJustPressed(0, 24) then while IsControlPressed(0, 24) or IsDisabledControlPressed(0, 24) do DisablePlayerFiring(player, true) Citizen.Wait(0) end end elseif WeaponFireMode == 2 then -- Handle Burst Mode --[[ Let the player shoot for a bit, while the player holds the control disable it when the player releases the control enable it ]] if IsControlJustPressed(0, 24) then Citizen.Wait(300) while (IsControlPressed(0, 24) or IsDisabledControlPressed(0, 24)) do DisablePlayerFiring(player, true) Citizen.Wait(0) end end end --[[ We dont have to do anything else because Standard and full auto are both default ]] end end Citizen.Wait(0) end end end) end
local common_local = common if not (type(common) == 'table' and common.class and common.instance) then assert(common_class ~= false, 'No class commons specification available.') require('HC.class') common_local = common end local Object = require 'game.object' local Flares = require 'game.flares' local Light = {} local function newLight(...) return common_local.instance(Light, ...) end function Light:calcA() return (1 + math.sin(self.rot)) * 0.5 end function Light:setUpLightType(game, lightType, tile) local tileId = tile.properties[lightType] local gid = tileId + tile.tilesetObject.firstgid local thisTile = game.map.tiles[gid] self[lightType] = { tile = thisTile, image = thisTile.image, quad = thisTile.quad } end function Light:setFlare() if self.flare then Flares.destroy(self.flare) end self.rot = math.random(2 * math.pi) if self.lightType == "red" or self.lightType == "blue" then local flareX = self.pos.x-self.tilesize.x/2 local flareY = self.pos.y-self.tilesize.y/2 + self.properties.lightY self.flare = Flares.create(flareX, flareY, self.lightType, self:calcA()) end end --location is centre function Light:init(game, object, tile, map) Object.init(self, game, object, tile, 1, map) self.lightType = self.properties.lightType if tile.properties.red then self:setUpLightType(game, "red", tile) end if tile.properties.blue then self:setUpLightType(game, "blue", tile) end if tile.properties.yellow then self:setUpLightType(game, "yellow", tile) end if tile.properties.green then self:setUpLightType(game, "green", tile) end if tile.properties.off then self:setUpLightType(game, "off", tile) end if self.sy == -1 then self.properties.lightY = -self.properties.lightY end self[self.lightType] = { tile = tile, image = tile.image, quad = tile.quad } self:setFlare() end function Light:change(newLightType) if self.lightType ~= newLightType then self.lightType = newLightType if self[newLightType] then self.image = self[newLightType].image self.quad = self[newLightType].quad Object.initHCShapeFromTile(self, self[newLightType].tile, "light", self.pos.x, self.pos.y) self:setFlare() end end end function Light:update(game, dt) Object.update(self, dt) self.rot = self.rot + dt * 4 if self.rot > 2 * math.pi then self.rot = self.rot - (2 * math.pi) end if self.flare then self.flare.a = self:calcA() end end Light = common_local.class('Light', Light, Object) return { Light = Light, newLight = newLight, }
--[[. ]] Player = game:GetService("Players")["SergeantSmokey"] Character = Player.Character PlayerGui = Player.PlayerGui Backpack = Player.Backpack Torso = Character.Torso Head = Character.Head Humanoid = Character.Humanoid LeftArm = Character["Left Arm"] LeftLeg = Character["Left Leg"] RightArm = Character["Right Arm"] RightLeg = Character["Right Leg"] LS = Torso["Left Shoulder"] LH = Torso["Left Hip"] RS = Torso["Right Shoulder"] RH = Torso["Right Hip"] Neck = Torso.Neck it=Instance.new vt=Vector3.new cf=CFrame.new euler=CFrame.fromEulerAnglesXYZ angles=CFrame.Angles necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) attack = false attacktype = 1 damage = 10000 oridamage = 10000 attackdebounce = false ssdebounce=false MMouse=nil combo=0 --player player = nil --save shoulders RSH, LSH = nil, nil --welds RW, LW = Instance.new("Weld"), Instance.new("Weld") RW.Name="Right Shoulder" LW.Name="Left Shoulder" if Character:findFirstChild("Dual Swords",true) ~= nil then Character:findFirstChild("Dual Swords",true).Parent = nil end function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) local fp = it("Part") fp.formFactor = formfactor fp.Parent = parent fp.Reflectance = reflectance fp.Transparency = transparency fp.CanCollide = false fp.Locked=true fp.BrickColor = brickcolor fp.Name = name fp.Size = size fp.Position = Torso.Position fp.BottomSurface="Smooth" fp.TopSurface="Smooth" fp:BreakJoints() return fp end function mesh(Mesh,part,meshtype,meshid,offset,scale) local mesh = it(Mesh) mesh.Parent = part if Mesh=="SpecialMesh" then mesh.MeshType = meshtype mesh.MeshId = meshid end mesh.Offset=offset mesh.Scale=scale return mesh end function weld(parent,part0,part1,c0) local weld = it("Weld") weld.Parent = parent weld.Part0 = part0 weld.Part1 = part1 weld.C0 = c0 return weld end local modelzorz = Instance.new("Model") modelzorz.Parent = Character modelzorz.Name = "Dual Swords" local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(0.3,0.5,0.3)) local prt2=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part2",vt(0.25,1.5,0.25)) local prt4=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part4",vt(0.3,0.6,0.21)) local prt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part5",vt(0.25,0.6,0.16)) local prt6=part(3,modelzorz,0.3,0,BrickColor.new("Hot pink"),"Part6",vt(0.25,3,0.16)) local prt7=part(3,modelzorz,0.3,0,BrickColor.new("Hot pink"),"Part7",vt(0.1,0.5,0.25)) local prt8=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part8",vt(0.2,1.5,0.2)) local prt9=part(3,modelzorz,0,1,BrickColor.new("Really black"),"Hitbox",vt(0.5,4,0.5)) local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1,1,1)) local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1,1,1)) local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(1,1,1)) local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1,1,1)) local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(1,1,0.25)) local msh7=mesh("SpecialMesh",prt7,"Wedge","",vt(0,0,0),vt(0.25,1,1)) local msh8=mesh("CylinderMesh",prt8,"","",vt(0,0,0),vt(1,1,1)) local wld1=weld(prt1,prt1,Torso,euler(0,0,0.785)*cf(1,0,-0.5)) local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0)) local wld4=weld(prt4,prt4,prt2,euler(0,0,0)*cf(0,-1,0)) local wld5=weld(prt5,prt5,prt4,euler(0,0,0)*cf(0,-0.01,0)) local wld6=weld(prt6,prt6,prt4,euler(0,0,0)*cf(0,-1.5,0)) local wld7=weld(prt7,prt7,prt6,euler(0,-1.57,0)*cf(0,-1.75,0)) local wld8=weld(prt8,prt8,prt6,euler(0,0,0)*cf(0,0.5,0)) local wld9=weld(prt9,prt9,prt6,euler(0,0,0)*cf(0,0,0)) local aprt1=part(3,modelzorz,0,0,Torso.BrickColor,"aPart1",vt(0.3,0.5,0.3)) local aprt2=part(3,modelzorz,0,0,BrickColor.new("Really black"),"aPart2",vt(0.25,1.5,0.25)) local aprt4=part(3,modelzorz,0,0,BrickColor.new("Really black"),"aPart4",vt(0.3,0.6,0.21)) local aprt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"aPart5",vt(0.25,0.6,0.16)) local aprt6=part(3,modelzorz,0.3,0,BrickColor.new("Hot pink"),"aPart6",vt(0.25,3,0.16)) local aprt7=part(3,modelzorz,0.3,0,BrickColor.new("Hot pink"),"aPart7",vt(0.1,0.5,0.25)) local aprt8=part(3,modelzorz,0,0,BrickColor.new("Really black"),"aPart8",vt(0.2,1.5,0.2)) local aprt9=part(3,modelzorz,0,1,BrickColor.new("Really black"),"aHitbox",vt(0.5,4,0.5)) local amsh1=mesh("BlockMesh",aprt1,"","",vt(0,0,0),vt(1,1,1)) local amsh2=mesh("BlockMesh",aprt2,"","",vt(0,0,0),vt(1,1,1)) local amsh4=mesh("BlockMesh",aprt4,"","",vt(0,0,0),vt(1,1,1)) local amsh5=mesh("BlockMesh",aprt5,"","",vt(0,0,0),vt(1,1,1)) local amsh6=mesh("BlockMesh",aprt6,"","",vt(0,0,0),vt(1,1,0.25)) local amsh7=mesh("SpecialMesh",aprt7,"Wedge","",vt(0,0,0),vt(0.25,1,1)) local amsh8=mesh("CylinderMesh",aprt8,"","",vt(0,0,0),vt(1,1,1)) local awld1=weld(aprt1,aprt1,Torso,euler(0,0,0.785)*cf(-1,0,-0.5)) local awld2=weld(aprt2,aprt2,aprt1,euler(3.14,3.14,0)*cf(0,0,0)) local awld4=weld(aprt4,aprt4,aprt2,euler(0,0,0)*cf(0,-1,0)) local awld5=weld(aprt5,aprt5,aprt4,euler(0,0,0)*cf(0,-0.01,0)) local awld6=weld(aprt6,aprt6,aprt4,euler(0,0,0)*cf(0,-1.5,0)) local awld7=weld(aprt7,aprt7,aprt6,euler(0,-1.57,0)*cf(0,-1.75,0)) local awld8=weld(aprt8,aprt8,aprt6,euler(0,0,0)*cf(0,0.5,0)) local awld9=weld(aprt9,aprt9,aprt6,euler(0,0,0)*cf(0,0,0)) numb=0 numb2=0 for i=1,8 do local prt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part3",vt(0.2,0.4,0.2)) local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(1+numb2,1+numb2,1+numb2)) local wld3=weld(prt3,prt3,prt2,cf(0.8,0,0)*euler(0,0,1.57-numb)) local dprt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part3",vt(0.2,0.2,0.2)) local dmsh3=mesh("BlockMesh",dprt3,"","",vt(0,0,0),vt(0.8+numb2,1.01+numb2,1+numb2)) local dwld3=weld(dprt3,dprt3,prt3,euler(0,0,1.57)*cf(0.2,0,0)) local aprt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part3",vt(0.2,0.4,0.2)) local amsh3=mesh("BlockMesh",aprt3,"","",vt(0,0,0),vt(1+numb2,1+numb2,1+numb2)) local awld3=weld(aprt3,aprt3,aprt2,cf(0.8,0,0)*euler(0,0,1.57-numb)) local daprt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part3",vt(0.2,0.2,0.2)) local damsh3=mesh("BlockMesh",daprt3,"","",vt(0,0,0),vt(0.8+numb2,1.01+numb2,1+numb2)) local dawld3=weld(daprt3,daprt3,aprt3,euler(0,0,1.57)*cf(0.2,0,0)) numb2=numb2+0.01 numb=numb+0.3925 end if (script.Parent.className ~= "HopperBin") then Tool = Instance.new("HopperBin") Tool.Parent = Backpack Tool.Name = "Dual Swords" script.Parent = Tool end Bin = script.Parent local bg = it("BodyGyro") bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge bg.P = 20e+003 bg.Parent = nil so = function(id,par,vol,pit) coroutine.resume(coroutine.create(function() local sou = Instance.new("Sound",par or workspace) sou.Volume=vol sou.Pitch=pit or 1 sou.SoundId=id wait() sou:play() wait(6) sou:Remove() end)) end function unequipweld() wld1.Part1=Torso wld1.C0=euler(0,0,0.785)*cf(1,0,-0.5) awld1.Part1=Torso awld1.C0=euler(0,0,0.785)*cf(-1,0,-0.5) end function equipweld() wld1.Part1=RightArm wld1.C0=euler(1.57,0,-1.57)*cf(0,1,0) awld1.Part1=LeftArm awld1.C0=euler(-1.57,0,1.57)*cf(0,1,0) end function hideanim() equipped=false wait(0.1) bg.Parent=nil unequipweld() end function equipanim() equipped=true wait(0.1) equipweld() RW.C0=cf(1.5, 0.5, -0.25) * euler(1.5,0,0) RW.C1=cf(0, 0.5, 0) * euler(0,-0.6,0) LW.C0=cf(-1.5, 0.5, 0) * euler(1,0,0) LW.C1=cf(0, 0.5, 0) * euler(0,0.4,0) end function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) end function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3) local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) prt.Anchored=true prt.CFrame=cframe*cf(x2,y2,z2) local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) coroutine.resume(coroutine.create(function() for i=0,1,0.1 do wait() prt.CFrame=prt.CFrame prt.Transparency=i msh.Scale=msh.Scale+vt(x3,y3,z3) end prt.Parent=nil end)) end function SpecialEffect() local prt=part(3,workspace,1,0,BrickColor.new("Hot pink"),"Part",vt(1,1,1)) prt.Anchored=true prt.CFrame=Torso.CFrame local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5)) coroutine.resume(coroutine.create(function(Part,Mesh) for i=0,1,0.2 do wait(0) Part.Transparency=i Mesh.Scale=Mesh.Scale+vt(10,10,10) end prt.Parent=nil end),prt,msh) end function effect(Color,Ref,LP,P1,returnn) local effectsmsh = Instance.new("BlockMesh") effectsmsh.Scale = Vector3.new(0.2,1,0.2) effectsmsh.Name = "Mesh" local effectsg = Instance.new("Part") effectsg.formFactor = 3 effectsg.CanCollide = false effectsg.Name = "Eff" effectsg.Locked = true effectsg.Anchored = true effectsg.Size = Vector3.new(0.5,1,0.5) effectsg.Parent = workspace effectsmsh.Parent = effectsg effectsg.BrickColor = BrickColor.new(Color) effectsg.Reflectance = Ref local point1 = P1 local mg = (LP.p - point1.p).magnitude effectsg.Size = Vector3.new(0.5,mg,0.5) effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0) if returnn then return effectsg end coroutine.resume(coroutine.create(function(Part,Mesh) if not returnn then for i = 0 , 1 , 0.05 do wait() Part.Transparency = 1*i Mesh.Scale = Vector3.new(0.2-0.2*i,1,0.2-0.2*i) end wait() Part.Parent = nil end end),effectsg,effectsmsh) end Damagefunc1=function(hit,Damage,Knockback) if hit.Parent==nil then return end CPlayer=Bin h=hit.Parent:FindFirstChild("Humanoid") if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then if attackdebounce == false then attackdebounce = true coroutine.resume(coroutine.create(function() wait(0.2) attackdebounce = false end)) Damage=Damage --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then return end]] -- hs(hit,1.2) c=Instance.new("ObjectValue") c.Name="creator" c.Value=game.Players.LocalPlayer c.Parent=h game:GetService("Debris"):AddItem(c,.5) Damage=Damage+math.random(10000,10000) -- h:TakeDamage(Damage) blocked=false block=hit.Parent:findFirstChild("Block") if block~=nil then print("herp") if block.Value>0 then blocked=true block.Value=block.Value-1 print(block.Value) end end if blocked==false then -- h:TakeDamage(Damage) h.Health=h.Health-Damage showDamage(hit.Parent,Damage,.10000) else h:TakeDamage(1) showDamage(hit.Parent,1,.5) end vp=Instance.new("BodyVelocity") vp.P=500 vp.maxForce=Vector3.new(math.huge,0,math.huge) -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05 if Knockback>0 then vp.Parent=hit.Parent.Torso end game:GetService("Debris"):AddItem(vp,.25) game:GetService("Debris"):AddItem(r,.5) c=Instance.new("ObjectValue") c.Name="creator" c.Value=Player c.Parent=h game:GetService("Debris"):AddItem(c,.5) CRIT=false hitDeb=true AttackPos=6 end end end Damagefunc2=function(hit,Damage,Knockback) if attackdebounce == false then attackdebounce = true coroutine.resume(coroutine.create(function() wait(0.1) attackdebounce = false end)) if hit.Parent==nil then return end CPlayer=Bin blocked=false h=hit.Parent:FindFirstChild("Humanoid") if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then Damage=Damage c=it("ObjectValue") c.Name="creator" c.Value=game.Players.LocalPlayer c.Parent=h game:GetService("Debris"):AddItem(c,.5) -- print(c.Value) --[[ if math.random(0,99)+math.random()<=7.8 then CRIT=true Damage=Damage*2 s=it("Sound") s.SoundId="http://www.roblox.com/asset/?id=2801263" s.Volume=1 s.Pitch=2 s.Parent=hit s.PlayOnRemove=true s.Parent=nil end]] Damage=Damage+math.random(0,10) -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2)) blocked=false block=hit.Parent:findFirstChild("Block") if block~=nil then print("herp") if block.Value>0 then blocked=true block.Value=block.Value-3 print(block.Value) end end if blocked==false then -- h:TakeDamage(Damage) h.Health=h.Health-Damage showDamage(hit.Parent,Damage,.5) else h:TakeDamage(1) showDamage(hit.Parent,1,.5) end --if blocked==false then local angle = (hit.Position-(Torso.Position+Vector3.new(0,0,0))).unit print(angle) --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) rl=Instance.new("BodyAngularVelocity") rl.P=3000 rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50)) rl.Parent=hit coroutine.resume(coroutine.create(function(vel) wait(1) vel:Remove() end),rl) --end local bodyVelocity=Instance.new("BodyVelocity") bodyVelocity.velocity=angle*40+Vector3.new(0,0,0) bodyVelocity.P=5000 bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) bodyVelocity.Parent=hit coroutine.resume(coroutine.create(function(Vel) wait(0.7) Vel:Remove() end),bodyVelocity) game:GetService("Debris"):AddItem(vp,1) c=it("ObjectValue") c.Name="creator" c.Value=Player c.Parent=h game:GetService("Debris"):AddItem(c,.5) CRIT=false hitDeb=true AttackPos=6 end end end showDamage=function(Char,Dealt,du) m=Instance.new("Model") m.Name=tostring(Dealt) h=Instance.new("Humanoid") h.Health=0 h.MaxHealth=0 h.Parent=m c=Instance.new("Part") c.Transparency=0 c.BrickColor=BrickColor:Red() if CRIT==true then c.BrickColor=BrickColor.new("Really red") end c.Name="Head" c.TopSurface=0 c.BottomSurface=0 c.formFactor="Plate" c.Size=Vector3.new(1,.4,1) ms=Instance.new("CylinderMesh") ms.Scale=Vector3.new(.8,.8,.8) if CRIT==true then ms.Scale=Vector3.new(1,1.25,1) end ms.Parent=c c.Reflectance=0 Instance.new("BodyGyro").Parent=c c.Parent=m c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) f=Instance.new("BodyPosition") f.P=2000 f.D=100 f.maxForce=Vector3.new(math.huge,math.huge,math.huge) f.position=c.Position+Vector3.new(0,3,0) f.Parent=c game:GetService("Debris"):AddItem(m,.5+du) c.CanCollide=false m.Parent=workspace c.CanCollide=false end function oneslash() attack=true combo=1 for i=0,1,0.1 do wait() RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5+1*i,0,0) RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+0.2*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(1+1.5*i,0,0) LW.C1=cf(0, 0.5, 0) * euler(0,0.4,0) end local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) so("http://roblox.com/asset/?id=10209640",LeftArm,1,1) so("http://roblox.com/asset/?id=10209640",RightArm,1,1) con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end) con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end) for i=0,1,0.2 do wait() RW.C0=cf(1.5, 0.5, 0) * euler(2.5-3*i,0,0.6*i) LW.C0=cf(-1.5, 0.5, 0) * euler(2.5-3*i,0,-0.6*i) local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint,Point) LastPoint=Point local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint2,Point2) LastPoint2=Point2 end con1:disconnect() con2:disconnect() attack=false end function twoslash() attack=true combo=2 for i=0,1,0.1 do wait() RW.C0=cf(1.5, 0.5, 0) * euler(-0.5+2.07*i,0,0.6-0.6*i) RW.C1=cf(0, 0.5, 0) * euler(0,-0.4-0.87*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+2.07*i,0,-0.6+0.6*i) LW.C1=cf(0, 0.5, 0) * euler(0,0.4+1.37*i,0) end local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) so("http://roblox.com/asset/?id=10209640",LeftArm,1,1) so("http://roblox.com/asset/?id=10209640",RightArm,1,1) con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end) con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end) for i=0,1,0.2 do wait() RW.C0=cf(1.5, 0.5, 0) * euler(1.57,0,2*i) RW.C1=cf(0, 0.5, 0) * euler(0,-1.27-0.3*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(1.57,0,-2*i) LW.C1=cf(0, 0.5, 0) * euler(0,1.77-0.2*i,0) local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint,Point) LastPoint=Point local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint2,Point2) LastPoint2=Point2 end con1:disconnect() con2:disconnect() attack=false end function threeslash() attack=true combo=3 for i=0,1,0.1 do wait() RW.C0=cf(1.5-1.5*i, 0.5, -1*i) * euler(1.57,0,2-3*i) LW.C0=cf(-1.5, 0.5, 0) * euler(1.57+0.93*i,0,-2+2*i) LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0) end local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) so("http://roblox.com/asset/?id=10209640",RightArm,1,1) con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,5) end) for i=0,1,0.2 do wait() RW.C0=cf(1.5*i, 0.5, -1+1*i) * euler(1.57,0,-1+3*i) local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint,Point) LastPoint=Point end con1:disconnect() local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) so("http://roblox.com/asset/?id=10209640",LeftArm,1,1) con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,5) end) for i=0,1,0.2 do wait() LW.C0=cf(-1.5, 0.5, 0) * euler(2.5-3*i,0,0) local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint2,Point2) LastPoint2=Point2 end con2:disconnect() attack=false end function TornadoSlash() attack=true for i=0,1,0.1 do wait() RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5+0.07*i,0,1.57*i) RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+2.4*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(1+0.57*i,0,-1.57*i) LW.C1=cf(0, 0.5, 0) * euler(0,0.4+1.4*i,0) end bg.Parent=Torso bg.cframe=Torso.CFrame CF=Torso.CFrame local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end) con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end) for i=1,3 do so("http://roblox.com/asset/?id=10209640",LeftArm,1,1) so("http://roblox.com/asset/?id=10209640",RightArm,1,1) for i=0,1,0.1 do wait() bg.cframe=CF*euler(0,6.283*i,0) local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint,Point) LastPoint=Point local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint2,Point2) LastPoint2=Point2 end end con1:disconnect() con2:disconnect() bg.Parent=nil for i=0,1,0.1 do wait() RW.C0=cf(1.5, 0.5, 0) * euler(1.57,0,1.57-1.47*i) RW.C1=cf(0, 0.5, 0) * euler(0,1.8-2.5*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(1.57,0,-1.57+1.47*i) LW.C1=cf(0, 0.5, 0) * euler(0,1.8-1.1*i,0) end local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) so("http://roblox.com/asset/?id=10209640",LeftArm,1,1) so("http://roblox.com/asset/?id=10209640",RightArm,1,1) con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end) con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end) for i=0,1,0.2 do wait() RW.C0=cf(1.5, 0.5, 0) * euler(1.57-2*i,0,0.1+1*i) LW.C0=cf(-1.5, 0.5, 0) * euler(1.57-2*i,0,-0.1-1*i) local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint,Point) LastPoint=Point local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint2,Point2) LastPoint2=Point2 end con1:disconnect() con2:disconnect() wait(0.1) for i=0,1,0.1 do wait() RW.C0=cf(1.5, 0.5, 0) * euler(-0.43+1.93*i,0,1.1-1.1*i) RW.C1=cf(0, 0.5, 0) * euler(0,-0.7+0.1*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(-0.43+1.43*i,0,-1.1+1.1*i) LW.C1=cf(0, 0.5, 0) * euler(0,0.7-0.3*i,0) end attack=false end function MultiSpin() attack=true for i=0,1,0.1 do wait() RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5+2*i,0,0) RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+0.6*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(1+2.5*i,0,0) LW.C1=cf(0, 0.5, 0) * euler(0,0.4-0.4*i,0) end local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) so("http://roblox.com/asset/?id=10209640",LeftArm,1,1) so("http://roblox.com/asset/?id=10209640",RightArm,1,1) con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end) con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end) --6.28 for i=0,1.05,0.05 do wait() if i==0.35 or i==0.65 then so("http://roblox.com/asset/?id=10209640",LeftArm,1,1) so("http://roblox.com/asset/?id=10209640",RightArm,1,1) end wld1.C0=euler(1.57,(-6.28*3)*i,-1.57)*cf(0,1,0) awld1.C0=euler(-1.57,(6.28*3)*i,1.57)*cf(0,1,0) RW.C0=cf(1.5, 0.5, 0) * euler(3.5-4*i,0,0) LW.C0=cf(-1.5, 0.5, 0) * euler(3.5-4*i,0,0) local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint,Point) LastPoint=Point local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint2,Point2) LastPoint2=Point2 end con1:disconnect() con2:disconnect() for i=0,1,0.1 do wait() RW.C0=cf(1.5, 0.5, 0) * euler(-0.5+2*i,0,0) RW.C1=cf(0, 0.5, 0) * euler(0,-0.6*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+1.5*i,0,0) LW.C1=cf(0, 0.5, 0) * euler(0,0.4*i,0) end attack=false end function DashSlash() attack=true for i=0,1,0.1 do wait() RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5-2*i,0,0.3*i) RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+1.6*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(1-1.5*i,0,-0.3*i) LW.C1=cf(0, 0.5, 0) * euler(0,0.4-1.4*i,0) end local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) while holddash==true do wait() Humanoid.WalkSpeed=75 local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint,Point) LastPoint=Point local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0) effect("Hot pink",0.5,LastPoint2,Point2) LastPoint2=Point2 end Humanoid.WalkSpeed=16 for i=0,1,0.1 do wait() RW.C0=cf(1.5, 0.5, -0.25*i) * euler(-0.5+2*i,0,0.3-0.3*i) RW.C1=cf(0, 0.5, 0) * euler(0,1-1.6*i,0) LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+1.5*i,0,-0.3+0.3*i) LW.C1=cf(0, 0.5, 0) * euler(0,-1+1.4*i,0) end attack=false end function ChangeWeapon() attack=true for i=0,1,0.1 do wait() wld1.C0=euler(1.57,0.4*i,-1.57)*cf(0,1,0) awld1.C0=euler(-1.57,0.4*i,1.57-3.14*i)*cf(0,1,0) RW.C0=cf(1.5-0.5*i, 0.5, -0.25-0.25*i) * euler(1.5+0.07*i,0,-0.4*i) RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+2.17*i,0) LW.C0=cf(-1.5+0.5*i, 0.5, -0.5*i) * euler(1+0.57*i,0,0.4*i) LW.C1=cf(0, 0.5, 0) * euler(0,0.4-1.97*i,0) end for i=0,1,0.1 do wait() wld1.C0=euler(1.57,0.4+0.2*i,-1.57)*cf(0,1,0) awld1.C0=euler(-1.57,0.4+0.2*i,-1.57)*cf(0,1,0) RW.C0=cf(1.5-0.5, 0.5, -0.5) * euler(1.57,0,-0.4-0.2*i) LW.C0=cf(-1.5+0.5, 0.5, -0.5) * euler(1.57,0,0.4+0.2*i) end awld1.Part1=prt1 awld1.C0=cf(0,0,0) for i=0,1,0.1 do wait() wld1.C0=euler(1.57,0.6-0.6*i,-1.57)*cf(0,1,0) RW.C0=cf(1.5-0.5+0.5*i, 0.5, -0.5+0.5*i) * euler(1.57-0.57*i,0,-0.6) RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0) LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1.57-1.57*i,0,0.6-0.4*i) LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.57*i,0) end attack=false end function ob1d(mouse) if attack == true then return end hold=true --attack=true if combo==0 then oneslash() elseif combo==1 then twoslash() elseif combo==2 then threeslash() end coroutine.resume(coroutine.create(function() wait(0.5) if attack==false then combo=0 wld1.C0=euler(1.57,0,-1.57)*cf(0,1,0) awld1.C0=euler(-1.57,0,1.57)*cf(0,1,0) RW.C0=cf(1.5, 0.5, -0.25) * euler(1.5,0,0) RW.C1=cf(0, 0.5, 0) * euler(0,-0.6,0) LW.C0=cf(-1.5, 0.5, 0) * euler(1,0,0) LW.C1=cf(0, 0.5, 0) * euler(0,0.4,0) end end)) end function ob1u(mouse) hold = false end buttonhold = false eul=0 holddash=false function key(key) if attack == true then return end if key=="z" then TornadoSlash() end if key=="x" then MultiSpin() end if key=="c" then holddash=true DashSlash() end if key=="v" then ChangeWeapon() end combo=0 end function key2(key) if key=="c" then holddash=false end end function s(mouse) mouse.Button1Down:connect(function() ob1d(mouse) end) mouse.Button1Up:connect(function() ob1u(mouse) end) mouse.KeyDown:connect(key) mouse.KeyUp:connect(key2) unsheathed = true player = Player ch = Character MMouse = mouse RSH = ch.Torso["Right Shoulder"] LSH = ch.Torso["Left Shoulder"] -- RSH.Parent = nil LSH.Parent = nil -- RW.Part0 = ch.Torso RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) RW.C1 = CFrame.new(0, 0.5, 0) RW.Part1 = ch["Right Arm"] RW.Parent = ch.Torso --_G.R = RW -- LW.Part0 = ch.Torso LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) LW.C1 = CFrame.new(0, 0.5, 0) LW.Part1 = ch["Left Arm"] LW.Parent = ch.Torso --_G.L = LW -- equipanim() end function ds(mouse) hideanim() wait(0) RW.Parent = nil LW.Parent = nil RSH.Parent = player.Character.Torso LSH.Parent = player.Character.Torso end Bin.Selected:connect(s) Bin.Deselected:connect(ds) print("Dual Swords loaded.") -- mediafire --[[ Copyrighted (C) Fenrier 2013 ]]
local System = {} tolua.class(System) function System:initialize() -- Liste aller Entities, die die RequiredComponents dieses Systems haben self.targets = {} self.active = true self.hasGroups = nil for group, req in pairs(self:requires()) do local requirementIsGroup = type(req) == "table" if self.hasGroups ~= nil then assert(self.hasGroups == requirementIsGroup, "System " .. self.class.name .. " has mixed requirements in requires()") else self.hasGroups = requirementIsGroup end if requirementIsGroup then self.targets[group] = {} end end end function System:requires() return {} end function System:onAddEntity(entity, group) end function System:onRemoveEntity(entity, group) end function System:addEntity(entity, category) -- If there are multiple requirement lists, the added entities will -- be added to their respective list. if category then self.targets[category][entity.id] = entity else -- Otherwise they'll be added to the normal self.targets list self.targets[entity.id] = entity end self:onAddEntity(entity, category) end function System:removeEntity(entity, group) if group and self.targets[group][entity.id] then self.targets[group][entity.id] = nil self:onRemoveEntity(entity, group) return end local firstGroup, _ = next(self.targets) if firstGroup then if self.hasGroups then -- Removing entities from their respective category target list. for group, _ in pairs(self.targets) do if self.targets[group][entity.id] then self.targets[group][entity.id] = nil self:onRemoveEntity(entity, group) end end else if self.targets[entity.id] then self.targets[entity.id] = nil self:onRemoveEntity(entity) end end end end function System:componentRemoved(entity, component) if self.hasGroups then -- Removing entities from their respective category target list. for group, requirements in pairs(self:requires()) do for _, req in pairs(requirements) do if req == component then self:removeEntity(entity, group) -- stop checking requirements for this group break end end end else self:removeEntity(entity) end end local firstElement = ECS.Util.FirstElement function System:pickRequiredComponents(entity) local components = {} local requirements = self:requires() if type(firstElement(requirements)) == "string" then for _, componentName in pairs(requirements) do table.insert(components, entity:get(componentName)) end elseif type(firstElement(requirements)) == "table" then ECS.Debug("System: :pickRequiredComponents() is not supported for systems with multiple component constellations") return nil end return unpack(components) end return System
-- Helpful commands: -- :h highlight groups -> highlight docs -- :syntax -> show syntax groups in buffer local colors = require('glance.colors') local highlight = function(groups) for group, args in pairs(groups) do -- Group = fg, bg, attr, sp local fg = args[1] local bg = args[2] local attr = args[3] local sp = args[4] fg = fg and "guifg=" .. fg or "guifg=NONE" bg = bg and "guibg=" .. bg or "guibg=NONE" attr = attr and "gui=" .. attr or "gui=NONE" sp = sp and "guisp=" .. sp or "" vim.api.nvim_command("hi! " .. group .. " ".. fg .. " " .. bg .. " ".. attr .. " " .. sp) end end local theme = {} theme.apply = function () highlight({ -- UI Normal = {colors.fg, colors.bg}, LineNr = {colors.fg_dark}, EndOfBuffer = {colors.bg}, ----------------------------- -- Preferred syntax groups -- ----------------------------- -- Comment Comment = {colors.fg_dark}, -- Constant Constant = {colors.orange}, Boolean = {colors.light_blue}, -- Identifier Identifier = {colors.light_blue}, -- Statemnt Statement = {colors.light_blue}, Operator = {colors.fg}, -- PreProc PreProc = {colors.light_blue}, -- Type Type = {colors.type}, -- Special Special = {colors.fg}, SpecialChar = {colors.orange}, SpecialComment = {colors.fg_dark}, --------------- -- Languages -- --------------- -- Python pythonEscape = {colors.orange}, pythonBuiltin = {colors.light_blue}, }) end return theme;
local Individual = require("lima.Individual") local abs = assert(math.abs) local band = assert(bit.band) local bor = assert(bit.bor) local bnot = assert(bit.bnot) local bxor = assert(bit.bxor) local cos = assert(math.cos) local floor = assert(math.floor) local insert = assert(table.insert) local lshift = assert(bit.lshift) local max = assert(math.max) local min = assert(math.min) local pi = assert(math.pi) local random = assert(love.math.random) local remove = assert(table.remove) local rshift = assert(bit.rshift) local sin = assert(math.sin) local sqrt = assert(assert(math.sqrt)) local brushes = { "circle", "square", "triangle", "ascii", } local strokeSizes = { ascii = 6, circle = 5, square = 6, triangle = 14, } function find(t, v) for k, v2 in pairs(t) do if v2 == v then return k end end return nil end function shuffle(t) for i = 1, #t - 1 do local j = random(i, #t) t[i], t[j] = t[j], t[i] end end function clamp(x, x1, x2) return min(max(x, x1), x2) end function unpackHalfBytes(byte) local upperHalf = rshift(band(byte, 0xf0), 4) local lowerHalf = band(byte, 0xf) return upperHalf, lowerHalf end function packHalfBytes(upperHalf, lowerHalf) upperHalf = band(upperHalf, 0xf) lowerHalf = band(lowerHalf, 0xf) return bor(lshift(upperHalf, 4), lowerHalf) end -- See: http://love2d.org/wiki/HSL_color function toRgbFromHsl(h, s, l) if s <= 0 then return l, l, l end h, s, l = h * 6, s, l local c = (1 - abs(2 * l - 1)) * s local x = (1 - abs(h % 2 - 1)) * c local m, r, g, b = (l - 0.5 * c), 0, 0, 0 if h < 1 then r, g, b = c, x, 0 elseif h < 2 then r, g, b = x, c, 0 elseif h < 3 then r, g, b = 0, c, x elseif h < 4 then r, g, b = 0, x, c elseif h < 5 then r, g, b = x, 0, c else r, g, b = c, 0, x end return r + m, g + m, b + m end function toRgbaFromPackedHsla(hueSaturation, lightnessAlpha) local hue, saturation = unpackHalfBytes(hueSaturation) local lightness, alpha = unpackHalfBytes(lightnessAlpha) local red, green, blue = toRgbFromHsl(hue / 16, saturation / 15, lightness / 15) return red, green, blue, alpha / 15 end function readPainting(file) local painting = { strokes = {}, } -- Magic local magic = file:read(4) assert(magic == "LIMA", "Invalid file magic") -- Version local version = love.data.unpack("B", file:read(1)) assert(version == 2, "Unsupported file version") -- Brush local brushIndex = love.data.unpack("B", file:read(1)) painting.brush = assert(brushes[brushIndex], "Invalid brush index") -- Stroke count local strokeCountUpper, strokeCountLower = love.data.unpack("BB", file:read(2)) local strokeCount = 256 * strokeCountUpper + strokeCountLower -- Strokes local strokeSize = assert(strokeSizes[painting.brush]) local strokeFormat = string.rep("B", strokeSize) for i = 1, strokeCount do painting.strokes[i] = {love.data.unpack(strokeFormat, file:read(#strokeFormat))} end return painting end function writePainting(painting, file) file:write("LIMA") -- Magic file:write(love.data.pack("string", "B", 2)) -- Version -- Brush local brushIndex = assert(find(brushes, painting.brush)) file:write(love.data.pack("string", "B", brushIndex)) -- Stroke count local strokeCount = #painting.strokes local strokeCountUpper = rshift(band(strokeCount, 0xff00), 8) local strokeCountLower = band(strokeCount, 0xff) file:write(love.data.pack("string", "BB", strokeCountUpper, strokeCountLower)) -- Strokes local strokeSize = assert(strokeSizes[painting.brush]) local strokeFormat = string.rep("B", strokeSize) for i = 1, strokeCount do file:write(love.data.pack("string", strokeFormat, unpack(painting.strokes[i]))) end end function loadPainting(filename) local file = assert(io.open(filename, "rb")) local success, result = pcall(readPainting, file) file:close() assert(success, result) return result end function savePainting(painting, filename) local file = io.open(filename, "wb") local success, result = pcall(writePainting, painting, file) file:close() assert(success, result) end function clonePainting(painting) local strokes = {} for i, stroke in ipairs(painting.strokes) do strokes[i] = {unpack(stroke)} end return { brush = painting.brush, strokes = strokes, } end function generateBoolean() return random(0, 1) == 1 end function generateByte() return random(0, 255) end function generateStroke(brush) if brush == "triangle" then local originRadius = generateByte() local originAngle = generateByte() local radius = generateByte() local angle = generateByte() local hueSaturation = generateByte() local lightnessAlpha = generateByte() return { originRadius, originAngle, radius, angle, hueSaturation, lightnessAlpha, radius, angle, hueSaturation, lightnessAlpha, radius, angle, hueSaturation, lightnessAlpha, } else local stroke = {} for i = 1, strokeSizes[brush] do stroke[i] = generateByte() end return stroke end end function generatePainting(brush, size) local strokes = {} for i = 1, size do strokes[i] = generateStroke(brush) end return { brush = brush, strokes = strokes, } end function mutateStroke(stroke) local i = random(1, #stroke) if generateBoolean() then stroke[i] = generateByte() else local upperHalf, lowerHalf = unpackHalfBytes(stroke[i]) if generateBoolean() then upperHalf = generateByte() else lowerHalf = generateByte() end stroke[i] = packHalfBytes(upperHalf, lowerHalf) end end function mutatePainting(painting) local strokes = painting.strokes if generateBoolean() then local i = random(1, #strokes) mutateStroke(strokes[i]) else if generateBoolean() then local i = random(1, #strokes) local j = random(1, #strokes) local stroke = remove(strokes, i) insert(strokes, j, stroke) else local i = random(1, #strokes) local j = random(1, #strokes) remove(strokes, i) local stroke = generateStroke(painting.brush) if generateBoolean() then j = #strokes end insert(strokes, j, stroke) end end end local function drawPaintingToCanvas(painting, canvas) love.graphics.setCanvas(canvas) love.graphics.clear() love.graphics.setBlendMode("alpha") local canvasWidth, canvasHeight = canvas:getDimensions() local canvasSize = sqrt(canvasWidth * canvasHeight) if painting.brush == "circle" then for i, stroke in ipairs(painting.strokes) do local x, y, size, redGreen, blueAlpha = unpack(stroke) local red, green = unpackHalfBytes(redGreen) local blue, alpha = unpackHalfBytes(blueAlpha) love.graphics.setColor(red / 15, green / 15, blue / 15, alpha / 15) love.graphics.circle( "fill", x / 255 * canvasWidth, y / 255 * canvasHeight, 0.5 * (size / 255) ^ 2 * canvasSize) end elseif painting.brush == "square" then for i, stroke in ipairs(painting.strokes) do local x, y, angle, size, redGreen, blueAlpha = unpack(stroke) local red, green = unpackHalfBytes(redGreen) local blue, alpha = unpackHalfBytes(blueAlpha) local halfSize = 0.5 * (size / 255) ^ 2 * canvasSize love.graphics.setColor(red / 15, green / 15, blue / 15, alpha / 15) love.graphics.push() love.graphics.translate(x / 255 * canvasWidth, y / 255 * canvasHeight) love.graphics.rotate(2 * pi * angle / 256) love.graphics.polygon( "fill", -halfSize, -halfSize, halfSize, -halfSize, halfSize, halfSize, -halfSize, halfSize) love.graphics.pop() end elseif painting.brush == "triangle" then local vertices = {} local canvasCenterX = 0.5 * canvasWidth local canvasCenterY = 0.5 * canvasHeight local canvasRadius = 0.5 * sqrt(canvasWidth * canvasWidth + canvasHeight * canvasHeight) for i, stroke in ipairs(painting.strokes) do local originRadius, originAngle, radius1, angle1, hueSaturation1, lightnessAlpha1, radius2, angle2, hueSaturation2, lightnessAlpha2, radius3, angle3, hueSaturation3, lightnessAlpha3 = unpack(stroke) originRadius = (originRadius / 255) ^ 2 * canvasRadius originAngle = (originAngle / 256) * 2 * pi local originX = canvasCenterX + originRadius * cos(originAngle) local originY = canvasCenterY + originRadius * sin(originAngle) local originAngle1 = originAngle local originAngle2 = originAngle + (1 / 3) * 2 * pi local originAngle3 = originAngle + (2 / 3) * 2 * pi radius1 = (radius1 / 255) ^ 2 * canvasRadius angle1 = (angle1 / 256) * 2 * pi + originAngle1 radius2 = (radius2 / 255) ^ 2 * canvasRadius angle2 = (angle2 / 256) * 2 * pi + originAngle2 radius3 = (radius3 / 255) ^ 2 * canvasRadius angle3 = (angle3 / 256) * 2 * pi + originAngle3 x1 = originX + cos(angle1) * radius1 y1 = originY + sin(angle1) * radius1 x2 = originX + cos(angle2) * radius2 y2 = originY + sin(angle2) * radius2 x3 = originX + cos(angle3) * radius3 y3 = originY + sin(angle3) * radius3 local red1, green1, blue1, alpha1 = toRgbaFromPackedHsla(hueSaturation1, lightnessAlpha1) local red2, green2, blue2, alpha2 = toRgbaFromPackedHsla(hueSaturation2, lightnessAlpha2) local red3, green3, blue3, alpha3 = toRgbaFromPackedHsla(hueSaturation3, lightnessAlpha3) insert(vertices, {x1, y1, 0, 0, red1, green1, blue1, alpha1}) insert(vertices, {x2, y2, 0, 0, red2, green2, blue2, alpha2}) insert(vertices, {x3, y3, 0, 0, red3, green3, blue3, alpha3}) end triangleMesh:setVertices(vertices) love.graphics.draw(triangleMesh) elseif painting.brush == "ascii" then for i, stroke in ipairs(painting.strokes) do local character, x, y, angleSize, redGreen, blueAlpha = unpack(stroke) if character >= 32 and character <= 126 then character = string.char(character) local angle, size = unpackHalfBytes(angleSize) local red, green = unpackHalfBytes(redGreen) local blue, alpha = unpackHalfBytes(blueAlpha) local font = fonts[size] if font then love.graphics.setFont(font) local characterWidth = font:getWidth(character) local characterHeight = font:getHeight() love.graphics.setColor(red / 15, green / 15, blue / 15, alpha / 15) love.graphics.print( character, canvasWidth * x / 255, canvasHeight * y / 255, 2 * pi * angle / 16, 1, 1, 0.5 * characterWidth, 0.5 * characterHeight) end end end else assert(false) end love.graphics.setCanvas() end local function getFitness(image1, image2, fitnessCanvas) love.graphics.push("all") love.graphics.setShader(fitnessShader) fitnessShader:send("referenceImage", image2) love.graphics.setCanvas(fitnessCanvas) love.graphics.setBlendMode("replace", "premultiplied") love.graphics.draw(image1) love.graphics.setCanvas() love.graphics.setShader() love.graphics.pop() local data = fitnessCanvas:newImageData(1, 10, 0, 0, 1, 1) local r, g, b, a = data:getPixel(0, 0) data:release() return sqrt(0.25 * (r + g + b + a)) end function love.load(arg) love.filesystem.setIdentity("lima") if #arg ~= 3 or (arg[1] ~= "evolve" and arg[1] ~= "rasterize") then print("Usage: love . evolve <source> <target>") print(" love . rasterize <source> <target>") love.event.quit(1) return end individuals = {} local individual = Individual.new() insert(individuals, individual) _, sourceFilename, individual.filename = unpack(arg) print("Loading imitation...") local success, result = pcall(loadPainting, individual.filename) if success then individual.painting = result else print("Loading error: " .. result) individual.painting = generatePainting("triangle", 256) end print("Loading reference...") referenceImage = love.graphics.newImage(sourceFilename) triangleMesh = love.graphics.newMesh(3 * #individual.painting.strokes, "triangles") fonts = {} for size = 1, 15 do fonts[size] = love.graphics.newFont(512 * size / 15) end canvas = love.graphics.newCanvas(512, 512, {msaa = 4}) fitnessCanvas = love.graphics.newCanvas(512, 512, { format = "rgba32f", mipmaps = "auto", }) local fitnessPixelCode = [[ uniform Image referenceImage; vec4 effect(vec4 color, Image imitationImage, vec2 textureCoords, vec2 screenCoords) { vec4 imitationColor = Texel(imitationImage, textureCoords); vec4 referenceColor = Texel(referenceImage, textureCoords); vec4 fitnessColor = referenceColor - imitationColor; return fitnessColor * fitnessColor; } ]] fitnessShader = love.graphics.newShader(fitnessPixelCode) drawPaintingToCanvas(individual.painting, canvas) individual.fitness = getFitness(canvas, referenceImage, fitnessCanvas) local parentImageData = canvas:newImageData() parentImage = love.graphics.newImage(parentImageData) parentImageData:release() print("Fitness: " .. individual.fitness) end function love.update(dt) local individual = individuals[1] local child = clonePainting(individual.painting) mutatePainting(child) drawPaintingToCanvas(child, canvas) local childFitness = getFitness(canvas, referenceImage, fitnessCanvas) if childFitness < individual.fitness then individual.painting = child individual.fitness = childFitness local parentImageData = canvas:newImageData() parentImage:release() parentImage = love.graphics.newImage(parentImageData) parentImageData:release() print("Fitness: " .. individual.fitness) savePainting(individual.painting, individual.filename) end end function love.draw() love.graphics.setColor(1, 1, 1, 1) love.graphics.setBlendMode("alpha") love.graphics.draw(referenceImage, 0, 0) love.graphics.setBlendMode("alpha", "premultiplied") love.graphics.draw(parentImage, 512, 0) love.graphics.setBlendMode("alpha") local em = love.graphics.getFont():getWidth("M") love.graphics.print("FPS: " .. love.timer.getFPS(), em, em) end function love.quit() local individual = individuals[1] if individual.painting and individual.filename then print("Saving...") savePainting(individual.painting, individual.filename) end end function love.keypressed(key, scancode, isrepeat) if key == "return" then local filename = "screenshot-" .. os.time() .. ".png" love.graphics.captureScreenshot(filename) local directory = love.filesystem.getSaveDirectory() print("Saved screenshot: " .. directory .. "/" .. filename) end end
--[[ Round Tree Trunks - Turns cubic tree trunks into cylindrical. Copyright (C) 2018 Hamlet Thanks to Astrobe for his tuning tips. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --]] -- -- Configuration -- local round_trunks_leaves = minetest.settings:get_bool("round_trunks_leaves") if (round_trunks_leaves == nil) then round_trunks_leaves = false end -- -- General variables -- local minetest_log_level = minetest.settings:get("debug_log_level") local mod_load_message = "[Mod] Round Trunks [v0.2.1] loaded." -- -- Changes to be applied -- local round_trunk = { drawtype = "mesh", mesh = "round_trunks_trunk.obj", paramtype = "light", paramtype2 = "facedir", selection_box = { type = "fixed", fixed = {-0.4, -0.5, -0.4, 0.4, 0.5, 0.4} }, collision_box = { type = "fixed", fixed = {-0.4, -0.5, -0.4, 0.4, 0.5, 0.4} }, } local alternative_leaves = { drawtype = "plantlike", visual_scale = 1.0 } local textures_default_tree = { tiles = { "round_trunks_default_tree_top.png", "round_trunks_default_tree_top.png", "default_tree.png", "default_tree.png", "default_tree.png", "default_tree.png" } } local textures_pine_tree = { tiles = { "round_trunks_pine_top.png", "round_trunks_pine_top.png", "default_pine_tree.png", "default_pine_tree.png", "default_pine_tree.png", "default_pine_tree.png" } } local textures_acacia_tree = { tiles = { "round_trunks_acacia_tree_top.png", "round_trunks_acacia_tree_top.png", "default_acacia_tree.png", "default_acacia_tree.png", "default_acacia_tree.png", "default_acacia_tree.png" } } local textures_aspen_tree = { tiles = { "round_trunks_aspen_tree_top.png", "round_trunks_aspen_tree_top.png", "default_aspen_tree.png", "default_aspen_tree.png", "default_aspen_tree.png", "default_aspen_tree.png" } } -- -- Nodes to be overriden -- local tree_nodes = { "default:tree", "default:jungletree", "default:pine_tree", "default:acacia_tree", "default:aspen_tree" } local leaves = { "default:leaves", "default:jungleleaves", "default:pine_needles", "default:acacia_leaves", "default:aspen_leaves", "default:bush_leaves", "default:acacia_bush_leaves" } -- -- Nodes overriders -- for n = 1, 5 do minetest.override_item(tree_nodes[n], round_trunk) end minetest.override_item("default:tree", textures_default_tree) minetest.override_item("default:pine_tree", textures_pine_tree) minetest.override_item("default:acacia_tree", textures_acacia_tree) minetest.override_item("default:aspen_tree", textures_aspen_tree) if (round_trunks_leaves == true) then for n = 1, 7 do minetest.override_item(leaves[n], alternative_leaves) end end -- -- Minetest engine debug logging -- if (minetest_log_level == nil) or (minetest_log_level == "action") or (minetest_log_level == "info") or (minetest_log_level == "verbose") then minetest.log("action", mod_load_message) end
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0173-Read-Generic-Network-Signal-data.md -- -- Description: Applying of the minsize and maxsize for array of VD, minlength and maxlength for array element -- with type=String -- Precondition: -- 1. Preloaded file contains VehicleDataItems for all RPC spec VD -- 2. App is registered and activated -- 3. PTU is performed, the update contains the custom VD items in VehicleDataItems with type=String, array=true, -- minsize and maxsize,minlength and maxlength -- 4. Custom VD is allowed -- 5. App is subscribed for custom VD -- Sequence: -- 1. HMI sends OnVD with array size and element length in range for custom VD --   a. SDL resends OnVD notification to mobile app -- 2. HMI sends OnVD with array size out of range for custom VD --   a. SDL does not send OnVD to mobile app -- 3. HMI sends OnVD with array size in range but with element length in out of range for custom VD --   a. SDL does not send OnVD to mobile app --------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] for VDkey, VDitem in pairs (common.customDataTypeSample)do if VDitem.name == "custom_vd_item11_struct" then for subVDkey, subVDitem in pairs(VDitem.params) do if subVDitem.name == "struct_element_5_array" then common.customDataTypeSample[VDkey].params[subVDkey].minvalue = nil common.customDataTypeSample[VDkey].params[subVDkey].maxvalue = nil common.customDataTypeSample[VDkey].params[subVDkey].type = "String" common.customDataTypeSample[VDkey].params[subVDkey].minlength = 3 common.customDataTypeSample[VDkey].params[subVDkey].maxlength = 7 end end end end common.writeCustomDataToGeneralArray(common.customDataTypeSample) common.setDefaultValuesForCustomData() local appSessionId = 1 local paramsForChecking = { "custom_vd_item6_array_string", "custom_vd_item11_struct" } local arrayMinSize = common.EMPTY_ARRAY local function getItemParamValues(pItem) local params = {} local stringMinLength = string.rep("a",pItem.minlength) local stringMaxLength = string.rep("a",pItem.maxlength) params.arrayMaxSizeMinLength = { } params.arrayMaxSizeMaxLength = { } for i = 1, pItem.maxsize do params.arrayMaxSizeMinLength[i] = stringMinLength params.arrayMaxSizeMaxLength[i] = stringMaxLength end params.arrayOutOfMaxSize = common.cloneTable(params.arrayMaxSizeMaxLength) table.insert(params.arrayOutOfMaxSize, stringMaxLength) params.arrayOutOfMaxLength = { stringMaxLength .. "a" } return params end local rootItemParams = getItemParamValues(common.VehicleDataItemsWithData.custom_vd_item6_array_string) local childItemParams = getItemParamValues( common.VehicleDataItemsWithData.custom_vd_item11_struct.params.struct_element_5_array) --[[ Local Functions ]] local function setNewArrayValues(pValueRootLevel, pValueChildLevel) common.VehicleDataItemsWithData.custom_vd_item6_array_string.value = pValueRootLevel common.VehicleDataItemsWithData.custom_vd_item11_struct.params.struct_element_5_array.value = pValueChildLevel end -- [[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("App registration", common.registerApp) runner.Step("App activation", common.activateApp) runner.Step("PTU with VehicleDataItems", common.policyTableUpdateWithOnPermChange, { common.ptuFuncWithCustomData }) runner.Title("Test") for _, vehicleDataName in pairs(paramsForChecking) do runner.Step("SubscribeVehicleData " .. vehicleDataName, common.VDsubscription, { appSessionId, vehicleDataName, "SubscribeVehicleData" }) end runner.Step("Update parameter values to minsize", setNewArrayValues, { arrayMinSize, arrayMinSize }) for _, vehicleDataName in pairs(paramsForChecking) do runner.Step("OnVehicleData minsize " .. vehicleDataName, common.onVD, { appSessionId, vehicleDataName }) end runner.Step("Update parameter values to minlength, maxsize", setNewArrayValues, { rootItemParams.arrayMaxSizeMinLength, childItemParams.arrayMaxSizeMinLength }) for _, vehicleDataName in pairs(paramsForChecking) do runner.Step("OnVehicleData minlength, maxsize " .. vehicleDataName, common.onVD, { appSessionId, vehicleDataName }) end runner.Step("Update parameter values to maxlength, maxsize", setNewArrayValues, { rootItemParams.arrayMaxSizeMaxLength, childItemParams.arrayMaxSizeMaxLength }) for _, vehicleDataName in pairs(paramsForChecking) do runner.Step("OnVehicleData maxlength, maxsize " .. vehicleDataName, common.onVD, { appSessionId, vehicleDataName }) end runner.Step("Update parameter values to out of maxlength", setNewArrayValues, { rootItemParams.arrayOutOfMaxLength, childItemParams.arrayOutOfMaxLength }) for _, vehicleDataName in pairs(paramsForChecking) do runner.Step("OnVehicleData out of maxlength " .. vehicleDataName, common.onVD, { appSessionId, vehicleDataName, common.VD.NOT_EXPECTED }) end runner.Step("Update parameter values to out of maxsize", setNewArrayValues, { rootItemParams.arrayOutOfMaxSize, childItemParams.arrayOutOfMaxSize }) for _, vehicleDataName in pairs(paramsForChecking) do runner.Step("OnVehicleData out of maxsize " .. vehicleDataName, common.onVD, { appSessionId, vehicleDataName, common.VD.NOT_EXPECTED }) end runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions)
-- CreateWebProofs.lua require 'PluginInit' require 'ExportSettings' local LrFunctionContext = import 'LrFunctionContext' local LrBinding = import 'LrBinding' local LrDialogs = import 'LrDialogs' local LrView = import 'LrView' local LrApplication = import 'LrApplication' local LrTasks = import 'LrTasks' local catalog = LrApplication.activeCatalog() local LrPathUtils = import 'LrPathUtils' local LrFileUtils = import 'LrFileUtils' local LrLogger = import 'LrLogger' local myLogger = LrLogger( 'newProjectWorkflow' ) local projectRoot = PluginInit.projectRoot local LrExportSession = import 'LrExportSession' -- local ExportSettings = import 'ExportSettings' myLogger:enable( "logfile" ) -- Pass either a string or a table of actions. -- Write trace information to the logger. local function outputToLog( message ) myLogger:trace( message ) end --[[ "publish" 2M jpeg proofs of the selected photos --]] LrTasks.startAsyncTask( function () local project = PluginInit.selectedProject() outputToLog("Starting with project root " .. projectRoot) local projectDir if project then projectDir = LrPathUtils.child(projectRoot, project) else projectDir = LrPathUtils.child(projectRoot, "export") end outputToLog("Starting with export root " .. projectDir) LrFileUtils.createAllDirectories(projectDir) local web = LrPathUtils.child(projectDir, "web") LrFileUtils.createAllDirectories(web) local proofs = LrPathUtils.child(web, "proofs") LrFileUtils.createAllDirectories(proofs) result = LrDialogs.runOpenPanel({ title = "Choose Folder", prompt = "Choose", canChooseFiles = false, canChooseDirectories = true, canCreateDirectories = true, allowsMultipleSelection = false, initialDirectory = proofs, }) local target = proofs if not result then outputToLog("No new directory chosen") else target = result[1] outputToLog("Chose new directory " .. result[1]) end local exportSettings = ExportSettings.getWebExportSettings(target, "proofs") LrTasks.startAsyncTask( function( ) outputToLog("Starting async task exporting web proofs") local photos = catalog:getTargetPhotos() if #photos == 0 then return end local exportSession = LrExportSession({ photosToExport = photos, exportSettings = exportSettings, }) local result = catalog:withWriteAccessDo("doExportOnCurrentTask", function (context) exportSession:doExportOnCurrentTask() for _, rendition in exportSession:renditions() do local success, pathOrMessage = rendition:waitForRender() outputToLog("Got pathOrMessage: " .. pathOrMessage) if success then outputToLog("Exported rendition: " .. pathOrMessage) else outputToLog("Got error waiting for rendition: " .. pathOrMessage) end end end) outputToLog("write access do returned " .. result) end) end)
local editor = {} -- welcome to disaster town local Tilemap = require "lib.tilemap" local csv = require "lib.csv" local actions = require "lib.actions" local g = require "global" local gui = gooi.newPanel({ x = 0, y = 0, w = love.graphics.getWidth(), h = love.graphics.getHeight()/2.5, layout = "grid 5x4", group = "editor" }) local idlabel = gooi.newLabel({ text = "0", w = 25, h = 40, group = "editor" }) idlabel:fg({0,0,0,1}) local poslabel = gooi.newLabel({ text = "1,1", w = 25, h = 40, group = "editor" }) poslabel:fg({0,0,0,1}) local size = gooi.newText({ text = "10x10", w = 150, h = 40, group = "editor" }) local map local x, y = 1, 1 local id = 0 local setsize = gooi.newButton({ text = "Set Size", w = 100, h = 40, group = "editor" }):onRelease(function() local _w, _h = tonumber(size:getText():sub(1,2)), tonumber(size:getText():sub(4,5)) if _w and _h then _w, _h = math.max(_w, 10), math.max(_h, 10) if not (_w == map.width) or not (_h == map.height) then local grid = {} for y=1, _h do grid[y] = {} for x=1, _w do grid[y][x] = map:getRawTile(x, y) or -1 end end table.insert(grid, {map.background}) map = Tilemap(grid) end _w, _h = tostring(_w), tostring(_h) _w = #_w < 2 and "0" .. _w or _w _h = #_h < 2 and "0" .. _h or _h size:setText(_w .. "x" .. _h) end end) local isentry = gooi.newCheck({ text = "entry?", w = 125, h = 40, checked = false, group = "editor" }) local doorid = gooi.newText({ text = "0", w = 150, h = 40, group = "editor" }) local doorpos = gooi.newText({ text = "0,01,01", w = 150, h = 40, group = "editor" }) local adddoor = gooi.newButton({ text = "Add Door", w = 100, h = 40, group = "editor" }):onRelease(function() local cur = tonumber(doorid:getText()) local goal, mapx, mapy = tonumber(doorpos:getText():sub(1,1)), tonumber(doorpos:getText():sub(3,4)), tonumber(doorpos:getText():sub(6,7)) if cur and goal and mapx and mapy then cur = tostring(math.clamp(cur, 0, 9)) goal, mapx, mapy = tostring(math.clamp(goal, 0, 9)), tostring(math.clamp(mapx, 1, 20)), tostring(math.clamp(mapy, 1, 20)) mapx = #mapx < 2 and "0" .. mapx or mapx mapy = #mapy < 2 and "0" .. mapy or mapy doorid:setText(cur) doorpos:setText(goal .. "," .. mapx .. "," .. mapy) if isentry.checked then map.raw[y][x] = tonumber("2" .. cur .. goal .. mapx .. mapy) else map.raw[y][x] = tonumber("1" .. cur .. goal .. mapx .. mapy) end map:autotile() end end) local actionname = gooi.newText({ text = "", w = 150, h = 40, group = "editor" }) local addaction = gooi.newButton({ text = "Add Action", w = 100, h = 40, group = "editor" }):onRelease(function() local name = actionname:getText() if actions[name] then map.raw[y][x] = name map:autotile() end end) local filename = gooi.newText({ text = "area_1_1", w = 150, h = 40, group = "editor" }) local bg = gooi.newText({ text = "forest", w = 150, h = 40, group = "editor" }) local setbg = gooi.newButton({ text = "Set BG", w = 100, h = 40, group = "editor" }):onRelease(function() map.background = bg:getText() end) local load = gooi.newButton({ text = "Load", w = 100, h = 40, group = "editor" }):onRelease(function() local f = io.open("assets/maps/" .. filename:getText() .. ".csv", "r") if f then local grid = csv.parse(f:read("*a")) f:close() map = Tilemap(grid) x = 1 y = 1 local _w, _h = tostring(map.width), tostring(map.height) _w = #_w < 2 and "0" .. _w or _w _h = #_h < 2 and "0" .. _h or _h size:setText(_w .. "x" .. _h) bg:setText(map.background) end end) local save = gooi.newButton({ text = "Save", w = 100, h = 40, group = "editor" }):onRelease(function() local f = io.open("assets/maps/" .. filename:getText() .. ".csv", "w+") local csvd = csv.stringify(map.raw) .. "\n" .. map.background f:write(csvd) f:flush() f:close() local f = io.open("assets/maps/" .. filename:getText() .. ".csv", "r") if f then g.assets.maps[filename:getText()] = csv.parse(f:read("*a")) f:close() end end) local showmap = gooi.newCheck({ text = "Show Tiled Map", w = 200, h = 40, checked = true, group = "editor" }) gui:setColspan(2,1, 3) gui:setColspan(3,2, 2) gui:add( doorid, doorpos, isentry, actionname, adddoor, addaction, size, filename, bg, setsize, load, save, setbg, showmap, idlabel, poslabel ) function editor:enter() g.camera:setWorld(-math.huge, -math.huge, math.huge, math.huge) local grid = {} for y=1, 10 do grid[y] = {} for x=1, 10 do grid[y][x] = -1 end end table.insert(grid, {"forest"}) map = Tilemap(grid) love.keyboard.setKeyRepeat(true) gooi.setGroupVisible("editor", true) end function editor:leave() love.keyboard.setKeyRepeat(false) gooi.setGroupVisible("editor", false) end function editor:update(dt) if love.keyboard.isScancodeDown("space") then map.raw[y][x] = id map:autotile() end poslabel:setText(tostring(x) .. " , " .. tostring(y)) idlabel:setText(id) g.camera:setPosition(math.floor((x-0.5)*60), math.floor((y-0.5)*60)) end function editor:keypressed(key, scan, isrepeat) if scan == "w" then y=y-1 end if scan == "s" then y=y+1 end if scan == "a" then x=x-1 end if scan == "d" then x=x+1 end if scan == "left" then id=math.max(id-1, -1) end if scan == "right" then id=id+1 end if scan == "escape" then Gamestate.switch(g.states.menu) end x, y = math.clamp(x, 1, map.width), math.clamp(y, 1, map.height) end function editor:draw() love.graphics.setColor(1, 1, 1) map:drawBg(g.camera:getVisible()) g.camera:draw(function() love.graphics.setColor(0.5,0.5,0.5) love.graphics.rectangle("fill", -1000, -1000, 1000, map.height*60+2000) love.graphics.rectangle("fill", map.width*60, -1000, 1000, map.height*60+2000) love.graphics.rectangle("fill", 0, -1000, map.width*60, 1000) love.graphics.rectangle("fill", 0, map.height*60, map.width*60, 1000) love.graphics.setColor(1,1,1) map:drawDebug(g.camera:getVisible()) if showmap.checked then map:draw(g.camera:getVisible()) end love.graphics.setColor(0,0,0) love.graphics.circle("fill", (x-0.5)*60, (y-0.5)*60, 2) love.graphics.setColor(1,1,1) end) gooi.draw("editor") end return editor
RoleManager = RoleManager or {} RoleManager.listen_handler = nil RoleManager.roles = {} function RoleManager.start(listen_port) RoleManager.listen_handler = TcpListen:new() RoleManager.listen_handler:set_gen_cnn_cb(RoleManager.listen_gen_cnn) RoleManager.listen_handler:set_open_cb(RoleManager.on_listen_open) RoleManager.listen_handler:set_close_cb(RoleManager.on_listen_close) local netid = native.net_listen("0.0.0.0", listen_port, RoleManager.listen_handler:get_native_listen_weak_ptr()) print("RoleManager.start ", listen_port, netid) return netid > 0 end function RoleManager.stop() end function RoleManager.on_listen_open(t, err_num) print("RoleManager.on_listen_open") end function RoleManager.on_listen_close(t, err_num) print("RoleManager.on_listen_close") end function RoleManager.listen_gen_cnn(t) local cnn = TcpConnect:new() cnn:set_open_cb(RoleManager.on_cnn_open) cnn:set_close_cb(RoleManager.on_cnn_close) cnn:set_recv_cb(RoleManager.on_cnn_recv) return cnn end function RoleManager.on_cnn_open(t, err_num) print("RoleManager.on_cnn_open", t:netid()) if 0 == err_num then RoleManager.roles[t:netid()] = t end end function RoleManager.on_cnn_close(t, err_num) print("RoleManager.on_cnn_close") RoleManager.roles[t:netid()] = nil end function RoleManager.on_cnn_recv(t, pid, bin) print("RoleManager.on_cnn_recv", t:netid(), pid, bin) t:send(pid, bin) end
require("iuplua") function read_file(filename) local ifile = io.open(filename, "r") if (not ifile) then iup.Message("Error", "Can't open file: " .. filename) return nil end local str = ifile:read("*a") if (not str) then iup.Message("Error", "Fail when reading from file: " .. filename) return nil end ifile:close() return str end function write_file(filename, str) local ifile = io.open(filename, "w") if (not ifile) then iup.Message("Error", "Can't open file: " .. filename) return end if (not ifile:write(str)) then iup.Message("Error", "Fail when writing to file: " .. filename) end ifile:close() end multitext = iup.text{ multiline = "YES", expand = "YES" } item_open = iup.item{title="Open..."} item_saveas = iup.item{title="Save As..."} item_font = iup.item{title="Font..."} item_about = iup.item{title="About..."} item_exit = iup.item{title="Exit"} function item_open:action() local filedlg = iup.filedlg{ dialogtype = "OPEN", filter = "*.txt", filterinfo = "Text Files", } filedlg:popup(iup.CENTER, iup.CENTER) if (tonumber(filedlg.status) ~= -1) then local filename = filedlg.value local str = read_file(filename) if (str) then multitext.value = str end end filedlg:destroy() end function item_saveas:action() local filedlg = iup.filedlg{ dialogtype = "SAVE", filter = "*.txt", filterinfo = "Text Files", } filedlg:popup(iup.CENTER, iup.CENTER) if (tonumber(filedlg.status) ~= -1) then local filename = filedlg.value write_file(filename, multitext.value) end filedlg:destroy() end function item_font:action() local font = multitext.font local fontdlg = iup.fontdlg{value = font} fontdlg:popup(iup.CENTER, iup.CENTER) if (tonumber(fontdlg.status) == 1) then multitext.font = fontdlg.value end fontdlg:destroy() end function item_about:action() iup.Message("About", " Simple Notepad\n\nAuthors:\n Gustavo Lyrio\n Antonio Scuri") end function item_exit:action() return iup.CLOSE end file_menu = iup.menu{item_open,item_saveas,iup.separator{},item_exit} format_menu = iup.menu{item_font} help_menu = iup.menu{item_about} sub_menu_file = iup.submenu{file_menu, title = "File"} sub_menu_format = iup.submenu{format_menu, title = "Format"} sub_menu_help = iup.submenu{help_menu, title = "Help"} menu = iup.menu{ sub_menu_file, sub_menu_format, sub_menu_help } vbox = iup.vbox{ multitext } dlg = iup.dialog{ vbox, title = "Simple Notepad", size = "QUARTERxQUARTER", menu = menu } dlg:showxy(iup.CENTER,iup.CENTER) dlg.usersize = nil -- to be able to run this script inside another context if (iup.MainLoopLevel()==0) then iup.MainLoop() iup.Close() end
dofile("script/include/inc_all.lua") dofile("script/include/inc_event.lua") dofile("script/include/inc_charchoice.lua") local sunny = 0 local calm = 0 local flexible = 0 local serious = 0 local cooperate = 0 local chartype = "" local basecharname = "" local charname = "" local persontype = "" local pertnername = "" local pertnergender = "" function groundInit() end function groundStart() end function seikakushindansetsumei01_init() end function seikakushindansetsumei01_start() CAMERA:SetSisaAzimuthDifferenceVolume(Volume(1)) CAMERA:SetSisaRateVolume(Volume(0.5)) SCREEN_A:FadeOutAll(TimeSec(0), true) SCREEN_A:FadeOut(TimeSec(0), true) SYSTEM:ExecutePersonalityAnalysis3dsCameraMode() SCREEN_A:WhiteOut(TimeSec(0.5), true) TASK:Sleep(TimeSec(4)) SOUND:PlayBgm(SymSnd("BGM_EVE_SHINPI"), Volume(256)) SCREEN_A:WhiteInAll(TimeSec(0.5), true) WINDOW:NarrationB(TimeSec(1), TimeSec(0.5), -1696874002) WINDOW:CloseMessage() WINDOW:NarrationB(TimeSec(1), TimeSec(0.5), -2084507473) WINDOW:CloseMessage() WINDOW:NarrationB(TimeSec(1), TimeSec(0.5), -1460821140) WINDOW:CloseMessage() end function seikakushindansetsumei01_end() end function seikakushindankekka01_init() end function seikakushindankekka01_start() CH("PIKACHUU_H"):SetVisible(false) CH("POKABU_H"):SetVisible(false) CH("MIJUMARU_H"):SetVisible(false) CH("TSUTAAJA_H"):SetVisible(false) CH("FUSHIGIDANE_H"):SetVisible(false) CH("HITOKAGE_H"):SetVisible(false) CH("ZENIGAME_H"):SetVisible(false) CH("CHIKORIITA_H"):SetVisible(false) CH("HINOARASHI_H"):SetVisible(false) CH("WANINOKO_H"):SetVisible(false) CH("KIMORI_H"):SetVisible(false) CH("ACHAMO_H"):SetVisible(false) CH("MIZUGOROU_H"):SetVisible(false) CH("NAETORU_H"):SetVisible(false) CH("HIKOZARU_H"):SetVisible(false) CH("POTCHAMA_H"):SetVisible(false) CH("RIORU_H"):SetVisible(false) CH("HARIMARON_H"):SetVisible(false) CH("FOKKO_H"):SetVisible(false) CH("KEROMATSU_H"):SetVisible(false) CAMERA:SetSisaAzimuthDifferenceVolume(Volume(1)) CAMERA:SetSisaRateVolume(Volume(0.5)) SCREEN_A:FadeInAll(TimeSec(0), true) EFFECT:Create("EV_SINDAN_00_LP", SymEff("EV_SINDAN_00_LP")) EFFECT:SetPosition("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_0_C")) EFFECT:Play("EV_SINDAN_00_LP") CAMERA:SetFovy(Degree(80)) SCREEN_A:WhiteIn(TimeSec(2), false) CUT:Load(SymCut("sk01_n011in")) CUT:Play() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_1_C"), Speed(6.66)) CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:Wait() CUT:Destroy() local type01 = SYSTEM:GetRandomValue(0, 2) local type02 = SYSTEM:GetRandomValue(0, 2) local type03 = SYSTEM:GetRandomValue(0, 2) local type04 = SYSTEM:GetRandomValue(0, 2) local type05 = SYSTEM:GetRandomValue(0, 2) EFFECT:Create("EV_FLASH_EFFECT", SymEff("EV_SINDAN_01A")) CUT:Load(SymCut("sk02_n012wait")) CUT:PlayLoop() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) sunny = seikakushindan01(type01) PlaySe_Select() EFFECT:Create("EV_SINDAN_00_LPA", SymEff("EV_SINDAN_01A")) EFFECT:SetPosition("EV_SINDAN_00_LPA", EFFECT:GetPosition("EV_SINDAN_00_LP")) EFFECT:Play("EV_SINDAN_00_LPA") EFFECT:Wait("EV_SINDAN_00_LPA") EFFECT:Remove("EV_SINDAN_00_LPA") CUT:CancelLoop() CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk03_n021dec")) CUT:Play() PlaySe_BoostA() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT02"), Speed(20)) CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk04_n022wait")) CUT:PlayLoop() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) calm = seikakushindan02(type02) PlaySe_Select() EFFECT:Create("EV_SINDAN_00_LPA", SymEff("EV_SINDAN_01A")) EFFECT:SetPosition("EV_SINDAN_00_LPA", EFFECT:GetPosition("EV_SINDAN_00_LP")) EFFECT:Play("EV_SINDAN_00_LPA") EFFECT:Wait("EV_SINDAN_00_LPA") EFFECT:Remove("EV_SINDAN_00_LPA") CUT:CancelLoop() CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk05_n031dec")) CUT:Play() PlaySe_BoostB() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_1_L"), Speed(20)) CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk06_n032wait")) CUT:PlayLoop() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) flexible = seikakushindan03(type03) PlaySe_Select() EFFECT:Create("EV_SINDAN_00_LPA", SymEff("EV_SINDAN_01A")) EFFECT:SetPosition("EV_SINDAN_00_LPA", EFFECT:GetPosition("EV_SINDAN_00_LP")) EFFECT:Play("EV_SINDAN_00_LPA") EFFECT:Wait("EV_SINDAN_00_LPA") EFFECT:Remove("EV_SINDAN_00_LPA") CUT:CancelLoop() CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk07_n041dec")) CUT:Play() PlaySe_BoostA() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_2_L"), Speed(20)) CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk08_n042wait")) CUT:PlayLoop() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) serious = seikakushindan04(type04) PlaySe_Select() EFFECT:Create("EV_SINDAN_00_LPA", SymEff("EV_SINDAN_01A")) EFFECT:SetPosition("EV_SINDAN_00_LPA", EFFECT:GetPosition("EV_SINDAN_00_LP")) EFFECT:Play("EV_SINDAN_00_LPA") EFFECT:Wait("EV_SINDAN_00_LPA") EFFECT:Remove("EV_SINDAN_00_LPA") CUT:CancelLoop() CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk09_n051dec")) CUT:Play() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) PlaySe_BoostB() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_3_L"), Speed(20)) CUT:Wait() CUT:Destroy() EFFECT:WaitMove("EV_SINDAN_00_LP") CUT:Load(SymCut("sk10_n052wait")) CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:PlayLoop() cooperate = seikakushindan05(type05) PlaySe_Select() EFFECT:Create("EV_SINDAN_00_LPA", SymEff("EV_SINDAN_01A")) EFFECT:SetPosition("EV_SINDAN_00_LPA", EFFECT:GetPosition("EV_SINDAN_00_LP")) EFFECT:Play("EV_SINDAN_00_LPA") EFFECT:Wait("EV_SINDAN_00_LPA") EFFECT:Remove("EV_SINDAN_00_LPA") CUT:CancelLoop() CUT:Wait() CUT:Destroy() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:Load(SymCut("sk11_n061dec")) CUT:Play() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) PlaySe_BoostA() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_4_L"), Speed(20)) CUT:Wait() CUT:Destroy() local basecharname, persontype = seikakuhantei(sunny, calm, flexible, serious, cooperate) CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:Load(SymCut("sk12_n062wait")) CUT:PlayLoop() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) charname, chartype = seikakushindan06(persontype) PlaySe_Select() EFFECT:Create("EV_SINDAN_00_LPA", SymEff("EV_SINDAN_01A")) EFFECT:SetPosition("EV_SINDAN_00_LPA", EFFECT:GetPosition("EV_SINDAN_00_LP")) EFFECT:Play("EV_SINDAN_00_LPA") EFFECT:Wait("EV_SINDAN_00_LPA") EFFECT:Remove("EV_SINDAN_00_LPA") CUT:CancelLoop() CUT:Wait() CUT:Destroy() GROUND:SetHero(charname, 0) CUT:Load(SymCut("sk13_n071dec")) CUT:Play() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) PlaySe_BoostB() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_1_R"), Speed(20)) CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk14_n072wait")) CUT:PlayLoop() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) pertnername = seikakushindan07(chartype, charname) PlaySe_Select() EFFECT:Create("EV_SINDAN_00_LPA", SymEff("EV_SINDAN_01A")) EFFECT:SetPosition("EV_SINDAN_00_LPA", EFFECT:GetPosition("EV_SINDAN_00_LP")) EFFECT:Play("EV_SINDAN_00_LPA") EFFECT:Wait("EV_SINDAN_00_LPA") EFFECT:Remove("EV_SINDAN_00_LPA") CUT:CancelLoop() CUT:Wait() CUT:Destroy() GROUND:SetPartner(pertnername, 0) EFFECT:Create("EV_SINDAN_00_LPA", SymEff("EV_SINDAN_01A")) EFFECT:SetPosition("EV_SINDAN_00_LPA", SymPos("MOVE_EFFECT01_0_C")) EFFECT:Play("EV_SINDAN_00_LPA") EFFECT:Wait("EV_SINDAN_00_LPA") CUT:Load(SymCut("sk15_n081dec")) CUT:Play() PlaySe_BoostA() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_2_R"), Speed(20)) CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk16_n082wait")) CUT:PlayLoop() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) pertnergender = seikakushindan08() PlaySe_Select() EFFECT:Create("EV_SINDAN_00_LPA", SymEff("EV_SINDAN_01A")) EFFECT:SetPosition("EV_SINDAN_00_LPA", EFFECT:GetPosition("EV_SINDAN_00_LP")) EFFECT:Play("EV_SINDAN_00_LPA") EFFECT:Wait("EV_SINDAN_00_LPA") EFFECT:Remove("EV_SINDAN_00_LPA") CUT:CancelLoop() CUT:Wait() CUT:Destroy() if pertnergender == "BOY" then SYSTEM:SetPartnerSex(SEX.MALE) else SYSTEM:SetPartnerSex(SEX.FEMALE) end CUT:Load(SymCut("sk17_n091dec")) CUT:Play() PlaySe_BoostB() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_3_R"), Speed(5)) CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk18_n092wait")) CUT:PlayLoop() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) local POKEID_HERO, POKEID_PARTNER if charname == #Starter537# then typeRIORU() charRIORU() elseif charname == #Starter772# then typeKEROMATSU() charKEROMATSU() elseif charname == #Starter482# then typeHIKOZARU() charHIKOZARU() elseif charname == #Starter1# then typeFUSHIGIDANE() charHIKOZARU() elseif charname == #Starter479# then typeNAETORU() charNAETORU() elseif charname == #Starter322# then typeKIMORI() charKIMORI() elseif charname == #Starter203# then typeWANINOKO() charWANINOKO() elseif charname == #Starter485# then typePOTCHAMA() charPOTCHAMA() elseif charname == #Starter30# then typePIKACHUU() charPIKACHUU() elseif charname == #Starter5# then typeHITOKAGE() charHITOKAGE() elseif charname == #Starter197# then typeCHIKORIITA() charCHIKORIITA() elseif charname == #Starter325# then typeACHAMO() charACHAMO() elseif charname == #Starter598# then typeMIJUMARU() charMIJUMARU() elseif charname == #Starter769# then typeFOKKO() charFOKKO() elseif charname == #Starter592# then typeTSUTAAJA() charTSUTAAJA() elseif charname == #Starter766# then typeHARIMARON() charHARIMARON() elseif charname == #Starter200# then typeHINOARASHI() charHINOARASHI() elseif charname == #Starter10# then typeZENIGAME() charZENIGAME() elseif charname == #Starter595# then typePOKABU() charPOKABU() elseif charname == #Starter329# then typeMIZUGOROU() charMIZUGOROU() end CUT:CancelLoop() CUT:Wait() CUT:Destroy() CUT:Load(SymCut("sk19_n101in")) CUT:Play() EFFECT:MoveTo("EV_SINDAN_00_LP", SymPos("MOVE_EFFECT01_4_R"), Speed(1.66)) PlaySe_WhiteOut() CAMERA:SetFollowEffect("EV_SINDAN_00_LP", 0) CUT:Wait() CUT:Destroy() SCREEN_A:WhiteOut(TimeSec(1.5), true) EFFECT:Remove("EV_SINDAN_00_LP") end function seikakushindankekka01_end() end function seikakushindankekka02_init() end function seikakushindankekka02_start() local charname = SymAct("HERO"):GetIndex() local pertnername = SymAct("PARTNER"):GetIndex() MAP:SetVisible(true) CAMERA:SetEye(SymCam("CAMERA_01")) CAMERA:SetTgt(SymCam("CAMERA_01")) end function seikakushindankekka02_end() end function seikakushindankekka02_5_init() end function seikakushindankekka02_5_start() CAMERA:SetSisaAzimuthDifferenceVolume(Volume(1)) CAMERA:SetSisaRateVolume(Volume(0.5)) EFFECT:Create("effectsmoke01", SymEff("EV_SMOKE_LP")) EFFECT:SetPosition("effectsmoke01", SymPos("P00_E_HERO")) EFFECT:Create("effectsmoke02", SymEff("EV_SMOKE_LP")) EFFECT:SetPosition("effectsmoke02", SymPos("P00_E_PARTNER")) EFFECT:SetScale("effectsmoke01", Scale(0.5)) EFFECT:SetScale("effectsmoke02", Scale(0.5)) EFFECT:Play("effectsmoke01") EFFECT:Play("effectsmoke02") --[[result = 0 reselect = false while 1 > result do CH("HERO"):SetVisible(false) CH("PARTNER"):SetVisible(false) SYSTEM:SelectPlayerAndPartnerCharcter(reselect) CAMERA:SetEye(SymCam("CAMERA_03")) CAMERA:SetTgt(SymCam("CAMERA_03")) CHARA:ReloadHeroPartner() CH("HERO"):SetVisible(true) CH("PARTNER"):SetVisible(true) SCREEN_A:FadeIn(TimeSec(1), true) WINDOW:SysMsg(-1309240787) WINDOW:SelectStart() WINDOW:SelectChain(-21560086, 1) WINDOW:SelectChain(-408144469, 0) WINDOW:DefaultCursor(1) result = WINDOW:SelectEnd(MENU_SELECT_MODE.ENABLE_CANCEL) if 1 ~= result then reselect = true SCREEN_A:WhiteOut(TimeSec(1.5), true) SCREEN_B:WhiteOut(TimeSec(1.5), true) WINDOW:CloseMessage() end end --]] -- Set up the camera CAMERA:SetEye(SymCam("CAMERA_03")) CAMERA:SetTgt(SymCam("CAMERA_03")) CH("HERO"):SetVisible(true) CH("PARTNER"):SetVisible(true) SCREEN_A:FadeIn(TimeSec(1), true) -- Allow changing Pokemon repeat local doRefresh = false WINDOW:CloseMessage() WINDOW:SysMsg(-1309240787) WINDOW:SysMsg(200000) WINDOW:SelectStart() WINDOW:SelectChain(-21560086, 0) WINDOW:SelectChain(200002, 1) WINDOW:SelectChain(200003, 2) WINDOW:DefaultCursor(0) local id = WINDOW:SelectEnd(MENU_SELECT_MODE.DISABLE_CANCEL) if id == 1 then WINDOW:SysMsg( 200004 ) local oldpartnerid = SymAct("PARTNER"):GetIndex() WINDOW:SelectStart() WINDOW:SelectChain(200001, 0) if oldpartnerid ~= #Starter1# then WINDOW:SelectChain(#StarterHash1#,#Starter1#) end if oldpartnerid ~= #Starter5# then WINDOW:SelectChain(#StarterHash5#,#Starter5#) end if oldpartnerid ~= #Starter10# then WINDOW:SelectChain(#StarterHash10#,#Starter10#) end if oldpartnerid ~= #Starter30# then WINDOW:SelectChain(#StarterHash30#,#Starter30#) end if oldpartnerid ~= #Starter197# then WINDOW:SelectChain(#StarterHash197#,#Starter197#) end if oldpartnerid ~= #Starter200# then WINDOW:SelectChain(#StarterHash200#,#Starter200#) end if oldpartnerid ~= #Starter203# then WINDOW:SelectChain(#StarterHash203#,#Starter203#) end if oldpartnerid ~= #Starter322# then WINDOW:SelectChain(#StarterHash322#,#Starter322#) end if oldpartnerid ~= #Starter325# then WINDOW:SelectChain(#StarterHash325#,#Starter325#) end if oldpartnerid ~= #Starter329# then WINDOW:SelectChain(#StarterHash329#,#Starter329#) end if oldpartnerid ~= #Starter479# then WINDOW:SelectChain(#StarterHash479#,#Starter479#) end if oldpartnerid ~= #Starter482# then WINDOW:SelectChain(#StarterHash482#,#Starter482#) end if oldpartnerid ~= #Starter485# then WINDOW:SelectChain(#StarterHash485#,#Starter485#) end if oldpartnerid ~= #Starter537# then WINDOW:SelectChain(#StarterHash537#,#Starter537#) end if oldpartnerid ~= #Starter592# then WINDOW:SelectChain(#StarterHash592#,#Starter592#) end if oldpartnerid ~= #Starter595# then WINDOW:SelectChain(#StarterHash595#,#Starter595#) end if oldpartnerid ~= #Starter598# then WINDOW:SelectChain(#StarterHash598#,#Starter598#) end if oldpartnerid ~= #Starter766# then WINDOW:SelectChain(#StarterHash766#,#Starter766#) end if oldpartnerid ~= #Starter769# then WINDOW:SelectChain(#StarterHash769#,#Starter769#) end if oldpartnerid ~= #Starter772# then WINDOW:SelectChain(#StarterHash772#,#Starter772#) end WINDOW:DefaultCursor(0) local pkmID = WINDOW:SelectEnd(MENU_SELECT_MODE.DISABLE_CANCEL) if pkmID == 0 then --Do nothing else GROUND:SetHero(pkmID, 0) doRefresh = true end elseif id == 2 then WINDOW:SysMsg( 200005 ) local oldpokemonid = SymAct("HERO"):GetIndex() WINDOW:SelectStart() WINDOW:SelectChain(200001, 0) WINDOW:SelectChain(#StarterHash1#,#Starter1#) WINDOW:SelectChain(#StarterHash5#,#Starter5#) WINDOW:SelectChain(#StarterHash10#,#Starter10#) WINDOW:SelectChain(#StarterHash30#,#Starter30#) WINDOW:SelectChain(#StarterHash197#,#Starter197#) WINDOW:SelectChain(#StarterHash200#,#Starter200#) WINDOW:SelectChain(#StarterHash203#,#Starter203#) WINDOW:SelectChain(#StarterHash322#,#Starter322#) WINDOW:SelectChain(#StarterHash325#,#Starter325#) WINDOW:SelectChain(#StarterHash329#,#Starter329#) WINDOW:SelectChain(#StarterHash479#,#Starter479#) WINDOW:SelectChain(#StarterHash482#,#Starter482#) WINDOW:SelectChain(#StarterHash485#,#Starter485#) WINDOW:SelectChain(#StarterHash537#,#Starter537#) WINDOW:SelectChain(#StarterHash592#,#Starter592#) WINDOW:SelectChain(#StarterHash595#,#Starter595#) WINDOW:SelectChain(#StarterHash598#,#Starter598#) WINDOW:SelectChain(#StarterHash766#,#Starter766#) WINDOW:SelectChain(#StarterHash769#,#Starter769#) WINDOW:SelectChain(#StarterHash772#,#Starter772#) WINDOW:DefaultCursor(0) local pkmID = WINDOW:SelectEnd(MENU_SELECT_MODE.DISABLE_CANCEL) if pkmID == 0 then --Do nothing else GROUND:SetPartner(pkmID, 0) doRefresh = true end end if doRefresh == true then PlaySe_BoostA() SCREEN_A:WhiteOut(TimeSec(0.5), true) SCREEN_B:WhiteOut(TimeSec(0.5), true) CHARA:ReloadHeroPartner() SCREEN_A:FadeIn(TimeSec(1), true) end until id == 0 WINDOW:SysMsg(-863934872) WINDOW:SysMsg(-711305431) WINDOW:SysMsg(1375882214) WINDOW:CloseMessage() SOUND:FadeOutBgm(TimeSec(2.5)) CAMERA:MoveEye(SymCam("CAMERA_04"), Speed(2, ACCEL_TYPE.NONE, DECEL_TYPE.NONE)) CH("HERO"):DirTo(SymPos("P01_HERO"), Speed(350), ROT_TYPE.NEAR) CH("HERO"):WaitRotate() CH("HERO"):WalkTo(SymPos("P01_HERO"), Speed(1)) EFFECT:MoveTo("effectsmoke01", SymPos("P01_HERO"), Speed(1)) CH("PARTNER"):DirTo(SymPos("P01_PARTNER"), Speed(350), ROT_TYPE.NEAR) CH("PARTNER"):WaitRotate() CH("PARTNER"):WalkTo(SymPos("P01_PARTNER"), Speed(1)) EFFECT:MoveTo("effectsmoke02", SymPos("P01_PARTNER"), Speed(1)) PlaySe_SeikakuEnd() SCREEN_A:WhiteOut(TimeSec(1.5), true) TASK:Sleep(TimeSec(1)) EFFECT:Remove("effectsmoke01") EFFECT:Remove("effectsmoke02") SCREEN_A:SetColorFilter(Color(1, 1, 1, 1)) MAP:SetVisible(false) CH("HERO"):SetVisible(false) CH("PARTNER"):SetVisible(false) TASK:Sleep(TimeSec(1)) SCREEN_A:SetColorFilter(Color(0, 0, 0, 0)) SCREEN_A:WhiteIn(TimeSec(0.5), true) CAMERA:SetFovy(Degree(80)) TASK:Sleep(TimeSec(2)) end function seikakushindankekka02_5_end() end function setcamera01() CAMERA:MoveEye(Vector(4, -2, -7), Speed(10, ACCEL_TYPE.HIGH, DECEL_TYPE.HIGH)) CAMERA:WaitMove() CAMERA:MoveEye(Vector(0, 0, -5), Speed(5, ACCEL_TYPE.LOW, DECEL_TYPE.LOW)) CAMERA:WaitMove() end function setcamera02() CAMERA:MoveEye(Vector(-10, -2, 0), Speed(10, ACCEL_TYPE.HIGH, DECEL_TYPE.HIGH)) CAMERA:WaitMove() CAMERA:MoveEye(Vector(5, 4, 0), Speed(10, ACCEL_TYPE.LOW, DECEL_TYPE.HIGH)) CAMERA:WaitMove() CAMERA:MoveEye(SymCam("CAMERA_01"), Speed(10, ACCEL_TYPE.LOW, DECEL_TYPE.LOW)) CAMERA:WaitMove() end function seikakushindan01(rand) if rand == 0 then WINDOW:SysMsg(1259960999) WINDOW:SysMsg(180221430) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(329696439, 1) WINDOW:SelectChain(948672372, 0) WINDOW:DefaultCursor(1) else WINDOW:SysMsg(563127861) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(1859203314, 1) WINDOW:SelectChain(2009727411, 0) WINDOW:DefaultCursor(1) end local id01 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() return id01 end function seikakushindan02(rand) if rand == 0 then WINDOW:SysMsg(1558663792) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(1174168369, 1) WINDOW:SelectChain(-1033601026, 0) WINDOW:DefaultCursor(1) else WINDOW:SysMsg(-612413761) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(403200536, 1) WINDOW:SelectChain(18049881, 0) WINDOW:DefaultCursor(1) end local id02 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() return id02 end function seikakushindan03(rand) if rand == 0 then WINDOW:SysMsg(708720794) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(858065371, 1) WINDOW:SelectChain(2086969116, 0) WINDOW:DefaultCursor(1) else WINDOW:SysMsg(1702866525) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(1314061726, 1) WINDOW:SelectChain(1464454367, 0) WINDOW:DefaultCursor(1) end local id03 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() return id03 end function seikakushindan04(rand) if rand == 0 then WINDOW:SysMsg(-791556080) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-909450927, 1) WINDOW:SelectChain(-1598800515, 0) WINDOW:DefaultCursor(1) else WINDOW:SysMsg(-1179710404) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-1836949505, 1) WINDOW:SelectChain(-1952878914, 0) WINDOW:DefaultCursor(1) end local id04 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() return id04 end function seikakushindan05(rand) if rand == 0 then WINDOW:SysMsg(-992413575) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-574371528, 1) WINDOW:SelectChain(-152134917, 0) WINDOW:DefaultCursor(1) else WINDOW:SysMsg(-269112390) WINDOW:SysMsg(1752020853) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(1903593012, 1) WINDOW:SelectChain(1029899716, 0) WINDOW:DefaultCursor(1) end local id05 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() return id05 end function seikakuhantei(sunny, calm, flexible, serious, cooperate) if sunny == 0 and calm == 0 and (flexible == 0 or flexible == 1) and serious == 1 and cooperate == 0 then basecharname = "KIMORI" persontype = "OTOKO" elseif sunny == 0 and calm == 0 and flexible == 1 and serious == 0 and cooperate == 0 then basecharname = "KEROMATSU" persontype = "OTOKO" elseif sunny == 1 and calm == 1 and flexible == 0 and serious == 0 and cooperate == 0 then basecharname = "HIKOZARU" persontype = "OTOKO" elseif sunny == 1 and calm == 0 and flexible == 1 and serious == 0 and (cooperate == 0 or cooperate == 1) then basecharname = "POTCHAMA" persontype = "OTOKO" elseif sunny == 0 and calm == 0 and flexible == 0 and serious == 0 and (cooperate == 0 or cooperate == 1) then basecharname = "NAETORU" persontype = "UGOKANAI" elseif sunny == 0 and calm == 0 and flexible == 1 and (serious == 0 or serious == 1) and cooperate == 1 then basecharname = "FUSHIGIDANE" persontype = "UGOKANAI" elseif sunny == 0 and calm == 1 and flexible == 0 and (serious == 0 or serious == 1) and cooperate == 0 then basecharname = "WANINOKO" persontype = "UGOKANAI" elseif sunny == 0 and calm == 1 and flexible == 0 and (serious == 0 or serious == 1) and cooperate == 1 then basecharname = "CHIKORIITA" persontype = "UGOKANAI" elseif sunny == 0 and calm == 0 and flexible == 0 and serious == 1 and cooperate == 1 then basecharname = "PIKACHUU" persontype = "YOIKO" elseif sunny == 1 and calm == 0 and flexible == 1 and serious == 1 and cooperate == 0 then basecharname = "HITOKAGE" persontype = "YOIKO" elseif sunny == 0 and calm == 1 and flexible == 1 and (serious == 0 or serious == 1) and cooperate == 0 then basecharname = "RIORU" persontype = "YOIKO" elseif sunny == 1 and calm == 0 and flexible == 1 and serious == 1 and cooperate == 1 then basecharname = "ACHAMO" persontype = "YOIKO" elseif sunny == 1 and calm == 0 and flexible == 0 and serious == 0 and (cooperate == 0 or cooperate == 1) then basecharname = "MIJUMARU" persontype = "OCHITSUKI" elseif sunny == 1 and calm == 0 and flexible == 0 and serious == 1 and (cooperate == 0 or cooperate == 1) then basecharname = "FOKKO" persontype = "OCHITSUKI" elseif sunny == 1 and calm == 1 and flexible == 1 and serious == 0 and cooperate == 0 then basecharname = "TSUTAAJA" persontype = "OCHITSUKI" elseif sunny == 1 and calm == 1 and (flexible == 0 or flexible == 1) and serious == 1 and cooperate == 0 then basecharname = "HARIMARON" persontype = "OCHITSUKI" elseif sunny == 0 and calm == 1 and flexible == 1 and serious == 0 and cooperate == 1 then basecharname = "HINOARASHI" persontype = "YUTTARI" elseif sunny == 1 and calm == 1 and flexible == 0 and (serious == 0 or serious == 1) and cooperate == 1 then basecharname = "ZENIGAME" persontype = "YUTTARI" elseif sunny == 0 and calm == 1 and flexible == 1 and serious == 1 and cooperate == 1 then basecharname = "POKABU" persontype = "YUTTARI" elseif sunny == 1 and calm == 1 and flexible == 1 and (serious == 0 or serious == 1) and cooperate == 1 then basecharname = "MIZUGOROU" persontype = "YUTTARI" else WINDOW:SysMsg(611857541) end return basecharname, persontype end function seikakushindan06(persontype) if persontype == "OTOKO" then WINDOW:SysMsg(257255238) WINDOW:SysMsg(374232583) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(1494204608, 1) WINDOW:SelectChain(1075114369, 0) WINDOW:SelectChain(1798939202, 2) WINDOW:SelectChain(1914868483, 3) WINDOW:DefaultCursor(1) local select01 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if select01 == 1 then charname = #Starter485# chartype = "MIZU" elseif select01 == 2 then charname = #Starter482# chartype = "HONOO" elseif select01 == 3 then charname = #Starter322# chartype = "KUSA" else charname = #Starter772# chartype = "MIZU" end elseif persontype == "UGOKANAI" then WINDOW:SysMsg(-172322868) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-324944243, 1) WINDOW:SelectChain(-2048957791, 0) WINDOW:SelectChain(-1664855072, 2) WINDOW:SelectChain(-1209466845, 3) WINDOW:DefaultCursor(1) local select02 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if select02 == 1 then charname = #Starter197# chartype = "KUSA" elseif select02 == 2 then charname = #Starter479# chartype = "KUSA" elseif select02 == 3 then charname = #Starter203# chartype = "MIZU" else charname = #Starter1# chartype = "KUSA" end elseif persontype == "YOIKO" then WINDOW:SysMsg(-1359859358) WINDOW:SysMsg(-508319835) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-123169052, 1) WINDOW:SelectChain(-746207961, 0) WINDOW:SelectChain(-895552410, 2) WINDOW:SelectChain(1292298409, 3) WINDOW:DefaultCursor(1) local select03 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if select03 == 1 then charname = #Starter30# chartype = "DENKI" elseif select03 == 2 then charname = #Starter325# chartype = "HONOO" elseif select03 == 3 then charname = #Starter537# chartype = "KAKUTOU" else charname = #Starter5# chartype = "HONOO" end elseif persontype == "OCHITSUKI" then WINDOW:SysMsg(1411242472) WINDOW:SysMsg(-1754608305) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-1905132530, 1) WINDOW:SelectChain(-1520652339, 0) WINDOW:SelectChain(-1136157044, 2) WINDOW:SelectChain(-217708469, 3) WINDOW:DefaultCursor(1) local select04 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if select04 == 1 then charname = #Starter598# chartype = "MIZU" elseif select04 == 2 then charname = #Starter592# chartype = "KUSA" elseif select04 == 3 then charname = #Starter766# chartype = "KUSA" else charname = #Starter769# chartype = "HONOO" end elseif persontype == "YUTTARI" then WINDOW:SysMsg(-367183606) WINDOW:SysMsg(-1053791543) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-668247160, 1) WINDOW:SelectChain(1605584711, 0) WINDOW:SelectChain(1185445382, 2) WINDOW:SelectChain(802597418, 3) WINDOW:DefaultCursor(1) local select05 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if select05 == 1 then charname = #Starter200# chartype = "HONOO" elseif select05 == 2 then charname = #Starter595# chartype = "HONOO" elseif select05 == 3 then charname = #Starter329# chartype = "MIZU" else charname = #Starter10# chartype = "MIZU" end end return charname, chartype end function seikakushindan07(chartype, charname) WINDOW:SysMsg(919444331) if chartype == "KAKUTOU" then halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(501270696, 1) WINDOW:SelectChain(83622377, 0) WINDOW:SelectChain(1270509358, 2) WINDOW:SelectChain(1386307183, 3) WINDOW:DefaultCursor(1) local pselect01 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if pselect01 == 0 then pertnername = #Starter769# elseif pselect01 == 1 then pertnername = #Starter772# elseif pselect01 == 2 then pertnername = #Starter766# else pertnername = #Starter30# end elseif chartype == "DENKI" then halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(2039221676, 1) WINDOW:SelectChain(1620524269, 0) WINDOW:SelectChain(-418439134, 2) WINDOW:SelectChain(-32239261, 3) WINDOW:DefaultCursor(1) local pselect02 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if pselect02 == 0 then pertnername = #Starter769# elseif pselect02 == 1 then pertnername = #Starter772# elseif pselect02 == 2 then pertnername = #Starter766# else pertnername = #Starter537# end elseif chartype == "MIZU" then local rand01 = SYSTEM:GetRandomValue(0, 2) if rand01 == 0 then halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(2008398460, 1) WINDOW:SelectChain(1856932669, 0) WINDOW:SelectChain(1166268670, 2) WINDOW:SelectChain(1553525183, 3) WINDOW:DefaultCursor(1) local pselect03 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if pselect03 == 0 then pertnername = #Starter537# elseif pselect03 == 1 then pertnername = #Starter482# elseif pselect03 == 2 then pertnername = #Starter325# else pertnername = #Starter769# end else halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(333021048, 1) WINDOW:SelectChain(180506169, 0) WINDOW:SelectChain(569318906, 2) WINDOW:SelectChain(955526331, 3) WINDOW:DefaultCursor(1) local pselect04 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if pselect04 == 0 then pertnername = #Starter200# elseif pselect04 == 1 then pertnername = #Starter5# elseif pselect04 == 2 then pertnername = #Starter595# else pertnername = #Starter30# end end elseif chartype == "HONOO" then local rand01 = SYSTEM:GetRandomValue(0, 2) if rand01 == 0 then halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-1083428748, 1) WINDOW:SelectChain(-1502150347, 0) WINDOW:SelectChain(-821437159, 2) WINDOW:SelectChain(-703402920, 3) WINDOW:DefaultCursor(1) local pselect05 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() local rand01 = SYSTEM:GetRandomValue(0, 2) if pselect05 == 0 then pertnername = #Starter479# elseif pselect05 == 1 then pertnername = #Starter537# elseif pselect05 == 2 then pertnername = #Starter197# else pertnername = #Starter766# end else halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-46153829, 1) WINDOW:SelectChain(-467366182, 0) WINDOW:SelectChain(-1419438051, 2) WINDOW:SelectChain(-1300354724, 3) WINDOW:DefaultCursor(1) local pselect06 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if pselect06 == 0 then pertnername = #Starter322# elseif pselect06 == 1 then pertnername = #Starter592# elseif pselect06 == 2 then pertnername = #Starter1# else pertnername = #Starter30# end end elseif chartype == "KUSA" then local rand01 = SYSTEM:GetRandomValue(0, 2) if rand01 == 0 then halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(-1722582369, 1) WINDOW:SelectChain(-2142745634, 0) WINDOW:SelectChain(131094289, 2) WINDOW:SelectChain(516646480, 3) WINDOW:DefaultCursor(1) local pselect07 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if pselect07 == 0 then pertnername = #Starter30# elseif pselect07 == 1 then pertnername = #Starter772# elseif pselect07 == 2 then pertnername = #Starter485# else pertnername = #Starter598# end else halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(296644121, 1) WINDOW:SelectChain(146104152, 0) WINDOW:SelectChain(597167259, 2) WINDOW:SelectChain(981679578, 3) WINDOW:DefaultCursor(1) local pselect08 = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if pselect08 == 0 then pertnername = #Starter329# elseif pselect08 == 1 then pertnername = #Starter10# elseif pselect08 == 2 then pertnername = #Starter537# else pertnername = #Starter203# end end end return pertnername end function seikakushindan08() WINDOW:SysMsg(1975692061) halfFadeIn() WINDOW:SelectStart() WINDOW:SelectChain(1826200156, 0) WINDOW:SelectChain(1207224735, 1) WINDOW:DefaultCursor(0) local selectgender = WINDOW:SelectEndNotPlayDecideSe(MENU_SELECT_MODE.DISABLE_CANCEL) halfFadeOut() if selectgender == 0 then pertnergender = "BOY" else pertnergender = "GIRL" end return pertnergender end function halfFadeIn() SCREEN_A:FadeChange(Level(0), Level(0.75), TimeSec(0.3), true) end function halfFadeOut() SCREEN_A:FadeChange(Level(0.75), Level(0), TimeSec(0.3), false) end function PlaySe_Select() SOUND:StopSe(SymSnd("SE_EVT_LIGHT")) SOUND:PlaySe(SymSnd("SE_EVT_LIGHT"), Volume(256)) end function PlaySe_BoostA() SOUND:PlaySe(SymSnd("SE_EVT_LIGHT_BOOST"), Volume(190)) end function PlaySe_BoostB() SOUND:PlaySe(SymSnd("SE_EVT_LIGHT_BOOST_TAKE02"), Volume(190)) end function PlaySe_WhiteOut() SOUND:PlaySe(SymSnd("SE_EVT_SHINDAN_END"), Volume(256)) end function PlaySe_SeikakuEnd() SOUND:PlaySe(SymSnd("SE_EVT_V_WAVE"), Volume(256)) end
local install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' if vim.fn.empty(vim.fn.glob(install_path)) > 0 then vim.fn.system({ 'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path }) vim.api.nvim_command('packadd packer.nvim') end local use = require('packer').use require('packer').startup(function() -- Packer use 'wbthomason/packer.nvim' -- Styling use { 'dracula/vim', config = function() vim.cmd[[ colorscheme dracula ]] end } use { 'norcalli/nvim-colorizer.lua', config = function() require('colorizer').setup() end } -- Pug use 'digitaltoad/vim-pug' -- Git use 'tpope/vim-fugitive' use 'airblade/vim-gitgutter' -- Finder use { 'nvim-telescope/telescope.nvim', run = 'vim.cmd[[TSUpdate]]', requires = { 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim', }, config = function() require('telescope').setup { defaults = { file_ignore_patterns = { '.git', 'node_modules', }, } } end } use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', config = function() require('telescope').load_extension('fzf') end } -- LSP use { 'neovim/nvim-lspconfig', config = function() local nvim_lsp = require('lspconfig') local servers = { 'bashls', 'cssls', 'dockerls', 'html', 'ocamlls', 'pyright', 'svelte', 'vimls', } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup {} end -- https://phelipetls.github.io/posts/configuring-eslint-to-work-with-neovim-lsp/ local function set_lsp_config(client) if client.resolved_capabilities.document_formatting then vim.cmd[[ autocmd! BufWritePre <buffer> lua vim.lsp.buf.formatting_sync(nil, 300) ]] end end nvim_lsp.tsserver.setup { on_attach = function(client) if client.config.flags then client.config.flags.allow_incremental_sync = true end client.resolved_capabilities.document_formatting = false set_lsp_config(client) end } local eslint = { lintCommand = 'eslint_d -f unix --stdin --stdin-filename ${INPUT}', lintStdin = true, lintFormats = { '%f:%l:%c: %m', }, lintIgnoreExitCode = true, formatCommand = 'eslint_d --fix-to-stdout --stdin --stdin-filename=${INPUT}', formatStdin = true, } nvim_lsp.efm.setup { on_attach = function(client) client.resolved_capabilities.document_formatting = true client.resolved_capabilities.goto_definition = false set_lsp_config(client) end, rootMarkers = { '.git/' }, settings = { languages = { javascript = { eslint }, javascriptreact = { eslint }, ['javascript.jsx'] = { eslint }, typescript = { eslint }, typescriptreact = { eslint }, ['typescript.jsx'] = { eslint }, }, }, filetypes = { 'javascript', 'javascriptreact', 'javascript.jsx', 'typescript', 'typescript.tsx', 'typescriptreact', }, } end } -- Treesitter for fancy syntax use { 'nvim-treesitter/nvim-treesitter', config = function() require('nvim-treesitter.configs').setup { ensure_installed = 'maintained', ignore_install = {}, highlight = { enable = true, use_languagetree = true, }, indent = { enable = true, }, } end } -- Comments -- visual mode = gc = comment use 'tpope/vim-commentary' -- Status line use { 'hoob3rt/lualine.nvim', config = function() -- Get character under cursor local get_hex = function() local hex = vim.api.nvim_exec([[ ascii ]], true) if hex == nil then return 'nil' end hex = hex:match(', Hex ([^,]+)') if hex == nil then return 'nil' end return '0x' .. hex end require('lualine').setup { options = { icons_enabled = false, component_separators = '|', section_separators = '', theme = 'dracula', }, sections = { lualine_b = { 'fugitive#head' }, lualine_y = { { 'diagnostics', sources = { 'nvim_diagnostic' }, symbols = { error = ' ', warn = ' ', info = ' ' }, color_error = '#ea51b2', color_warn = '#00f769', color_info = '#a1efe4', }, get_hex, }, }, } end } -- Icons use { 'kyazdani42/nvim-web-devicons', config = function() require('nvim-web-devicons').setup { default = true, override = { ['.conkyrc'] = { icon = '', color = '#6d8086', name = 'Conkyrc' }, ['.xinitrc'] = { icon = '', color = '#6d8086', name = 'Xinitrc' }, ['.Xresources'] = { icon = '', color = '#6d8086', name = 'XResources', }, } } end } -- File browser use { 'kyazdani42/nvim-tree.lua', config = function() require('nvim-tree').setup { auto_close = true, } vim.g.nvim_tree_show_icons = { git = 0, folders = 1, files = 1, } vim.g.nvim_tree_special_files = { Makefile = false, ['Cargo.toml'] = false, ['README.md'] = false, ['readme.md'] = false, } end } -- Diagnostics use { 'folke/trouble.nvim', config = function() require('trouble').setup {} end } end, { display = { open_fn = require('packer.util').float, } }) -- Spaces vim.opt.expandtab = true vim.opt.shiftwidth = 2 vim.opt.softtabstop = 2 vim.opt.tabstop = 2 vim.opt.numberwidth = 4 -- Completion vim.opt.completeopt = 'menuone,noselect' -- Just have a sign column ready vim.opt.signcolumn = 'yes' -- Searching vim.opt.ignorecase = true vim.opt.smartcase = true vim.opt.showmatch = true vim.opt.incsearch = true -- Annoying backup stuff vim.opt.backup = false vim.opt.writebackup = false vim.opt.history = 10000 vim.opt.hidden = true -- Line numbers vim.opt.number = true -- Undo vim.opt.undofile = true vim.opt.undodir = os.getenv('HOME') .. '/.local/share/nvim/undo' -- Ignore vim.opt.wildignore = '*/node_modules/*,*/elm-stuff/*' -- Leader vim.g.mapleader = ',' -- Cursor lines are nice vim.opt.cursorline = true -- Paste vim.opt.pastetoggle = '<F2>' vim.opt.clipboard = 'unnamed' -- Regex vim.opt.re = 0 -- Colors vim.opt.termguicolors = true vim.opt.background = 'dark' -- SQL has a massive slowdown for me vim.g.omni_sql_no_default_maps = true local maps = { i = { ['<C-c>'] = '<Esc>', }, n = { [':'] = ';', [';'] = ':', ['<C-n>'] = '<cmd>NvimTreeToggle<cr>', ['<C-p>'] = '<cmd>Telescope find_files<cr>', ['<leader>D'] = '<cmd>lua vim.lsp.buf.type_definition()<cr>', ['<leader>a'] = '<cmd>Telescope live_grep<cr>', ['<leader>b'] = '<cmd>Telescope buffers<cr>', ['<leader>e'] = '<cmd>TroubleToggle workspace_diagnostics<cr>', ['<leader>f'] = '<cmd>lua vim.lsp.buf.formatting()<cr>', ['<leader>gd'] = '<cmd>Gdiff<cr>', ['<leader>gs'] = '<cmd>Gstatus<cr>', ['<leader>rn'] = '<cmd>lua vim.lsp.buf.rename()<cr>', ['K'] = '<cmd>lua vim.lsp.buf.hover()<cr>', -- Uppercase Y will grab entire line ['Y'] = 'yy', ['[d'] = '<cmd>lua vim.lsp.buf.goto_prev()<cr>', [']d'] = '<cmd>lua vim.lsp.buf.goto_next()<cr>', ['gd'] = '<cmd>lua vim.lsp.buf.definition()<cr>', ['gr'] = '<cmd>lua vim.lsp.buf.references()<cr>', -- Natural movement over visual lines ['j'] = 'gj', ['k'] = 'gk', }, v = { -- Sort lines under visual select ['<leader>s'] = ":'<,'>sort<cr>", }, [''] = { ['<space>'] = '@q', }, } for mode, mappings in pairs(maps) do for keys, mapping in pairs(mappings) do vim.api.nvim_set_keymap(mode, keys, mapping, { noremap = true }) end end -- Templates -- Go to line with %HERE% on it, thanks vim-template for idea -- Waiting on https://github.com/neovim/neovim/pull/12378 vim.cmd[[ function! Here() 0 if search('%HERE%', 'W') let l = line('.') let c = col('.') s/%HERE%//ge call cursor(l, c) endif endfunction augroup templates autocmd BufNewFile *.handlebars 0r ~/.vim/templates/skeleton.html | call Here() autocmd BufNewFile *.htm 0r ~/.vim/templates/skeleton.html | call Here() autocmd BufNewFile *.html 0r ~/.vim/templates/skeleton.html | call Here() autocmd BufNewFile *.py 0r ~/.vim/templates/skeleton.py | call Here() autocmd BufNewFile *.sh 0r ~/.vim/templates/skeleton.sh | call Here() augroup END ]]
---@class TooltipSide local TooltipSide = { Left = 0, Right = 1, Top = 2, Bottom = 3, } ---@class TooltipTextureAnchor local TooltipTextureAnchor = { LeftTop = 0, LeftCenter = 1, LeftBottom = 2, RightTop = 3, RightCenter = 4, RightBottom = 5, All = 6, } ---@class TooltipTextureRelativeRegion local TooltipTextureRelativeRegion = { LeftLine = 0, RightLine = 1, }
monitoring.wrap_global({"minetest", "add_node"}, "add_node")
local KantoMapSpawn = {} -- [zone] = {Morning, Day, Night} -- Morning, Day, Night -> 0 = false, 1 = true, 2 = ms KantoMapSpawn["Celadon City"] = { ["Water"] = { ["Grimer"] = {1,1,1}, ["Koffing"] = {1,1,1}, ["Muk"] = {1,1,1} }, ["Fishing"] = { ["Goldeen"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Poliwag"] = {0,0,1}, ["Slowpoke"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Cerulean City"] = { ["Water"] = { ["Goldeen"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Wooper"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Cinnabar Island"] = { ["Water"] = { ["Corsola"] = {1,1,0}, ["Goldeen"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Tentacool"] = {1,1,1} }, ["Fishing"] = { ["Magikarp"] = {0,0,1}, ["Staryu"] = {0,0,1} } } KantoMapSpawn["Cinnabar mansion 1"] = { ["Land"] = { ["Grimer"] = {1,1,1}, ["Growlithe"] = {1,1,1}, ["Koffing"] = {1,1,1}, ["Muk"] = {1,1,1}, ["Ponyta"] = {0,1,0}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Vulpix"] = {1,1,1}, ["Weezing"] = {1,1,1} } } KantoMapSpawn["Cinnabar mansion 2"] = { ["Land"] = { ["Grimer"] = {1,1,1}, ["Growlithe"] = {1,1,1}, ["Koffing"] = {1,1,1}, ["Muk"] = {1,1,1}, ["Ponyta"] = {0,1,0}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Vulpix"] = {1,1,1}, ["Weezing"] = {1,1,1} } } KantoMapSpawn["Cinnabar mansion 3"] = { ["Land"] = { ["Charmander"] = {1,1,1}, ["Grimer"] = {1,1,1}, ["Growlithe"] = {1,1,1}, ["Koffing"] = {1,1,1}, ["Magmar"] = {0,1,0}, ["Muk"] = {1,1,1}, ["Ponyta"] = {0,1,0}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Vulpix"] = {1,1,1}, ["Weezing"] = {1,1,1} } } KantoMapSpawn["Cinnabar mansion B1F"] = { ["Land"] = { ["Ditto"] = {1,1,0}, ["Grimer"] = {1,1,1}, ["Growlithe"] = {1,1,1}, ["Koffing"] = {1,1,1}, ["Magmar"] = {1,0,1}, ["Muk"] = {1,1,1}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Vulpix"] = {1,1,1}, ["Weezing"] = {1,1,1} } } KantoMapSpawn["Diamond Domain 1F"] = { ["Land"] = { ["Geodude"] = {1,1,1}, ["Makuhita"] = {1,1,1}, ["Mawile"] = {2,2,2}, ["Psyduck"] = {1,1,1}, ["Woobat"] = {1,1,1} }, ["Water"] = { ["Goldeen"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,1} } } KantoMapSpawn["Diamond Domain B1F"] = { ["Land"] = { ["Geodude"] = {1,1,1}, ["Makuhita"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Sableye"] = {1,1,1}, ["Woobat"] = {1,1,1} }, ["Water"] = { ["Goldeen"] = {1,1,1}, ["Seel"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,1} }, ["Fishing"] = { ["Clamperl"] = {1,1,1}, ["Shellder"] = {1,1,1}, ["Staryu"] = {1,1,1} } } KantoMapSpawn["Digletts Cave"] = { ["Land"] = { ["Diglett"] = {1,1,1}, ["Dugtrio"] = {1,1,1}, ["Sandshrew"] = {1,1,1} }, ["Dig"] = { } } KantoMapSpawn["Digletts Cave Entrance 1"] = { ["Land"] = { ["Diglett"] = {1,1,1}, ["Dugtrio"] = {1,1,1} } } KantoMapSpawn["Digletts Cave Entrance 2"] = { ["Land"] = { ["Diglett"] = {1,1,1}, ["Dugtrio"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Fuchsia City"] = { ["Water"] = { }, ["Fishing"] = { ["Goldeen"] = {1,1,1}, ["Gyarados"] = {1,1,1}, ["Horsea"] = {1,1,0}, ["Krabby"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Politoad"] = {2,2,2}, ["Poliwag"] = {1,0,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Love Island"] = { ["Land"] = { ["Bellosom"] = {1,1,1}, ["Deerling"] = {1,1,1}, ["Cleffa"] = {1,0,1}, ["Happiny"] = {1,0,0}, ["Igglypuff"] = {1,1,1}, ["Nidoran♀"] = {1,1,0}, ["Nidoran♂"] = {1,1,0}, ["Oddish"] = {0,0,1}, ["Pichu"] = {1,1,1}, ["Poochyena"] = {0,0,1}, ["Ralts"] = {0,1,0}, ["Togepi"] = {1,1,1}, ["Woobat"] = {1,1,1}, ["Tyrogue"] = {1,1,1}, ["Wynaut"] = {1,1,1}, }, ["Water"] = { ["Finneon"] = {0,0,1}, ["Luvdisc"] = {1,1,1}, ["Mantyke"] = {0,1,0}, ["Azurill"] = {1,1,1}, ["Corsola"] = {1,1,0}, ["Lapras"] = {0,0,1}, ["Poliwag"] = {0,0,1}, ["Seel"] = {0,0,1}, ["Slowpoke"] = {1,1,1}, ["Staryu"] = {0,0,2}, ["Tentacool"] = {1,1,1} }, ["Fishing"] = { ["Mantyke"] = {0,1,0}, ["Chinchou"] = {1,0,1}, ["Clamperl"] = {1,1,0} }, ["Headbut"] = { } } KantoMapSpawn["Mt. Moon 1F"] = { ["Land"] = { ["Clefairy"] = {1,1,0}, ["Geodude"] = {1,1,1}, ["Onix"] = {1,1,1}, ["Paras"] = {1,1,1}, ["Sandshrew"] = {1,1,1}, ["Sandslash"] = {1,1,1}, ["Zubat"] = {1,1,1} }, ["Dig"] = { } } KantoMapSpawn["Mt. Moon B1F"] = { ["Land"] = { ["Bronzor"] = {1,1,1}, ["Clefairy"] = {1,0,1}, ["Geodude"] = {1,1,1}, ["Paras"] = {1,1,1}, ["Sandshrew"] = {1,1,1}, ["Sandslash"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Mt. Moon B2F"] = { ["Land"] = { ["Chingling"] = {0,0,1}, ["Clefairy"] = {1,1,0}, ["Geodude"] = {1,1,1}, ["Onix"] = {1,1,1}, ["Paras"] = {1,1,1}, ["Sandshrew"] = {1,1,1}, ["Sandslash"] = {1,1,1}, ["Zubat"] = {1,1,1} }, ["Dig"] = { } } KantoMapSpawn["Pallet Town"] = { ["Water"] = { ["Tentacool"] = {1,1,1}, ["Tentacruel"] = {1,1,1} }, ["Fishing"] = { ["Chinchou"] = {1,1,1}, ["Goldeen"] = {1,1,0}, ["Chinchou"] = {1,1,1}, ["Lanturn"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Poliwag"] = {1,0,1}, ["Shellder"] = {1,0,0}, ["Staryu"] = {0,0,1} } } KantoMapSpawn["Pewter City"] = { ["Headbut"] = { } } KantoMapSpawn["Pokemon Tower 2F"] = { ["Land"] = { ["Cubone"] = {1,1,1}, ["Gastly"] = {1,1,1}, ["Haunter"] = {1,1,1}, ["Patrat"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Spinarak"] = {1,0,1} } } KantoMapSpawn["Pokemon Tower 3F"] = { ["Land"] = { ["Cubone"] = {1,1,1}, ["Gastly"] = {1,1,1}, ["Haunter"] = {1,1,1}, ["Patrat"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Spinarak"] = {1,0,1} } } KantoMapSpawn["Pokemon Tower 4F"] = { ["Land"] = { ["Cubone"] = {1,1,1}, ["Gastly"] = {1,1,1}, ["Haunter"] = {1,1,1}, ["Patrat"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Spinarak"] = {1,0,1} } } KantoMapSpawn["Pokemon Tower 5F"] = { ["Land"] = { ["Cubone"] = {1,1,1}, ["Duskull"] = {2,2,2}, ["Gastly"] = {1,1,1}, ["Haunter"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Spinarak"] = {1,0,1} } } KantoMapSpawn["Pokemon Tower 6F"] = { ["Land"] = { ["Cubone"] = {1,1,1}, ["Gastly"] = {1,1,1}, ["Haunter"] = {1,1,1}, ["Patrat"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Shuppet"] = {2,2,2}, ["Spinarak"] = {1,0,1} } } KantoMapSpawn["Pokemon Tower 7F"] = { ["Land"] = { ["Cubone"] = {1,1,1}, ["Duskull"] = {1,1,1}, ["Gastly"] = {1,1,1}, ["Haunter"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Spinarak"] = {1,0,1} } } KantoMapSpawn["Pokemon Tower B1"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B2"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B3"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B4"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B5"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B6"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B7"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B8"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B9"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B10"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B11"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B12"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B13"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B14"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B15"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B16"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B17"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B18"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B19"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B20"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B21"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B22"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B23"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B24"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B25"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B26"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B27"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B28"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower B29"] = { ["Land"] = { ["Gastly"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Pokemon Tower Underground"] = { ["Land"] = { ["Duskull"] = {0,0,2}, ["Gastly"] = {2,2,2}, ["Litwick"] = {2,2,2}, ["Misdreavus"] = {2,2,2}, ["Rattata"] = {2,2,2}, ["Shuppet"] = {2,2,2}, ["Spiritomb"] = {2,2,2}, ["Zubat"] = {2,2,2} } } KantoMapSpawn["Power Plant"] = { ["Land"] = { ["Electabuzz"] = {1,1,1}, ["Electrode"] = {1,1,1}, ["Grimer"] = {1,1,1}, ["Magnemite"] = {1,1,1}, ["Magneton"] = {1,1,1}, ["Muk"] = {1,1,1}, ["Pachirisu"] = {2,2,2}, ["Pikachu"] = {1,1,1}, ["Voltorb"] = {1,1,1} } } KantoMapSpawn["Rock Tunnel 1"] = { ["Land"] = { ["Cubone"] = {1,1,1}, ["Geodude"] = {1,1,1}, ["Golbat"] = {1,1,1}, ["Graveler"] = {1,1,1}, ["Kangaskhan"] = {2,2,0}, ["Machop"] = {0,1,0}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Teddiursa"] = {1,1,1}, ["Zubat"] = {1,1,1} }, ["Dig"] = { } } KantoMapSpawn["Rock Tunnel 2"] = { ["Land"] = { ["Cubone"] = {1,1,1}, ["Geodude"] = {1,1,1}, ["Golbat"] = {1,1,1}, ["Graveler"] = {1,1,1}, ["Onix"] = {1,1,1}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Teddiursa"] = {1,1,1}, ["Zubat"] = {1,1,1} }, ["Dig"] = { } } KantoMapSpawn["Route 1"] = { ["Land"] = { ["Furret"] = {1,1,0}, ["Hoothoot"] = {0,0,1}, ["Pidgey"] = {1,1,0}, ["Rattata"] = {1,1,1}, ["Sentret"] = {1,1,0}, ["Shinx"] = {2,2,2}, ["Spinarak"] = {1,0,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 2"] = { ["Land"] = { ["Beedrill"] = {1,0,0}, ["Butterfree"] = {1,0,0}, ["Caterpie"] = {1,0,0}, ["Hoothoot"] = {1,0,1}, ["Kakuna"] = {1,1,0}, ["Metapod"] = {1,1,0}, ["Pidgey"] = {1,1,1}, ["Snubull"] = {0,0,1}, ["Spinarak"] = {1,0,1}, ["Tailow"] = {2,0,0}, ["Weedle"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 3"] = { ["Land"] = { ["Arbok"] = {1,1,0}, ["Ekans"] = {1,1,0}, ["Jigglypuff"] = {1,1,0}, ["Mankey"] = {1,1,1}, ["Nidoran♀"] = {0,1,0}, ["Nidoran♂"] = {0,0,1}, ["Rattata"] = {1,1,1}, ["Sandshrew"] = {1,1,0}, ["Spearow"] = {1,1,0}, ["Zubat"] = {0,0,1} }, ["Headbut"] = { }, ["Dig"] = { } } KantoMapSpawn["Route 4"] = { ["Land"] = { ["Arbok"] = {1,1,0}, ["Ekans"] = {1,1,0}, ["Hoothoot"] = {0,0,1}, ["Jigglypuff"] = {1,1,1}, ["Linoone"] = {1,1,1}, ["Pineco"] = {0,0,2}, ["Rattata"] = {1,1,1}, ["Spearow"] = {1,1,1}, ["Zubat"] = {0,0,1} }, ["Water"] = { ["Buizel"] = {2,2,2}, ["Magikarp"] = {1,1,1}, ["Poliwag"] = {1,1,1}, ["Slowpoke"] = {1,1,1}, ["Zubat"] = {0,0,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 5"] = { ["Land"] = { ["Abra"] = {1,1,1}, ["Bellsprout"] = {1,1,0}, ["Gloom"] = {0,0,1}, ["Meowth"] = {0,0,1}, ["Oddish"] = {0,0,1}, ["Pidgey"] = {1,1,0}, ["Pineco"] = {0,0,1}, ["Shinx"] = {0,2,0} }, ["Headbut"] = { } } KantoMapSpawn["Route 6"] = { ["Land"] = { ["Abra"] = {1,1,1}, ["Bellsprout"] = {1,1,0}, ["Drowzee"] = {0,0,1}, ["Jigglypuff"] = {1,1,1}, ["Magnemite"] = {1,1,1}, ["Meowth"] = {0,0,1}, ["Oddish"] = {0,0,1}, ["Pidgeotto"] = {1,0,0}, ["Pidgey"] = {1,1,0}, ["Psyduck"] = {0,1,0} }, ["Water"] = { ["Golduck"] = {1,1,1}, ["Poliwag"] = {0,0,1}, ["Psyduck"] = {0,1,0}, ["Slowpoke"] = {1,1,1} }, ["Fishing"] = { ["Buizel"] = {2,2,2}, ["Goldeen"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Shellder"] = {1,1,0} }, ["Headbut"] = { } } KantoMapSpawn["Route 7"] = { ["Land"] = { ["Abra"] = {0,1,0}, ["Bellsprout"] = {0,1,0}, ["Growlithe"] = {1,1,1}, ["Houndour"] = {1,0,1}, ["Meowth"] = {1,0,1}, ["Murkrow"] = {0,0,1}, ["Persian"] = {0,0,1}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Spearow"] = {1,1,0}, ["Vulpix"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 8"] = { ["Land"] = { ["Abra"] = {0,1,0}, ["Ekans"] = {1,1,0}, ["Growlithe"] = {1,1,1}, ["Haunter"] = {0,0,1}, ["Jigglypuff"] = {1,1,0}, ["Kadabra"] = {0,1,0}, ["Meowth"] = {1,0,1}, ["Minun"] = {2,2,2}, ["Noctowl"] = {0,0,1}, ["Pidgeotto"] = {1,1,0}, ["Plusle"] = {2,2,2}, ["Sandshrew"] = {1,1,1}, ["Vulpix"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 9"] = { ["Land"] = { ["Fearow"] = {1,1,0}, ["Mankey"] = {1,1,1}, ["Nidoran♀"] = {0,2,0}, ["Nidoran♂"] = {2,0,2}, ["Nidorina"] = {1,0,0}, ["Nidorino"] = {1,0,0}, ["Pidgey"] = {1,1,0}, ["Primeape"] = {2,2,2}, ["Sableye"] = {0,0,2}, ["Sandshrew"] = {1,1,1}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Venomoth"] = {0,0,1}, ["Venonat"] = {0,0,1}, ["Zubat"] = {0,0,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 10"] = { ["Land"] = { ["Dedenne"] = {2,2,2}, ["Electabuzz"] = {1,1,1}, ["Fearow"] = {1,1,0}, ["Machop"] = {1,1,1}, ["Magnemite"] = {1,1,1}, ["Marowak"] = {1,1,0}, ["Nidoran♀"] = {1,1,1}, ["Nidoran♂"] = {1,1,1}, ["Raticate"] = {1,1,1}, ["Sandshrew"] = {1,1,1}, ["Spearow"] = {1,1,0}, ["Venomoth"] = {0,0,1}, ["Venonat"] = {0,0,1}, ["Voltorb"] = {1,1,1}, ["Zubat"] = {1,1,1} }, ["Water"] = { ["Buizel"] = {1,1,1}, ["Goldeen"] = {1,1,1}, ["Kingler"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Seaking"] = {1,1,1}, ["Tentacool"] = {1,1,1}, ["Quagsire"] = {1,1,1}, }, ["Fishing"] = { ["Horsea"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Poliwag"] = {1,0,1}, ["Poliwhirl"] = {0,0,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,0,0} }, ["Headbut"] = { } } KantoMapSpawn["Route 11"] = { ["Land"] = { ["Drowzee"] = {1,1,0}, ["Ekans"] = {1,1,1}, ["Hoppip"] = {1,1,0}, ["Hypno"] = {1,0,1}, ["Magnemite"] = {0,1,0}, ["Meowth"] = {1,0,1}, ["Noctowl"] = {0,0,1}, ["Pidgeotto"] = {1,1,0}, ["Pidgey"] = {1,1,0}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,0,0}, ["Sandshrew"] = {0,1,0}, ["Snorlax"] = {2,2,2}, ["Spearow"] = {1,1,0} }, ["Water"] = { ["Krabby"] = {1,1,1}, ["Tentacool"] = {1,1,1} }, ["Fishing"] = { ["Goldeen"] = {1,1,1}, ["Gyarados"] = {1,1,1}, ["Horsea"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Poliwag"] = {0,0,1}, ["Psyduck"] = {1,1,1}, ["Seaking"] = {1,1,1}, ["Shellder"] = {0,0,1}, ["Slowpoke"] = {1,0,0} }, ["Headbut"] = { } } KantoMapSpawn["Route 12"] = { ["Land"] = { ["Bellsprout"] = {1,1,1}, ["Gloom"] = {0,0,1}, ["Oddish"] = {0,0,1}, ["Pidgeotto"] = {1,0,0}, ["Pidgey"] = {1,1,1}, ["Snorlax"] = {1,1,1}, ["Tangela"] = {0,1,0}, ["Venonat"] = {0,0,1}, ["Weepinbell"] = {1,1,1} }, ["Water"] = { ["Quagsire"] = {0,0,1}, ["Slowbro"] = {1,1,1}, ["Slowpoke"] = {1,1,1}, ["Tentacool"] = {1,1,1}, ["Tentacruel"] = {1,1,1} }, ["Fishing"] = { ["Goldeen"] = {1,1,1}, ["Horsea"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Poliwag"] = {0,0,1}, ["Seadra"] = {1,1,1}, ["Qwilfish"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 13"] = { ["Land"] = { ["Bellsprout"] = {1,1,0}, ["Chansey"] = {1,1,1}, ["Ditto"] = {1,1,1}, ["Ducklet"] = {2,2,0}, ["Farfetch'd"] = {1,1,0}, ["Gloom"] = {0,0,1}, ["Hoppip"] = {1,1,0}, ["Nidorina"] = {1,1,1}, ["Nidorino"] = {0,1,0}, ["Oddish"] = {0,0,1}, ["Pidgeotto"] = {1,1,0}, ["Quagsire"] = {1,0,1}, ["Venomoth"] = {1,0,1}, ["Venonat"] = {1,1,1}, ["Weepinbell"] = {1,1,0} }, ["Water"] = { ["Krabby"] = {1,1,1}, ["Psyduck"] = {0,1,0}, ["Quagsire"] = {1,0,1}, ["Qwilfish"] = {2,2,2}, ["Slowbro"] = {1,0,0}, ["Slowpoke"] = {1,1,1}, ["Tentacool"] = {1,1,1}, ["Tentacruel"] = {0,0,1} }, ["Fishing"] = { ["Horsea"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Seadra"] = {1,1,0} }, ["Headbut"] = { } } KantoMapSpawn["Route 14"] = { ["Land"] = { ["Chansey"] = {1,1,1}, ["Ditto"] = {2,2,2}, ["Farfetch'd"] = {1,1,1}, ["Hoppip"] = {1,1,0}, ["Nidorina"] = {1,1,0}, ["Nidorino"] = {1,1,0}, ["Noctowl"] = {0,0,1}, ["Pidgeotto"] = {1,1,0}, ["Quagsire"] = {1,1,0}, ["Skiploom"] = {1,1,0} }, ["Water"] = { }, ["Fishing"] = { ["Corsola"] = {1,1,0}, ["Goldeen"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Kingler"] = {0,1,0}, ["Magikarp"] = {1,1,1}, ["Staryu"] = {0,0,1} }, ["Headbut"] = { }, ["Dig"] = { } } KantoMapSpawn["Route 15"] = { ["Land"] = { ["Bellsprout"] = {1,1,0}, ["Ditto"] = {1,1,0}, ["Gloom"] = {1,0,1}, ["Hoppip"] = {1,1,0}, ["Minun"] = {1,1,1}, ["Nidorina"] = {1,1,0}, ["Nidorino"] = {1,1,0}, ["Noctowl"] = {0,0,1}, ["Oddish"] = {0,0,1}, ["Pidgeotto"] = {1,1,0}, ["Pidgey"] = {1,1,0}, ["Plusle"] = {1,1,1}, ["Quagsire"] = {1,0,1}, ["Tangela"] = {1,1,1}, ["Venomoth"] = {0,0,1}, ["Venonat"] = {0,0,1}, ["Weepinbell"] = {1,1,0} }, ["Headbut"] = { }, ["Dig"] = { } } KantoMapSpawn["Route 16"] = { ["Land"] = { ["Doduo"] = {1,1,0}, ["Fearow"] = {1,1,0}, ["Grimer"] = {1,1,1}, ["Murkrow"] = {0,0,1}, ["Pidgeotto"] = {1,0,1}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Slugma"] = {1,1,1}, ["Spearow"] = {1,1,0} }, ["Headbut"] = { } } KantoMapSpawn["Route 17"] = { ["Land"] = { ["Doduo"] = {1,1,0}, ["Fearow"] = {1,1,0}, ["Grimer"] = {1,1,1}, ["Muk"] = {1,1,1}, ["Ponyta"] = {0,1,0}, ["Raticate"] = {1,1,1}, ["Rattata"] = {0,1,0}, ["Slugma"] = {1,1,1}, ["Spearow"] = {1,1,0} }, ["Water"] = { ["Horsea"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,1}, ["Tentacool"] = {1,1,1} }, ["Fishing"] = { ["Chinchou"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Staryu"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 18"] = { ["Land"] = { ["Doduo"] = {1,1,1}, ["Fearow"] = {1,1,0}, ["Grimer"] = {1,1,1}, ["Muk"] = {1,1,1}, ["Murkrow"] = {0,0,1}, ["Raticate"] = {1,1,1}, ["Rattata"] = {0,0,1}, ["Slugma"] = {1,1,1}, ["Spearow"] = {1,1,0} }, ["Headbut"] = { } } KantoMapSpawn["Route 19"] = { ["Water"] = { ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,1}, ["Staryu"] = {1,1,1}, ["Tentacool"] = {1,1,1}, ["Tentacruel"] = {1,1,1} }, ["Fishing"] = { ["Corsola"] = {1,1,0}, ["Goldeen"] = {1,1,1}, ["Horsea"] = {1,1,1}, ["Kingler"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Shellder"] = {1,1,1}, ["Staryu"] = {0,0,2} }, ["Headbut"] = { } } KantoMapSpawn["Route 20"] = { ["Water"] = { ["Chinchou"] = {1,1,1}, ["Corsola"] = {1,1,0}, ["Horsea"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Tentacool"] = {1,1,1}, ["Tentacruel"] = {1,1,1} }, ["Fishing"] = { ["Gyarados"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Staryu"] = {1,1,1} } } KantoMapSpawn["Route 21"] = { ["Land"] = { ["Mr. Mime"] = {1,1,1}, ["Pidgeotto"] = {1,1,0}, ["Pidgey"] = {1,1,0}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Tangela"] = {0,1,0} }, ["Water"] = { ["Krabby"] = {1,1,1}, ["Lapras"] = {0,2,0}, ["Tentacool"] = {1,1,1}, ["Tentacruel"] = {1,1,1} }, ["Fishing"] = { ["Chinchou"] = {1,1,1}, ["Shellder"] = {1,1,1} } } KantoMapSpawn["Route 22"] = { ["Land"] = { ["Doduo"] = {1,1,0}, ["Hoothoot"] = {0,0,1}, ["Mankey"] = {1,1,1}, ["Nidoran♀"] = {1,1,1}, ["Nidoran♂"] = {1,1,1}, ["Poliwag"] = {0,0,1}, ["Ponyta"] = {0,1,0}, ["Rattata"] = {1,1,1}, ["Spearow"] = {1,1,0} }, ["Water"] = { ["Poliwag"] = {0,0,1}, ["Poliwhirl"] = {0,0,1}, ["Psyduck"] = {1,0,0} }, ["Fishing"] = { ["Goldeen"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Slowpoke"] = {1,1,0} } } KantoMapSpawn["Route 24"] = { ["Land"] = { ["Abra"] = {1,1,1}, ["Bellsprout"] = {1,1,0}, ["Gloom"] = {0,0,1}, ["Oddish"] = {0,0,1}, ["Pidgeotto"] = {1,1,0}, ["Pidgey"] = {1,1,0}, ["Sunkern"] = {1,0,0}, ["Venomoth"] = {1,0,1}, ["Venonat"] = {1,0,1}, ["Weepinbell"] = {1,1,1} }, ["Water"] = { ["Goldeen"] = {1,1,1}, ["Krabby"] = {1,1,1} }, ["Fishing"] = { ["Magikarp"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 25"] = { ["Land"] = { ["Abra"] = {2,0,2}, ["Bellsprout"] = {1,1,1}, ["Caterpie"] = {1,1,0}, ["Oddish"] = {1,0,1}, ["Pidgeotto"] = {0,0,1}, ["Pidgey"] = {1,1,1}, ["Caterpie"] = {1,1,0} }, ["Headbut"] = { } } KantoMapSpawn["Route 26"] = { ["Land"] = { ["Arbok"] = {1,1,0}, ["Dodrio"] = {1,1,0}, ["Doduo"] = {1,1,0}, ["Ponyta"] = {0,1,0}, ["Quagsire"] = {1,0,0}, ["Rattata"] = {1,1,1}, ["Sandslash"] = {1,1,1}, ["Wooper"] = {1,0,1} }, ["Water"] = { ["Shellos"] = {2,0,0}, ["Chinchou"] = {0,0,1}, ["Krabby"] = {1,1,1}, ["Tentacool"] = {1,1,1}, ["Tentacruel"] = {1,1,1} }, ["Fishing"] = { ["Horsea"] = {1,1,1}, ["Lanturn"] = {0,0,1}, ["Magikarp"] = {1,1,1}, ["Shellder"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Route 27"] = { ["Land"] = { ["Arbok"] = {1,1,0}, ["Dodrio"] = {1,1,0}, ["Doduo"] = {1,1,0}, ["Ponyta"] = {0,1,0}, ["Quagsire"] = {1,0,1}, ["Raticate"] = {1,1,1}, ["Sandslash"] = {1,1,1} }, ["Water"] = { ["Buizel"] = {0,1,0}, ["Luvdisc"] = {1,1,1}, ["Tentacool"] = {1,1,1}, ["Tentacruel"] = {1,1,1} }, ["Fishing"] = { ["Chinchou"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Safari Area 1"] = { ["Land"] = { ["Doduo"] = {1,1,0}, ["Exeggcute"] = {1,1,1}, ["Kangaskhan"] = {1,1,1}, ["Nidoran♀"] = {1,1,0}, ["Nidoran♂"] = {1,1,0}, ["Nidorina"] = {1,1,0}, ["Nidorino"] = {1,1,0}, ["Paras"] = {1,1,0}, ["Parasect"] = {1,1,1}, ["Pinsir"] = {1,1,1}, ["Scyther"] = {1,1,1} }, ["Water"] = { ["Goldeen"] = {1,1,0}, ["Krabby"] = {1,1,1}, ["Poliwag"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,1} }, ["Fishing"] = { ["Dratini"] = {1,1,0}, ["Magikarp"] = {1,1,1} } } KantoMapSpawn["Safari Area 2"] = { ["Land"] = { ["Bulbasaur"] = {1,1,1}, ["Chansey"] = {1,1,1}, ["Exeggcute"] = {1,1,1}, ["Nidoran♀"] = {1,1,1}, ["Nidoran♂"] = {1,1,0}, ["Nidorina"] = {1,1,0}, ["Nidorino"] = {1,1,0}, ["Paras"] = {1,1,1}, ["Rhyhorn"] = {1,1,1}, ["Tauros"] = {1,1,0}, ["Venomoth"] = {1,0,1} }, ["Water"] = { ["Krabby"] = {1,1,1}, ["Poliwag"] = {0,0,1}, ["Poliwhirl"] = {1,0,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,1} }, ["Fishing"] = { ["Dratini"] = {1,1,1}, ["Goldeen"] = {1,1,1}, ["Magikarp"] = {1,1,1} } } KantoMapSpawn["Safari Area 3"] = { ["Land"] = { ["Doduo"] = {1,1,0}, ["Eevee"] = {1,1,1}, ["Exeggcute"] = {1,1,1}, ["Nidorina"] = {1,1,0}, ["Nidorino"] = {1,1,0}, ["Paras"] = {1,1,1}, ["Snorlax"] = {1,1,1}, ["Tauros"] = {1,1,0}, ["Venonat"] = {1,0,1} }, ["Water"] = { ["Krabby"] = {1,1,1}, ["Poliwag"] = {1,0,1}, ["Politoed"] = {0,0,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,1} }, ["Fishing"] = { ["Dratini"] = {1,1,1}, ["Magikarp"] = {1,1,1} } } KantoMapSpawn["Safari Effort Wald 1"] = { ["Land"] = { ["Arbok"] = {1,1,1}, ["Bellossom"] = {1,1,0}, ["Drowzee"] = {1,1,1}, ["Duskull"] = {0,0,1}, ["Ekans"] = {1,1,1}, ["Fearow"] = {0,0,1}, ["Golbat"] = {0,0,1}, ["Hoppip"] = {1,1,0}, ["Hypno"] = {1,1,1}, ["Jumpluff"] = {1,1,0}, ["Ledyba"] = {1,1,1}, ["Mankey"] = {1,1,1}, ["Nidorino"] = {1,1,1}, ["Pidgeotto"] = {1,1,0}, ["Pidgey"] = {1,1,0}, ["Primape"] = {1,1,1}, ["Raticate"] = {1,1,1}, ["Spearow"] = {0,0,1}, ["Venonat"] = {1,0,1}, ["Victreebel"] = {1,1,0}, ["Weepinbell"] = {1,1,0} } } KantoMapSpawn["Safari Effort Wald 2"] = { ["Land"] = { ["Ampharos"] = {1,1,1}, ["Azumaril"] = {1,1,1}, ["Caterpie"] = {1,1,1}, ["Flaaffy"] = {1,1,0}, ["Gloom"] = {1,0,1}, ["Golduck"] = {1,1,1}, ["Jigglypuff"] = {1,1,1}, ["Kakuna"] = {1,1,0}, ["Metapod"] = {1,1,0}, ["Nidoran♀"] = {1,1,1}, ["Nidorina"] = {1,1,1}, ["Poliwrath"] = {0,0,1}, ["Psyduck"] = {1,1,1}, ["Quagsire"] = {0,0,1}, ["Sandshrew"] = {1,1,1}, ["Sandslash"] = {1,1,1}, ["Slowbro"] = {1,1,1}, ["Tangela"] = {1,1,1}, ["Vileplume"] = {1,0,1}, ["Wooper"] = {0,0,1} } } KantoMapSpawn["Safari Entrance"] = { ["Land"] = { ["Chansey"] = {1,1,1}, ["Doduo"] = {1,1,0}, ["Nidoran♀"] = {1,1,0}, ["Nidoran♂"] = {1,1,0}, ["Nidorina"] = {1,1,0}, ["Nidorino"] = {1,1,0}, ["Rhyhorn"] = {1,1,0}, ["Scyther"] = {1,1,1}, ["Venonat"] = {1,0,1} }, ["Water"] = { ["Krabby"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,1}, ["Dratini"] = {0,1,0} }, ["Fishing"] = { ["Goldeen"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Poliwag"] = {1,0,1}, ["Seaking"] = {1,1,1} } } KantoMapSpawn["Safari Exclusive"] = { ["Land"] = { ["Chansey"] = {2,2,2}, ["Exeggcute"] = {2,2,2}, ["Maril"] = {0,0,2}, ["Paras"] = {2,2,0}, ["Pinsir"] = {2,2,2}, ["Poliwag"] = {0,0,2}, ["Rhyhorn"] = {2,2,2}, ["Scyther"] = {2,2,2}, ["Starly"] = {2,2,2}, ["Umbreon"] = {0,0,2}, ["Venipede"] = {2,2,2}, ["Venonat"] = {2,0,2}, ["Wooper"] = {2,2,0}, }, ["Water"] = { ["Maril"] = {0,0,2}, ["Poliwag"] = {0,0,2}, ["Slowpoke"] = {2,2,2}, ["Wooper"] = {2,0,2} }, ["Fishing"] = { ["Dratini"] = {2,2,2} } } KantoMapSpawn["Seafoam 1F"] = { ["Land"] = { ["Golbat"] = {1,1,1}, ["Golduck"] = {1,1,1}, ["Makuhita"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Seafoam B1F"] = { ["Land"] = { ["Bronzor"] = {1,1,1}, ["Golbat"] = {1,1,1}, ["Golduck"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Seel"] = {1,1,1}, ["Vanillite"] = {2,2,2}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Seafoam B2F"] = { ["Land"] = { ["Chingling"] = {1,1,1}, ["Golbat"] = {1,1,1}, ["Makuhita"] = {1,1,1}, ["Seel"] = {1,1,1}, ["Smoochum"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Seafoam B3F"] = { ["Land"] = { ["Chingling"] = {1,1,1}, ["Golbat"] = {1,1,1}, ["Makuhita"] = {1,1,1}, ["Seel"] = {1,1,1}, ["Smoochum"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Seafoam B4F"] = { ["Land"] = { ["Bronzor"] = {1,1,1}, ["Cubchoo"] = {2,0,2}, ["Dewgong"] = {1,1,1}, ["Golbat"] = {1,1,1}, ["Golduck"] = {1,1,1}, ["Jynx"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Seel"] = {1,1,1} }, ["Water"] = { ["Dewgong"] = {1,1,1}, ["Golbat"] = {1,1,1}, ["Gyarados"] = {1,1,1}, ["Horsea"] = {1,1,1}, ["Lapras"] = {2,2,2}, ["Magikarp"] = {1,1,1}, ["Seadra"] = {1,1,1}, ["Seel"] = {1,1,1}, ["Psyduck"] = {1,1,1}, ["Slowbro"] = {1,1,1}, ["Slowpoke"] = {1,1,1}, ["Staryu"] = {1,0,1} }, ["Fishing"] = { ["Shellder"] = {1,1,1} } } KantoMapSpawn["Tohjo Falls"] = { ["Land"] = { ["Bronzor"] = {1,1,1}, ["Chingling"] = {1,1,1}, ["Golbat"] = {1,1,1}, ["Makuhita"] = {1,1,1}, ["Raticate"] = {1,1,1}, ["Rattata"] = {1,1,1}, ["Slowpoke"] = {1,1,1}, ["Zubat"] = {1,1,1} }, ["Water"] = { ["Goldeen"] = {1,1,1}, ["Seaking"] = {1,1,1} }, ["Fishing"] = { ["Magikarp"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Trainers Valley"] = { ["Land"] = { ["Duskull"] = {0,0,1}, ["Gastly"] = {0,0,1}, ["Grimer"] = {1,1,1}, ["Houndour"] = {0,0,1}, ["Koffing"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Meditite"] = {1,0,1}, ["Meowth"] = {1,1,1}, ["Ralts"] = {0,1,0}, ["Rattata"] = {1,1,1}, ["Shuckle"] = {1,1,1}, ["Shuppet"] = {0,0,1} }, ["Water"] = { ["Cosrola"] = {1,1,0}, ["Ducklett"] = {1,1,1}, ["Goldeen"] = {1,1,1}, ["Horsea"] = {1,1,1}, ["Krabby"] = {1,1,1}, ["Snubbull"] = {2,2,2}, ["Staryu"] = {0,0,1}, ["Tentacool"] = {1,1,1}, ["Wailmer"] = {1,1,1}, ["Wooper"] = {1,1,1} }, ["Fishing"] = { ["Chinchou"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Remoraid"] = {1,1,1}, ["Shellder"] = {1,1,1}, ["Staryu"] = {0,0,1} }, ["Headbut"] = { } } KantoMapSpawn["Vermilion City"] = { ["Water"] = { ["Horsea"] = {1,1,1}, ["Poliwag"] = {0,0,1}, ["Squirtle"] = {1,1,0}, ["Tentacool"] = {1,1,1}, ["Tentacruel"] = {1,1,1} }, ["Fishing"] = { ["Gyarados"] = {2,2,2}, ["Krabby"] = {1,1,1}, ["Magikarp"] = {1,1,1}, ["Psyduck"] = {1,1,0}, ["Slowpoke"] = {1,1,1}, ["Staryu"] = {0,0,2} }, ["Headbut"] = { } } KantoMapSpawn["Victory Road Kanto 1F"] = { ["Land"] = { ["Graveler"] = {1,1,1}, ["Machoke"] = {1,1,1}, ["Machop"] = {1,1,1}, ["Marowak"] = {1,1,1}, ["Onix"] = {1,1,1}, ["Roggenrola"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Victory Road Kanto 2F"] = { ["Land"] = { ["Drilbur"] = {2,2,2}, ["Golbat"] = {1,1,1}, ["Graveler"] = {1,1,1}, ["Machoke"] = {0,1,0}, ["Machop"] = {0,1,0}, ["Makuhita"] = {2,2,2}, ["Marowak"] = {1,1,1}, ["Numel"] = {2,2,2}, ["Onix"] = {1,1,1}, ["Primape"] = {1,1,1} } } KantoMapSpawn["Victory Road Kanto 3F"] = { ["Land"] = { ["Arbok"] = {1,1,0}, ["Bronzor"] = {1,1,1}, ["Donphan"] = {1,1,1}, ["Geodude"] = {1,1,1}, ["Graveler"] = {1,1,1}, ["Machoke"] = {0,1,0}, ["Machop"] = {0,1,0}, ["Makuhita"] = {2,2,2}, ["Marowak"] = {1,1,1}, ["Numel"] = {2,2,2}, ["Onix"] = {1,1,1}, ["Ursaring"] = {1,1,1}, ["Venomoth"] = {1,1,1}, ["Zubat"] = {1,1,1} } } KantoMapSpawn["Viridian Forest"] = { ["Land"] = { ["Beedrill"] = {1,0,0}, ["Budew"] = {1,1,0}, ["Butterfree"] = {1,0,0}, ["Caterpie"] = {1,1,0}, ["Hoothoot"] = {0,0,1}, ["Kakuna"] = {1,1,0}, ["Metapod"] = {1,1,0}, ["Pikachu"] = {1,1,1}, ["Spinarak"] = {1,0,1}, ["Weedle"] = {1,1,1} }, ["Headbut"] = { } } KantoMapSpawn["Viridian City"] = { ["Water"] = { ["Magikarp"] = {1,1,1}, ["Poliwag"] = {0,0,1} }, ["Fishing"] = { ["Poliwhirl"] = {0,0,1}, ["Psyduck"] = {1,1,1}, ["Slowpoke"] = {1,1,0}, ["Tentacool"] = {1,1,1} }, ["Headbut"] = { } } return KantoMapSpawn
--[[ Informations : DO NOT EDIT OR DELETE THIS FILE WITH YOUR MESSAGES, THEY WILL BE DELETED FOR EACH UPDATE !!! This file is only for demonstration prupose. If you want to create your own file, copy this file and name it "messages.lua" and keep the same structure. Message structure is like this : { MESSAGE, Time in seconds until the next message, Red Color, Green Color, Blue Color} Lang structure is like this: ["LANG"] = { MESSAGE structure, MESSAGE structure, etc... } For the LANG values, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 with all language in Garry's Mod After created your file you need to restart the server to take the changes. -- > For more informations or some help, you can go on https://github.com/iKlem/TAM < -- Author : iKlem Last modification : 21/08/2016 ]] TAM.messages = { ["FR"] = { {"---- [[ Addon TAM est installé avec succès ! ]] ----", 0, 255, 255, 255}, {"Bienvenue sur TAM !", 2, 255, 255, 255}, {"Ces messages sont la pour vous montrer comment fonctionne l'addon.", 5, 255, 255, 255}, {"Le temps d'un message peut être modifié comme pour la couleur.", 5, 255, 255, 255}, {"Voila ce message en bleu.", 3, 0, 64, 255}, {"Si vous souhaitez créer vos messages vous pouvez regarder dans \"messages.example.lua\" pour plus d'informations et des liens vers de l'aide.", 5, 255, 255, 255}, {"N.B. : Si vous êtes sur le serveur et que vous n'avez pas encore créer votre fichier de messages, vous verrez en boucle les messages précédent.", 5, 255, 100, 100} }, ["EN"] = { {"---- [[ TAM addon is correctly installed ! ]] ----", 0, 255, 255, 255}, {"Welcome with TAM !", 2, 255, 255, 255}, {"These messages are there to show how the addon works.", 5, 255, 255, 255}, {"The time between each message can be modified. Same for the color.", 5, 255, 255, 255}, {"This message is blue.", 3, 0, 0, 255}, {"If you want to create your own messages, please look at the file \"message.example.lua\" for informations and link to help.", 5, 255, 255, 255}, {"N.B. : IF you are on the server and you haven't created your own messages file, you will see in loop all the previous messages.", 5, 255, 128, 128} } }
--================================================================================================== -- Copyright (C) 2015 by Robert Machmer = -- = -- Permission is hereby granted, free of charge, to any person obtaining a copy = -- of this software and associated documentation files (the "Software"), to deal = -- in the Software without restriction, including without limitation the rights = -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell = -- copies of the Software, and to permit persons to whom the Software is = -- furnished to do so, subject to the following conditions: = -- = -- The above copyright notice and this permission notice shall be included in = -- all copies or substantial portions of the Software. = -- = -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR = -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, = -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE = -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER = -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, = -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN = -- THE SOFTWARE. = --================================================================================================== local BaseDecorator = require('ui.decorators.BaseDecorator'); local Resizable = {}; --- -- @param t - The class table. -- @param x - The position of the decorator on the x-axis relative to its parent. -- @param y - The position of the decorator on the y-axis relative to its parent. -- @param w - The width of the decorator relative to its parent. -- @param h - The height of the decorator relative to its parent. -- @param fixedW - Determines wether to lock the width of the decorator or not. -- @param fixedH - Determines wether to lock the height of the decorator or not. -- @param fixedPosX - Determines wether to lock the position of the decorator or not. -- @param fixedPosY - Determines wether to lock the position of the decorator or not. -- local function new(t, x, y, w, h, fixedW, fixedH, fixedPosX, fixedPosY) local self = BaseDecorator(); local resize = false; function self:mousepressed(mx, my, b) local px, py = self:getPosition(); local pw, ph = self:getDimensions(); if b == 'l' and px + x < mx and px + x + pw + w > mx and py + y < my and py + y + ph + h > my then resize = true; return; end self.child:mousepressed(mx, my, b); end function self:mousereleased(mx, my, b) resize = false; self.child:mousereleased(mx, my, b); end function self:mousemoved(mx, my, dx, dy) local px, py = self:getPosition(); if resize then local px, py = self:getPosition(); local pw, ph = self:getDimensions(); local w, h = mx - px, my - py; self:setDimensions(w, h); else self.child:mousemoved(mx, my, dx, dy) end end function self:setDimensions(nw, nh) local pw, ph = self:getDimensions(); if fixedW then w = w + (pw - nw) end if fixedH then h = h + (ph - nh) end if fixedPosX then x = x - (pw - nw) end if fixedPosY then y = y - (ph - nh) end self.child:setDimensions(nw, nh); end return self; end return setmetatable(Resizable, { __call = new });
--[[ LuCI - Lua Configuration Interface Copyright 2019 lisaac <https://github.com/lisaac/luci-app-dockerman> ]]-- local http = require "luci.http" local docker = require "luci.model.docker" local m, s, o local images, networks, containers, res local dk = docker.new() res = dk.images:list() if res.code <300 then images = res.body else return end res = dk.networks:list() if res.code <300 then networks = res.body else return end res = dk.containers:list({ query = { all=true } }) if res.code <300 then containers = res.body else return end local urlencode = luci.http.protocol and luci.http.protocol.urlencode or luci.util.urlencode function get_containers() local data = {} if type(containers) ~= "table" then return nil end for i, v in ipairs(containers) do local index = v.Id data[index]={} data[index]["_selected"] = 0 data[index]["_id"] = v.Id:sub(1,12) data[index]["_name"] = v.Names[1]:sub(2) data[index]["_status"] = v.Status if v.Status:find("^Up") then data[index]["_status"] = '<font color="green">'.. data[index]["_status"] .. "</font>" else data[index]["_status"] = '<font color="red">'.. data[index]["_status"] .. "</font>" end if (type(v.NetworkSettings) == "table" and type(v.NetworkSettings.Networks) == "table") then for networkname, netconfig in pairs(v.NetworkSettings.Networks) do data[index]["_network"] = (data[index]["_network"] ~= nil and (data[index]["_network"] .." | ") or "").. networkname .. (netconfig.IPAddress ~= "" and (": " .. netconfig.IPAddress) or "") end end if v.Ports and next(v.Ports) ~= nil then data[index]["_ports"] = nil for _,v2 in ipairs(v.Ports) do data[index]["_ports"] = (data[index]["_ports"] and (data[index]["_ports"] .. ", ") or "") .. ((v2.PublicPort and v2.Type and v2.Type == "tcp") and ('<a href="javascript:void(0);" onclick="window.open((window.location.origin.match(/^(.+):\\d+$/) && window.location.origin.match(/^(.+):\\d+$/)[1] || window.location.origin) + \':\' + '.. v2.PublicPort ..', \'_blank\');">') or "") .. (v2.PublicPort and (v2.PublicPort .. ":") or "") .. (v2.PrivatePort and (v2.PrivatePort .."/") or "") .. (v2.Type and v2.Type or "") .. ((v2.PublicPort and v2.Type and v2.Type == "tcp")and "</a>" or "") end end for ii,iv in ipairs(images) do if iv.Id == v.ImageID then data[index]["_image"] = iv.RepoTags and iv.RepoTags[1] or (iv.RepoDigests[1]:gsub("(.-)@.+", "%1") .. ":<none>") end end data[index]["_image_id"] = v.ImageID:sub(8,20) data[index]["_command"] = v.Command end return data end local container_list = get_containers() m = SimpleForm("docker", translate("Docker - Containers"), translate("This page displays all containers that have been created on the connected docker host.")) m.submit=false m.reset=false s = m:section(SimpleSection) s.template = "dockerman/apply_widget" s.err=docker:read_status() s.err=s.err and s.err:gsub("\n","<br>"):gsub(" ","&nbsp;") if s.err then docker:clear_status() end s = m:section(Table, container_list, translate("Containers overview")) s.addremove = false s.sectionhead = translate("Containers") s.sortable = false s.template = "cbi/tblsection" s.extedit = luci.dispatcher.build_url("admin", "docker", "container","%s") o = s:option(Flag, "_selected","") o.disabled = 0 o.enabled = 1 o.default = 0 o.write=function(self, section, value) container_list[section]._selected = value end o = s:option(DummyValue, "_id", translate("ID")) o.width="10%" o = s:option(DummyValue, "_name", translate("Container Name")) o.rawhtml = true o = s:option(DummyValue, "_status", translate("Status")) o.width="15%" o.rawhtml=true o = s:option(DummyValue, "_network", translate("Network")) o.width="15%" o = s:option(DummyValue, "_ports", translate("Ports")) o.width="10%" o.rawhtml = true o = s:option(DummyValue, "_image", translate("Image")) o.width="10%" o = s:option(DummyValue, "_command", translate("Command")) o.width="20%" local start_stop_remove = function(m,cmd) local container_selected = {} for k in pairs(container_list) do if container_list[k]._selected == 1 then container_selected[#container_selected + 1] = container_list[k]._name end end if #container_selected > 0 then local success = true docker:clear_status() for _, cont in ipairs(container_selected) do docker:append_status("Containers: " .. cmd .. " " .. cont .. "...") local res = dk.containers[cmd](dk, {id = cont}) if res and res.code >= 300 then success = false docker:append_status("code:" .. res.code.." ".. (res.body.message and res.body.message or res.message).. "\n") else docker:append_status("done\n") end end if success then docker:clear_status() end luci.http.redirect(luci.dispatcher.build_url("admin/docker/containers")) end end s = m:section(Table,{{}}) s.notitle=true s.rowcolors=false s.template="cbi/nullsection" o = s:option(Button, "_new") o.inputtitle= translate("Add") o.template = "dockerman/cbi/inlinebutton" o.inputstyle = "add" o.forcewrite = true o.write = function(self, section) luci.http.redirect(luci.dispatcher.build_url("admin/docker/newcontainer")) end o = s:option(Button, "_start") o.template = "dockerman/cbi/inlinebutton" o.inputtitle=translate("Start") o.inputstyle = "apply" o.forcewrite = true o.write = function(self, section) start_stop_remove(m,"start") end o = s:option(Button, "_restart") o.template = "dockerman/cbi/inlinebutton" o.inputtitle=translate("Restart") o.inputstyle = "reload" o.forcewrite = true o.write = function(self, section) start_stop_remove(m,"restart") end o = s:option(Button, "_stop") o.template = "dockerman/cbi/inlinebutton" o.inputtitle=translate("Stop") o.inputstyle = "reset" o.forcewrite = true o.write = function(self, section) start_stop_remove(m,"stop") end o = s:option(Button, "_kill") o.template = "dockerman/cbi/inlinebutton" o.inputtitle=translate("Kill") o.inputstyle = "reset" o.forcewrite = true o.write = function(self, section) start_stop_remove(m,"kill") end o = s:option(Button, "_remove") o.template = "dockerman/cbi/inlinebutton" o.inputtitle=translate("Remove") o.inputstyle = "remove" o.forcewrite = true o.write = function(self, section) start_stop_remove(m,"remove") end return m
FRAME_SIZE = 600 --equivalent ms position at 1x SV FRAME_RATE = 60 --fps BPM = 1 INCREMENT = .015625 --ms DISPLACE_INCREMENT = .5 --ms LINE_TIME_INCREMENT = -2 --ms LINE_TIME_START = -10000 --ms action_queue = {} sv_queue = {} position_cache = {} debug = 0 function draw() imgui.Begin("Line Animation") state.IsWindowHovered = imgui.IsWindowHovered() ResetQueue() local line_function = state.GetValue("line_function") or "local i = ...\nlocal results = {}\nreturn results" local start = state.GetValue("start") or 0 local stop = state.GetValue("stop") or 0 local advanced = state.GetValue("advanced") or false if imgui.Button("Current") then start = state.SongTime end imgui.SameLine() _, start = imgui.InputFloat("Start", start, 1) if imgui.Button("Current##0") then stop = state.SongTime end imgui.SameLine() _, stop = imgui.InputFloat("Stop", stop, 1) _, line_function = imgui.InputTextMultiline("Function", line_function, 69420, {300, 100}) if imgui.Button("Setup") then SetUpAnimation(start, stop) end imgui.SameLine() if imgui.Button("Add") then AddToAnimation(start, stop, line_function) end imgui.SameLine() _, advanced = imgui.Checkbox("Advanced Settings", advanced) if advanced then DrawAdvancedSettings() end if imgui.Button("debug") then local f = load(line_function) f() end imgui.Text(debug) PerformQueue() state.SetValue("line_function", line_function) state.SetValue("start", start) state.SetValue("stop", stop) state.SetValue("advanced", advanced) imgui.End() end function DrawAdvancedSettings() imgui.Begin("Advanced Settings") state.IsWindowHovered = imgui.IsWindowHovered() _, FRAME_SIZE = imgui.InputInt("FRAME_SIZE", FRAME_SIZE) _, FRAME_RATE = imgui.InputFloat("FRAME_RATE", FRAME_RATE, 10) _, BPM = imgui.InputFloat("BPM", BPM, 1) _, INCREMENT = imgui.InputFloat("INCREMENT", INCREMENT, .015625) _, DISPLACE_INCREMENT = imgui.InputFloat("DISPLACE_INCREMENT", DISPLACE_INCREMENT, .015625) _, LINE_TIME_START = imgui.InputFloat("LINE_TIME_START", LINE_TIME_START, 1000) _, LINE_TIME_INCREMENT = imgui.InputFloat("LINE_TIME_INCREMENT", LINE_TIME_INCREMENT, 1) imgui.End() end function SetUpAnimation(start, stop) local MSPF = 1000 / FRAME_RATE local frame_count = (stop - start) / MSPF for i = 0, frame_count - 1 do local frame_time = start + MSPF * i table.insert(sv_queue, utils.CreateScrollVelocity(frame_time - INCREMENT, FRAME_SIZE / INCREMENT)) table.insert(sv_queue, utils.CreateScrollVelocity(frame_time, 0)) end table.insert(sv_queue, utils.CreateScrollVelocity(stop - INCREMENT, FRAME_SIZE / INCREMENT)) IncreaseSV(stop, 0) end function AddToAnimation(start, stop, line_function) local MSPF = 1000 / FRAME_RATE local frame_count = (stop - start) / MSPF local f = load(line_function) local line_time = LoadFromLayer("Line Time") or LINE_TIME_START local origin_frame_position = GetPositionFromTime(start) / 100 local original_diff = origin_frame_position - LINE_TIME_START * map.InitialScrollVelocity for i = 0, frame_count - 1 do local line_offsets = f(i / frame_count) for _, line_offset in pairs(line_offsets) do table.insert(tp_queue, utils.CreateTimingPoint(line_time, BPM)) Displace(line_time, original_diff + i * FRAME_SIZE + line_offset * FRAME_SIZE + (LINE_TIME_START - line_time) * map.InitialScrollVelocity) line_time = line_time + LINE_TIME_INCREMENT end end SaveInLayer("Line Time", line_time) table.insert(tp_queue, utils.CreateTimingPoint(stop, map.GetTimingPointAt(stop).Bpm)) end function ResetQueue() action_queue = {} sv_queue = {} tp_queue = {} end function PerformQueue() if #sv_queue > 0 then Queue(action_type.AddScrollVelocityBatch, sv_queue) end if #tp_queue > 0 then Queue(action_type.AddTimingPointBatch, tp_queue) end if #action_queue > 0 then actions.PerformBatch(action_queue) end end function Queue(type, arg1, arg2, arg3, arg4) local action = utils.CreateEditorAction(type, arg1, arg2, arg3, arg4) table.insert(action_queue, action) end function IncreaseSV(time, multiplier) local sv = map.GetScrollVelocityAt(time) or utils.CreateScrollVelocity(-1e304, map.InitialScrollVelocity) if sv.StartTime == time then Queue(action_type.ChangeScrollVelocityMultiplierBatch, {sv}, sv.Multiplier + multiplier) else local newsv = utils.CreateScrollVelocity(time, sv.Multiplier + multiplier) table.insert(sv_queue, newsv) end end function Displace(time, displacement) IncreaseSV(time - DISPLACE_INCREMENT, displacement / DISPLACE_INCREMENT) IncreaseSV(time, -1 * displacement / DISPLACE_INCREMENT) IncreaseSV(time + DISPLACE_INCREMENT, 0) end function SaveInLayer(name, data) local data_layer = FindLayerThatStartsWith(name .. ": ") if data_layer then Queue(action_type.RenameLayer, data_layer, name .. ": " .. data) else data_layer = utils.CreateEditorLayer(name .. ": " .. data) Queue(action_type.CreateLayer, data_layer) end end function LoadFromLayer(name) local data_layer = FindLayerThatStartsWith(name .. ": ") if data_layer then return tonumber(data_layer.Name:sub(#name + 3, #data_layer.Name)) end end function FindLayerThatStartsWith(str) for _, layer in pairs(map.EditorLayers) do if StartsWith(layer.Name, str) then return layer end end end --http://lua-users.org/wiki/StringRecipes function StartsWith(str, start) return str:sub(1, #start) == start end function GetPositionFromTime(time) --[[ if using this function multiple times in one frame, it may be faster to set ScrollVelocities = map.ScrollVelocities in draw() and then set local svs = ScrollVelocities inside this function ]] local svs = map.ScrollVelocities if #svs == 0 or time < svs[1].StartTime then return math.floor(time * 100 * map.InitialScrollVelocity) end local position = math.floor(svs[1].StartTime * 100 * map.InitialScrollVelocity) local i = 2 while i <= #svs do if time < svs[i].StartTime then break else position = position + math.floor((svs[i].StartTime - svs[i - 1].StartTime) * svs[i - 1].Multiplier * 100) end i = i + 1 end i = i - 1 position = position + math.floor((time - svs[i].StartTime) * svs[i].Multiplier * 100) return position end
rspamd_config:register_symbol({ name = 'TBL_OPTION_ORDER', score = 1.0, callback = function() return true, {'one', 'two', 'three', '4', '5', 'a'} end }) rspamd_config:register_symbol({ name = 'OPTION_ORDER', score = 1.0, callback = function() return true, 'one', 'two', 'three', '4', '5', 'a' end })
local cjson = require 'cjson' local net = require 'netstat' local info = net.net_dev('lo') print(cjson.encode(info)) if #info == 16 then print(info[1], info[9]) end
local GameConstants = require('game/GameConstants') function love.conf(t) t.window.width = GameConstants.SCREEN_WIDTH t.window.height = GameConstants.SCREEN_HEIGHT t.window.title = 'Bonkyon' end
LoginGuestVerifyCharCcsPane = class("LoginGuestVerifyCharCcsPane") LoginGuestVerifyCharCcsPane.onCreationComplete = function (slot0) ClassUtil.extends(slot0, ZoomCcsBtn, true, slot0) createSetterGetter(slot0, "index", nil) slot0:setIsClickZoom(false) DisplayUtil.setVisible(slot0.spSelected, false) slot0.model.selectedVerifyDicsChangedSignal:add(slot0.onSelectedChanged, slot0) end LoginGuestVerifyCharCcsPane.onClick = function (slot0) slot0.controller:clickVerifyChar(slot0._index) end LoginGuestVerifyCharCcsPane.onSelectedChanged = function (slot0) TweenLite.to(slot0.spSelected, 0.1, { autoAlpha = (slot0._index ~= nil and slot0.model:getSelectedVerifyDics() ~= nil and slot0.model.getSelectedVerifyDics()[slot0._index] ~= nil and 1) or 0 }) end LoginGuestVerifyCharCcsPane.destroy = function (slot0) slot0.model.selectedVerifyDicsChangedSignal:remove(slot0.onSelectedChanged, slot0) TweenLite.killTweensOf(slot0.spSelected) ZoomCcsBtn.destroy(slot0) end return
-- AquaShine entry point class base -- Part of AquaShine loader -- See copyright notice in AquaShine.lua local AquaShine = ... local class = AquaShine.Class AquaShine.EntryPoint = class("AquaShine.EntryPoint") function AquaShine.EntryPoint:Update() error("Pure virtual method AquaShine.EntryPoint:Update") end function AquaShine.EntryPoint:Update() error("Pure virtual method AquaShine.EntryPoint:Draw") end
local allowCountdown = false local startDiag = true function onStartCountdown() if not allowCountdown and not startDiag and isStoryMode and not seenCutscene then startVideo('Quake Cutscene'); startDiag = true; return Function_Stop; end if startDiag and not allowCountdown and isStoryMode then startDialogue('dialogue', 'sly3'); allowCountdown = true; return Function_Stop; end return Function_Continue; end
require("init") return { pull = function(filter) --emulated after 3s io.flush() os.execute("sleep 1s") return "modem_message", 1, 2, 3, 4, "{a=5,data={}}" end,pullMultiple = function(filter) end }
--[[-------------------------------------------------------------------]]--[[ Copyright wiltOS Technologies LLC, 2020 Contact: www.wiltostech.com ----------------------------------------]]-- wOS = wOS or {} wOS.ALCS = wOS.ALCS or {} wOS.ALCS.Config = wOS.ALCS.Config or {} wOS.ALCS.Config.Dueling = wOS.ALCS.Config.Dueling or {} /* How much sacrifice energy must be gained from items before a spirit can be rolled? */ wOS.ALCS.Config.Dueling.SacrificeRoll = false /* How long should duel requests last before they are expired and cycled? */ wOS.ALCS.Config.Dueling.DuelExpirationTime = 10 /* How far away does a player have to be from a dueling station in order be considered ready for dueling? Set to FALSE for infinite distance */ wOS.ALCS.Config.Dueling.StationDistance = 450