content
stringlengths
5
1.05M
local ok, wk = pcall(require, "which-key") if not ok then return end local opts = { mode = "n", prefix = "", buffer = bufnr, silent = true, noremap = true, nowait = true, } function refresh_and_toggle() vim.cmd "NvimTreeRefresh" vim.cmd "NvimTreeToggle" end wk.register({ ["<leader>]"] = { "<cmd>bn<cr>", "[BUFFER] Go previous buffer" }, ["<leader>["] = { "<cmd>bp<cr>", "[BUFFER] Go next buffer" }, ["<leader>q"] = { "<cmd>bd<cr>", "[BUFFER] Close current buffer" }, ["<c-n>"] = { "<cmd>lua refresh_and_toggle()<cr>", "[NVIMTREE] Toggle" }, ["<leader>r"] = { "<cmd>NvimTreeRefresh<cr>", "[NVIMTREE] Refresh" }, ["<leader>f"] = { name = "[TELESCOPE]", f = { "<cmd>Telescope find_files hidden=true no_ignore=true<cr>", "[TELESCOPE] Find File" }, g = { "<cmd>Telescope live_grep<cr>", "[TELESCOPE] Find File by grep" }, b = { "<cmd>Telescope buffers<cr>", "[TELESCOPE] Find buffers" }, h = { "<cmd>Telescope help_tags<cr>", "[TELESCOPE] Help tags" }, m = { "<cmd>Telescope marks<cr>", "[TELESCOPE] Marks" }, }, ["<leader>x"] = { name = "[TROUBLE]", x = { "<cmd>Trouble<cr>", "[TROUBLE] Show trouble list" }, w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "[TROUBLE] Show LSP workspace diagnostic" }, d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "[TROUBLE] Show LSP document diagnostic" }, l = { "<cmd>Trouble loclist<cr>", "[TROUBLE] Locklist" }, q = { "<cmd>Trouble quickfix<cr>", "[TROUBLE] Quick fix" }, r = { "<cmd>Trouble lsp_references<cr>", "[TROUBLE] References" }, }, ["<leader>l"] = { name = "[LSP]", n = { "<cmd>Lspsaga diagnostic_jump_next<cr>", "[SAGA] Diagnostic jump next" }, p = { "<cmd>Lspsaga diagnostic_jump_prev<cr>", "[SAGA] Diagnostic jump previous" }, d = { "<cmd>Lspsaga preview_definition<cr>", "[SAGA] Preview definition" }, x = { "<cmd>Lspsaga lsp_finder<cr>", "[SAGA] LSP Finder" }, c = { "<cmd>Lspsaga code_action<cr>", "[SAGA] Code Action" }, r = { "<cmd>Lspsaga rename<cr>", "[SAGA] Rename" }, }, ["<leader>g"] = { name = "[GITSIGNS]", s = { "<cmd>Gitsigns toggle_signs<cr>", "[GITSIGNS] Toggle signs" }, h = { "<cmd>Gitsigns preview_hunk<cr>", "[GITSIGNS] Preview hunk" }, d = { "<cmd>Gitsigns diffthis<cr>", "[GITSIGNS] Show diff" }, }, }, opts) wk.setup {}
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) ESX.RegisterServerCallback('esx_bike:buy1', function(source, cb) local _source = source local xPlayer = ESX.GetPlayerFromId(_source) if xPlayer.get('money') >= 89 then xPlayer.removeMoney(89) TriggerClientEvent('esx:showNotification', source, 'Vous avez payez 89$ Bonne route !') cb(true) elseif xPlayer.get('bank') >= 89 then xPlayer.removeAccountMoney('bank', 89) TriggerClientEvent('esx:showNotification', source, 'Vous avez payez 89$ Bonne route !') cb(true) else -- TriggerClientEvent('esx:showNotification', source, 'Vous n\'avez pas assez d\'argent sur vous ni sur votre carte bancaire') cb(false) end end) ESX.RegisterServerCallback('esx_bike:buy2', function(source, cb) local _source = source local xPlayer = ESX.GetPlayerFromId(_source) if xPlayer.get('money') >= 129 then xPlayer.removeMoney(129) TriggerClientEvent('esx:showNotification', source, 'Vous avez payez 129$ Bonne route !') cb(true) elseif xPlayer.get('bank') >= 129 then xPlayer.removeAccountMoney('bank', 129) TriggerClientEvent('esx:showNotification', source, 'Vous avez payez 129$ Bonne route !') cb(true) else -- TriggerClientEvent('esx:showNotification', source, 'Vous n\'avez pas assez d\'argent sur vous ni sur votre carte bancaire') cb(false) end end) ESX.RegisterServerCallback('esx_bike:buy3', function(source, cb) local _source = source local xPlayer = ESX.GetPlayerFromId(_source) if xPlayer.get('money') >= 109 then xPlayer.removeMoney(109) TriggerClientEvent('esx:showNotification', source, 'Vous avez payez 109$ Bonne route !') cb(true) elseif xPlayer.get('bank') >= 109 then xPlayer.removeAccountMoney('bank', 109) TriggerClientEvent('esx:showNotification', source, 'Vous avez payez 109$ Bonne route !') cb(true) else -- TriggerClientEvent('esx:showNotification', source, 'Vous n\'avez pas assez d\'argent sur vous ni sur votre carte bancaire') cb(false) end end)
if not turtle and not commands then error('Must be run on a turtle or a command computer') end requireInjector(getfenv(1)) local Blocks = require('blocks') local class = require('class') local Event = require('event') local itemDB = require('itemDB') local MEAdapter = require('meAdapter') local Message = require('message') local Point = require('point') local Schematic = require('schematic') local TableDB = require('tableDB') local UI = require('ui') local Util = require('util') local ChestAdapter = require('chestAdapter') if Util.getVersion() == 1.8 then ChestAdapter = require('chestAdapter18') end local BUILDER_DIR = 'usr/builder' local schematic = Schematic() local blocks = Blocks({ dir = BUILDER_DIR }) local SUPPLIES_PT = { x = -1, z = -1, y = 0 } local Builder = { version = '1.71', isCommandComputer = not turtle, slots = { }, index = 1, mode = 'build', fuelItem = { id = 'minecraft:coal', dmg = 0 }, resourceSlots = 14, facing = 'south', confirmFacing = false, wrenchSucks = false, } local pistonFacings -- Temp functions until conversion to new adapters is complete local function convertSingleForward(item) item.displayName = item.display_name item.name = item.id item.damage = item.dmg item.count = item.qty item.maxCount = item.max_size return item end local function convertForward(t) for _,v in pairs(t) do convertSingleForward(v) end return t end local function convertSingleBack(item) if item then item.id = item.name item.dmg = item.damage item.qty = item.count item.max_size = item.maxCount item.display_name = item.displayName --item.name = item.displayName end return item end local function convertBack(t) for _,v in pairs(t) do convertSingleBack(v) end return t end --[[-- SubDB --]]-- subDB = TableDB({ fileName = fs.combine(BUILDER_DIR, 'sub.db'), }) function subDB:load() if fs.exists(self.fileName) then TableDB.load(self) elseif not Builder.isCommandComputer then self:seedDB() end end function subDB:seedDB() self.data = { [ "minecraft:redstone_wire:0" ] = "minecraft:redstone:0", [ "minecraft:wall_sign:0" ] = "minecraft:sign:0", [ "minecraft:standing_sign:0" ] = "minecraft:sign:0", [ "minecraft:potatoes:0" ] = "minecraft:potato:0", [ "minecraft:unlit_redstone_torch:0" ] = "minecraft:redstone_torch:0", [ "minecraft:powered_repeater:0" ] = "minecraft:repeater:0", [ "minecraft:unpowered_repeater:0" ] = "minecraft:repeater:0", [ "minecraft:carrots:0" ] = "minecraft:carrot:0", [ "minecraft:cocoa:0" ] = "minecraft:dye:3", [ "minecraft:unpowered_comparator:0" ] = "minecraft:comparator:0", [ "minecraft:powered_comparator:0" ] = "minecraft:comparator:0", [ "minecraft:piston_head:0" ] = "minecraft:air:0", [ "minecraft:piston_extension:0" ] = "minecraft:air:0", [ "minecraft:portal:0" ] = "minecraft:air:0", [ "minecraft:double_wooden_slab:0" ] = "minecraft:planks:0", [ "minecraft:double_wooden_slab:1" ] = "minecraft:planks:1", [ "minecraft:double_wooden_slab:2" ] = "minecraft:planks:2", [ "minecraft:double_wooden_slab:3" ] = "minecraft:planks:3", [ "minecraft:double_wooden_slab:4" ] = "minecraft:planks:4", [ "minecraft:double_wooden_slab:5" ] = "minecraft:planks:5", [ "minecraft:lit_redstone_lamp:0" ] = "minecraft:redstone_lamp:0", [ "minecraft:double_stone_slab:1" ] = "minecraft:sandstone:0", [ "minecraft:double_stone_slab:2" ] = "minecraft:planks:0", [ "minecraft:double_stone_slab:3" ] = "minecraft:cobblestone:0", [ "minecraft:double_stone_slab:4" ] = "minecraft:brick_block:0", [ "minecraft:double_stone_slab:5" ] = "minecraft:stonebrick:0", [ "minecraft:double_stone_slab:6" ] = "minecraft:nether_brick:0", [ "minecraft:double_stone_slab:7" ] = "minecraft:quartz_block:0", [ "minecraft:double_stone_slab:9" ] = "minecraft:sandstone:2", [ "minecraft:double_stone_slab2:0" ] = "minecraft:sandstone:0", [ "minecraft:stone_slab:2" ] = "minecraft:wooden_slab:0", [ "minecraft:wheat:0" ] = "minecraft:wheat_seeds:0", [ "minecraft:flowing_water:0" ] = "minecraft:air:0", [ "minecraft:lit_furnace:0" ] = "minecraft:furnace:0", [ "minecraft:wall_banner:0" ] = "minecraft:banner:0", [ "minecraft:standing_banner:0" ] = "minecraft:banner:0", [ "minecraft:tripwire:0" ] = "minecraft:string:0", [ "minecraft:pumpkin_stem:0" ] = "minecraft:pumpkin_seeds:0", } self.dirty = true self:flush() end function subDB:add(s) TableDB.add(self, { s.id, s.dmg }, table.concat({ s.sid, s.sdmg }, ':')) self:flush() end function subDB:remove(s) -- TODO: tableDB.remove should take table key TableDB.remove(self, s.id .. ':' .. s.dmg) self:flush() end function subDB:extract(s) local id, dmg = s:match('(.+):(%d+)') return id, tonumber(dmg) end function subDB:getSubstitutedItem(id, dmg) local sub = TableDB.get(self, { id, dmg }) if sub then id, dmg = self:extract(sub) end return { id = id, dmg = dmg } end function subDB:lookupBlocksForSub(sid, sdmg) local t = { } for k,v in pairs(self.data) do local id, dmg = self:extract(v) if id == sid and dmg == sdmg then id, dmg = self:extract(k) t[k] = { id = id, dmg = dmg, sid = sid, sdmg = sdmg } end end return t end --[[-- maxStackDB --]]-- maxStackDB = TableDB({ fileName = fs.combine(BUILDER_DIR, 'maxstack.db'), }) function maxStackDB:get(id, dmg) return self.data[id .. ':' .. dmg] or 64 end --[[-- Spinner --]]-- UI.Spinner = class() function UI.Spinner:init(args) local defaults = { UIElement = 'Spinner', timeout = .095, x = 1, y = 1, c = os.clock(), spinIndex = 0, spinSymbols = { '-', '/', '|', '\\' } } defaults.x, defaults.y = term.getCursorPos() defaults.startX = defaults.x defaults.startY = defaults.y UI:setProperties(self, defaults) UI:setProperties(self, args) end function UI.Spinner:spin(text) local cc = os.clock() if cc > self.c + self.timeout then term.setCursorPos(self.x, self.y) local str = self.spinSymbols[self.spinIndex % #self.spinSymbols + 1] if text then str = str .. ' ' .. text end term.write(str) self.spinIndex = self.spinIndex + 1 os.sleep(0) self.c = os.clock() end end function UI.Spinner:stop(text) term.setCursorPos(self.x, self.y) local str = string.rep(' ', #self.spinSymbols) if text then str = str .. ' ' .. text end term.write(str) term.setCursorPos(self.startX, self.startY) end --[[-- Builder --]]-- function Builder:getBlockCounts() local blocks = { } -- add a couple essential items to the supply list to allow replacements if not self.isCommandComputer then local wrench = subDB:getSubstitutedItem('SubstituteAWrench', 0) wrench.qty = 0 wrench.need = 1 blocks[wrench.id .. ':' .. wrench.dmg] = wrench local fuel = subDB:getSubstitutedItem(Builder.fuelItem.id, Builder.fuelItem.dmg) fuel.qty = 0 fuel.need = 1 blocks[fuel.id .. ':' .. fuel.dmg] = fuel blocks['minecraft:piston:0'] = { id = 'minecraft:piston', dmg = 0, qty = 0, need = 1, } end for k,b in ipairs(schematic.blocks) do if k >= self.index then local key = tostring(b.id) .. ':' .. b.dmg local block = blocks[key] if not block then block = Util.shallowCopy(b) block.qty = 0 block.need = 0 blocks[key] = block end block.need = block.need + 1 end end return blocks end function Builder:selectItem(id, dmg) for k,s in ipairs(self.slots) do if s.qty > 0 and s.id == id and s.dmg == dmg then -- check to see if someone pulled items from inventory -- or we passed over a hopper if turtle.getItemCount(s.index) > 0 then if k > 1 and s.qty > 1 then table.remove(self.slots, k) table.insert(self.slots, 1, s) end turtle.select(s.index) return s end end end end function Builder:getAirResupplyList(blockIndex) local slots = { } if self.mode == 'destroy' then for i = 1, self.resourceSlots do slots[i] = { qty = 0, need = 0, index = i } end else slots, _ = self:getGenericSupplyList(blockIndex) end local fuel = subDB:getSubstitutedItem(Builder.fuelItem.id, Builder.fuelItem.dmg) slots[15] = { id = 'minecraft:chest', --'ironchest:BlockIronChest', -- dmg = 0, qty = 0, need = 1, index = 15, } slots[16] = { id = fuel.id, dmg = fuel.dmg, wrench = true, qty = 0, need = 64, index = 16, } return slots end function Builder:getSupplyList(blockIndex) local slots, lastBlock = self:getGenericSupplyList(blockIndex) slots[15] = { id = 'minecraft:piston', dmg = 0, qty = 0, need = 1, index = 15, } local wrench = subDB:getSubstitutedItem('SubstituteAWrench', 0) slots[16] = { id = wrench.id, dmg = wrench.dmg, wrench = true, qty = 0, need = 1, index = 16, } self.slots = slots return lastBlock end function Builder:getGenericSupplyList(blockIndex) local slots = { } for i = 1, self.resourceSlots do slots[i] = { qty = 0, need = 0, index = i } end local function getSlot(id, dmg) -- find matching slot local maxStack = maxStackDB:get(id, dmg) for _, s in ipairs(slots) do if s.id == id and s.dmg == dmg and s.need < maxStack then return s end end -- return first available slot for _, s in ipairs(slots) do if not s.id then s.key = id .. ':' .. dmg s.id = id s.dmg = dmg return s end end end local lastBlock = blockIndex for k = blockIndex, #schematic.blocks do lastBlock = k local b = schematic:getComputedBlock(k) if b.id ~= 'minecraft:air' then local slot = getSlot(b.id, b.dmg) if not slot then break end slot.need = slot.need + 1 end end for _,s in pairs(slots) do if s.id then s.display_name = itemDB:getName({ name = s.id, damage = s.dmg }) end end return slots, lastBlock end function Builder:substituteBlocks(throttle) for _,b in pairs(schematic.blocks) do -- replace schematic block type with substitution local pb = blocks:getPlaceableBlock(b.id, b.dmg) Util.merge(b, pb) b.odmg = pb.odmg or pb.dmg local sub = subDB:get({ b.id, b.dmg }) if sub then b.id, b.dmg = subDB:extract(sub) end throttle() end end function Builder:dumpInventory() local success = true for i = 1, 16 do local qty = turtle.getItemCount(i) if qty > 0 then self.itemAdapter:insert(i, qty) end if turtle.getItemCount(i) ~= 0 then success = false end end turtle.select(1) return success end function Builder:dumpInventoryWithCheck() while not self:dumpInventory() do print('Storage is full or missing - make space or replace') print('Press enter to continue') turtle.setHeading(0) read() end end function Builder:autocraft(supplies) local t = { } for i,s in pairs(supplies) do local key = s.id .. ':' .. s.dmg local item = t[key] if not item then item = { id = s.id, dmg = s.dmg, qty = 0, } t[key] = item end item.qty = item.qty + (s.need - s.qty) end Builder.itemAdapter:craftItems(convertForward(t)) end function Builder:getSupplies() self.itemAdapter:refresh() local t = { } for _,s in ipairs(self.slots) do if s.need > 0 then local item = convertSingleBack(self.itemAdapter:getItemInfo({ name = s.id, damage = s.dmg, nbtHash = s.nbt_hash, })) if item then s.display_name = item.display_name local qty = math.min(s.need - s.qty, item.qty) if qty + s.qty > item.max_size then maxStackDB:add({ s.id, s.dmg }, item.max_size) maxStackDB.dirty = true maxStackDB:flush() qty = item.max_size s.need = qty end if qty > 0 then self.itemAdapter:provide(convertSingleForward(item), qty, s.index) s.qty = turtle.getItemCount(s.index) end else s.display_name = itemDB:getName({ name = s.id, damage = s.dmg }) end end if s.qty < s.need then table.insert(t, s) end end return t end Event.on('build', function() Builder:build() end) function Builder:refuel() while turtle.getFuelLevel() < 4000 and self.fuelItem do print('Refueling') turtle.select(1) local fuel = subDB:getSubstitutedItem(self.fuelItem.id, self.fuelItem.dmg) self.itemAdapter:provide(convertSingleForward(fuel), 64, 1) if turtle.getItemCount(1) == 0 then print('Out of fuel, add fuel to chest/ME system') turtle.setHeading(0) turtle.status = 'waiting' os.sleep(5) else turtle.refuel(64) end end end function Builder:inAirDropoff() if not device.wireless_modem then return false end self:log('Requesting air supply drop for supply #: ' .. 1) while true do Message.broadcast('needSupplies', { point = turtle.getPoint(), uid = 1 }) local _, id, msg, _ = Message.waitForMessage('gotSupplies', 1) if not msg or not msg.contents then Message.broadcast('supplyList', { uid = 1, slots = self:getAirResupplyList() }) return false end turtle.status = 'waiting' if msg.contents.point then local pt = msg.contents.point self:log('Received supply location') os.sleep(0) turtle.goto(pt.x, pt.z, pt.y) os.sleep(.1) -- random computer is not connected error local chestAdapter = ChestAdapter({ direction = 'down', wrapSide = 'top' }) if not chestAdapter:isValid() then self:log('Chests above is not valid') return false end local oldAdapter = self.itemAdapter self.itemAdapter = chestAdapter if not self:dumpInventory() then self:log('Unable to dump inventory') self.itemAdapter = oldAdapter return false end self.itemAdapter = oldAdapter Message.broadcast('thanks', { }) for i = 1,12 do -- wait til supplier is idle before sending next request if turtle.detectUp() then os.sleep(.25) end end os.sleep(.1) Message.broadcast('supplyList', { uid = 1, slots = self:getAirResupplyList() }) return true end end end function Builder:inAirResupply() if not device.wireless_modem then return false end local oldAdapter = self.itemAdapter self:log('Requesting air supply drop for supply #: ' .. self.slotUid) while true do Message.broadcast('needSupplies', { point = turtle.getPoint(), uid = Builder.slotUid }) local _, id, msg, _ = Message.waitForMessage('gotSupplies', 1) if not msg or not msg.contents then self.itemAdapter = oldAdapter return false end turtle.status = 'waiting' if msg.contents.point then local pt = msg.contents.point self:log('Received supply location') os.sleep(0) turtle.goto(pt.x, pt.z, pt.y) os.sleep(.1) -- random computer is not connected error local chestAdapter = ChestAdapter({ direction = 'down', wrapSide = 'top' }) if not chestAdapter:isValid() then Util.print('not valid') read() end self.itemAdapter = chestAdapter if not self:dumpInventory() then self.itemAdapter = oldAdapter return false end self:refuel() local lastBlock = self:getSupplyList(self.index) local supplies = self:getSupplies() Message.broadcast('thanks', { }) self.itemAdapter = oldAdapter if #supplies == 0 then for i = 1,12 do -- wait til supplier is idle before sending next request if turtle.detectUp() then os.sleep(.25) end end os.sleep(.1) if lastBlock < #schematic.blocks then self:sendSupplyRequest(lastBlock) else Message.broadcast('finished') end return true end self:log('Missing supplies - manually resupplying') return false end end end function Builder:sendSupplyRequest(lastBlock) if device.wireless_modem then local slots = self:getAirResupplyList(lastBlock) self.slotUid = os.clock() Message.broadcast('supplyList', { uid = self.slotUid, slots = slots }) end end function Builder:resupply() if self.slotUid and self:inAirResupply() then os.queueEvent('build') return end turtle.status = 'resupplying' self:log('Resupplying') turtle.gotoYlast(SUPPLIES_PT) os.sleep(.1) -- random 'Computer is not connected' error... self:dumpInventoryWithCheck() self:refuel() local lastBlock = self:getSupplyList(self.index) if lastBlock < #schematic.blocks then self:sendSupplyRequest(lastBlock) elseif device.wireless_modem then Message.broadcast('finished') end os.sleep(1) local supplies = self:getSupplies() if #supplies == 0 then os.queueEvent('build') else turtle.setHeading(0) self:autocraft(supplies) supplyPage:setSupplies(supplies) UI:setPage('supply') end end function Builder:placeDown(slot) return turtle.placeDown(slot.index) end function Builder:placeUp(slot) return turtle.placeUp(slot.index) end function Builder:place(slot) return turtle.place(slot.index) end function Builder:getWrenchSlot() local wrench = subDB:getSubstitutedItem('SubstituteAWrench', 0) return Builder:selectItem(wrench.id, wrench.dmg) end -- figure out our orientation in the world function Builder:getTurtleFacing() if Util.getVersion() == 1.8 then local directions = { -- reversed directions [5] = 'west', [3] = 'north', [4] = 'east', [2] = 'south', } if self:selectItem('minecraft:piston', 0) then turtle.placeUp() local _, bi = turtle.inspectUp() turtle.digUp() return directions[bi.metadata] end return end return Builder.facing end function Builder:wrenchBlock(side, facing, cache) local s = Builder:getWrenchSlot() if not s then b.needResupply = true return false end local key = turtle.point.heading .. '-' .. facing if cache then local count = cache[side][key] if count then turtle.select(s.index) for i = 1,count do turtle.getAction(side).place() end return true end end local directions = { [5] = 'east', [3] = 'south', [4] = 'west', [2] = 'north', [0] = 'down', [1] = 'up', } if turtle.getHeadingInfo(facing).heading < 4 then local offsetDirection = (turtle.getHeadingInfo(Builder.facing).heading + turtle.getHeadingInfo(facing).heading) % 4 facing = turtle.getHeadingInfo(offsetDirection).direction end count = 0 print('determining wrench count') for i = 1, 6 do local _, bi = turtle.getAction(side).inspect() if facing == directions[bi.metadata] then if cache then cache[side][key] = count end return true end count = count + 1 turtle.getAction(side).place() end return false end function Builder:rotateBlock(side, facing) local s = Builder:getWrenchSlot() if not s then b.needResupply = true return false end for i = 1, facing do turtle.getAction(side).place() end return true --[[ local origFacing while true do local _, bi = turtle.getAction(side).inspect() -- spin until it repeats if not origFacing then origFacing = bi.metadata elseif bi.metadata == origFacing then return false end if facing == bi.metadata then return true end turtle.getAction(side).place() end return false ]]-- end -- place piston, wrench piston to face downward, extend, remove piston function Builder:placePiston(b) local ps = Builder:selectItem('minecraft:piston', 0) local ws = Builder:getWrenchSlot() if not ps or not ws then b.needResupply = true -- a hopper may have eaten the piston return end if not turtle.place(ps.index) then return end if self.wrenchSucks then turtle.turnRight() turtle.forward() turtle.turnLeft() turtle.forward() turtle.turnLeft() end local success = self:wrenchBlock('forward', 'down', pistonFacings) --wrench piston to point downwards rs.setOutput('front', true) os.sleep(.25) rs.setOutput('front', false) os.sleep(.25) turtle.select(ps.index) turtle.dig() if not success and not self.wrenchSucks then self.wrenchSucks = true success = self:placePiston(b) end return success end function Builder:goto(x, z, y, heading) if not turtle.goto(x, z, y, heading) then print('stuck') print('Press enter to continue') os.sleep(1) turtle.status = 'stuck' read() end end -- goto used when turtle could be below travel plane -- if the distance is no more than 1 block, there's no need to pop back to the travel plane function Builder:gotoEx(x, z, y, h, travelPlane) local distance = math.abs(turtle.getPoint().x - x) + math.abs(turtle.getPoint().z - z) -- following code could be better if distance == 0 then turtle.gotoY(y) elseif distance == 1 then if turtle.point.y < y then turtle.gotoY(y) end elseif distance > 1 then self:gotoTravelPlane(travelPlane) end self:goto(x, z, y, h) end function Builder:placeDirectionalBlock(b, slot, travelPlane) local d = b.direction local function getAdjacentPoint(pt, direction) local hi = turtle.getHeadingInfo(direction) return { x = pt.x + hi.xd, z = pt.z + hi.zd, y = pt.y + hi.yd, heading = (hi.heading + 2) % 4 } end local directions = { [ 'north' ] = 'north', [ 'south' ] = 'south', [ 'east' ] = 'east', [ 'west' ] = 'west', } if directions[d] then self:gotoEx(b.x, b.z, b.y, turtle.getHeadingInfo(directions[d]).heading, travelPlane) b.placed = self:placeDown(slot) end if d == 'top' then self:gotoEx(b.x, b.z, b.y+1, nil, travelPlane) if self:placeDown(slot) then turtle.goback() b.placed = self:placePiston(b) end end if d == 'bottom' then local t = { [1] = getAdjacentPoint(b, 'east'), [2] = getAdjacentPoint(b, 'south'), [3] = getAdjacentPoint(b, 'west'), [4] = getAdjacentPoint(b, 'north'), } local c = Point.closest(turtle.getPoint(), t) self:gotoEx(c.x, c.z, c.y, c.heading, travelPlane) if self:place(slot) then turtle.up() b.placed = self:placePiston(b) end end local stairDownDirections = { [ 'north-down' ] = 'north', [ 'south-down' ] = 'south', [ 'east-down' ] = 'east', [ 'west-down' ] = 'west' } if stairDownDirections[d] then self:gotoEx(b.x, b.z, b.y+1, turtle.getHeadingInfo(stairDownDirections[d]).heading, travelPlane) if self:placeDown(slot) then turtle.goback() b.placed = self:placePiston(b) end end local stairUpDirections = { [ 'north-up' ] = 'south', [ 'south-up' ] = 'north', [ 'east-up' ] = 'west', [ 'west-up' ] = 'east' } if stairUpDirections[d] then local isSouth = (turtle.getHeadingInfo(Builder.facing).heading + turtle.getHeadingInfo(stairUpDirections[d]).heading) % 4 == 1 if Util.getVersion() == 1.8 then isSouth = false -- no stair bug in this version end if isSouth then -- for some reason, the south facing stair doesn't place correctly -- jump through some hoops to place it self:gotoEx(b.x, b.z, b.y, (turtle.getHeadingInfo(stairUpDirections[d]).heading + 2) % 4, travelPlane) if self:placeUp(slot) then turtle.goback() turtle.gotoY(turtle.point.y + 2) b.placed = self:placePiston(b) turtle.down() b.placed = self:placePiston(b) b.heading = turtle.point.heading -- stop debug message below since we are pointing in wrong direction end else local hi = turtle.getHeadingInfo(stairUpDirections[d]) self:gotoEx(b.x - hi.xd, b.z - hi.zd, b.y, hi.heading, travelPlane) if self:place(slot) then turtle.up() b.placed = self:placePiston(b) end end end local horizontalDirections = { [ 'east-west-block' ] = { 'east', 'west' }, [ 'north-south-block' ] = { 'north', 'south' }, } if horizontalDirections[d] then local t = { [1] = getAdjacentPoint(b, horizontalDirections[d][1]), [2] = getAdjacentPoint(b, horizontalDirections[d][2]), } local c = Point.closest(turtle.getPoint(), t) self:gotoEx(c.x, c.z, c.y, c.heading, travelPlane) if self:place(slot) then turtle.up() b.placed = self:placePiston(b) end end local pistonDirections = { [ 'piston-north' ] = 'north', [ 'piston-south' ] = 'south', [ 'piston-west' ] = 'west', [ 'piston-east' ] = 'east', [ 'piston-down' ] = 'down', [ 'piston-up' ] = 'up', } if pistonDirections[d] then -- why are pistons so broke in cc 1.7 ?????????????????????? local ws = Builder:getWrenchSlot() if not ws then b.needResupply = true -- a hopper may have eaten the piston return false end -- piston turns relative to turtle position :) local rotatedPistonDirections = { [ 'piston-east' ] = 0, [ 'piston-south' ] = 1, [ 'piston-west' ] = 2, [ 'piston-north' ] = 3, } self:gotoEx(b.x, b.z, b.y, nil, travelPlane) local heading = rotatedPistonDirections[d] if heading and turtle.point.heading % 2 ~= heading % 2 then turtle.setHeading(heading) end if self:placeDown(slot) then b.placed = self:wrenchBlock('down', pistonDirections[d], pistonFacings) end end local wrenchDirections = { [ 'wrench-down' ] = 'down', [ 'wrench-up' ] = 'up', } if wrenchDirections[d] then local ws = Builder:getWrenchSlot() if not ws then b.needResupply = true -- a hopper may have eaten the piston return false end self:gotoEx(b.x, b.z, b.y, nil, travelPlane) if self:placeDown(slot) then b.placed = self:wrenchBlock('down', wrenchDirections[d]) end end local doorDirections = { [ 'east-door' ] = 'east', [ 'south-door' ] = 'south', [ 'west-door' ] = 'west', [ 'north-door' ] = 'north', } if doorDirections[d] then local hi = turtle.getHeadingInfo(doorDirections[d]) self:gotoEx(b.x - hi.xd, b.z - hi.zd, b.y - 1, hi.heading, travelPlane) b.placed = self:place(slot) end local blockDirections = { [ 'north-block' ] = 'north', [ 'south-block' ] = 'south', [ 'east-block' ] = 'east', [ 'west-block' ] = 'west', } if blockDirections[d] then local hi = turtle.getHeadingInfo(blockDirections[d]) self:gotoEx(b.x - hi.xd, b.z - hi.zd, b.y-1, hi.heading, travelPlane) b.placed = self:place(slot) end if b.facing then self:rotateBlock('down', b.facing) end -- debug if d ~= 'top' and d ~= 'bottom' and not horizontalDirections[d] and not pistonDirections[d] then if not b.heading or turtle.getHeading() ~= b.heading then self:log(d .. ' - ' .. turtle.getHeading() .. ' - ' .. (b.heading or 'nil')) --read() end end return b.placed end function Builder:reloadSchematic(throttle) schematic:reload(throttle) self:substituteBlocks(throttle) end function Builder:log(...) Util.print(...) end function Builder:logBlock(index, b) local bdir = b.direction or '' local logText = string.format('%d %s:%d (x:%d,z:%d:y:%d) %s', index, b.id, b.dmg, b.x, b.z, b.y, bdir) self:log(logText) -- self:log(b.index) -- unique identifier of block if device.wireless_modem then Message.broadcast('builder', { x = b.x, y = b.y, z = b.z, heading = b.heading }) end end function Builder:saveProgress(index) Util.writeTable( fs.combine(BUILDER_DIR, schematic.filename .. '.progress'), { index = index, facing = Builder.facing } ) end function Builder:loadProgress(filename) local progress = Util.readTable(fs.combine(BUILDER_DIR, filename)) if progress then Builder.index = progress.index if Builder.index > #schematic.blocks then Builder.index = 1 end Builder.facing = progress.facing or 'south' end end -- find the highest y in the last 2 planes function Builder:findTravelPlane(index) local travelPlane for i = index, 1, -1 do local b = schematic.blocks[i] local y = b.y if b.twoHigh then y = y + 1 end if not travelPlane or y > travelPlane then travelPlane = y elseif travelPlane and travelPlane - y > 2 then break end end return travelPlane or 0 end function Builder:gotoTravelPlane(travelPlane) if travelPlane > turtle.point.y then turtle.gotoY(travelPlane) end end function Builder:build() local direction = 1 local last = #schematic.blocks local travelPlane = 0 local minFuel = schematic.height + schematic.width + schematic.length + 100 local throttle = Util.throttle() if self.mode == 'destroy' then direction = -1 last = 1 turtle.status = 'destroying' elseif not self.isCommandComputer then travelPlane = self:findTravelPlane(self.index) turtle.status = 'building' if not self.confirmFacing then local facing = self:getTurtleFacing() if facing then self.confirmFacing = true self.facing = facing end end end UI:setPage('blank') for i = self.index, last, direction do self.index = i local b = schematic:getComputedBlock(i) if b.id ~= 'minecraft:air' then if self.isCommandComputer then self:logBlock(self.index, b) local id = b.id if self.mode == 'destroy' then id = 'minecraft:air' end local function placeBlock(id, dmg, x, y, z) local cx, cy, cz = commands.getBlockPosition() local command = table.concat({ "setblock", cx + x + 1, "~" .. y, cz + z + 1, id, dmg, }, ' ') commands.execAsync(command) local result = { os.pullEvent("task_complete") } if not result[4] then Util.print(result[5]) if self.mode ~= 'destroy' then read() end end end placeBlock(id, b.odmg, b.x, b.y, b.z) if b.twoHigh then local _, topBlock = schematic:findIndexAt(b.x, b.z, b.y + 1, true) if topBlock then placeBlock(id, topBlock.odmg, b.x, b.y + 1, b.z) end end elseif self.mode == 'destroy' then b.heading = nil -- don't make the supplier follow the block heading self:logBlock(self.index, b) if b.y ~= turtle.getPoint().y then turtle.gotoY(b.y) end self:goto(b.x, b.z, b.y) turtle.digDown() -- if no supplier, then should fill all slots if turtle.getItemCount(self.resourceSlots) > 0 or turtle.getFuelLevel() < minFuel then if turtle.getFuelLevel() < minFuel or not self:inAirDropoff() then turtle.gotoPoint(SUPPLIES_PT) os.sleep(.1) -- random 'Computer is not connected' error... self:dumpInventoryWithCheck() self:refuel() end turtle.status = 'destroying' end else -- Build mode local slot = Builder:selectItem(b.id, b.dmg) if not slot or turtle.getFuelLevel() < minFuel then if turtle.getPoint().x > -1 or turtle.getPoint().z > -1 then self:gotoTravelPlane(travelPlane) end self:resupply() return end local y = b.y if b.twoHigh then y = b.y + 1 end if y > travelPlane then travelPlane = y end self:logBlock(self.index, b) if b.direction then b.needResupply = false self:placeDirectionalBlock(b, slot, travelPlane) if b.needResupply then -- lost our piston in a hopper probably self:gotoTravelPlane(travelPlane) self:resupply() return end else self:gotoTravelPlane(travelPlane) self:goto(b.x, b.z, b.y) b.placed = self:placeDown(slot) end if b.placed then slot.qty = slot.qty - 1 else print('failed to place block') end end if self.mode == 'destroy' then self:saveProgress(math.max(self.index, 1)) else self:saveProgress(self.index + 1) end else throttle() -- sleep in case there are a large # of skipped blocks end if turtle.abort then turtle.status = 'aborting' self:gotoTravelPlane(travelPlane) turtle.gotoPoint(SUPPLIES_PT) turtle.setHeading(0) Builder:dumpInventory() Event.exitPullEvents() UI.term:reset() print('Aborted') return end end if device.wireless_modem then Message.broadcast('finished') end if not self.isCommandComputer then self:gotoTravelPlane(travelPlane) turtle.gotoPoint(SUPPLIES_PT) turtle.setHeading(0) Builder:dumpInventory() for i = 1, 4 do turtle.turnRight() end end --self.index = 1 --os.queueEvent('build') --UI.term:reset() fs.delete(schematic.filename .. '.progress') print('Finished') Event.exitPullEvents() end --[[-- blankPage --]]-- blankPage = UI.Page() function blankPage:draw() self:clear(colors.black) self:setCursorPos(1, 1) end function blankPage:enable() self:sync() UI.Page.enable(self) end --[[-- selectSubstitutionPage --]]-- selectSubstitutionPage = UI.Page({ titleBar = UI.TitleBar({ title = 'Select a substitution', previousPage = 'listing' }), grid = UI.ScrollingGrid({ columns = { { heading = 'id', key = 'id' }, { heading = 'dmg', key = 'dmg' }, }, sortColumn = 'id', height = UI.term.height-1, autospace = true, y = 2, }), }) function selectSubstitutionPage:enable() self.grid:adjustWidth() self.grid:setIndex(1) UI.Page.enable(self) end function selectSubstitutionPage:eventHandler(event) if event.type == 'grid_select' then substitutionPage.sub = event.selected UI:setPage(substitutionPage) elseif event.type == 'key' and event.key == 'q' then UI:setPreviousPage() else return UI.Page.eventHandler(self, event) end return true end --[[-- substitutionPage --]]-- substitutionPage = UI.Page { titleBar = UI.TitleBar { previousPage = true, title = 'Substitute a block' }, menuBar = UI.MenuBar { y = 2, buttons = { { text = 'Accept', event = 'accept', help = 'Accept' }, { text = 'Revert', event = 'revert', help = 'Restore to original' }, { text = 'Air', event = 'air', help = 'Air' }, }, }, info = UI.Window { y = 4, width = UI.term.width, height = 3 }, grid = UI.ScrollingGrid { columns = { { heading = 'Name', key = 'display_name', width = UI.term.width-9 }, { heading = 'Qty', key = 'fQty', width = 5 }, }, sortColumn = 'display_name', height = UI.term.height-7, y = 7, }, throttle = UI.Throttle { }, statusBar = UI.StatusBar { } } substitutionPage.menuBar:add({ filterLabel = UI.Text({ value = 'Search', x = UI.term.width-14, }), filter = UI.TextEntry({ x = UI.term.width-7, width = 7, }) }) function substitutionPage.info:draw() local sub = self.parent.sub local inName = itemDB:getName({ name = sub.id, damage = sub.dmg }) local outName = '' if sub.sid then outName = itemDB:getName({ name = sub.sid, damage = sub.sdmg }) end self:clear() self:setCursorPos(1, 1) self:print(' Replace ' .. inName .. '\n') --self:print(' ' .. sub.id .. ':' .. sub.dmg .. '\n', nil, colors.yellow) self:print(' With ' .. outName) end function substitutionPage:enable() self.allItems = convertBack(Builder.itemAdapter:refresh()) self.grid.values = self.allItems for _,item in pairs(self.grid.values) do item.key = item.id .. ':' .. item.dmg item.lname = string.lower(item.display_name) item.fQty = Util.toBytes(item.qty) end self.grid:update() self.menuBar.filter.value = '' self.menuBar.filter.pos = 1 self:setFocus(self.menuBar.filter) UI.Page.enable(self) end --function substitutionPage:focusFirst() -- self.menuBar.filter:focus() --end function substitutionPage:applySubstitute(id, dmg) self.sub.sid = id self.sub.sdmg = dmg end function substitutionPage:eventHandler(event) if event.type == 'grid_focus_row' then local s = string.format('%s:%d', event.selected.id, event.selected.dmg) self.statusBar:setStatus(s) self.statusBar:draw() elseif event.type == 'grid_select' then -- if not item:lookupName(event.selected.id, event.selected.dmg) then -- blocks.nameDB:add({event.selected.id, event.selected.dmg}, event.selected.name) -- blocks.nameDB:flush() -- end self:applySubstitute(event.selected.id, event.selected.dmg) self.info:draw() elseif event.type == 'text_change' then local text = event.text if #text == 0 then self.grid.values = self.allItems else self.grid.values = { } for _,item in pairs(self.allItems) do if string.find(item.lname, text) then table.insert(self.grid.values, item) end end end --self.grid:adjustWidth() self.grid:update() self.grid:setIndex(1) self.grid:draw() elseif event.type == 'accept' or event.type == 'air' or event.type == 'revert' then self.statusBar:setStatus('Saving changes...') self.statusBar:draw() self:sync() if event.type == 'air' then self:applySubstitute('minecraft:air', 0) end if event.type == 'revert' then subDB:remove(self.sub) elseif not self.sub.sid then self.statusBar:setStatus('Select a substition') self.statusBar:draw() return UI.Page.eventHandler(self, event) else subDB:add(self.sub) end self.throttle:enable() Builder:reloadSchematic(function() self.throttle:update() end) self.throttle:disable() UI:setPage('listing') elseif event.type == 'cancel' then UI:setPreviousPage() end return UI.Page.eventHandler(self, event) end --[[-- SupplyPage --]]-- supplyPage = UI.Page { titleBar = UI.TitleBar { title = 'Waiting for supplies', previousPage = 'start' }, menuBar = UI.MenuBar { y = 2, buttons = { --{ text = 'Refresh', event = 'refresh', help = 'Refresh inventory' }, { text = 'Continue', event = 'build', help = 'Continue building' }, { text = 'Menu', event = 'menu', help = 'Return to main menu' }, -- { text = 'Force Craft', event = 'craft', help = 'Request crafting (again)' }, } }, grid = UI.Grid { columns = { { heading = 'Name', key = 'display_name', width = UI.term.width - 7 }, { heading = 'Need', key = 'need', width = 4 }, }, sortColumn = 'display_name', y = 3, width = UI.term.width, height = UI.term.height - 3 }, statusBar = UI.StatusBar { columns = { { 'Help', 'help', UI.term.width - 13 }, { 'Fuel', 'fuel', 11 } } }, accelerators = { c = 'craft', r = 'refresh', b = 'build', m = 'menu', }, } function supplyPage:eventHandler(event) --[[ if event.type == 'craft' then local s = self.grid:getSelected() if Builder.itemAdapter:craftItems({{ name = s.id, damage = s.dmg, nbtHash = s.nbt_hash }}, s.need-s.qty) then local name = s.display_name or '' self.statusBar:timedStatus('Requested ' .. s.need-s.qty .. ' ' .. name, 3) else self.statusBar:timedStatus('Unable to craft') end elseif event.type == 'refresh' then self:refresh() ]] if event.type == 'build' then Builder:build() elseif event.type == 'menu' then Builder:dumpInventory() --Builder.status = 'idle' UI:setPage('start') turtle.status = 'idle' elseif event.type == 'grid_focus_row' then self.statusBar:setValue('help', event.selected.id .. ':' .. event.selected.dmg) self.statusBar:draw() elseif event.type == 'focus_change' then self.statusBar:timedStatus(event.focused.help, 3) end return UI.Page.eventHandler(self, event) end function supplyPage:enable() self.grid:setIndex(1) self.statusBar:setValue('fuel', string.format('Fuel: %dk', math.floor(turtle.getFuelLevel() / 1024))) -- self.statusBar:setValue('block', -- string.format('Block: %d', Builder.index)) Event.addNamedTimer('supplyRefresh', 6, true, function() if self.enabled then Builder:autocraft(Builder:getSupplies()) self:refresh() self.statusBar:timedStatus('Refreshed ', 2) self:sync() end end) UI.Page.enable(self) end function supplyPage:disable() Event.cancelNamedTimer('supplyRefresh') end function supplyPage:setSupplies(supplies) local t = { } for _,s in pairs(supplies) do local key = s.id .. ':' .. s.dmg local entry = t[key] if not entry then entry = Util.shallowCopy(s) t[key] = entry else entry.need = entry.need + s.need end entry.need = entry.need - turtle.getItemCount(s.index) end self.grid:setValues(t) end function supplyPage:refresh() self.statusBar:timedStatus('Refreshed ', 3) local supplies = Builder:getSupplies() if #supplies == 0 then Builder:build() else self:setSupplies(supplies) self.grid:draw() end end --[[-- ListingPage --]]-- listingPage = UI.Page({ titleBar = UI.TitleBar({ title = 'Supply List', previousPage = 'start' }), menuBar = UI.MenuBar({ y = 2, buttons = { { text = 'Craft', event = 'craft', help = 'Request crafting' }, { text = 'Refresh', event = 'refresh', help = 'Refresh inventory' }, { text = 'Toggle', event = 'toggle', help = 'Toggles needed blocks' }, { text = 'Substitute', event = 'edit', help = 'Substitute a block' }, } }), grid = UI.ScrollingGrid({ columns = { { heading = 'Name', key = 'display_name', width = UI.term.width - 14 }, { heading = 'Need', key = 'need', width = 5 }, { heading = 'Have', key = 'qty', width = 5 }, }, sortColumn = 'display_name', y = 3, height = UI.term.height-3, help = 'Set a block type or pick a substitute block' }), accelerators = { q = 'menu', c = 'craft', r = 'refresh', t = 'toggle', }, statusBar = UI.StatusBar(), fullList = true }) function listingPage:enable(throttle) listingPage:refresh(throttle) UI.Page.enable(self) end function listingPage:eventHandler(event) if event.type == 'craft' then local s = self.grid:getSelected() local item = convertSingleBack(Builder.itemAdapter:getItemInfo({ name = s.id, damage = s.dmg, nbtHash = s.nbt_hash, })) if item and item.is_craftable then local qty = math.max(0, s.need - item.qty) if item then Builder.itemAdapter:craftItems({{ name = s.id, damage = s.dmg, nbtHash = s.nbt_hash, count = qty }}) local name = s.display_name or s.id self.statusBar:timedStatus('Requested ' .. qty .. ' ' .. name, 3) end else self.statusBar:timedStatus('Unable to craft') end elseif event.type == 'grid_focus_row' then self.statusBar:setStatus(event.selected.id .. ':' .. event.selected.dmg) self.statusBar:draw() elseif event.type == 'refresh' then self:refresh() self:draw() self.statusBar:timedStatus('Refreshed ', 3) elseif event.type == 'toggle' then self.fullList = not self.fullList self:refresh() self:draw() elseif event.type == 'menu' then UI:setPage('start') elseif event.type == 'edit' or event.type == 'grid_select' then self:manageBlock(self.grid:getSelected()) elseif event.type == 'focus_change' then if event.focused.help then self.statusBar:timedStatus(event.focused.help, 3) end end return UI.Page.eventHandler(self, event) end function listingPage.grid:getDisplayValues(row) row = Util.shallowCopy(row) row.need = Util.toBytes(row.need) row.qty = Util.toBytes(row.qty) return row end function listingPage.grid:getRowTextColor(row, selected) if row.is_craftable then return colors.yellow end return UI.Grid:getRowTextColor(row, selected) end function listingPage:refresh(throttle) local supplyList = Builder:getBlockCounts() Builder.itemAdapter:refresh(throttle) for _,b in pairs(supplyList) do if b.need > 0 then local item = convertSingleBack(Builder.itemAdapter:getItemInfo({ name = b.id, damage = b.dmg, nbtHash = b.nbt_hash, })) if item then -- local block = blocks.blockDB:lookup(b.id, b.dmg) -- if not block then -- blocks.nameDB:add({b.id, b.dmg}, item.display_name) -- elseif not block.name and item.display_name then -- blocks.nameDB:add({b.id, b.dmg}, item.display_name) -- end b.display_name = item.display_name b.qty = item.qty b.is_craftable = item.is_craftable else b.display_name = itemDB:getName({ name = b.id, damage = b.dmg }) end end if throttle then throttle() end end --blocks.nameDB:flush() if self.fullList then self.grid:setValues(supplyList) else local t = {} for _,b in pairs(supplyList) do if self.fullList or b.qty < b.need then table.insert(t, b) end end self.grid:setValues(t) end self.grid:setIndex(1) end function listingPage:manageBlock(selected) local substitutes = subDB:lookupBlocksForSub(selected.id, selected.dmg) if Util.empty(substitutes) then substitutionPage.sub = { id = selected.id, dmg = selected.dmg } UI:setPage(substitutionPage) elseif Util.size(substitutes) == 1 then local _,sub = next(substitutes) substitutionPage.sub = sub UI:setPage(substitutionPage) else selectSubstitutionPage.selected = selected selectSubstitutionPage.grid:setValues(substitutes) UI:setPage(selectSubstitutionPage) end end --[[-- startPage --]]-- local wy = 2 local my = 3 if UI.term.width < 30 then wy = 9 my = 2 end local startPage = UI.Page { -- titleBar = UI.TitleBar({ title = 'Builder v' .. Builder.version }), window = UI.Window { x = UI.term.width-16, y = wy, width = 16, height = 9, backgroundColor = colors.gray, grid = UI.Grid { columns = { { heading = 'Name', key = 'name', width = 6 }, { heading = 'Value', key = 'value', width = 7 }, }, disableHeader = true, --y = UI.term.height-1, x = 1, y = 2, width = 16, height = 9, --autospace = true, selectable = false, backgroundColor = colors.gray }, }, menu = UI.Menu { x = 2, y = my, height = 7, backgroundColor = UI.Page.defaults.backgroundColor, menuItems = { { prompt = 'Set starting level', event = 'startLevel' }, { prompt = 'Set starting block', event = 'startBlock' }, { prompt = 'Supply list', event = 'assignBlocks' }, { prompt = 'Toggle mode', event = 'toggleMode' }, { prompt = 'Toggle facing', event = 'toggleFacing' }, { prompt = 'Begin', event = 'begin' }, { prompt = 'Quit', event = 'quit' } } }, throttle = UI.Throttle { }, accelerators = { x = 'test', q = 'quit' } } function startPage:draw() local fuel = turtle.getFuelLevel() if fuel > 9999 then fuel = string.format('%dk', math.floor(fuel/1024)) end local t = { { name = 'mode', value = Builder.mode }, { name = 'start', value = Builder.index }, { name = 'blocks', value = #schematic.blocks }, --{ name = 'fuel', value = fuel }, { name = 'facing', value = Builder.facing }, { name = 'length', value = schematic.length }, { name = 'width', value = schematic.width }, { name = 'height', value = schematic.height }, } self.window.grid:setValues(t) UI.Page.draw(self) end function startPage:enable() self:setFocus(self.menu) UI.Page.enable(self) end function startPage:eventHandler(event) if event.type == 'startLevel' then local dialog = UI.Dialog({ title = 'Enter Starting Level', height = 7, form = UI.Form { y = 3, x = 2, height = 4, text = UI.Text({ x = 5, y = 1, textColor = colors.gray, value = '0 - ' .. schematic.height }), textEntry = UI.TextEntry({ x = 15, y = 1, '0 - 11', width = 7 }), }, statusBar = UI.StatusBar(), }) dialog.eventHandler = function(self, event) if event.type == 'form_complete' then local l = tonumber(self.form.textEntry.value) if l and l < schematic.height and l >= 0 then for k,v in pairs(schematic.blocks) do if v.y >= l then Builder.index = k Builder:saveProgress(Builder.index) UI:setPreviousPage() break end end else self.statusBar:timedStatus('Invalid Level', 3) end elseif event.type == 'form_cancel' or event.type == 'cancel' then UI:setPreviousPage() else return UI.Dialog.eventHandler(self, event) end return true end dialog:setFocus(dialog.form.textEntry) UI:setPage(dialog) elseif event.type == 'startBlock' then local dialog = UI.Dialog { title = 'Enter Block Number', height = 7, form = UI.Form { y = 3, x = 2, height = 4, text = UI.Text { x = 2, y = 1, value = '1 - ' .. #schematic.blocks, textColor = colors.gray }, textEntry = UI.TextEntry { x = 16, y = 1, value = tostring(Builder.index), width = 10, limit = 8 } }, statusBar = UI.StatusBar(), } dialog.eventHandler = function(self, event) if event.type == 'form_complete' then local bn = tonumber(self.form.textEntry.value) if bn and bn < #schematic.blocks and bn >= 0 then Builder.index = bn Builder:saveProgress(Builder.index) UI:setPreviousPage() else self.statusBar:timedStatus('Invalid Block', 3) end elseif event.type == 'form_cancel' or event.type == 'cancel' then UI:setPreviousPage() else return UI.Dialog.eventHandler(self, event) end return true end dialog:setFocus(dialog.form.textEntry) UI:setPage(dialog) elseif event.type == 'assignBlocks' then -- this might be an approximation of the blocks needed -- as the current level's route may or may not have been -- computed Builder:dumpInventory() UI:setPage('listing', function() self.throttle:update() end) self.throttle:disable() elseif event.type == 'toggleMode' then if Builder.mode == 'build' then if Builder.index == 1 then Builder.index = #schematic.blocks end Builder.mode = 'destroy' else if Builder.index == #schematic.blocks then Builder.index = 1 end Builder.mode = 'build' end self:draw() elseif event.type == 'toggleFacing' then local directions = { [ 'north' ] = 'east', [ 'east' ] = 'south', [ 'south' ] = 'west', [ 'west' ] = 'north', } Builder.facing = directions[Builder.facing] Builder:saveProgress(Builder.index) self:draw() elseif event.type == 'begin' then UI:setPage('blank') --Builder.status = 'building' turtle.status = 'thinking' print('Reloading schematic') Builder:reloadSchematic(Util.throttle()) Builder:dumpInventory() Builder:refuel() if Builder.mode == 'destroy' then if device.wireless_modem then Message.broadcast('supplyList', { uid = 1, slots = Builder:getAirResupplyList() }) end print('Beginning destruction') else print('Starting build') end -- reset piston cache in case wrench was substituted pistonFacings = { down = { }, forward = { }, } Builder:build() elseif event.type == 'quit' then UI.term:reset() Event.exitPullEvents() end return UI.Page.eventHandler(self, event) end --[[-- startup logic --]]-- local args = {...} if #args < 1 then error('supply file name') end Builder.itemAdapter = MEAdapter() if not Builder.itemAdapter:isValid() then Builder.itemAdapter = ChestAdapter() if not Builder.itemAdapter:isValid() then error('A chest or ME interface must be below turtle') end end if commands then turtle = { policies = { }, point = { x = -1, y = 0, z = -1, heading = 0 }, getFuelLevel = function() return 20000 end, select = function() end, getItemCount = function() return 0 end, getHeadingInfo = function(heading) local headings = { [ 0 ] = { xd = 1, zd = 0, yd = 0, heading = 0, direction = 'east' }, [ 1 ] = { xd = 0, zd = 1, yd = 0, heading = 1, direction = 'south' }, [ 2 ] = { xd = -1, zd = 0, yd = 0, heading = 2, direction = 'west' }, [ 3 ] = { xd = 0, zd = -1, yd = 0, heading = 3, direction = 'north' }, [ 4 ] = { xd = 0, zd = 0, yd = 1, heading = 4, direction = 'up' }, [ 5 ] = { xd = 0, zd = 0, yd = -1, heading = 5, direction = 'down' } } local namedHeadings = { east = headings[0], south = headings[1], west = headings[2], north = headings[3], up = headings[4], down = headings[5] } if heading and type(heading) == 'string' then return namedHeadings[heading] end heading = heading or 0 return headings[heading] end, } end multishell.setTitle(multishell.getCurrent(), 'Builder v' .. Builder.version) maxStackDB:load() subDB:load() UI.term:reset() turtle.status = 'reading' print('Loading schematic') schematic:load(args[1]) print('Substituting blocks') Builder:substituteBlocks(Util.throttle()) if not fs.exists(BUILDER_DIR) then fs.makeDir(BUILDER_DIR) end Builder:loadProgress(schematic.filename .. '.progress') UI:setPages({ listing = listingPage, start = startPage, supply = supplyPage, blank = blankPage }) UI:setPage('start') if Builder.isCommandComputer then Event.pullEvents() else turtle.run(function() turtle.setPolicy(turtle.policies.digAttack) turtle.setPoint(SUPPLIES_PT) turtle.point.heading = 0 UI:pullEvents() end) end
--- Component to handle GUI timers. -- Timer updating by game delta time. If game is not focused - -- timer will be not updated. -- @module druid.timer --- Component events -- @table Events -- @tfield druid_event on_tick On timer tick callback. Fire every second -- @tfield druid_event on_set_enabled On timer change enabled state callback -- @tfield druid_event on_timer_end On timer end callback --- Component fields -- @table Fields -- @tfield node node Trigger node -- @tfield number from Initial timer value -- @tfield number target Target timer value -- @tfield number value Current timer value local Event = require("druid.event") local const = require("druid.const") local formats = require("druid.helper.formats") local helper = require("druid.helper") local component = require("druid.component") local M = component.create("timer", { const.ON_UPDATE }) --- Component init function -- @function timer:init -- @tparam node node Gui text node -- @tparam number seconds_from Start timer value in seconds -- @tparam[opt=0] number seconds_to End timer value in seconds -- @tparam[opt] function callback Function on timer end function M.init(self, node, seconds_from, seconds_to, callback) self.node = self:get_node(node) seconds_from = math.max(seconds_from, 0) seconds_to = math.max(seconds_to or 0, 0) self.on_tick = Event() self.on_set_enabled = Event() self.on_timer_end = Event(callback) self:set_to(seconds_from) self:set_interval(seconds_from, seconds_to) if seconds_to - seconds_from == 0 then self:set_state(false) self.on_timer_end:trigger(self:get_context(), self) end return self end function M.update(self, dt) if not self.is_on then return end self.temp = self.temp + dt local dist = math.min(1, math.abs(self.value - self.target)) if self.temp > dist then self.temp = self.temp - dist self.value = helper.step(self.value, self.target, 1) M.set_to(self, self.value) self.on_tick:trigger(self:get_context(), self.value) if self.value == self.target then self:set_state(false) self.on_timer_end:trigger(self:get_context(), self) end end end --- Set text to text field -- @function timer:set_to -- @tparam number set_to Value in seconds function M.set_to(self, set_to) self.last_value = set_to gui.set_text(self.node, formats.second_string_min(set_to)) end --- Called when update -- @function timer:set_state -- @tparam bool is_on Timer enable state function M.set_state(self, is_on) self.is_on = is_on self.on_set_enabled:trigger(self:get_context(), is_on) end --- Set time interval -- @function timer:set_interval -- @tparam number from Start time in seconds -- @tparam number to Target time in seconds function M.set_interval(self, from, to) self.from = from self.value = from self.temp = 0 self.target = to M.set_state(self, true) M.set_to(self, from) end return M
local luaunit = require 'luaunit' local mock_os = require 'me.strangepan.libs.computercraft.mock.v1.os' TestClass = {} function TestClass:setup() self.base_os = {} self.sleep_invocation_count = 0 self.base_os.sleep = function() self.sleep_invocation_count = self.sleep_invocation_count + 1 end self.foo_invocation_count = 0 self.base_os.foo = function() self.foo_invocation_count = self.foo_invocation_count + 1 end self.under_test = mock_os.builder():build_upon(self.base_os):build() end function TestClass:test_sleep_didNotInvoke() self.under_test.sleep(0.5) luaunit.assertEquals(self.sleep_invocation_count, 0) end function TestClass:test_foo_didInvoke() self.under_test.foo() luaunit.assertEquals(self.foo_invocation_count, 1) end os.exit(luaunit.LuaUnit.run())
Config = {} -- Script locale (only .Lua) Config.Locale = 'fr' Config.AutoFindFixePhones = true -- Automatically add pay phones as they are found by their models. Config.FixePhone = { -- Mission Row ['911'] = { name = _U('mission_row'), coords = { x = 441.2, y = -979.7, z = 30.58 } }, -- ['372-9663'] = { -- name = _U('phone_booth'), -- coords = { x = 372.305, y = -966.373, z = 28.413 } -- }, } Config.KeyOpenClose = 288 -- F1 Config.KeyTakeCall = 38 -- E Config.UseMumbleVoIP = false -- Use Frazzle's Mumble-VoIP Resource (Recomended!) https://github.com/FrazzIe/mumble-voip Config.UseTokoVoIP = false Config.ShowNumberNotification = false -- Show Number or Contact Name when you receive new SMS
local client, string = client, string local awful = require('awful') local gears = require('gears') local Container = require('sanity/util/container') local display = require('sanity/util/display') local text = require('sanity/util/text') local fixed = require('wibox.layout.fixed') local margin = require('wibox.container.margin') local background = require('wibox.container.background') local function client_button(c) if c == client.focus then c.minimized = true else -- Without this, the following -- :isvisible() makes no sense c.minimized = false if not c:isvisible() and c.first_tag then c.first_tag:view_only() end -- This will also un-minimize -- the client, if needed client.focus = c c:raise() end end local spacer = margin(background(margin(fixed.horizontal(), 1, 1), colors.background.."80"), 6, 0, 10, 3) local function create_client_window_icon(c) local icon_container = display.get_icon_widget(c) local container = Container { widget = icon_container, } local bubble = display.bubble(container, false, true) container.bubble = bubble function container:set_color(fg, bg, border) icon_container:set_color(fg) bubble.background_container.bg = bg bubble.background_container.shape_border_color = border end return container end local function update_func(window_list, buttons, _, data, clients) window_list:reset() if #clients == 0 then return end if not data.client_icons then data.client_icons = {} end function client_sort(a, b) if a.first_tag.index ~= b.first_tag.index then return a.first_tag.index < b.first_tag.index end if a.launch_time ~= b.launch_time then return a.launch_time < b.launch_time end if a.pid ~= nil and b.pid ~= nil then return a.pid < b.pid end return a.name < b.name end table.sort(clients, client_sort) local focused_screen = awful.screen.focused() local focused_tag_idx = focused_screen.selected_tag and focused_screen.selected_tag.index or 1 local client_focus_color = colors.white local prev_tag_idx = nil for idx=1, #clients do local c = clients[idx] local color = colors.background.."00" local fg_color = colors.background.."80" local border_color = colors.background.."80" local name = string.format('%s (%s)', text.trim(c.name), c.class) local tag_idx = c.first_tag.index if c == client.focus then border_color = colors.background color = colors.yellow client_focus_color = color fg_color = colors.background elseif tag_idx == focused_tag_idx then if c.minimized then border_color = colors.purple fg_color = colors.purple elseif c.ontop then border_color = colors.blue fg_color = colors.blue else border_color = colors.background fg_color = colors.background end else if c.minimized then border_color = colors.purple.."80" fg_color = colors.purple elseif c.ontop then border_color = colors.blue.."80" fg_color = colors.blue end end local container = data.client_icons[c] if not container then container = create_client_window_icon(c) container:buttons(awful.widget.common.create_buttons(buttons, c)) data.client_icons[c] = container end if tag_idx ~= prev_tag_idx then window_list:add(spacer) end prev_tag_idx = tag_idx container:set_color(fg_color, color, border_color) container:set_tooltip_color(name, nil, colors.white) window_list:add(container.bubble) end end local function factory(args) return awful.widget.tasklist { screen = args.screen, filter = awful.widget.tasklist.filter.alltags, buttons = gears.table.join( awful.button({}, 1, client_button), awful.button({}, 3, client_button) ), update_function = update_func, layout = { fill_space = false, layout = fixed.horizontal } } end return factory
local Package = game:GetService("ReplicatedStorage").Fusion local New = require(Package.Instances.New) local Children = require(Package.Instances.Children) local OnEvent = require(Package.Instances.OnEvent) return function() it("should connect event handlers", function() local fires = 0 local ins = New "Folder" { Name = "Foo", [OnEvent "AncestryChanged"] = function() fires += 1 end } ins.Parent = game ins:Destroy() task.wait() expect(fires).never.to.equal(0) end) it("should throw for non-existent events", function() expect(function() New "Folder" { Name = "Foo", [OnEvent "Frobulate"] = function() end } end).to.throw("cannotConnectEvent") end) it("should throw for non-event event handlers", function() expect(function() New "Folder" { Name = "Foo", [OnEvent "Name"] = function() end } end).to.throw("cannotConnectEvent") end) it("shouldn't fire events during initialisation", function() local fires = 0 local ins = New "Folder" { Parent = game, Name = "Foo", [OnEvent "ChildAdded"] = function() fires += 1 end, [OnEvent "Changed"] = function() fires += 1 end, [OnEvent "AncestryChanged"] = function() fires += 1 end, [Children] = New "Folder" { Name = "Bar" } } local totalFires = fires ins:Destroy() task.wait() expect(totalFires).to.equal(0) end) it("should not inhibit garbage collection", function() local ref = setmetatable({}, {__mode = "v"}) do ref[1] = New "Folder" { [OnEvent "Changed"] = function() end } end local startTime = os.clock() repeat task.wait() until ref[1] == nil or os.clock() > startTime + 5 expect(ref[1]).to.equal(nil) end) end
package.path = "?.lua;test/lua/errors/?.lua" require 'args' -- arg type tests for table library functions -- table.concat local somestringstable = {{8,7,6,5,4,3,2,1,}} local somenonstringtable = {{true,true,true,true,true,true,true,true,}} local somesep = {',',1.23} local notasep = {aboolean,atable,afunction} local somei = {2,'2','2.2'} local somej = {4,'4','4.4'} local notij = {astring,aboolean,atable,afunction} banner('table.concat') checkallpass('table.concat',{somestringstable}) checkallpass('table.concat',{somestringstable,somesep}) checkallpass('table.concat',{somestringstable,{'-'},somei}) checkallpass('table.concat',{somestringstable,{'-'},{2},somej}) checkallerrors('table.concat',{notatable},'bad argument') checkallerrors('table.concat',{somenonstringtable},'boolean') checkallerrors('table.concat',{somestringstable,notasep},'bad argument') checkallerrors('table.concat',{somestringstable,{'-'},notij},'bad argument') checkallerrors('table.concat',{somestringstable,{'-'},{2},notij},'bad argument') -- table.insert banner('table.insert') checkallpass('table.insert',{sometable,notanil}) checkallpass('table.insert',{sometable,somei,notanil}) checkallerrors('table.insert',{notatable,somestring},'bad argument') checkallerrors('table.insert',{sometable,notij,notanil},'bad argument') -- table.remove banner('table.remove') checkallpass('table.remove',{sometable}) checkallpass('table.remove',{sometable,somei}) checkallerrors('table.remove',{notatable},'bad argument') checkallerrors('table.remove',{notatable,somei},'bad argument') checkallerrors('table.remove',{sometable,notij},'bad argument') -- table.sort local somecomp = {nil,afunction,n=2} local notacomp = {astring,anumber,aboolean,atable} banner('table.sort') checkallpass('table.sort',{somestringstable,somecomp}) checkallerrors('table.sort',{sometable},'attempt to') checkallerrors('table.sort',{notatable,somecomp},'bad argument') checkallerrors('table.sort',{sometable,notacomp},'bad argument') -- table get banner('table_get - tbl[key]') function table_get(tbl,key) return tbl[key] end checkallpass('table_get',{sometable,anylua}) -- table set banner('table_set - tbl[key]=val') function table_set(tbl,key,val) tbl[key]=val end function table_set_nil_key(tbl,val) tbl[nil]=val end checkallpass('table_set',{sometable,notanil,anylua}) checkallerrors('table_set_nil_key',{sometable,anylua},'table index') -- table.unpack banner('table.unpack') checkallpass('table.unpack',{sometable}) checkallpass('table.unpack',{sometable,{3,'5'}}) checkallpass('table.unpack',{sometable,{3,'5'},{1.25,'7'}}) checkallerrors('table.unpack',{notatable,somenumber,somenumber},'bad argument') checkallerrors('table.unpack',{sometable,nonnumber,somenumber},'bad argument') checkallerrors('table.unpack',{sometable,somenumber,nonnumber},'bad argument')
-- Copyright (c) 2019 Redfern, Trevor <trevorredfern@gmail.com> -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("Scenes - New Game", function() local Scene = require "scenes.scene" local NewGame = require "scenes.new_game" local Game = require "scenes.game" local Title = require "scenes.title" it("can create a new game", function() local n = NewGame:new() n:keypressed("space") assert.is_true(Scene.current_scene:isInstanceOf(Game)) end) it("can return to the title screen", function() local n = NewGame:new() n:keypressed("escape") assert.is_true(Scene.current_scene:isInstanceOf(Title)) end) end)
-------------------------------- -- @module cc -------------------------------------------------------- -- the cc CSLoader -- @field [parent=#cc] CSLoader#CSLoader CSLoader preloaded module return nil
local Skada = Skada -- cache frequently used globals local pairs, ipairs, select = pairs, ipairs, select local format, max = string.format, math.max local GetSpellInfo = Skada.GetSpellInfo local cacheTable = Skada.cacheTable local misstypes = Skada.missTypes local _ -- =================== -- -- Damage Taken Module -- -- =================== -- Skada:AddLoadableModule("Damage Taken", function(L) if Skada:IsDisabled("Damage Taken") then return end local mod = Skada:NewModule(L["Damage Taken"]) local playermod = mod:NewModule(L["Damage spell list"]) local spellmod = playermod:NewModule(L["Damage spell details"]) local sdetailmod = spellmod:NewModule(L["Damage Breakdown"]) local sourcemod = mod:NewModule(L["Damage source list"]) local tdetailmod = sourcemod:NewModule(L["Damage spell list"]) local tContains, T = tContains, Skada.Table local new, del = Skada.TablePool() -- spells in the following table will be ignored. local ignoredSpells = {} local function log_damage(set, dmg, tick) if dmg.spellid and tContains(ignoredSpells, dmg.spellid) then return end local player = Skada:GetPlayer(set, dmg.playerid, dmg.playername, dmg.playerflags) if not player then return end player.damagetaken = (player.damagetaken or 0) + dmg.amount player.totaldamagetaken = (player.totaldamagetaken or 0) + dmg.amount set.damagetaken = (set.damagetaken or 0) + dmg.amount set.totaldamagetaken = (set.totaldamagetaken or 0) + dmg.amount -- add absorbed damage to total damage local absorbed = dmg.absorbed or 0 if absorbed > 0 then player.totaldamagetaken = player.totaldamagetaken + absorbed set.totaldamagetaken = set.totaldamagetaken + absorbed end -- saving this to total set may become a memory hog deluxe. if set ~= Skada.current then return end local spellname = dmg.spellname .. (tick and L["DoT"] or "") local spell = player.damagetakenspells and player.damagetakenspells[spellname] if not spell then player.damagetakenspells = player.damagetakenspells or {} spell = {id = dmg.spellid, school = dmg.spellschool, amount = 0, total = 0} player.damagetakenspells[spellname] = spell elseif dmg.spellid and dmg.spellid ~= spell.id then if dmg.spellschool and dmg.spellschool ~= spell.school then spellname = spellname .. " (" .. (Skada.schoolnames[dmg.spellschool] or OTHER) .. ")" else spellname = GetSpellInfo(dmg.spellid) end if not player.damagetakenspells[spellname] then player.damagetakenspells[spellname] = {id = dmg.spellid, school = dmg.spellschool, amount = 0, total = 0} end spell = player.damagetakenspells[spellname] end spell.count = (spell.count or 0) + 1 spell.amount = spell.amount + dmg.amount spell.total = spell.total + dmg.amount if dmg.critical then spell.critical = (spell.critical or 0) + 1 spell.criticalamount = (spell.criticalamount or 0) + dmg.amount if not spell.criticalmax or dmg.amount > spell.criticalmax then spell.criticalmax = dmg.amount end if not spell.criticalmin or dmg.amount < spell.criticalmin then spell.criticalmin = dmg.amount end elseif dmg.misstype ~= nil then spell[dmg.misstype] = (spell[dmg.misstype] or 0) + 1 elseif dmg.glancing then spell.glancing = (spell.glancing or 0) + 1 elseif dmg.crushing then spell.crushing = (spell.crushing or 0) + 1 else spell.hit = (spell.hit or 0) + 1 spell.hitamount = (spell.hitamount or 0) + dmg.amount if not spell.hitmax or dmg.amount > spell.hitmax then spell.hitmax = dmg.amount end if not spell.hitmin or dmg.amount < spell.hitmin then spell.hitmin = dmg.amount end end if absorbed > 0 then spell.total = spell.total + absorbed end if (dmg.blocked or 0) > 0 then spell.blocked = (spell.blocked or 0) + dmg.blocked end if (dmg.resisted or 0) > 0 then spell.resisted = (spell.resisted or 0) + dmg.resisted end if (dmg.overkill or 0) > 0 then spell.overkill = (spell.overkill or 0) + dmg.overkill end -- record the source if dmg.srcName then local actor = Skada:GetActor(set, dmg.srcGUID, dmg.srcName, dmg.srcFlags) if not actor then return end local source = spell.sources and spell.sources[dmg.srcName] if not source then spell.sources = spell.sources or {} spell.sources[dmg.srcName] = {amount = 0, total = 0} source = spell.sources[dmg.srcName] end source.amount = source.amount + dmg.amount source.total = source.total + dmg.amount if absorbed > 0 then source.total = source.total + absorbed end if (dmg.overkill or 0) > 0 then source.overkill = (source.overkill or 0) + dmg.overkill end end end local dmg = {} local extraATT local function SpellDamage(timestamp, eventtype, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, ...) if srcGUID ~= dstGUID then -- handle extra attacks if eventtype == "SPELL_EXTRA_ATTACKS" then local _, spellname, _, amount = ... extraATT = extraATT or T.get("DamageTaken_ExtraAttacks") if not extraATT[srcName] then extraATT[srcName] = new() extraATT[srcName].spellname = spellname extraATT[srcName].amount = amount end return end if eventtype == "SWING_DAMAGE" then dmg.spellid, dmg.spellname, dmg.spellschool = 6603, L.Melee, 1 dmg.amount, dmg.overkill, _, dmg.resisted, dmg.blocked, dmg.absorbed, dmg.critical, dmg.glancing, dmg.crushing = ... -- an extra attack? if extraATT and extraATT[srcName] then dmg.spellname = dmg.spellname .. " (" .. extraATT[srcName].spellname .. ")" extraATT[srcName].amount = max(0, extraATT[srcName].amount - 1) if extraATT[srcName].amount == 0 then extraATT[srcName] = del(extraATT[srcName]) end end else dmg.spellid, dmg.spellname, dmg.spellschool, dmg.amount, dmg.overkill, _, dmg.resisted, dmg.blocked, dmg.absorbed, dmg.critical, dmg.glancing, dmg.crushing = ... end dmg.srcGUID = srcGUID dmg.srcName = srcName dmg.srcFlags = srcFlags dmg.playerid = dstGUID dmg.playername = dstName dmg.playerflags = dstFlags dmg.misstype = nil log_damage(Skada.current, dmg, eventtype == "SPELL_PERIODIC_DAMAGE") log_damage(Skada.total, dmg, eventtype == "SPELL_PERIODIC_DAMAGE") end end local function EnvironmentDamage(timestamp, eventtype, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, ...) local envtype = ... local spellid, spellname if envtype == "Falling" or envtype == "FALLING" then spellid, spellname = 3, ACTION_ENVIRONMENTAL_DAMAGE_FALLING elseif envtype == "Drowning" or envtype == "DROWNING" then spellid, spellname = 4, ACTION_ENVIRONMENTAL_DAMAGE_DROWNING elseif envtype == "Fatigue" or envtype == "FATIGUE" then spellid, spellname = 5, ACTION_ENVIRONMENTAL_DAMAGE_FATIGUE elseif envtype == "Fire" or envtype == "FIRE" then spellid, spellname = 6, ACTION_ENVIRONMENTAL_DAMAGE_FIRE elseif envtype == "Lava" or envtype == "LAVA" then spellid, spellname = 7, ACTION_ENVIRONMENTAL_DAMAGE_LAVA elseif envtype == "Slime" or envtype == "SLIME" then spellid, spellname = 8, ACTION_ENVIRONMENTAL_DAMAGE_SLIME end if spellid and spellname then SpellDamage(nil, nil, nil, ENVIRONMENTAL_DAMAGE, nil, dstGUID, dstName, dstFlags, spellid, spellname, nil, select(2, ...)) end end local function SpellMissed(timestamp, eventtype, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, ...) if srcGUID ~= dstGUID then local amount if eventtype == "SWING_MISSED" then dmg.spellid, dmg.spellname, dmg.spellschool = 6603, L.Melee, 1 dmg.misstype, amount = ... else dmg.spellid, dmg.spellname, dmg.spellschool, dmg.misstype, amount = ... end dmg.srcGUID = srcGUID dmg.srcName = srcName dmg.srcFlags = srcFlags dmg.playerid = dstGUID dmg.playername = dstName dmg.playerflags = dstFlags dmg.amount = 0 dmg.overkill = 0 dmg.resisted = nil dmg.blocked = nil dmg.absorbed = nil dmg.critical = nil dmg.glancing = nil dmg.crushing = nil if dmg.misstype == "ABSORB" then dmg.absorbed = amount or 0 elseif dmg.misstype == "BLOCK" then dmg.blocked = amount or 0 elseif dmg.misstype == "RESIST" then dmg.resisted = amount or 0 end log_damage(Skada.current, dmg, eventtype == "SPELL_PERIODIC_MISSED") log_damage(Skada.total, dmg, eventtype == "SPELL_PERIODIC_MISSED") end end local function playermod_tooltip(win, id, label, tooltip) local set = win:GetSelectedSet() local player = set and set:GetPlayer(win.playerid, win.playername) local spell = player and player.damagetakenspells and player.damagetakenspells[label] if spell then tooltip:AddLine(label .. " - " .. player.name) if spell.school then local c = Skada.schoolcolors[spell.school] local n = Skada.schoolnames[spell.school] if c and n then tooltip:AddLine(n, c.r, c.g, c.b) end end local amount = Skada.db.profile.absdamage and spell.total or spell.amount tooltip:AddDoubleLine(L["Average"], Skada:FormatNumber(amount / spell.count), 1, 1, 1) if spell.hitmin and spell.hitmax then local spellmin = spell.hitmin if spell.criticalmin and spell.criticalmin < spellmin then spellmin = spell.criticalmin end local spellmax = spell.hitmax if spell.criticalmax and spell.criticalmax > spellmax then spellmax = spell.criticalmax end tooltip:AddLine(" ") tooltip:AddDoubleLine(L["Minimum Hit"], Skada:FormatNumber(spellmin), 1, 1, 1) tooltip:AddDoubleLine(L["Maximum Hit"], Skada:FormatNumber(spellmax), 1, 1, 1) tooltip:AddDoubleLine(L["Average Hit"], Skada:FormatNumber((spellmin + spellmax) / 2), 1, 1, 1) end end end local function spellmod_tooltip(win, id, label, tooltip) if label == L["Critical Hits"] or label == L["Normal Hits"] then local set = win:GetSelectedSet() local player = set and set:GetPlayer(win.playerid, win.playername) local spell = player and player.damagetakenspells and player.damagetakenspells[win.spellname] if spell then tooltip:AddLine(player.name .. " - " .. win.spellname) if spell.school then local c = Skada.schoolcolors[spell.school] local n = Skada.schoolnames[spell.school] if c and n then tooltip:AddLine(n, c.r, c.g, c.b) end end if label == L["Critical Hits"] and spell.criticalamount then tooltip:AddDoubleLine(L["Average"], Skada:FormatNumber(spell.criticalamount / spell.critical), 1, 1, 1) if spell.criticalmin and spell.criticalmax then tooltip:AddLine(" ") tooltip:AddDoubleLine(L["Minimum Hit"], Skada:FormatNumber(spell.criticalmin), 1, 1, 1) tooltip:AddDoubleLine(L["Maximum Hit"], Skada:FormatNumber(spell.criticalmax), 1, 1, 1) tooltip:AddDoubleLine(L["Average Hit"], Skada:FormatNumber((spell.criticalmin + spell.criticalmax) / 2), 1, 1, 1) end elseif label == L["Normal Hits"] and spell.hitamount then tooltip:AddDoubleLine(L["Average"], Skada:FormatNumber(spell.hitamount / spell.hit), 1, 1, 1) if spell.hitmin and spell.hitmax then tooltip:AddLine(" ") tooltip:AddDoubleLine(L["Minimum Hit"], Skada:FormatNumber(spell.hitmin), 1, 1, 1) tooltip:AddDoubleLine(L["Maximum Hit"], Skada:FormatNumber(spell.hitmax), 1, 1, 1) tooltip:AddDoubleLine(L["Average Hit"], Skada:FormatNumber((spell.hitmin + spell.hitmax) / 2), 1, 1, 1) end end end end end function playermod:Enter(win, id, label) win.playerid, win.playername = id, label win.title = format(L["Damage taken by %s"], label) end function playermod:Update(win, set) win.title = format(L["Damage taken by %s"], win.playername or L.Unknown) local actor, enemy = set and set:GetPlayer(win.playerid, win.playername), false if not actor and Skada.forPVP and set and set.type == "arena" then actor, enemy = set:GetEnemy(win.playername, win.playerid), true end local total = actor and actor:GetDamageTaken() or 0 if total > 0 and actor.damagetakenspells then if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for spellname, spell in pairs(actor.damagetakenspells) do nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = spellname d.spellschool = spell.school if enemy then d.spellid = spellname d.label, _, d.icon = GetSpellInfo(spellname) else d.spellid = spell.id d.label = spellname d.icon = select(3, GetSpellInfo(spell.id)) end d.value = spell.amount if Skada.db.profile.absdamage then d.value = min(total, spell.total) end d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), mod.metadata.columns.Damage, Skada:FormatPercent(d.value, total), mod.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end function sourcemod:Enter(win, id, label) win.playerid, win.playername = id, label win.title = format(L["%s's damage sources"], label) end function sourcemod:Update(win, set) win.title = format(L["%s's damage sources"], win.playername or L.Unknown) local actor= set and set:GetActor(win.playername, win.playerid) local total = actor and actor:GetDamageTaken() or 0 local sources = (total > 0) and actor:GetDamageSources() if sources then if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for sourcename, source in pairs(sources) do nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = source.id or sourcename d.label = sourcename d.class = source.class d.role = source.role d.spec = source.spec d.value = Skada.db.profile.absdamage and source.total or source.amount d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), mod.metadata.columns.Damage, Skada:FormatPercent(d.value, total), mod.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end local function add_detail_bar(win, nr, title, value, total, percent, fmt) nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = title d.label = title d.value = value d.valuetext = Skada:FormatValueText( fmt and Skada:FormatNumber(value) or value, mod.metadata.columns.Damage, Skada:FormatPercent(d.value, total), percent and mod.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end return nr end function spellmod:Enter(win, id, label) win.spellid, win.spellname = id, label win.title = format(L["%s's damage on %s"], label, win.playername or L.Unknown) end function spellmod:Update(win, set) win.title = format(L["%s's damage on %s"], win.spellname or L.Unknown, win.playername or L.Unknown) if not win.spellname then return end local player = set and set:GetPlayer(win.playerid, win.playername) local spell = player and player.damagetakenspells and player.damagetakenspells[win.spellname] if spell then if win.metadata then win.metadata.maxvalue = spell.count end local nr = add_detail_bar(win, 0, L["Hits"], spell.count) win.dataset[nr].value = win.dataset[nr].value + 1 -- to be always first if (spell.hit or 0) > 0 then nr = add_detail_bar(win, nr, L["Normal Hits"], spell.hit, spell.count, true) end if (spell.critical or 0) > 0 then nr = add_detail_bar(win, nr, L["Critical Hits"], spell.critical, spell.count, true) end if (spell.glancing or 0) > 0 then nr = add_detail_bar(win, nr, L["Glancing"], spell.glancing, spell.count, true) end if (spell.crushing or 0) > 0 then nr = add_detail_bar(win, nr, L["Crushing"], spell.crushing, spell.count, true) end for _, misstype in ipairs(misstypes) do if (spell[misstype] or 0) > 0 then nr = add_detail_bar(win, nr, L[misstype], spell[misstype], spell.count, true) end end end end function sdetailmod:Enter(win, id, label) win.spellid, win.spellname = id, label win.title = format(L["%s's damage breakdown"], label) end function sdetailmod:Update(win, set) win.title = format(L["%s's damage breakdown"], win.spellname or L.Unknown) if not win.spellname then return end local player = set and set:GetPlayer(win.playerid, win.playername) local spell = player and player.damagetakenspells and player.damagetakenspells[win.spellname] if spell then local absorbed = max(0, spell.total - spell.amount) local blocked = spell.blocked or 0 local resisted = spell.resisted or 0 local total = spell.amount + absorbed + blocked + resisted if win.metadata then win.metadata.maxvalue = total end local nr = add_detail_bar(win, 0, L["Damage"], total, nil, nil, true) win.dataset[nr].value = win.dataset[nr].value + 1 -- to be always first if (spell.overkill or 0) > 0 then nr = add_detail_bar(win, nr, L["Overkill"], spell.overkill, total, true, true) end if absorbed > 0 then nr = add_detail_bar(win, nr, L["ABSORB"], absorbed, total, true, true) end if (spell.blocked or 0) > 0 then nr = add_detail_bar(win, nr, L["BLOCK"], spell.blocked, total, true, true) end if (spell.resisted or 0) > 0 then nr = add_detail_bar(win, nr, L["RESIST"], spell.resisted, total, true, true) end end end function tdetailmod:Enter(win, id, label) win.targetname = label win.title = format(L["%s's damage on %s"], label, win.playername or L.Unknown) end function tdetailmod:Update(win, set) win.title = format(L["%s's damage on %s"], win.targetname or L.Unknown, win.playername or L.Unknown) if not win.targetname then return end local player = set and set:GetPlayer(win.playerid, win.playername) local sources = player and player:GetDamageSources() if sources then local total = sources[win.targetname] and sources[win.targetname].amount or 0 if Skada.db.profile.absdamage then total = sources[win.targetname].total or total end if total > 0 and player.damagetakenspells then if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for spellname, spell in pairs(player.damagetakenspells) do if spell.sources and spell.sources[win.targetname] then nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = spellname d.spellid = spell.id d.label = spellname d.icon = select(3, GetSpellInfo(spell.id)) d.spellschool = spell.school d.value = spell.sources[win.targetname].amount or 0 if Skada.db.profile.absdamage then d.value = spell.sources[win.targetname].total or d.value end d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), mod.metadata.columns.Damage, Skada:FormatPercent(d.value, total), mod.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end end end function mod:Update(win, set) win.title = L["Damage Taken"] local total = set and set:GetDamageTaken() or 0 if total > 0 then if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 -- players. for _, player in ipairs(set.players) do local dtps, amount = player:GetDTPS() if amount > 0 then nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = player.id or player.name d.label = player.name d.text = player.id and Skada:FormatName(player.name, player.id) d.class = player.class d.role = player.role d.spec = player.spec if Skada.forPVP and set.type == "arena" then d.color = set.gold and Skada.classcolors.ARENA_GOLD or Skada.classcolors.ARENA_GREEN end d.value = amount d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), self.metadata.columns.Damage, Skada:FormatNumber(dtps), self.metadata.columns.DTPS, Skada:FormatPercent(d.value, total), self.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end -- arena enemies if Skada.forPVP and set.type == "arena" and set.enemies and set.GetEnemyDamageTaken then for _, enemy in ipairs(set.enemies) do local dtps, amount = enemy:GetDTPS() if amount > 0 then nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = enemy.id or enemy.name d.label = enemy.name d.text = nil d.class = enemy.class d.role = enemy.role d.spec = enemy.spec d.color = set.gold and Skada.classcolors.ARENA_GREEN or Skada.classcolors.ARENA_GOLD d.value = amount d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), self.metadata.columns.Damage, Skada:FormatNumber(dtps), self.metadata.columns.DTPS, Skada:FormatPercent(d.value, total), self.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end end end function mod:OnEnable() spellmod.metadata = {tooltip = spellmod_tooltip} playermod.metadata = {click1 = spellmod, click2 = sdetailmod, post_tooltip = playermod_tooltip} sourcemod.metadata = {click1 = tdetailmod} self.metadata = { showspots = true, click1 = playermod, click2 = sourcemod, nototalclick = {playermod, sourcemod}, columns = {Damage = true, DTPS = true, Percent = true}, icon = [[Interface\Icons\ability_mage_frostfirebolt]] } Skada:RegisterForCL(SpellDamage, "DAMAGE_SHIELD", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellDamage, "DAMAGE_SPLIT", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellDamage, "RANGE_DAMAGE", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellDamage, "SPELL_BUILDING_DAMAGE", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellDamage, "SPELL_DAMAGE", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellDamage, "SPELL_EXTRA_ATTACKS", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellDamage, "SPELL_PERIODIC_DAMAGE", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellDamage, "SWING_DAMAGE", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(EnvironmentDamage, "ENVIRONMENTAL_DAMAGE", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellMissed, "DAMAGE_SHIELD_MISSED", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellMissed, "RANGE_MISSED", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellMissed, "SPELL_BUILDING_MISSED", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellMissed, "SPELL_MISSED", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellMissed, "SPELL_PERIODIC_MISSED", {dst_is_interesting_nopets = true}) Skada:RegisterForCL(SpellMissed, "SWING_MISSED", {dst_is_interesting_nopets = true}) Skada:AddMode(self, L["Damage Taken"]) end function mod:OnDisable() Skada:RemoveMode(self) end function mod:AddToTooltip(set, tooltip) if not set then return end local dtps, amount = set:GetDTPS() tooltip:AddDoubleLine(L["Damage Taken"], Skada:FormatNumber(amount), 1, 1, 1) tooltip:AddDoubleLine(L["DTPS"], Skada:FormatNumber(dtps), 1, 1, 1) end function mod:GetSetSummary(set) if not set then return end local dtps, amount = set:GetDTPS() return Skada:FormatValueText( Skada:FormatNumber(amount), self.metadata.columns.Damage, Skada:FormatNumber(dtps), self.metadata.columns.DTPS ), amount end function mod:SetComplete(set) T.free("DamageTaken_ExtraAttacks", extraATT) -- clean set from garbage before it is saved. for _, p in ipairs(set.players) do if p.totaldamagetaken and p.totaldamagetaken == 0 then p.damagetakenspells = nil elseif p.damagetakenspells then for spellname, spell in pairs(p.damagetakenspells) do if spell.total == 0 then p.damagetakenspells[spellname] = nil end end -- nothing left? if next(p.damagetakenspells) == nil then p.damagetakenspells = nil end end end end do local setPrototype = Skada.setPrototype local playerPrototype = Skada.playerPrototype local cacheTable = Skada.cacheTable function setPrototype:GetDamageTaken() local damage = Skada.db.profile.absdamage and self.totaldamagetaken or self.damagetaken or 0 if Skada.forPVP and self.type == "arena" and self.GetEnemyDamageTaken then damage = damage + self:GetEnemyDamageTaken() end return damage end function setPrototype:GetDTPS() local damage, dtps = self:GetDamageTaken(), 0 if damage > 0 then dtps = damage / max(1, self:GetTime()) end return dtps, damage end function playerPrototype:GetDamageTaken() return Skada.db.profile.absdamage and self.totaldamagetaken or self.damagetaken or 0 end function playerPrototype:GetDTPS(active) local damage, dtps = self:GetDamageTaken(), 0 if damage > 0 then dtps = damage / max(1, self:GetTime(active)) end return dtps, damage end function playerPrototype:GetDamageSources() if self.damagetakenspells then wipe(cacheTable) for _, spell in pairs(self.damagetakenspells) do if spell.sources then for name, source in pairs(spell.sources) do if not cacheTable[name] then cacheTable[name] = {amount = source.amount, total = source.total, overkill = source.overkill} else cacheTable[name].amount = cacheTable[name].amount + source.amount if source.total then cacheTable[name].total = (cacheTable[name].total or 0) + source.total end if source.overkill then cacheTable[name].overkill = (cacheTable[name].overkill or 0) + source.overkill end end -- attempt to get the class if not cacheTable[name].class then local actor = self.super:GetActor(name) if actor then cacheTable[name].id = actor.id cacheTable[name].class = actor.class cacheTable[name].role = actor.role cacheTable[name].spec = actor.spec else cacheTable[name].class = "UNKNOWN" end end end end end return cacheTable end end end end) -- ============================== -- -- Damage taken per second module -- -- ============================== -- Skada:AddLoadableModule("DTPS", function(L) if Skada:IsDisabled("Damage Taken", "DTPS") then return end local mod = Skada:NewModule(L["DTPS"]) local function dtps_tooltip(win, id, label, tooltip) local set = win:GetSelectedSet() local player = set and set:GetActor(label, id) if player then local totaltime = set:GetTime() local activetime = player:GetTime() local dtps, damage = player:GetDTPS() tooltip:AddLine(player.name .. " - " .. L["DTPS"]) tooltip:AddDoubleLine(L["Segment Time"], Skada:FormatTime(totaltime), 1, 1, 1) tooltip:AddDoubleLine(L["Active Time"], Skada:FormatTime(player:GetTime(true)), 1, 1, 1) tooltip:AddDoubleLine(L["Damage Taken"], Skada:FormatNumber(damage), 1, 1, 1) tooltip:AddDoubleLine(Skada:FormatNumber(damage) .. "/" .. Skada:FormatTime(activetime), Skada:FormatNumber(dtps), 1, 1, 1) end end function mod:Update(win, set) win.title = L["DTPS"] local total = set and set:GetDTPS() if total > 0 then if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 -- players for _, player in ipairs(set.players) do local dtps = player:GetDTPS() if dtps > 0 then nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = player.id or player.name d.label = player.name d.text = player.id and Skada:FormatName(player.name, player.id) d.class = player.class d.role = player.role d.spec = player.spec if Skada.forPVP and set.type == "arena" then d.color = set.gold and Skada.classcolors.ARENA_GOLD or Skada.classcolors.ARENA_GREEN end d.value = dtps d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), self.metadata.columns.DTPS, Skada:FormatPercent(d.value, total), self.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end -- arena enemies if Skada.forPVP and set.type == "arena" and set.enemies and set.GetEnemyDamageTaken then for _, enemy in ipairs(set.enemies) do local dtps = enemy:GetDTPS() if dtps > 0 then nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = enemy.id or enemy.name d.label = enemy.name d.text = nil d.class = enemy.class d.role = enemy.role d.spec = enemy.spec d.color = set.gold and Skada.classcolors.ARENA_GREEN or Skada.classcolors.ARENA_GOLD d.value = dtps d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), self.metadata.columns.DTPS, Skada:FormatPercent(d.value, total), self.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end end end function mod:OnEnable() self.metadata = { showspots = true, tooltip = dtps_tooltip, columns = {DTPS = true, Percent = true}, icon = [[Interface\Icons\inv_weapon_shortblade_06]] } local parentmod = Skada:GetModule(L["Damage Taken"], true) if parentmod then self.metadata.click1 = parentmod.metadata.click1 self.metadata.click2 = parentmod.metadata.click2 self.metadata.nototalclick = parentmod.metadata.nototalclick end Skada:AddMode(self, L["Damage Taken"]) end function mod:OnDisable() Skada:RemoveMode(self) end function mod:GetSetSummary(set) return Skada:FormatNumber(set and set:GetDTPS() or 0) end end) -- ============================ -- -- Damage Taken By Spell Module -- -- ============================ -- Skada:AddLoadableModule("Damage Taken By Spell", function(L) if Skada:IsDisabled("Damage Taken", "Damage Taken By Spell") then return end local mod = Skada:NewModule(L["Damage Taken By Spell"]) local targetmod = mod:NewModule(L["Damage spell targets"]) local sourcemod = mod:NewModule(L["Damage spell sources"]) local cacheTable = Skada.cacheTable function sourcemod:Enter(win, id, label) win.spellid, win.spellname = id, label win.title = format(L["%s's targets"], label) end function sourcemod:Update(win, set) win.title = format(L["%s's sources"], win.spellname or L.Unknown) if win.spellname then wipe(cacheTable) local total = 0 for _, player in ipairs(set.players) do if player.damagetakenspells and player.damagetakenspells[win.spellname] and player.damagetakenspells[win.spellname].sources then for sourcename, source in pairs(player.damagetakenspells[win.spellname].sources) do if not cacheTable[sourcename] then cacheTable[sourcename] = {amount = Skada.db.profile.absdamage and source.total or source.amount} elseif Skada.db.profile.absdamage then cacheTable[sourcename].amount = cacheTable[sourcename].amount + source.total else cacheTable[sourcename].amount = cacheTable[sourcename].amount + source.amount end total = total + cacheTable[sourcename].amount if not cacheTable[sourcename].class then local actor = set:GetActor(sourcename) if actor then cacheTable[sourcename].id = actor.id or actor.name cacheTable[sourcename].class = actor.class cacheTable[sourcename].role = actor.role cacheTable[sourcename].spec = actor.spec end end end end end if total > 0 then if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for sourcename, source in pairs(cacheTable) do nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = source.id or sourcename d.label = sourcename d.class = source.class d.role = source.role d.spec = source.spec d.value = source.amount d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), mod.metadata.columns.Damage, Skada:FormatPercent(d.value, total), mod.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end end function targetmod:Enter(win, id, label) win.spellid, win.spellname = id, label win.title = format(L["%s's targets"], label) end function targetmod:Update(win, set) win.title = format(L["%s's targets"], win.spellname or L.Unknown) if win.spellname then wipe(cacheTable) local total = 0 for _, player in ipairs(set.players) do if player.damagetakenspells and player.damagetakenspells[win.spellname] and (player.damagetakenspells[win.spellname].total or 0) > 0 then cacheTable[player.name] = { id = player.id, class = player.class, role = player.role, spec = player.spec, amount = player.damagetakenspells[win.spellname].amount } if Skada.db.profile.absdamage then cacheTable[player.name].amount = player.damagetakenspells[win.spellname].total end total = total + cacheTable[player.name].amount end end if total > 0 then if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for playername, player in pairs(cacheTable) do nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = player.id or playername d.label = playername d.text = player.id and Skada:FormatName(playername, player.id) d.class = player.class d.role = player.role d.spec = player.spec d.value = player.amount d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), mod.metadata.columns.Damage, Skada:FormatPercent(d.value, total), mod.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end end function mod:Update(win, set) win.title = L["Damage Taken By Spell"] local total = set and set:GetDamageTaken() or 0 if total == 0 then return end wipe(cacheTable) for _, player in ipairs(set.players) do if player.damagetakenspells then for spellname, spell in pairs(player.damagetakenspells) do if spell.total > 0 then if not cacheTable[spellname] then cacheTable[spellname] = {id = spell.id, school = spell.school, amount = 0} end if Skada.db.profile.absdamage then cacheTable[spellname].amount = cacheTable[spellname].amount + spell.total else cacheTable[spellname].amount = cacheTable[spellname].amount + spell.amount end end end end end if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for spellname, spell in pairs(cacheTable) do nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = spellname d.spellid = spell.id d.label = spellname d.icon = select(3, GetSpellInfo(spell.id)) d.spellschool = spell.school d.value = spell.amount d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), self.metadata.columns.Damage, Skada:FormatPercent(d.value, total), self.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end function mod:OnEnable() targetmod.metadata = {showspots = true} self.metadata = { showspots = true, click1 = targetmod, click2 = sourcemod, columns = {Damage = true, Percent = true}, icon = [[Interface\Icons\spell_arcane_starfire]] } Skada:AddMode(self, L["Damage Taken"]) end function mod:OnDisable() Skada:RemoveMode(self) end end) -- ============================= -- -- Avoidance & Mitigation Module -- -- ============================= -- Skada:AddLoadableModule("Avoidance & Mitigation", function(L) if Skada:IsDisabled("Damage Taken", "Avoidance & Mitigation") then return end local mod = Skada:NewModule(L["Avoidance & Mitigation"]) local playermod = mod:NewModule(L["Damage Breakdown"]) local cacheTable = Skada.cacheTable function playermod:Enter(win, id, label) win.playerid, win.playername = id, label win.title = format(L["%s's damage breakdown"], label) end function playermod:Update(win, set) if cacheTable[win.playerid] then local player = cacheTable[win.playerid] win.title = format(L["%s's damage breakdown"], player.name) if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for event, count in pairs(player.data) do nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = event d.label = L[event] d.value = 100 * count / player.total d.valuetext = Skada:FormatValueText( Skada:FormatPercent(d.value), mod.metadata.columns.Percent, count, mod.metadata.columns.Count, player.total, mod.metadata.columns.Total ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end function mod:Update(win, set) win.title = L["Avoidance & Mitigation"] if (set.totaldamagetaken or 0) > 0 then wipe(cacheTable) -- used later if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for _, player in ipairs(set.players) do if player.damagetakenspells then local tmp = {name = player.name, data = {}} local total, avoid = 0, 0 for _, spell in pairs(player.damagetakenspells) do total = total + spell.count for _, t in ipairs(misstypes) do if (spell[t] or 0) > 0 then avoid = avoid + spell[t] tmp.data[t] = (tmp.data[t] or 0) + spell[t] end end end if avoid > 0 then tmp.total = total tmp.avoid = avoid cacheTable[player.id] = tmp nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = player.id or player.name d.label = player.name d.text = player.id and Skada:FormatName(player.name, player.id) d.class = player.class d.role = player.role d.spec = player.spec d.value = 100 * avoid / total d.valuetext = Skada:FormatValueText( Skada:FormatPercent(d.value), self.metadata.columns.Percent, avoid, self.metadata.columns.Count, total, self.metadata.columns.Total ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end elseif cacheTable[player.id] then cacheTable[player.id] = nil end end end end end function mod:OnEnable() playermod.metadata = {} self.metadata = { showspots = true, click1 = playermod, columns = {Percent = true, Count = true, Total = true}, icon = [[Interface\Icons\ability_warlock_avoidance]] } Skada:AddMode(self, L["Damage Taken"]) end function mod:OnDisable() Skada:RemoveMode(self) end end) -- ================ -- -- Damage Mitigated -- -- ================ -- Skada:AddLoadableModule("Damage Mitigated", function(L) if Skada:IsDisabled("Damage Taken", "Damage Mitigated") then return end local mod = Skada:NewModule(L["Damage Mitigated"]) local playermod = mod:NewModule(L["Damage spell list"]) local spellmod = playermod:NewModule(L["Damage spell details"]) local function getMIT(player) local amount, total = 0, 0 if player and player.damagetakenspells then for _, spell in pairs(player.damagetakenspells) do amount = amount + spell.amount total = total + spell.total end end return amount, total end local function add_detail_bar(win, nr, title, value, total) nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = title d.label = title d.value = value d.valuetext = Skada:FormatValueText( Skada:FormatNumber(value), mod.metadata.columns.Damage, Skada:FormatPercent(value, total), mod.metadata.columns.Percent ) if win.metadata and value > win.metadata.maxvalue then win.metadata.maxvalue = value end return nr end function spellmod:Enter(win, id, label) win.spellid, win.spellname = id, label win.title = format(L["%s's <%s> mitigated damage"], win.playername or L.Unknown, label) end function spellmod:Update(win, set) win.title = format(L["%s's <%s> mitigated damage"], win.playername or L.Unknown, win.spellname or L.Unknown) if not win.spellname then return end local player = set and set:GetPlayer(win.playerid, win.playername) local spell = player and player.damagetakenspells and player.damagetakenspells[win.spellname] if spell then if win.metadata then win.metadata.maxvalue = spell.total end local nr = add_detail_bar(win, 0, L["Total"], spell.total) win.dataset[nr].value = win.dataset[nr].value + 1 -- to be always first nr = add_detail_bar(win, nr, L["Damage Taken"], spell.amount, spell.total) local absorbed = max(0, spell.total - spell.amount) if absorbed then nr = add_detail_bar(win, nr, L["ABSORB"], absorbed, spell.total) end if (spell.blocked or 0) > 0 then nr = add_detail_bar(win, nr, L["BLOCK"], spell.blocked, spell.total) if win.metadata then win.metadata.maxvalue = win.metadata.maxvalue + spell.blocked end end if (spell.resisted or 0) > 0 then nr = add_detail_bar(win, nr, L["RESIST"], spell.resisted, spell.total) if win.metadata then win.metadata.maxvalue = win.metadata.maxvalue + spell.resisted end end end end function playermod:Enter(win, id, label) win.playerid, win.playername = id, label win.title = format(L["%s's mitigated damage"], label) end function playermod:Update(win, set) win.title = format(L["%s's mitigated damage"], win.playername or L.Unknown) local player = set and set:GetPlayer(win.playerid, win.playername) local overall = player and select(2, getMIT(player)) if overall > 0 and player.damagetakenspells then if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for spellname, spell in pairs(player.damagetakenspells) do if spell.total > 0 then nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = spellname d.spellid = spell.id d.label = spellname d.icon = select(3, GetSpellInfo(spell.id)) d.spellschool = spell.school d.value = spell.amount d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), mod.metadata.columns.Damage, Skada:FormatNumber(spell.total), mod.metadata.columns.Total, Skada:FormatPercent(d.value, spell.total), mod.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end end function mod:Update(win, set) win.title = L["Damage Mitigated"] if (set.totaldamagetaken or 0) > 0 then if win.metadata then win.metadata.maxvalue = 0 end local nr = 0 for _, player in ipairs(set.players) do local amount, total = getMIT(player) if amount > 0 then nr = nr + 1 local d = win.dataset[nr] or {} win.dataset[nr] = d d.id = player.id or player.name d.label = player.name d.text = player.id and Skada:FormatName(player.name, player.id) d.class = player.class d.role = player.role d.spec = player.spec d.value = amount d.valuetext = Skada:FormatValueText( Skada:FormatNumber(d.value), self.metadata.columns.Damage, Skada:FormatNumber(total), self.metadata.columns.Total, Skada:FormatPercent(d.value, total), self.metadata.columns.Percent ) if win.metadata and d.value > win.metadata.maxvalue then win.metadata.maxvalue = d.value end end end end end function mod:OnEnable() playermod.metadata = {click1 = spellmod} self.metadata = { showspots = true, click1 = playermod, columns = {Damage = true, Total = true, Percent = true}, icon = [[Interface\Icons\spell_shadow_shadowward]] } Skada:AddMode(self, L["Damage Taken"]) end function mod:OnDisable() Skada:RemoveMode(self) end end)
omniknight_degen_aura_oaa = class(AbilityBaseClass) LinkLuaModifier("modifier_omniknight_degen_aura_oaa", "abilities/oaa_omniknight_degen_aura.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_omniknight_degen_aura_effect_oaa", "abilities/oaa_omniknight_degen_aura.lua", LUA_MODIFIER_MOTION_NONE) function omniknight_degen_aura_oaa:GetIntrinsicModifierName() return "modifier_omniknight_degen_aura_oaa" end function omniknight_degen_aura_oaa:OnUpgrade() local caster = self:GetCaster() local ability_level = self:GetLevel() local vanilla_ability = caster:FindAbilityByName("omniknight_degen_aura") -- Check to not enter a level up loop if vanilla_ability and vanilla_ability:GetLevel() ~= ability_level then vanilla_ability:SetLevel(ability_level) end end function omniknight_degen_aura_oaa:IsStealable() return false end --------------------------------------------------------------------------------------------------- modifier_omniknight_degen_aura_oaa = class(ModifierBaseClass) function modifier_omniknight_degen_aura_oaa:IsHidden() return true end function modifier_omniknight_degen_aura_oaa:IsDebuff() return false end function modifier_omniknight_degen_aura_oaa:IsPurgable() return false end function modifier_omniknight_degen_aura_oaa:RemoveOnDeath() return false end function modifier_omniknight_degen_aura_oaa:IsAura() if self:GetParent():PassivesDisabled() then return false end return true end function modifier_omniknight_degen_aura_oaa:GetModifierAura() return "modifier_omniknight_degen_aura_effect_oaa" end function modifier_omniknight_degen_aura_oaa:GetAuraSearchTeam() return DOTA_UNIT_TARGET_TEAM_ENEMY end function modifier_omniknight_degen_aura_oaa:GetAuraSearchType() return bit.bor(DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_BASIC) end function modifier_omniknight_degen_aura_oaa:GetAuraRadius() return self:GetAbility():GetSpecialValueFor("radius") end --------------------------------------------------------------------------------------------------- modifier_omniknight_degen_aura_effect_oaa = class(ModifierBaseClass) function modifier_omniknight_degen_aura_effect_oaa:IsHidden() return false end function modifier_omniknight_degen_aura_effect_oaa:IsDebuff() return true end function modifier_omniknight_degen_aura_effect_oaa:IsPurgable() return false end function modifier_omniknight_degen_aura_effect_oaa:OnCreated() local ability = self:GetAbility() if ability then self.heal_prevent_percent = ability:GetSpecialValueFor("heal_prevent_percent") self.attack_slow = ability:GetSpecialValueFor("attack_speed_slow") else self.heal_prevent_percent = -6 self.attack_slow = -10 end end function modifier_omniknight_degen_aura_effect_oaa:OnRefresh() local ability = self:GetAbility() if ability then self.heal_prevent_percent = ability:GetSpecialValueFor("heal_prevent_percent") self.attack_slow = ability:GetSpecialValueFor("attack_speed_slow") else self.heal_prevent_percent = -6 self.attack_slow = -10 end end function modifier_omniknight_degen_aura_effect_oaa:DeclareFunctions() return { MODIFIER_PROPERTY_ATTACKSPEED_BONUS_CONSTANT, MODIFIER_PROPERTY_HEAL_AMPLIFY_PERCENTAGE_TARGET, MODIFIER_PROPERTY_HP_REGEN_AMPLIFY_PERCENTAGE, MODIFIER_PROPERTY_LIFESTEAL_AMPLIFY_PERCENTAGE, MODIFIER_PROPERTY_SPELL_LIFESTEAL_AMPLIFY_PERCENTAGE, } end function modifier_omniknight_degen_aura_effect_oaa:GetModifierAttackSpeedBonus_Constant() return self.attack_slow end function modifier_omniknight_degen_aura_effect_oaa:GetModifierHealAmplify_PercentageTarget() return self.heal_prevent_percent end function modifier_omniknight_degen_aura_effect_oaa:GetModifierHPRegenAmplify_Percentage() return self.heal_prevent_percent end function modifier_omniknight_degen_aura_effect_oaa:GetModifierLifestealRegenAmplify_Percentage() return self.heal_prevent_percent end function modifier_omniknight_degen_aura_effect_oaa:GetModifierSpellLifestealRegenAmplify_Percentage() return self.heal_prevent_percent end
---@class Bag_ItemCom local Bag_ItemCom = DClass("Bag_ItemCom", BaseComponent) _G.Bag_ItemCom = Bag_ItemCom ---@class Bag_ItemData ---@field state number ---@field gId number ---@field bId number ---@field cId number ---@field num number ---@field config table ---@field obj Transform ---@field gameObjectSelect Transform ---@field com Bag_ItemCom ---@field outTime number local showTimeOut = false function Bag_ItemCom:ctor() self:addUpdate() end ---初始化面板组件节点(只在创建时调用) ---@param obj Transform ---@param ItemData BagMgr_BagItemInfo function Bag_ItemCom:initItem(obj, ItemData, bagId) self.itemData = {} self.bagId = bagId self.gameObjectSelect = obj.transform:Find("Item_Select") self.nodeDisable = obj.transform:Find("Item_Disable") self.nodeDisable.gameObject:SetActive(false) self.img_Icon = obj.transform:Find("Item_Icon"):GetComponent(typeof(Image)) self.img_IconBg = obj.transform:Find("Item_Bg"):GetComponent(typeof(Image)) self.text_Count = obj.transform:Find("Label_Count"):GetComponent(typeof(Text)) self.Img_Back = obj.transform:Find("Image_Bg"):GetComponent(typeof(Image)) self.starsScroll = obj.transform:Find("StarsView/Viewport/Content"):GetComponent(typeof(ScrollPoolGrid)) self.nodeTop = obj.transform:Find("Node_Top") self.txt_Time = self.nodeTop.transform:Find("Text_Time"):GetComponent(typeof(Text)) self.nodeLimit = obj.transform:Find("Image_Limit") self.txt_NumLimit = obj.transform:Find("Image_Limit/Text_Limit"):GetComponent(typeof(Text)) self.nodeEquip = obj.transform:Find("NodeEquip").gameObject self.nodeEquip.gameObject:SetActive(BagMgr:checkIsEquip(self.bagId)) if BagMgr:checkIsEquip(self.bagId) then self.nodeEquiped = self.nodeEquip.transform:Find("Image_Equiped").gameObject self.equipPlace = self.nodeEquip.transform:Find("Image_PlaceBg/Image_Place"):GetComponent(typeof(Image)) self.equipSkill1 = self.nodeEquip.transform:Find("Image_Skill1").gameObject self.equipSkill2 = self.nodeEquip.transform:Find("Image_Skill2").gameObject self.equipLocked = self.nodeEquip.transform:Find("Image_Lock").gameObject self.equipStage = self.nodeEquip.transform:Find("Image_Stage"):GetComponent(typeof(Image)) self.equipLv = self.nodeEquip.transform:Find("Text_Lv"):GetComponent(typeof(Text)) end self.gameObjectSelect.gameObject:SetActive(false) self.listAllStars = {} ---@type EquipMgr_EquipData self.equipData = {} ---@class Bag_ItemData local item = {} item.state = ItemData.state item.bId = ItemData.bId item.cId = ItemData.cId item.gId = ItemData.gId item.num = ItemData.num item.outTime = ItemData.outTime self.itemData.config = BagManager.getItemConfigDataById(ItemData.cId) item.obj = obj item.gameObjectSelect = self.gameObjectSelect item.com = self self.itemData = item obj.transform.gameObject.name = string.format("%d", item.cId) return item end --重置数据(复用时调用) ---@param data BagMgr_BagItemInfo function Bag_ItemCom:resetItemData(data, bagId) self.equipData = {} self.bagId = bagId self.itemData.bId = data.bId self.itemData.cId = data.cId self.itemData.num = data.num self.itemData.outTime = data.outTime self.itemData.config = BagManager.getItemConfigDataById(data.cId) self.itemData.obj.gameObject.name = string.format("%d", self.itemData.cId) self.itemData.com = self self.itemData.obj = self.gameObject self.itemData.gameObjectSelect = self.gameObjectSelect self.transform.gameObject.name = string.format("%d", data.cId) end --刷新显示信息 function Bag_ItemCom:updateUI(data, bagId) showTimeOut = false self:resetItemData(data, bagId) self:updateStars() self:updateCount() self:updateIcon() self:updateState() self:updateTop() self:updateEquipUI() return self.itemData end function Bag_ItemCom:onClear() showTimeOut = false self.itemData = nil end ---刷新限时道具 function Bag_ItemCom:onUpdate() self:checkingTimeOut() end function Bag_ItemCom:checkTimeOut() local timeData = TimeUtils.getLeftTime(self.itemData.outTime) if self.itemData and self.itemData.outTime > 0 and timeData.tScond <= 0 then BagMgr:removeOneItem(self.itemData.cId) end end function Bag_ItemCom:checkingTimeOut() if not self.itemData or not self.itemData.cId or not showTimeOut or self.itemData.outTime <= 0 then return end local _leftTime = TimeUtils.getLeftTime(self.itemData.outTime).tScond if _leftTime <= 0 then local cid = 0 cid = self.itemData.cId showTimeOut = false if cid then BagMgr:removeOneItem(cid) end end end ---显示限时提示 function Bag_ItemCom:setLeftOutTime() local timeData = TimeUtils.getLeftTime(self.itemData.outTime) if timeData.tScond > 0 then showTimeOut = true self.nodeTop.gameObject:SetActive(true) --"后过期" local day, hour, min, sec = TimeUtils.format(self.itemData.outTime, true) day = timeData.tDay hour = timeData.tHour min = timeData.tMinute sec = timeData.tScond local date = "" local minuteOut = false if tonumber(day) >= 2 then date = string.format("%d%s", tonumber(day), Lang(GL_TIME_DAY)) else if tonumber(hour) > 0 then date = string.format("%d%s", tonumber(hour), Lang(GL_TIME_HOUR)) else if tonumber(min) > 0 then date = string.format("%d%s", tonumber(min), Lang(GL_TIME_MINUTE)) else if tonumber(sec) > 0 then date = string.format("%d%s", tonumber(sec), Lang(GL_TIME_SECOND)) minuteOut = true end end end end if not minuteOut then self.txt_Time.text = string.format("%s%s", date, Lang(GL_TIME_OUT)) else self.txt_Time.text = Lang(GL_TIME_MINNUTE_OUT) end else showTimeOut = false self.nodeTop.gameObject:SetActive(false) self.txt_Time.text = "" end end ---显示数量上限提示 function Bag_ItemCom:setLimitCount() if BagMgr:checkIsEquipByCid(self.itemData.cId) then self.nodeLimit.gameObject:SetActive(false) return end local config = BagManager.getItemConfigDataById(self.itemData.cId) local dataServer = BagMgr:getItemDataByGid(self.itemData.gId) if dataServer.num >= config.summax then self.nodeLimit.gameObject:SetActive(true) --"已达上限" self.txt_NumLimit.text = Lang(GL_NUMBER_LIMIT) else self.nodeLimit.gameObject:SetActive(false) self.txt_NumLimit.text = "" end end ---显示道具Top function Bag_ItemCom:updateTop() self:setLeftOutTime() self:setLimitCount() end ---显示星级 function Bag_ItemCom:updateStars() local starShow = 0 local cfg = BagManager.getItemConfigDataById(self.itemData.cId) starShow = cfg.star self.starsScroll:InitPool( starShow, function(index, obj) if self.itemData then local star = obj.transform:Find("Image_Star") star.gameObject:SetActive(starShow >= index) end end ) end ---刷新当前数量 function Bag_ItemCom:updateCount() local isEquip = BagMgr:checkIsEquipByCid(self.itemData.cId) self.text_Count.gameObject:SetActive(not isEquip) self.text_Count.text = self.itemData.num --"×" .. end ---设置背景和Icon function Bag_ItemCom:updateIcon() local pathQuality = string.format("%sGoods_Quality%02d", BagManager.pathItemQuality, self.itemData.config.item_bg) local pathBackQuality = string.format("%sGoods_Back%02d", BagManager.pathItemQuality, self.itemData.config.item_bg) self:setSprite(self.Img_Back, pathBackQuality) self:setSprite(self.img_IconBg, pathQuality) if BagMgr:checkIsEquipByCid(self.itemData.cId) then EquipManager:setEquipIcon(self, self.img_Icon, self.itemData.cId) else self:setSprite(self.img_Icon, BagManager.pathItemIcon .. self.itemData.config.item_icon) end end function Bag_ItemCom:updateState() end ---点击道具 (TODO 修改为事件) function Bag_ItemCom:onClickSelf(clickItem, openSell) if clickItem then if clickItem.bId == self.itemData.bId then if BagMgr:checkIsEquipByCid(clickItem.cId) then local dataEquip = EquipMgr:getEquipDataByGid(self.itemData.gId) if dataEquip.heroId > 0 then MsgCenter.sendMessage(Msg.HINT_COMMON, "当前道具不能选中出售或分解") return nil end else if not self.itemData.config.is_resolve then MsgCenter.sendMessage(Msg.HINT_COMMON, "当前道具不能选中出售或分解") return nil end end end self.itemData.gameObjectSelect.gameObject:SetActive(self.itemData.bId == clickItem.bId) else self.itemData.gameObjectSelect.gameObject:SetActive(false) end end ---刷新道具是否被出售分解 function Bag_ItemCom:onSelectDefault(showSell) if showSell then if BagMgr:checkIsEquipByCid(self.itemData.cId) then self.nodeDisable.gameObject:SetActive(self.equipData.heroId > 0) else self.nodeDisable.gameObject:SetActive(not self.itemData.config.is_resolve) end else self.nodeDisable.gameObject:SetActive(false) end end ---刷新装备UI function Bag_ItemCom:updateEquipUI() if not BagMgr:checkIsEquipByCid(self.itemData.cId) then return end self.equipData = EquipMgr:getEquipDataByGid(self.itemData.gId) EquipManager:setEquipPosition(self, self.equipPlace, self.equipData.cId) local skillsNum = 0 if self.equipData.skills then for key, value in pairs(self.equipData.skills) do if value.skillId > 0 then skillsNum = skillsNum + 1 end end end self.nodeEquiped:SetActive(self.equipData.heroId > 0) self.equipSkill1:SetActive(skillsNum >= 1) self.equipSkill2:SetActive(skillsNum >= 2) self.equipLocked:SetActive(self.equipData.locked) self.equipLv.text = "Lv." .. self.equipData.lv EquipManager:setQuility(self, self.equipStage, self.equipData.quality, EquipManager.STAGE_TYPE.ICON) end
local Config = require("AdituV.DetectTrap.Config"); local LockData = require("AdituV.DetectTrap.LockData"); local Strings = require("AdituV.DetectTrap.Strings"); local Utility = require("AdituV.DetectTrap.Utility"); local defaultEffect = { speed = 1, allowEnchanting = false, allowSpellmaking = false, appliesOnce = false, canCastSelf = false, canCastTarget = false, canCastTouch = false, casterLinked = false, hasContinuousVFX = false, hasNoDuration = false, hasNoMagnitude = false, illegalDaedra = false, isHarmful = false, nonRecastable = false, targetsAttributes = false, targetsSkills = false, unreflectable = false, usesNegativeLighting = false, -- Icons and sounds must be set -- Lighting must be set -- Callbacks must be set size = 1, sizeCap = 50 } local Effects = {}; Effects.definitions = {}; Effects.definitions["adv_dt_untrap"] = { id = Config.effects["adv_dt_untrap"].numId; name = Strings.effects.untrap, description = Strings.effects.untrapDescription, school = tes3.magicSchool.alteration; baseCost = Config.effects["adv_dt_untrap"].baseCost, speed = Config.effects["adv_dt_untrap"].speed, allowEnchanting = true, allowSpellmaking = true, appliesOnce = false, canCastTarget = true, canCastTouch = true, hasNoDuration = true, hasNoMagnitude = true, unreflectable = true, icon = "Tx_S_open.tga", particleTexture = "vfx_alt_glow.tga", castSound = "alteration cast", castVFX = "VFX_AlterationCast", boltSound = "alteration bolt", boltVFX = "VFX_AlterationBolt", hitSound = "alteration hit", hitVFX = "VFX_AlterationHit", areaSound = "alteration area", areaVFX = "VFX_AlterationArea", lighting = Config.effects["adv_dt_untrap"].lighting, onTick = function(e) if not e:trigger() then return end Utility.Log.debug("Untrap tick on %s", e.effectInstance.target.id); local ld = LockData.getForReference(e.effectInstance.target); if ld then ld:setTrapDetected(true); event.trigger("trapDisarm", { reference = e.effectInstance.target, lockData = e.effectInstance.target.attachments.lock, disarmer = e.caster, -- Pretend we're using the SecretMaster's Probe to try -- to maintain compatibility with other mods using trapDisarm tool = { id = "probe_secretmaster", }, toolItemData = { charge = 0, condition = 25, data = {} }, chance = 100, trapPresent = true }); Utility.Log.debug("Untrapping %s. Trapped: %s", e.effectInstance.target.id, ld.trapped); if ld.trapped then tes3.playSound({ sound = "Disarm Trap", reference = e.effectInstance.target }); tes3.setTrap({reference = e.effectInstance.target, spell = nil}); tes3.messageBox(Strings.effects.untrapSuccess); end end e.effectInstance.state = tes3.spellState.retired; end } for k,v in pairs(Effects.definitions) do setmetatable(v,v); v.__index = defaultEffect; tes3.claimSpellEffectId(k, Config.effects[k].numId); Utility.Log.debug("Claiming spell effect %s as %d", k, Config.effects[k].numId); Utility.Log.debug(" Checking: %d", tes3.effect[k]); end Effects.registerEffects = function() for _,v in pairs(Effects.definitions) do tes3.addMagicEffect(v); end end return Effects;
local API = { [1] = 10, [2] = 20, [3] = 45, [4] = 70, [5] = 100, [6] = 150, [7] = 250, [8] = 350, [9] = 500, [10] = 1000 } return API
germany_team = 0 us_team = 0 function player_initial() umsg.Start("newplayer") umsg.Short(germany_team) umsg.Short(us_team) umsg.End() end hook.Add( "PlayerInitialSpawn", "PlayerInitialSpawn", player_initial ) function teamscore() for k, ply in pairs( player.GetAll() ) do if (ply.first == nil) then ply.first = 1 ply.lastkill = 0 end if (ply:Team() == 2) then //US if ( ply:Frags() != ply.lastkill ) then ply.poskill = ply:Frags() + 1 ply.negkill = ply:Frags() - 1 if ( ply:Frags() == 0 and ply.lastkill == -1 ) then ply.lastkill = ply:Frags() us_team = us_team + 1 umsg.Start("teamscoring") umsg.Short(us_team) umsg.Short(2) umsg.End() elseif ( ply.negkill == ply.lastkill) then ply.lastkill = ply:Frags() us_team = us_team + 1 umsg.Start("teamscoring") umsg.Short(us_team) umsg.Short(2) umsg.End() end end end if (ply:Team() == 3) then //GERMAN if ( ply:Frags() != ply.lastkill ) then ply.poskill = ply:Frags() + 1 ply.negkill = ply:Frags() - 1 if ( ply:Frags() == 0 and ply.lastkill == -1 ) then ply.lastkill = ply:Frags() germany_team = germany_team + 1 umsg.Start("teamscoring") umsg.Short(germany_team) umsg.Short(3) umsg.End() elseif ( ply.negkill == ply.lastkill) then ply.lastkill = ply:Frags() germany_team = germany_team + 1 umsg.Start("teamscoring") umsg.Short(germany_team) umsg.Short(3) umsg.End() end end end end end hook.Add("Think","checkteamscore", teamscore) function largest() numbers = {us_team, germany_team} local maxcount = 0 local maxindex for index, value in pairs(numbers) do if value > maxcount then maxcount = value maxindex = index umsg.Start("topteamscore") umsg.Short(maxindex) umsg.End() end end end hook.Add("Think","Largestnumber", largest) // Reset scores function reset_scores( ply ) if ply:IsAdmin() then for k, ply in pairs( player.GetAll() ) do ply:SetFrags(0) ply:SetDeaths(0) end us_team = 0 germany = 0 player_initial() umsg.Start("topteamscorereset") umsg.End() end end concommand.Add( "vb_reset_team_scores", reset_scores )
return { [3000] = {["cost"] = 50, ["attack"] = 6, ["desc"] = [[攻击+6]], ["costType"] = 1, ["goodsID"] = 3000, ["function"] = 1}, [3001] = {["defense"] = 6, ["desc"] = [[防御+6]], ["cost"] = 50, ["costType"] = 1, ["goodsID"] = 3001, ["function"] = 2}, [3002] = {["cost"] = 50, ["costType"] = 1, ["desc"] = [[生命+150]], ["goodsID"] = 3002, ["function"] = 3, ["hp"] = 150}, [3004] = {["cost"] = 200, ["attack"] = 10, ["desc"] = [[攻击+10]], ["costType"] = 2, ["goodsID"] = 3004, ["function"] = 1}, [3005] = {["defense"] = 10, ["desc"] = [[防御+10]], ["cost"] = 200, ["costType"] = 2, ["goodsID"] = 3005, ["function"] = 2}, [3006] = {["cost"] = 200, ["costType"] = 2, ["desc"] = [[生命+200]], ["goodsID"] = 3006, ["function"] = 3, ["hp"] = 200}, [3007] = {["cost"] = 200, ["costType"] = 2, ["desc"] = [[等级+1]], ["goodsID"] = 3007, ["function"] = 0}, }
-- module 'mock_edit' -- local function onAssetModified( node ) -- if node:getType() ~= 'fmod_project' then return end -- local path = node:getNodePath() -- local mockNode = mock.getAssetNode( path ) -- if mockNode then mock.updateAssetNode( mockNode, _pyAssetNodeToData( node ) ) end -- for item in pairs( mock.getLoadedDecks() ) do -- if item:getTexture() == path then -- -- print( 'update deck!!', item ) -- item:setTexture( path, false ) -- end -- end -- end -- connectSignalFunc( 'asset.modified', onAssetModified )
-- -- Author: Your Name -- Date: 2016-10-29 00:24:29 -- --状态基类 FSMState = class("FSMState"); function FSMState:initialize(name) self.mName = name; end function FSMState:OnEnter(...) end --从当前状态再次进入此状态时的回调 function FSMState:OnReEnter(...) end function FSMState:OnUpdate() end function FSMState:OnExit(...) end --当前状态下处理逻辑 function FSMState:HandleMsg(msg, ...) end --状态机类 FSM = class("FSM"); function FSM:initialize() self.mStates = {}; self.mCurState = nil; self.mTranslationDict = {}; end --添加状态 function FSM:AddState(state) table.insert(self.mStates, state); return state; end --添加跳转 function FSM:AddTranslation(state, event, nextState) local translationDict = self.mTranslationDict[state]; if translationDict == nil then self.mTranslationDict[state] = {}; translationDict = self.mTranslationDict[state]; end if translationDict[event] then error("Translation already exists : " .. state.mName .. " + " .. event .. " -> " .. nextState.mName); return; end translationDict[event] = nextState; end --处理事件 function FSM:HandleEvent(event, ...) local translationDict = self.mTranslationDict[self.mCurState]; if not translationDict then return; end local nextState = translationDict[event]; if not nextState then return; end if nextState == self.mCurState then self.mCurState:OnReEnter(...); else self.mCurState:OnExit(); self.mCurState = nextState; self.mCurState:OnEnter(...); end end --启动状态机 function FSM:Start(state, ...) self.mCurState = state; self.mCurState:OnEnter(...); end function FSM:Update() self.mCurState:OnUpdate(); end
-- luna clickcasting support -- note: clique support is not possible afaik Focus_Loader:Register("LunaUnitFrames", function(Focus) local orig_lufmo = SlashCmdList.LUFMO local L = LunaUF and LunaUF.L if not L or not LunaUF.Mouseover then return end SlashCmdList.LUFMO = function(msg, editbox) local frame = GetMouseFocus() if msg and strfind(frame:GetName() or "", "FocusFrame") then Focus:CastSpellByName(msg) else orig_lufmo(msg, editbox) end end FocusFrame_OnClick = function(btn) if btn == "UNKNOWN" then btn = LunaUF.clickedButton end --[[if Luna_Custom_ClickFunction and Luna_Custom_ClickFunction(btn, "target") then return end]] local button = (IsControlKeyDown() and "Ctrl-" or "") .. (IsShiftKeyDown() and "Shift-" or "") .. (IsAltKeyDown() and "Alt-" or "") .. L[btn] local action = LunaUF.db.profile.clickcasting.bindings[button] if not action then return elseif action == L["menu"] then if SpellIsTargeting() then return SpellStopTargeting() end elseif action == L["target"] then if SpellIsTargeting() then Focus:Call(SpellTargetUnit) elseif CursorHasItem() then Focus:Call(DropItemOnUnit) else Focus:TargetFocus() end else Focus:TargetFocus() LunaUF:Mouseover(action) Focus:TargetPrevious() end end end) --[[Loader:Register("pfUI", function(Focus) local orig_pfcast = SlashCmdList.PFCAST SlashCmdList.PFCAST = function(arg1, arg2) local frame = GetMouseFocus() if arg1 and strfind(frame:GetName() or "", "FocusFrame") then Focus:Call(CastSpellByName, arg1) else orig_PFCAST(arg1, arg2) end end end)]]
return function() local assertDeepEqual = require(script.Parent.Parent.Parent.assertDeepEqual) local createElement = require(script.Parent.Parent.createElement) local createReconciler = require(script.Parent.Parent.createReconciler) local createSpy = require(script.Parent.Parent.createSpy) local NoopRenderer = require(script.Parent.Parent.NoopRenderer) local Type = require(script.Parent.Parent.Type) local Component = require(script.Parent.Parent.Component) local noopReconciler = createReconciler(NoopRenderer) it("should be invoked with props when mounted", function() local MyComponent = Component:extend("MyComponent") local initSpy = createSpy() MyComponent.init = initSpy.value function MyComponent:render() return nil end local props = { a = 5, } local element = createElement(MyComponent, props) local hostParent = nil local key = "Some Component Key" noopReconciler.mountVirtualNode(element, hostParent, key) expect(initSpy.callCount).to.equal(1) local values = initSpy:captureValues("self", "props") expect(Type.of(values.self)).to.equal(Type.StatefulComponentInstance) expect(typeof(values.props)).to.equal("table") assertDeepEqual(values.props, props) end) end
----------------------------------- -- Area: North Gustaberg (S) (I-6) -- NPC: Gebhardt -- Involved in Quests: The Fighting Fourth ----------------------------------- require("scripts/globals/quests"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) if (player:getQuestStatus(CRYSTAL_WAR,tpz.quest.id.crystalWar.THE_FIGHTING_FOURTH) == QUEST_ACCEPTED and player:getCharVar("THE_FIGHTING_FOURTH") == 1) then player:startEvent(104) elseif (player:getQuestStatus(CRYSTAL_WAR,tpz.quest.id.crystalWar.THE_FIGHTING_FOURTH) == QUEST_ACCEPTED and player:getCharVar("THE_FIGHTING_FOURTH") == 3) then player:startEvent(109) else player:startEvent(111) end end; function onEventUpdate(player,csid,option) end function onEventFinish(player,csid,option) if (csid == 104) then player:setCharVar("THE_FIGHTING_FOURTH",2); end end;
-- EXCLUSIVELY FOR GARRY'S MOD COMPATIBILITY -- Ignore it if you plan to use it in pure lua. This file will not be used -- This file should be shared for loading prior to SERVER -- If it is loaded late, ggram-dependent scripts give errors if CLIENT then return end local function loadBots(path, iDeep) iDeep = iDeep or 0 local files,dirs = file.Find(path .. "/*","LUA") for _,f in ipairs(files) do if f == "_init.lua" then print("GG Loading Bot " .. path) include(path .. "/" .. f) break end end for _,d in ipairs(iDeep > 0 and dirs or {}) do loadBots(path .. "/" .. d, iDeep - 1) end end local function loadExtensions(path) local files = file.Find(path .. "/*","LUA") for _,f in ipairs(files) do local fpath = path .. "/" .. f print("GG Loading " .. fpath) include(fpath) end end include("ggram/core.lua") loadExtensions("ggram/extensions") loadBots("ggram/bots", 1)
local Hounded = Class(function(self, inst) self.inst = inst self.warning = false self.timetoattack = 200 self.warnduration = 30 self.timetonextwarningsound = 0 self.houndstorelease = 0 self.timetonexthound = 0 self.announcewarningsoundinterval = 4 self.inst:StartUpdatingComponent(self) self.attackdelayfn = self.attack_delays.occasional self.attacksizefn = self.attack_levels.light.numhounds self.warndurationfn = self.attack_levels.light.warnduration self.spawnmode = "escalating" self:PlanNextHoundAttack() end) Hounded.attack_levels= { intro={warnduration= function() return 120 end, numhounds = function() return 2 end}, light={warnduration= function() return 60 end, numhounds = function() return 2 + math.random(2) end}, med={warnduration= function() return 45 end, numhounds = function() return 3 + math.random(3) end}, heavy={warnduration= function() return 30 end, numhounds = function() return 4 + math.random(3) end}, crazy={warnduration= function() return 30 end, numhounds = function() return 6 + math.random(4) end}, } Hounded.attack_delays= { rare = function() return TUNING.TOTAL_DAY_TIME * 6 + math.random() * TUNING.TOTAL_DAY_TIME * 7 end, occasional = function() return TUNING.TOTAL_DAY_TIME * 4 + math.random() * TUNING.TOTAL_DAY_TIME * 7 end, frequent = function() return TUNING.TOTAL_DAY_TIME * 3 + math.random() * TUNING.TOTAL_DAY_TIME * 5 end, } local HOUND_SPAWN_DIST = 30 function Hounded:SummonHound() local pt = Vector3(GetPlayer().Transform:GetWorldPosition()) local spawn_pt = self:GetSpawnPoint(pt) if spawn_pt then local prefab = "hound" local special_hound_chance = self:GetSpecialHoundChance() if math.random() < special_hound_chance then if GetSeasonManager():IsWinter() or GetSeasonManager():IsSpring() then prefab = "icehound" else prefab = "firehound" end end local hound = SpawnPrefab(prefab) if hound then hound.Physics:Teleport(spawn_pt:Get()) hound:FacePoint(pt) hound.components.combat:SuggestTarget(GetPlayer()) return hound end end end function Hounded:SpawnModeEscalating() self.spawnmode = "escalating" self:PlanNextHoundAttack() end function Hounded:SpawnModeNever() self.spawnmode = "never" self:PlanNextHoundAttack() end function Hounded:SpawnModeHeavy() self.spawnmode = "constant" self.attackdelayfn = self.attack_delays.frequent self.attacksizefn = self.attack_levels.heavy.numhounds self.warndurationfn = self.attack_levels.heavy.warnduration self:PlanNextHoundAttack() end function Hounded:SpawnModeMed() self.spawnmode = "constant" self.attackdelayfn = self.attack_delays.occasional self.attacksizefn = self.attack_levels.med.numhounds self.warndurationfn = self.attack_levels.med.warnduration self:PlanNextHoundAttack() end function Hounded:SpawnModeLight() self.spawnmode = "constant" self.attackdelayfn = self.attack_delays.rare self.attacksizefn = self.attack_levels.light.numhounds self.warndurationfn = self.attack_levels.light.warnduration self:PlanNextHoundAttack() end function Hounded:OnSave() if not self.noserial then return { spawnmode = self.spawnmode, warning = self.warning, timetoattack = self.timetoattack, warnduration = self.warnduration, houndstorelease = self.houndstorelease, timetonexthound = self.timetonexthound } end self.noserial = false end function Hounded:OnLoad(data) self.spawnmode = data.spawnmode or "escalating" self.warning = data.warning or false self.timetoattack = data.timetoattack or 200 self.warnduration = data.warnduration or 30 if self.warnduration <= 0 or self.timetoattack <= 0 then self.warning = false end self.houndstorelease = data.houndstorelease or 0 self.timetonexthound = data.timetonexthound or 0 end function Hounded:OnProgress() self.noserial = true end function Hounded:GetDebugString() if self.timetoattack > 0 then return string.format("%s %d hounds are coming in %2.2f", self.warning and "WARNING" or "WAITING", self.houndstorelease, self.timetoattack) else return string.format("ATTACKING %d hounds left. Next in %2.2f", self.houndstorelease, self.timetonexthound) end end function Hounded:OnUpdate(dt) if self.spawnmode == "never" then return end self.timetoattack = self.timetoattack - dt if self.timetoattack <= 0 then self.timetonexthound = self.timetonexthound - dt self.warning = false if self.timetonexthound < 0 then self:ReleaseHound() local day = GetClock().numcycles if day < 20 then self.timetonexthound = 3 + math.random()*5 elseif day < 60 then self.timetonexthound = 2 + math.random()*3 elseif day < 100 then self.timetonexthound = .5 + math.random()*3 else self.timetonexthound = .5 + math.random()*1 end end if self.houndstorelease <= 0 then self:PlanNextHoundAttack() end else if not self.warning and self.timetoattack < self.warnduration then self.warning = true self.timetonextwarningsound = 0 end end if self.warning then self.timetonextwarningsound = self.timetonextwarningsound - dt if self.timetonextwarningsound <= 0 then self.announcewarningsoundinterval = self.announcewarningsoundinterval - 1 if self.announcewarningsoundinterval <= 0 then self.announcewarningsoundinterval = 10 + math.random(5) GetPlayer().components.talker:Say(GetString(GetPlayer().prefab, "ANNOUNCE_HOUNDS")) end local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddSoundEmitter() inst.persists = false local theta = math.random() * 2 * PI local radius = 30 if self.timetoattack < 30 then self.timetonextwarningsound = .3 + math.random(1) radius = HOUND_SPAWN_DIST elseif self.timetoattack < 60 then self.timetonextwarningsound = 2 + math.random(1) radius = HOUND_SPAWN_DIST + 10 elseif self.timetoattack < 90 then self.timetonextwarningsound = 4 + math.random(2) radius = HOUND_SPAWN_DIST + 20 else self.timetonextwarningsound = 5 + math.random(4) radius = HOUND_SPAWN_DIST + 30 end local offset = Vector3(GetPlayer().Transform:GetWorldPosition()) + Vector3(radius * math.cos( theta ), 0, -radius * math.sin( theta )) inst.Transform:SetPosition(offset.x,offset.y,offset.z) inst.SoundEmitter:PlaySound("dontstarve/creatures/hound/distant") inst:DoTaskInTime(1.5, function() inst:Remove() end) end end end function Hounded:CalcEscalationLevel() local day = GetClock().numcycles if day < 10 then self.attackdelayfn = self.attack_delays.rare self.attacksizefn = self.attack_levels.intro.numhounds self.warndurationfn = self.attack_levels.intro.warnduration elseif day < 25 then self.attackdelayfn = self.attack_delays.rare self.attacksizefn = self.attack_levels.light.numhounds self.warndurationfn = self.attack_levels.light.warnduration elseif day < 50 then self.attackdelayfn = self.attack_delays.occasional self.attacksizefn = self.attack_levels.med.numhounds self.warndurationfn = self.attack_levels.med.warnduration elseif day < 100 then self.attackdelayfn = self.attack_delays.occasional self.attacksizefn = self.attack_levels.heavy.numhounds self.warndurationfn = self.attack_levels.heavy.warnduration else self.attackdelayfn = self.attack_delays.frequent self.attacksizefn = self.attack_levels.crazy.numhounds self.warndurationfn = self.attack_levels.crazy.warnduration end end function Hounded:PlanNextHoundAttack() if self.spawnmode == "escalating" then self:CalcEscalationLevel() end if self.spawnmode ~= "never" then self.timetoattack = self.attackdelayfn() self.houndstorelease = self.attacksizefn() self.warnduration = self.warndurationfn() end end function Hounded:GetSpawnPoint(pt) local theta = math.random() * 2 * PI local radius = HOUND_SPAWN_DIST local offset = FindWalkableOffset(pt, theta, radius, 12, true) if offset then return pt+offset end end function Hounded:GetSpecialHoundChance() local day = GetClock():GetNumCycles() local chance = 0 for k,v in ipairs(TUNING.HOUND_SPECIAL_CHANCE) do if day > v.minday then chance = v.chance elseif day <= v.minday then return chance end end return chance end function Hounded:ReleaseHound(dt) local pt = Vector3(GetPlayer().Transform:GetWorldPosition()) local spawn_pt = self:GetSpawnPoint(pt) if spawn_pt then self.houndstorelease = self.houndstorelease - 1 local prefab = "hound" local day = GetClock().numcycles local special_hound_chance = self:GetSpecialHoundChance() if GetSeasonManager() and GetSeasonManager():IsSummer() then special_hound_chance = special_hound_chance * 1.5 end if math.random() < special_hound_chance then if GetSeasonManager():IsWinter() or GetSeasonManager():IsSpring() then prefab = "icehound" else prefab = "firehound" end end local hound = SpawnPrefab(prefab) if hound then hound.Physics:Teleport(spawn_pt:Get()) hound:FacePoint(pt) hound.components.combat:SuggestTarget(GetPlayer()) end end end function Hounded:LongUpdate(dt) --I don't think we want to make hounds accumulate here... --don't actually spawn lots and lots of hounds all at once... just make the next hound attack queue up for next real update if self.spawnmode == "never" then return end if self.timetoattack > 30 then self.timetoattack = math.max(30, self.timetoattack - dt) end end return Hounded
-- system.lua moonagents.global_functions() local server local client = {} local n_success = 0 local n_failure = 0 local n_tests = 1 local ncli = 0 local params local T = timer(.001,"T") local function Start(nclients, ip, port, npings, ping_int, timeout) n_tests = nclients or n_tests params = { ip, port, npings, ping_int, timeout } -- log_print("%s: %u",name_, n_tests) server = create("Server", "server", ip, port) timer_start(T) next_state("Active") end local function Active_T() if ncli < n_tests then client[ncli] = create(string.format("Client%u",ncli), "client", table.unpack(params)) ncli = ncli + 1 end if ncli == n_tests then timer_modify(T,1,"Tmonitor") end timer_start(T) end local function Active_Tmonitor() --log_print("tests=%u, succeeded=%u, failed=%u",n_tests,n_success,n_failure) timer_start(T) end local function Finished() local n = n_success + n_failure if n == ncli then send_out({ "RESULTS", ncli, n_success, n_failure }) send({ "STOP" }, server) stop() end end local function Active_Success() n_success = n_success + 1 Finished() end local function Active_Failure() n_failure = n_failure + 1 log("FAILURE '%s'",signal_[2]) Finished() end start_transition(Start) transition("Active","T",Active_T) transition("Active","Tmonitor",Active_Tmonitor) transition("Active","SUCCESS",Active_Success) transition("Active","FAILURE",Active_Failure)
function s090_skybase.main() Blackboard.SetProp("GAME_PROGRESS", "TeleportWorldUnlocked", "b", true) end function s090_skybase.InitFromBlackboard() Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_FLOOR_SLIDE", "f", 1) Game.ReinitPlayerFromBlackboard() Game.PopSetup("ChangeCamera_002_Distance", true, true) end function s090_skybase.SetupDebugGameBlackboard() Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_CURRENT_SPECIAL_ENERGY", "f", 1000) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_MAX_SPECIAL_ENERGY", "f", 1000) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_SPECIAL_ENERGY", "f", 0) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_CURRENT_LIFE", "f", 999) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_MAX_LIFE", "f", 999) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_MISSILE_MAX", "f", 84) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_MISSILE_CURRENT", "f", 84) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_SUPER_MISSILE", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_ICE_MISSILE", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_POWER_BOMB", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_POWER_BOMB_MAX", "f", 3) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_POWER_BOMB_CURRENT", "f", 3) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_VARIA_SUIT", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_GRAVITY_SUIT", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_DOUBLE_JUMP", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_SPACE_JUMP", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_SCREW_ATTACK", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_FLOOR_SLIDE", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_MORPH_BALL", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_BOMB", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_LINE_BOMB", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_CHARGE_BEAM", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_WIDE_BEAM", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_DIFFUSION_BEAM", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_GRAPPLE_BEAM", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_PLASMA_BEAM", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_WEAPON_WAVE_BEAM", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_MAGNET_GLOVE", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_SPEED_BOOSTER", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_OPTIC_CAMOUFLAGE", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_GHOST_AURA", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_SONAR", "f", 1) Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_METROIDNIZATION", "f", 0) end s090_skybase.tGetOnDeathOverrides = {ShowDeath = true, GoToMainMenu = false} function s090_skybase.GetOnDeathOverrides() return s090_skybase.tGetOnDeathOverrides end function s090_skybase.OnEntityGenerated(_ARG_0_, _ARG_1_) if _ARG_1_ ~= nil then print("OnEntityGenerated!!!!!!") end end function s090_skybase.OnComanderElevatorFinished() Game.AddSF(0.5, "s090_skybase.CommanderCutscenePresentation", "") end function s090_skybase.CommanderCutscenePresentation() local oActor = Game.GetActor("cutsceneplayer_86") if oActor ~= nil then oActor.CUTSCENE:TryLaunchCutscene() end end function s090_skybase.Delayed_OnComanderElevatorFinished() GUI.ShowMessage("#COMMANDER_CUTSCENE_ACCESSPOINT_REVEAL", true, "s090_skybase.OnComanderElevatorFinished_MessageSkipped") local oPlayer = Game.GetPlayer() if oPlayer ~= nil then oPlayer.INPUT:IgnoreInput(false, false, "OnComanderElevatorFinished") end end function s090_skybase.OnComanderElevatorFinished_MessageSkipped() end function s090_skybase.ActivateCommanderSpawnGroup() local oActor = Game.GetActor("SG_ChozoCommander") if oActor ~= nil then oActor.SPAWNGROUP:EnableSpawnGroup() end end function s090_skybase.FadeOutCommanderMusic1() Game.StopMusicStream(0, 1, 3) end function s090_skybase.FadeOutCommanderMusic2() Game.StopMusicStream(1, 1, 3) end function s090_skybase.SubAreaChangeRequest(_ARG_0_, _ARG_1_, _ARG_2_, _ARG_3_) Scenario.SubAreaChangeRequest(_ARG_0_, _ARG_1_, _ARG_2_, _ARG_3_) end function s090_skybase.OnSubAreaChange(_ARG_0_, _ARG_1_, _ARG_2_, _ARG_3_, _ARG_4_) end function s090_skybase.OnEnter_ChangeCamera_002_Near() Game.PushSetup("ChangeCamera_002_Distance", true, true) end function s090_skybase.OnEnter_ChangeCamera_002_Far() Game.PopSetup("ChangeCamera_002_Distance", true, true) end function s090_skybase.OnEnter_ChangeInterp() Game.GetCamera().CAMERA:SetLogicCameraParams("CAM_Near", true) end function s090_skybase.OnExit_ChangeInterp() Game.GetCamera().CAMERA:SetLogicCameraParams("CAM_Default", true) end function s090_skybase.ObtainHyperSuit() Game.GetPlayer().INVENTORY:SetItemAmount("ITEM_HYPER_SUIT", 1, true) Game.GetPlayer().INVENTORY:SetItemAmount("ITEM_WEAPON_HYPER_BEAM", 1, true) Game.GetPlayer().LIFE:StopLifeAlarmSFX() Game.GetPlayer().MODELUPDATER.sModelAlias = "Hyper" end function s090_skybase.cutsceneplayer_101_left() local oActorPlayer = Game.GetActor("cutsceneplayer_101") if oActorPlayer ~= nil then local oActorPlayerLeft = Game.GetActor("cutsceneplayer_101_left") if oActorPlayerLeft ~= nil then oActorPlayer.CUTSCENE:QueueCutscenePlayer(oActorPlayerLeft) end end end function s090_skybase.cutsceneplayer_101_right() local oActorPlayer = Game.GetActor("cutsceneplayer_101") if oActorPlayer ~= nil then local oActorPlayerRight = Game.GetActor("cutsceneplayer_101_right") if oActorPlayerRight ~= nil then oActorPlayer.CUTSCENE:QueueCutscenePlayer(oActorPlayerRight) end end end function s090_skybase.cutsceneplayer_108_end() local oPlayer = Game.GetPlayer() if oPlayer ~= nil then local L1_2 = oPlayer.INVENTORY if L1_2 ~= nil then L1_2:SetItemAmount("ITEM_HYPER_SUIT", 1, true) end local oModelUpdater = oPlayer.MODELUPDATER if oModelUpdater ~= nil then oModelUpdater.sModelAlias = "Hyper" oModelUpdater.ForceUpdate() end Game.LoadScenario("c10_samus", "s080_shipyard", "SP_Checkpoint_CommanderX", "", 1) Game.PlayCutsceneOnScenarioLoaded("cutsceneplayer_108", true, true, true, false, false, "", "", 0, 0, 0) end end
print(os.date())
UI = require("src/UI") Map = require("src/Map") Player = require("src/Player") -- Different types of scene SceneType = { Menu = 0, Options = 1, Credit = 2, Game = 3, Fight = 4 } function love.load(args) -- Load some default values WIN_SIZE = {width = 1920, height = 1080} SCENE = SceneType.Menu RSC_F = "ressources/" TILES_F = "ressources/tiles/" FONT = love.graphics.newFont(RSC_F .. "champifont.ttf", 20, "normal") love.graphics.setFont(FONT) MAP = Map.loadMap(RSC .. "map") TILES = Map.loadTiles(TILES_F) -- Load menu buttons in a single table Buttons = {} local buttonPlay = UI.newButton({100, 100}, RSC_F .. "button1.png", {648/3, 54}) table.insert(Buttons, buttonPlay) local buttonOptions = UI.newButton({100, 300}, RSC_F .. "button2.png", {558/3, 53}) table.insert(Buttons, buttonOptions) local buttonCredit = UI.newButton({100, 500}, RSC_F .. "button3.png", {513/3, 49}) table.insert(Buttons, buttonCredit) P = Player.newPlayer({100, 100}, RSC .. "warrior.png", {576/9, 256/4}) end function love.update(dt) -- Pseudo Scene Manager: update only the right scene if SCENE == SceneType.Menu then -- Event checker for ui elements for i = 1, #Buttons do pressed = Buttons[i].checkEvent() if pressed then if i == 1 then SCENE = SceneType.Game elseif i == 2 then SECNE = SceneType.Options elseif i == 3 then SCENE = SceneType.Credit end end end elseif SCENE == SceneType.Game then -- Event checker for game scene P.animate() P.coordUpdate() end end function love.draw() -- Pseudo Scene Manager: draw only the right scene if SCENE == SceneType.Menu then -- Draw ui elements for i = 1, #Buttons do Buttons[i].draw() end elseif SCENE == SceneType.Options then elseif SCENE == SceneType.Credit then -- Draw credits love.graphics.print("Created by Ryugha and pl0xxxy", WIN_SIZE.width / 2, WIN_SIZE.height / 2 - 20) elseif SCENE == SceneType.Game then -- fence, grass, pnj, sand, tree, wood for j = 1, #MAP do for i = 1, #MAP[j] do local c = string.sub(MAP[j], i, i) local x = (i - 1) * 64 local y = (j - 1) * 64 if c == 'a' then love.graphics.draw(TILES[2], x, y) elseif c == 'b' then love.graphics.draw(TILES[5], x, y) elseif c == 'c' then love.graphics.draw(TILES[1], x, y) elseif c == 'd' then love.graphics.draw(TILES[4], x, y) elseif c == 'e' then love.graphics.draw(TILES[3], x, y) elseif c == 'f' then love.graphics.draw(TILES[6], x, y) end end end P.draw() elseif SCENE == SceneType.Fight then end end function love.keypressed(key, scancode, isrepeat) if SCENE == SceneType.Menu then if key == "escape" then love.event.quit() end elseif SCENE == SceneType.Option then if key == "escape" then SCENE = SceneType.Menu end elseif SCENE == SceneType.Credit then if key == "escape" then SCENE = SceneType.Menu end elseif SCENE == SceneType.Game then if key == "escape" then SCENE = SceneType.Menu end elseif SCENE == SceneType.Fight then end end
local colors = require("leaf.colors").setup() local leaf = {} leaf.normal = { a = { bg = colors.bg_dimmer, fg = colors.fg_normal }, b = { bg = colors.bg_dim, fg = colors.fg_dim }, c = { bg = colors.bg_normal, fg = colors.fg_dimmer }, } leaf.insert = { a = { bg = colors.green_soft, fg = colors.bg_normal }, b = { bg = colors.bg_normal, fg = colors.green_soft }, } leaf.command = { a = { bg = colors.yellow_soft, fg = colors.bg_normal }, b = { bg = colors.bg_normal, fg = colors.yellow_soft }, } leaf.visual = { a = { bg = colors.purple_soft, fg = colors.bg_normal }, b = { bg = colors.bg_normal, fg = colors.purple_soft }, } leaf.replace = { a = { bg = colors.red_soft, fg = colors.bg_normal }, b = { bg = colors.bg_normal, fg = colors.red_soft }, } leaf.inactive = { a = { bg = colors.bg_normal, fg = colors.blue_soft }, b = { bg = colors.bg_normal, fg = colors.bg_soft }, c = { bg = colors.bg_normal, fg = colors.bg_dim }, } if vim.g.leaf_lualine_bold then for _, mode in pairs(leaf) do mode.a.gui = "bold" end end return leaf
-- Do not edit! This file was generated by composites/decimator_spec.py local radio = require('radio') local jigs = require('tests.jigs') jigs.TestBlock(radio.DecimatorBlock, { { desc = "2 Factor, 256 ComplexFloat32 input, 128 ComplexFloat32 output", args = {2}, inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})}, outputs = {radio.types.ComplexFloat32.vector_from_array({{0.00020748, -0.00019715}, {-0.00037080, 0.00038015}, {0.00055301, -0.00031953}, {-0.00096701, 0.00070404}, {0.00128505, -0.00119004}, {-0.00145419, 0.00161409}, {0.00164758, -0.00177044}, {-0.00169529, 0.00228845}, {0.00242160, -0.00257208}, {-0.00299557, 0.00337735}, {0.00323318, -0.00409173}, {-0.00382049, 0.00489235}, {0.00414213, -0.00591593}, {-0.00506784, 0.00680168}, {0.00623095, -0.00800072}, {-0.00722805, 0.00949041}, {0.00831679, -0.01121949}, {-0.00960150, 0.01300442}, {0.01129434, -0.01497184}, {-0.01314869, 0.01749312}, {0.01489704, -0.02050899}, {-0.01732599, 0.02353822}, {0.02003145, -0.02716771}, {-0.02359641, 0.03151349}, {0.02705687, -0.03671340}, {-0.03164162, 0.04268033}, {0.03775168, -0.05013287}, {-0.04591458, 0.06000541}, {0.05779679, -0.07329272}, {-0.07607108, 0.09319034}, {0.10990541, -0.12910606}, {-0.20719571, 0.22691272}, {-0.01805562, -0.02314655}, {0.06279077, 0.09909562}, {0.00166251, -0.61130178}, {0.34469706, -0.06042768}, {-0.27816761, 0.17642073}, {0.23295899, -0.36826786}, {-0.59570664, -0.17254312}, {-0.39704686, -0.36406192}, {-0.51580542, -0.39809364}, {0.66055280, -0.32438365}, {0.06302085, 0.26287997}, {0.45304072, -0.03445627}, {0.47983825, 0.36616710}, {-0.02204615, 0.29554322}, {-0.18253419, -0.30803961}, {-0.08093549, 0.16654584}, {0.06733125, 0.21019177}, {-0.20600206, -0.30541158}, {-0.00552385, -0.07621247}, {0.13853249, 0.21390384}, {0.50642926, 0.07470141}, {0.09933855, 0.28202054}, {0.10577977, -0.33749902}, {0.96214920, 0.30522150}, {0.14150453, 0.18164133}, {-0.31097764, 0.01613523}, {-0.01527224, -0.23968036}, {-0.04316019, 0.05700949}, {-0.59042603, -0.30397388}, {0.51013607, 0.89421123}, {-0.18418086, -0.22521022}, {-0.19685629, -0.72893173}, {-0.42667288, -0.15673269}, {-0.56784505, -0.37962458}, {-0.00830612, -0.05801649}, {-0.80107176, -0.30566922}, {-0.07523457, 0.19356412}, {-0.41956329, -0.22669412}, {-0.69439811, 0.18390350}, {0.00920700, 0.52202851}, {-0.03506111, 0.25830153}, {-0.51174760, 0.13416180}, {-0.04972213, 0.11362380}, {-0.04129393, 1.01132751}, {-0.04103415, -0.70164394}, {0.51901996, -0.22630523}, {0.49624589, 0.30123964}, {0.15220821, 0.13776754}, {-0.54808235, -0.27782062}, {-0.45029822, 0.31884432}, {-0.05586254, -0.20426549}, {0.34979829, -0.15287052}, {0.05542754, 0.07933784}, {0.97160804, 0.25442630}, {-0.50711268, 0.58574468}, {0.04697371, -0.46722457}, {0.57148778, -0.18571392}, {0.32132939, 0.01392008}, {0.25594047, 0.30800903}, {-1.03476286, -0.16522181}, {0.42482468, 0.71703446}, {-0.13757424, -0.60408700}, {0.21384136, -0.11793703}, {0.37770063, 0.11223425}, {0.21409123, -0.59024423}, {-0.56382632, 0.10704198}, {0.09539879, -0.54828131}, {-0.93506277, 0.72134966}, {0.35792267, 0.32243857}, {-0.67884755, -0.14953630}, {-0.09297948, -0.51917732}, {0.31710407, -0.28021461}, {0.40563720, -0.01287420}, {0.41802743, 0.02802894}, {0.09055575, 0.21245299}, {-0.66766524, -0.48773912}, {0.75571764, 0.03102626}, {0.07158519, -0.07736701}, {0.04543807, 0.08649303}, {0.05269034, -0.00048814}, {-0.42431304, -0.87564796}, {-0.33127019, -0.36281267}, {-0.49439865, 0.82591563}, {0.08011437, -0.47821870}, {0.89181525, -0.11982499}, {-0.05469853, 0.23654984}, {0.67810887, -0.86952400}, {0.39643928, 0.06851963}, {0.36432222, 0.65727174}, {0.41706997, -0.52661043}, {-0.17792046, -0.22301450}, {0.67688167, 0.23825856}, {-0.05237020, -0.31504130}, {0.02822751, -0.54908496}, {-0.18039219, -0.77741140}, {-0.08861043, -0.22434105}})} }, { desc = "3 Factor, 256 ComplexFloat32 input, 85 ComplexFloat32 output", args = {3}, inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})}, outputs = {radio.types.ComplexFloat32.vector_from_array({{0.00014657, -0.00013927}, {-0.00000171, -0.00018949}, {-0.00031026, -0.00001824}, {0.00005048, 0.00058912}, {-0.00022178, -0.00067523}, {0.00000891, 0.00073430}, {-0.00052751, -0.00123953}, {0.00111491, 0.00156911}, {-0.00111068, -0.00198828}, {0.00140100, 0.00279279}, {-0.00194219, -0.00387907}, {0.00262081, 0.00496130}, {-0.00316995, -0.00669026}, {0.00446285, 0.00819409}, {-0.00530667, -0.01062786}, {0.00656413, 0.01353214}, {-0.00808531, -0.01660199}, {0.01011261, 0.02112879}, {-0.01296665, -0.02691164}, {0.01673398, 0.03463298}, {-0.02058979, -0.04760611}, {-0.09433307, 0.18772420}, {0.02424630, -0.15923052}, {0.15491337, -0.30274066}, {-0.00171726, 0.06285878}, {-0.14337049, -0.28117728}, {-0.65404582, -0.32315710}, {0.12330756, -0.36580533}, {0.32335529, 0.06562246}, {0.42292371, 0.22690366}, {0.08991849, 0.19259317}, {-0.22155774, -0.10575768}, {0.08745003, 0.19146711}, {-0.23757663, -0.27936736}, {0.32874438, 0.21263389}, {0.20166394, 0.11538528}, {0.30542648, -0.04725168}, {0.60556978, 0.20124348}, {-0.28588578, 0.04496438}, {-0.00564646, -0.22778465}, {-0.32651722, 0.12521318}, {0.27896029, 0.34995642}, {-0.40133959, -0.67753059}, {-0.34143099, -0.15701897}, {-0.43174261, -0.30110216}, {-0.31415090, 0.03068068}, {-0.46206939, -0.13206123}, {-0.34346008, 0.39142713}, {-0.05314438, 0.28326312}, {-0.35910082, 0.14757675}, {0.03383811, 0.55693382}, {0.13062239, -0.54557866}, {0.65441275, 0.29617196}, {-0.32763311, -0.07951278}, {-0.40003115, 0.07803410}, {0.06491286, -0.13628019}, {0.44205639, -0.01158880}, {0.24352899, 0.51509506}, {-0.19239485, -0.27741629}, {0.74811417, -0.07718483}, {-0.23349734, 0.12925775}, {-0.27310985, 0.25761810}, {0.12526788, -0.16066726}, {0.25362030, -0.17955227}, {0.17170487, -0.15188858}, {-0.42375448, -0.34964770}, {-0.26955378, 0.46007961}, {-0.28861094, 0.14936861}, {-0.17252110, -0.50962263}, {0.40148550, -0.13469432}, {0.42445037, 0.09675643}, {-0.30946940, -0.08009040}, {0.29922199, -0.25258738}, {0.17956418, 0.19066682}, {-0.10198373, -0.26484028}, {-0.35038352, -0.57253146}, {-0.44851005, 0.37098727}, {0.49411976, -0.23417574}, {0.34569946, -0.06409665}, {0.45970964, -0.44057238}, {0.43693075, 0.49438852}, {0.11935469, -0.51481950}, {0.33727211, 0.22469300}, {0.03186662, -0.54194468}, {-0.14135127, -0.58882880}, {-0.12040383, -0.32953164}})} }, { desc = "4 Factor, 256 ComplexFloat32 input, 64 ComplexFloat32 output", args = {4}, inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})}, outputs = {radio.types.ComplexFloat32.vector_from_array({{0.00011234, -0.00010675}, {-0.00021045, 0.00017625}, {0.00010160, -0.00013035}, {-0.00018205, 0.00042580}, {0.00076567, -0.00026069}, {-0.00145801, 0.00066778}, {0.00149279, -0.00103634}, {-0.00231328, 0.00113763}, {0.00336723, -0.00171000}, {-0.00459230, 0.00257918}, {0.00618344, -0.00356819}, {-0.00854988, 0.00453732}, {0.01082620, -0.00654389}, {-0.01476297, 0.00928148}, {0.02192977, -0.01441345}, {-0.04196896, 0.02955269}, {-0.05001976, 0.07517563}, {0.09406834, -0.28472629}, {0.08073253, -0.02675143}, {-0.40381122, -0.28407094}, {-0.24973920, -0.37469333}, {0.45578766, 0.02380593}, {0.25320369, 0.25905138}, {-0.05915600, 0.01058980}, {-0.11570290, 0.03763940}, {0.04221855, -0.10598195}, {0.23475572, 0.22702301}, {0.38242397, -0.06511461}, {0.31142271, 0.24709953}, {-0.27334592, -0.23899150}, {-0.05369232, 0.20615877}, {-0.01319358, -0.02033150}, {-0.42002729, -0.53104430}, {-0.36227933, -0.04880257}, {-0.39426142, -0.19187713}, {-0.38929564, 0.29093224}, {-0.13208476, 0.21663781}, {-0.25416735, 0.38724756}, {0.17179526, -0.07336678}, {0.44485658, -0.04515831}, {-0.35931590, 0.13327026}, {-0.18924175, -0.16162513}, {0.53503406, 0.11886964}, {-0.06864094, 0.24715842}, {0.42015892, -0.29060757}, {-0.02877939, 0.24614787}, {-0.26022100, 0.05046177}, {0.34490559, -0.15021786}, {0.04376514, -0.25402322}, {-0.35816112, -0.05195342}, {-0.27851853, 0.39367011}, {-0.15742807, -0.50068957}, {0.51756722, 0.01576386}, {-0.05846355, -0.03513076}, {0.13066557, -0.16750449}, {0.19413929, 0.08309738}, {-0.38300553, -0.53520983}, {-0.26489624, 0.17416343}, {0.42228246, -0.16898522}, {0.43439063, -0.21531788}, {0.37992758, 0.08543247}, {0.21214306, -0.13157092}, {0.17945361, -0.20531420}, {-0.15876567, -0.66048920}})} }, { desc = "7 Factor, 256 ComplexFloat32 input, 36 ComplexFloat32 output", args = {7}, inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})}, outputs = {radio.types.ComplexFloat32.vector_from_array({{0.00006516, -0.00006191}, {0.00013221, -0.00039337}, {-0.00037171, 0.00040028}, {0.00055998, -0.00156243}, {0.00004004, 0.00343952}, {-0.00018213, -0.00587463}, {0.00103330, 0.01054077}, {-0.00148027, -0.01801586}, {0.00180801, 0.03146745}, {-0.04246404, -0.01997419}, {0.09250188, -0.12085749}, {-0.34461865, -0.30814347}, {0.28532556, -0.02558412}, {0.08497050, 0.17027500}, {-0.12218749, -0.07985252}, {0.36503783, 0.14365153}, {0.16148070, -0.00510847}, {-0.12948903, 0.06949501}, {-0.16481295, -0.20797774}, {-0.46111450, -0.24505082}, {-0.29399192, 0.21872213}, {-0.19082287, 0.25593591}, {0.27077124, 0.00886635}, {-0.17503801, -0.03632910}, {0.17951424, 0.10766860}, {0.25690588, -0.02339158}, {-0.11624172, 0.12701119}, {0.20384270, -0.22592565}, {-0.32114217, 0.04305742}, {-0.07811810, -0.07973192}, {0.21199262, -0.11911392}, {0.12097151, -0.05094986}, {-0.25003925, -0.20655748}, {0.12969683, -0.07620036}, {0.49751279, -0.09242750}, {0.16820888, -0.09139653}, {-0.03146334, -0.50060380}})} }, { desc = "2 Factor, 256 Float32 input, 128 Float32 output", args = {2}, inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})}, outputs = {radio.types.Float32.vector_from_array({0.00006948, 0.00037967, -0.00033047, -0.00003776, -0.00027532, 0.00015286, -0.00028905, 0.00017578, -0.00010411, 0.00020502, 0.00011114, -0.00001342, -0.00022541, -0.00015562, 0.00006818, -0.00036052, 0.00031057, -0.00046421, 0.00029949, -0.00082581, 0.00068835, -0.00085670, 0.00105970, -0.00146591, 0.00161433, -0.00165081, 0.00181731, -0.00154502, 0.00059236, 0.00188962, -0.00746549, 0.01862274, -0.43331236, -0.79187912, 0.56319326, 0.44491044, 0.48153895, 0.12709233, 0.60951293, -0.34062731, 0.05884538, -0.52558160, -0.38018745, 0.25894460, 0.44995499, 0.58885074, 0.18794960, 0.41602618, -0.00054586, 0.28132895, 0.70906609, 0.61256278, 0.42129168, -0.40023434, 0.54250348, -0.11540470, 0.19768341, -0.42187622, 0.00359862, 0.10437220, -0.46694365, 0.31758344, 0.34743413, 0.00732962, -0.25580391, -0.07597881, -0.23174898, 0.21187608, -0.14906244, 0.13257961, 0.29656854, 0.06611043, -0.47018203, 0.31330782, 0.03140674, 0.15198097, 0.48773590, -0.01643436, 0.11855204, 0.04015971, 0.29040340, -0.38815072, 0.54597956, 0.37838349, 0.15250334, -0.63739622, -0.13639577, 0.02702661, 0.15652408, 0.01443393, -0.56844318, -0.20194708, -0.97225058, 0.52856851, -0.70844883, 0.55968356, 0.49110153, 0.03327906, -0.17061503, -0.31534243, -0.21522081, -0.45200586, 0.22495988, -0.08187789, -0.16084597, 0.59711164, 0.21351315, 0.27126852, -0.07609796, 0.24296509, 0.46034941, 0.19860242, -0.30660132, -0.41431254, -0.42746398, -0.38076347, 0.68564421, -0.70787638, -0.04389573, -0.88790613, -0.64715463, 0.08922100, 0.78574425, -0.12127704, 0.71365374, -0.22258750, -0.09259445, 0.22665647})} }, { desc = "3 Factor, 256 Float32 input, 85 Float32 output", args = {3}, inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})}, outputs = {radio.types.Float32.vector_from_array({0.00004908, -0.00042110, 0.00061522, -0.00056834, 0.00094983, -0.00082163, 0.00134394, -0.00220136, 0.00281366, -0.00328324, 0.00417927, -0.00500204, 0.00621470, -0.00742448, 0.00956660, -0.01212675, 0.01501294, -0.01931375, 0.02639651, -0.03879671, 0.06853209, -0.24818653, -0.56590533, 0.61931980, 0.31185269, 0.38400179, -0.01539870, -0.28787133, -0.38099298, 0.44685948, 0.45059109, 0.31870267, 0.11044250, 0.45003071, 0.73579913, -0.02944041, 0.17775406, 0.09078279, -0.23894538, 0.02819626, -0.22523960, 0.34118468, 0.04822040, -0.26259533, -0.01600392, -0.03479921, 0.13671529, 0.17322141, -0.24172232, 0.16981044, 0.17269474, 0.31200960, -0.04352732, 0.23078862, -0.15773258, 0.56460041, -0.02382670, -0.43343970, 0.09975163, 0.06406554, -0.36951545, -0.53907293, -0.14208859, -0.01528355, 0.56368333, -0.16167186, -0.21656635, -0.37226233, 0.05478460, -0.09933541, 0.35800818, 0.30614722, -0.02893459, 0.40839162, 0.16148627, -0.36392257, -0.49804732, 0.12016557, -0.13395077, -0.59956688, -0.63696772, 0.44444868, 0.31628105, 0.21383719, -0.16570629, 0.24935028})} }, { desc = "4 Factor, 256 Float32 input, 64 Float32 output", args = {4}, inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})}, outputs = {radio.types.Float32.vector_from_array({0.00003762, 0.00058612, -0.00130635, 0.00154353, -0.00211640, 0.00369416, -0.00542666, 0.00696460, -0.00997647, 0.01315704, -0.01830185, 0.02455780, -0.03304100, 0.04602399, -0.06711531, 0.11175191, -0.50792938, 0.16444889, 0.49985495, 0.21128194, -0.22160016, -0.29187769, 0.48755229, 0.37795904, 0.10741696, 0.65167892, 0.25994924, 0.08711389, 0.00812801, -0.15977947, -0.04188191, 0.24042463, -0.16492555, -0.08700360, 0.03912793, 0.17850336, -0.15454519, 0.19270487, 0.20495453, 0.14760585, -0.03374858, 0.32187748, 0.04951713, -0.34863266, 0.23261631, -0.44084278, -0.38488248, -0.03662838, 0.41281667, -0.18630143, -0.30112416, -0.08187819, 0.09251468, 0.36487046, 0.03915032, 0.39631668, -0.21883102, -0.44778645, 0.13137867, -0.51495641, -0.51950604, 0.47202379, 0.18862534, -0.00683557})} }, { desc = "7 Factor, 256 Float32 input, 36 Float32 output", args = {7}, inputs = {radio.types.Float32.vector_from_array({-0.24488358, -0.59217191, -0.99224871, -0.44475749, 0.19632840, 0.76332581, 0.65884250, 0.02192042, 0.97403622, -0.07683806, 0.66918695, -0.18206932, 0.48926124, 0.97518337, -0.38932681, -0.65937436, 0.24006742, 0.06191236, -0.28115594, -0.99296153, -0.22167473, -0.14826106, -0.18949586, 0.72249067, 0.16885605, 0.46766159, 0.79581833, 0.49754697, -0.01459590, 0.49153668, 0.28071079, 0.29749086, 0.25935072, -0.18600205, 0.25852406, 0.26746503, 0.87423593, 0.56494737, 0.69253606, 0.53499961, 0.63065171, 0.21092477, -0.30109984, -0.47083348, 0.41604009, 0.74788415, 0.08849352, -0.69586009, 0.66595060, -0.03091384, -0.06579474, -0.90922385, 0.02056185, 0.48949531, -0.15480438, -0.28964537, 0.31368709, -0.96051723, 0.01432719, 0.89225417, 0.38089520, -0.19615254, 0.37781647, 0.20998783, -0.58222121, -0.58458334, 0.77205056, -0.46186161, -0.85023046, 0.66135520, 0.04639554, -0.26358366, 0.02303784, 0.47345135, -0.66289276, 0.30613399, 0.42687401, 0.63000691, -0.46047872, 0.21933267, -0.53577226, 0.12208935, -0.65527403, 0.57953525, 0.73343575, -0.34071288, -0.55536288, 0.92757678, 0.41338065, 0.68758518, -0.93893105, 0.79878664, 0.24490412, -0.36694169, -0.13646875, 0.52318597, 0.57082391, -0.62019825, 0.25177300, -0.66874093, 0.94609958, -0.11284689, 0.82629001, 0.45649573, 0.21251979, -0.47603193, 0.05318464, -0.72276050, -0.72380400, 0.43149957, -0.27782047, 0.50275260, -0.51901281, 0.43631628, 0.43695384, -0.38900825, -0.78722912, -0.20598429, -0.01527700, -0.80005163, -0.62647748, -0.88931382, 0.19502714, 0.77775222, -0.56688440, -0.93057311, 0.40784720, 0.62982112, 0.92824322, 0.22635791, -0.31511366, 0.67573726, -0.76386577, 0.38527387, -0.80953830, -0.20058849, -0.00995424, -0.24421147, -0.66280484, -0.53656536, 0.64029998, -0.07484839, 0.15986548, -0.57618594, 0.42987013, -0.33976549, 0.18723717, 0.81897414, 0.98878682, -0.90756410, 0.59488541, 0.71517563, -0.36085111, -0.23370475, 0.16050752, 0.83768046, -0.20014282, 0.76006031, 0.51712108, -0.69545382, 0.82735986, -0.96963781, -0.70964354, 0.32962242, -0.88576066, -0.24102025, -0.74004227, -0.07422146, 0.67996067, 0.81216872, -0.92906070, -0.87829649, 0.68124807, -0.91437042, -0.45281947, -0.76512659, -0.81792456, -0.94475424, 0.27502602, 0.48922855, 0.37354276, 0.69124550, 0.32603237, -0.22059613, 0.26212606, 0.93918961, 0.28320667, -0.51381654, -0.87963182, 0.87033200, 0.18099099, -0.30077052, 0.21070550, 0.12051519, 0.04434354, -0.87839073, -0.29354489, -0.17469995, -0.60126334, 0.76021045, -0.15176044, 0.32477134, 0.42709291, 0.48656613, 0.44223061, 0.50441700, -0.49683860, 0.95280737, -0.69798046, 0.83729482, 0.70913750, 0.70432854, -0.89437741, -0.81756383, 0.62611163, -0.06166634, -0.25949362, 0.96937495, -0.91976410, 0.06293010, -0.11330045, -0.74359375, -0.20962349, 0.41529480, 0.76463121, -0.95076066, 0.04901912, -0.81924683, 0.60078692, -0.82842946, -0.93161339, -0.23152760, 0.46521235, -0.37358665, -0.73999017, 0.58914447, 0.61383879, 0.71171957, -0.39251104, -0.15033928, -0.50922000, 0.11435498, -0.33978567, -0.32267332, 0.56724286, 0.91259229, 0.16828065, -0.79062414, 0.30514985, -0.10277656, 0.97606111, 0.43876299, 0.66957223, 0.40257251, 0.07123801, 0.79363680})}, outputs = {radio.types.Float32.vector_from_array({0.00002182, -0.00056573, 0.00195063, -0.00417494, 0.00850317, -0.01457151, 0.02632391, -0.04455308, 0.08151431, -0.29857475, 0.34712136, 0.07782910, -0.14516608, 0.42305282, 0.31434351, 0.36622459, -0.13446771, 0.02925324, -0.00285705, -0.04668992, 0.05344543, 0.08312727, 0.15567906, 0.14692207, 0.01203473, -0.06772064, -0.39312652, 0.11060279, -0.04219506, -0.21440880, 0.22309625, 0.25301453, -0.13642797, -0.20900449, -0.39890513, 0.23010047, 0.09324665})} }, }, {epsilon = 1.0e-06})
return LoadActor(THEME:GetPathB("","_doors"), "_newer door", 0.2, true )
--[[ Name: ain_config_tc.lua Desc: This is an example that illustrates specifically how to Enable a thermocouple to be read on AIN0 in differential input mode. For the most up to date thermocouple type constants, see the T-Series datasheet page: https://labjack.com/support/datasheets/t-series/ain/extended-features/thermocouple For general assistance with thermocouples, read our general thermocouples App-Note as well as the related device-specific one: https://labjack.com/support/app-notes/thermocouples --]] ------------------------------------------------------------------------------- -- Desc: This function can be used to configure the extended AIN feature -- settings designed for thermocouples such as thermocouple type, -- temperature unit used, temperature probe address, cjc slope, and cjc -- offset. See the thermocouple datasheet in the script description for -- more information on these settings ------------------------------------------------------------------------------- local function ain_ef_config_tc(ainchannel, tctype, unit, cjcaddressess, cjcslope, cjcoffset) local indexaddress = MB.nameToAddress("AIN0_EF_INDEX") local confaddressa = MB.nameToAddress("AIN0_EF_CONFIG_A") local confaddressb = MB.nameToAddress("AIN0_EF_CONFIG_B") local confaddressd = MB.nameToAddress("AIN0_EF_CONFIG_D") local confaddresse = MB.nameToAddress("AIN0_EF_CONFIG_E") -- Disable AIN_EF MB.W(indexaddress + ainchannel * 2, 1, 0) -- Enable AIN_EF MB.W(indexaddress + ainchannel * 2, 1, tctype) -- Write to AIN_EF_CONFIG_A MB.W(confaddressa + ainchannel * 2, 1, unit) -- Write to AIN_EF_CONFIG_B MB.W(confaddressb + ainchannel * 2, 1, cjcaddressess) -- Write to AIN_EF_CONFIG_D MB.W(confaddressd + ainchannel * 2, 3, cjcslope) -- Write to AIN_EF_CONFIG_E MB.W(confaddresse + ainchannel * 2, 3, cjcoffset) end ------------------------------------------------------------------------------- -- Desc: This function can be used to configure general analog input settings -- such as range, resolution, and settling. More information about -- these settings can be found on the LabJack website under the AIN -- section: -- https://labjack.com/support/datasheets/t-series/ain ------------------------------------------------------------------------------- local function ain_channel_config(ainchannel, range, resolution, settling, isdifferential) local rangeaddress = MB.nameToAddress("AIN0_RANGE") local resaddress = MB.nameToAddress("AIN0_RESOLUTION_INDEX") local setaddress = MB.nameToAddress("AIN0_SETTLING_US") local negchaddress = MB.nameToAddress("AIN0_NEGATIVE_CH") -- Set AIN range MB.W(rangeaddress + ainchannel * 2, 3, range) -- Set resolution index MB.W(resaddress + ainchannel * 1, 0, resolution) -- Set settling time MB.W(setaddress + ainchannel * 2, 3, settling) -- Read the device type local devicetype = MB.readName("PRODUCT_ID") -- Setup the negative channel if using a differential input if isdifferential and (ainchannel%2 == 0) and (devicetype == 7) then -- The negative channels setting is only valid for even -- analog input channels and is not valid for the T4. if (ainchannel < 14) then -- The negative channel is 1+ the channel for AIN0-13 on the T7 MB.W(negchaddress + ainchannel, 0, ainchannel + 1) elseif (ainchannel > 47) then -- The negative channel is 8+ the channel for AIN48-127 on the T7 -- when using a Mux80. -- https://labjack.com/support/datasheets/accessories/mux80 MB.W(negchaddress + ainchannel, 0, ainchannel + 8) else print(string.format("Can not set negative channel for AIN%d",ainchannel)) end end end -- AIN#_EF_INDEX values for each thermocouple type local tctypes = {} tctypes["E"] = 20 tctypes["J"] = 21 tctypes["K"] = 22 tctypes["R"] = 23 tctypes["T"] = 24 tctypes["S"] = 25 tctypes["C"] = 30 -- AIN#_EF_CONFIG_A values corresponding to their temperature units local tempunits = {} tempunits["K"] = 0 tempunits["C"] = 1 tempunits["F"] = 2 -- Enable AIN0 and AIN2 local ainchannels = {0, 2} local tctype = "J" local tempunit = "K" -- Use the device"s internal temp sensor, TEMPERATURE_DEVICE_K local cjcaddress = 60052 local range = 0.1 local resolution = 8 -- Use default settling time local settling = 0 local isdifferential = true local readconfaddressa = MB.nameToAddress("AIN0_EF_READ_A") -- Configure each analog input for i=1,table.getn(ainchannels) do -- As per our App-Note, we HIGHLY RECOMMEND configuring the AIN -- to use the differential input mode instead of single ended. -- Enable the following line to do so: ain_channel_config(ainchannels[i],range,resolution,settling,isdifferential) ain_ef_config_tc(ainchannels[i],tctypes[tctype],tempunits[tempunit],cjcaddress) end --Configure a 500ms interval LJ.IntervalConfig(0, 500) local checkInterval=LJ.CheckInterval -- Run the program in an infinite loop while true do -- If an interval is done if LJ.CheckInterval(0) then -- Read & Print out each read AIN channel for i=1, table.getn(ainchannels) do local temperature = MB.R(readconfaddressa + ainchannels[i] * 2, 3) print(string.format("Temperature: %.3f %s", temperature, tempunit)) end end end
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore local TT = E:GetModule('Tooltip') local tiers = { "EP", "CoS", "BoD"} local levels = { "Mythic", "Heroic", "Normal", "LFR", } local bossesBoD = { { -- Battle of Dazar'alor (BoD) Alliance { -- Mythic 13331, 13348, 13353, 13362, 13366, 13370, 13374, 13378, 13382, }, { -- Heroic 13330, 13347, 13351, 13361, 13365, 13369, 13373, 13377, 13381, }, { -- Normal 13329, 13346, 13350, 13359, 13364, 13368, 13372, 13376, 13380, }, { -- LFR 13328, 13344, 13349, 13358, 13363, 13367, 13371, 13375, 13379, }, }, { -- Battle of Dazar'alor (BoD) Horde { -- Mythic 13331, 13336, 13357, 13362, 13366, 13370, 13374, 13378, 13382, }, { -- Heroic 13330, 13334, 13356, 13361, 13365, 13369, 13373, 13377, 13381, }, { -- Normal 13329, 13333, 13355, 13358, 13363, 13367, 13371, 13375, 13379, }, { -- LFR 13328, 13332, 13354, 13358, 13363, 13367, 13371, 13375, 13379, }, }, } local bosses = { { -- Eternal Palace { -- Mythic 13590, 13594, 13598, 13603, 13607, 13611, 13615, 13619, }, { -- Heroic 13589, 13593, 13597, 13602, 13606, 13610, 13614, 13618, }, { -- Normal 13588, 13592, 13596, 13601, 13605, 13609, 13613, 13617, }, { -- LFR 13587, 13591, 13595, 13600, 13604, 13608, 13612, 13616, }, }, { -- Crucible of Storms { -- Mythic 13407, 13413, }, { -- Heroic 13406, 13412, }, { -- Normal 13405, 13411, }, { -- LFR 13404, 13408, }, }, } local playerGUID = UnitGUID("player") local progressCache = {} local highest = { 0, 0 } local englishFaction, localizedFaction = UnitFactionGroup("player") if (englishFaction == "Alliance") then table.insert(bosses, bossesBoD[1]) end if (englishFaction == "Horde") then table.insert(bosses, bossesBoD[2]) end local function GetProgression(guid) local kills, complete, pos = 0, false, 0 local statFunc = guid == playerGUID and GetStatistic or GetComparisonStatistic for tier = 1, #bosses do progressCache[guid].header[tier] = {} progressCache[guid].info[tier] = {} for level = 1, 4 do highest = 0 for statInfo = 1, #bosses[tier][level] do kills = tonumber((statFunc(bosses[tier][level][statInfo]))) if kills and kills > 0 then highest = highest + 1 end end pos = highest if (highest > 0) then progressCache[guid].header[tier][level] = ("%s [%s]:"):format(tiers[tier], levels[level]) progressCache[guid].info[tier][level] = ("%d/%d"):format(highest, #bosses[tier][level]) if highest == #bosses[tier][level] then break end end end end end local function UpdateProgression(guid) progressCache[guid] = progressCache[guid] or {} progressCache[guid].header = progressCache[guid].header or {} progressCache[guid].info = progressCache[guid].info or {} progressCache[guid].timer = GetTime() GetProgression(guid) end local function SetProgressionInfo(guid, tt) if progressCache[guid] then local updated = 0 for i=1, tt:NumLines() do local leftTipText = _G["GameTooltipTextLeft"..i] for tier = 1, #bosses do for level = 1, 4 do if (leftTipText:GetText() and leftTipText:GetText():find(tiers[tier]) and leftTipText:GetText():find(levels[level])) then -- update found tooltip text line local rightTipText = _G["GameTooltipTextRight"..i] leftTipText:SetText(progressCache[guid].header[tier][level]) rightTipText:SetText(progressCache[guid].info[tier][level]) updated = 1 end end end end if updated == 1 then return end -- add progression tooltip line if highest > 0 then tt:AddLine(" ") end for tier = 1, #bosses do for level = 1, 4 do tt:AddDoubleLine(progressCache[guid].header[tier][level], progressCache[guid].info[tier][level], nil, nil, nil, 1, 1, 1) end end end end function TT:INSPECT_ACHIEVEMENT_READY(event, GUID) if (self.compareGUID ~= GUID) then return end local unit = "mouseover" if UnitExists(unit) then UpdateProgression(GUID) GameTooltip:SetUnit(unit) end ClearAchievementComparisonUnit() self:UnregisterEvent("INSPECT_ACHIEVEMENT_READY") end hooksecurefunc(TT, 'AddInspectInfo', function(self, tt, unit, numTries, r, g, b) if InCombatLockdown() then return end if not E.db.tooltip.progressInfo then return end if not (unit and CanInspect(unit)) then return end local level = UnitLevel(unit) if not level or level < MAX_PLAYER_LEVEL then return end local guid = UnitGUID(unit) if not progressCache[guid] or (GetTime() - progressCache[guid].timer) > 600 then if guid == playerGUID then UpdateProgression(guid) else ClearAchievementComparisonUnit() if not self.loadedComparison and select(2, IsAddOnLoaded("Blizzard_AchievementUI")) then AchievementFrame_DisplayComparison(unit) HideUIPanel(AchievementFrame) ClearAchievementComparisonUnit() self.loadedComparison = true end self.compareGUID = guid if SetAchievementComparisonUnit(unit) then self:RegisterEvent("INSPECT_ACHIEVEMENT_READY") end return end end SetProgressionInfo(guid, tt) end)
local GameViewLayer = class("GameViewLayer",function(scene) local gameViewLayer = display.newLayer() return gameViewLayer end) require("client/src/plaza/models/yl") local cmd = appdf.req(appdf.GAME_SRC.."yule.oxnew.src.models.CMD_Game") local SetLayer = appdf.req(appdf.GAME_SRC.."yule.oxnew.src.views.layer.SetLayer") local PopupInfoHead = appdf.req("client.src.external.PopupInfoHead") local GameChatLayer = appdf.req(appdf.CLIENT_SRC.."plaza.views.layer.game.GameChatLayer") local ExternalFun = appdf.req(appdf.EXTERNAL_SRC .. "ExternalFun") local AnimationMgr = appdf.req(appdf.EXTERNAL_SRC .. "AnimationMgr") GameViewLayer.BT_PROMPT = 2 GameViewLayer.BT_OPENCARD = 3 GameViewLayer.BT_START = 4 GameViewLayer.BT_CALLBANKER = 5 GameViewLayer.BT_CANCEL = 6 GameViewLayer.BT_CHIP = 7 GameViewLayer.BT_CHIP1 = 8 GameViewLayer.BT_CHIP2 = 9 GameViewLayer.BT_CHIP3 = 10 GameViewLayer.BT_CHIP4 = 11 GameViewLayer.BT_SWITCH = 12 GameViewLayer.BT_SET = 13 GameViewLayer.BT_CHAT = 14 GameViewLayer.BT_HOWPLAY = 15 GameViewLayer.BT_EXIT = 16 --GameViewLayer.BT_SOUND = 15 --GameViewLayer.BT_TAKEBACK = 16 GameViewLayer.FRAME = 1 GameViewLayer.NICKNAME = 2 GameViewLayer.SCORE = 3 GameViewLayer.FACE = 7 GameViewLayer.TIMENUM = 1 GameViewLayer.CHIPNUM = 1 GameViewLayer.SCORENUM = 1 --牌间距 GameViewLayer.CARDSPACING = 35 GameViewLayer.VIEWID_CENTER = 5 GameViewLayer.RES_PATH = "game/yule/oxnew/res/" local pointPlayer = {cc.p(877, 610), cc.p(88, 410), cc.p(157, 115), cc.p(1200, 410)} local pointCard = {cc.p(640, 584), cc.p(298, 402), cc.p(667, 110), cc.p(988, 402)} local pointClock = {cc.p(1017, 615), cc.p(88, 556), cc.p(157, 255), cc.p(1200, 556)} local pointOpenCard = {cc.p(437, 610), cc.p(288, 285), cc.p(1117, 115), cc.p(990, 285)} local pointCardType = {cc.p(437, 610), cc.p(288, 285), cc.p(910, 115), cc.p(990, 285)} local pointTableScore = {cc.p(640, 490), cc.p(491, 410), cc.p(640, 330), cc.p(810, 410)} local pointBankerFlag = {cc.p(948, 714), cc.p(159, 499), cc.p(228, 204), cc.p(1120, 495)} local pointChat = {cc.p(767, 665), cc.p(160, 525), cc.p(230, 250), cc.p(1130, 525)} local pointUserInfo = {cc.p(445, 240), cc.p(182, 305), cc.p(205, 170), cc.p(720, 305)} local anchorPoint = {cc.p(1, 1), cc.p(0, 0.5), cc.p(0, 0), cc.p(1, 0.5)} local AnimationRes = { {name = "banker", file = GameViewLayer.RES_PATH.."animation_banker/banker_", nCount = 11, fInterval = 0.2, nLoops = 1}, {name = "faceFlash", file = GameViewLayer.RES_PATH.."animation_faceFlash/faceFlash_", nCount = 2, fInterval = 0.6, nLoops = 3}, {name = "lose", file = GameViewLayer.RES_PATH.."animation_lose/lose_", nCount = 17, fInterval = 0.1, nLoops = 1}, {name = "start", file = GameViewLayer.RES_PATH.."animation_start/start_", nCount = 11, fInterval = 0.15, nLoops = 1}, {name = "victory", file = GameViewLayer.RES_PATH.."animation_victory/victory_", nCount = 17, fInterval = 0.13, nLoops = 1}, {name = "yellow", file = GameViewLayer.RES_PATH.."animation_yellow/yellow_", nCount = 5, fInterval = 0.2, nLoops = 1}, {name = "blue", file = GameViewLayer.RES_PATH.."animation_blue/blue_", nCount = 5, fInterval = 0.2, nLoops = 1} } function GameViewLayer:onInitData() self.bCardOut = {false, false, false, false, false} self.lUserMaxScore = {0, 0, 0, 0} self.chatDetails = {} self.bCanMoveCard = false self.cbGender = {} self.bBtnInOutside = false self.bBtnMoving = false end function GameViewLayer:onExit() print("GameViewLayer onExit") cc.Director:getInstance():getTextureCache():removeTextureForKey("card.png") cc.SpriteFrameCache:getInstance():removeSpriteFramesFromFile("gameScene_oxnew.plist") cc.Director:getInstance():getTextureCache():removeTextureForKey("gameScene_oxnew.png") cc.Director:getInstance():getTextureCache():removeUnusedTextures() cc.SpriteFrameCache:getInstance():removeUnusedSpriteFrames() AnimationMgr.removeCachedAnimation(cmd.VOICE_ANIMATION_KEY) end local this function GameViewLayer:ctor(scene) this = self self._scene = scene self:onInitData() self:preloadUI() self._setLayer = SetLayer:create(self):addTo(self, 3) --节点事件 local function onNodeEvent(event) if event == "exit" then self:onExit() end end self:registerScriptHandler(onNodeEvent) display.newSprite(GameViewLayer.RES_PATH.."game/background.png") :move(display.center) :addTo(self) self._csbNode = cc.CSLoader:createNode(GameViewLayer.RES_PATH.."game/GameScene.csb") :addTo(self, 1) local btcallback = function(ref, type) if type == ccui.TouchEventType.ended then this:onButtonClickedEvent(ref:getTag(),ref) end end --特殊按钮 self.spButtonBg = self._csbNode:getChildByName("sp_buttonBg"):setScaleY(0.1) self.spButtonBg:setVisible(false) self.btSwitch = self._csbNode:getChildByName("bt_switch") :setTag(GameViewLayer.BT_SWITCH) :setPosition(yl.WIDTH-58,yl.HEIGHT-60) self.btSwitch:addTouchEventListener(btcallback) local posSwitchX, posSwitchY = self.btSwitch:getPosition() local posSwitch = cc.p(posSwitchX, posSwitchY) self.btSet = self._csbNode:getChildByName("bt_set") :setTag(GameViewLayer.BT_SET) :setPosition(posSwitch) :setTouchEnabled(false) self.btSet:addTouchEventListener(btcallback) self.btChat = self._csbNode:getChildByName("bt_chat") :setTag(GameViewLayer.BT_CHAT) :setPosition(posSwitch) :setTouchEnabled(false) self.btChat:addTouchEventListener(btcallback) self.btHowPlay = self._csbNode:getChildByName("bt_howPlay") :setTag(GameViewLayer.BT_HOWPLAY) :setPosition(posSwitch) :setTouchEnabled(false) self.btHowPlay:addTouchEventListener(btcallback) self.btExit = self._csbNode:getChildByName("bt_exit") :setTag(GameViewLayer.BT_EXIT) :setPosition(posSwitch) :setTouchEnabled(false) self.btExit:addTouchEventListener(btcallback) --普通按钮 self.btPrompt = self._csbNode:getChildByName("bt_prompt") :move(yl.WIDTH - 140, 60) :setTag(GameViewLayer.BT_PROMPT) :setVisible(false) self.btPrompt:addTouchEventListener(btcallback) self.btOpenCard = self._csbNode:getChildByName("bt_showCard") :move(yl.WIDTH - 140, 112) :setTag(GameViewLayer.BT_OPENCARD) :setVisible(false) self.btOpenCard:addTouchEventListener(btcallback) self.btStart = self._csbNode:getChildByName("bt_start") :move(yl.WIDTH - 140, 112) :setVisible(false) :setTag(GameViewLayer.BT_START) self.btStart:addTouchEventListener(btcallback) self.btCallBanker = self._csbNode:getChildByName("bt_callBanker") :move(display.cx - 150, 300) :setTag(GameViewLayer.BT_CALLBANKER) :setVisible(false) self.btCallBanker:addTouchEventListener(btcallback) self.btCancel = self._csbNode:getChildByName("bt_cancel") :move(display.cx + 150, 300) :setTag(GameViewLayer.BT_CANCEL) :setVisible(false) self.btCancel:addTouchEventListener(btcallback) --四个下注的筹码按钮 self.btChip = {} for i = 1, 4 do self.btChip[i] = ccui.Button:create("bt_chip_0.png", "bt_chip_1.png", "", ccui.TextureResType.plistType) :move(420 + 165*(i - 1), 253) :setTag(GameViewLayer.BT_CHIP + i) :setVisible(false) :addTo(self) self.btChip[i]:addTouchEventListener(btcallback) cc.LabelAtlas:_create("123456", GameViewLayer.RES_PATH.."num_chip.png", 17, 24, string.byte("0")) :move(self.btChip[i]:getContentSize().width/2, self.btChip[i]:getContentSize().height/2 + 5) :setAnchorPoint(cc.p(0.5, 0.5)) :setTag(GameViewLayer.CHIPNUM) :addTo(self.btChip[i]) end self.txt_CellScore = cc.Label:createWithTTF("底注:250","fonts/round_body.ttf",24) :move(1000, yl.HEIGHT - 20) :setVisible(false) :addTo(self) self.txt_TableID = cc.Label:createWithTTF("桌号:38","fonts/round_body.ttf",24) :move(333, yl.HEIGHT-20) :setVisible(false) :addTo(self) --牌提示背景 self.spritePrompt = display.newSprite("#prompt.png") :move(display.cx, display.cy - 108) :setVisible(false) :addTo(self) --牌值 self.labAtCardPrompt = {} for i = 1, 3 do self.labAtCardPrompt[i] = cc.LabelAtlas:_create("", GameViewLayer.RES_PATH.."num_prompt.png", 39, 38, string.byte("0")) :move(72 + 162*(i - 1), 25) :setAnchorPoint(cc.p(0.5, 0.5)) :addTo(self.spritePrompt) end self.labCardType = cc.Label:createWithTTF("", "fonts/round_body.ttf", 34) :move(568, 25) :addTo(self.spritePrompt) --时钟 self.spriteClock = display.newSprite("#sprite_clock.png") :move(display.cx, display.cy + 50) :setVisible(false) :addTo(self) local labAtTime = cc.LabelAtlas:_create("", GameViewLayer.RES_PATH.."num_time.png", 42, 39, string.byte("0")) :move(self.spriteClock:getContentSize().width/2, self.spriteClock:getContentSize().height/2) :setAnchorPoint(cc.p(0.5, 0.5)) :setScale(0.7) :setTag(GameViewLayer.TIMENUM) :addTo(self.spriteClock) --用于发牌动作的那张牌 self.animateCard = display.newSprite(GameViewLayer.RES_PATH.."card.png") :move(display.center) :setVisible(false) :setLocalZOrder(2) :addTo(self) local cardWidth = self.animateCard:getContentSize().width/13 local cardHeight = self.animateCard:getContentSize().height/5 self.animateCard:setTextureRect(cc.rect(cardWidth*2, cardHeight*4, cardWidth, cardHeight)) --四个玩家 self.nodePlayer = {} for i = 1 ,cmd.GAME_PLAYER do --玩家结点 self.nodePlayer[i] = cc.Node:create() :move(pointPlayer[i]) :setVisible(false) :addTo(self) --人物框 -- local spriteFrame = display.newSprite("#oxnew_frame.png") local spriteFrame = display.newSprite(GameViewLayer.RES_PATH.."bg_head.png") :setTag(GameViewLayer.FRAME) :addTo(self.nodePlayer[i]) --昵称 self.nicknameConfig = string.getConfig("fonts/round_body.ttf", 18) cc.Label:createWithTTF("小白狼大白兔", "fonts/round_body.ttf", 18) :move(0, 70) -- :setScaleX(0.8) -- :setColor(cc.c3b(0, 0, 0)) :setTag(GameViewLayer.NICKNAME) :addTo(self.nodePlayer[i]) --金币 -- cc.LabelAtlas:_create("123456", GameViewLayer.RES_PATH.."num_chipScore.png", 20, 28, string.byte("0")) cc.Label:createWithTTF("123456", "fonts/round_body.ttf", 18) :move(12, -63) :setAnchorPoint(cc.p(0.5, 0.5)) :setColor(cc.c3b(250, 200, 70)) :setTag(GameViewLayer.SCORE) :addTo(self.nodePlayer[i]) end --自己方牌框 self.cardFrame = {} for i = 1, 5 do self.cardFrame[i] = ccui.CheckBox:create("cardFrame_0.png", "cardFrame_1.png", "cardFrame_0.png", "cardFrame_0.png", "cardFrame_0.png", ccui.TextureResType.plistType) :move(335 + 166*(i - 1), 110) :setTouchEnabled(false) :setVisible(false) :addTo(self) end --牌节点 self.nodeCard = {} --牌的类型 self.cardType = {} --桌面金币 self.tableScore = {} --准备标志 self.flag_ready = {} --摊牌标志 self.flag_openCard = {} for i = 1, cmd.GAME_PLAYER do --牌 self.nodeCard[i] = cc.Node:create() :move(pointCard[i]) :setAnchorPoint(cc.p(0.5, 0.5)) :addTo(self) for j = 1, 5 do local card = display.newSprite(GameViewLayer.RES_PATH.."card.png") :setTag(j) :setVisible(false) :setTextureRect(cc.rect(cardWidth*2, cardHeight*4, cardWidth, cardHeight)) :addTo(self.nodeCard[i]) end --牌型 self.cardType[i] = display.newSprite("#ox_10.png") :move(pointCardType[i]) :setVisible(false) :addTo(self) --桌面金币 self.tableScore[i] = display.newSprite("#score_bg.png") :move(pointTableScore[i]) :setVisible(false) :addTo(self) cc.LabelAtlas:_create("1008611", GameViewLayer.RES_PATH.."num_chipScore.png", 20, 28, string.byte("/")) :move(66, 37) :setAnchorPoint(cc.p(0.5, 0.5)) :setTag(GameViewLayer.SCORENUM) :addTo(self.tableScore[i]) --准备 self.flag_ready[i] = display.newSprite("#sprite_prompt.png") :move(pointCard[i]) :setVisible(false) :addTo(self) --摊牌 self.flag_openCard[i] = display.newSprite("#sprite_openCard.png") :move(pointOpenCard[i]) :setVisible(false) :addTo(self) end self.nodeLeaveCard = cc.Node:create():addTo(self) self.spriteBankerFlag = display.newSprite() :setVisible(false) :setLocalZOrder(2) :addTo(self) --聊天框 self._chatLayer = GameChatLayer:create(self._scene._gameFrame) self._chatLayer:addTo(self, 3) --聊天泡泡 self.chatBubble = {} for i = 1 , cmd.GAME_PLAYER do if i == 2 or i == 3 then self.chatBubble[i] = display.newSprite(GameViewLayer.RES_PATH.."game_chat_lbg.png" ,{scale9 = true ,capInsets=cc.rect(0, 0, 180, 110)}) :setAnchorPoint(cc.p(0,0.5)) :move(pointChat[i]) :setVisible(false) :addTo(self, 2) else self.chatBubble[i] = display.newSprite(GameViewLayer.RES_PATH.."game_chat_rbg.png",{scale9 = true ,capInsets=cc.rect(0, 0, 180, 110)}) :setAnchorPoint(cc.p(1,0.5)) :move(pointChat[i]) :setVisible(false) :addTo(self, 2) end end --点击事件 self:setTouchEnabled(true) self:registerScriptTouchHandler(function(eventType, x, y) return self:onEventTouchCallback(eventType, x, y) end) -- 玩家头像 self.m_bNormalState = {} --房卡需要 self.m_tabUserItem = {} --语音按钮 gameviewlayer -> gamelayer -> clientscene self._scene._scene:createVoiceBtn(cc.p(1150, 230), 0, self) -- 语音动画 AnimationMgr.loadAnimationFromFrame("record_play_ani_%d.png", 1, 3, cmd.VOICE_ANIMATION_KEY) end function GameViewLayer:onResetView() self.nodeLeaveCard:removeAllChildren() self.spriteBankerFlag:setVisible(false) self.spritePrompt:setVisible(false) --重排列牌 local cardWidth = self.animateCard:getContentSize().width local cardHeight = self.animateCard:getContentSize().height for i = 1, cmd.GAME_PLAYER do local fSpacing --牌间距 local fX --起点 local fWidth --宽度 --以上三个数据是保证牌节点的坐标位置位于其下五张牌的正中心 if i == cmd.MY_VIEWID then fSpacing = 166 fX = fSpacing/2 fWidth = fSpacing*5 else fSpacing = GameViewLayer.CARDSPACING fX = cardWidth/2 fWidth = cardWidth + fSpacing*4 end self.nodeCard[i]:setContentSize(cc.size(fWidth, cardHeight)) for j = 1, 5 do local card = self.nodeCard[i]:getChildByTag(j) :move(fX + fSpacing*(j - 1), cardHeight/2) :setTextureRect(cc.rect(cardWidth*2, cardHeight*4, cardWidth, cardHeight)) :setVisible(false) :setLocalZOrder(1) end self.tableScore[i]:setVisible(false) self.cardType[i]:setVisible(false) end self.bCardOut = {false, false, false, false, false} self.bBtnMoving = false self.labCardType:setString("") for i = 1, 3 do self.labAtCardPrompt[i]:setString("") end end --更新用户显示 function GameViewLayer:OnUpdateUser(viewId, userItem) if not viewId or viewId == yl.INVALID_CHAIR then print("OnUpdateUser viewId is nil") return end --dump(userItem, "OnUpdateUser" .. viewId, 6) self.m_tabUserItem[viewId] = userItem local head = self.nodePlayer[viewId]:getChildByTag(GameViewLayer.FACE) if not userItem then self.nodePlayer[viewId]:setVisible(false) self.flag_ready[viewId]:setVisible(false) self.cbGender[viewId] = nil if head then head:setVisible(false) end else self.nodePlayer[viewId]:setVisible(true) self:setNickname(viewId, userItem.szNickName) self:setScore(viewId, userItem.lScore) self.flag_ready[viewId]:setVisible(yl.US_READY == userItem.cbUserStatus) self.cbGender[viewId] = userItem.cbGender if not head then head = PopupInfoHead:createNormal(userItem, 85) head:setPosition(0, 4) head:enableHeadFrame(false) head:enableInfoPop(true, pointUserInfo[viewId], anchorPoint[viewId]) head:setTag(GameViewLayer.FACE) self.nodePlayer[viewId]:addChild(head) --遮盖层,美化头像 -- display.newSprite("#oxnew_frameTop.png") display.newSprite(GameViewLayer.RES_PATH.."frame_head.png") --:move(1, 1) :addTo(head) self.m_bNormalState[viewId] = true else head:updateHead(userItem) end head:setVisible(true) --掉线头像变灰 if userItem.cbUserStatus == yl.US_OFFLINE then if self.m_bNormalState[viewId] then convertToGraySprite(head.m_head.m_spRender) end self.m_bNormalState[viewId] = false else if not self.m_bNormalState[viewId] then convertToNormalSprite(head.m_head.m_spRender) end self.m_bNormalState[viewId] = true end end end --**************************** 计时器 *****************************-- function GameViewLayer:OnUpdataClockView(viewId, time) if not viewId or viewId == yl.INVALID_CHAIR or not time then self.spriteClock:getChildByTag(GameViewLayer.TIMENUM):setString("") self.spriteClock:setVisible(false) else self.spriteClock:getChildByTag(GameViewLayer.TIMENUM):setString(time) end end function GameViewLayer:setClockPosition(viewId) if viewId then self.spriteClock:move(pointClock[viewId]) else self.spriteClock:move(display.cx, display.cy + 50) end self.spriteClock:setVisible(true) end --************************** 点击事件 ****************************-- --点击事件 function GameViewLayer:onEventTouchCallback(eventType, x, y) if eventType == "began" then if self.bBtnInOutside then self:onButtonSwitchAnimate() return false end elseif eventType == "ended" then --用于触发手牌 if self.bCanMoveCard ~= true then return false end local size1 = self.nodeCard[cmd.MY_VIEWID]:getContentSize() local x1, y1 = self.nodeCard[cmd.MY_VIEWID]:getPosition() for i = 1, 5 do local card = self.nodeCard[cmd.MY_VIEWID]:getChildByTag(i) local x2, y2 = card:getPosition() local size2 = card:getContentSize() local rect = card:getTextureRect() rect.x = x1 - size1.width/2 + x2 - size2.width/2 rect.y = y1 - size1.height/2 + y2 - size2.height/2 if cc.rectContainsPoint(rect, cc.p(x, y)) then if false == self.bCardOut[i] then card:move(x2, y2 + 30) self.cardFrame[i]:setSelected(true) elseif true == self.bCardOut[i] then card:move(x2, y2 - 30) self.cardFrame[i]:setSelected(false) end self.bCardOut[i] = not self.bCardOut[i] self:updateCardPrompt() return true end end end return true end --按钮点击事件 function GameViewLayer:onButtonClickedEvent(tag,ref) if tag == GameViewLayer.BT_START then self.btStart:setVisible(false) self._scene:onStartGame() elseif tag == GameViewLayer.BT_SWITCH then self:onButtonSwitchAnimate() elseif tag == GameViewLayer.BT_CHAT then self._chatLayer:showGameChat(true) elseif tag == GameViewLayer.BT_SET then print("设置") self._setLayer:showLayer() elseif tag == GameViewLayer.BT_HOWPLAY then print("玩法") self._scene._scene:popHelpLayer2(cmd.KIND_ID, 0, yl.ZORDER.Z_HELP_WEBVIEW) elseif tag == GameViewLayer.BT_EXIT then self._scene:onQueryExitGame() elseif tag == GameViewLayer.BT_OPENCARD then self.bCanMoveCard = false self.btOpenCard:setVisible(false) --self.btPrompt:setVisible(false) self.spritePrompt:setVisible(false) for i = 1, 5 do self.cardFrame[i]:setVisible(false) self.cardFrame[i]:setSelected(false) end self._scene:onOpenCard() elseif tag == GameViewLayer.BT_PROMPT then self:promptOx() elseif tag == GameViewLayer.BT_CALLBANKER then self.btCallBanker:setVisible(false) self.btCancel:setVisible(false) self._scene:onBanker(1) elseif tag == GameViewLayer.BT_CANCEL then self.btCallBanker:setVisible(false) self.btCancel:setVisible(false) self._scene:onBanker(0) elseif tag - GameViewLayer.BT_CHIP == 1 or tag - GameViewLayer.BT_CHIP == 2 or tag - GameViewLayer.BT_CHIP == 3 or tag - GameViewLayer.BT_CHIP == 4 then for i = 1, 4 do self.btChip[i]:setVisible(false) end local index = tag - GameViewLayer.BT_CHIP self._scene:onAddScore(self.lUserMaxScore[index]) else showToast(self,"功能尚未开放!",1) end end function GameViewLayer:onButtonSwitchAnimate() if self.bBtnMoving then return end self.bBtnMoving = true --正在滚 local fInterval = 0.15 local spacing = 114 local fScale = 0 if self.bBtnInOutside then fScale = 0.1 self.btSwitch:setTouchEnabled(true) else fScale = 1 self.btSwitch:setTouchEnabled(false) self.spButtonBg:setVisible(true) end --背景图移动 local timeMax = fInterval*(GameViewLayer.BT_EXIT - GameViewLayer.BT_SET + 1) self.spButtonBg:runAction(cc.ScaleTo:create(timeMax, 1, fScale, 1)) --按钮滚动 for i = GameViewLayer.BT_SET, GameViewLayer.BT_EXIT do local nCount = i - GameViewLayer.BT_SET + 1 local button = self._csbNode:getChildByTag(i) button:setTouchEnabled(false) --算时间和距离 local fRotate = 360 local time = fInterval*nCount local pointTarget = cc.p(0, spacing*nCount) if not self.bBtnInOutside then --滚出 fRotate = -fRotate pointTarget = cc.p(-pointTarget.x, -pointTarget.y) end button:runAction(cc.Sequence:create( cc.Spawn:create(cc.MoveBy:create(time, pointTarget), cc.RotateBy:create(time, fRotate)), cc.CallFunc:create(function(ref) if not this.bBtnInOutside then ref:setTouchEnabled(true) else self.spButtonBg:setVisible(false) end if i == GameViewLayer.BT_EXIT then this.bBtnInOutside = not this.bBtnInOutside self.bBtnMoving = false end end))) end end function GameViewLayer:gameCallBanker(callBankerViewId, bFirstTimes) if callBankerViewId == cmd.MY_VIEWID then if self._scene.cbDynamicJoin == 0 then self.btCallBanker:setVisible(true) self.btCancel:setVisible(true) end end if bFirstTimes then display.newSprite() :move(display.center) :addTo(self, 1) :runAction(self:getAnimate("start", true)) end end function GameViewLayer:gameStart(bankerViewId) if bankerViewId ~= cmd.MY_VIEWID then if self._scene.cbDynamicJoin == 0 then for i = 1, 4 do self.btChip[i]:setVisible(true) end end end end function GameViewLayer:gameAddScore(viewId, score) local strScore = ""..score if score < 0 then strScore = "/"..(-score) end self.tableScore[viewId]:getChildByTag(GameViewLayer.SCORENUM):setString(strScore) self.tableScore[viewId]:setVisible(true) local labelScore = self.nodePlayer[viewId]:getChildByTag(GameViewLayer.SCORE) local lScore = tonumber(labelScore:getString()) self:setScore(viewId, lScore - score) -- 自己下注, 隐藏下注信息 if viewId == cmd.MY_VIEWID then for i = 1, 4 do self.btChip[i]:setVisible(false) end end end function GameViewLayer:gameSendCard(firstViewId, totalCount) --开始发牌 self:runSendCardAnimate(firstViewId, totalCount) end --开牌 function GameViewLayer:gameOpenCard(wViewChairId, cbOx, bEnded) local cardWidth = self.animateCard:getContentSize().width local cardHeight = self.animateCard:getContentSize().height local fSpacing = GameViewLayer.CARDSPACING local fWidth if cbOx > 0 then fWidth = cardWidth + fSpacing*2 else fWidth = cardWidth + fSpacing*4 end --牌的排列 self.nodeCard[wViewChairId]:setContentSize(cc.size(fWidth, cardHeight)) for i = 1, 5 do local card = self.nodeCard[wViewChairId]:getChildByTag(i) if wViewChairId == cmd.MY_VIEWID then card:move(cardWidth/2 + fSpacing*(i - 1), cardHeight/2) end if cbOx > 0 and i >= 4 then local positionX, positionY = card:getPosition() positionX = positionX - (fSpacing*2 + fSpacing/2) positionY = positionY + 50 card:move(positionX, positionY) card:setLocalZOrder(0) end end --牌型 if cbOx >= 10 then self._scene:PlaySound(GameViewLayer.RES_PATH.."sound/GAME_OXOX.wav") cbOx = 10 end local strFile = string.format("ox_%d.png", cbOx) local spriteFrame = cc.SpriteFrameCache:getInstance():getSpriteFrame(strFile) self.cardType[wViewChairId]:setSpriteFrame(spriteFrame) self.cardType[wViewChairId]:setVisible(true) --隐藏摊牌图标 self:setOpenCardVisible(wViewChairId, false) --声音 if bEnded and wViewChairId == cmd.MY_VIEWID then local strGender = "GIRL" if self.cbGender[wViewChairId] == 1 then strGender = "BOY" end local strSound = GameViewLayer.RES_PATH.."sound/"..strGender.."/ox_"..cbOx..".MP3" self._scene:PlaySound(strSound) end end function GameViewLayer:gameEnd(bMeWin) local name if bMeWin then name = "victory" self._scene:PlaySound(GameViewLayer.RES_PATH.."sound/GAME_WIN.WAV") else name = "lose" self._scene:PlaySound(GameViewLayer.RES_PATH.."sound/GAME_LOST.WAV") end self.btStart:setVisible(true) display.newSprite() :move(display.center) :addTo(self) :runAction(self:getAnimate(name, true)) -- 隐藏牌信息 self.spritePrompt:setVisible(false) for i = 1, 5 do self.cardFrame[i]:setVisible(false) self.cardFrame[i]:setSelected(false) end end function GameViewLayer:gameScenePlaying() if self._scene.cbDynamicJoin == 0 then self.btOpenCard:setVisible(true) --self.btPrompt:setVisible(true) self.spritePrompt:setVisible(true) for i = 1, 5 do self.cardFrame[i]:setVisible(true) end end end function GameViewLayer:setCellScore(cellscore) if not cellscore then self.txt_CellScore:setString("底注:") else self.txt_CellScore:setString("底注:"..cellscore) end end function GameViewLayer:setCardTextureRect(viewId, tag, cardValue, cardColor) if viewId < 1 or viewId > 4 or tag < 1 or tag > 5 then print("card texture rect error!") return end local card = self.nodeCard[viewId]:getChildByTag(tag) local rectCard = card:getTextureRect() rectCard.x = rectCard.width*(cardValue - 1) rectCard.y = rectCard.height*cardColor card:setTextureRect(rectCard) end function GameViewLayer:setNickname(viewId, strName) local name = string.EllipsisByConfig(strName, 156, self.nicknameConfig) local labelNickname = self.nodePlayer[viewId]:getChildByTag(GameViewLayer.NICKNAME) labelNickname:setString(name) end function GameViewLayer:setScore(viewId, lScore) local labelScore = self.nodePlayer[viewId]:getChildByTag(GameViewLayer.SCORE) labelScore:setString(lScore) local labelWidth = labelScore:getContentSize().width if labelWidth > 96 then labelScore:setScaleX(96/labelWidth) elseif labelScore:getScaleX() ~= 1 then labelScore:setScaleX(1) end end function GameViewLayer:setTableID(id) if not id or id == yl.INVALID_TABLE then self.txt_TableID:setString("桌号:") else self.txt_TableID:setString("桌号:"..(id + 1)) end end function GameViewLayer:setUserScore(wViewChairId, lScore) self.nodePlayer[wViewChairId]:getChildByTag(GameViewLayer.SCORE):setString(lScore) end function GameViewLayer:setReadyVisible(wViewChairId, isVisible) self.flag_ready[wViewChairId]:setVisible(isVisible) end function GameViewLayer:setOpenCardVisible(wViewChairId, isVisible) self.flag_openCard[wViewChairId]:setVisible(isVisible) end function GameViewLayer:setTurnMaxScore(lTurnMaxScore) for i = 1, 4 do self.lUserMaxScore[i] = math.max(lTurnMaxScore, 1) self.btChip[i]:getChildByTag(GameViewLayer.CHIPNUM):setString(self.lUserMaxScore[i]) lTurnMaxScore = math.floor(lTurnMaxScore/2) end end -- 积分房卡配置的下注 function GameViewLayer:setScoreRoomJetton( tabJetton ) self.lUserMaxScore = tabJetton for i = 1, 4 do self.btChip[i]:getChildByTag(GameViewLayer.CHIPNUM):setString(self.lUserMaxScore[i]) end end function GameViewLayer:setBankerUser(wViewChairId) self.spriteBankerFlag:move(pointBankerFlag[wViewChairId]) self.spriteBankerFlag:setVisible(true) self.spriteBankerFlag:runAction(self:getAnimate("banker")) --闪烁动画 display.newSprite() :move(pointPlayer[wViewChairId].x, pointPlayer[wViewChairId].y) :addTo(self) :runAction(self:getAnimate("faceFlash", true)) end function GameViewLayer:setUserTableScore(wViewChairId, lScore) if lScore == 0 then return end local strScore = ""..lScore if lScore < 0 then strScore = "/"..(-lScore) end self.tableScore[wViewChairId]:getChildByTag(GameViewLayer.SCORENUM):setString(strScore) self.tableScore[wViewChairId]:setVisible(true) end --发牌动作 function GameViewLayer:runSendCardAnimate(wViewChairId, nCount) local nPlayerNum = self._scene:getPlayNum() print("GameViewLayer:runSendCardAnimate count,player ==> ", nCount, nPlayerNum) if nCount == nPlayerNum*5 then self.animateCard:setVisible(true) self._scene:PlaySound(GameViewLayer.RES_PATH.."sound/SEND_CARD.wav") elseif nCount < 1 then self.animateCard:setVisible(false) if self._scene.cbDynamicJoin == 0 then self.btOpenCard:setVisible(true) --self.btPrompt:setVisible(true) self.spritePrompt:setVisible(true) end self._scene:sendCardFinish() self.bCanMoveCard = true return end local pointMove = {cc.p(0, 250), cc.p(-310, 0), cc.p(0, -180), cc.p(310, 0)} self.animateCard:runAction(cc.Sequence:create( cc.MoveBy:create(0.15, pointMove[wViewChairId]), cc.CallFunc:create(function(ref) ref:move(display.center) --显示一张牌 local nTag = math.floor(5 - nCount/nPlayerNum) + 1 if wViewChairId == 1 then --1号位发牌时牌居中对齐 local size = self.nodeCard[1]:getContentSize() if nTag == 1 then size.width = size.width - 120 else size.width = size.width + GameViewLayer.CARDSPACING end self.nodeCard[1]:setContentSize(size) elseif wViewChairId == 3 then self.cardFrame[nTag]:setVisible(true) elseif wViewChairId == 4 then --4号位发牌时牌居右对齐 nTag = math.ceil(nCount/nPlayerNum) end local card = self.nodeCard[wViewChairId]:getChildByTag(nTag) if not card then return end card:setVisible(true) --开始下一个人的发牌 wViewChairId = wViewChairId + 1 if wViewChairId > 4 then wViewChairId = 1 end while not self._scene:isPlayerPlaying(wViewChairId) do wViewChairId = wViewChairId + 1 if wViewChairId > 4 then wViewChairId = 1 end end self:runSendCardAnimate(wViewChairId, nCount - 1) end))) end --检查牌类型 function GameViewLayer:updateCardPrompt() --弹出牌显示,统计和 local nSumTotal = 0 local nSumOut = 0 local nCount = 1 for i = 1, 5 do local nCardValue = self._scene:getMeCardLogicValue(i) nSumTotal = nSumTotal + nCardValue if self.bCardOut[i] then if nCount <= 3 then self.labAtCardPrompt[nCount]:setString(nCardValue) end nCount = nCount + 1 nSumOut = nSumOut + nCardValue end end for i = nCount, 3 do self.labAtCardPrompt[i]:setString("") end --判断是否构成牛 local nDifference = nSumTotal - nSumOut if nCount == 1 then self.labCardType:setString("") elseif nCount == 3 then --弹出两张牌 if self:mod(nDifference, 10) == 0 then self.labCardType:setString("牛 "..(nSumOut > 10 and nSumOut - 10 or nSumOut)) else self.labCardType:setString("无牛") end elseif nCount == 4 then --弹出三张牌 if self:mod(nSumOut, 10) == 0 then self.labCardType:setString("牛 "..(nDifference > 10 and nDifference - 10 or nDifference)) else self.labCardType:setString("无牛") end else self.labCardType:setString("无牛") end end function GameViewLayer:preloadUI() for i = 1, #AnimationRes do local animation = cc.Animation:create() animation:setDelayPerUnit(AnimationRes[i].fInterval) animation:setLoops(AnimationRes[i].nLoops) for j = 1, AnimationRes[i].nCount do local strFile = AnimationRes[i].file..string.format("%d.png", j) animation:addSpriteFrameWithFile(strFile) end cc.AnimationCache:getInstance():addAnimation(animation, AnimationRes[i].name) end end function GameViewLayer:getAnimate(name, bEndRemove) local animation = cc.AnimationCache:getInstance():getAnimation(name) local animate = cc.Animate:create(animation) if bEndRemove then animate = cc.Sequence:create(animate, cc.CallFunc:create(function(ref) ref:removeFromParent() end)) end return animate end function GameViewLayer:promptOx() --首先将牌复位 for i = 1, 5 do if self.bCardOut[i] == true then local card = self.nodeCard[cmd.MY_VIEWID]:getChildByTag(i) local x, y = card:getPosition() y = y - 30 card:move(x, y) self.bCardOut[i] = false end end --将牛牌弹出 local index = self._scene:GetMeChairID() + 1 local cbDataTemp = self:copyTab(self._scene.cbCardData[index]) if self._scene:getOxCard(cbDataTemp) then for i = 1, 5 do for j = 1, 3 do if self._scene.cbCardData[index][i] == cbDataTemp[j] then local card = self.nodeCard[cmd.MY_VIEWID]:getChildByTag(i) local x, y = card:getPosition() y = y + 30 card:move(x, y) self.bCardOut[i] = true end end end end self:updateCardPrompt() end --用户聊天 function GameViewLayer:userChat(wViewChairId, chatString) if chatString and #chatString > 0 then self._chatLayer:showGameChat(false) --取消上次 if self.chatDetails[wViewChairId] then self.chatDetails[wViewChairId]:stopAllActions() self.chatDetails[wViewChairId]:removeFromParent() self.chatDetails[wViewChairId] = nil end --创建label local limWidth = 24*12 local labCountLength = cc.Label:createWithSystemFont(chatString,"Arial", 24) if labCountLength:getContentSize().width > limWidth then self.chatDetails[wViewChairId] = cc.Label:createWithSystemFont(chatString,"Arial", 24, cc.size(limWidth, 0)) else self.chatDetails[wViewChairId] = cc.Label:createWithSystemFont(chatString,"Arial", 24) end if wViewChairId ==2 or wViewChairId == 3 then self.chatDetails[wViewChairId]:move(pointChat[wViewChairId].x + 24 , pointChat[wViewChairId].y + 9) :setAnchorPoint( cc.p(0, 0.5) ) else self.chatDetails[wViewChairId]:move(pointChat[wViewChairId].x - 24 , pointChat[wViewChairId].y + 9) :setAnchorPoint(cc.p(1, 0.5)) end self.chatDetails[wViewChairId]:addTo(self, 2) --改变气泡大小 self.chatBubble[wViewChairId]:setContentSize(self.chatDetails[wViewChairId]:getContentSize().width+48, self.chatDetails[wViewChairId]:getContentSize().height + 40) :setVisible(true) --动作 self.chatDetails[wViewChairId]:runAction(cc.Sequence:create( cc.DelayTime:create(3), cc.CallFunc:create(function(ref) self.chatDetails[wViewChairId]:removeFromParent() self.chatDetails[wViewChairId] = nil self.chatBubble[wViewChairId]:setVisible(false) end))) end end --用户表情 function GameViewLayer:userExpression(wViewChairId, wItemIndex) if wItemIndex and wItemIndex >= 0 then self._chatLayer:showGameChat(false) --取消上次 if self.chatDetails[wViewChairId] then self.chatDetails[wViewChairId]:stopAllActions() self.chatDetails[wViewChairId]:removeFromParent() self.chatDetails[wViewChairId] = nil end local strName = string.format("e(%d).png", wItemIndex) self.chatDetails[wViewChairId] = cc.Sprite:createWithSpriteFrameName(strName) :addTo(self, 2) if wViewChairId ==2 or wViewChairId == 3 then self.chatDetails[wViewChairId]:move(pointChat[wViewChairId].x + 45 , pointChat[wViewChairId].y + 5) else self.chatDetails[wViewChairId]:move(pointChat[wViewChairId].x - 45 , pointChat[wViewChairId].y + 5) end --改变气泡大小 self.chatBubble[wViewChairId]:setContentSize(90,80) :setVisible(true) self.chatDetails[wViewChairId]:runAction(cc.Sequence:create( cc.DelayTime:create(3), cc.CallFunc:create(function(ref) self.chatDetails[wViewChairId]:removeFromParent() self.chatDetails[wViewChairId] = nil self.chatBubble[wViewChairId]:setVisible(false) end))) end end -- 语音开始 function GameViewLayer:onUserVoiceStart( viewId ) --取消上次 if self.chatDetails[viewId] then self.chatDetails[viewId]:stopAllActions() self.chatDetails[viewId]:removeFromParent() self.chatDetails[viewId] = nil end -- 语音动画 local param = AnimationMgr.getAnimationParam() param.m_fDelay = 0.1 param.m_strName = cmd.VOICE_ANIMATION_KEY local animate = AnimationMgr.getAnimate(param) self.m_actVoiceAni = cc.RepeatForever:create(animate) self.chatDetails[viewId] = display.newSprite("#blank.png") :setAnchorPoint(cc.p(0.5, 0.5)) :addTo(self, 3) if viewId == 2 or viewId == 3 then self.chatDetails[viewId]:setRotation(180) self.chatDetails[viewId]:move(pointChat[viewId].x + 45 , pointChat[viewId].y + 15) else self.chatDetails[viewId]:move(pointChat[viewId].x - 45 , pointChat[viewId].y + 15) end self.chatDetails[viewId]:runAction(self.m_actVoiceAni) --改变气泡大小 self.chatBubble[viewId]:setContentSize(90,100) :setVisible(true) end -- 语音结束 function GameViewLayer:onUserVoiceEnded( viewId ) if self.chatDetails[viewId] then self.chatDetails[viewId]:removeFromParent() self.chatDetails[viewId] = nil self.chatBubble[viewId]:setVisible(false) end end --拷贝表 function GameViewLayer:copyTab(st) local tab = {} for k, v in pairs(st) do if type(v) ~= "table" then tab[k] = v else tab[k] = self:copyTab(v) end end return tab end --取模 function GameViewLayer:mod(a,b) return a - math.floor(a/b)*b end --运行输赢动画 function GameViewLayer:runWinLoseAnimate(viewid, score) local ptWinLoseAnimate = {cc.p(727, 500), cc.p(238, 300), cc.p(307, 50), cc.p(1088, 300)} local strAnimate local strSymbol local strNum if score > 0 then strAnimate = "yellow" strSymbol = "#symbol_add.png" strNum = GameViewLayer.RES_PATH.."num_add.png" else score = -score strAnimate = "blue" strSymbol = "#symbol_reduce.png" strNum = GameViewLayer.RES_PATH.."num_reduce.png" end --加减 local node = cc.Node:create() :move(ptWinLoseAnimate[viewid]) :setAnchorPoint(cc.p(0.5, 0.5)) :setOpacity(0) :setCascadeOpacityEnabled(true) :addTo(self, 4) local spriteSymbol = display.newSprite(strSymbol) --符号 :addTo(node) local sizeSymbol = spriteSymbol:getContentSize() spriteSymbol:move(sizeSymbol.width/2, sizeSymbol.height/2) local labAtNum = cc.LabelAtlas:_create(score, strNum, 40, 35, string.byte("0")) --数字 :setAnchorPoint(cc.p(0.5, 0.5)) :addTo(node) local sizeNum = labAtNum:getContentSize() labAtNum:move(sizeSymbol.width + sizeNum.width/2, sizeNum.height/2) node:setContentSize(sizeSymbol.width + sizeNum.width, sizeSymbol.height) --底部动画 local nTime = 1.5 local spriteAnimate = display.newSprite() :move(ptWinLoseAnimate[viewid]) :addTo(self, 3) spriteAnimate:runAction(cc.Sequence:create( cc.Spawn:create( cc.MoveBy:create(nTime, cc.p(0, 200)), self:getAnimate(strAnimate) ), cc.DelayTime:create(2), cc.CallFunc:create(function(ref) ref:removeFromParent() end) )) node:runAction(cc.Sequence:create( cc.Spawn:create( cc.MoveBy:create(nTime, cc.p(0, 200)), cc.FadeIn:create(nTime) ), cc.DelayTime:create(2), cc.CallFunc:create(function(ref) ref:removeFromParent() end) )) end return GameViewLayer
-- ... init.lua local directory = "neovim.functions" .. "." local modules = { -- add modules here } for _, module in ipairs(modules) do local ok, err = pcall(require, directory .. module) if not ok then error("Error loading " .. module .. "\n\n" .. err) end end
--[[ AztupBrew(Fork of IronBrew2): obfuscation; Version 2.7.2 ]] return(function(KateIsGod_lIlIllIllllIIIIlllI,KateIsGod_IIlIIllllIIlll,KateIsGod_llIIIlllI)local KateIsGod_llIlIIIlIIIll=string.char;local KateIsGod_IIlIlIllII=string.sub;local KateIsGod_IIIlIIIlllIlIIllII=table.concat;local KateIsGod_lIIlIIIlIlllIl=math.ldexp;local KateIsGod_llIIIlIllI=getfenv or function()return _ENV end;local KateIsGod_llllIIIllIlllIIIIllllII=select;local KateIsGod_IIlllIIIllIlIIIIIIIl=unpack or table.unpack;local KateIsGod_lIIlllIIlIllIIIlI=tonumber;local KateIsGod_llIlllIlI='\16\12\12\12\15\12\12\12\12\12\12\20\76\13\8\12\12\12\107\109\97\105\13\6\12\12\12\75\105\120\95\105\126\122\101\111\105\13\6\12\12\12\95\120\109\126\120\105\126\75\121\101\13\11\12\12\12\92\96\109\117\105\126\127\13\7\12\12\12\64\99\111\109\96\92\96\109\117\105\126\13\6\12\12\12\94\121\98\95\105\126\122\101\111\105\13\5\12\12\12\68\105\109\126\120\110\105\109\120\13\11\12\12\12\111\99\98\98\105\111\120\13\4\12\12\12\75\105\120\65\99\121\127\105\13\11\12\12\12\71\105\117\72\99\123\98\13\8\12\12\12\123\109\101\120\15\12\12\12\12\12\12\12\76\13\13\12\12\12\106\13\1\12\12\12\92\105\120\126\101\106\117\88\100\105\75\99\104\13\15\12\12\12\92\105\120\13\9\12\12\12\106\99\121\98\104\13\9\12\12\12\124\109\101\126\127\13\8\12\12\12\66\109\97\105\13\5\12\12\12\79\100\109\126\109\111\120\105\126\13\11\12\12\12\95\105\120\79\99\126\105\13\28\12\12\12\95\105\98\104\66\99\120\101\106\101\111\109\120\101\99\98\13\9\12\12\12\88\101\120\96\105\13\7\12\12\12\71\109\120\105\44\69\127\44\75\99\104\13\8\12\12\12\88\105\116\120\13\16\12\12\12\79\109\98\98\99\120\44\104\105\111\126\105\109\127\105\44\109\98\117\44\106\121\126\120\100\105\126\45\13\8\12\12\12\71\101\111\103\13\61\12\12\12\72\97\44\44\101\44\96\99\122\44\103\109\120\105\47\53\63\62\59\44\99\98\44\104\101\127\111\99\126\104\44\106\99\126\44\109\44\123\100\101\120\105\96\101\127\120\44\48\63\15\12\12\12\5\12\12\12\13\5\12\12\12\79\100\109\126\109\111\120\105\126\13\4\12\12\12\68\121\97\109\98\99\101\104\13\10\12\12\12\101\124\109\101\126\127\13\8\12\12\12\107\109\97\105\13\11\12\12\12\92\96\109\117\105\126\127\13\6\12\12\12\75\105\120\92\96\109\117\105\126\127\13\8\12\12\12\66\109\97\105\13\9\12\12\12\124\111\109\96\96\13\9\12\12\12\124\126\101\98\120\13\12\12\12\7\12\12\12\13\5\12\12\12\79\100\109\126\109\111\120\105\126\13\28\12\12\12\68\121\97\109\98\99\101\104\94\99\99\120\92\109\126\120\13\10\12\12\12\92\109\126\105\98\120\13\25\12\12\12\74\101\98\104\74\101\126\127\120\79\100\101\96\104\67\106\79\96\109\127\127\13\8\12\12\12\88\99\99\96\13\4\12\12\12\92\99\127\101\120\101\99\98\13\5\12\12\12\65\109\107\98\101\120\121\104\105\13\29\12\12\12\106\101\126\105\120\99\121\111\100\101\98\120\105\126\105\127\120\13\10\12\12\12\68\109\98\104\96\105\15\12\12\12\12\12\12\252\51\15\12\12\12\12\12\12\12\12\12\12\12\12\12\19\12\12\12\12\41\12\12\12\12\12\12\12\44\12\12\12\12\12\12\13\12\44\12\12\12\12\12\12\14\12\12\12\12\13\12\13\12\12\12\44\12\12\13\12\13\12\15\12\44\12\12\13\12\13\12\8\12\30\12\12\15\12\9\12\12\12\12\12\12\13\12\15\12\14\12\10\12\12\13\12\18\12\13\12\12\12\8\62\12\12\12\18\12\13\12\44\2\12\14\12\12\12\10\12\12\73\12\15\12\14\12\12\12\44\12\12\15\12\15\12\13\12\44\12\12\15\12\15\12\14\12\44\12\12\15\12\15\12\10\12\12\12\12\14\12\14\12\15\12\44\12\12\14\12\14\12\11\12\12\12\12\15\12\15\12\12\12\10\12\12\14\12\18\12\13\12\15\12\8\62\12\12\12\18\12\13\12\30\64\12\14\12\4\12\12\12\44\63\12\15\12\13\12\5\12\12\12\12\8\12\12\12\12\12\30\12\12\9\12\6\12\12\12\12\12\12\14\12\9\12\13\12\30\12\12\14\12\4\12\12\12\44\12\12\15\12\13\12\5\12\12\12\12\8\12\12\12\12\12\30\12\12\9\12\7\12\12\12\12\12\12\14\12\9\12\13\12\12\44\12\12\12\13\12\12\12\19\12\12\12\1\12\12\12\1\12\12\12\1\12\12\12\2\12\12\12\2\12\12\12\2\12\12\12\2\12\12\12\2\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\3\12\12\12\28\12\12\12\28\12\12\12\28\12\12\12\28\12\12\12\28\12\12\12\29\12\12\12\29\12\12\12\29\12\12\12\29\12\12\12\29\12\12\12\31\12\12\12\12\47\12\12\12\12\31\12\12\12\12\12\12\12\10\29\12\12\12\46\12\13\12\12\12\8\62\12\12\12\46\12\13\12\12\31\12\12\12\13\12\12\12\44\60\12\12\12\12\12\13\12\44\12\12\12\12\12\12\14\12\30\12\12\13\12\15\12\12\12\30\12\12\14\12\8\12\12\12\44\12\12\14\12\14\12\9\12\44\12\12\14\12\14\12\10\12\12\12\12\14\12\15\12\12\12\12\12\12\13\12\12\12\15\12\8\12\12\12\12\19\12\13\12\44\2\12\10\12\9\12\11\12\12\31\12\11\12\13\12\12\12\44\2\12\11\12\11\12\11\12\10\55\12\10\12\18\12\13\12\11\12\8\62\12\12\12\18\12\13\12\30\64\12\10\12\4\12\12\12\10\39\12\11\12\12\12\13\12\8\12\12\28\12\12\12\9\12\12\12\12\28\12\12\12\12\12\12\12\12\27\12\12\12\13\12\12\12\12\27\12\12\12\14\12\12\12\12\78\12\10\12\14\12\11\12\10\29\12\11\12\18\12\13\12\12\12\8\62\12\12\12\18\12\13\12\30\64\12\4\12\5\12\12\12\12\21\12\5\12\11\12\12\12\12\30\12\4\12\14\12\13\12\12\17\12\8\12\12\12\12\12\10\72\12\13\12\1\12\13\12\14\12\8\62\12\12\12\1\12\13\12\12\17\12\12\12\12\12\12\12\12\44\12\12\12\13\12\12\12\47\12\12\12\4\12\12\12\4\12\12\12\4\12\12\12\5\12\12\12\5\12\12\12\5\12\12\12\6\12\12\12\6\12\12\12\6\12\12\12\6\12\12\12\6\12\12\12\6\12\12\12\6\12\12\12\7\12\12\12\7\12\12\12\7\12\12\12\7\12\12\12\7\12\12\12\0\12\12\12\31\12\12\12\31\12\12\12\31\12\12\12\31\12\12\12\31\12\12\12\0\12\12\12\31\12\12\12\31\12\12\12\31\12\12\12\31\12\12\12\31\12\12\12\24\12\12\12\6\12\12\12\24\12\12\12\25\12\12\12\27\12\12\12\14\12\12\12\13\14\12\12\12\99\98\13\15\12\12\12\99\106\106\12\12\12\12\12\5\12\12\12\12\31\12\12\12\12\12\12\12\10\29\12\12\12\10\12\13\12\12\12\8\62\12\12\12\10\12\13\12\30\66\12\12\12\13\12\12\12\10\24\12\12\12\11\12\13\12\13\12\8\62\12\12\12\11\12\13\12\30\66\12\12\12\14\12\12\12\12\94\12\12\12\14\12\12\12\12\44\12\12\12\13\12\12\12\5\12\12\12\22\12\12\12\22\12\12\12\22\12\12\12\22\12\12\12\22\12\12\12\22\12\12\12\22\12\12\12\22\12\12\12\23\12\12\12\31\12\12\12\13\13\12\12\12\126\13\13\12\12\12\116\13\11\12\12\12\95\105\120\79\99\126\105\13\28\12\12\12\95\105\98\104\66\99\120\101\106\101\111\109\120\101\99\98\13\9\12\12\12\88\101\120\96\105\13\0\12\12\12\71\109\120\105\44\101\127\44\110\105\127\120\13\8\12\12\12\88\105\116\120\13\7\12\12\12\73\116\124\96\99\101\120\44\101\127\44\13\7\12\12\12\34\44\79\121\126\126\105\98\120\54\44\13\10\12\12\12\44\127\120\121\104\127\13\13\12\12\12\125\15\12\12\12\12\12\12\252\51\13\6\12\12\12\71\109\120\105\44\101\127\44\99\124\13\32\12\12\12\94\105\109\111\100\44\95\120\126\105\98\107\120\100\44\100\109\127\44\101\98\111\126\105\109\127\105\104\44\110\117\44\61\34\44\79\121\126\126\105\98\120\54\44\13\13\12\12\12\105\13\6\12\12\12\69\44\96\99\122\44\103\109\120\105\13\32\12\12\12\94\105\109\111\100\44\95\120\126\105\98\107\120\100\44\100\109\127\44\104\105\111\126\105\109\127\105\104\44\110\117\44\61\34\44\79\121\126\126\105\98\120\54\44\13\7\12\12\12\71\109\120\105\44\69\127\44\75\99\104\13\16\12\12\12\79\109\98\98\99\120\44\104\105\111\126\105\109\127\105\44\109\98\117\44\106\121\126\120\100\105\126\45\12\12\12\12\13\73\12\12\12\42\87\12\12\12\10\12\13\12\13\12\8\62\12\12\12\10\12\13\12\12\31\12\13\12\12\12\12\12\12\18\12\13\12\13\12\12\12\12\70\12\13\12\12\12\12\12\8\62\12\12\12\72\12\13\12\42\87\12\12\12\20\12\13\12\14\12\8\62\12\12\12\20\12\13\12\12\31\12\13\12\13\12\12\12\12\57\12\13\12\13\12\14\12\12\12\12\14\12\14\12\12\12\44\12\12\14\12\14\12\15\12\30\12\12\8\12\8\12\12\12\12\12\12\9\12\12\12\14\12\60\12\12\9\12\9\12\10\12\30\12\12\10\12\4\12\12\12\12\12\12\11\12\13\12\12\12\30\12\12\4\12\5\12\12\12\12\12\12\5\12\15\12\12\12\30\12\12\6\12\6\12\12\12\12\12\12\10\12\10\12\6\12\28\12\12\9\12\11\12\10\12\12\12\12\14\12\9\12\13\12\8\12\12\12\12\72\12\13\12\42\87\12\12\12\37\12\13\12\7\12\8\62\12\12\12\37\12\13\12\12\31\12\13\12\15\12\12\12\44\53\12\13\12\13\12\0\12\12\12\12\13\12\15\12\12\12\12\12\12\13\12\14\12\12\12\44\12\12\13\12\13\12\15\12\30\12\12\15\12\8\12\12\12\12\12\12\8\12\12\12\14\12\60\12\12\8\12\9\12\1\12\30\12\12\9\12\2\12\12\12\12\12\12\10\12\15\12\12\12\30\12\12\11\12\6\12\12\12\12\12\12\9\12\9\12\11\12\28\12\12\8\12\11\12\9\12\12\12\12\13\12\8\12\13\12\8\12\12\12\12\72\12\13\12\42\87\12\12\12\72\12\13\12\3\12\8\62\12\12\12\72\12\13\12\12\31\12\13\12\15\12\12\12\2\16\12\0\12\49\12\13\12\13\12\8\62\12\12\12\49\12\13\12\12\31\12\13\12\15\12\12\12\44\51\12\13\12\13\12\0\12\12\12\12\13\12\15\12\12\12\12\12\12\13\12\14\12\12\12\44\12\12\13\12\13\12\15\12\30\12\12\15\12\8\12\12\12\12\12\12\8\12\12\12\14\12\60\12\12\8\12\9\12\28\12\30\12\12\9\12\29\12\12\12\12\12\12\10\12\15\12\12\12\30\12\12\11\12\6\12\12\12\12\12\12\9\12\9\12\11\12\28\12\12\8\12\11\12\9\12\12\12\12\13\12\8\12\13\12\8\12\12\12\12\72\12\13\12\12\31\12\13\12\14\12\12\12\44\33\12\13\12\13\12\15\12\30\12\12\15\12\8\12\12\12\12\12\12\8\12\12\12\14\12\60\12\12\8\12\9\12\30\12\60\12\12\8\12\11\12\31\12\12\12\12\13\12\8\12\13\12\12\44\12\12\12\13\12\12\12\73\12\12\12\19\12\12\12\19\12\12\12\44\12\12\12\44\12\12\12\44\12\12\12\44\12\12\12\45\12\12\12\45\12\12\12\46\12\12\12\46\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\47\12\12\12\40\12\12\12\40\12\12\12\41\12\12\12\41\12\12\12\41\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\42\12\12\12\43\12\12\12\43\12\12\12\36\12\12\12\36\12\12\12\36\12\12\12\37\12\12\12\37\12\12\12\37\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\38\12\12\12\32\12\12\12\32\12\12\12\32\12\12\12\32\12\12\12\32\12\12\12\32\12\12\12\32\12\12\12\35\12\12\12\12\94\12\12\12\12\7\12\12\12\13\12\12\12\30\12\12\13\12\13\12\12\12\30\12\12\14\12\14\12\12\12\44\12\12\14\12\14\12\15\12\30\12\12\8\12\8\12\12\12\12\12\12\14\12\8\12\14\12\30\12\12\15\12\14\12\12\12\44\12\12\15\12\15\12\15\12\30\12\12\9\12\9\12\12\12\12\12\12\15\12\9\12\14\12\44\2\12\15\12\15\12\10\12\30\90\12\8\12\14\12\12\12\44\12\12\8\12\8\12\15\12\30\12\12\10\12\11\12\12\12\12\12\12\8\12\10\12\14\12\44\12\12\8\12\8\12\4\12\44\12\12\8\12\8\12\5\12\10\39\12\10\12\12\12\13\12\15\12\12\28\12\12\12\12\12\12\12\12\28\12\12\12\15\12\12\12\12\28\12\12\12\13\12\12\12\12\65\12\8\12\10\12\13\12\10\39\12\8\12\13\12\13\12\13\12\12\28\12\12\12\12\12\12\12\44\74\12\9\12\15\12\6\12\12\79\12\9\12\14\12\14\12\44\2\12\10\12\9\12\7\12\44\74\12\10\12\10\12\5\12\10\39\12\4\12\14\12\13\12\8\12\12\28\12\12\12\12\12\12\12\12\28\12\12\12\8\12\12\12\12\28\12\12\12\14\12\12\12\12\28\12\12\12\13\12\12\12\12\86\12\10\12\4\12\13\12\30\12\12\10\12\0\12\12\12\30\12\12\11\12\1\12\12\12\12\12\12\10\12\14\12\13\12\12\12\12\10\12\15\12\12\12\30\12\12\11\12\2\12\12\12\30\12\12\4\12\3\12\12\12\30\12\12\5\12\28\12\12\12\12\12\12\10\12\5\12\13\12\12\11\12\11\12\12\12\12\12\30\47\12\11\12\29\12\12\12\30\12\12\11\12\30\12\12\12\12\12\12\4\12\10\12\12\12\12\12\12\11\12\14\12\5\12\8\12\12\12\12\51\12\13\12\30\64\12\0\12\14\12\12\12\44\2\12\0\12\0\12\9\12\44\2\12\0\12\0\12\10\12\44\2\12\0\12\0\12\31\12\10\1\12\0\12\51\12\13\12\7\12\8\62\12\12\12\51\12\13\12\30\64\12\0\12\14\12\12\12\44\52\12\0\12\0\12\9\12\44\12\12\0\12\0\12\10\12\44\12\12\0\12\0\12\24\12\44\12\12\0\12\0\12\31\12\10\12\12\0\12\51\12\13\12\7\12\8\62\12\12\12\51\12\13\12\12\11\12\0\12\13\12\12\12\30\26\12\0\12\29\12\12\12\10\72\12\11\12\60\12\13\12\14\12\8\62\12\12\12\60\12\13\12\30\64\12\11\12\29\12\12\12\10\29\12\11\12\71\12\13\12\12\12\8\62\12\12\12\71\12\13\12\44\74\12\11\12\14\12\25\12\30\58\12\5\12\26\12\12\12\12\12\12\6\12\12\12\14\12\60\12\12\6\12\27\12\20\12\60\12\12\6\12\21\12\22\12\12\12\12\11\12\6\12\13\12\8\12\12\12\12\93\12\13\12\30\64\12\11\12\14\12\12\12\44\35\12\11\12\11\12\9\12\44\12\12\11\12\11\12\10\12\44\12\12\11\12\11\12\23\12\30\12\12\5\12\16\12\12\12\12\12\12\11\12\5\12\13\12\12\44\12\12\12\13\12\12\12\94\12\12\12\13\12\12\12\14\12\12\12\8\12\12\12\8\12\12\12\8\12\12\12\8\12\12\12\9\12\12\12\9\12\12\12\9\12\12\12\9\12\12\12\9\12\12\12\11\12\12\12\11\12\12\12\11\12\12\12\11\12\12\12\11\12\12\12\11\12\12\12\27\12\12\12\27\12\12\12\27\12\12\12\27\12\12\12\11\12\12\12\23\12\12\12\23\12\12\12\17\12\12\12\17\12\12\12\18\12\12\12\18\12\12\12\35\12\12\12\35\12\12\12\35\12\12\12\35\12\12\12\35\12\12\12\18\12\12\12\60\12\12\12\60\12\12\12\60\12\12\12\61\12\12\12\61\12\12\12\62\12\12\12\56\12\12\12\56\12\12\12\58\12\12\12\58\12\12\12\52\12\12\12\52\12\12\12\52\12\12\12\52\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\53\12\12\12\54\12\12\12\54\12\12\12\52\12\12\12\55\12\12\12\49\12\12\12\49\12\12\12\49\12\12\12\50\12\12\12\50\12\12\12\50\12\12\12\50\12\12\12\50\12\12\12\50\12\12\12\50\12\12\12\76\12\12\12\76\12\12\12\76\12\12\12\76\12\12\12\76\12\12\12\76\12\12\12\77\12\12\12';local KateIsGod_lIIlllIIlIllIIIlI=(bit or bit32);local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI and KateIsGod_lIIlllIIlIllIIIlI.bxor or function(KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIllIIIIl)local KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIlIIllIIIlIIIlII,KateIsGod_IIIIIlIlllIIlIlIlIIllI=1,0,10 while KateIsGod_lIIlllIIlIllIIIlI>0 and KateIsGod_lIllIIIIl>0 do local KateIsGod_IIlllIIIllIlIIIIIIIl,KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI%2,KateIsGod_lIllIIIIl%2 if KateIsGod_IIlllIIIllIlIIIIIIIl~=KateIsGod_IIIIIlIlllIIlIlIlIIllI then KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_IIIlIIllIIIlIIIlII+KateIsGod_lIIIlIIIIIlIlI end KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIllIIIIl,KateIsGod_lIIIlIIIIIlIlI=(KateIsGod_lIIlllIIlIllIIIlI-KateIsGod_IIlllIIIllIlIIIIIIIl)/2,(KateIsGod_lIllIIIIl-KateIsGod_IIIIIlIlllIIlIlIlIIllI)/2,KateIsGod_lIIIlIIIIIlIlI*2 end if KateIsGod_lIIlllIIlIllIIIlI<KateIsGod_lIllIIIIl then KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIllIIIIl end while KateIsGod_lIIlllIIlIllIIIlI>0 do local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI%2 if KateIsGod_lIllIIIIl>0 then KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_IIIlIIllIIIlIIIlII+KateIsGod_lIIIlIIIIIlIlI end KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIIIlIIIIIlIlI=(KateIsGod_lIIlllIIlIllIIIlI-KateIsGod_lIllIIIIl)/2,KateIsGod_lIIIlIIIIIlIlI*2 end return KateIsGod_IIIlIIllIIIlIIIlII end local function KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIllIIIIl)if KateIsGod_lIllIIIIl then local KateIsGod_lIIlllIIlIllIIIlI=(KateIsGod_lIIIlIIIIIlIlI/2^(KateIsGod_lIIlllIIlIllIIIlI-1))%2^((KateIsGod_lIllIIIIl-1)-(KateIsGod_lIIlllIIlIllIIIlI-1)+1);return KateIsGod_lIIlllIIlIllIIIlI-KateIsGod_lIIlllIIlIllIIIlI%1;else local KateIsGod_lIIlllIIlIllIIIlI=2^(KateIsGod_lIIlllIIlIllIIIlI-1);return(KateIsGod_lIIIlIIIIIlIlI%(KateIsGod_lIIlllIIlIllIIIlI+KateIsGod_lIIlllIIlIllIIIlI)>=KateIsGod_lIIlllIIlIllIIIlI)and 1 or 0;end;end;local KateIsGod_lIIlllIIlIllIIIlI=1;local function KateIsGod_lIllIIIIl()local KateIsGod_lIllIIIIl,KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI,KateIsGod_IIlllIIIllIlIIIIIIIl=KateIsGod_lIlIllIllllIIIIlllI(KateIsGod_llIlllIlI,KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIIlllIIlIllIIIlI+3);KateIsGod_lIllIIIIl=KateIsGod_IIIlIIllIIIlIIIlII(KateIsGod_lIllIIIIl,12)KateIsGod_lIIIlIIIIIlIlI=KateIsGod_IIIlIIllIIIlIIIlII(KateIsGod_lIIIlIIIIIlIlI,12)KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_IIIlIIllIIIlIIIlII(KateIsGod_IIIIIlIlllIIlIlIlIIllI,12)KateIsGod_IIlllIIIllIlIIIIIIIl=KateIsGod_IIIlIIllIIIlIIIlII(KateIsGod_IIlllIIIllIlIIIIIIIl,12)KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI+4;return(KateIsGod_IIlllIIIllIlIIIIIIIl*16777216)+(KateIsGod_IIIIIlIlllIIlIlIlIIllI*65536)+(KateIsGod_lIIIlIIIIIlIlI*256)+KateIsGod_lIllIIIIl;end;local function KateIsGod_IllIllIIIlllIllIlIIlIIII()local KateIsGod_lIllIIIIl=KateIsGod_IIIlIIllIIIlIIIlII(KateIsGod_lIlIllIllllIIIIlllI(KateIsGod_llIlllIlI,KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIIlllIIlIllIIIlI),12);KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI+1;return KateIsGod_lIllIIIIl;end;local function KateIsGod_IIIIIlIlllIIlIlIlIIllI()local KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIllIIIIl=KateIsGod_lIlIllIllllIIIIlllI(KateIsGod_llIlllIlI,KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIIlllIIlIllIIIlI+2);KateIsGod_lIIIlIIIIIlIlI=KateIsGod_IIIlIIllIIIlIIIlII(KateIsGod_lIIIlIIIIIlIlI,12)KateIsGod_lIllIIIIl=KateIsGod_IIIlIIllIIIlIIIlII(KateIsGod_lIllIIIIl,12)KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI+2;return(KateIsGod_lIllIIIIl*256)+KateIsGod_lIIIlIIIIIlIlI;end;local function KateIsGod_lIIIIIllIlIIIllIllllI()local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIllIIIIl();local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIllIIIIl();local KateIsGod_IIIIIlIlllIIlIlIlIIllI=1;local KateIsGod_IIIlIIllIIIlIIIlII=(KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIIlllIIlIllIIIlI,1,20)*(2^32))+KateIsGod_IIIlIIllIIIlIIIlII;local KateIsGod_lIllIIIIl=KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIIlllIIlIllIIIlI,21,31);local KateIsGod_lIIlllIIlIllIIIlI=((-1)^KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIIlllIIlIllIIIlI,32));if(KateIsGod_lIllIIIIl==0)then if(KateIsGod_IIIlIIllIIIlIIIlII==0)then return KateIsGod_lIIlllIIlIllIIIlI*0;else KateIsGod_lIllIIIIl=1;KateIsGod_IIIIIlIlllIIlIlIlIIllI=0;end;elseif(KateIsGod_lIllIIIIl==2047)then return(KateIsGod_IIIlIIllIIIlIIIlII==0)and(KateIsGod_lIIlllIIlIllIIIlI*(1/0))or(KateIsGod_lIIlllIIlIllIIIlI*(0/0));end;return KateIsGod_lIIlIIIlIlllIl(KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIllIIIIl-1023)*(KateIsGod_IIIIIlIlllIIlIlIlIIllI+(KateIsGod_IIIlIIllIIIlIIIlII/(2^52)));end;local KateIsGod_lIIlIIIlIlllIl=KateIsGod_lIllIIIIl;local function KateIsGod_IIIIlllIIlIIIlII(KateIsGod_lIllIIIIl)local KateIsGod_lIIIlIIIIIlIlI;if(not KateIsGod_lIllIIIIl)then KateIsGod_lIllIIIIl=KateIsGod_lIIlIIIlIlllIl();if(KateIsGod_lIllIIIIl==0)then return'';end;end;KateIsGod_lIIIlIIIIIlIlI=KateIsGod_IIlIlIllII(KateIsGod_llIlllIlI,KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIIlllIIlIllIIIlI+KateIsGod_lIllIIIIl-1);KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI+KateIsGod_lIllIIIIl;local KateIsGod_lIllIIIIl={}for KateIsGod_lIIlllIIlIllIIIlI=1,#KateIsGod_lIIIlIIIIIlIlI do KateIsGod_lIllIIIIl[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_llIlIIIlIIIll(KateIsGod_IIIlIIllIIIlIIIlII(KateIsGod_lIlIllIllllIIIIlllI(KateIsGod_IIlIlIllII(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIIlllIIlIllIIIlI)),12))end return KateIsGod_IIIlIIIlllIlIIllII(KateIsGod_lIllIIIIl);end;local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIllIIIIl;local function KateIsGod_lllIIIIlIl(...)return{...},KateIsGod_llllIIIllIlllIIIIllllII('#',...)end local function KateIsGod_lIIlIIIlIlllIl()local KateIsGod_llIlIIIlIIIll={};local KateIsGod_IIlllIIIllIlIIIIIIIl={};local KateIsGod_IIlIlIllII={};local KateIsGod_llIlllIlI={[#{{648;576;34;324};"1 + 1 = 111";}]=KateIsGod_IIlllIIIllIlIIIIIIIl,[#{{238;461;372;360};"1 + 1 = 111";{347;117;343;864};}]=nil,[#{{159;748;19;751};"1 + 1 = 111";{282;779;877;466};"1 + 1 = 111";}]=KateIsGod_IIlIlIllII,[#{"1 + 1 = 111";}]=KateIsGod_llIlIIIlIIIll,};local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIllIIIIl()local KateIsGod_IIIlIIllIIIlIIIlII={}for KateIsGod_lIIIlIIIIIlIlI=1,KateIsGod_lIIlllIIlIllIIIlI do local KateIsGod_lIllIIIIl=KateIsGod_IllIllIIIlllIllIlIIlIIII();local KateIsGod_lIIlllIIlIllIIIlI;if(KateIsGod_lIllIIIIl==0)then KateIsGod_lIIlllIIlIllIIIlI=(KateIsGod_IllIllIIIlllIllIlIIlIIII()~=0);elseif(KateIsGod_lIllIIIIl==3)then KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIIIIllIlIIIllIllllI();elseif(KateIsGod_lIllIIIIl==1)then KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIlllIIlIIIlII();end;KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIIIlIIIIIlIlI]=KateIsGod_lIIlllIIlIllIIIlI;end;for KateIsGod_lIIlllIIlIllIIIlI=1,KateIsGod_lIllIIIIl()do KateIsGod_IIlllIIIllIlIIIIIIIl[KateIsGod_lIIlllIIlIllIIIlI-1]=KateIsGod_lIIlIIIlIlllIl();end;KateIsGod_llIlllIlI[3]=KateIsGod_IllIllIIIlllIllIlIIlIIII();for KateIsGod_llIlllIlI=1,KateIsGod_lIllIIIIl()do local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IllIllIIIlllIllIlIIlIIII();if(KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIIlllIIlIllIIIlI,1,1)==0)then local KateIsGod_IIlllIIIllIlIIIIIIIl=KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIIlllIIlIllIIIlI,2,3);local KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIIlllIIlIllIIIlI,4,6);local KateIsGod_lIIlllIIlIllIIIlI={KateIsGod_IIIIIlIlllIIlIlIlIIllI(),KateIsGod_IIIIIlIlllIIlIlIlIIllI(),nil,nil};if(KateIsGod_IIlllIIIllIlIIIIIIIl==0)then KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";{798;143;410;216};}]=KateIsGod_IIIIIlIlllIIlIlIlIIllI();KateIsGod_lIIlllIIlIllIIIlI[#("xnhI")]=KateIsGod_IIIIIlIlllIIlIlIlIIllI();elseif(KateIsGod_IIlllIIIllIlIIIIIIIl==1)then KateIsGod_lIIlllIIlIllIIIlI[#("8ty")]=KateIsGod_lIllIIIIl();elseif(KateIsGod_IIlllIIIllIlIIIIIIIl==2)then KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";}]=KateIsGod_lIllIIIIl()-(2^16)elseif(KateIsGod_IIlllIIIllIlIIIIIIIl==3)then KateIsGod_lIIlllIIlIllIIIlI[#("JUt")]=KateIsGod_lIllIIIIl()-(2^16)KateIsGod_lIIlllIIlIllIIIlI[#("kH9d")]=KateIsGod_IIIIIlIlllIIlIlIlIIllI();end;if(KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIlIllIllllIIIIlllI,1,1)==1)then KateIsGod_lIIlllIIlIllIIIlI[#("Ep")]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIIlllIIlIllIIIlI[#("6H")]]end if(KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIlIllIllllIIIIlllI,2,2)==1)then KateIsGod_lIIlllIIlIllIIIlI[#("CcG")]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";}]]end if(KateIsGod_lIIIlIIIIIlIlI(KateIsGod_lIlIllIllllIIIIlllI,3,3)==1)then KateIsGod_lIIlllIIlIllIIIlI[#("fcnF")]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIIlllIIlIllIIIlI[#("J15s")]]end KateIsGod_llIlIIIlIIIll[KateIsGod_llIlllIlI]=KateIsGod_lIIlllIIlIllIIIlI;end end;for KateIsGod_lIIlllIIlIllIIIlI=1,KateIsGod_lIllIIIIl()do KateIsGod_IIlIlIllII[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_lIllIIIIl();end;return KateIsGod_llIlllIlI;end;local KateIsGod_IllllIllIIIIIIlIII=pcall local function KateIsGod_IIIlIIIlllIlIIllII(KateIsGod_llIlIIIlIIIll,KateIsGod_lIlIllIllllIIIIlllI,KateIsGod_llIlllIlI)KateIsGod_llIlIIIlIIIll=(KateIsGod_llIlIIIlIIIll==true and KateIsGod_lIIlIIIlIlllIl())or KateIsGod_llIlIIIlIIIll;return(function(...)local KateIsGod_lIllIIIIl=1;local KateIsGod_IllIllIIIlllIllIlIIlIIII=-1;local KateIsGod_IIIIlllIIlIIIlII={...};local KateIsGod_llllIIIllIlllIIIIllllII=KateIsGod_llllIIIllIlllIIIIllllII('#',...)-1;local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_llIlIIIlIIIll[#{{870;312;210;472};}];local KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_llIlIIIlIIIll[#{"1 + 1 = 111";{844;233;455;197};{530;116;479;712};}];local KateIsGod_lIIIIIllIlIIIllIllllI=KateIsGod_llIlIIIlIIIll[#{{180;90;389;73};"1 + 1 = 111";}];local function KateIsGod_llIIIlIllI()local KateIsGod_lIIlIIIlIlllIl=KateIsGod_lllIIIIlIl local KateIsGod_llIlIIIlIIIll={};local KateIsGod_IIlIlIllII={};local KateIsGod_lIIIlIIIIIlIlI={};for KateIsGod_lIIlllIIlIllIIIlI=0,KateIsGod_llllIIIllIlllIIIIllllII do if(KateIsGod_lIIlllIIlIllIIIlI>=KateIsGod_IIIIIlIlllIIlIlIlIIllI)then KateIsGod_llIlIIIlIIIll[KateIsGod_lIIlllIIlIllIIIlI-KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_IIIIlllIIlIIIlII[KateIsGod_lIIlllIIlIllIIIlI+1];else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIIlllIIlIIIlII[KateIsGod_lIIlllIIlIllIIIlI+1];end;end;local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_llllIIIllIlllIIIIllllII-KateIsGod_IIIIIlIlllIIlIlIlIIllI+1 local KateIsGod_lIIlllIIlIllIIIlI;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;while true do KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("v")];if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("28j6NBEFjxPv9IcAqtqCqsq8dN5zSR4imLW96gnSjBV0A")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#{{122;93;955;381};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{367;95;280;140};{808;887;207;978};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{31;216;760;373};"1 + 1 = 111";{118;602;245;120};{752;337;49;637};"1 + 1 = 111";{77;839;32;893};{814;160;8;960};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";}then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("cDkfJr0IAI")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#{{113;418;336;639};"1 + 1 = 111";{316;374;810;194};"1 + 1 = 111";}then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("f")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("")then local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("da")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIllIIIIl+1,KateIsGod_lIIlllIIlIllIIIlI[#("WuI")]))else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("si")]][KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";{525;297;293;651};}]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("4J1J")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#{"1 + 1 = 111";"1 + 1 = 111";}then local KateIsGod_llIlIIIlIIIll=KateIsGod_lIIIIIllIlIIIllIllllI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";}]];local KateIsGod_IllIllIIIlllIllIlIIlIIII;local KateIsGod_IIIIIlIlllIIlIlIlIIllI={};KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_llIIIlllI({},{__index=function(KateIsGod_lIllIIIIl,KateIsGod_lIIlllIIlIllIIIlI)local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIIlllIIlIllIIIlI];return KateIsGod_lIIlllIIlIllIIIlI[1][KateIsGod_lIIlllIIlIllIIIlI[2]];end,__newindex=function(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIllIIIIl)local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIIlllIIlIllIIIlI]KateIsGod_lIIlllIIlIllIIIlI[1][KateIsGod_lIIlllIIlIllIIIlI[2]]=KateIsGod_lIllIIIIl;end;});for KateIsGod_IIlllIIIllIlIIIIIIIl=1,KateIsGod_lIIlllIIlIllIIIlI[#("9AQN")]do KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];if KateIsGod_lIIlllIIlIllIIIlI[#("5")]==16 then KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_IIlllIIIllIlIIIIIIIl-1]={KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIIlllIIlIllIIIlI[#("iS2")]};else KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_IIlllIIIllIlIIIIIIIl-1]={KateIsGod_lIlIllIllllIIIIlllI,KateIsGod_lIIlllIIlIllIIIlI[#{{442;376;687;533};"1 + 1 = 111";{216;48;155;713};}]};end;KateIsGod_IIlIlIllII[#KateIsGod_IIlIlIllII+1]=KateIsGod_IIIIIlIlllIIlIlIlIIllI;end;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("zQ")]]=KateIsGod_IIIlIIIlllIlIIllII(KateIsGod_llIlIIIlIIIll,KateIsGod_IllIllIIIlllIllIlIIlIIII,KateIsGod_llIlllIlI);elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("Von")then local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("1B")];local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl];for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIllIIIIl+1,KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";{230;522;564;842};}]do KateIsGod_IIlIIllllIIlll(KateIsGod_IIIlIIllIIIlIIIlII,KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI])end;else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Ko")]]=(KateIsGod_lIIlllIIlIllIIIlI[#("mg3")]~=0);end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("eOsy32C")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("FTITc")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("CI")]][KateIsGod_lIIlllIIlIllIIIlI[#("RWB")]]=KateIsGod_lIIlllIIlIllIIIlI[#("zqSr")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("NbrN0m")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("80")]]=(KateIsGod_lIIlllIIlIllIIIlI[#("kQR")]~=0);else local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{392;304;655;327};}];local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("WtJ")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl+1]=KateIsGod_IIIlIIllIIIlIIIlII;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIIlllIIlIllIIIlI[#("M9Th")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#{"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{828;230;819;268};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";}then KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("Iei")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("R52vnlocP")then local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI[#("gPG")];local KateIsGod_lIllIIIIl=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII]for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII+1,KateIsGod_lIIlllIIlIllIIIlI[#("BSLO")]do KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl..KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI];end;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{71;235;502;209};}]]=KateIsGod_lIllIIIIl;else KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("jF9")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("WS")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("uWxWCvEiElaiybk1")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("092VkjUbM1RPC")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("o7Q1p0FabH8")then local KateIsGod_lIlIllIllllIIIIlllI;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("vB")]]=(KateIsGod_lIIlllIIlIllIIIlI[#("FhX")]~=0);KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("1d")]]=KateIsGod_lIIlllIIlIllIIIlI[#("B41")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Lb")]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Dmv")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("vG")];KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("XFE")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]=KateIsGod_lIlIllIllllIIIIlllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("rxFM")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("8E")]]=KateIsGod_lIIlllIIlIllIIIlI[#("bpo")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("NP")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("3VE")]))KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{950;437;507;991};}]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("cJH")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("p7")];KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Kjv")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]=KateIsGod_lIlIllIllllIIIIlllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("oXxf")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("HT")]]=KateIsGod_lIIlllIIlIllIIIlI[#("WoP")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("Of")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#{{486;120;612;547};{849;839;613;652};"1 + 1 = 111";}]))elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("vUJI0kvYycXy")then if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("bM")]]==KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("YxIS")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("DjC")];end;else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("3G")]]=(not KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("TBI")]]);end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("MMV0FXEczVlRj4")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{{743;497;344;323};{839;4;625;206};}]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ldS")]][KateIsGod_lIIlllIIlIllIIIlI[#("U0x5")]];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#{{250;239;445;87};{698;773;584;854};{682;515;324;414};"1 + 1 = 111";{840;741;885;478};"1 + 1 = 111";{881;373;124;5};{951;849;418;132};"1 + 1 = 111";{473;331;340;18};{422;167;672;947};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";}then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("81")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("qos")]]+KateIsGod_lIIlllIIlIllIIIlI[#("Yu5k")];else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("CN")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("OnJ")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("jsROnUkHTEU68y0Rqu5")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("eCKWYLrWErkAaJbzD")then if KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Qv")]]then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("ytZ")];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("YiPBMsO1bentp8R0hS")then local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI[#("gK")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI+1])else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Tq")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("0j5")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("4ZMCzcCtt6AxCo9GX3OZ")then if not KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("2f")]]then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("0BK")];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("h7JnIkclSkCsQIBlRqzj9")then KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("dyr")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Jt")]];else local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI[#("n6")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]()end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("4MSWepC46D2BX1cn01AhMW8dVQIufNpQr")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("d7GVgWTXn8AoVKiDAHU1SiOObzR")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("Ztnmj8YfSfVNyYIaNG58lMmS")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("Bf4t1URfM83UnfWVdVuWgD3")then local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI[#("Wt")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI+1])else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ve")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("ti0")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("NaFDT5mhFqT34V1udIW0PpABj")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("5L")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("b5v")]];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("i126Z7mtQ0poxQWWp6x31r39SI")then local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI[#("0H")]local KateIsGod_IIIIIlIlllIIlIlIlIIllI={KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIlIIllIIIlIIIlII+1,KateIsGod_IllIllIIIlllIllIlIIlIIII))};local KateIsGod_lIllIIIIl=0;for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII,KateIsGod_lIIlllIIlIllIIIlI[#("JiYe")]do KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIllIIIIl];end else local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI[#("lX")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI+1])end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("d5yLdtFXupIBVQKfbfZlfd39Eepv07")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("orpizrpl513BGRFLmqm243xM9byg")then if(KateIsGod_lIIlllIIlIllIIIlI[#("x1")]<KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("l7mp")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("BB5")];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("di6xxtjFHkXW33ulNxs8DdfOf7u5O")then local KateIsGod_IIlllIIIllIlIIIIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("VH")];local KateIsGod_IIIIIlIlllIIlIlIlIIllI={};for KateIsGod_lIIlllIIlIllIIIlI=1,#KateIsGod_IIlIlIllII do local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIlIlIllII[KateIsGod_lIIlllIIlIllIIIlI];for KateIsGod_lIllIIIIl=0,#KateIsGod_lIIlllIIlIllIIIlI do local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI[KateIsGod_lIllIIIIl];local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI[1];local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[2];if KateIsGod_IIIlIIllIIIlIIIlII==KateIsGod_lIIIlIIIIIlIlI and KateIsGod_lIllIIIIl>=KateIsGod_IIlllIIIllIlIIIIIIIl then KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIllIIIIl]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIlllIIlIllIIIlI[1]=KateIsGod_IIIIIlIlllIIlIlIlIIllI;end;end;end;else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ls")]]=(not KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("55y")]]);end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("y3im1S6djxvfQgzgb9bAvOfhGadsrA9")then if KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("rb")]]then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("GtD")];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("1yW3NRcMoKn5Nxy8o96u3nXTYaQ1OOVT")then do return end;else if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("GD")]]==KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("N5eO")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("uhF")];end;end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("hortFDu7AkWBjFiMfdrDOuNKdfNak7LYEIGifPT")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("MyEcbsOFIpJKEqTWLSqAZuXCK76M9aHBuV1q")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("KIUChC5zbunYTHxytSrKbDevbGISipSzD5")then local KateIsGod_IIlllIIIllIlIIIIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("1U")];local KateIsGod_IIIIIlIlllIIlIlIlIIllI={};for KateIsGod_lIIlllIIlIllIIIlI=1,#KateIsGod_IIlIlIllII do local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIlIlIllII[KateIsGod_lIIlllIIlIllIIIlI];for KateIsGod_lIllIIIIl=0,#KateIsGod_lIIlllIIlIllIIIlI do local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[KateIsGod_lIllIIIIl];local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIllIIIIl[1];local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIllIIIIl[2];if KateIsGod_IIIlIIllIIIlIIIlII==KateIsGod_lIIIlIIIIIlIlI and KateIsGod_lIIlllIIlIllIIIlI>=KateIsGod_IIlllIIIllIlIIIIIIIl then KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIIlllIIlIllIIIlI];KateIsGod_lIllIIIIl[1]=KateIsGod_IIIIIlIlllIIlIlIlIIllI;end;end;end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#{"1 + 1 = 111";"1 + 1 = 111";{654;81;892;134};{700;569;1;854};{804;15;37;859};{127;355;463;99};{200;80;371;298};"1 + 1 = 111";"1 + 1 = 111";{873;939;836;365};{170;988;772;234};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{141;223;875;585};{274;177;309;663};{741;296;196;396};"1 + 1 = 111";{208;48;310;659};{176;996;920;154};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{777;65;172;805};"1 + 1 = 111";"1 + 1 = 111";{688;511;233;463};"1 + 1 = 111";{29;87;517;61};"1 + 1 = 111";{881;12;666;605};"1 + 1 = 111";"1 + 1 = 111";}then local KateIsGod_IIlllIIIllIlIIIIIIIl;local KateIsGod_lIlIllIllllIIIIlllI;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("G8V")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("LP")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("At")]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("DW1")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("zl")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("7KA")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("m2")]KateIsGod_lIlIllIllllIIIIlllI={KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1])};KateIsGod_IIlllIIIllIlIIIIIIIl=0;for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI,KateIsGod_lIIlllIIlIllIIIlI[#("L4MN")]do KateIsGod_IIlllIIIllIlIIIIIIIl=KateIsGod_IIlllIIIllIlIIIIIIIl+1;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_IIlllIIIllIlIIIIIIIl];end KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("y71")];else if not KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ER")]]then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("7r3")];end;end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("vaAS84COnpeIgoPZXf4QhIe7PXWa3CC76kPcj")then local KateIsGod_llIlllIlI;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("jm")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("nyN")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("6D")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("c5B")]][KateIsGod_lIIlllIIlIllIIIlI[#("pCb1")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("zL")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("4iz")]][KateIsGod_lIIlllIIlIllIIIlI[#("LuPx")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{710;802;886;263};}]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("Orf")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";}]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";{503;341;804;223};}]][KateIsGod_lIIlllIIlIllIIIlI[#("7BuW")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("H9")];KateIsGod_llIlllIlI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("KcK")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]=KateIsGod_llIlllIlI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("g9rK")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("qK")]]=KateIsGod_lIIlllIIlIllIIIlI[#("G2q")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("a6")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("Cal")]))KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];if KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("gv")]]then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{572;814;78;993};"1 + 1 = 111";}];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("1mbUlx0OjH68ISMGVX5CdkiCUWXhL6JNQZoSPx")then if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("H9")]]<=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("0jrj")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("v0S")];end;else local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("NY")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIllIIIIl+1,KateIsGod_lIIlllIIlIllIIIlI[#("vh8")]))end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("ShaOod53UvBz1gS4QdKaAJScn8tsTE31yCmucH3yZ2")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#{{354;356;250;705};"1 + 1 = 111";"1 + 1 = 111";{249;856;656;231};"1 + 1 = 111";{222;813;186;577};{451;896;589;639};"1 + 1 = 111";"1 + 1 = 111";{910;138;648;523};"1 + 1 = 111";{878;274;194;642};"1 + 1 = 111";"1 + 1 = 111";{35;586;273;965};"1 + 1 = 111";"1 + 1 = 111";{243;600;890;514};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{655;767;55;606};"1 + 1 = 111";{431;474;307;786};"1 + 1 = 111";{685;865;805;356};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{723;673;939;203};{852;82;663;179};{674;98;616;556};"1 + 1 = 111";{843;115;133;258};"1 + 1 = 111";}then do return end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("5pVbGd5egNOmRXuLFqMLdzD3kyODfU95rxulY940C")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("hv")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("km1")]]-KateIsGod_lIIlllIIlIllIIIlI[#("ZWTb")];else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("64")]][KateIsGod_lIIlllIIlIllIIIlI[#{{489;405;922;256};{112;398;289;548};"1 + 1 = 111";}]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("4SsN")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("cIH80TLqkamUVHW11hAC8vNT5uCiXGxVipv5xlH42ZJ")then local KateIsGod_llIlIIIlIIIll=KateIsGod_lIIIIIllIlIIIllIllllI[KateIsGod_lIIlllIIlIllIIIlI[#("op0")]];local KateIsGod_IllIllIIIlllIllIlIIlIIII;local KateIsGod_IIIIIlIlllIIlIlIlIIllI={};KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_llIIIlllI({},{__index=function(KateIsGod_lIllIIIIl,KateIsGod_lIIlllIIlIllIIIlI)local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIIlllIIlIllIIIlI];return KateIsGod_lIIlllIIlIllIIIlI[1][KateIsGod_lIIlllIIlIllIIIlI[2]];end,__newindex=function(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_lIllIIIIl)local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIIlllIIlIllIIIlI]KateIsGod_lIIlllIIlIllIIIlI[1][KateIsGod_lIIlllIIlIllIIIlI[2]]=KateIsGod_lIllIIIIl;end;});for KateIsGod_IIlllIIIllIlIIIIIIIl=1,KateIsGod_lIIlllIIlIllIIIlI[#("hh7L")]do KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];if KateIsGod_lIIlllIIlIllIIIlI[#("r")]==16 then KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_IIlllIIIllIlIIIIIIIl-1]={KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIIlllIIlIllIIIlI[#("Xrz")]};else KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_IIlllIIIllIlIIIIIIIl-1]={KateIsGod_lIlIllIllllIIIIlllI,KateIsGod_lIIlllIIlIllIIIlI[#("P2r")]};end;KateIsGod_IIlIlIllII[#KateIsGod_IIlIlIllII+1]=KateIsGod_IIIIIlIlllIIlIlIlIIllI;end;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("El")]]=KateIsGod_IIIlIIIlllIlIIllII(KateIsGod_llIlIIIlIIIll,KateIsGod_IllIllIIIlllIllIlIIlIIII,KateIsGod_llIlllIlI);elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("THLXz6hWBaYR4YdGqCDPNBLFl1FQLFJjXO9yTPU1zKth")then if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{890;357;407;934};}]]~=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("1sZV")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("6v8")];end;else local KateIsGod_lIlIllIllllIIIIlllI;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("n0")];KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("67Q")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]=KateIsGod_lIlIllIllllIIIIlllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("mKrn")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("1P")]]=KateIsGod_lIIlllIIlIllIIIlI[#("2Gr")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("6m")]]={};KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("jj")]][KateIsGod_lIIlllIIlIllIIIlI[#("dUk")]]=KateIsGod_lIIlllIIlIllIIIlI[#("MNbk")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("60")]][KateIsGod_lIIlllIIlIllIIIlI[#("akQ")]]=KateIsGod_lIIlllIIlIllIIIlI[#("fj1n")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("e2")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("TYY")]))end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("PaJhbOAx4vr6gMHBBl6BP3pYPWMSLpcgEdG16IK1jW2sSCNcmB7zyQXVUUDocRVOskCd")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#{{338;720;171;192};"1 + 1 = 111";{809;92;794;950};"1 + 1 = 111";{394;732;867;384};"1 + 1 = 111";{307;357;553;583};{809;146;866;241};{830;366;287;545};{23;39;437;34};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{803;155;26;179};{728;777;818;73};"1 + 1 = 111";{980;210;764;23};{35;934;609;301};"1 + 1 = 111";{751;62;917;784};"1 + 1 = 111";{680;767;182;115};"1 + 1 = 111";{713;67;444;451};"1 + 1 = 111";{917;112;422;900};"1 + 1 = 111";{197;173;482;592};"1 + 1 = 111";{180;217;395;987};"1 + 1 = 111";{52;346;545;46};{317;284;171;637};{17;922;800;858};"1 + 1 = 111";"1 + 1 = 111";{186;106;151;683};{351;415;950;449};{296;195;152;875};"1 + 1 = 111";"1 + 1 = 111";{457;816;590;88};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{39;165;749;908};"1 + 1 = 111";"1 + 1 = 111";{75;278;911;314};"1 + 1 = 111";"1 + 1 = 111";}then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("XqpZ1W8KnKN8oo0AyvatI0pvpA3setWL7NqHcJd7XdbF0nxg0b")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("CupU7b4KB3PF3YbbL8txYrcGFZVFbcXDddtqS3sFi9MeiJh")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("ZmWhGODjrTpiqzIyflC0FUsRPYoZQ8y5ReQZqQ6zLk99Ok")then local KateIsGod_lIlIllIllllIIIIlllI;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("L5")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("oju")]][KateIsGod_lIIlllIIlIllIIIlI[#("ZMNR")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("SB")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";{604;580;890;452};}]][KateIsGod_lIIlllIIlIllIIIlI[#("ohRm")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#{{621;431;432;78};"1 + 1 = 111";}];KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("0f2")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]=KateIsGod_lIlIllIllllIIIIlllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("8cQP")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{596;918;849;409};}]]=KateIsGod_lIIlllIIlIllIIIlI[#("osj")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("dT")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("i8F")]))else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{871;181;342;982};}]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("7yh")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("TCn96gqle3eCSzOEtutBlTThAocpuVtdFKGxC8CYB3L5mno9")then local KateIsGod_IIIIIlIlllIIlIlIlIIllI;local KateIsGod_lIlIllIllllIIIIlllI;local KateIsGod_IIlIlIllII,KateIsGod_IIlIIllllIIlll;local KateIsGod_llIlIIIlIIIll;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("KQ")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{692;118;460;232};"1 + 1 = 111";}]][KateIsGod_lIIlllIIlIllIIIlI[#("ItGI")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("HQ")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("lOk")]][KateIsGod_lIIlllIIlIllIIIlI[#("oEGo")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("n8")]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("I9t")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("aa")]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("NN2")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";}]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("NYM")]][KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{490;514;805;617};"1 + 1 = 111";{594;482;857;109};}]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("DQ")];KateIsGod_llIlIIIlIIIll=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("2ud")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]=KateIsGod_llIlIIIlIIIll;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_llIlIIIlIIIll[KateIsGod_lIIlllIIlIllIIIlI[#("7pT7")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("9F")]KateIsGod_IIlIlIllII,KateIsGod_IIlIIllllIIlll=KateIsGod_lIIlIIIlIlllIl(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]))KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_IIlIIllllIIlll+KateIsGod_IIIIIlIlllIIlIlIlIIllI-1 KateIsGod_lIlIllIllllIIIIlllI=0;for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI,KateIsGod_IllIllIIIlllIllIlIIlIIII do KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIlIllIllllIIIIlllI+1;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIlIlIllII[KateIsGod_lIlIllIllllIIIIlllI];end;KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("S9")]KateIsGod_IIlIlIllII={KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_IllIllIIIlllIllIlIIlIIII))};KateIsGod_lIlIllIllllIIIIlllI=0;for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI,KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";}]do KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIlIllIllllIIIIlllI+1;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIlIlIllII[KateIsGod_lIlIllIllllIIIIlllI];end KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("bWF")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("QQOuTdaSgJRda1tKb6i3qbu2F9rhY5ladsOfPSWGGPvzVUAcr")then KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("teb")];else local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#{{534;467;475;581};"1 + 1 = 111";}]local KateIsGod_IIIIIlIlllIIlIlIlIIllI={KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl+1])};local KateIsGod_IIIlIIllIIIlIIIlII=0;for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIllIIIIl,KateIsGod_lIIlllIIlIllIIIlI[#("e3f5")]do KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_IIIlIIllIIIlIIIlII+1;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_IIIlIIllIIIlIIIlII];end end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("kqgfQPuWZTV34lyQaRmo4skMyMQ5hUKoZCU547N9U32cUNUkbeUT0")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#{"1 + 1 = 111";{326;516;472;3};{775;852;213;121};"1 + 1 = 111";{784;520;623;510};{346;784;696;188};{323;605;10;184};"1 + 1 = 111";"1 + 1 = 111";{235;927;431;399};"1 + 1 = 111";"1 + 1 = 111";{809;795;805;718};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{971;102;791;693};{269;469;983;812};{491;331;966;301};"1 + 1 = 111";"1 + 1 = 111";{310;938;281;206};"1 + 1 = 111";"1 + 1 = 111";{611;808;565;977};{919;961;857;54};{7;231;624;758};"1 + 1 = 111";{64;824;403;391};{781;14;947;393};{432;81;375;413};{667;793;668;885};"1 + 1 = 111";{994;469;395;385};{350;638;176;573};{605;196;460;32};{309;724;195;368};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{890;879;362;479};"1 + 1 = 111";"1 + 1 = 111";{161;87;408;676};{489;852;461;178};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{685;212;800;964};"1 + 1 = 111";"1 + 1 = 111";}then local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Sg")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("br6")]][KateIsGod_lIIlllIIlIllIIIlI[#("J7xJ")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("lP")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("zzr")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("MF")]]=KateIsGod_lIIlllIIlIllIIIlI[#("4Uq")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("rd")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("8xq")]))KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("PF")]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("gkf")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("11")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Wjk")]][KateIsGod_lIIlllIIlIllIIIlI[#("VNtX")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("at")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("cBD")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("eL")]]=KateIsGod_lIIlllIIlIllIIIlI[#("jAY")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";}]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("8DV")]))elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("OMJBC8M6nDFLfsiqCJNvXHnjUNpOlJWuUsmWnJB0XsuH0ORKes0k")then local KateIsGod_IllIllIIIlllIllIlIIlIIII;local KateIsGod_llIlllIlI;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("f1")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]()KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("oT")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("QH5")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("lG")];KateIsGod_llIlllIlI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("HAd")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]=KateIsGod_llIlllIlI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ugzO")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("XZ")]]=KateIsGod_lIIlllIIlIllIIIlI[#("eYT")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("gJ")]]={};KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ik")]][KateIsGod_lIIlllIIlIllIIIlI[#("F9O")]]=KateIsGod_lIIlllIIlIllIIIlI[#("I9UR")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Ru")]]=KateIsGod_lIIlllIIlIllIIIlI[#("92e")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{{988;814;519;407};{260;947;770;267};}]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("gks")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("EX")]]=KateIsGod_lIIlllIIlIllIIIlI[#("52c")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("bO")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("5Yq")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("xd")]]=KateIsGod_lIIlllIIlIllIIIlI[#("M5Z")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_llIlllIlI=KateIsGod_lIIlllIIlIllIIIlI[#("o1M")];KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_llIlllIlI]for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_llIlllIlI+1,KateIsGod_lIIlllIIlIllIIIlI[#("TtSJ")]do KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_IllIllIIIlllIllIlIIlIIII..KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI];end;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("JG")]]=KateIsGod_IllIllIIIlllIllIlIIlIIII;KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Fd")]][KateIsGod_lIIlllIIlIllIIIlI[#("fdS")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("3lvk")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("aD")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("SZ4")]))KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("WOE")];else local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("Le")];local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl];for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIllIIIIl+1,KateIsGod_lIIlllIIlIllIIIlI[#("z2p")]do KateIsGod_IIlIIllllIIlll(KateIsGod_IIIlIIllIIIlIIIlII,KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI])end;end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("64gzAQZS8VOQk1Xgvc2iXJEmQsg5QK2TMzYyfyY2LiZIQ0PX3DSq7c")then local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{365;472;549;582};}]]=KateIsGod_lIIlllIIlIllIIIlI[#("n7s")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("D5")]]={};KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("AA")]][KateIsGod_lIIlllIIlIllIIIlI[#("xJl")]]=KateIsGod_lIIlllIIlIllIIIlI[#("vzKA")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("zi")]][KateIsGod_lIIlllIIlIllIIIlI[#("Inb")]]=KateIsGod_lIIlllIIlIllIIIlI[#("ttKY")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{712;661;469;487};}]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("je5")]))KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("pSX")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("yA4TgK3cz24eVcza8oaHOT6GZOtbm1MVJpB8kOSsSfBPWW3VEDTb7FE")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("hj")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{122;187;497;272};"1 + 1 = 111";}]][KateIsGod_lIIlllIIlIllIIIlI[#("t55J")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("vA")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("83S")]][KateIsGod_lIIlllIIlIllIIIlI[#("iqF0")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("7I")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("tjg")]][KateIsGod_lIIlllIIlIllIIIlI[#("fjyK")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";}]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Qtv")]][KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";{799;457;217;326};"1 + 1 = 111";}]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("sR")]]==KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("JriC")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("I88")];end;else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("av")]]={};end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("Ez3Dq1ZHpjFGLB0tHRZJrqTdUJIUhKXeWWFWVpc0p3zNqyjcNzFpQ5xmP0SRtf")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("QvBTY6dJrP8sy1gWvzFhSeHy0Arg4HuHkETrZOugJ0nLSM8vIdvsZ8RLYd3")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("P6PUuBi3hZ7RdzJ216PnB6J1kbSmXiEWV6BMlDpqEenTgPoAAZU1yP7Ty")then local KateIsGod_IllIllIIIlllIllIlIIlIIII;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;local KateIsGod_llIlllIlI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("fn")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("1CP")]]+KateIsGod_lIIlllIIlIllIIIlI[#{{235;40;612;96};"1 + 1 = 111";{220;493;322;897};"1 + 1 = 111";}];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("Xt9")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("vJ")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("f6")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("Tv1")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_llIlllIlI=KateIsGod_lIIlllIIlIllIIIlI[#("Bk")];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("fld")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_llIlllIlI+1]=KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_llIlllIlI]=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";{582;350;995;57};{927;22;449;460};}]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("M6")]]=KateIsGod_lIIlllIIlIllIIIlI[#("SmP")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("y3")]]={};KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ho")]][KateIsGod_lIIlllIIlIllIIIlI[#("046")]]=KateIsGod_lIIlllIIlIllIIIlI[#{{76;351;981;729};"1 + 1 = 111";"1 + 1 = 111";{508;975;531;949};}];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("qr")]]=KateIsGod_lIIlllIIlIllIIIlI[#("gs4")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Sm")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("TOK")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("sh")]]=KateIsGod_lIIlllIIlIllIIIlI[#("Tql")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";{325;835;279;454};"1 + 1 = 111";}];KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("MRFv")]do KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_IllIllIIIlllIllIlIIlIIII..KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI];end;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ey")]]=KateIsGod_IllIllIIIlllIllIlIIlIIII;KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("oD")]][KateIsGod_lIIlllIIlIllIIIlI[#("3bI")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("la9u")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_llIlllIlI=KateIsGod_lIIlllIIlIllIIIlI[#("cV")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_llIlllIlI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_llIlllIlI+1,KateIsGod_lIIlllIIlIllIIIlI[#("rBN")]))KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("qmJ")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("KsT6g9vk6h76RyRyUvSZUGXrX7zMyg9Sny36II8nx5ShDDhvka4LaIddGB")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("iq")]]={};else if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("hG")]]~=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("eGxJ")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("sEP")];end;end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("iLTXZhoTtFUZmyFDZXPZt0cCymySPtZAhyZMNi39nUY1AkRnFfnq0MZsJrAN")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("QP")]][KateIsGod_lIIlllIIlIllIIIlI[#("Fqx")]]=KateIsGod_lIIlllIIlIllIIIlI[#("cXEG")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("Hd9PtSYI2ZR4QLKblbmFkmKgJKFJHdvSqpQQZlgD3PMpHxkaorxpmiJuE3fUm")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("04")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Ai7")]][KateIsGod_lIIlllIIlIllIIIlI[#("Nru0")]];else local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI[#("I3")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]()end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("bZE8NB43l95UMFKtJmzEtpQfGhQum6gvpNOXWJTUgvfyuCHdVkt2uS6WizCFUJRp3")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("F81WHaEPy8ksVeLMKcMnaHQ1OygnaHOZEV7Il8NtzQt8M0Oy4h9POPJ7s9ij4qO")then local KateIsGod_IllIllIIIlllIllIlIIlIIII;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;local KateIsGod_llIlllIlI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("hY")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{{375;887;690;98};"1 + 1 = 111";{148;104;548;625};}]]-KateIsGod_lIIlllIIlIllIIIlI[#("PoAK")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("abS")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("IN")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("AW")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("3aL")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_llIlllIlI=KateIsGod_lIIlllIIlIllIIIlI[#("4x")];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("x9g")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_llIlllIlI+1]=KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_llIlllIlI]=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIIlllIIlIllIIIlI[#("2ga9")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Kx")]]=KateIsGod_lIIlllIIlIllIIIlI[#("PAK")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Uv")]]={};KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("T8")]][KateIsGod_lIIlllIIlIllIIIlI[#("eo8")]]=KateIsGod_lIIlllIIlIllIIIlI[#("1XXk")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("kj")]]=KateIsGod_lIIlllIIlIllIIIlI[#("LpG")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("7c")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("yYp")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("MD")]]=KateIsGod_lIIlllIIlIllIIIlI[#("dCl")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("EYE")];KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("5GO4")]do KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_IllIllIIIlllIllIlIIlIIII..KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI];end;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("4H")]]=KateIsGod_IllIllIIIlllIllIlIIlIIII;KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Qg")]][KateIsGod_lIIlllIIlIllIIIlI[#("ENB")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("RcvY")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_llIlllIlI=KateIsGod_lIIlllIIlIllIIIlI[#("ME")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_llIlllIlI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_llIlllIlI+1,KateIsGod_lIIlllIIlIllIIIlI[#("30K")]))KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("jR0")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("tuY9hdBMzsZunSpYUSt2H8lYm9pl0DzhbCOqbOq0Rypu0oUKUuAl7Wuuj9XhYoV5")then local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI[#("oT")]local KateIsGod_IIIIIlIlllIIlIlIlIIllI={KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIlIIllIIIlIIIlII+1,KateIsGod_IllIllIIIlllIllIlIIlIIII))};local KateIsGod_lIllIIIIl=0;for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII,KateIsGod_lIIlllIIlIllIIIlI[#("a3M8")]do KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIllIIIIl];end else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Pm")]]=KateIsGod_lIIlllIIlIllIIIlI[#("JBa")];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("RsVd8WgBDljS087pPCFdmkphshb0jcDMuBi58GVItVFKkMsbZ1iWq2RHcNU1UprATH")then local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI[#("Lf")]local KateIsGod_IIIIIlIlllIIlIlIlIIllI={KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII+1])};local KateIsGod_lIllIIIIl=0;for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII,KateIsGod_lIIlllIIlIllIIIlI[#("uvOT")]do KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIIIlIlllIIlIlIlIIllI[KateIsGod_lIllIIIIl];end elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("z0cqiR6UCQP6QYaar4QvDUL3uW3XdEe1Oo3lXL9ftho1xRdcUp9Gcl5Poi6xXiQ8LYs")then local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI[#("ng")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI+1])else local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI[#("RZ")];local KateIsGod_IIlllIIIllIlIIIIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("7LAd")];local KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_IIIlIIllIIIlIIIlII+2 local KateIsGod_IIIlIIllIIIlIIIlII={KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII+1],KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI])};for KateIsGod_lIIlllIIlIllIIIlI=1,KateIsGod_IIlllIIIllIlIIIIIIIl do KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIIlllIIlIllIIIlI];end;local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_IIIlIIllIIIlIIIlII[1]if KateIsGod_IIIlIIllIIIlIIIlII then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_IIIlIIllIIIlIIIlII KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("MRn")];else KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;end;end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("4ZmR4LbuGUGOS0dYEIYCso6OPNskBqpJyMi4csMCjLiFNrP6f2Ed90jQ2Jcrr13oE7pgSjWl6xrRfCbx")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("xfJXmJICDbDqujsR4aPcJn6fsgNJCKBHPt5WtCqzSOphs5Lm99lBxuzijDEf6893L6LbnHyCUq")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("48ZXyGAKCy9ku4XM17kCTPxGxtK8CMTRfaFktQgKGzHFMWpgB4GFKYLpLsAd5Bh0OseuAMr")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("0K6th23LeEIHgogqzpJapdPerR0tR4RYMvO92qhTAZ8C3KUAlX5jdq5X51cBbK3jWT5UL")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("i7")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("GJI")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("jL")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{{490;338;709;591};{841;547;594;347};{388;92;568;220};}]][KateIsGod_lIIlllIIlIllIIIlI[#("8Gy6")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ZY")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Xzl")]][KateIsGod_lIIlllIIlIllIIIlI[#("o9tP")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("La")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("6vc")]][KateIsGod_lIIlllIIlIllIIIlI[#("gOB5")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("s4")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("XQv")]]-KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("M3LL")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Yh")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Paa")]][KateIsGod_lIIlllIIlIllIIIlI[#("9EbA")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("9E")]]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("8pl")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("EG")]]<=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("FieJ")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("BPf")];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("zhh0LAfmlR7Bh39HVuB1daoRRZ6ZPjP9YeyYbmQFSSPvDLDako8KtUdz3BiVEpHcb8MdFk")then local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI[#("Mv")];local KateIsGod_lIllIIIIl=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("KTS")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII+1]=KateIsGod_lIllIIIIl;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII]=KateIsGod_lIllIIIIl[KateIsGod_lIIlllIIlIllIIIlI[#("tfKJ")]];else do return KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("py")]]end end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("IP5ivu3ngx5OBkePea95Ke4aCkNtF8zF9TB5zLSd9nbzIMg17sIcGp5DU4RkSKSh7BORUjqD")then if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Pn")]]<=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("kPAF")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("evH")];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("65xdGD0dVxmBx9UY7kE3HuAF3Bh7zhXceTJtIAoC1g7mGRLB43X9WKVLF2jev2POJjxNAApI5")then KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#{{89;465;69;284};"1 + 1 = 111";{528;142;380;786};}]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("KI")]];else local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI[#("F9c")];local KateIsGod_lIllIIIIl=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII]for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII+1,KateIsGod_lIIlllIIlIllIIIlI[#("aK7e")]do KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl..KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI];end;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("9C")]]=KateIsGod_lIllIIIIl;end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#{{255;58;390;199};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{695;307;915;388};"1 + 1 = 111";{97;327;975;7};{241;721;564;720};{904;558;521;653};"1 + 1 = 111";"1 + 1 = 111";{22;499;449;31};"1 + 1 = 111";"1 + 1 = 111";{935;569;496;40};{744;183;612;665};{981;164;151;703};{108;935;72;655};"1 + 1 = 111";"1 + 1 = 111";{569;322;438;542};{389;307;291;267};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{457;1;669;741};{326;853;145;76};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{796;779;225;243};{333;281;696;784};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{5;91;50;226};{54;757;343;443};"1 + 1 = 111";{489;283;535;298};{190;787;151;455};"1 + 1 = 111";"1 + 1 = 111";{430;7;634;52};{415;977;826;553};{500;308;654;577};{174;597;463;932};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{108;629;891;3};{497;933;238;568};{120;808;337;705};{233;149;232;975};{287;984;192;147};"1 + 1 = 111";"1 + 1 = 111";{415;864;705;801};{332;286;573;223};"1 + 1 = 111";"1 + 1 = 111";{941;454;138;992};{765;715;358;417};{516;923;9;296};"1 + 1 = 111";{426;982;348;399};"1 + 1 = 111";{617;225;423;626};"1 + 1 = 111";{86;48;383;600};"1 + 1 = 111";{850;569;328;652};"1 + 1 = 111";"1 + 1 = 111";}then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("93CBrJ4e7sYFvhTpevasro9y6dQdV9YG4QfPkBLfOWhCSCqNXHnKA0bU4eFo30s8ErKQcefNU4O")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("HA")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("zJT")]]+KateIsGod_lIIlllIIlIllIIIlI[#("R5TY")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("hHQEWcpoVofePvUg6xmXEj8A2KLTCLZFlGNxyaC0KemplFbRt9RyS0b7JqMmCHWkzK3iSxS54vnz")then local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("kd")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIllIIIIl+1,KateIsGod_lIIlllIIlIllIIIlI[#("vDf")]))else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("ts")]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("J1h")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("SnxJ4zD3CXuFPYhzpzcsc1MM286qWEvNMa0cpNIitq6XINdJLHP7kg41MVQ5Clg8CS2O7eiN148V4Y")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("bA")]]=KateIsGod_lIIlllIIlIllIIIlI[#("PiE")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#{"1 + 1 = 111";{67;149;713;510};"1 + 1 = 111";{768;787;780;626};"1 + 1 = 111";{861;399;963;551};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{642;71;819;59};{744;943;988;100};"1 + 1 = 111";"1 + 1 = 111";{240;670;61;883};"1 + 1 = 111";{907;762;905;945};"1 + 1 = 111";"1 + 1 = 111";{305;240;620;156};"1 + 1 = 111";{425;411;655;893};{46;656;448;108};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{327;189;598;320};{317;419;33;16};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{682;323;392;238};{743;574;980;251};{332;107;193;710};"1 + 1 = 111";{53;627;573;357};{672;891;421;625};"1 + 1 = 111";{380;925;799;850};"1 + 1 = 111";{550;572;801;380};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{115;693;580;529};"1 + 1 = 111";"1 + 1 = 111";{757;233;690;693};"1 + 1 = 111";"1 + 1 = 111";{775;373;970;136};"1 + 1 = 111";{634;702;921;645};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{93;216;890;535};"1 + 1 = 111";{504;398;13;926};{687;211;848;829};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{825;568;218;591};{904;299;364;726};"1 + 1 = 111";{566;850;372;853};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{933;383;520;335};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{423;882;681;509};"1 + 1 = 111";}then if(KateIsGod_lIIlllIIlIllIIIlI[#("QS")]<KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("e9YW")]])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("tAq")];end;else if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("OO")]]==KateIsGod_lIIlllIIlIllIIIlI[#("EE7O")])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("Nhy")];end;end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("Tv0cqIctC6Erv9xTe8K8b0kNLosgjQgOksiBDihA8svJhvptCKEzrN03lmCbo6jVZZgd06p61kaSELGp99OKlS")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("HDpoqQfkbjKUromDGuIIhMhzLRmcpsKKgDKLLS9pV98J30naWGipNkp4u0NJEd5TJaNZPM2YusWhOJGUElp")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("kt66mPqUeAWRdp92nyvkOt4uyhqVu3frYlJoeQM9viT5HedyJNHfZff0ALIeyFzltE32QUYHVvYFK9Ytd")then local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI[#("SI")]local KateIsGod_IIIlIIllIIIlIIIlII,KateIsGod_lIllIIIIl=KateIsGod_lIIlIIIlIlllIl(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI+1]))KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_lIllIIIIl+KateIsGod_lIIlllIIlIllIIIlI-1 local KateIsGod_lIllIIIIl=0;for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_IllIllIIIlllIllIlIIlIIII do KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI==#("lSvaCTgTZDiHM0TILcllSZY9tDqKpAXoaFtRZtbkV75vznU8WczVi2kx3vQ8CGEzP3HgHbTqaaBU3CLfTs")then do return KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("NJ")]]end else local KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("65")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIllIIIIl](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_lIllIIIIl+1,KateIsGod_lIIlllIIlIllIIIlI[#("itQ")]))end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("nbbgiu6XDNdSoEGQFROBUshUhBADCVLpjSpyNXyWLoqN7rlqxVfyf2d43r8S4DvScXJHnidSt10GbFX0pjgQ")then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("hS")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";}]]-KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("f5UV")]];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("mkrPvEvYQ2h2JLjTOdnSydncI3zEiCVxQcZNr22PR4O9SND4NhLf27rj7pgCf1QnhVmGVHBWlJbEzot4AF1b0")then local KateIsGod_lIlIllIllllIIIIlllI;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("gY")]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("m8o")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("8C")];KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("5iB")]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]=KateIsGod_lIlIllIllllIIIIlllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("ad18")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{"1 + 1 = 111";"1 + 1 = 111";}]]=KateIsGod_lIIlllIIlIllIIIlI[#("Onx")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("Us")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("nbx")]))KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{{461;986;518;995};"1 + 1 = 111";}]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("kKA")]][KateIsGod_lIIlllIIlIllIIIlI[#("7Dg1")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("y8")];KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#{{498;633;143;665};{48;966;69;631};"1 + 1 = 111";}]];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1]=KateIsGod_lIlIllIllllIIIIlllI;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_lIlIllIllllIIIIlllI[KateIsGod_lIIlllIIlIllIIIlI[#("AH76")]];else local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI[#("x5")]local KateIsGod_IIIlIIllIIIlIIIlII,KateIsGod_lIllIIIIl=KateIsGod_lIIlIIIlIlllIl(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI+1]))KateIsGod_IllIllIIIlllIllIlIIlIIII=KateIsGod_lIllIIIIl+KateIsGod_lIIlllIIlIllIIIlI-1 local KateIsGod_lIllIIIIl=0;for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_lIIlllIIlIllIIIlI,KateIsGod_IllIllIIIlllIllIlIIlIIII do KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];end;end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("ETVQPbVAKZnB16B7ifQY3s6XUT5lcKaOxCqEUf1zbW9lp8xxEDvVvbWlW866gJx9ZKdAQ7mdoqXgtVIVvISKopsvQ")then if KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#{{517;293;1;827};{293;220;978;73};"1 + 1 = 111";{41;653;53;906};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{842;107;948;711};"1 + 1 = 111";{823;481;426;764};{308;906;417;702};{431;72;560;914};{998;216;503;43};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{164;340;489;682};"1 + 1 = 111";"1 + 1 = 111";{112;192;424;148};{661;463;564;269};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{385;876;683;330};{219;449;464;943};{173;859;328;326};"1 + 1 = 111";"1 + 1 = 111";{71;770;719;156};{241;284;986;492};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{439;859;996;726};"1 + 1 = 111";{620;634;324;831};"1 + 1 = 111";{58;458;71;912};"1 + 1 = 111";"1 + 1 = 111";{31;699;808;508};{328;278;499;508};"1 + 1 = 111";{878;602;972;336};"1 + 1 = 111";"1 + 1 = 111";{715;348;227;859};{745;39;238;781};"1 + 1 = 111";"1 + 1 = 111";{580;430;734;299};"1 + 1 = 111";{988;341;258;531};"1 + 1 = 111";{775;516;975;522};"1 + 1 = 111";{81;980;378;753};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{955;184;338;59};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{562;159;327;388};"1 + 1 = 111";{9;551;76;610};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{491;262;711;334};{431;318;555;983};"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";"1 + 1 = 111";{649;272;394;235};{424;956;839;179};"1 + 1 = 111";{61;432;376;941};{827;368;652;432};{303;367;859;19};"1 + 1 = 111";}then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Tr")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("kqY")]]-KateIsGod_lIIlllIIlIllIIIlI[#("JApK")];elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("xLd69nUfeLCMmU3EJGhodPcYNid4iB6yNETQWCm3h2EbfT86Wapt4vPSIpt0k07NOe8TbnRgtnglkaS3kghhkNDq")then local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_lIIlllIIlIllIIIlI[#("O3")];local KateIsGod_IIlllIIIllIlIIIIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#("urYm")];local KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_IIIlIIllIIIlIIIlII+2 local KateIsGod_IIIlIIllIIIlIIIlII={KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIlIIllIIIlIIIlII+1],KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI])};for KateIsGod_lIIlllIIlIllIIIlI=1,KateIsGod_IIlllIIIllIlIIIIIIIl do KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+KateIsGod_lIIlllIIlIllIIIlI]=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIIlllIIlIllIIIlI];end;local KateIsGod_IIIlIIllIIIlIIIlII=KateIsGod_IIIlIIllIIIlIIIlII[1]if KateIsGod_IIIlIIllIIIlIIIlII then KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI]=KateIsGod_IIIlIIllIIIlIIIlII KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#{{817;769;659;258};{168;926;517;336};"1 + 1 = 111";}];else KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;end;else KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Fn")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Pis")]]-KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("QRVS")]];end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI<=#("bhGhvTr40xbVo5JsiaQpDHIHBQdSZDbLS49fk97FZquNRi6kJZcMWbuFK9RQQKfyvAct5EhjdlBml4ZrT2i9BzZQJF")then local KateIsGod_lIlIllIllllIIIIlllI;local KateIsGod_IIIIIlIlllIIlIlIlIIllI;KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("Al")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_IIlllIIIllIlIIIIIIIl(KateIsGod_lIIIlIIIIIlIlI,KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("3Mm")]))KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Y4")]]=KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("8jJ")]];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("sR")]]=KateIsGod_lIIlllIIlIllIIIlI[#("Ukn")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("qt")]KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI](KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI+1])KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("88")]]={};KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("l1")]]=KateIsGod_lIIlllIIlIllIIIlI[#("6U0")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("CJ")]]=KateIsGod_lIIlllIIlIllIIIlI[#("0gq")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("qU")]]=KateIsGod_lIIlllIIlIllIIIlI[#("y7R")];KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIlIIllIIIlIIIlII[KateIsGod_lIllIIIIl];KateIsGod_IIIIIlIlllIIlIlIlIIllI=KateIsGod_lIIlllIIlIllIIIlI[#("Dx")];KateIsGod_lIlIllIllllIIIIlllI=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_IIIIIlIlllIIlIlIlIIllI];for KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_IIIIIlIlllIIlIlIlIIllI+1,KateIsGod_lIIlllIIlIllIIIlI[#("uzt")]do KateIsGod_IIlIIllllIIlll(KateIsGod_lIlIllIllllIIIIlllI,KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI])end;elseif KateIsGod_IIIIIlIlllIIlIlIlIIllI>#("lrqZol6rrfMpfR2JLLisPjz7XBf76LxUB862WxlaoNHmhNdsI0nfBlZb2tbYf9vRS1YhVaXnzhdcNmZkxXzgxqtoi59")then KateIsGod_llIlllIlI[KateIsGod_lIIlllIIlIllIIIlI[#("aeI")]]=KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("Wu")]];else if(KateIsGod_lIIIlIIIIIlIlI[KateIsGod_lIIlllIIlIllIIIlI[#("nZ")]]==KateIsGod_lIIlllIIlIllIIIlI[#("fZmF")])then KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;else KateIsGod_lIllIIIIl=KateIsGod_lIIlllIIlIllIIIlI[#{{614;375;328;207};{322;701;166;689};{708;763;531;407};}];end;end;KateIsGod_lIllIIIIl=KateIsGod_lIllIIIIl+1;end;end;A,B=KateIsGod_lllIIIIlIl(KateIsGod_IllllIllIIIIIIlIII(KateIsGod_llIIIlIllI))if not A[1]then local KateIsGod_lIIlllIIlIllIIIlI=KateIsGod_llIlIIIlIIIll[4][KateIsGod_lIllIIIIl]or'?';error('ERROR IN IRONBREW SCRIPT [LINE '..KateIsGod_lIIlllIIlIllIIIlI..']:'..A[2]);wait(9e9);else return KateIsGod_IIlllIIIllIlIIIIIIIl(A,2,B);end;end);end;return KateIsGod_IIIlIIIlllIlIIllII(true,{},KateIsGod_llIIIlIllI())();end)(string.byte,table.insert,setmetatable);
local rules = require "scripts.rules" local animations = require "character.animations" local Priestess = require "character.priestess" local ObstaclePerson = Priestess:new() function ObstaclePerson:new(o, control) o = o or Priestess:new(o, control) setmetatable(o, self) self.__index = self return o end function ObstaclePerson:create() Priestess.create(self) end function ObstaclePerson:on_interact(interactor_name) local dialogue = { start = { text = "Yes, how can I help?", options = { { text = "Please, excuse me.", go_to = 'excuse' }, { text = "I want to go to the training grounds.", go_to = 'want' }, } }, excuse = { text = "Oh, don't mind me, sweetie.", go_to = 'end', callback = function() self.control.data.you_are_in_the_way = true end }, want = { text = "Yes, this is the place.", go_to = 'end' } } if self.control.data.you_are_in_the_way then table.insert(dialogue.start.options, { text = "You are in the way.", go_to = 'in_the_way' }) dialogue.in_the_way = { text = "Oh, of course. Yes, you are absolutely right. Now, I have a tip for you. If someone is in your way, hold A and you can pass through without bothering them.", go_to = 'end', callback = function() self.control.data.learned_how_to_pass = true end } end if self.control.data.learned_how_to_pass then dialogue.start = { text = "Hold A and you can pass through anyone that stands in your way.", go_to = 'end' } end self:add_invitation_procedure(dialogue) sfml_dialogue(dialogue) end return ObstaclePerson
local PrVeh = "prop_vehicle_jeep" local Cat = "TDM Cars" local V = { Name = "Alfa Romeo Giulietta", Class = PrVeh, Category = Cat, Author = "TheDanishMaster, Turn 10", Information = "A drivable Alfa Romeo Giulietta by TheDanishMaster", Model = "models/tdmcars/alfa_giulietta.mdl", KeyValues = { vehiclescript = "scripts/vehicles/TDMCars/alfa_giulietta.txt" } } list.Set("Vehicles", "alfa_giuliettatdm", V) local V = { Name = "Alfa Romeo 33 Stradale", Class = PrVeh, Category = Cat, Author = "TheDanishMaster, Turn 10", Information = "A drivable Alfa Romeo 33 Stradale by TheDanishMaster", Model = "models/tdmcars/alfa_stradale.mdl", KeyValues = { vehiclescript = "scripts/vehicles/TDMCars/alfa_stradale.txt" } } list.Set("Vehicles", "alfa_stradaletdm", V)
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Spawned Money" ENT.Author = "FPtje" ENT.Spawnable = false ENT.IsSpawnedMoney = true function ENT:SetupDataTables() self:NetworkVar("Int",0,"amount") end FrenchRP.hookStub{ name = "playerPickedUpMoney", description = "Called when a player picked up money.", parameters = { { name = "player", description = "The player who picked up the money.", type = "Player" }, { name = "amount", description = "The amount of money picked up.", type = "number" } }, returns = { }, realm = "Server" }
admins = { "{{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}" } VirtualHost "{{ .Env.XMPP_DOMAIN }}" authentication = "anonymous" ssl = { key = "/config/certs/{{ .Env.XMPP_DOMAIN }}.key"; certificate = "/config/certs/{{ .Env.XMPP_DOMAIN }}.crt"; } modules_enabled = { "bosh"; "pubsub"; "ping"; } c2s_require_encryption = false VirtualHost "{{ .Env.XMPP_AUTH_DOMAIN }}" ssl = { key = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.key"; certificate = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.crt"; } authentication = "internal_plain" Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc" storage = "none" Component "jitsi-videobridge.{{ .Env.XMPP_DOMAIN }}" component_secret = "{{ .Env.JVB_COMPONENT_SECRET }}" Component "focus.{{ .Env.XMPP_DOMAIN }}" component_secret = "{{ .Env.JICOFO_COMPONENT_SECRET }}"
local RainingID, PooingID, PeeingID, SpellID = nil, nil, nil, nil local Throttles = {} function Throttled(name, time) if not Throttles[name] then Throttles[name] = true Citizen.SetTimeout(time or 500, function() Throttles[name] = false end) return false end return true end function GetRandomString(lenght) local chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' local randomString, stringLenght = '', lenght or 10 local charTable = {} for char in chars:gmatch"." do table.insert(charTable, char) end for i = 1, stringLenght do randomString = randomString .. charTable[math.random(1, #charTable)] end return randomString end function MakeItRain() if Throttled("fx:money", 1000) then return end TriggerEvent("animation:PlayAnimation","makeitrain") RainingID = GetRandomString(12) TriggerServerEvent("fx:money:start", RainingID) end function MakeItStop() if RainingID == nil then return end TriggerEvent("animation:PlayAnimation","cancel") TriggerServerEvent("fx:money:stop", RainingID) RainingID = nil end function MakeItPoo() if Throttled("fx:money", 1000) then return end TriggerEvent("animation:PlayAnimation","shit") PooingID = GetRandomString(12) TriggerServerEvent("fx:poo:start", PooingID) end function MakeItStopPoo() if PooingID == nil then return end TriggerEvent("animation:PlayAnimation","cancel") TriggerServerEvent("fx:poo:stop", PooingID) PooingID = nil end function MakeItPee() if Throttled("fx:money", 1000) then return end TriggerEvent("animation:PlayAnimation","pee") PeeingID = GetRandomString(12) TriggerServerEvent("fx:pee:start", PeeingID) end function MakeItStopPee() if PeeingID == nil then return end TriggerEvent("animation:PlayAnimation","cancel") TriggerServerEvent("fx:pee:stop", PeeingID) PeeingID = nil end RegisterCommand("+makeItPoo", MakeItPoo, false) RegisterCommand("-makeItPoo", MakeItStopPoo, false) RegisterCommand("+makeItPee", MakeItPee, false) RegisterCommand("-makeItPee", MakeItStopPee, false) RegisterCommand("+makeItRain", MakeItRain, false) RegisterCommand("-makeItRain", MakeItStop, false)
ITEM.Name = 'Headcrab Hat' ITEM.Price = 100 ITEM.Model = 'models/headcrabclassic.mdl' ITEM.Attachment = 'eyes' ITEM.AdminOnly = true function ITEM:OnEquip(ply, modifications) ply:PS_AddClientsideModel(self.ID) end function ITEM:OnHolster(ply) ply:PS_RemoveClientsideModel(self.ID) end function ITEM:ModifyClientsideModel(ply, model, pos, ang) model:SetModelScale(0.7, 0) pos = pos + (ang:Forward() * 2) ang:RotateAroundAxis(ang:Right(), 20) return model, pos, ang end
--[[ Copyright (C) 2014-2017 - Eloi Carbo 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/>. --]] require("luci.sys") local http = require "luci.http" local uci = luci.model.uci.cursor() -- Repeated Strings local common_string = "Valid options are:<br />" .. "1. all (All the routes)<br />" .. "2. none (No routes)<br />" .. "3. filter <b>Your_Filter_Name</b> (Call a specific filter from any of the available in the filters files)" local imp_string = "Set if the protocol must import routes.<br />" .. common_string local exp_string = "Set if the protocol must export routes.<br />" .. common_string m=Map("bird6", "Bird6 BGP protocol's configuration") tab_templates = {} uci:foreach('bird6', 'bgp_template', function (s) local name = s[".name"] if (name ~= nil) then table.insert(tab_templates, name) end end) -- -- BGP TEMPLATES -- sect_templates = m:section(TypedSection, "bgp_template", "BGP Templates", "Configuration of the templates used in BGP instances.") sect_templates.addremove = true sect_templates.anonymous = false disabled = sect_templates:option(Flag, "disabled", "Disabled", "Enable/Disable BGP Protocol") disabled.optional=true description = sect_templates:option(TextValue, "description", "Description", "Description of the current BGP instance") description.optional = true table = sect_templates:option(ListValue, "table", "Table", "Set the table used for BGP Routing") table.optional=true uci:foreach("bird6", "table", function (s) table:value(s.name) end) table:value("") table.default = "" igp_table = sect_templates:option(ListValue, "igp_table", "IGP Table", "Select the IGP Routing Table to use. Hint: usually the same table as BGP.") igp_table.optional = true uci:foreach("bird6", "table", function(s) igp_table:value(s.name) end) igp_table:value("") igp_table.default = "" import = sect_templates:option(Value, "import", "Import", imp_string) import.optional=true export = sect_templates:option(Value, "export", "Export", exp_string) export.optional=true source_addr = sect_templates:option(Value, "source_address", "Source Address", "Source address for BGP routing. By default uses Router ID") source_addr.optional = true local_address = sect_templates:option(Value, "local_address", "Local BGP address", "") local_address.optional = false local_as = sect_templates:option(Value, "local_as", "Local AS", "") local_as.optional = false next_hop_self = sect_templates:option(Flag, "next_hop_self", "Next hop self", "Avoid next hop calculation and advertise own source address as next hop") next_hop_self.default = nil next_hop_self.optional = true next_hop_keep = sect_templates:option(Flag, "next_hop_keep", "Next hop keep", "Forward the received Next Hop attribute event in situations where the local address should be used instead, like subneting") next_hop_keep.default = nil next_hop_keep.optional = true rr_client = sect_templates:option(Flag, "rr_client", "Route Reflector server", "This router serves as a Route Reflector server and treats neighbors as clients") rr_client.default = nil rr_client.optional = true rr_cluster_id = sect_templates:option(Value, "rr_cluster_id", "Route Reflector Cluster ID", "Identificator of the RR cluster. By default uses the Router ID") rr_cluster_id.optional = true import_trigger = sect_templates:option(Flag, "import_trigger", "Import Limit", "Enable Routes Import limit settings") import_trigger.default = 0 import_trigger.rmempty = false import_trigger.optional = false import_limit = sect_templates:option(Value, "import_limit", "Routes import limit", "Specify an import route limit.") import_limit:depends({import_trigger = "1"}) import_limit.rmempty = true import_limit_action = sect_templates:option(ListValue, "import_limit_action", "Routes import limit action", "Action to take when import routes limit ir reached") import_limit_action:depends({import_trigger = "1"}) import_limit_action:value("warn") import_limit_action:value("block") import_limit_action:value("disable") import_limit_action:value("restart") import_limit_action.default = "warn" import_limit_action.rmempty = true export_trigger = sect_templates:option(Flag, "export_trigger", "Export Limit", "Enable Routes Export limit settings") export_trigger.default = 0 export_trigger.rmempty = false export_trigger.optional = false export_limit = sect_templates:option(Value, "export_limit", "Routes export limit", "Specify an export route limit.") export_limit:depends({export_trigger = "1"}) export_limit.rmempty = true export_limit_action = sect_templates:option(ListValue, "export_limit_action", "Routes export limit action", "Action to take when export routes limit is reached") export_limit_action:depends({export_trigger = "1"}) export_limit_action.rmempty = true export_limit_action:value("warn") export_limit_action:value("block") export_limit_action:value("disable") export_limit_action:value("restart") export_limit_action.default = "warn" receive_trigger = sect_templates:option(Flag, "receive_trigger", "Received Limit", "Enable Routes Received Limit settings") receive_trigger.default = 0 receive_trigger.rmempty = false receive_trigger.optional = false receive_limit = sect_templates:option(Value, "receive_limit", "Routes received limit", "Specify a received route limit.") receive_limit:depends({receive_trigger = "1"}) receive_limit.rmempty = true receive_limit_action = sect_templates:option(ListValue, "receive_limit_action", "Routes received limit action", "Action to take when received routes limit is reached") receive_limit_action:depends({receive_trigger = "1"}) receive_limit_action:value("warn") receive_limit_action:value("block") receive_limit_action:value("disable") receive_limit_action:value("restart") receive_limit_action.default = "warn" receive_limit_action.rmempty= true -- -- BGP INSTANCES -- sect_instances = m:section(TypedSection, "bgp", "BGP Instances", "Configuration of the BGP protocol instances") sect_instances.addremove = true sect_instances.anonymous = false templates = sect_instances:option(ListValue, "template", "Templates", "Available BGP templates") uci:foreach("bird6", "bgp_template", function(s) templates:value(s[".name"]) end) templates:value("") disabled = sect_instances:option(Flag, "disabled", "Disabled", "Enable/Disable BGP Protocol") disabled.optional = false disabled.rmempty = false disabled.default = nil description = sect_instances:option(TextValue, "description", "Description", "Description of the current BGP instance") description.optional = true table = sect_instances:option(ListValue, "table", "Table", "Set the table used for BGP Routing") table.optional=true uci:foreach("bird6", "table", function (s) table:value(s.name) end) table:value("") table.default = "" igp_table = sect_instances:option(ListValue, "igp_table", "IGP Table", "Select the IGP Routing Table to use. Hint: usually the same table as BGP.") igp_table.optional = true uci:foreach("bird6", "table", function(s) igp_table:value(s.name) end) igp_table:value("") igp_table.default = "" import = sect_instances:option(Value, "import", "Import", imp_string) import.optional=true export = sect_instances:option(Value, "export", "Export", exp_string) export.optional=true source_address = sect_instances:option(Value, "source_address", "Source Address", "Source address for BGP routing. By default uses Router ID") source_address.optional = true local_address = sect_instances:option(Value, "local_address", "Local BGP address", "") local_address.optional=true local_as = sect_instances:option(Value, "local_as", "Local AS", "") local_as.optional=true neighbor_address = sect_instances:option(Value, "neighbor_address", "Neighbor IP Address", "") neighbor_address.optional = false neighbor_as = sect_instances:option(Value, "neighbor_as", "Neighbor AS", "") neighbor_as.optional = false next_hop_self = sect_instances:option(Flag, "next_hop_self", "Next hop self", "Avoid next hop calculation and advertise own source address as next hop") next_hop_self.default = nil next_hop_self.optional = true next_hop_keep = sect_instances:option(Flag, "next_hop_keep", "Next hop keep", "Forward the received Next Hop attribute event in situations where the local address should be used instead, like subneting") next_hop_keep.default = nil next_hop_keep.optional = true rr_client = sect_instances:option(Flag, "rr_client", "Route Reflector server", "This router serves as a Route Reflector server and treats neighbors as clients") rr_client.default = nil rr_client.optional = true rr_cluster_id = sect_instances:option(Value, "rr_cluster_id", "Route Reflector Cluster ID", "Identificator of the RR cluster. By default uses the Router ID") rr_cluster_id.optional = true import_trigger = sect_instances:option(Flag, "import_trigger", "Import Limit", "Enable Routes Import limit settings") import_trigger.default = 0 import_trigger.rmempty = false import_trigger.optional = false import_limit = sect_instances:option(Value, "import_limit", "Routes import limit", "Specify an import route limit.") import_limit:depends({import_trigger = "1"}) import_limit.rmempty = true import_limit_action = sect_instances:option(ListValue, "import_limit_action", "Routes import limit action", "Action to take when import routes limit ir reached") import_limit_action:depends({import_trigger = "1"}) import_limit_action:value("warn") import_limit_action:value("block") import_limit_action:value("disable") import_limit_action:value("restart") import_limit_action.default = "warn" import_limit_action.rmempty = true export_trigger = sect_instances:option(Flag, "export_trigger", "Export Limit", "Enable Routes Export limit settings") export_trigger.default = 0 export_trigger.rmempty = false export_trigger.optional = false export_limit = sect_instances:option(Value, "export_limit", "Routes export limit", "Specify an export route limit.") export_limit:depends({export_trigger = "1"}) export_limit.rmempty = true export_limit_action = sect_instances:option(ListValue, "export_limit_action", "Routes export limit action", "Action to take when export routes limit is reached") export_limit_action:depends({export_trigger = "1"}) export_limit_action.rmempty = true export_limit_action:value("warn") export_limit_action:value("block") export_limit_action:value("disable") export_limit_action:value("restart") export_limit_action.default = "warn" receive_trigger = sect_instances:option(Flag, "receive_trigger", "Received Limit", "Enable Routes Received Limit settings") receive_trigger.default = 0 receive_trigger.rmempty = false receive_trigger.optional = false receive_limit = sect_instances:option(Value, "receive_limit", "Routes received limit", "Specify a received route limit.") receive_limit:depends({receive_trigger = "1"}) receive_limit.rmempty = true receive_limit_action = sect_instances:option(ListValue, "receive_limit_action", "Routes received limit action", "Action to take when received routes limit is reached") receive_limit_action:depends({receive_trigger = "1"}) receive_limit_action:value("warn") receive_limit_action:value("block") receive_limit_action:value("disable") receive_limit_action:value("restart") receive_limit_action.default = "warn" receive_limit_action.rmempty= true function m.on_commit(self,map) luci.sys.exec('/etc/init.d/bird6 restart') end return m
ESX = nil Citizen.CreateThread(function() while ESX == nil do TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) Citizen.Wait(0) end end) local playerPed = PlayerPedId(source) local plyCoords = GetOffsetFromEntityInWorldCoords(GetPlayerPed(PlayerId()), 0.0, 0.0, -5.0) RegisterNetEvent('esx_headphone:place_headphone') AddEventHandler('esx_headphone:place_headphone', function(source) setheadphone(source) end) RegisterNetEvent('esx_headphone:play') AddEventHandler('esx_headphone:play', function(source) OpenMenu() end) ------------------------------------ local menuOpen = false function OpenMenu() menuOpen = true ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'Headphone', { title = 'HeadPhone Menu', align = 'top-left', elements = { {label = ('Play Your Music'), value = 'play'}, {label = ('Stop Music'), value = 'stop'}, {label = ('Close Menu'), value = 'close'} } }, function(data, menu) if data.current.value == 'play' then play() elseif data.current.value == 'close' then menu.close() elseif data.current.value == 'stop' then SendNUIMessage({ transactionType = 'stopSound' }) end end) end function play() ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'play', { title = ('play'), }, function(data, menu) TriggerServerEvent('esx_amin:play_musics', data.value) menu.close() end, function(data, menu) menu.close() end) end RegisterNetEvent('esx_headphone:playss') AddEventHandler('esx_headphone:playss', function(id) local playerPed = PlayerPedId() local coords = GetEntityCoords(playerPed) local objCoords = GetEntityCoords(object) local distance = GetDistanceBetweenCoords(coords, coords, true) if distance < Config.distance then SendNUIMessage({ transactionType = 'playSound', transactionData = id }) Citizen.CreateThread(function() while true do Citizen.Wait(100) if distance > Config.distance then SendNUIMessage({ transactionType = 'stopSound' }) break end end end) end end) function distance(object) local playerPed = PlayerPedId() local lCoords = GetEntityCoords(playerPed) local distance = GetDistanceBetweenCoords(lCoords, object, true) return distance end function setheadphone(source) TriggerEvent('skinchanger:getSkin', function(skin) if tonumber(skin.sex) == 0 then if Config.Uniforms.male ~= nil then TriggerEvent('skinchanger:loadClothes', skin, Config.Uniforms.male) else ESX.ShowNotification(('no_outfit')) end elseif tonumber(skin.sex) == 1 then if Config.Uniforms.male ~= nil then TriggerEvent('skinchanger:loadClothes', skin, Config.Uniforms.male) else ESX.ShowNotification(('no_outfit')) end end end) end
-- Ball local ball = {} ball.position_x = 300 ball.position_y = 300 ball.speed_x = 300 ball.speed_y = 300 ball.radius = 10 function ball.update( dt ) ball.position_x = ball.position_x + ball.speed_x * dt ball.position_y = ball.position_y + ball.speed_y * dt end function ball.draw() local segments_in_circle = 16 love.graphics.circle( 'line', ball.position_x, ball.position_y, ball.radius, segments_in_circle ) end -- Platform local platform = {} platform.position_x = 500 platform.position_y = 500 platform.speed_x = 300 platform.width = 70 platform.height = 20 function platform.update( dt ) if love.keyboard.isDown("right") then platform.position_x = platform.position_x + (platform.speed_x * dt) end if love.keyboard.isDown("left") then platform.position_x = platform.position_x - (platform.speed_x * dt) end end function platform.draw() love.graphics.rectangle( 'line', platform.position_x, platform.position_y, platform.width, platform.height ) end -- Bricks local bricks = {} bricks.brick_width = 50 bricks.brick_height = 30 bricks.current_level_bricks = {} function bricks.new_brick( position_x, position_y, width, height ) return( { position_x = position_x, position_y = position_y, width = width or bricks.brick_width, height = height or bricks.brick_height } ) end function bricks.add_to_current_level_bricks( brick ) table.insert( bricks.current_level_bricks, brick ) end function bricks.update_brick( single_brick ) end function bricks.draw_brick( single_brick ) love.graphics.rectangle( 'line', single_brick.position_x, single_brick.position_y, single_brick.width, single_brick.height ) end function bricks.update( dt ) for _, brick in pairs( bricks.current_level_bricks ) do bricks.update_brick( brick ) end end function bricks.draw() for _, brick in pairs( bricks.current_level_bricks ) do bricks.draw_brick( brick ) end end function love.load() bricks.add_to_current_level_bricks( bricks.new_brick( 100, 100 )) bricks.add_to_current_level_bricks( bricks.new_brick( 160, 100 )) bricks.add_to_current_level_bricks( bricks.new_brick( 220, 100 )) bricks.add_to_current_level_bricks( bricks.new_brick( 280, 145 )) bricks.add_to_current_level_bricks( bricks.new_brick( 340, 145 )) end function love.update( dt ) ball.update( dt ) platform.update( dt ) bricks.update( dt ) end function love.draw() ball.draw() platform.draw() bricks.draw() end function love.quit() print("Thanks for playing! Come back soon!") end
-- Copyright 2006-2012 Mitchell mitchell.att.foicica.com. See LICENSE. -- VHDL LPeg lexer. local l = lexer local token, style, color, word_match = l.token, l.style, l.color, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'vhdl'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Comments. local comment = token(l.COMMENT, '--' * l.nonnewline^0) -- Strings. local sq_str = l.delimited_range("'", nil, true, false, '\n') local dq_str = l.delimited_range('"', '\\', true, false, '\n') local string = token(l.STRING, sq_str + dq_str) -- Numbers. local number = token(l.NUMBER, l.float + l.integer) -- Keywords. local keyword = token(l.KEYWORD, word_match{ 'access', 'after', 'alias', 'all', 'architecture', 'array', 'assert', 'attribute', 'begin', 'block', 'body', 'buffer', 'bus', 'case', 'component', 'configuration', 'constant', 'disconnect', 'downto', 'else', 'elsif', 'end', 'entity', 'exit', 'file', 'for', 'function', 'generate', 'generic', 'group', 'guarded', 'if', 'impure', 'in', 'inertial', 'inout', 'is', 'label', 'library', 'linkage', 'literal', 'loop', 'map', 'new', 'next', 'null', 'of', 'on', 'open', 'others', 'out', 'package', 'port', 'postponed', 'procedure', 'process', 'pure', 'range', 'record', 'register', 'reject', 'report', 'return', 'select', 'severity', 'signal', 'shared', 'subtype', 'then', 'to', 'transport', 'type', 'unaffected', 'units', 'until', 'use', 'variable', 'wait', 'when', 'while', 'with', 'note', 'warning', 'error', 'failure', 'and', 'nand', 'or', 'nor', 'xor', 'xnor', 'rol', 'ror', 'sla', 'sll', 'sra', 'srl', 'mod', 'rem', 'abs', 'not', 'false', 'true' }) -- Functions. local func = token(l.FUNCTION, word_match{ 'rising_edge', 'shift_left', 'shift_right', 'rotate_left', 'rotate_right', 'resize', 'std_match', 'to_integer', 'to_unsigned', 'to_signed', 'unsigned', 'signed', 'to_bit', 'to_bitvector', 'to_stdulogic', 'to_stdlogicvector', 'to_stdulogicvector' }) -- Types. local type = token(l.TYPE, word_match{ 'bit', 'bit_vector', 'character', 'boolean', 'integer', 'real', 'time', 'string', 'severity_level', 'positive', 'natural', 'signed', 'unsigned', 'line', 'text', 'std_logic', 'std_logic_vector', 'std_ulogic', 'std_ulogic_vector', 'qsim_state', 'qsim_state_vector', 'qsim_12state', 'qsim_12state_vector', 'qsim_strength', 'mux_bit', 'mux_vectory', 'reg_bit', 'reg_vector', 'wor_bit', 'wor_vector' }) -- Constants. local constant = token(l.CONSTANT, word_match{ 'EVENT', 'BASE', 'LEFT', 'RIGHT', 'LOW', 'HIGH', 'ASCENDING', 'IMAGE', 'VALUE', 'POS', 'VAL', 'SUCC', 'VAL', 'POS', 'PRED', 'VAL', 'POS', 'LEFTOF', 'RIGHTOF', 'LEFT', 'RIGHT', 'LOW', 'HIGH', 'RANGE', 'REVERSE', 'LENGTH', 'ASCENDING', 'DELAYED', 'STABLE', 'QUIET', 'TRANSACTION', 'EVENT', 'ACTIVE', 'LAST', 'LAST', 'LAST', 'DRIVING', 'DRIVING', 'SIMPLE', 'INSTANCE', 'PATH' }) -- Identifiers. local word = (l.alpha + "'") * (l.alnum + "_" + "'")^1 local identifier = token(l.IDENTIFIER, word) -- Operators. local operator = token(l.OPERATOR, S('=/!:;<>+-/*%&|^~()')) M._rules = { {'whitespace', ws}, {'keyword', keyword}, {'function', func}, {'type', type}, {'constant', constant}, {'identifier', identifier}, {'string', string}, {'comment', comment}, {'number', number}, {'operator', operator}, {'any_char', l.any_char}, } return M
local _E local hook local function update(item) if (not EncounterJournal:IsVisible() or not item) then return end SyLevel:CallFilters("adventureguide", item.lootFrame.icon, _E and item.link) end local function doHook() if (not hook) then hook = function(...) if (_E) then return update(...) end end hooksecurefunc("EncounterJournal_SetLootButton", update) end end local function ADDON_LOADED(self, event, addon) if (addon == "Blizzard_EncounterJournal") then doHook() SyLevel:UnregisterEvent("ADDON_LOADED", ADDON_LOADED) end end local function enable(self) _E = true if IsAddOnLoaded("Blizzard_EncounterJournal") then doHook() else SyLevel:RegisterEvent("ADDON_LOADED", ADDON_LOADED) end end local function disable(self) _E = nil end SyLevel:RegisterPipe("adventureguide", enable, disable, update, "AdventureGuide", nil)
function fps.OnInit() end function fps.OnEnable() end function fps.Update(dt) this.GameObject:GetTextComponent().Text = "FPS: " .. Time.FPS(); end function fps.OnDisable() end function fps.OnDestroy() end
local skynet = require "skynet" local dns = require "skynet.dns" skynet.start(function ( ) -- 设置dns服务器地址 skynet.error('nameserver: ', dns.server()) -- 调用成功,则把结果缓存到这个服务的内存中,便于下次使用 local ip, ips = dns.resolve("github.com") skynet.error("dns.resolve return ", ip) for k, v in ipairs(ips) do skynet.error("github.com ", v) end dns.flush() end)
local rs232 = require("luars232") local e, p = rs232.open("COM9") local font26,font12,font120 function love.load() if p then p:set_baud_rate(rs232.RS232_BAUD_115200) p:set_data_bits(rs232.RS232_DATA_8) p:set_parity(rs232.RS232_PARITY_NONE) p:set_stop_bits(rs232.RS232_STOP_1) p:set_flow_control(rs232.RS232_FLOW_OFF) end font26 = love.graphics.newFont( 26 ) font12 = love.graphics.newFont( 12 ) font120 = love.graphics.newFont( 120 ) end function round(num, idp) if idp and idp>0 then local mult = 10^idp return math.floor(num * mult + 0.5) / mult end return math.floor(num + 0.5) end local tab={} local dot_tab={} function printTab( tab ) local x,y=10,62 local dy=26 for k,v in ipairs(tab) do love.graphics.print(v, x, y+k*dy, 0) end end function drawDotTab( tab ) local dy=26 local x,y=0,0 love.graphics.setColor( 55, 255, 55, 170 ) for k,v in ipairs(tab) do local x1,y1=100+2*k,(1400-v)/2 if x>0 then love.graphics.line( x,y,x1,y1 ) end x,y=x1,y1 end end local t=0 local data_read="" local buffer="" local HBR,HB=0,0 local low={} local high={} local lowest=1024 local highest=1024 local flag=false function isHB() if high[2]-low[2]>100 and high[2]-high[3]>100 then return 1 else return 0 end end function hbr_calc(value) local ret=0 if flag==false then if value<lowest-10 then lowest = value elseif value>lowest+10 then table.insert(low,1,lowest) highest = 0 while #low>8 do table.remove(low) end flag=true end else if value>highest+10 then highest = value elseif value<highest-10 then table.insert(high,1,highest) lowest = 1024 while #high>8 do table.remove(high) ret=ret+isHB() end flag=false end end return ret end local hbr_buf="" function love.draw( dt ) love.graphics.setColor( 255, 255, 255, 150 ) love.graphics.setFont(font120) love.graphics.print("HBR:"..HBR, 500, 270, 0) love.graphics.setFont(font26) love.graphics.print("TEST", 10, 10, 0) love.graphics.print(t, 10, 36, 0) love.graphics.setFont(font12) love.graphics.print(hbr_buf, 500, 250, 0) printTab(tab) drawDotTab(dot_tab) -- love.graphics.print(low, 800, 6, 0) -- love.graphics.print(high, 800, 36, 0) end hbr_tab={} function calc_weight(tab) local sum=0 for i,v in ipairs(tab) do sum=sum+v.n end avr = sum/#tab for i=1,#tab do tab[i].p = math.pow(1-math.abs(tab[i].n-avr)/avr,3) if tab[i].p<0 or tab[i].p>1 then tab[i].p = 0 end end return tab end function love.update( dt ) t=t+dt if p then e, dataread, size = p:read(50,1) end if size and size>0 then buffer=buffer .. dataread for v in string.gmatch(buffer,"%w+:%d+,") do table.insert(tab, 1, v) n = tonumber(string.match(v,"%d+")) if hbr_calc(n)>0 then table.insert(hbr_tab, 1, {n=t,p=1}) while #hbr_tab>8 do table.remove(hbr_tab) end hbr_tab = calc_weight(hbr_tab) hbr_buf = hbr_tab[1].n .. " x " .. hbr_tab[1].p HBR = round( (1-hbr_tab[1].p)*HBR+hbr_tab[1].p*60/hbr_tab[1].n ,1) t=0 end table.insert(dot_tab,1,n) while #tab>22 do table.remove(tab) end while #dot_tab>650 do table.remove(dot_tab) end end a,b = string.find(buffer,",\n") while b and b>0 do buffer = string.sub(buffer, b) a,b = string.find(buffer,",\n") end end end
local ActIndex = { [ "pistol" ] = ACT_HL2MP_IDLE_PISTOL, [ "smg" ] = ACT_HL2MP_IDLE_SMG1, [ "grenade" ] = ACT_HL2MP_IDLE_GRENADE, [ "ar2" ] = ACT_HL2MP_IDLE_AR2, [ "shotgun" ] = ACT_HL2MP_IDLE_SHOTGUN, [ "rpg" ] = ACT_HL2MP_IDLE_RPG, [ "physgun" ] = ACT_HL2MP_IDLE_PHYSGUN, [ "crossbow" ] = ACT_HL2MP_IDLE_CROSSBOW, [ "melee" ] = ACT_HL2MP_IDLE_MELEE, [ "slam" ] = ACT_HL2MP_IDLE_SLAM, [ "normal" ] = ACT_HL2MP_IDLE, [ "fist" ] = ACT_HL2MP_IDLE_FIST, [ "melee2" ] = ACT_HL2MP_IDLE_MELEE2, [ "passive" ] = ACT_HL2MP_IDLE_PASSIVE, [ "knife" ] = ACT_HL2MP_IDLE_KNIFE, [ "duel" ] = ACT_HL2MP_IDLE_DUEL, [ "camera" ] = ACT_HL2MP_IDLE_CAMERA, [ "magic" ] = ACT_HL2MP_IDLE_MAGIC, [ "revolver" ] = ACT_HL2MP_IDLE_REVOLVER } --[[--------------------------------------------------------- Name: SetWeaponHoldType Desc: Sets up the translation table, to translate from normal standing idle pose, to holding weapon pose. -----------------------------------------------------------]] function SWEP:SetWeaponHoldType( t ) t = string.lower( t ) local index = ActIndex[ t ] if ( index == nil ) then Msg( "SWEP:SetWeaponHoldType - ActIndex[ \"" .. t .. "\" ] isn't set! (defaulting to normal)\n" ) t = "normal" index = ActIndex[ t ] end self.ActivityTranslate = {} self.ActivityTranslate[ ACT_MP_STAND_IDLE ] = index self.ActivityTranslate[ ACT_MP_WALK ] = index + 1 self.ActivityTranslate[ ACT_MP_RUN ] = index + 2 self.ActivityTranslate[ ACT_MP_CROUCH_IDLE ] = index + 3 self.ActivityTranslate[ ACT_MP_CROUCHWALK ] = index + 4 self.ActivityTranslate[ ACT_MP_ATTACK_STAND_PRIMARYFIRE ] = index + 5 self.ActivityTranslate[ ACT_MP_ATTACK_CROUCH_PRIMARYFIRE ] = index + 5 self.ActivityTranslate[ ACT_MP_RELOAD_STAND ] = index + 6 self.ActivityTranslate[ ACT_MP_RELOAD_CROUCH ] = index + 6 self.ActivityTranslate[ ACT_MP_JUMP ] = index + 7 self.ActivityTranslate[ ACT_RANGE_ATTACK1 ] = index + 8 self.ActivityTranslate[ ACT_MP_SWIM ] = index + 9 -- "normal" jump animation doesn't exist if ( t == "normal" ) then self.ActivityTranslate[ ACT_MP_JUMP ] = ACT_HL2MP_JUMP_SLAM end self:SetupWeaponHoldTypeForAI( t ) end -- Default hold pos is the pistol SWEP:SetWeaponHoldType( "pistol" ) --[[--------------------------------------------------------- Name: weapon:TranslateActivity() Desc: Translate a player's Activity into a weapon's activity So for example, ACT_HL2MP_RUN becomes ACT_HL2MP_RUN_PISTOL Depending on how you want the player to be holding the weapon -----------------------------------------------------------]] function SWEP:TranslateActivity( act ) if ( self.Owner:IsNPC() ) then if ( self.ActivityTranslateAI[ act ] ) then return self.ActivityTranslateAI[ act ] end return -1 end if ( self.ActivityTranslate[ act ] != nil ) then return self.ActivityTranslate[ act ] end return -1 end
local function swap(array, index1, index2) array[index1], array[index2] = array[index2], array[index1] end local function shuffle(array) local counter = #array while counter > 1 do local index = math.random(counter) swap(array, index, counter) counter = counter - 1 end end local api = { swap = swap, shuffle = shuffle, } table.swap = swap table.shuffle = shuffle return api
include "stdio" ffi.cdef [[ extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); typedef struct err_state_st { CRYPTO_THREADID tid; int err_flags[16]; unsigned long err_buffer[16]; char *err_data[16]; int err_data_flags[16]; const char *err_file[16]; int err_line[16]; int top,bottom; } ERR_STATE; typedef struct ERR_string_data_st { unsigned long error; const char *string; } ERR_STRING_DATA; void ERR_put_error(int lib, int func,int reason,const char *file,int line); void ERR_set_error_data(char *data,int flags); unsigned long ERR_get_error(void); unsigned long ERR_get_error_line(const char **file,int *line); unsigned long ERR_get_error_line_data(const char **file,int *line, const char **data, int *flags); unsigned long ERR_peek_error(void); unsigned long ERR_peek_error_line(const char **file,int *line); unsigned long ERR_peek_error_line_data(const char **file,int *line, const char **data,int *flags); unsigned long ERR_peek_last_error(void); unsigned long ERR_peek_last_error_line(const char **file,int *line); unsigned long ERR_peek_last_error_line_data(const char **file,int *line, const char **data,int *flags); void ERR_clear_error(void ); char *ERR_error_string(unsigned long e,char *buf); void ERR_error_string_n(unsigned long e, char *buf, size_t len); const char *ERR_lib_error_string(unsigned long e); const char *ERR_func_error_string(unsigned long e); const char *ERR_reason_error_string(unsigned long e); void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u); void ERR_print_errors_fp(FILE *fp); void ERR_print_errors(BIO *bp); void ERR_add_error_data(int num, ...); void ERR_add_error_vdata(int num, va_list args); void ERR_load_strings(int lib,ERR_STRING_DATA str[]); void ERR_unload_strings(int lib,ERR_STRING_DATA str[]); void ERR_load_ERR_strings(void); void ERR_load_crypto_strings(void); void ERR_free_strings(void); void ERR_remove_thread_state(const CRYPTO_THREADID *tid); void ERR_remove_state(unsigned long pid); ERR_STATE *ERR_get_state(void); struct lhash_st_ERR_STRING_DATA *ERR_get_string_table(void); struct lhash_st_ERR_STATE *ERR_get_err_state_table(void); void ERR_release_err_state_table(struct lhash_st_ERR_STATE **hash); int ERR_get_next_error_library(void); int ERR_set_mark(void); int ERR_pop_to_mark(void); const ERR_FNS *ERR_get_implementation(void); int ERR_set_implementation(const ERR_FNS *fns); ]]
local S, L, O, U, D, E = unpack(select(2, ...)); local Module = S:NewNameplateModule('HealthText'); -- Stripes API local ShortValue = U.ShortValue; local LargeNumberFormat = U.LargeNumberFormat; local UpdateFontObject = S:GetNameplateModule('Handler').UpdateFontObject; -- Local Config local ENABLED, HIDE_FULL, DISPLAY_MODE, SHOW_PCT_SIGN, PCT_SIGN, CUSTOM_COLOR_ENABLED, CUSTOM_COLOR; local TEXT_ANCHOR, TEXT_X_OFFSET, TEXT_Y_OFFSET; local BLOCK_1_TEXT_ANCHOR, BLOCK_1_TEXT_X_OFFSET, BLOCK_1_TEXT_Y_OFFSET, BLOCK_2_TEXT_ANCHOR, BLOCK_2_TEXT_X_OFFSET, BLOCK_2_TEXT_Y_OFFSET; local IS_DOUBLE, DISPLAY_MODE_BLOCK_1, DISPLAY_MODE_BLOCK_2; local SHOW_ONLY_ON_TARGET; local StripesHealthTextFont = CreateFont('StripesHealthTextFont'); local function Create(unitframe) if unitframe.HealthText then return; end local frame = CreateFrame('Frame', '$parentHealthText', unitframe.healthBar); frame:SetAllPoints(unitframe.healthBar); frame.text = frame:CreateFontString(nil, 'OVERLAY', 'StripesHealthTextFont'); frame.LeftText = frame:CreateFontString(nil, 'OVERLAY', 'StripesHealthTextFont'); frame.RightText = frame:CreateFontString(nil, 'OVERLAY', 'StripesHealthTextFont'); frame:SetShown(false); unitframe.HealthText = frame; end local UpdateHealthTextFormat = { [1] = function(unitframe, fontObject) fontObject:SetFormattedText(unitframe.data.healthPerF == 100 and ('%s %d' .. PCT_SIGN) or ('%s %.1f' .. PCT_SIGN) , ShortValue(unitframe.data.healthCurrent), unitframe.data.healthPerF) end, [2] = function(unitframe, fontObject) fontObject:SetFormattedText(unitframe.data.healthPerF == 100 and ('%s | %d' .. PCT_SIGN) or ('%s | %.1f' .. PCT_SIGN), ShortValue(unitframe.data.healthCurrent), unitframe.data.healthPerF); end, [3] = function(unitframe, fontObject) fontObject:SetFormattedText(unitframe.data.healthPerF == 100 and ('%s - %d' .. PCT_SIGN) or ('%s - %.1f' .. PCT_SIGN), ShortValue(unitframe.data.healthCurrent), unitframe.data.healthPerF); end, [4] = function(unitframe, fontObject) fontObject:SetFormattedText(unitframe.data.healthPerF == 100 and ('%s / %d' .. PCT_SIGN) or ('%s / %.1f' .. PCT_SIGN), ShortValue(unitframe.data.healthCurrent), unitframe.data.healthPerF); end, [5] = function(unitframe, fontObject) fontObject:SetFormattedText(unitframe.data.healthPerF == 100 and ('%s [%d' .. PCT_SIGN ..']') or ('%s [%.1f' .. PCT_SIGN .. ']'), ShortValue(unitframe.data.healthCurrent), unitframe.data.healthPerF); end, [6] = function(unitframe, fontObject) fontObject:SetFormattedText(unitframe.data.healthPerF == 100 and ('%s (%d' .. PCT_SIGN .. ')') or ('%s (%.1f' .. PCT_SIGN .. ')'), ShortValue(unitframe.data.healthCurrent), unitframe.data.healthPerF); end, [7] = function(unitframe, fontObject) fontObject:SetFormattedText('%s', ShortValue(unitframe.data.healthCurrent)); end, [8] = function(unitframe, fontObject) fontObject:SetFormattedText(unitframe.data.healthPerF == 100 and ('%d' .. PCT_SIGN) or ('%.1f' .. PCT_SIGN), unitframe.data.healthPerF); end, [9] = function(unitframe, fontObject) fontObject:SetText(unitframe.data.healthCurrent); end, [10] = function(unitframe, fontObject) fontObject:SetText(LargeNumberFormat(unitframe.data.healthCurrent)); end, }; local function Update(unitframe) if unitframe.data.unitType == 'SELF' or (SHOW_ONLY_ON_TARGET and not unitframe.data.isTarget) or (HIDE_FULL and unitframe.data.healthCurrent == unitframe.data.healthMax) then unitframe.HealthText.text:SetText(''); unitframe.HealthText.LeftText:SetText(''); unitframe.HealthText.RightText:SetText(''); else if IS_DOUBLE then UpdateHealthTextFormat[DISPLAY_MODE_BLOCK_1](unitframe, unitframe.HealthText.LeftText); UpdateHealthTextFormat[DISPLAY_MODE_BLOCK_2](unitframe, unitframe.HealthText.RightText); else UpdateHealthTextFormat[DISPLAY_MODE](unitframe, unitframe.HealthText.text); end end end local function UpdateShow(unitframe) unitframe.HealthText:SetShown((ENABLED and unitframe.data.unitType ~= 'SELF')); unitframe.HealthText.text:SetShown(not IS_DOUBLE); unitframe.HealthText.LeftText:SetShown(IS_DOUBLE); unitframe.HealthText.RightText:SetShown(IS_DOUBLE); end local function UpdateStyle(unitframe) unitframe.HealthText.text:ClearAllPoints(); unitframe.HealthText.LeftText:ClearAllPoints(); unitframe.HealthText.RightText:ClearAllPoints(); PixelUtil.SetPoint(unitframe.HealthText.text, TEXT_ANCHOR, unitframe.HealthText, TEXT_ANCHOR, TEXT_X_OFFSET, TEXT_Y_OFFSET); PixelUtil.SetPoint(unitframe.HealthText.LeftText, BLOCK_1_TEXT_ANCHOR, unitframe.HealthText, BLOCK_1_TEXT_ANCHOR, BLOCK_1_TEXT_X_OFFSET, BLOCK_1_TEXT_Y_OFFSET); PixelUtil.SetPoint(unitframe.HealthText.RightText, BLOCK_2_TEXT_ANCHOR, unitframe.HealthText, BLOCK_2_TEXT_ANCHOR, BLOCK_2_TEXT_X_OFFSET, BLOCK_2_TEXT_Y_OFFSET); if CUSTOM_COLOR_ENABLED then unitframe.HealthText.text:SetTextColor(CUSTOM_COLOR[1], CUSTOM_COLOR[2], CUSTOM_COLOR[3], CUSTOM_COLOR[4]); unitframe.HealthText.LeftText:SetTextColor(CUSTOM_COLOR[1], CUSTOM_COLOR[2], CUSTOM_COLOR[3], CUSTOM_COLOR[4]); unitframe.HealthText.RightText:SetTextColor(CUSTOM_COLOR[1], CUSTOM_COLOR[2], CUSTOM_COLOR[3], CUSTOM_COLOR[4]); else unitframe.HealthText.text:SetTextColor(1, 1, 1, 1); unitframe.HealthText.LeftText:SetTextColor(1, 1, 1, 1); unitframe.HealthText.RightText:SetTextColor(1, 1, 1, 1); end end function Module:UnitAdded(unitframe) Create(unitframe); Update(unitframe); UpdateShow(unitframe); UpdateStyle(unitframe); end function Module:UnitRemoved(unitframe) if unitframe.HealthText then unitframe.HealthText:SetShown(false); end end function Module:Update(unitframe) Update(unitframe); UpdateShow(unitframe); UpdateStyle(unitframe); end function Module:UpdateLocalConfig() ENABLED = O.db.health_text_enabled; HIDE_FULL = O.db.health_text_hide_full; DISPLAY_MODE = math.max(math.min(O.db.health_text_display_mode, #UpdateHealthTextFormat), 1); SHOW_PCT_SIGN = O.db.health_text_show_pct_sign; PCT_SIGN = SHOW_PCT_SIGN and '%%' or ''; TEXT_ANCHOR = O.Lists.frame_points_simple[O.db.health_text_anchor]; TEXT_X_OFFSET = O.db.health_text_x_offset; TEXT_Y_OFFSET = O.db.health_text_y_offset; CUSTOM_COLOR_ENABLED = O.db.health_text_custom_color_enabled; CUSTOM_COLOR = CUSTOM_COLOR or {}; CUSTOM_COLOR[1] = O.db.health_text_custom_color[1]; CUSTOM_COLOR[2] = O.db.health_text_custom_color[2]; CUSTOM_COLOR[3] = O.db.health_text_custom_color[3]; CUSTOM_COLOR[4] = O.db.health_text_custom_color[4] or 1; IS_DOUBLE = O.db.health_text_block_mode == 2; DISPLAY_MODE_BLOCK_1 = math.max(math.min(O.db.health_text_block_1_display_mode, #UpdateHealthTextFormat), 1); DISPLAY_MODE_BLOCK_2 = math.max(math.min(O.db.health_text_block_2_display_mode, #UpdateHealthTextFormat), 1); BLOCK_1_TEXT_ANCHOR = O.Lists.frame_points_simple[O.db.health_text_block_1_anchor]; BLOCK_1_TEXT_X_OFFSET = O.db.health_text_block_1_x_offset; BLOCK_1_TEXT_Y_OFFSET = O.db.health_text_block_1_y_offset; BLOCK_2_TEXT_ANCHOR = O.Lists.frame_points_simple[O.db.health_text_block_2_anchor]; BLOCK_2_TEXT_X_OFFSET = O.db.health_text_block_2_x_offset; BLOCK_2_TEXT_Y_OFFSET = O.db.health_text_block_2_y_offset; SHOW_ONLY_ON_TARGET = O.db.health_text_show_only_on_target; UpdateFontObject(StripesHealthTextFont, O.db.health_text_font_value, O.db.health_text_font_size, O.db.health_text_font_flag, O.db.health_text_font_shadow); end function Module:StartUp() self:UpdateLocalConfig(); self:SecureUnitFrameHook('CompactUnitFrame_UpdateHealth', Update); self:SecureUnitFrameHook('CompactUnitFrame_UpdateSelectionHighlight', Update); end
-- YWC_MGR.lua ywc管理服务 local skynet = require "skynet" local _NEW_YWC = require "mock/ywc".new ---------------------------------------------------------------------------------------- local YWC_MGR = {} -- 无返回参数定义 local NORET = {} function YWC_MGR.Init() local ywc1 = _NEW_YWC() ywc1:connect_gateway() ywc1:login() ywc1:send("loveMM") --ywc1:sendtest("loveMM") end ---------------------------------------------------------------------------------------- skynet.start(function() print("YWC_MGR Server start...") YWC_MGR.Init() skynet.dispatch("lua", function (_, source, cmd, ...) print("YWC_MGR service: dispatch CMD.....") local f = YWC_MGR[cmd] if f then local ret = f(source, ...) if ret ~= NORET then skynet.ret(skynet.pack(ret)) end else error(string.format("Unknown Test service CMD %s", tostring(cmd))) end end) end)
require "Object" Matrix4 = Object() -- Defaults Matrix4[1] = 1 Matrix4[2] = 0 Matrix4[3] = 0 Matrix4[4] = 0 Matrix4[5] = 0 Matrix4[6] = 1 Matrix4[7] = 0 Matrix4[8] = 0 Matrix4[9] = 0 Matrix4[10] = 0 Matrix4[11] = 1 Matrix4[12] = 0 Matrix4[13] = 0 Matrix4[14] = 0 Matrix4[15] = 0 Matrix4[16] = 1 -- Metamethods function Matrix4:__unm() return self:inverse() end function Matrix4.__mul(a, b) return Matrix4.multiplyMatrix4(a, b) end function Matrix4.__eq(a, b) local DBL_EPSILON = 2.2204460492503131e-16 for i = 1, 16 do if math.abs(a[i]-b[i]) > DBL_EPSILON then return false end end return true end -- Static Methods function Matrix4.fromTable(t) return Object.__cast(t, Matrix4)-- don't create a new object, just turn this one into a matrix end function Matrix4.fromPerspective(fovy, aspect, near, far) local t = math.tan(math.rad(fovy) / 2) local m = Matrix4() m[1] = 1 / (t * aspect) m[6] = 1 / t m[11] =-(far + near) / (far - near) m[12] =-1 m[15] =-(2 * far * near) / (far - near) m[16] = 1 return m end function Matrix4.fromAxisAngle(axis, angle) local x, y, z = axis.x, axis.y, axis.z local angle = math.rad(angle) local c = math.cos(angle) local s = math.sin(angle) local oc = 1-c return Matrix4.fromTable{ x*x*oc+c, y*x*oc-z*s, x*z*oc+y*s, 0, x*y*oc+z*s, y*y*oc+c, y*z*oc-x*s, 0, x*z*oc-y*s, y*z*oc+x*s, z*z*oc+c, 0, 0, 0, 0, 1 } end function Matrix4.fromTranslation(v) return Matrix4.fromTable{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, v.x, v.y, v.z, 1 } end function Matrix4.fromScalar(v) return Matrix4.fromTable{ v.x, 0, 0, 0, 0, v.y, 0, 0, 0, 0, v.z, 0, 0, 0, 0, 1 } end -- Methods function Matrix4.inverse(a) local m = Matrix4() m[1] = a[6]*a[11]*a[16]-a[6]*a[12]*a[15]- a[10]*a[7]*a[16]+a[10]*a[8]*a[15]+ a[14]*a[7]*a[12]-a[14]*a[8]*a[11] m[5] = -a[5]*a[11]*a[16]+a[5]*a[12]*a[15]+ a[9]*a[7]*a[16]-a[9]*a[8]*a[15]- a[13]*a[7]*a[12]+a[13]*a[8]*a[11] m[9] = a[5]*a[10]*a[16]- a[5]*a[12]*a[14]- a[9]*a[6]*a[16]+a[9]*a[8]*a[14]+ a[13]*a[6]*a[12]-a[13]*a[8]*a[10] m[13] =-a[5]*a[10]*a[15]+a[5]*a[11]*a[14]+ a[9]*a[6]*a[15]-a[9]*a[7]*a[14]- a[13]*a[6]*a[11]+a[13]*a[7]*a[10] m[2] = -a[2]*a[11]*a[16]+a[2]*a[12]*a[15]+ a[10]*a[3]*a[16]-a[10]*a[4]*a[15]- a[14]*a[3]*a[12]+a[14]*a[4]*a[11] m[6] = a[1]*a[11]*a[16]-a[1]*a[12]*a[15]- a[9]*a[3]*a[16]+a[9]*a[4]*a[15]+ a[13]*a[3]*a[12]-a[13]*a[4]*a[11] m[10] =-a[1]*a[10]*a[16]+a[1]*a[12]*a[14]+ a[9]*a[2]*a[16]-a[9]*a[4]*a[14]- a[13]*a[2]*a[12]+a[13]*a[4]*a[10] m[14] = a[1]*a[10]*a[15]-a[1]*a[11]*a[14]- a[9]*a[2]*a[15]+a[9]*a[3]*a[14]+ a[13]*a[2]*a[11]-a[13]*a[3]*a[10] m[3] = a[2]*a[7]*a[16]-a[2]*a[8]*a[15]- a[6]*a[3]*a[16]+a[6]*a[4]*a[15]+ a[14]*a[3]*a[8]-a[14]*a[4]*a[7] m[7] = -a[1]*a[7]*a[16]+a[1]*a[8]*a[15]+ a[5]*a[3]*a[16]-a[5]*a[4]*a[15]- a[13]*a[3]*a[8]+a[13]*a[4]*a[7] m[11] = a[1]*a[6]*a[16]-a[1]*a[8]*a[14]- a[5]*a[2]*a[16]+a[5]*a[4]*a[14]+ a[13]*a[2]*a[8]-a[13]*a[4]*a[6] m[15] =-a[1]*a[6]*a[15]+a[1]*a[7]*a[14]+ a[5]*a[2]*a[15]-a[5]*a[3]*a[14]- a[13]*a[2]*a[7]+a[13]*a[3]*a[6] m[4] = -a[2]*a[7]*a[12]+a[2]*a[8]*a[11]+ a[6]*a[3]*a[12]-a[6]*a[4]*a[11]- a[10]*a[3]*a[8]+a[10]*a[4]*a[7] m[8] = a[1]*a[7]*a[12]-a[1]*a[8]*a[11]- a[5]*a[3]*a[12]+a[5]*a[4]*a[11]+ a[9]*a[3]*a[8]-a[9]*a[4]*a[7] m[12] =-a[1]*a[6]*a[12]+a[1]*a[8]*a[10]+ a[5]*a[2]*a[12]-a[5]*a[4]*a[10]- a[9]*a[2]*a[8]+a[9]*a[4]*a[6] m[16] = a[1]*a[6]*a[11]-a[1]*a[7]*a[10]- a[5]*a[2]*a[11]+a[5]*a[3]*a[10]+ a[9]*a[2]*a[7]-a[9]*a[3]*a[6] local det = a[1]*m[1]+a[2]*m[5]+a[3]*m[9]+a[4]*m[13] if det == 0 then return a end det = 1.0 / det for i = 1, 16 do m[i] = m[i]*det end return m end function Matrix4.multiplyVector3(a, b) return Vector3( a[1]*b.x+a[2]*b.y+a[3]*b.z+a[4], a[5]*b.x+a[6]*b.y+a[7]*b.z+a[8], a[9]*b.x+a[10]*b.y+a[11]*b.z+a[12] ) end function Matrix4.multiplyMatrix4(a, b) return Matrix4.fromTable{ a[1]*b[1]+a[2]*b[5]+a[3]*b[9]+a[4]*b[13], a[1]*b[2]+a[2]*b[6]+a[3]*b[10]+a[4]*b[14], a[1]*b[3]+a[2]*b[7]+a[3]*b[11]+a[4]*b[15], a[1]*b[4]+a[2]*b[8]+a[3]*b[12]+a[4]*b[16], a[5]*b[1]+a[6]*b[5]+a[7]*b[9]+a[8]*b[13], a[5]*b[2]+a[6]*b[6]+a[7]*b[10]+a[8]*b[14], a[5]*b[3]+a[6]*b[7]+a[7]*b[11]+a[8]*b[15], a[5]*b[4]+a[6]*b[8]+a[7]*b[12]+a[8]*b[16], a[9]*b[1]+a[10]*b[5]+a[11]*b[9]+a[12]*b[13], a[9]*b[2]+a[10]*b[6]+a[11]*b[10]+a[12]*b[14], a[9]*b[3]+a[10]*b[7]+a[11]*b[11]+a[12]*b[15], a[9]*b[4]+a[10]*b[8]+a[11]*b[12]+a[12]*b[16], a[13]*b[1]+a[14]*b[5]+a[15]*b[9]+a[16]*b[13], a[13]*b[2]+a[14]*b[6]+a[15]*b[10]+a[16]*b[14], a[13]*b[3]+a[14]*b[7]+a[15]*b[11]+a[16]*b[15], a[13]*b[4]+a[14]*b[8]+a[15]*b[12]+a[16]*b[16] } end function Matrix4.transpose(a) return Matrix4.fromTable{ a[1], a[5], a[9], a[13], a[2], a[6], a[10], a[14], a[3], a[7], a[11], a[15], a[4], a[8], a[12], a[16] } end function Matrix4:translate(v) return self * Matrix4.fromTranslation(v) end function Matrix4:scale(v) return self * Matrix4.fromScalar(v) end
local foxtree = {} local function GetNextLevel(t) local myarray = {} for k,v in ipairs(t.child) do table.insert(myarray, v) -- print("Possisble action/priority: " .. v.goal, v.priority()) end return myarray end function foxtree.DetermineAction(t, bot) -- returns an enum.goal (integer) based on rndnum and the BT local nextlevel = {} nextlevel = GetNextLevel(t) local totalchance = 0 for k,v in ipairs(nextlevel) do -- print("g: " .. v.goal) if v.activate == nil then totalchance = totalchance + v.priority(bot) else -- activate is not nil (but could be false) if v.activate(bot) == true then totalchance = totalchance + v.priority(bot) -- print(bot.workzone, bot.occupation) else -- node is deactivated so don't consider it's priority end end end local rndnum = love.math.random(1, totalchance) -- print("random action: " .. rndnum .. " from a total priority count of " .. totalchance) for k,v in ipairs(nextlevel) do if v.activate == nil or v.activate(bot) == true then -- skips over nodes that are not active if rndnum <= v.priority(bot) then if v.child == nill then -- print("Returning goal: " .. v.goal .. " for bot #" .. bot.ID) return v.goal else return foxtree.DetermineAction(v, bot) -- v is a node end else rndnum = rndnum - v.priority(bot) end end end end return foxtree
function Initialize() show = false governor = false timer = {} end function Update() if table.maxn(timer) > 0 then local t = os.clock() local j = 1 local transparency = 0 for i=1,table.maxn(timer) do if timer[j][4] > t then if timer[j][1] < t then if timer[j][2] > t then transparency = math.max(math.min((t-timer[j][1])/(timer[j][2]-timer[j][1]),1),transparency) elseif timer[j][3] < t then transparency = math.max(math.min((timer[j][4]-t)/(timer[j][4]-timer[j][3]),1),transparency) else transparency = 1 end end j = j + 1 else table.remove(timer,j) end end SKIN:Bang('!SetTransparency', transparency * 255) if transparency > 0 then if transparency < 1 then if (not governor) then governor = true SKIN:Bang('!EnableMeasure', 'Governor') SKIN:Bang('!UpdateMeasure', 'Governor') end else if (governor) then governor = false SKIN:Bang('!DisableMeasure', 'Governor') end end if (not show) then SKIN:Bang('!Redraw') SKIN:Bang('!Show') show = true end elseif ((transparency == 0) and show) then if (governor) then governor = false SKIN:Bang('!DisableMeasure', 'Governor') end SKIN:Bang('!Hide') show = false end end end function setRamp(a,b,c,d) local t = os.clock() table.insert(timer,{t+a,t+b,t+c,t+d}) end function redraw() if show then SKIN:Bang('!Redraw') end end function OSDStateChange() redraw() setRamp(0,0,2.5,3) Update() end function SongChange() redraw() setRamp(2.5,2.75,7.5,8) end
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onGetFormulaValues(player, level, maglevel) local min = (level * 1.4 / 5) + (maglevel * 9.22 * 1.4) + 44 * 1.4 local max = (level * 1.4 / 5) + (maglevel * 10.79 * 1.4) + 79 * 1.4 -- TODO: Formulas (Right now using 40% extra on Ultimate Healing with closer min and max values to the avg) return min, max end combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local spell = Spell("instant") function spell.onCastSpell(creature, variant) return combat:execute(creature, variant) end spell:group("healing") spell:id(241) spell:name("Restoration") spell:words("exura max vita") spell:level(300) spell:mana(260) spell:isSelfTarget(true) spell:cooldown(6 * 1000) spell:groupCooldown(1 * 1000) spell:isAggressive(false) spell:needLearn(false) spell:vocation("druid;true", "sorcerer;true", "elder druid;true", "master sorcerer;true") spell:register()
CircleEntity = class(EntityBase, function(a, name, x, y, r) EntityBase.init(a, name) a.circle = Circle2D(x,y,r) end) function CircleEntity:getPos() return self.circle.pos end function CircleEntity:contains(point) return self.circle:contains(point) end function CircleEntity:moveTo(point) self.circle.pos = point end function CircleEntity:draw(engine, camera) local renderPos = camera:transform(self.circle.pos) love.graphics.setColor(self.color) love.graphics.draw(self:description(), renderPos[1], renderPos[2]) love.graphics.circle(love.draw_line, renderPos[1], renderPos[2], self.circle.radius * camera.scale) end
-- template for asynchronous widet types -- Copyright (C) 2019 Nguyễn Gia Phong <vn.mcsinyx@gmail.com> -- -- This file is part of Vicious. -- -- Vicious 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 2 of the -- License, or (at your option) any later version. -- -- Vicious 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 Vicious. If not, see <https://www.gnu.org/licenses/>. local helpers = require"vicious.helpers" return helpers.setasyncall{ async = function (format, warg, callback) -- In here there should be some asynchronous function -- from vicious.spawn or helpers.sysctl_async -- that call callback on the result. end } -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
function ChangeComponent(args)-- 1:componentID; 2: page; 3: drawbleID; 4: textureID SetPedComponentVariation(GetPlayerPed(-1), args[1], args[3], args[4], 2) end RegisterNetEvent("vmenu:updateChar") AddEventHandler("vmenu:updateChar", function(args) model = GetHashKey(args[19]) RequestModel(model) while not HasModelLoaded(model) do -- Wait for model to load RequestModel(model) Citizen.Wait(0) end SetPlayerModel(PlayerId(), model) SetModelAsNoLongerNeeded(model) SetPedHeadBlendData(GetPlayerPed(-1), args[1], args[1], args[1], args[1], args[1], args[1], 1.0, 1.0, 1.0, true) ChangeComponent({0,0,args[1],args[2]})-- 1:componentID; 2: page; 3: drawbleID; 4: textureID ChangeComponent({2,0,args[3],args[4]}) SetPedHairColor(GetPlayerPed(-1), args[17], args[18]) ChangeComponent({3,0,args[13],args[14]}) ChangeComponent({4,0,args[5],args[6]}) ChangeComponent({6,0,args[7],args[8]}) ChangeComponent({7,0,args[15],args[16]}) ChangeComponent({11,0,args[9],args[10]}) ChangeComponent({8,0,args[11],args[12]}) TriggerServerEvent("weaponshop:GiveWeapons") VMenu.updatedChar = true end) RegisterNetEvent("vmenu:changeGender") AddEventHandler("vmenu:changeGender", function(gender) model = GetHashKey("mp_m_freemode_01") if tonumber(gender) == 0 then model = GetHashKey("mp_m_freemode_01") else model = GetHashKey("mp_f_freemode_01") end RequestModel(model) while not HasModelLoaded(model) do -- Wait for model to load RequestModel(model) Citizen.Wait(0) end SetPlayerModel(PlayerId(), model) SetModelAsNoLongerNeeded(model) SetPedComponentVariation(GetPlayerPed(-1), 2, 0, 0, 2) TriggerServerEvent("weaponshop:GiveWeapons") end) RegisterNetEvent("vmenu:supdateChar") AddEventHandler("vmenu:supdateChar", function(o, t, th, f, fi, s, se, e, n, te, el, tw, thi, fo, fif, si, y, u, sev) model = GetHashKey(sev) RequestModel(model) while not HasModelLoaded(model) do -- Wait for model to load RequestModel(model) Citizen.Wait(0) end SetPlayerModel(PlayerId(), model) SetModelAsNoLongerNeeded(model) SetPedHeadBlendData(GetPlayerPed(-1), o, o, o, o, o, o, 1.0, 1.0, 1.0, true) ChangeComponent({0,0,o,t})-- 1:componentID; 2: page; 3: drawbleID; 4: textureID ChangeComponent({2,0,th,f}) SetPedHairColor(GetPlayerPed(-1), y, u) ChangeComponent({3,0,thi,fo}) ChangeComponent({4,0,fi,s}) ChangeComponent({6,0,se,e}) ChangeComponent({7,0,fif,si}) ChangeComponent({11,0,n,te}) ChangeComponent({8,0,el,tw}) TriggerServerEvent("weaponshop:GiveWeapons") VMenu.updatedChar = true end) RegisterNetEvent("vmenu:updateCharInShop") AddEventHandler("vmenu:updateCharInShop", function(args) -- model = args[17] -- -- RequestModel(model) -- while not HasModelLoaded(model) do -- Wait for model to load -- RequestModel(model) -- Citizen.Wait(0) -- end -- SetPlayerModel(PlayerId(), model) -- SetModelAsNoLongerNeeded(model) --ChangeComponent({0,0,args[1],args[2]})-- 1:componentID; 2: page; 3: drawbleID; 4: textureID --ChangeComponent({2,0,args[3],args[4]}) ChangeComponent({3,0,args[13],args[14]}) ChangeComponent({4,0,args[5],args[6]}) ChangeComponent({6,0,args[7],args[8]}) ChangeComponent({7,0,args[15],args[16]}) ChangeComponent({11,0,args[9],args[10]}) ChangeComponent({8,0,args[11],args[12]}) end) AddEventHandler("vmenu:OutfitsOG", function(target) VMenu.ResetMenu(8, "Tenues", "cloth") VMenu.AddMenu(8, "Tenues", "cloth") -- default = Header "Texte" sur fond bleu VMenu.AddNum(8, "Catégorie", "Tenues", 0, 65, "Change de catégorie") VMenu.AddSep(8, OutfitsCat[1]) VMenu.AddFunc(8, "Validez catégories tenues", "vmenu:OutfitsValidate", {getOpt("Tenues")}, "Valider") end) function menuOutfits(id, no, cat) VMenu.ResetMenu(8, "Tenues", "cloth") VMenu.AddMenu(8, "Tenues", "cloth") -- default = Header "Texte" sur fond bleu VMenu.AddFunc(8, "Retour", "vmenu:OutfitsOG", {}, "Retour") VMenu.AddSep(8, cat) local i = 0 for _, item in pairs(outfits) do if item.id == id then local outfits = {} outfits = item i = i + 1 end end VMenu.AddNum(8, "Tenues", no, 0, i, "Outfits") VMenu.AddFunc(8, "Validez votre tenue", "vmenu:OutfitsVal", {getOpt(no), id}, "Valider") end AddEventHandler("vmenu:OutfitsValidate", function(target, e) if (e == 0) then menuOutfits(108, "OutfitsNo1", OutfitsCat[1]) elseif (e == 1) then menuOutfits(109, "OutfitsNo2", OutfitsCat[2]) elseif (e == 2) then menuOutfits(110, "OutfitsNo3", OutfitsCat[3]) elseif (e == 3) then menuOutfits(111, "OutfitsNo4", OutfitsCat[4]) elseif (e == 4) then menuOutfits(112, "OutfitsNo5", OutfitsCat[5]) elseif (e == 5) then menuOutfits(113, "OutfitsNo6", OutfitsCat[6]) elseif (e == 6) then menuOutfits(114, "OutfitsNo7", OutfitsCat[7]) elseif (e == 7) then menuOutfits(115, "OutfitsNo8", OutfitsCat[8]) elseif (e == 8) then menuOutfits(116, "OutfitsNo9", OutfitsCat[9]) elseif (e == 9) then menuOutfits(117, "OutfitsNo10", OutfitsCat[10]) elseif (e == 10) then menuOutfits(118, "OutfitsNo11", OutfitsCat[11]) elseif (e == 11) then menuOutfits(119, "OutfitsNo12", OutfitsCat[12]) elseif (e == 12) then menuOutfits(120, "OutfitsNo13", OutfitsCat[13]) elseif (e == 13) then menuOutfits(121, "OutfitsNo14", OutfitsCat[14]) elseif (e == 14) then menuOutfits(122, "OutfitsNo15", OutfitsCat[15]) elseif (e == 15) then menuOutfits(123, "OutfitsNo16", OutfitsCat[16]) elseif (e == 16) then menuOutfits(124, "OutfitsNo17", OutfitsCat[17]) elseif (e == 17) then menuOutfits(125, "OutfitsNo18", OutfitsCat[18]) elseif (e == 18) then menuOutfits(126, "OutfitsNo19", OutfitsCat[19]) elseif (e == 19) then menuOutfits(127, "OutfitsNo20", OutfitsCat[20]) elseif (e == 20) then menuOutfits(128, "OutfitsNo21", OutfitsCat[21]) elseif (e == 21) then menuOutfits(129, "OutfitsNo22", OutfitsCat[22]) elseif (e == 22) then menuOutfits(130, "OutfitsNo23", OutfitsCat[23]) elseif (e == 23) then menuOutfits(131, "OutfitsNo24", OutfitsCat[24]) elseif (e == 24) then menuOutfits(132, "OutfitsNo25", OutfitsCat[25]) elseif (e == 25) then menuOutfits(133, "OutfitsNo26", OutfitsCat[26]) elseif (e == 26) then menuOutfits(134, "OutfitsNo27", OutfitsCat[27]) elseif (e == 27) then menuOutfits(135, "OutfitsNo28", OutfitsCat[28]) elseif (e == 28) then menuOutfits(136, "OutfitsNo29", OutfitsCat[29]) elseif (e == 29) then menuOutfits(137, "OutfitsNo30", OutfitsCat[30]) elseif (e == 30) then menuOutfits(138, "OutfitsNo31", OutfitsCat[31]) elseif (e == 31) then menuOutfits(139, "OutfitsNo32", OutfitsCat[32]) elseif (e == 32) then menuOutfits(140, "OutfitsNo33", OutfitsCat[33]) elseif (e == 33) then menuOutfits(141, "OutfitsNo34", OutfitsCat[34]) elseif (e == 34) then menuOutfits(142, "OutfitsNo35", OutfitsCat[35]) elseif (e == 35) then menuOutfits(143, "OutfitsNo36", OutfitsCat[36]) elseif (e == 36) then menuOutfits(144, "OutfitsNo37", OutfitsCat[37]) elseif (e == 37) then menuOutfits(145, "OutfitsNo38", OutfitsCat[38]) elseif (e == 38) then menuOutfits(146, "OutfitsNo39", OutfitsCat[39]) elseif (e == 39) then menuOutfits(147, "OutfitsNo40", OutfitsCat[40]) elseif (e == 40) then menuOutfits(148, "OutfitsNo41", OutfitsCat[41]) elseif (e == 41) then menuOutfits(149, "OutfitsNo42", OutfitsCat[42]) elseif (e == 42) then menuOutfits(150, "OutfitsNo43", OutfitsCat[43]) elseif (e == 43) then menuOutfits(151, "OutfitsNo44", OutfitsCat[44]) elseif (e == 44) then menuOutfits(152, "OutfitsNo45", OutfitsCat[45]) elseif (e == 45) then menuOutfits(153, "OutfitsNo46", OutfitsCat[46]) elseif (e == 46) then menuOutfits(154, "OutfitsNo47", OutfitsCat[47]) elseif (e == 47) then menuOutfits(155, "OutfitsNo48", OutfitsCat[48]) elseif (e == 48) then menuOutfits(156, "OutfitsNo49", OutfitsCat[49]) elseif (e == 49) then menuOutfits(157, "OutfitsNo50", OutfitsCat[50]) elseif (e == 50) then menuOutfits(158, "OutfitsNo51", OutfitsCat[51]) elseif (e == 51) then menuOutfits(159, "OutfitsNo52", OutfitsCat[52]) elseif (e == 52) then menuOutfits(160, "OutfitsNo53", OutfitsCat[53]) elseif (e == 53) then menuOutfits(161, "OutfitsNo54", OutfitsCat[54]) elseif (e == 54) then menuOutfits(162, "OutfitsNo55", OutfitsCat[55]) elseif (e == 55) then menuOutfits(163, "OutfitsNo56", OutfitsCat[56]) elseif (e == 56) then menuOutfits(164, "OutfitsNo57", OutfitsCat[57]) elseif (e == 57) then menuOutfits(165, "OutfitsNo58", OutfitsCat[58]) elseif (e == 58) then menuOutfits(166, "OutfitsNo59", OutfitsCat[59]) elseif (e == 59) then menuOutfits(167, "OutfitsNo60", OutfitsCat[60]) elseif (e == 60) then menuOutfits(168, "OutfitsNo61", OutfitsCat[61]) elseif (e == 61) then menuOutfits(169, "OutfitsNo62", OutfitsCat[62]) elseif (e == 62) then menuOutfits(170, "OutfitsNo63", OutfitsCat[63]) elseif (e == 63) then menuOutfits(171, "OutfitsNo64", OutfitsCat[64]) elseif (e == 64) then menuOutfits(172, "OutfitsNo65", OutfitsCat[65]) elseif (e == 65) then menuOutfits(173, "OutfitsNo66", OutfitsCat[66]) end end) AddEventHandler("vmenu:OutfitsVal", function(target, o, h) local k = tonumber(o) local t = tonumber(h) local i = 0 for _, item in pairs(outfits) do if item.id == t then i = i + 1 if i == k then args = { item.three[1],item.three[2],item.four[1],item.four[2],item.six[1],item.six[2],item.seven[1],item.seven[2],item.eight[1],item.eight[2],item.eleven[1],item.eleven[2] } TriggerServerEvent("vmenu:getOutfit", args) break end end end end) AddEventHandler("vmenu:JobOutfit", function(o, h) local k = tonumber(o) local t = tonumber(h) local i = 0 for _, item in pairs(outfits) do if item.id == t then i = i + 1 if i == k then ChangeComponent({3,0,item.three[1],item.three[2]}) ChangeComponent({4,0,item.four[1],item.four[2]}) ChangeComponent({6,0,item.six[1],item.six[2]}) ChangeComponent({7,0,item.seven[1],item.seven[2]}) ChangeComponent({11,0,item.eleven[1],item.eleven[2]}) ChangeComponent({8,0,item.eight[1],item.eight[2]}) break end end end end)
local AddonName, AddonTable = ... -- Cata Battle Pets AddonTable.pets = { --- RAIDS -- Firelands 152976, 152977, 152975, 152978, -- Bastion of Twilight 152969, 152970, 152972, -- Throne of the Four Winds 152973, -- Blackwing Descent 152967, }
local sha = require "luasha" print( sha.hash256"The quick brown fox jumps over the lazy dog")
Citizen.CreateThread(function() Wait(1000) if (((Plugins.Metabolism) and not (_StartError_) and (Framework.Vorp) and not (Framework.RedEmRP))) then -------------------------------------------------------------------------------- ----------------------------------- DevDokus ----------------------------------- -------------------------------------------------------------------------------- function Wait(args) Citizen.Wait(args) end function Invoke(args, bool) Citizen.InvokeNative(args, bool) end local VORPCore = {} Citizen.CreateThread(function() while not VORPCore do TriggerEvent("getCore", function(core) VORPCore = core end) Citizen.Await(200) end end) -------------------------------------------------------------------------------- -- Event Register RegisterNetEvent('DevDokus:Metabolism:C:Hunger') RegisterNetEvent('DevDokus:Metabolism:C:Thirst') RegisterNetEvent('DevDokus:Metabolism:C:Stamina') RegisterNetEvent('DevDokus:Metabolism:C:Health') RegisterNetEvent('DevDokus:Metabolism:C:StaminaInnerGold') RegisterNetEvent('DevDokus:Metabolism:C:StaminaOuterGold') RegisterNetEvent('DevDokus:Metabolism:C:HealthInnerGold') RegisterNetEvent('DevDokus:Metabolism:C:HealthOuterGold') -------------------------------------------------------------------------------- -- Core -------------------------------------------------------------------------------- -- Variables _Hunger = 100 _Thirst = 100 _Stamina = 100 local DyingCount = 0 local WarningCount = 0 local FoodWarning = 0 local ThirstWarning = 0 local DeathWarning = false local stage = { s1 = false, s2 = false, s3 = false} local DeadOrAlive = true local CoreIsZero = false -------------------------------------------------------------------------------- Citizen.CreateThread(function() while true do Wait(1000) if VORPCore ~= nil then local DrainFood = 0 local DrainWater = 0 local User = PlayerPedId() local coords = GetEntityCoords(User) local temp = math.floor(GetTemperatureAtCoords(coords)) local Area = Metabolism.StartArea local dist = Vdist(coords, Area.x, Area.y, Area.z) local IsReady = (dist > Metabolism.StartRadius) if IsReady then if (temp >= Metabolism.Temperature.Max) then DrainFood = Metabolism.Temperature.HotDamage.Food DrainWater = Metabolism.Temperature.HotDamage.Water elseif (temp <= Metabolism.Temperature.Min) then DrainFood = Metabolism.Temperature.ColdDamage.Food DrainWater = Metabolism.Temperature.ColdDamage.Water end local running = IsPedRunning(User) local walking = IsPedWalking(User) if running then _Hunger = _Hunger - (Metabolism.Food.DrainRunning + DrainFood) _Thirst = _Thirst - (Metabolism.Water.DrainRunning + DrainWater) elseif walking then _Hunger = _Hunger - (Metabolism.Food.DrainWalking + DrainFood) _Thirst = _Thirst - (Metabolism.Water.DrainWalking + DrainWater) else _Hunger = _Hunger - (Metabolism.Food.DrainIdle + DrainFood) _Thirst = _Thirst - (Metabolism.Water.DrainIdle + DrainWater) end if (_Hunger <= Metabolism.Food.LoseWhen) then if (FoodWarning == 0) and not CoreIsZero then FoodWarning = (FoodWarning + 1) TriggerEvent("vorp:TipRight", _('Metabolism_SoHungry'), 5000) else FoodWarning = (FoodWarning + 1) if (FoodWarning == 10) then FoodWarning = 0 end end end if (_Thirst <= Metabolism.Food.LoseWhen) then if (ThirstWarning == 0) and not CoreIsZero then ThirstWarning = (ThirstWarning + 1) TriggerEvent("vorp:TipRight", _('Metabolism_SoThirsty'), 5000) else ThirstWarning = (ThirstWarning + 1) if (ThirstWarning == 10) then ThirstWarning = 0 end end end end end end end) Citizen.CreateThread(function() while true do if VORPCore ~= nil then if _Hunger < Metabolism.Food.LoseWhen then local User = PlayerPedId() local Core = GetAttributeCoreValue(User, 0) local health = math.floor((Core - Metabolism.Food.DamagePerSec)) Citizen.InvokeNative(0xC6258F41D86676E0, User, 0, health) end if _Thirst < Metabolism.Water.LoseWhen then local User = PlayerPedId() local Core = GetAttributeCoreValue(User, 0) local health = math.floor((Core - Metabolism.Water.DamagePerSec)) Citizen.InvokeNative(0xC6258F41D86676E0, User, 0, health) end end Wait(1000) end end) Citizen.CreateThread(function() while true do if VORPCore ~= nil then local User = PlayerPedId() local Core = GetAttributeCoreValue(User, 0) local eHealth = GetEntityHealth(User) -- STOP: If user is dead, let's wait until the player is alive again. if (Core == 0) and not DeadOrAlive then print("Waiting for respawn.....") end if (Core == 0) and DeadOrAlive then CoreIsZero = true if (eHealth >= 50) then Citizen.InvokeNative(0x697157CED63F18D4, User, 5, false, true, true) if stage.s1 == false then stage.s1 = true TriggerEvent("vorp:TipRight", _('Metabolism_YourDying1'), 5000) end elseif (eHealth < 50) and (eHealth >= 35) then Citizen.InvokeNative(0x697157CED63F18D4, User, 5, false, true, true) if stage.s2 == false then stage.s2 = true TriggerEvent("vorp:TipRight", _('Metabolism_YourDying2'), 5000) end elseif (eHealth < 35) and (eHealth >= 2) then Citizen.InvokeNative(0x697157CED63F18D4, User, 5, false, true, true) if stage.s3 == false then stage.s3 = true TriggerEvent("vorp:TipRight", _('Metabolism_YourDying3'), 5000) end elseif (eHealth < 2) then Citizen.InvokeNative(0x697157CED63F18D4, User, 50000, false, true, true) DeadOrAlive = false end end ---------------------------- WORK IN PROGRESS ---------------------------- -- ToDo: Detecting when user eats or drinks to reset the dialog for dying. if (Core ~= 0) and CoreIsZero then CoreIsZero = false end -------------------------------------------------------------------------- -- When the player comes back to live, reset the script. if (Core ~= 0) and not DeadOrAlive then local Reset = Metabolism.ResetOnDeath if Reset.Enabled then TriggerEvent('DevDokus:Metabolism:C:Hunger', Reset.Hunger) TriggerEvent('DevDokus:Metabolism:C:Thirst', Reset.Thirst) TriggerEvent('DevDokus:Metabolism:C:Health', 100.0) TriggerEvent('DevDokus:Metabolism:C:Stamina', 100.0) _Hunger = Reset.Hunger _Thirst = Reset.Thirst _Stamina = 100 end CoreIsZero = false DeadOrAlive = true DyingCount = 0 WarningCount = 0 DeathWarning = false stage.s1 = false stage.s2 = false stage.s3 = false end end Wait(4000) end end) AddEventHandler('DevDokus:Metabolism:C:Hunger', function(value) _Hunger = _Hunger + tonumber(value) if (_Hunger <= 0) then _Hunger = 0 end if (_Hunger > 100) then _Hunger = 100 end end) AddEventHandler('DevDokus:Metabolism:C:Thirst', function(value) _Thirst = _Thirst + tonumber(value) if (_Thirst <= 0) then _Thirst = 0 end if (_Thirst > 100) then _Thirst = 100 end end) AddEventHandler('DevDokus:Metabolism:C:Stamina', function(value) local User = PlayerPedId() local Core = GetAttributeCoreValue(User, 1) local new = (Core + tonumber(value)) if (new > 100) then new = 100 end Citizen.InvokeNative(0xC6258F41D86676E0, User, 1, new) end) AddEventHandler('DevDokus:Metabolism:C:Health', function(value) local User = PlayerPedId() local Core = GetAttributeCoreValue(User, 0) local new = (Core + tonumber(value)) if (new > 100) then new = 100 end Citizen.InvokeNative(0xC6258F41D86676E0, User, 0, new) end) AddEventHandler('DevDokus:Metabolism:C:StaminaInnerGold', function(value) local User = PlayerPedId() local new = ((value * 100) / 100) Citizen.InvokeNative(0x4AF5A4C7B9157D14, User, 1, new, true) end) AddEventHandler('DevDokus:Metabolism:C:StaminaOuterGold', function(value) local User = PlayerPedId() local new = ((value * 100) / 100) Citizen.InvokeNative(0xF6A7C08DF2E28B28, User, 1, new, true) end) AddEventHandler('DevDokus:Metabolism:C:HealthInnerGold', function(value) local User = PlayerPedId() local new = ((value * 100) / 100) Citizen.InvokeNative(0x4AF5A4C7B9157D14, User, 0, new, true) end) AddEventHandler('DevDokus:Metabolism:C:HealthOuterGold', function(value) local User = PlayerPedId() local new = ((value * 100) / 100) Citizen.InvokeNative(0xF6A7C08DF2E28B28, User, 0, new, true) end) -------------------------------------------------------------------------------- end end)
return function(server, opts) local rustopts = { tools = { autoSetHints = true, hover_with_actions = true, }, server = vim.tbl_deep_extend("force", server:get_default_options(), opts, {}), } local ok, rust_tools = pcall(require, "rust-tools") if ok then rust_tools.setup(rustopts) server:attach_buffers() end end
local Entity_Group = { } local Groups = { } local PrimaryTagGroups = { } local EventSys = lib_EventSys function Entity_Group.SetEvent(event) EventSys = event end function Entity_Group.GetEGroupWithTags(...) local tags = {...} local groups; for _, tag in pairs(tags) do for __, group in pairs(groups or Groups) do for i, v in pairs(group.Tags) do if v==tag then if not groups then groups = { } end table.insert(groups, group) end end end end return groups end function Entity_Group.new(Options, ...) local egroup = { } egroup.Entities = {...} egroup.Tags = {Options.Tags and unpack(Options.Tags) or nil} egroup.PrimaryTag = Options.PrimaryTag or "Generic" if not PrimaryTagGroups[egroup.PrimaryTag] then PrimaryTagGroups[egroup.PrimaryTag] = {egroup} else table.insert(PrimaryTagGroups, egroup) end
object_tangible_tcg_series4_creature_pet_deed_nuna = object_tangible_tcg_series4_shared_creature_pet_deed_nuna:new { } ObjectTemplates:addTemplate(object_tangible_tcg_series4_creature_pet_deed_nuna, "object/tangible/tcg/series4/creature_pet_deed_nuna.iff")
local util = require("common.util") local posix = require("posix") local Pipe = util.Pipe local in_pipe = Pipe.new() local out_pipe = Pipe.new() function child() local t = { counter = 0, incr = function(self) self.counter = self.counter + 1 end, value = function(self) return self.counter end } -- TODO: What to do in the child? Fill this in yourself. while true do local message = Pipe.read(in_pipe) if t[message] == "eixt" then break end if t[message] ~= nil then t[message]() end end end function parent(pid) Pipe.write(in_pipe, "incr") Pipe.read(out_pipe) -- return is nil, don't care Pipe.write(in_pipe, "value") print(Pipe.read(out_pipe)) -- should be 1 Pipe.write(in_pipe, "exit") -- child should exit now posix.wait(pid) end local pid = posix.fork() if pid == 0 then child() else parent(pid) end
object_draft_schematic_armor_component_test_an_armor_core = object_draft_schematic_armor_component_shared_test_an_armor_core:new { } ObjectTemplates:addTemplate(object_draft_schematic_armor_component_test_an_armor_core, "object/draft_schematic/armor/component/test_an_armor_core.iff")
local path = ... local fs = require "bee.filesystem" local cwd = fs.exe_path():parent_path() local f = assert(io.open((cwd / ".mingw"):string(), "wb")) f:write(path) f:close()
---------------------------------------------- -- Send.lua -- -- Send requests/commands to other server -- -- that are handled in receive.lua -- ---------------------------------------------- -- Info -- this_server = get('this_server') other_server = get('other_server') other_ip = get('other_ip') -- ip to communicate with other_port = tonumber(get('other_port')) -- port to redirect other_http_port = get('other_http_port') -- http to communicate with resourceName = getResourceName(getThisResource()) other_ipandport = other_ip .. ':' .. other_http_port mapInfo_other = {} mapInfo_other.name = "" mapInfo_other.author = "" function getServersInfo() triggerClientEvent(client, "receiveServersInfo", client, this_server, other_server) end addEvent("getServersInfo", true) addEventHandler("getServersInfo", root, getServersInfo) -- Test connection with other server outputDebugString("Interchat " .. other_ipandport .. " " ..other_port .. " " .. tostring( callRemote(other_ipandport, "default", resourceName, "testConnection", function(response) if response ~= "ERROR" then outputDebugString('Interchat response: ' .. tostring(response)) end end) )) ----------------- -- F2 redirect -- ----------------- function redirect() local player = client local tick, hoursPlayed = getElementData(player, 'jointick'), getElementData(player, 'hoursPlayed') callRemote ( other_ipandport, "default", resourceName, "playerRedirect", function(response) if response == nil or response == "ERROR" then outputChatBox(other_server .. ' server is not responding!', player, 255, 0, 0) else setElementData( player , 'gotomix', true) redirectPlayer ( player, other_ip, other_port) end end, getPlayerSerial(player), getElementData(player,'playtime'), tick, hoursPlayed) end addEvent('onRequestRedirect', true) addEventHandler('onRequestRedirect', root, redirect) function getPlayerFromSerial(serial) if serial and type(serial) == "string" then for i, v in ipairs(getElementsByType("player")) do if getPlayerSerial(v) == serial then return v end end end return false end addCommandHandler('redirectall', function(p) outputChatBox('Redirecting everyone to other server') for k, player in ipairs(getElementsByType'player') do if player ~= p then setElementData( player , 'gotomix', true) redirectPlayer ( player, other_ip, other_port) end end end, true, true) ------------------------- -- Chat, use the + prefix ------------------------- local chat_prefix = '+' function playerChat ( message, messageType ) if messageType ~= 0 or message:sub(1,1) ~= chat_prefix or #message < 2 or exports.gus:chatDisabled() then return end return outputChatBox ( 'Server chat is moved to the U key now. Press U to chat with ' .. other_server, source, 255, 0, 0) -- local name = removeColorCoding(getPlayerName(source)) -- message = removeColorCoding(message:sub(2)) -- callRemote ( other_ipandport, "default", resourceName, "playerChatBoxRemote", checkPlayerChat, name, message ) -- cancelEvent() end addEventHandler ( "onPlayerChat", getRootElement(), playerChat) function checkPlayerChat(data) if data == nil or data == "ERROR" then return end if type(data.name) == "string" and type(data.message) == "string" then local out = "[" .. string.upper(this_server) .. "] " .. data.name .. "> " .. data.message .. "" outputChatBox(out, root, 0xFF, 0xD7, 0x00) outputServerLog(out) exports.irc:outputIRC("08[" .. this_server:upper() .. "] " .. tostring(data.name) .. "> " .. tostring(data.message) .. "") triggerEvent('onInterchatMessage', resourceRoot, this_server:upper(), tostring(data.name), tostring(data.message)) else outputDebugString("Serverchat: no/wrong response from other server! (" .. other_ipandport .. ")", 1) end end function removeColorCoding ( name ) return type(name)=='string' and string.gsub ( name, '#%x%x%x%x%x%x', '' ) or name end function chatCommand(player, cmd, ...) if isPlayerMuted(player) or exports.gus:chatDisabled() then return end local name = removeColorCoding(getPlayerName(player)) message = removeColorCoding(table.concat({...},' ')) callRemote ( other_ipandport, "default", resourceName, "playerChatBoxRemote", checkPlayerChat, name, message ) end addCommandHandler(other_server, chatCommand) function start() for k, p in ipairs(getElementsByType'player') do join(p) end end addEventHandler('onResourceStart', resourceRoot, start) function join(p) bindKey ( p or source, 'u', 'down', 'chatbox', other_server ) end addEventHandler('onPlayerJoin', root, join) ------------- -- Players -- ------------- function getOtherServerPlayers ( player, cmd, server ) if server and server:lower() == other_server:lower() then callRemote ( other_ipandport, "default", resourceName, "sendPlayerNames", receivePlayerNames, getPlayerName(player) ) end end addCommandHandler("players", getOtherServerPlayers, false, false) function receivePlayerNames ( player, amount, max, names ) if type(amount) == "string" and tonumber(amount) and type(names) == "string" and getPlayerFromName(player) then player = getPlayerFromName(player) amount = tonumber(amount) if amount > 0 then _outputChatBox("[" .. other_server:upper() .. "] Total players online: " .. amount .. "/" .. max .. " - Names: "..names, player, 0xFF, 0xD7, 0x00) else outputChatBox("[" .. other_server:upper() .. "] No players online", player, 0xFF, 0xD7, 0x00) end else outputDebugString("Serverchat: no/wrong response from other server! (" .. other_ipandport .. ")", 1) end end function _outputChatBox(str, player, c1, c2, c3) local sz = 0 if #str > 96 then if #str % 96 == 0 then sz = #str / 96 else sz = (#str / 96) + 1 end for i = 0, sz-1 do local nstr = '' nstr = string.sub(str, i*96, i*96 + 96) outputChatBox(nstr, player, c1, c2, c3) end else outputChatBox(str, player, c1, c2, c3) end end ------------ -- Admins -- ------------ function getOtherServerAdmins ( player, cmd ) callRemote ( other_ipandport, "default", resourceName, "sendAdminNames", receiveAdminNames, getPlayerSerial(player) ) end addCommandHandler("admins", getOtherServerAdmins) function receiveAdminNames ( serial, admins, moderators ) local player = getPlayerFromSerial(serial) if not player then return end if #admins > 0 then outputChatBox("[" .. other_server:upper() .. "] Admins online: " .. admins, player, 0xFF, 0xD7, 0x00) else outputChatBox("[" .. other_server:upper() .. "] No admins online", player, 0xFF, 0xD7, 0x00) end if #moderators > 0 then outputChatBox("[" .. other_server:upper() .. "] Moderators online: " .. moderators, player, 0xFF, 0xD7, 0x00) else outputChatBox("[" .. other_server:upper() .. "] No moderators online", player, 0xFF, 0xD7, 0x00) end end -------------- -- Map info -- -------------- function mapStarted (mapinfo) mapInfo = mapinfo callRemote ( other_ipandport, "default", resourceName, "sendMapInfo", (function() end), mapInfo.name, mapInfo.author, exports.race:getRaceMode(), true, false ) --Send mapInfo and update F2 GUI for clients of the other server triggerClientEvent("updateF2GUI", resourceRoot, this_server.." Map", "Map: "..mapInfo.name.."\nAuthor: "..mapInfo.author) --Update F2 GUI for clients of this server end addEvent("onMapStarting") addEventHandler("onMapStarting", root, mapStarted) function getServersMapInfo ( sendTo ) if not mapInfo then local s = getElementData( getResourceRootElement( getResourceFromName("race") ) , "info") if s then mapInfo = s.mapInfo else mapInfo = {} end if mapInfo.name == nil then mapInfo.name = "" end if mapInfo.author == nil then mapInfo.author = "" end end if sendTo == "sendToAll" then sendToElement = root callRemote ( other_ipandport, "default", resourceName, "sendMapInfo", receiveMapInfo, mapInfo.name, mapInfo.author, nil, false, true ) --Get mapInfo from the other server and update F2 GUI for clients of this server elseif sendTo == "client" then sendToElement = client triggerClientEvent(sendToElement, "updateF2GUI", sendToElement, other_server.." Map", "Map: "..mapInfo_other.name.."\nAuthor: "..mapInfo_other.author) --Update F2 GUI for clients of this server end triggerClientEvent(sendToElement, "updateF2GUI", resourceRoot, this_server.." Map", "Map: "..mapInfo.name.."\nAuthor: "..mapInfo.author) --Update F2 GUI for clients of this server end addEvent("getServersMapInfo", true) addEventHandler("getServersMapInfo", root, getServersMapInfo) function receiveMapInfo ( mapinfo ) if mapinfo ~= nil and mapinfo ~= "ERROR" then mapInfo_other = mapinfo else mapInfo_other = {} end if mapInfo_other.name == nil then mapInfo_other.name = "" end if mapInfo_other.author == nil then mapInfo_other.author = "" end triggerClientEvent(root, "updateF2GUI", resourceRoot, other_server.." Map", "Map: "..mapInfo_other.name.."\nAuthor: "..mapInfo_other.author) end addEventHandler("onResourceStart", resourceRoot, function() setTimer(getServersMapInfo, 500, 1, "sendToAll") end ) --------------- -- GC logins -- --------------- function gcLogin ( forumID, amount ) callRemote ( other_ipandport, "default", resourceName, "greencoinsLogin", (function() end), forumID ) end addEventHandler("onGCLogin" , root, gcLogin ) ------------------ -- Mutes & bans -- ------------------ -- admin panel hook addEvent ( "aPlayer", true ) addEventHandler ( "aPlayer", root, function ( player, action, data, additional, additional2 ) if ( action == "mute" ) then local seconds = tonumber(additional) and tonumber(additional) > 0 and tonumber(additional) if seconds then callRemote ( other_ipandport, "default", resourceName, "aAddSerialUnmuteTimer", (function() end), getPlayerSerial(player), seconds ) end end end, true, 'high') addEventHandler("onBan",root, function (ban) local reason = getBanReason(ban) if reason and reason:find('sync_banned', 1, true) then return end local ip = getBanIP(ban) local admin = getBanAdmin(ban) local serial = getBanSerial(ban) local seconds = getUnbanTime(ban) callRemote ( other_ipandport, "default", resourceName, "addSyncBan", (function() end), ip, serial, reason, seconds ) end ) ---------------------- -- Unbans -- ---------------------- addEventHandler("onUnban",root, function (ban, admin) local ip = getBanIP(ban) local serial = getBanSerial(ban) callRemote ( other_ipandport, "default", resourceName, "removeSyncBan", (function() end), admin, ip, serial ) end ) ----------------------- -- Online players F2 -- ----------------------- local players function getServerPlayersOnline() players = #getElementsByType('player') setElementData(resourceRoot, this_server.." Players", players .."/".. getMaxPlayers(), true) callRemote(other_ipandport, "default", resourceName, "sendOnlinePlayers", receivePlayersOnline) --getOtherServerPlayersOnline end setTimer(getServerPlayersOnline, 1000, 0) function receivePlayersOnline(responseData, errno) local players2 = 0 local max_players2 = 0 if responseData ~= nil and responseData ~= "ERROR" then if responseData.players ~= nil then players2 = responseData.players end if responseData.maxPlayers ~= nil then max_players2 = responseData.maxPlayers end end setElementData(resourceRoot, other_server.." Players", tostring(players2) .."/".. tostring(max_players2), true) --Total local players_total = tostring(players + players2) setElementData(resourceRoot, "Total players online", players_total, true) end
local R = require "rigel" local SOC = require "generators.soc" local C = require "generators.examplescommon" local harness = require "generators.harnessSOC" local G = require "generators.core" local RM = require "generators.modules" local J = require "common" local types = require "types" types.export() local SDF = require "sdf" local Zynq = require "generators.zynq" local bjump = require "generators.bjump" R.AUTO_FIFOS = false -- bjump cache must load 32bit chunks -- this does a blur in X. we load 32 pixels in X and sum them. We decimate by 4x in X (read every 4 px), 8x in Y. -- axi bus is artificially slowed by 8x. If cache works, we expect runtime to be approx 128*64*8. If uncached, it should be 128*64*8*8 local NOCACHE = string.find(arg[0],"nocache") local W,H = 128,64 local regs = SOC.axiRegs({},SDF{1,W*H*8*8}):instantiate("regs") noc = Zynq.SimpleNOC(nil,nil,{{regs.read,regs.write}}):instantiate("ZynqNOC") noc.extern=true local PosToAddr = G.Function{"PosToAddr", types.rv(types.Par(types.array2d(u16,2))),SDF{1,1}, function(loc) local i = G.PosSeq{{8,1},0}(G.ValueToTrigger(loc)) -- inner loop from 0...2 local x = G.Mul( G.Add(loc[0],i[0]), R.constant(4,u16) ) -- (x+i.x)*4 return C.cast(u16,u32)(G.Add(G.Mul(loc[1],R.constant(1920*8,u16)),x)) end} local SlowRead = C.compose("SlowRead",SOC.read("1080p.raw",1920*1080,ar(u8,4),noc.read,false),RM.liftHandshake(RM.reduceThroughput(types.uint(32),8))) local SlowReadBurst = C.compose("SlowReadBurst",SOC.read("1080p.raw",1920*1080,ar(u8,4*8),noc.read,false),RM.liftHandshake(RM.reduceThroughput(types.uint(32),8))) local SlowBurstReadSer = C.compose("SlowBurstReadSer",G.SerSeq{8},SlowReadBurst) local CachedReadModule = G.Function{ "CachedReadModule", R.HandshakeTrigger, SDF{1,(W*H*8)}, function(i) local pos = G.Pos{{W,H}}(i) local posDup = G.Map{G.Broadcast{{8,1}}}(pos) local addr = G.Map{G.Map{PosToAddr}}(posDup) -- mult coords by 8 local stencil if NOCACHE then stencil = G.Map{G.Map{SlowRead}}(addr) else stencil = G.Map{G.Map{bjump.AXICachedRead(ar(u(8),4),8,8,SlowBurstReadSer)}}(addr) end stencil = G.Map{G.Flatten}(stencil) -- hack?: convert array of arrays which we read into a single array local shifted = G.Map{G.Map{G.Rshift{5}}}(stencil) local fin = G.Map{G.Reduce{G.Add{R.Async}}}(shifted) local res = G.AXIWriteBurst{"out/soc_bjump_cache"..J.sel(NOCACHE,"_nocache",""),noc.write}(fin) return res end} harness({regs.start, CachedReadModule, regs.done},nil,{regs})
-- luacheck: no max line length ------------------------------------------------------------------------------- -- Работа мышкой с выделением в редакторе. © SimSU ------------------------------------------------------------------------------- -- Умеет: -- первая таблица (действие): -- перемещать курсор за мышкой - команда "SelNone"; -- выделять обычные и вертикальные блоки - "SelNorm", "SelVert"; -- корректировать выделение обычных и вертикальных блоков - "CorNorm" и "CorVert"; -- выделять слово, строку как нормальный, так и как вертикальный блок - "WordNorm", "LineNorm" и "WordVert", "LineVert"; -- перетаскивать блоки, перетаскивать с копированием - "Move", "Copy"; -- вторая таблица (последействие): -- в буфер обмена вырезать, копировать, добавлять, вырезать с добавлением - "Copy", "Cut", "Add", "CutAdd"; -- удалять, вставлять и обменивать с буфером обмена - "Delete", "Paste" и "Replace". -- Различает состояния - ключи в соответствующей таблице: -- одинарный, двойной и т.д. клик мышки в выделенной области "InSel1", "InSel2", ... -- одинарный, двойной и т.д. клик мышки вне выделенной области "NotSel1", "NotSel2", ... -- одинарный, двойной и т.д. клик мышки в любой области при отсутствии действий для предыдущих состояний "Click1", "Click2", ... -- Пример: хотим выделить и вырезать в клипборд вертикальный блок - SimSU.Editor_MouseSelect.MouseSelect({Click1="SelVert"},{Click1="Cut"}) -- ещё хотим по двойному клику выделять и удалять слово - дополним таблицы... SimSU.Editor_MouseSelect.MouseSelect({Click1="SelVert",Click2="WordNorm"},{Click1="Cut",Click2="Delete"}) ---- Настройки local function Settings() -- Начало файла Profile\SimSU\Editor_MouseSelect.cfg return{ {-- Обычный блок: при клике в выделении корректируем, иначе выделяем, при двойном клике выделить слово, при тройном выделить строку. © SimSU" Key="MsLClick"; --Prior=50; --Sort=50; Action ={InSel1="CorNorm"; Click1="SelNorm"; Click2="WordNorm"; Click3="LineNorm"}; id="2718943b-0302-4bab-8db1-1d3369e4bf5d"}; {-- Вертикальный блок: При клике в выделении корректируем, иначе выделяем, при двойном клике выделить слово, при тройном выделить строку. © SimSU" Key="MsRClick AltMsLClick"; --Prior=50; --Sort=50; Action ={InSel1="CorVert"; Click1="SelVert"; Click2="WordVert"; Click3="LineVert"}; id="30d9c41b-3b50-4212-8f5f-df0350f2522e"}; {-- Обычный блок с копированием в буфер: при клике в выделении перетаскиваем копию, иначе выделяем, при двойном клике выделить слово, при тройном выделить строку. © SimSU" Key="CtrlMsLClick"; --Prior=50; --Sort=50; Action ={InSel1="Copy"; Click1="SelNorm"; Click2="WordNorm"; Click3="LineNorm" }; PostAct={ Click1="Copy" ; Click2="Copy" ; Click3="Copy" }; id="a70c91df-2ea4-4119-870d-f28c0bc7859a"}; {-- Обычный блок с вырезанием в буфер: при клике в выделении перетаскиваем, иначе выделяем, при двойном клике выделить слово, при тройном выделить строку. © SimSU" Key="ShiftMsLClick"; --Prior=50; --Sort=50; Action ={InSel1="Move"; Click1="SelNorm"; Click2="WordNorm"; Click3="LineNorm" }; PostAct={ Click1="Cut" ; Click2="Cut" ; Click3="Cut" }; id="238dc4e8-0b2d-4f34-9668-2718878ced0f"}; Timing=250 -- Максимальный интервал (мс) между кликами при превышении которого двойной, тройной и т.д. клик не будет засчитан. } -- Конец файла Profile\SimSU\Editor_MouseSelect.cfg end --! _G.far.lang=far.lang or win.GetEnv("farlang") -- Встроенные языки / Built-in laguages local function Messages() --if far.lang=="Russian" then -- Начало файла Profile\SimSU\SimSU\Editor_MouseSelectRussian.lng return{ -- Обычный блок: при клике в выделении корректируем, иначе выделяем, при двойном клике выделить слово, при тройном выделить строку. © SimSU" "Выделение обычного блока. © SimSU"; -- Вертикальный блок: При клике в выделении корректируем, иначе выделяем, при двойном клике выделить слово, при тройном выделить строку. © SimSU" "Выделение вертикального блока. © SimSU"; -- Обычный блок с копированием в буфер: при клике в выделении перетаскиваем копию, иначе выделяем, при двойном клике выделить слово, при тройном выделить строку. © SimSU" "Выделение с копированием. © SimSU"; -- Обычный блок с вырезанием в буфер: при клике в выделении перетаскиваем, иначе выделяем, при двойном клике выделить слово, при тройном выделить строку. © SimSU" "Выделение с вырезанием. © SimSU"; } -- Конец файла Profile\SimSU\Editor_MouseSelectRussian.lng end --end --! local M=(loadfile(win.GetEnv("FARPROFILE").."\\SimSU\\Editor_MouseSelect"..far.lang..".lng") or Messages)() --! local S=(loadfile(win.GetEnv("FARLOCALPROFILE").."\\SimSU\\Editor_MouseSelect.cfg") or loadfile(win.GetEnv("FARPROFILE").."\\SimSU\\Editor_MouseSelect.cfg") or Settings)() local M=Messages() local S=Settings() local SimSU= _G.SimSU or {} ------------------------------------------------------------------------------- local TitleBar,KeyBar,ScrollBar S.Timing = S.Timing==nil and Settings().Timing or S.Timing local function Condition() -- Функция инициализации переменных и проверки условия запуска макроса, -- чтобы не запускать макрос при кликах в скролбар, функциональные клавиши и т.п. TitleBar=Far.Cfg_Get("Editor","ShowTitleBar") -- Если строка статуса включена, то надо корректировать координату Y мыши и не выделять если в неё кликнули. KeyBar=Far.KeyBar_Show(0) -- Если кейбар включен, то не выделять если в него кликнули. ScrollBar=Editor.Set(15,-1) -- Если скролбар включен, то не выделять если в него кликнули. return Mouse.X<Far.Width-ScrollBar and Mouse.Y>=TitleBar and Mouse.Y<Far.Height-KeyBar -- Кликнули в текст, значит разрешим макрос макрос. end local function MouseToText() -- Функция пересчёта экранных координат мышки в координаты текста. local X0,Y0 = Editor.Pos(0,5),Editor.Pos(0,4) local Yc= Mouse.Y==TitleBar-1 and Y0 or Mouse.Y>=Far.Height-1-KeyBar and Y0+Far.Height-1-TitleBar-KeyBar or Y0+Mouse.Y-TitleBar local Xc= Mouse.X==0 and X0 or Mouse.X>=Far.Width-1-ScrollBar and X0+Far.Width-1-ScrollBar or X0+Mouse.X return Xc,Yc,X0,Y0 -- Координаты курсора и координаты экрана. end local function MouseMove(SelMode,Xb,Yb) -- Функция обработки движения мышки. local MM=mmode(1,1) -- Запретим перерисовку экрана. local EOL=Editor.Set(7,1) -- Разрешим "курсор за пределами строки". local Xc,Yc,X0,Y0 = MouseToText() if not ((SelMode==1 or SelMode==2) and Xb and Yb) then Xb=Xc; Yb=Yc end -- За начало примем текущие координаты. while Mouse.Button~=0 do if SelMode==1 or SelMode==2 then -- Выделение. И магия :) для табов с вертикальными блоками. Editor.Pos(1,1,Yb); Editor.Pos(1,4-SelMode,Xb); Editor.Sel(SelMode+1,0) Editor.Pos(1,1,Yc); Editor.Pos(1,4-SelMode,Xc); Editor.Sel(SelMode+1,1) end Editor.Pos(1,4,Y0); Editor.Pos(1,5,X0) -- Координаты экрана. Editor.Pos(1,1,Yc); Editor.Pos(1,3,Xc) -- Координаты курсора в тексте. mmode(1,mmode(1,0),Editor.Pos(1,2,nil)) -- Перерисуем экран. Двинем курсор для колорера. mf.waitkey(1) Xc,Yc,X0,Y0 = MouseToText() -- Новые координаты. -- Скроллирование. if Xc==X0 and X0>1 then X0=X0-1 Xc=X0 elseif Xc==X0+Far.Width-1-ScrollBar then X0=X0+1; Xc=X0+Far.Width-1-ScrollBar end if Yc==Y0 and Y0>1 then Y0=Y0-1 Yc=Y0 elseif Yc==Y0+Far.Height-1-KeyBar-TitleBar and Yc<Editor.Lines then Y0=Y0+1; Yc=Y0+Far.Height-1-KeyBar-TitleBar end end Editor.Set(7,EOL) -- Восстановим состояние "курсор за пределами строки". mmode(1,MM) -- Восстановим состояние отрисовки. end local function ClickInSel() -- Функция проверки на клик в выделенной области. local Xc,Yc,X0,Y0 = MouseToText() local St=Editor.Sel(0,4); local Yb= St==0 and Yc or Editor.Sel(0,0); local Xb= St==0 and Xc or Editor.Sel(0,1); local Ye= St==0 and Yc or Editor.Sel(0,2); local Xe= St==0 and Xc or Editor.Sel(0,3) -- Тип и координаты выделения. local Sl=(St==0 or (St>0 and Yc<=Ye and Yc>=Yb)) -- Курсор в строках где есть выделение. local Sp=(Sl and ((St==2 and Xc>=Xb and Xc<=Xe) or (St==1 and ((Yb~=Ye and Yc==Yb and Xc>=Xb) or (Yb~=Ye and Yc==Ye and Xc<=Xe) or (Yb==Ye and Xc>=Xb and Xc<=Xe) or (Yb~=Ye and Yc~=Yb and Yc~=Ye))))) -- Курсор точно в выделении. if not Sp then Xb=nil; Yb=nil -- Если кликнули не в выделенной области, то считаем, что и выделения нет. else if (Xb-Xc)^2+(Yb-Yc)^2<(Xe-Xc)^2+(Ye-Yc)^2 then Xb,Yb = Xe,Ye end -- За начало выделенной области примем её дальний от места клика угол. end return Xb,Yb,X0,Y0 -- Координаты начала выделенного блока и координаты экрана. end local function SelWord(SelectType,Line,Column) -- Функция выделения слова. local St= SelectType or 1 local Xc,Yc if Line and Column then Yc,Xc = Line,Column else Xc,Yc = MouseToText() end Editor.Pos(1,1,Yc); Editor.Pos(1,3,Xc) local s=Editor.Value; local Xct=Editor.RealPos local Xe=Xct while s:sub(Xe,Xe):find("[%w_]") do Xe=Xe+1 end-- Ищем конец слова c курсором. local Xb=Xct while s:sub(Xb-1,Xb-1):find("[%w_]") do Xb=Xb-1 end -- Ищем начало слова c курсором. Editor.Pos(1,2,Xb); Editor.Sel(St+1,0); Editor.Pos(1,2,Xe); Editor.Sel(St+1,1) -- Выделяем найденное слово, если слово не нашли, то выделение просто снимется из-за равенства Beg и End. mmode(1,mmode(1,0),Editor.Pos(1,2,Xct)) -- Перерисуем экран. Двинем курсор для колорера. end local function SelLine(SelectType,Line,Column) -- Функция выделения строки. local St= SelectType or 1 local Xc,Yc if Line then Yc=Line; Xc= Column or Editor.CurPos else Xc,Yc = MouseToText() end local Yb=Yc; local Ye= St==1 and Yc<Editor.Lines and Yc+1 or Yc Editor.Pos(1,1,Yc); local s=Editor.Value local Xb=1; local Xe= Yb~=Ye and 1 or s:len()+1 Editor.Pos(1,1,Yb); Editor.Pos(1,2,Xb); Editor.Sel(St+1,0); Editor.Pos(1,1,Ye); Editor.Pos(1,2,Xe); Editor.Sel(St+1,1) Editor.Pos(1,1,Yc) -- Координаты курсора в тексте. mmode(1,mmode(1,0),Editor.Pos(1,2,Xc)) -- Перерисуем экран. Двинем курсор для колорера. end local function MouseSelect(Action,PostAct) -- Функция работы мышкой с выделением в редакторе. © SimSU local NumClick=1 local PA=true while NumClick do local Act = Action ~=nil and ((Editor.Sel(0,4)>0 and ClickInSel() and Action ["InSel"..NumClick]) or (Editor.Sel(0,4)>0 and not ClickInSel() and Action ["NotSel"..NumClick]) or Action ["Click"..NumClick]) local PAct= PostAct~=nil and ((Editor.Sel(0,4)>0 and ClickInSel() and PostAct["InSel"..NumClick]) or (Editor.Sel(0,4)>0 and not ClickInSel() and PostAct["NotSel"..NumClick]) or PostAct["Click"..NumClick]) if Act=="SelNorm" then MouseMove(1) elseif Act=="SelVert" then MouseMove(2) elseif Act=="SelNone" then MouseMove(0) elseif Act=="CorNorm" then local Xb,Yb = ClickInSel(); MouseMove(1,Xb,Yb) elseif Act=="CorVert" then local Xb,Yb = ClickInSel(); MouseMove(2,Xb,Yb) elseif Act=="WordNorm" then SelWord(1) elseif Act=="WordVert" then SelWord(2) elseif Act=="LineNorm" then SelLine(1) elseif Act=="LineVert" then SelLine(2) elseif Act=="Move" then local PB=Editor.Set(2,1); MouseMove(0); Keys("CtrlM"); Editor.Set(2,PB); PA=false elseif Act=="Copy" then local PB=Editor.Set(2,1); MouseMove(0); Keys("CtrlP"); Editor.Set(2,PB); PA=false end if PA and PAct=="Copy" then mf.clip(1,Editor.SelValue) elseif PA and PAct=="Cut" then mf.clip(1,Editor.SelValue); editor.DeleteBlock() --Keys("CtrlD") elseif PA and PAct=="Add" then mf.clip(2,Editor.SelValue) elseif PA and PAct=="CutAdd" then mf.clip(2,Editor.SelValue); editor.DeleteBlock() --Keys("CtrlD") elseif PA and PAct=="Delete" then editor.DeleteBlock() -- Keys("CtrlD") elseif PA and PAct=="Paste" then Keys("CtrlV") elseif PA and PAct=="Replace" then local s=Editor.SelValue; editor.DeleteBlock() Keys("CtrlV"); mf.clip(1,s) end local VK=mf.waitkey(S.Timing) NumClick= VK:find("Click",1,true) and NumClick+1 or nil end end; ------------------------------------------------------------------------------- local Editor_MouseSelect={ Condition = Condition ; MouseToText = MouseToText; MouseMove = MouseMove ; ClickInSel = ClickInSel ; SelWord = SelWord ; SelLine = SelLine ; MouseSelect = MouseSelect; } local function filename(args) return MouseSelect(args[1],args[2]) end ------------------------------------------------------------------------------- if _filename then return filename(...) end if not Macro then return {Editor_MouseSelect=Editor_MouseSelect} end SimSU.Editor_MouseSelect=Editor_MouseSelect; _G.SimSU=SimSU ------------------------------------------------------------------------------- for i=1,#S do Macro {id=S[i].id; area="Editor"; key=S[i].Key; priority=S[i].Prior; sortpriority=S[i].Sort; description=M[i]; condition=Condition; action=function() MouseSelect(S[i].Action,S[i].PostAct) end; } end
--////////////////////////////////////////////////////////// -- Name: Operation Clear Field Escalation - Generals Module -- Author: Surrexen ༼ つ ◕_◕ ༽つ (づ。◕‿◕。)づ --////////////////////////////////////////////////////////// --[[ -- AIRBASE.Caucasus.Anapa_Vityazevo -- AIRBASE.Caucasus.Batumi -- AIRBASE.Caucasus.Beslan -- AIRBASE.Caucasus.Gelendzhik -- AIRBASE.Caucasus.Gudauta -- AIRBASE.Caucasus.Kobuleti -- AIRBASE.Caucasus.Krasnodar_Center -- AIRBASE.Caucasus.Krasnodar_Pashkovsky -- AIRBASE.Caucasus.Krymsk -- AIRBASE.Caucasus.Kutaisi -- AIRBASE.Caucasus.Maykop_Khanskaya -- AIRBASE.Caucasus.Mineralnye_Vody -- AIRBASE.Caucasus.Mozdok -- AIRBASE.Caucasus.Nalchik -- AIRBASE.Caucasus.Novorossiysk -- AIRBASE.Caucasus.Senaki_Kolkhi -- AIRBASE.Caucasus.Sochi_Adler -- AIRBASE.Caucasus.Soganlug -- AIRBASE.Caucasus.Sukhumi_Babushara -- AIRBASE.Caucasus.Tbilisi_Lochini -- AIRBASE.Caucasus.Vaziani ]]-- ------------------------------------------------------------------------------------------------------------------------------------------------- --////VARIABLES IranianCICName = "Major General Seyyed Abdolrahim Mousavi" IranianAirforceGeneralName = "Brigadier General Aziz Nasirzadeh" IranianNavyAdmiralName = "Rear Admiral Hossein Khanzadi" RussianCICName = "General of the Army Valery Vasilyevich Gerasimov" RussianAirforceGeneralName = "Colonel General Sergei Vladimirovich Surovikin" RussianNavyAdmiralName = "Admiral Nikolai Yevmenov" USAFCICName = "President Donald Trump" USAFAirforceGeneralName = "General David Goldfein" USAFNavyAdmiralName = "Admiral Michael Gilday" SyAAFCICName = "Bashar al-Assad" SyAAFAirforceGeneralName = "General Issam Hallaq" BlueStrikeFrequencyMin = 900 BlueStrikeFrequencyMax = 2200 RedStrikeFrequencyMin = 900 RedStrikeFrequencyMax = 2200 SYAAFAN26BGROUPNAME = "" IRIAFMI8GROUPNAME = "" USAFC130GROUPNAME = "" USAFUH60AGROUPNAME = "" SYAAFSU24MGROUPNAME = "" VVSSU25TGROUPNAME = "" VVSTU95MSGROUPNAME = "" VVSTU160GROUPNAME = "" VVSTU22M3GROUPNAME = "" USAFB1BGROUPNAME = "" USAFB52HGROUPNAME = "" CaptureMessageLockout = 0 AutomatedBlueStrikes = 1 ------------------------------------------------------------------------------------------------------------------------------------------------- --////TABLES SEF_AIRBASES = { AIRBASE.Caucasus.Anapa_Vityazevo, AIRBASE.Caucasus.Batumi, AIRBASE.Caucasus.Beslan, AIRBASE.Caucasus.Gelendzhik, AIRBASE.Caucasus.Gudauta, AIRBASE.Caucasus.Kobuleti, AIRBASE.Caucasus.Krasnodar_Center, AIRBASE.Caucasus.Krasnodar_Pashkovsky, AIRBASE.Caucasus.Krymsk, AIRBASE.Caucasus.Kutaisi, AIRBASE.Caucasus.Maykop_Khanskaya, AIRBASE.Caucasus.Mineralnye_Vody, AIRBASE.Caucasus.Mozdok, AIRBASE.Caucasus.Nalchik, AIRBASE.Caucasus.Novorossiysk, AIRBASE.Caucasus.Senaki_Kolkhi, AIRBASE.Caucasus.Sochi_Adler, AIRBASE.Caucasus.Soganlug, AIRBASE.Caucasus.Sukhumi_Babushara, AIRBASE.Caucasus.Tbilisi_Lochini, AIRBASE.Caucasus.Vaziani } SEF_OFFLIMITSAIRBASESFORRED = { AIRBASE.Caucasus.Kutaisi, AIRBASE.Caucasus.Senaki_Kolkhi, AIRBASE.Caucasus.Batumi, AIRBASE.Caucasus.Tbilisi_Lochini, AIRBASE.Caucasus.Kobuleti } SEF_OFFLIMITSAIRBASESFORBLUE = { AIRBASE.Caucasus.Anapa_Vityazevo } CurrentRedAirbases ={} -- All current red airbases CurrentBlueAirbases ={} -- All current blue airbases CurrentNeutralAirbases ={} -- All current neutral airbases CurrentNonRedAirbases = {} -- All current non-red airbases CurrentNonBlueAirbases = {} -- All current non-blue airbases CurrentRedNeighbours = {} -- All non red airfields connected to existing red airfields CurrentBlueNeighbours = {} -- All non blue airfields connected to existing blue airfields CurrentNonRedNeighbours = {} CurrentNonBlueNeighbours = {} SortedNoDuplicatesResult = {} FinalAirbaseSelectionList = {} -- List filtered against 'off limits' airbases such as Anapa ------------------------------------------------------------------------------------------------------------------------------------------------- --////FUNCTIONS function SEF_GETREDAIRBASES(AirbaseList) CurrentRedAirbases ={} for i, ab in ipairs(AirbaseList) do local airbase = Airbase.getByName(ab) if ( airbase:getCoalition() == 1 ) then table.insert(CurrentRedAirbases, ab) end end end function SEF_GETBLUEAIRBASES(AirbaseList) CurrentBlueAirbases ={} for i, ab in ipairs(AirbaseList) do local airbase = Airbase.getByName(ab) if ( airbase:getCoalition() == 2 ) then table.insert(CurrentBlueAirbases, ab) end end end function SEF_GETNEUTRALAIRBASES(AirbaseList) CurrentNeutralAirbases ={} for i, ab in ipairs(AirbaseList) do local airbase = Airbase.getByName(ab) if ( airbase:getCoalition() == 0 ) then table.insert(CurrentNeutralAirbases, ab) end end end function SEF_GETNONREDAIRBASES(AirbaseList) CurrentNonRedAirbases = {} for i, ab in ipairs(AirbaseList) do local airbase = Airbase.getByName(ab) if ( airbase:getCoalition() == 0 or airbase:getCoalition() == 2 ) then table.insert(CurrentNonRedAirbases, ab) end end end function SEF_GETNONBLUEAIRBASES(AirbaseList) CurrentNonBlueAirbases = {} for i, ab in ipairs(AirbaseList) do local airbase = Airbase.getByName(ab) if ( airbase:getCoalition() == 0 or airbase:getCoalition() == 1 ) then table.insert(CurrentNonBlueAirbases, ab) end end end function SEF_LISTREDAIRBASES() if ( CurrentRedAirbases[1] ~= nil ) then trigger.action.outText("Current Red Airbases Are:",15) for x, y in ipairs(CurrentRedAirbases) do trigger.action.outText(y,15) end else trigger.action.outText("Red Coalition Does Not Have Any Airbases",15) end end function SEF_LISTFRONTLINEREDAIRBASES() if ( CurrentRedAirbases[1] ~= nil ) then trigger.action.outText("Current Red Front Line Airbases Are:",15) for x, y in ipairs(CurrentRedAirbases) do trigger.action.outText(y,15) end else trigger.action.outText("Red Coalition Does Not Have Any Front Line Airbases, Which Means Something Is Horribly Wrong",15) end end function SEF_LISTBLUEAIRBASES() if ( CurrentBlueAirbases[1] ~= nil ) then trigger.action.outText("Current Blue Airbases Are:",15) for x, y in ipairs(CurrentBlueAirbases) do trigger.action.outText(y,15) end else trigger.action.outText("Blue Coalition Does Not Have Any Airbases, Which Means Something Is Horribly Wrong",15) end end function SEF_LISTNEUTRALAIRBASES() if ( CurrentNeutralAirbases[1] ~= nil ) then trigger.action.outText("Current Neutral Airbases Are:",15) for x, y in ipairs(CurrentNeutralAirbases) do trigger.action.outText(y,15) end else trigger.action.outText("Neutral Coalition Does Not Have Any Airbases",15) end end function SEF_LISTNONREDAIRBASES() if ( CurrentNonRedAirbases[1] ~= nil ) then trigger.action.outText("Current Non-Red Airbases Are:",15) for x, y in ipairs(CurrentNonRedAirbases) do trigger.action.outText(y,15) end else trigger.action.outText("There Are Currently No Non-Red Airbases",15) end end function SEF_LISTNONBLUEAIRBASES() if ( CurrentNonBlueAirbases[1] ~= nil ) then trigger.action.outText("Current Non-Blue Airbases Are:",15) for x, y in ipairs(CurrentNonBlueAirbases) do trigger.action.outText(y,15) end else trigger.action.outText("There Are Currently No Non-Blue Airbases",15) end end ------------------------------------------------------------------------------------------------------------------------------------------------- function SEF_GETTABLELENGTH(Table) local TableLengthCount = 0 for _ in pairs(Table) do TableLengthCount = TableLengthCount + 1 end return TableLengthCount end function SEF_CHOOSERANDOMFROMTABLE(Table) if ( Table[1] ~= nil ) then local TableLength = SEF_GETTABLELENGTH(Table) local Randomiser = math.random(1,TableLength) return Table[Randomiser] else return nil end end ------------------------------------------------------------------------------------------------------------------------------------------------- function SEF_GETREDCURRENTNEIGHBOURS() if ( CurrentRedAirbases[1] ~= nil ) then CurrentRedNeighbours = {} for a, b in ipairs(CurrentRedAirbases) do for x, y in ipairs(SEF_AIRBASEINFORMATION) do Name = SEF_AIRBASEINFORMATION[x].AirbaseName if ( Name == b ) then for i=1, #(SEF_AIRBASEINFORMATION[x].Neighbours) do table.insert(CurrentRedNeighbours, SEF_AIRBASEINFORMATION[x].Neighbours[i]) end else end end end SEF_GETREDCURRENTNEIGHBOURSNODUPLICATES() else trigger.action.outText("Cannot acquire neighbouring airfields for red coalition as red does not have any airbases", 15) end end function SEF_GETBLUECURRENTNEIGHBOURS() if ( CurrentBlueAirbases[1] ~= nil ) then CurrentBlueNeighbours = {} for a, b in ipairs(CurrentBlueAirbases) do for x, y in ipairs(SEF_AIRBASEINFORMATION) do Name = SEF_AIRBASEINFORMATION[x].AirbaseName if ( Name == b ) then for i=1, #(SEF_AIRBASEINFORMATION[x].Neighbours) do table.insert(CurrentBlueNeighbours, SEF_AIRBASEINFORMATION[x].Neighbours[i]) end else end end end SEF_GETBLUECURRENTNEIGHBOURSNODUPLICATES() else trigger.action.outText("Cannot acquire neighbouring airfields for blue coalition as blue does not have any airbases", 15) end end function SEF_GETNONREDCURRENTNEIGHBOURS() if ( CurrentNonRedAirbases[1] ~= nil ) then CurrentNonRedNeighbours = {} for a, b in ipairs(CurrentNonRedAirbases) do for x, y in ipairs(SEF_AIRBASEINFORMATION) do Name = SEF_AIRBASEINFORMATION[x].AirbaseName if ( Name == b ) then for i=1, #(SEF_AIRBASEINFORMATION[x].Neighbours) do table.insert(CurrentNonRedNeighbours, SEF_AIRBASEINFORMATION[x].Neighbours[i]) end else end end end SEF_GETNONREDCURRENTNEIGHBOURSNODUPLICATES() else trigger.action.outText("Cannot acquire neighbouring airfields for non-red coalition as non-red does not have any airbases", 15) end end function SEF_LISTCURRENTREDNEIGHBOURS() for key,value in ipairs(CurrentRedNeighbours) do trigger.action.outText(key.." "..value.."", 15) end end function SEF_LISTCURRENTBLUENEIGHBOURS() for key,value in ipairs(CurrentBlueNeighbours) do trigger.action.outText(key.." "..value.."", 15) end end ------------------------------------------------------------------------------------------------------------------------------------------------- function SEF_SORTREMOVEDUPLICATES(Table) if ( Table[1] ~= nil ) then local TempTable = Table table.sort(TempTable) SortedNoDuplicatesResult = {} for key,value in ipairs(TempTable) do if value ~=TempTable[key+1] then table.insert(SortedNoDuplicatesResult,value) end end --Debug Text --for key,value in ipairs(SortedNoDuplicatesResult) do -- trigger.action.outText(key.." "..value.."", 15) --end else trigger.action.outText("Cannot sort table as the table is empty",15) end end ------------------------------------------------------------------------------------------------------------------------------------------------- function SEF_REFRESHAIRBASETABLES() --Populate the tables to get the current situation, potentially these tables could be empty SEF_GETREDAIRBASES(SEF_AIRBASES) SEF_GETBLUEAIRBASES(SEF_AIRBASES) SEF_GETNEUTRALAIRBASES(SEF_AIRBASES) SEF_GETNONREDAIRBASES(SEF_AIRBASES) SEF_GETNONBLUEAIRBASES(SEF_AIRBASES) end function SEF_GETREDCURRENTNEIGHBOURSNODUPLICATES() SEF_SORTREMOVEDUPLICATES(CurrentRedNeighbours) CurrentRedNeighbours = SortedNoDuplicatesResult end function SEF_GETBLUECURRENTNEIGHBOURSNODUPLICATES() SEF_SORTREMOVEDUPLICATES(CurrentBlueNeighbours) CurrentBlueNeighbours = SortedNoDuplicatesResult end function SEF_GETNONREDCURRENTNEIGHBOURSNODUPLICATES() SEF_SORTREMOVEDUPLICATES(CurrentNonRedNeighbours) CurrentNonRedNeighbours = SortedNoDuplicatesResult end ------------------------------------------------------------------------------------------------------------------------------------------------- function SEF_REDGENERAL_SELECTNEUTRALTARGETAIRBASE() SEF_REFRESHAIRBASETABLES() local NeutralTargetAirbase = nil SEF_GETREDCURRENTNEIGHBOURS() --Get the neighbours list and removes duplicates from itself SEF_GETNEUTRALAIRBASES(CurrentRedNeighbours) --Get the neutral airbases from the search results SEF_FINALFILTER(CurrentNeutralAirbases, SEF_OFFLIMITSAIRBASESFORRED) --Filter list against anything off limits NeutralTargetAirbase = SEF_CHOOSERANDOMFROMTABLE(FinalAirbaseSelectionList) --Pick the random one out of the list of neutrals that are not off limits --if ( NeutralTargetAirbase ~= nil ) then -- trigger.action.outText("Picking Neutral Airbase "..NeutralTargetAirbase,15) --end return NeutralTargetAirbase end function SEF_REDGENERAL_SELECTBLUETARGETAIRBASE() SEF_REFRESHAIRBASETABLES() local BlueTargetAirbase = nil SEF_GETREDCURRENTNEIGHBOURS() SEF_GETBLUEAIRBASES(CurrentRedNeighbours) SEF_FINALFILTER(CurrentBlueAirbases, SEF_OFFLIMITSAIRBASESFORRED) BlueTargetAirbase = SEF_CHOOSERANDOMFROMTABLE(FinalAirbaseSelectionList) --trigger.action.outText("Picking Defended "..BlueTargetAirbase,15) return BlueTargetAirbase end function SEF_BLUEGENERAL_SELECTNEUTRALTARGETAIRBASE() SEF_REFRESHAIRBASETABLES() local NeutralTargetAirbase = nil SEF_GETBLUECURRENTNEIGHBOURS() --Get the neighbours list and removes duplicates from itself SEF_GETNEUTRALAIRBASES(CurrentBlueNeighbours) --Get the neutral airbases from the search results SEF_FINALFILTER(CurrentNeutralAirbases, SEF_OFFLIMITSAIRBASESFORBLUE) --Filter list against anything off limits NeutralTargetAirbase = SEF_CHOOSERANDOMFROMTABLE(FinalAirbaseSelectionList) --Pick the random one out of the list of neutrals that are not off limits --if ( NeutralTargetAirbase ~= nil ) then -- trigger.action.outText("Picking Neutral Airbase "..NeutralTargetAirbase,15) --end return NeutralTargetAirbase end function SEF_BLUEGENERAL_SELECTREDTARGETAIRBASE() SEF_REFRESHAIRBASETABLES() local RedTargetAirbase = nil SEF_GETBLUECURRENTNEIGHBOURS() SEF_GETREDAIRBASES(CurrentBlueNeighbours) SEF_FINALFILTER(CurrentRedAirbases, SEF_OFFLIMITSAIRBASESFORBLUE) RedTargetAirbase = SEF_CHOOSERANDOMFROMTABLE(FinalAirbaseSelectionList) --trigger.action.outText("Picking Defended "..RedTargetAirbase,15) return RedTargetAirbase end function SEF_REDGENERAL_CHOOSEDEPARTUREAIRBASE() SEF_REFRESHAIRBASETABLES() SEF_GETBLUECURRENTNEIGHBOURS() SEF_GETNONBLUEAIRBASES(CurrentBlueNeighbours) SEF_GETREDAIRBASES(CurrentNonBlueAirbases) RedDepartureAirbase = SEF_CHOOSERANDOMFROMTABLE(CurrentRedAirbases) if RedDepartureAirbase ~= nil then --trigger.action.outText(RussianAirforceGeneralName.." Is Choosing "..RedDepartureAirbase.." As The Origin", 15) else RedDepartureAirbase = AIRBASE.Caucasus.Anapa_Vityazevo --trigger.action.outText(RussianAirforceGeneralName.." Is Choosing "..RedDepartureAirbase.." As The Origin", 15) end return RedDepartureAirbase end function SEF_BLUEGENERAL_CHOOSEDEPARTUREAIRBASE() SEF_REFRESHAIRBASETABLES() SEF_GETREDCURRENTNEIGHBOURS() SEF_GETNONREDAIRBASES(CurrentRedNeighbours) SEF_GETBLUEAIRBASES(CurrentNonRedAirbases) BlueDepartureAirbase = SEF_CHOOSERANDOMFROMTABLE(CurrentBlueAirbases) if BlueDepartureAirbase ~= nil then --trigger.action.outText(USAFAirforceGeneralName.." Is Choosing "..BlueDepartureAirbase.." As The Origin", 15) else BlueDepartureAirbase = "Incirlik" --trigger.action.outText(USAFAirforceGeneralName.." Is Choosing "..BlueDepartureAirbase.." As The Origin", 15) end return BlueDepartureAirbase end function SEF_REDGENERAL_ATTACKAIRBASE(TimeLoop, time) if ( Group.getByName(SYAAFAN26BGROUPNAME) ) then if ( GROUP:FindByName(SYAAFAN26BGROUPNAME):InAir() == false and GROUP:FindByName(SYAAFAN26BGROUPNAME):GetVelocityKMH() < 8 ) then --Transport plane must be inactive, remove it Group.getByName(SYAAFAN26BGROUPNAME):destroy() elseif ( Group.getByName(VVSSU25TGROUPNAME) or Group.getByName(SYAAFSU24MGROUPNAME) or Group.getByName(VVSTU95MSGROUPNAME) or Group.getByName(VVSTU160GROUPNAME) or Group.getByName(VVSTU22M3GROUPNAME) ) then --Wait some more we still have planes in the air else --Wait some more the transport is still in the air end elseif ( Group.getByName(IRIAFMI8GROUPNAME) ) then if ( GROUP:FindByName(IRIAFMI8GROUPNAME):InAir() == false and GROUP:FindByName(IRIAFMI8GROUPNAME):GetVelocityKMH() < 8 ) then --Transport helo must be inactive, remove it Group.getByName(IRIAFMI8GROUPNAME):destroy() elseif ( Group.getByName(VVSSU25TGROUPNAME) or Group.getByName(SYAAFSU24MGROUPNAME) or Group.getByName(VVSTU95MSGROUPNAME) or Group.getByName(VVSTU160GROUPNAME) or Group.getByName(VVSTU22M3GROUPNAME) ) then --Wait some more we still have planes in the air else --Wait some more the transport is still in the air end elseif ( Group.getByName(VVSSU25TGROUPNAME) or Group.getByName(SYAAFSU24MGROUPNAME) or Group.getByName(VVSTU95MSGROUPNAME) or Group.getByName(VVSTU160GROUPNAME) or Group.getByName(VVSTU22M3GROUPNAME) ) then --Wait some more we still have planes in the air else AttackUndefended = SEF_REDGENERAL_SELECTNEUTRALTARGETAIRBASE() AttackDefended = SEF_REDGENERAL_SELECTBLUETARGETAIRBASE() Origin = SEF_REDGENERAL_CHOOSEDEPARTUREAIRBASE() if ( AttackUndefended ~= nil and ( AttackDefended ~= nil or AttackDefended == nil) ) then --Try to capitalise on an undefended (neutral) airbase as priority if ( AttackUndefended ~= nil and Origin ~= nil ) then --trigger.action.outText(RussianAirforceGeneralName.." Is Selecting "..AttackUndefended.." As The Target Airbase And "..Origin.." As The Departure Airbase For A C-130 Mission", 60) trigger.action.outText("Intelligence Reports Indicate "..RussianAirforceGeneralName.." Is Mobilising Aircraft", 60) SEF_SYAAFAN26BSPAWN(Origin, AttackUndefended) elseif ( AttackUndefended ~= nil and Origin == nil ) then --trigger.action.outText(RussianAirforceGeneralName..": No available options for an attack origin on C-130 misson, passing this round",60) elseif ( AttackUndefended == nil and Origin ~= nil ) then --trigger.action.outText(RussianAirforceGeneralName..": No available options for an attack destination on C-130 misson, passing this round",60) else --trigger.action.outText(RussianAirforceGeneralName..": No options for an attack destination or an attack origin on C-130 misson, passing this round",60) end elseif ( AttackUndefended == nil and AttackDefended ~= nil ) then --There are no undefended (neutral) airbases to attack, so we need to send a helo instead as we can't land on a defended airfield. Also consider launching SEAD/CAS. if ( AttackDefended ~= nil and Origin ~= nil ) then trigger.action.outText("Intelligence Reports Indicate "..RussianAirforceGeneralName.." Is Mobilising Aircraft", 60) SEF_IRIAFMI8SPAWN(Origin, AttackDefended) SEF_REDSTRIKE(Origin, AttackDefended) elseif ( AttackDefended ~= nil and Origin == nil ) then --trigger.action.outText(RussianAirforceGeneralName..": No available options for an attack origin on strike mission, passing this round",60) elseif ( AttackDefended == nil and Origin ~= nil ) then --trigger.action.outText(RussianAirforceGeneralName..": No available options for an attack destination on strike mission, passing this round",60) else --trigger.action.outText(RussianAirforceGeneralName..": No options for an attack destination or an attack origin on strike mission, passing this round",60) end else --trigger.action.outText(RussianAirforceGeneralName..": No options for an C-130 mission, or strike mission, passing this round",60) end end return time + math.random(RedStrikeFrequencyMin, RedStrikeFrequencyMax) end function SEF_BLUEGENERAL_ATTACKAIRBASE(TimeLoop, time) --trigger.action.outText("Blue Attack Airbase Function Called", 15) if ( Group.getByName(USAFC130GROUPNAME) ) then if ( GROUP:FindByName(USAFC130GROUPNAME):InAir() == false and GROUP:FindByName(USAFC130GROUPNAME):GetVelocityKMH() < 8 ) then --Transport plane must be inactive, remove it Group.getByName(USAFC130GROUPNAME):destroy() else --Do nothing the transport is still in the air --trigger.action.outText(USAFAirforceGeneralName.." Is Awaiting The Result Of The Current Mission",15) end elseif ( Group.getByName(USAFUH60AGROUPNAME) ) then if ( GROUP:FindByName(USAFUH60AGROUPNAME):InAir() == false and GROUP:FindByName(USAFUH60AGROUPNAME):GetVelocityKMH() < 8 ) then --Transport helo must be inactive, remove it Group.getByName(USAFUH60AGROUPNAME):destroy() else --trigger.action.outText(USAFAirforceGeneralName.." Is Awaiting The Result Of The Current Mission",15) end else AttackUndefended = SEF_BLUEGENERAL_SELECTNEUTRALTARGETAIRBASE() AttackDefended = SEF_BLUEGENERAL_SELECTREDTARGETAIRBASE() Origin = SEF_BLUEGENERAL_CHOOSEDEPARTUREAIRBASE() if ( AttackUndefended ~= nil and ( AttackDefended ~= nil or AttackDefended == nil) ) then --Try to capitalise on an undefended (neutral) airbase as priority if ( AttackUndefended ~= nil and Origin ~= nil ) then trigger.action.outText(USAFAirforceGeneralName.." Is Commencing A Mission To Capture "..AttackUndefended.." From "..Origin, 60) SEF_USAFC130SPAWN(Origin, AttackUndefended) elseif ( AttackUndefended ~= nil and Origin == nil ) then --trigger.action.outText(USAFAirforceGeneralName..": No available options for an attack origin on C-130 misson, passing this round",60) elseif ( AttackUndefended == nil and Origin ~= nil ) then --trigger.action.outText(USAFAirforceGeneralName..": No available options for an attack destination on C-130 misson, passing this round",60) else --trigger.action.outText(USAFAirforceGeneralName..": No options for an attack destination or an attack origin on C-130 misson, passing this round",60) end elseif ( AttackUndefended == nil and AttackDefended ~= nil ) then if ( AttackDefended ~= nil and Origin ~= nil ) then trigger.action.outText(USAFAirforceGeneralName.." Is Commencing A Mission To Capture "..AttackDefended.." From "..Origin, 60) SEF_USAFUH60ASPAWN(Origin, AttackDefended) SEF_BLUESTRIKE(Origin, AttackDefended) elseif ( AttackDefended ~= nil and Origin == nil ) then --trigger.action.outText(USAFAirforceGeneralName..": No available options for an attack origin on a UH-60A mission, passing this round",60) elseif ( AttackDefended == nil and Origin ~= nil ) then --trigger.action.outText(USAFAirforceGeneralName..": No available options for an attack destination on a UH-60A mission, passing this round",60) else --trigger.action.outText(USAFAirforceGeneralName..": No options for an attack destination or an attack origin on a UH-60A mission, passing this round",60) end else --trigger.action.outText(USAFAirforceGeneralName..": No options for a C-130 mission, or a UH-60A mission, passing this round",60) end end return time + math.random(BlueStrikeFrequencyMin, BlueStrikeFrequencyMax) end function SEF_FINALFILTER(AirbaseList, OffLimitsList) if ( AirbaseList[1] ~= nil and OffLimitsList[1] ~= nil ) then FinalAirbaseSelectionList = {} MatchFound = false for k, v in ipairs(AirbaseList) do MatchFound = false for x, y in ipairs(OffLimitsList) do Name = OffLimitsList[x] if Name == v then MatchFound = true end end if (MatchFound == false) then table.insert(FinalAirbaseSelectionList, v) end end else FinalAirbaseSelectionList = AirbaseList end --Debug --for x, y in ipairs(FinalAirbaseSelectionList) do -- trigger.action.outText(FinalAirbaseSelectionList[x], 15) --end end ------------------------------------------------------------------------------------------------------------------------------------------------- function SEF_SYAAFAN26BSPAWN(DepartureAirbaseName, DestinationAirbaseName) SYAAFAN26B_DATA[1].Vec2 = nil SYAAFAN26B_DATA[1].TimeStamp = nil --////Workaround For Airfields Not Big Enough To Handle Transport Spawns --[[ if ( DepartureAirbaseName == "Taftanaz" ) then if ( Airbase.getByName("Aleppo"):getCoalition() == 1 ) then DepartureAirbaseName = "Aleppo" elseif ( Airbase.getByName("Abu al-Duhur"):getCoalition() == 1 ) then DepartureAirbaseName = "Abu al-Duhur" elseif ( Airbase.getByName("Kuweires"):getCoalition() == 1 ) then DepartureAirbaseName = "Kuweires" elseif ( Airbase.getByName("Jirah"):getCoalition() == 1 ) then DepartureAirbaseName = "Jirah" else DepartureAirbaseName = "Tabqa" end elseif ( DepartureAirbaseName == "Qabr as Sitt" or DepartureAirbaseName == "Marj as Sultan North" or DepartureAirbaseName == "Marj as Sultan South" or DepartureAirbaseName == "Kiryat Shmona" or DepartureAirbaseName == "Haifa" or DepartureAirbaseName == "Rayak" ) then if ( Airbase.getByName("Damascus"):getCoalition() == 1 ) then DepartureAirbaseName = "Damascus" elseif ( Airbase.getByName("Mezzeh"):getCoalition() == 1 ) then DepartureAirbaseName = "Mezzeh" elseif ( Airbase.getByName("Al-Dumayr"):getCoalition() == 1 ) then DepartureAirbaseName = "Al-Dumayr" elseif ( Airbase.getByName("An Nasiriyah"):getCoalition() == 1 ) then DepartureAirbaseName = "An Nasiriyah" else DepartureAirbaseName = "Palmyra" end else end ]]-- local SpawnZone = AIRBASE:FindByName(DepartureAirbaseName):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() SYAAFAN26B = SPAWN :New("VVS An-26B") :OnSpawnGroup( function( SpawnGroup ) SYAAFAN26BGROUPNAME = SpawnGroup.GroupName SYAAFAN26BGROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local DestinationZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = DepartureZoneVec2.x - 10000 local WP1Y = DepartureZoneVec2.y local WP2X = DestinationZoneVec2.x + 10000 local WP2Y = DestinationZoneVec2.y Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["points"] = { [1] = { ["alt"] = 3657.6, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 175, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["number"] = 1, ["auto"] = false, ["id"] = "WrappedAction", ["enabled"] = true, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 2, ["name"] = 1, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] [2] = { ["number"] = 2, ["auto"] = false, ["id"] = "WrappedAction", ["enabled"] = true, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = true, ["name"] = 7, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [2] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 3657.6, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 175, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 12.457428824233, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 3657.6, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 175, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "Script", ["params"] = { ["command"] = "SEF_SYAAFAN26BLANDCOMMAND()", }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 62.255386210095, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission SYAAFAN26BGROUP:SetTask(Mission) end ) --:SpawnInZone( SpawnZone, true, 4000, 5000 ) :SpawnAtAirbase( AIRBASE:FindByName( DepartureAirbaseName ), SPAWN.Takeoff.Hot ) SYAAFAN26BDestinationAirbaseName = DestinationAirbaseName end function SEF_SYAAFAN26BLANDCOMMAND() SYAAFAN26BGROUP:RouteRTB( AIRBASE:FindByName(SYAAFAN26BDestinationAirbaseName) ) end function SEF_USAFC130SPAWN(DepartureAirbaseName, DestinationAirbaseName) USAFC130_DATA[1].Vec2 = nil USAFC130_DATA[1].TimeStamp = nil --[[ if ( DepartureAirbaseName == "Taftanaz" ) then if ( Airbase.getByName("Hatay"):getCoalition() == 2 ) then DepartureAirbaseName = "Hatay" elseif ( Airbase.getByName("Aleppo"):getCoalition() == 2 ) then DepartureAirbaseName = "Aleppo" elseif ( Airbase.getByName("Kuweires"):getCoalition() == 2 ) then DepartureAirbaseName = "Kuweires" elseif ( Airbase.getByName("Abu al-Duhur"):getCoalition() == 2 ) then DepartureAirbaseName = "Abu al-Duhur" else DepartureAirbaseName = "Incirlik" end elseif ( DepartureAirbaseName == "Qabr as Sitt" or DepartureAirbaseName == "Marj as Sultan North" or DepartureAirbaseName == "Marj as Sultan South" or DepartureAirbaseName == "Kiryat Shmona" or DepartureAirbaseName == "Haifa" or DepartureAirbaseName == "Rayak" ) then if ( Airbase.getByName("Damascus"):getCoalition() == 2 ) then DepartureAirbaseName = "Damascus" elseif ( Airbase.getByName("Mezzeh"):getCoalition() == 2 ) then DepartureAirbaseName = "Mezzeh" elseif ( Airbase.getByName("Al-Dumayr"):getCoalition() == 2 ) then DepartureAirbaseName = "Al-Dumayr" elseif ( Airbase.getByName("An Nasiriyah"):getCoalition() == 2 ) then DepartureAirbaseName = "An Nasiriyah" else DepartureAirbaseName = "Ramat David" end else end ]]-- local SpawnZone = AIRBASE:FindByName(DepartureAirbaseName):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() USAFC130 = SPAWN :New("USAF C-130") :OnSpawnGroup( function( SpawnGroup ) USAFC130GROUPNAME = SpawnGroup.GroupName USAFC130GROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local DestinationZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = DepartureZoneVec2.x + 10000 local WP1Y = DepartureZoneVec2.y local WP2X = DestinationZoneVec2.x - 10000 local WP2Y = DestinationZoneVec2.y Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["points"] = { [1] = { ["alt"] = 3657.6, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 175, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["number"] = 1, ["auto"] = false, ["id"] = "WrappedAction", ["enabled"] = true, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 2, ["name"] = 1, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] [2] = { ["number"] = 2, ["auto"] = false, ["id"] = "WrappedAction", ["enabled"] = true, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = true, ["name"] = 7, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [2] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 3657.6, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 175, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 12.457428824233, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 3657.6, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 175, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "Script", ["params"] = { ["command"] = "SEF_USAFC130LANDCOMMAND()", }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 62.255386210095, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission USAFC130GROUP:SetTask(Mission) end ) --:SpawnInZone( SpawnZone, true, 4000, 5000 ) :SpawnAtAirbase( AIRBASE:FindByName( DepartureAirbaseName ), SPAWN.Takeoff.Hot ) USAFC130DestinationAirbaseName = DestinationAirbaseName end function SEF_USAFC130LANDCOMMAND() USAFC130GROUP:RouteRTB( AIRBASE:FindByName(USAFC130DestinationAirbaseName) ) end function SEF_VVSSU25T(DepartureAirbaseName, DestinationAirbaseName) VVSSU25T_DATA[1].Vec2 = nil VVSSU25T_DATA[1].TimeStamp = nil VVSSU25T_DATA[2].Vec2 = nil VVSSU25T_DATA[2].TimeStamp = nil --////Workaround For Airfields Not Big Enough To Handle The Spawns --[[ if ( DepartureAirbaseName == "Taftanaz" ) then if ( Airbase.getByName("Aleppo"):getCoalition() == 1 ) then DepartureAirbaseName = "Aleppo" elseif ( Airbase.getByName("Abu al-Duhur"):getCoalition() == 1 ) then DepartureAirbaseName = "Abu al-Duhur" elseif ( Airbase.getByName("Kuweires"):getCoalition() == 1 ) then DepartureAirbaseName = "Kuweires" elseif ( Airbase.getByName("Jirah"):getCoalition() == 1 ) then DepartureAirbaseName = "Jirah" else DepartureAirbaseName = "Tabqa" end elseif ( DepartureAirbaseName == "Qabr as Sitt" or DepartureAirbaseName == "Marj as Sultan North" or DepartureAirbaseName == "Marj as Sultan South" or DepartureAirbaseName == "Kiryat Shmona" or DepartureAirbaseName == "Haifa" or DepartureAirbaseName == "Rayak" ) then if ( Airbase.getByName("Damascus"):getCoalition() == 1 ) then DepartureAirbaseName = "Damascus" elseif ( Airbase.getByName("Mezzeh"):getCoalition() == 1 ) then DepartureAirbaseName = "Mezzeh" elseif ( Airbase.getByName("Al-Dumayr"):getCoalition() == 1 ) then DepartureAirbaseName = "Al-Dumayr" elseif ( Airbase.getByName("An Nasiriyah"):getCoalition() == 1 ) then DepartureAirbaseName = "An Nasiriyah" else DepartureAirbaseName = "Palmyra" end else end ]]-- local SpawnZone = AIRBASE:FindByName(DepartureAirbaseName):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() VVSSU25T = SPAWN :New("VVS Su-25T") :OnSpawnGroup( function( SpawnGroup ) VVSSU25TGROUPNAME = SpawnGroup.GroupName VVSSU25TGROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local TargetZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = DepartureZoneVec2.x + 18520 local WP1Y = DepartureZoneVec2.y local WP2X = TargetZoneVec2.x local WP2Y = TargetZoneVec2.y local WP3X = DepartureZoneVec2.x local WP3Y = DepartureZoneVec2.y --////SEAD Mission Profile, Engage Targets Along Route Within 75km Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["points"] = { [1] = { ["alt"] = 3000, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 180.55555555556, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 4000, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 180.55555555556, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 2, --Reaction To Threat ["name"] = 1, --Evade Fire }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] [2] = { ["enabled"] = true, ["auto"] = false, ["id"] = "EngageTargets", ["number"] = 2, ["params"] = { ["targetTypes"] = { [1] = "Air Defence", }, -- end of ["targetTypes"] ["priority"] = 0, ["value"] = "Air Defence;", ["noTargetTypes"] = { }, -- end of ["noTargetTypes"] ["maxDistEnabled"] = true, ["maxDist"] = 75000, }, -- end of ["params"] }, -- end of [2] [3] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 3, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = true, --On ["name"] = 15, --Restrict Jettison }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [3] [4] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 4, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["variantIndex"] = 1, ["name"] = 5, ["formationIndex"] = 6, ["value"] = 393217, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [4] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 81.291205528134, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 4000, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 180.55555555556, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 335.83146364775, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] [4] = { ["alt"] = 4000, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 180.55555555556, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 588.86805106716, ["ETA_locked"] = false, ["y"] = WP3Y, ["x"] = WP3X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [4] }, -- end of ["points"] },--end of route }, --end of ["params"] }--end of Mission VVSSU25TGROUP:SetTask(Mission) end ) --:SpawnInZone( SpawnZone, true, 4000, 4000 ) :SpawnAtAirbase( AIRBASE:FindByName( DepartureAirbaseName ), SPAWN.Takeoff.Hot ) end function SEF_SYAAFSU24M(DepartureAirbaseName, DestinationAirbaseName) SYAAFSU24M_DATA[1].Vec2 = nil SYAAFSU24M_DATA[1].TimeStamp = nil SYAAFSU24M_DATA[2].Vec2 = nil SYAAFSU24M_DATA[2].TimeStamp = nil --////Workaround For Airfields Not Big Enough To Handle The Spawns --[[ if ( DepartureAirbaseName == "Taftanaz" ) then if ( Airbase.getByName("Aleppo"):getCoalition() == 1 ) then DepartureAirbaseName = "Aleppo" elseif ( Airbase.getByName("Abu al-Duhur"):getCoalition() == 1 ) then DepartureAirbaseName = "Abu al-Duhur" elseif ( Airbase.getByName("Kuweires"):getCoalition() == 1 ) then DepartureAirbaseName = "Kuweires" elseif ( Airbase.getByName("Jirah"):getCoalition() == 1 ) then DepartureAirbaseName = "Jirah" else DepartureAirbaseName = "Tabqa" end elseif ( DepartureAirbaseName == "Qabr as Sitt" or DepartureAirbaseName == "Marj as Sultan North" or DepartureAirbaseName == "Marj as Sultan South" or DepartureAirbaseName == "Kiryat Shmona" or DepartureAirbaseName == "Haifa" or DepartureAirbaseName == "Rayak" ) then if ( Airbase.getByName("Damascus"):getCoalition() == 1 ) then DepartureAirbaseName = "Damascus" elseif ( Airbase.getByName("Mezzeh"):getCoalition() == 1 ) then DepartureAirbaseName = "Mezzeh" elseif ( Airbase.getByName("Al-Dumayr"):getCoalition() == 1 ) then DepartureAirbaseName = "Al-Dumayr" elseif ( Airbase.getByName("An Nasiriyah"):getCoalition() == 1 ) then DepartureAirbaseName = "An Nasiriyah" else DepartureAirbaseName = "Palmyra" end else end ]]-- local SpawnZone = AIRBASE:FindByName(DepartureAirbaseName):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() SYAAFSU24M = SPAWN :New("VVS Su-24M") :OnSpawnGroup( function( SpawnGroup ) SYAAFSU24MGROUPNAME = SpawnGroup.GroupName SYAAFSU24MGROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local TargetZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = DepartureZoneVec2.x + 18520 local WP1Y = DepartureZoneVec2.y local WP2X = TargetZoneVec2.x local WP2Y = TargetZoneVec2.y local WP3X = DepartureZoneVec2.x local WP3Y = DepartureZoneVec2.y --////CAS Mission Profile, Engage Targets Along Route Within 75km Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["points"] = { [1] = { ["alt"] = 3000, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 222.22222222222, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 6000, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 222.22222222222, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 2, ["name"] = 1, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] [2] = { ["enabled"] = true, ["auto"] = false, ["id"] = "EngageTargets", ["number"] = 2, ["params"] = { ["targetTypes"] = { [1] = "All", }, -- end of ["targetTypes"] ["priority"] = 0, ["value"] = "All;", ["noTargetTypes"] = { }, -- end of ["noTargetTypes"] ["maxDistEnabled"] = true, ["maxDist"] = 75000, }, -- end of ["params"] }, -- end of [2] [3] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 3, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = true, ["name"] = 15, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [3] [4] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 4, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["variantIndex"] = 1, ["name"] = 5, ["formationIndex"] = 6, ["value"] = 393217, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [4] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 81.667335049769, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 3000, --2000 ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 222.22222222222, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 803.32695459455, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] [4] = { ["alt"] = 6000, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 222.22222222222, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 1531.4264319091, ["ETA_locked"] = false, ["y"] = WP3Y, ["x"] = WP3X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [4] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission SYAAFSU24MGROUP:SetTask(Mission) end ) --:SpawnInZone( SpawnZone, true, 6000, 6000 ) :SpawnAtAirbase( AIRBASE:FindByName( DepartureAirbaseName ), SPAWN.Takeoff.Hot ) end function SEF_VVSTU95MS(DepartureAirbaseName, DestinationAirbaseName) VVSTU95MS_DATA[1].Vec2 = nil VVSTU95MS_DATA[1].TimeStamp = nil local SpawnZone = AIRBASE:FindByName(DepartureAirbaseName):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() local DestinationTargetZoneVec2 = ZONE:FindByName(DestinationAirbaseName.." LZ Blue"):GetVec2() --SCAN LZ FOR TARGETS AND OVERRIDE THE VECTOR POSITION IF WE FIND ONE local OverrideTargetZoneVec2 = nil local TargetZone = ZONE:FindByName(DestinationAirbaseName.." LZ Blue") TargetZone:Scan( Object.Category.UNIT ) if TargetZone.ScanData then for ObjectID, UnitObject in pairs( TargetZone.ScanData.Units ) do local UnitObject = UnitObject if UnitObject:isExist() then local FoundUnit = UNIT:FindByName( UnitObject:getName() ) local FoundUnitName = UnitObject:getName() if ( FoundUnit and string.find(FoundUnitName, "US M1025 HMMWV") ) then --trigger.action.outText("Humvee Found In The Blue LZ Zone! Targeting Unit "..UnitObject:getName(),15) OverrideTargetZoneVec2 = FoundUnit:GetVec2() end end end end if ( OverrideTargetZoneVec2 ~= nil ) then DestinationTargetZoneVec2 = OverrideTargetZoneVec2 end VVSTU95MS = SPAWN :New("VVS Tu-95MS") :InitRandomizePosition( true , 1000, 900 ) :OnSpawnGroup( function( SpawnGroup ) VVSTU95MSGROUPNAME = SpawnGroup.GroupName VVSTU95MSGROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local TargetZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = TargetZoneVec2.x + 46300 local WP1Y = TargetZoneVec2.y local WP2X = TargetZoneVec2.x local WP2Y = TargetZoneVec2.y local WP3X = DepartureZoneVec2.x local WP3Y = DepartureZoneVec2.y local TargetPointX = DestinationTargetZoneVec2.x local TargetPointY = DestinationTargetZoneVec2.y --////Pinpoint Strike Mission Profile, Attack Map Object Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["points"] = { [1] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 222.22222222222, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 1, ["name"] = 1, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] [2] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 2, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = true, ["name"] = 15, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [2] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 222.22222222222, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "Bombing", ["number"] = 1, ["params"] = { ["direction"] = 0, ["attackQtyLimit"] = true, ["attackQty"] = 1, ["expend"] = "Four", ["y"] = TargetPointY, ["directionEnabled"] = false, ["groupAttack"] = false, ["altitude"] = 9144, ["altitudeEnabled"] = false, ["weaponType"] = 2956984318, --4030478 not sure what this weapon profile is ["x"] = TargetPointX, }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 16.693279964574, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 222.22222222222, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 377.52879132558, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] [4] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 222.22222222222, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 710.78189235268, ["ETA_locked"] = false, ["y"] = WP3Y, ["x"] = WP3X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [4] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission VVSTU95MSGROUP:SetTask(Mission) end ) :SpawnInZone( SpawnZone, true, 9144, 9144 ) --:SpawnAtAirbase( AIRBASE:FindByName( DepartureAirbaseName ), SPAWN.Takeoff.Hot ) end function SEF_VVSTU160(DepartureAirbaseName, DestinationAirbaseName) VVSTU160_DATA[1].Vec2 = nil VVSTU160_DATA[1].TimeStamp = nil local SpawnZone = AIRBASE:FindByName(DepartureAirbaseName):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() local DestinationTargetZoneVec2 = ZONE:FindByName(DestinationAirbaseName.." LZ Blue"):GetVec2() --SCAN LZ FOR TARGETS AND OVERRIDE THE VECTOR POSITION IF WE FIND ONE local OverrideTargetZoneVec2 = nil local TargetZone = ZONE:FindByName(DestinationAirbaseName.." LZ Blue") TargetZone:Scan( Object.Category.UNIT ) if TargetZone.ScanData then for ObjectID, UnitObject in pairs( TargetZone.ScanData.Units ) do local UnitObject = UnitObject if UnitObject:isExist() then local FoundUnit = UNIT:FindByName( UnitObject:getName() ) local FoundUnitName = UnitObject:getName() if ( FoundUnit and string.find(FoundUnitName, "US M1025 HMMWV") ) then --trigger.action.outText("Humvee Found In The Blue LZ Zone! Targeting Unit "..UnitObject:getName(),15) OverrideTargetZoneVec2 = FoundUnit:GetVec2() end end end end if ( OverrideTargetZoneVec2 ~= nil ) then DestinationTargetZoneVec2 = OverrideTargetZoneVec2 end VVSTU160 = SPAWN :New("VVS Tu-160") :InitRandomizePosition( true , 1000, 900 ) :OnSpawnGroup( function( SpawnGroup ) VVSTU160GROUPNAME = SpawnGroup.GroupName VVSTU160GROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local TargetZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = TargetZoneVec2.x + 46300 local WP1Y = TargetZoneVec2.y local WP2X = TargetZoneVec2.x local WP2Y = TargetZoneVec2.y local WP3X = DepartureZoneVec2.x local WP3Y = DepartureZoneVec2.y local TargetPointX = DestinationTargetZoneVec2.x local TargetPointY = DestinationTargetZoneVec2.y --////Pinpoint Strike Mission Profile, Attack Map Object Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["points"] = { [1] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 266.667, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 1, ["name"] = 1, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] [2] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 2, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = true, ["name"] = 15, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [2] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 266.667, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "Bombing",--"AttackMapObject", ["number"] = 1, ["params"] = { ["direction"] = 0, ["attackQtyLimit"] = true, ["attackQty"] = 1, ["expend"] = "Four", ["y"] = TargetPointY, ["directionEnabled"] = false, ["groupAttack"] = false, ["altitude"] = 9144, ["altitudeEnabled"] = false, ["weaponType"] = 2956984318, --4030478 not sure what this weapon profile is ["x"] = TargetPointX, }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 16.693279964574, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 266.667, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 377.52879132558, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] [4] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 266.667, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 710.78189235268, ["ETA_locked"] = false, ["y"] = WP3Y, ["x"] = WP3X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [4] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission VVSTU160GROUP:SetTask(Mission) end ) :SpawnInZone( SpawnZone, true, 9144, 9144 ) --:SpawnAtAirbase( AIRBASE:FindByName( DepartureAirbaseName ), SPAWN.Takeoff.Hot ) end function SEF_VVSTU22M3(DepartureAirbaseName, DestinationAirbaseName) VVSTU22M3_DATA[1].Vec2 = nil VVSTU22M3_DATA[1].TimeStamp = nil local SpawnZone = AIRBASE:FindByName(DepartureAirbaseName):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() local DestinationTargetZoneVec2 = ZONE:FindByName(DestinationAirbaseName.." LZ Blue"):GetVec2() --SCAN LZ FOR TARGETS AND OVERRIDE THE VECTOR POSITION IF WE FIND ONE local OverrideTargetZoneVec2 = nil local TargetZone = ZONE:FindByName(DestinationAirbaseName.." LZ Blue") TargetZone:Scan( Object.Category.UNIT ) if TargetZone.ScanData then for ObjectID, UnitObject in pairs( TargetZone.ScanData.Units ) do local UnitObject = UnitObject if UnitObject:isExist() then local FoundUnit = UNIT:FindByName( UnitObject:getName() ) local FoundUnitName = UnitObject:getName() if ( FoundUnit and string.find(FoundUnitName, "US M1025 HMMWV") ) then --trigger.action.outText("Humvee Found In The Blue LZ Zone! Targeting Unit "..UnitObject:getName(),15) OverrideTargetZoneVec2 = FoundUnit:GetVec2() end end end end if ( OverrideTargetZoneVec2 ~= nil ) then DestinationTargetZoneVec2 = OverrideTargetZoneVec2 end VVSTU22M3 = SPAWN :New("VVS Tu-22M3") :InitRandomizePosition( true , 1000, 900 ) :OnSpawnGroup( function( SpawnGroup ) VVSTU22M3GROUPNAME = SpawnGroup.GroupName VVSTU22M3GROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local TargetZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = TargetZoneVec2.x + 46300 local WP1Y = TargetZoneVec2.y local WP2X = TargetZoneVec2.x local WP2Y = TargetZoneVec2.y local WP3X = DepartureZoneVec2.x local WP3Y = DepartureZoneVec2.y local TargetPointX = DestinationTargetZoneVec2.x local TargetPointY = DestinationTargetZoneVec2.y --////Pinpoint Strike Mission Profile, Attack Map Object Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["points"] = { [1] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 250, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 1, ["name"] = 1, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] [2] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 2, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = true, ["name"] = 15, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [2] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 250, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "Bombing", ["number"] = 1, ["params"] = { ["direction"] = 0, ["attackQtyLimit"] = true, ["attackQty"] = 1, ["expend"] = "All", ["y"] = TargetPointY, ["directionEnabled"] = false, ["groupAttack"] = false, ["altitude"] = 9144, ["altitudeEnabled"] = false, ["weaponType"] = 2956984318, --4030478 not sure what this weapon profile is ["x"] = TargetPointX, }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 16.693279964574, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 250, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 377.52879132558, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] [4] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 250, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 710.78189235268, ["ETA_locked"] = false, ["y"] = WP3Y, ["x"] = WP3X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [4] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission VVSTU22M3GROUP:SetTask(Mission) end ) :SpawnInZone( SpawnZone, true, 9144, 9144 ) --:SpawnAtAirbase( AIRBASE:FindByName( DepartureAirbaseName ), SPAWN.Takeoff.Hot ) end function SEF_IRIAFMI8SPAWN(DepartureAirbaseName, DestinationAirbaseName) IRIAFMI8_DATA[1].Vec2 = nil IRIAFMI8_DATA[1].TimeStamp = nil local SpawnZone = AIRBASE:FindByName(DepartureAirbaseName):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() local LZZoneVec2 = ZONE:FindByName(DestinationAirbaseName.." LZ Red"):GetVec2() IRIAFMI8 = SPAWN :New("VVS Mi-8MTV2") :OnSpawnGroup( function( SpawnGroup ) IRIAFMI8GROUPNAME = SpawnGroup.GroupName IRIAFMI8GROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local TargetZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = DepartureZoneVec2.x + 100 local WP1Y = DepartureZoneVec2.y local WP2X = TargetZoneVec2.x local WP2Y = TargetZoneVec2.y local LZX = LZZoneVec2.x local LZY = LZZoneVec2.y Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["routeRelativeTOT"] = false, ["points"] = { [1] = { ["alt"] = 304.8, ["action"] = "Turning Point", ["alt_type"] = "RADIO", --BARO ["speed"] = 62.5, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 304.8, ["action"] = "Turning Point", ["alt_type"] = "RADIO", ["speed"] = 62.5, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 66.139437839571, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 304.8, ["action"] = "Turning Point", ["alt_type"] = "RADIO", ["speed"] = 62.5, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "Land", ["number"] = 1, ["params"] = { ["y"] = LZY, ["x"] = LZX, ["duration"] = 300, ["durationFlag"] = false, }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 475.4943056063, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission IRIAFMI8GROUP:SetTask(Mission) end ) :SpawnInZone( SpawnZone, true, 304.8, 304.8 ) --:SpawnAtAirbase( AIRBASE:FindByName( DepartureAirbaseName ), SPAWN.Takeoff.Hot ) end function SEF_USAFUH60ASPAWN(DepartureAirbaseName, DestinationAirbaseName) USAFUH60A_DATA[1].Vec2 = nil USAFUH60A_DATA[1].TimeStamp = nil local SpawnZone = AIRBASE:FindByName(DepartureAirbaseName):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() local LZZoneVec2 = ZONE:FindByName(DestinationAirbaseName.." LZ Blue"):GetVec2() USAFUH60A = SPAWN :New("USAF UH-60A") :OnSpawnGroup( function( SpawnGroup ) USAFUH60AGROUPNAME = SpawnGroup.GroupName USAFUH60AGROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local TargetZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = DepartureZoneVec2.x + 100 local WP1Y = DepartureZoneVec2.y local WP2X = TargetZoneVec2.x local WP2Y = TargetZoneVec2.y local LZX = LZZoneVec2.x local LZY = LZZoneVec2.y Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["routeRelativeTOT"] = false, ["points"] = { [1] = { ["alt"] = 304.8, --250 ["action"] = "Turning Point", ["alt_type"] = "RADIO", ["speed"] = 77.7778, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 304.8, ["action"] = "Turning Point", ["alt_type"] = "RADIO", ["speed"] = 77.7778, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 66.139437839571, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 304.8, ["action"] = "Turning Point", ["alt_type"] = "RADIO", ["speed"] = 77.7778, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "Land", ["number"] = 1, ["params"] = { ["y"] = LZY, ["x"] = LZX, ["duration"] = 300, ["durationFlag"] = false, }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 475.4943056063, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission USAFUH60AGROUP:SetTask(Mission) end ) :SpawnInZone( SpawnZone, false, 304.8, 304.8 ) --:SpawnAtAirbase( AIRBASE:FindByName( DepartureAirbaseName ), SPAWN.Takeoff.Hot ) end function SEF_USAFB1BSPAWN(DepartureAirbaseName, DestinationAirbaseName) USAFB1B_DATA[1].Vec2 = nil USAFB1B_DATA[1].TimeStamp = nil local SpawnZone = AIRBASE:FindByName(AIRBASE.Caucasus.Kutaisi):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() local DestinationTargetZoneVec2 = ZONE:FindByName(DestinationAirbaseName.." LZ Red"):GetVec2() --SCAN LZ FOR TARGETS AND OVERRIDE THE VECTOR POSITION IF WE FIND ONE local OverrideTargetZoneVec2 = nil local TargetZone = ZONE:FindByName(DestinationAirbaseName.." LZ Red") TargetZone:Scan( Object.Category.UNIT ) if TargetZone.ScanData then for ObjectID, UnitObject in pairs( TargetZone.ScanData.Units ) do local UnitObject = UnitObject if UnitObject:isExist() then local FoundUnit = UNIT:FindByName( UnitObject:getName() ) local FoundUnitName = UnitObject:getName() if ( FoundUnit and string.find(FoundUnitName, "Russian APC Tigr 233036") ) then --trigger.action.outText("APC Found In The Red LZ Zone! Targeting Unit "..UnitObject:getName(),15) OverrideTargetZoneVec2 = FoundUnit:GetVec2() end end end end if ( OverrideTargetZoneVec2 ~= nil ) then DestinationTargetZoneVec2 = OverrideTargetZoneVec2 end USAFB1B = SPAWN :New("USAF B-1B") :OnSpawnGroup( function( SpawnGroup ) USAFB1BGROUPNAME = SpawnGroup.GroupName USAFB1BGROUPID = Group.getByName(USAFB1BGROUPNAME):getID() USAFB1BGROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local TargetZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = DepartureZoneVec2.x - 18520 --10 nautical miles South of Departure local WP1Y = DepartureZoneVec2.y + 37040 --20 nautical miles East of Departure local WP2X = TargetZoneVec2.x - 37040 --20 nautical miles south of target local WP2Y = TargetZoneVec2.y local WP3X = TargetZoneVec2.x local WP3Y = TargetZoneVec2.y local WP4X = DepartureZoneVec2.x local WP4Y = DepartureZoneVec2.y local TargetPointX = DestinationTargetZoneVec2.x local TargetPointY = DestinationTargetZoneVec2.y --////Pinpoint Strike Mission Profile, Attack Map Object Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["points"] = { [1] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 280, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = true, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "EPLRS", ["params"] = { ["value"] = true, ["groupId"] = USAFB1BGROUPID, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] [2] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 1, ["name"] = 1, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [2] [3] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 3, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = true, ["name"] = 15, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [3] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 280, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 16.693279964574, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 280, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "Bombing", ["number"] = 1, ["params"] = { ["direction"] = 0, ["attackQtyLimit"] = true, ["attackQty"] = 1, ["expend"] = "Four", ["y"] = TargetPointY, ["directionEnabled"] = false, ["groupAttack"] = false, ["altitude"] = 9144, ["altitudeEnabled"] = false, ["weaponType"] = 2956984318, ["x"] = TargetPointX, }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 16.693279964574, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] [4] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 280, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 377.52879132558, ["ETA_locked"] = false, ["y"] = WP3Y, ["x"] = WP3X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [4] [5] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 280, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 710.78189235268, ["ETA_locked"] = false, ["y"] = WP4Y, ["x"] = WP4X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [5] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission USAFB1BGROUP:SetTask(Mission) end ) :SpawnAtParkingSpot(AIRBASE:FindByName(AIRBASE.Caucasus.Kutaisi), {3}, SPAWN.Takeoff.Hot) end function SEF_USAFB52HSPAWN(DepartureAirbaseName, DestinationAirbaseName) USAFB52H_DATA[1].Vec2 = nil USAFB52H_DATA[1].TimeStamp = nil local SpawnZone = AIRBASE:FindByName(AIRBASE.Caucasus.Kutaisi):GetZone() local DestinationZone = AIRBASE:FindByName(DestinationAirbaseName):GetZone() local DestinationTargetZoneVec2 = ZONE:FindByName(DestinationAirbaseName.." LZ Red"):GetVec2() --SCAN LZ FOR TARGETS AND OVERRIDE THE VECTOR POSITION IF WE FIND ONE local OverrideTargetZoneVec2 = nil local TargetZone = ZONE:FindByName(DestinationAirbaseName.." LZ Red") TargetZone:Scan( Object.Category.UNIT ) if TargetZone.ScanData then for ObjectID, UnitObject in pairs( TargetZone.ScanData.Units ) do local UnitObject = UnitObject if UnitObject:isExist() then local FoundUnit = UNIT:FindByName( UnitObject:getName() ) local FoundUnitName = UnitObject:getName() if ( FoundUnit and string.find(FoundUnitName, "Russian APC Tigr 233036") ) then --trigger.action.outText("APC Found In The Red LZ Zone! Targeting Unit "..UnitObject:getName(),15) OverrideTargetZoneVec2 = FoundUnit:GetVec2() end end end end if ( OverrideTargetZoneVec2 ~= nil ) then DestinationTargetZoneVec2 = OverrideTargetZoneVec2 end USAFB52H = SPAWN :New("USAF B-52H") :OnSpawnGroup( function( SpawnGroup ) USAFB52HGROUPNAME = SpawnGroup.GroupName USAFB52HGROUPID = Group.getByName(USAFB52HGROUPNAME):getID() USAFB52HGROUP = GROUP:FindByName(SpawnGroup.GroupName) local DepartureZoneVec2 = SpawnZone:GetVec2() local TargetZoneVec2 = DestinationZone:GetVec2() local WP0X = DepartureZoneVec2.x local WP0Y = DepartureZoneVec2.y local WP1X = DepartureZoneVec2.x - 18520 --10 nautical miles South of Al Dhafra local WP1Y = DepartureZoneVec2.y + 37040 --20 nautical miles East of Al Dhafra local WP2X = TargetZoneVec2.x - 46300 --25 nautical miles South of the Target local WP2Y = TargetZoneVec2.y local WP3X = TargetZoneVec2.x local WP3Y = TargetZoneVec2.y local WP4X = DepartureZoneVec2.x local WP4Y = DepartureZoneVec2.y local TargetPointX = DestinationTargetZoneVec2.x local TargetPointY = DestinationTargetZoneVec2.y --////Pinpoint Strike Mission Profile, Attack Map Object Mission = { ["id"] = "Mission", ["params"] = { ["route"] = { ["points"] = { [1] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 250, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = true, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "EPLRS", ["params"] = { ["value"] = true, ["groupId"] = USAFB52HGROUPID, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] [2] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 1, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 1, ["name"] = 1, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [2] [3] = { ["enabled"] = true, ["auto"] = false, ["id"] = "WrappedAction", ["number"] = 3, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = true, ["name"] = 15, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [3] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 0, ["ETA_locked"] = true, ["y"] = WP0Y, ["x"] = WP0X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [1] [2] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 250, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 377.52879132558, ["ETA_locked"] = false, ["y"] = WP1Y, ["x"] = WP1X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [2] [3] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 250, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["auto"] = false, ["id"] = "Bombing", ["number"] = 1, ["params"] = { ["direction"] = 0, ["attackQtyLimit"] = true, ["attackQty"] = 1, ["expend"] = "Four", ["y"] = TargetPointY, ["directionEnabled"] = false, ["groupAttack"] = false, ["altitude"] = 9144, ["altitudeEnabled"] = false, ["weaponType"] = 2956984318, ["x"] = TargetPointX, }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 16.693279964574, ["ETA_locked"] = false, ["y"] = WP2Y, ["x"] = WP2X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [3] [4] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 250, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 377.52879132558, ["ETA_locked"] = false, ["y"] = WP3Y, ["x"] = WP3X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [4] [5] = { ["alt"] = 9144, ["action"] = "Turning Point", ["alt_type"] = "BARO", ["speed"] = 250, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] ["type"] = "Turning Point", ["ETA"] = 710.78189235268, ["ETA_locked"] = false, ["y"] = WP4Y, ["x"] = WP4X, ["formation_template"] = "", ["speed_locked"] = true, }, -- end of [5] }, -- end of ["points"] }, -- end of ["route"] }, --end of ["params"] }--end of Mission USAFB52HGROUP:SetTask(Mission) end ) :SpawnAtParkingSpot(AIRBASE:FindByName(AIRBASE.Caucasus.Kutaisi), {3}, SPAWN.Takeoff.Hot) end function SEF_REDSTRIKE(Origin, AttackDefended) if ( Group.getByName(VVSSU25TGROUPNAME) or Group.getByName(SYAAFSU24MGROUPNAME) or Group.getByName(VVSTU95MSGROUPNAME) or Group.getByName(VVSTU160GROUPNAME) or Group.getByName(VVSTU22M3GROUPNAME) ) then --trigger.action.outText(IranianAirforceGeneralName.." I Still Have SEAD, CAS or Pinpoint Strike Planes In The Air, I Can't Spare More Planes Yet",15) else local ChooseAttackElements = math.random(1,100) local ChooseBomberElements = math.random(1,100) if ( ChooseAttackElements <= 50 ) then --SEAD + CAS - Bomber Element SEF_VVSSU25T( Origin, AttackDefended ) SEF_SYAAFSU24M( Origin, AttackDefended ) elseif ( ChooseAttackElements > 50 and ChooseAttackElements <= 75 ) then --SEAD - CAS + Random Bomber Element With 10% Chance Of No Bomber Element SEF_VVSSU25T( Origin, AttackDefended ) if ( ChooseBomberElements <= 30 ) then SEF_VVSTU95MS( AIRBASE.Caucasus.Anapa_Vityazevo, AttackDefended ) elseif ( ChooseBomberElements > 30 and ChooseBomberElements <= 60 ) then SEF_VVSTU160( AIRBASE.Caucasus.Anapa_Vityazevo, AttackDefended ) elseif ( ChooseBomberElements > 60 and ChooseBomberElements <= 90 ) then SEF_VVSTU22M3( AIRBASE.Caucasus.Anapa_Vityazevo, AttackDefended ) else end else --CAS - SEAD + Random Bomber Element With 10% Chance Of No Bomber Element SEF_SYAAFSU24M( Origin, AttackDefended ) if ( ChooseBomberElements <= 30 ) then SEF_VVSTU95MS( AIRBASE.Caucasus.Anapa_Vityazevo, AttackDefended ) elseif ( ChooseBomberElements > 30 and ChooseBomberElements <= 60 ) then SEF_VVSTU160( AIRBASE.Caucasus.Anapa_Vityazevo, AttackDefended ) elseif ( ChooseBomberElements > 60 and ChooseBomberElements <= 90 ) then SEF_VVSTU22M3( AIRBASE.Caucasus.Anapa_Vityazevo, AttackDefended ) else end end end end function SEF_BLUESTRIKE(Origin, AttackDefended) if ( AutomatedBlueStrikes == 1 ) then if ( Group.getByName(USAFB1BGROUPNAME) or Group.getByName(USAFB52HGROUPNAME) ) then --Do nothing we still have strike bombers in the air, the transport helo will still spawn else --local ChooseAttackElements = math.random(1,100) local ChooseBomberElements = math.random(1,100) if ( ChooseBomberElements <= 50 ) then SEF_USAFB1BSPAWN( AIRBASE.Caucasus.Kutaisi, AttackDefended ) else SEF_USAFB52HSPAWN( AIRBASE.Caucasus.Kutaisi, AttackDefended ) end end end end ------------------------------------------------------------------------------------------------------------------------------------------------- function SEF_GETREDFRONTLINEAIRBASES() --//Refresh Tables Then Filter Through To Get The Front Line Airbases Owned By Red Coalition SEF_REFRESHAIRBASETABLES() SEF_GETNONREDCURRENTNEIGHBOURS() SEF_GETNONBLUEAIRBASES(CurrentNonRedNeighbours) SEF_GETREDAIRBASES(CurrentNonBlueAirbases) SEF_LISTFRONTLINEREDAIRBASES() end ------------------------------------------------------------------------------------------------------------------------------------------------- function SEF_REDGENERAL_SCHEDULESTRIKE() timer.scheduleFunction(SEF_REDGENERAL_ATTACKAIRBASE, 53, timer.getTime() + math.random(RedStrikeFrequencyMin, RedStrikeFrequencyMax)) end function SEF_BLUEGENERAL_SCHEDULESTRIKE() timer.scheduleFunction(SEF_BLUEGENERAL_ATTACKAIRBASE, 53, timer.getTime() + math.random(BlueStrikeFrequencyMin, BlueStrikeFrequencyMax)) end function SEF_FRIENDLYDOWN() if ( CustomSoundsEnabled == 1) then trigger.action.outSound('Oh Jesus.ogg') else end end function SEF_REDCAPTURETEAMSPAWN(SpawnVec2) REDCAPTURETEAM:SpawnFromVec2(SpawnVec2) end function SEF_BLUECAPTURETEAMSPAWN(SpawnVec2) BLUECAPTURETEAM:SpawnFromVec2(SpawnVec2) end function SEF_CAPAIRBASEWITHHELO(HeloName, Coalition) local HeloUnit = UNIT:FindByName(HeloName) local SpawnVec2 = UNIT:FindByName(HeloName):GetVec2() ClosestAirbaseBlue = nil ClosestAirbaseNeutral = nil ClosestAirbaseRed = nil if ( Coalition == 1 ) then if ( HeloUnit:GetCoordinate():GetClosestAirbase(Airbase.Category.AIRDROME, 2) ~= nil ) then ClosestAirbaseBlue = HeloUnit:GetCoordinate():GetClosestAirbase(Airbase.Category.AIRDROME, 2):GetName() else ClosestAirbaseBlue = nil end if ( HeloUnit:GetCoordinate():GetClosestAirbase(Airbase.Category.AIRDROME, 0) ~= nil ) then ClosestAirbaseNeutral = HeloUnit:GetCoordinate():GetClosestAirbase(Airbase.Category.AIRDROME, 0):GetName() else ClosestAirbaseNeutral = nil end if ( ClosestAirbaseBlue ~= nil and ClosestAirbaseNeutral ~= nil ) then --trigger.action.outText("Closest Blue Airbase Is "..ClosestAirbaseBlue.."\nClosest Neutral Airbase Is "..ClosestAirbaseNeutral,15) if ( HeloUnit:IsInZone(ZONE:FindByName(ClosestAirbaseBlue.." LZ Red")) or HeloUnit:IsInZone(ZONE:FindByName(ClosestAirbaseNeutral.." LZ Red")) ) then Unit.getByName(HeloName):destroy() timer.scheduleFunction(SEF_REDCAPTURETEAMSPAWN, SpawnVec2, timer.getTime() + 2 ) else Unit.getByName(HeloName):destroy() end elseif ( ClosestAirbaseBlue ~= nil and ClosestAirbaseNeutral == nil ) then --trigger.action.outText("Closest Blue Airbase Is "..ClosestAirbaseBlue,15) if ( HeloUnit:IsInZone(ZONE:FindByName(ClosestAirbaseBlue.." LZ Red"))) then Unit.getByName(HeloName):destroy() timer.scheduleFunction(SEF_REDCAPTURETEAMSPAWN, SpawnVec2, timer.getTime() + 2 ) else Unit.getByName(HeloName):destroy() end elseif ( ClosestAirbaseBlue == nil and ClosestAirbaseNeutral ~= nil ) then --trigger.action.outText("Closest Neutral Airbase Is "..ClosestAirbaseNeutral,15) if ( HeloUnit:IsInZone(ZONE:FindByName(ClosestAirbaseNeutral.." LZ Red"))) then Unit.getByName(HeloName):destroy() timer.scheduleFunction(SEF_REDCAPTURETEAMSPAWN, SpawnVec2, timer.getTime() + 2 ) else Unit.getByName(HeloName):destroy() end else end elseif ( Coalition == 2 ) then if ( HeloUnit:GetCoordinate():GetClosestAirbase(Airbase.Category.AIRDROME, 1) ~= nil ) then ClosestAirbaseRed = HeloUnit:GetCoordinate():GetClosestAirbase(Airbase.Category.AIRDROME, 1):GetName() else ClosestAirbaseRed = nil end if ( HeloUnit:GetCoordinate():GetClosestAirbase(Airbase.Category.AIRDROME, 0) ~= nil ) then ClosestAirbaseNeutral = HeloUnit:GetCoordinate():GetClosestAirbase(Airbase.Category.AIRDROME, 0):GetName() else ClosestAirbaseNeutral = nil end if ( ClosestAirbaseRed ~= nil and ClosestAirbaseNeutral ~= nil ) then --trigger.action.outText("Closest Red Airbase Is "..ClosestAirbaseRed.."\nClosest Neutral Airbase Is "..ClosestAirbaseNeutral,15) if (HeloUnit:IsInZone(ZONE:FindByName(ClosestAirbaseRed.." LZ Blue")) or HeloUnit:IsInZone(ZONE:FindByName(ClosestAirbaseNeutral.." LZ Blue"))) then Unit.getByName(HeloName):destroy() timer.scheduleFunction(SEF_BLUECAPTURETEAMSPAWN, SpawnVec2, timer.getTime() + 2 ) else Unit.getByName(HeloName):destroy() end elseif ( ClosestAirbaseRed ~= nil and ClosestAirbaseNeutral == nil ) then --trigger.action.outText("Closest Red Airbase Is "..ClosestAirbaseRed,15) if (HeloUnit:IsInZone(ZONE:FindByName(ClosestAirbaseRed.." LZ Blue"))) then Unit.getByName(HeloName):destroy() timer.scheduleFunction(SEF_BLUECAPTURETEAMSPAWN, SpawnVec2, timer.getTime() + 2 ) else Unit.getByName(HeloName):destroy() end elseif ( ClosestAirbaseRed == nil and ClosestAirbaseNeutral ~= nil ) then --trigger.action.outText("Closest Neutral Airbase Is "..ClosestAirbaseNeutral,15) if (HeloUnit:IsInZone(ZONE:FindByName(ClosestAirbaseNeutral.." LZ Blue"))) then Unit.getByName(HeloName):destroy() timer.scheduleFunction(SEF_BLUECAPTURETEAMSPAWN, SpawnVec2, timer.getTime() + 2 ) else Unit.getByName(HeloName):destroy() end else end else end end ------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------- --////MAIN env.info("Surrexen's Event Handlers Loading", false) --////TEST CASE --SEF_CAPAIRBASE(AIRBASE.Caucasus.Beslan, 2) --////END TEST CASE timer.scheduleFunction(SEF_REDGENERAL_ATTACKAIRBASE, 53, timer.getTime() + math.random(900, 1200)) timer.scheduleFunction(SEF_BLUEGENERAL_ATTACKAIRBASE, 53, timer.getTime() + math.random(900, 1200)) --////END MAIN ------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------- --////EVENT HANDLERS SEF_LANDINGHANDLER = {} function SEF_LANDINGHANDLER:onEvent(Event) if Event.id == world.event.S_EVENT_LAND then if Event.initiator then local LandedUnit = Event.initiator --The unit object that landed local LandedUnitName = Event.initiator:getName() --The unit name local LandedUnitCoalition = Event.initiator:getCoalition() --The unit's coalition local LandedUnitGroupName = Event.initiator:getGroup():getName() --The unit's group name local LandedUnitTypeName = Event.initiator:getTypeName() --The unit's type name if Event.place then LandedPlace = Event.place:getName() --The airbase name of the landing else LandedPlace = nil end if (LandedUnitCoalition == 1) and false then --Red Air Landed if string.find(LandedUnitGroupName, "VVS An%-26B") and false then if ( LandedPlace ~= nil ) then trigger.action.outText("A Russian "..LandedUnitTypeName.." Landed At "..LandedPlace, 15) SEF_CAPAIRBASE(LandedPlace, LandedUnitCoalition) else trigger.action.outText("A Russian "..LandedUnitTypeName.." Has Landed", 15) end elseif string.find(LandedUnitGroupName, "VVS Mi%-8MTV2") and false then if ( LandedPlace ~= nil ) then trigger.action.outText("A Russian "..LandedUnitTypeName.." Has Landed At "..LandedPlace,15) SEF_CAPAIRBASEWITHHELO(LandedUnitName, LandedUnitCoalition) else trigger.action.outText("A Russian "..LandedUnitTypeName.." Has Landed", 15) SEF_CAPAIRBASEWITHHELO(LandedUnitName, LandedUnitCoalition) end else if ( LandedPlace ~= nil ) and false then trigger.action.outText("An "..LandedUnitTypeName.." Has Landed At "..LandedPlace,15) end end elseif (LandedUnitCoalition == 2) then --Blue Air Landed if string.find(LandedUnitGroupName, "USAF C%-130") then if ( LandedPlace ~= nil ) then trigger.action.outText("An American "..LandedUnitTypeName.." Landed At "..LandedPlace, 15) SEF_CAPAIRBASE(LandedPlace, LandedUnitCoalition) else trigger.action.outText("An American "..LandedUnitTypeName.." Has Landed", 15) end elseif string.find(LandedUnitGroupName, "USAF UH%-60A") then if ( LandedPlace ~= nil ) then trigger.action.outText("An American "..LandedUnitTypeName.." Has Landed At "..LandedPlace,15) SEF_CAPAIRBASEWITHHELO(LandedUnitName, LandedUnitCoalition) else trigger.action.outText("An American "..LandedUnitTypeName.." Has Landed", 15) SEF_CAPAIRBASEWITHHELO(LandedUnitName, LandedUnitCoalition) end else if ( LandedPlace ~= nil ) and false then trigger.action.outText("An "..LandedUnitTypeName.." Has Landed At "..LandedPlace,15) else end end else --Neutral Air Landed if ( LandedPlace ~= nil ) and false then trigger.action.outText("An "..LandedUnitTypeName.." Has Landed At "..LandedPlace,15) else trigger.action.outText("An "..LandedUnitTypeName.." Has Landed", 15) end end end end end world.addEventHandler(SEF_LANDINGHANDLER) SEF_CRASHEDHANDLER = {} function SEF_CRASHEDHANDLER:onEvent(Event) if Event.id == world.event.S_EVENT_CRASH then if Event.initiator then local CrashedUnit = Event.initiator local CrashedUnitName = Event.initiator:getName() local CrashedUnitCoalition = Event.initiator:getCoalition() local CrashedUnitGroupName = Event.initiator:getGroup():getName() local CrashedUnitTypeName = Event.initiator:getTypeName() if ( CrashedUnitCoalition == 1 and CrashedUnitTypeName == 'MiG-21Bis' ) then -- Enemy MiG-21Bis Down --trigger.action.outText("A " .. CrashedUnitTypeName .. " Has Been Destroyed!",15) if CustomSoundsEnabled == 1 then local RandomMigSound = math.random(1,2) if (RandomMigSound == 1) then trigger.action.outSound('mig21splash-1.ogg') else trigger.action.outSound('mig21splash-2.ogg') end end elseif ( CrashedUnitCoalition == 1 and CrashedUnitTypeName ~= 'MiG-21Bis' ) then -- Enemy Non-MiG Down --trigger.action.outText("A " .. CrashedUnitTypeName .. " Has Been Destroyed!",15) if CustomSoundsEnabled == 1 then local RandomAAKillSound = math.random(1,6) trigger.action.outSound('AA Kill ' .. RandomAAKillSound .. '.ogg') end if string.find(CrashedUnitGroupName, "VVS An%-26B") and false then trigger.action.outText("A Russian Antonov An-26B Has Crashed!", 15) elseif string.find(CrashedUnitGroupName, "VVS Mi%-8MTV2") and false then trigger.action.outText("A Russian Mi-8MTV2 Has Crashed!", 15) else end elseif ( CrashedUnitCoalition == 2 ) and false then -- Allied Plane Down --trigger.action.outText("A " .. CrashedUnitTypeName .. " Has Been Destroyed!",15) if CustomSoundsEnabled == 1 then timer.scheduleFunction(SEF_FRIENDLYDOWN, {}, timer.getTime() + 1) end if string.find(CrashedUnitGroupName, "USAF C%-130") then trigger.action.outText("Our Hercules Has Crashed!", 15) elseif string.find(CrashedUnitGroupName, "USAF UH%-60A") then trigger.action.outText("Our Blackhawk Has Crashed!", 15) else end else --trigger.action.outText("A " .. CrashedUnitTypeName .. " Has Been Destroyed!",15) end end end end world.addEventHandler(SEF_CRASHEDHANDLER) SEF_KILLEDHANDLER = {} function SEF_KILLEDHANDLER:onEvent(Event) if Event.id == world.event.S_EVENT_KILL and false then if Event.initiator then local KillerUnit = Event.initiator local KillerUnitName = Event.initiator:getName() --local KillerUnitCoalition = Event.initiator:getCoalition() --local KillerUnitGroupName = Event.initiator:getGroup():getName() local KillerUnitTypeName = Event.initiator:getTypeName() local KillerUnitCategory = Event.initiator:getDesc().category -- 0 AIRPLANE / 1 HELICOPTER / 2 GROUND_UNIT / 3 SHIP / 4 STRUCTURE local TargetUnit = Event.target local TargetUnitName = Event.target:getName() --local TargetUnitCoalition = Event.target:getCoalition() --local TargetUnitGroupName = Event.target:getGroup():getName() local TargetUnitTypeName = Event.target:getTypeName() local TargetUnitCategory = Event.initiator:getDesc().category -- 0 AIRPLANE / 1 HELICOPTER / 2 GROUND_UNIT / 3 SHIP / 4 STRUCTURE local WeaponName = Event.weapon_name if ( KillerUnitCategory == 0 or KillerUnitCategory == 1 ) then if ( TargetUnitCategory == 0 or TargetUnitCategory == 1 ) then trigger.action.outText("A "..KillerUnitTypeName.." Has Killed An "..TargetUnitTypeName, 15) else trigger.action.outText("A "..KillerUnitTypeName.." Has Killed An "..TargetUnitName, 15) end elseif ( KillerUnitCategory == 2 or KillerUnitCategory == 3 ) then if ( TargetUnitCategory == 0 or TargetUnitCategory == 1 ) then trigger.action.outText(KillerUnitName.." Has Killed An "..TargetUnitTypeName, 15) else trigger.action.outText(KillerUnitName.." Has Killed An "..TargetUnitTypeName, 15) end else end end end end world.addEventHandler(SEF_KILLEDHANDLER) SEF_BASECAPTUREDEVENTHANDLER = {} function SEF_BASECAPTUREDEVENTHANDLER:onEvent(Event) if Event.id == world.event.S_EVENT_BASE_CAPTURED then if Event.initiator then local CapturedBaseName = Event.place:getName() local CapturedBaseCapturingUnit = Event.initiator local CapturedBaseCapturingUnitName = Event.initiator:getName() local CapturedBaseCapturingUnitCoalition = Event.initiator:getCoalition() local CapturedBaseCapturingUnitTypeName = Event.initiator:getTypeName() --////Announcement if ( CapturedBaseCapturingUnitCoalition == 1 and timer.getAbsTime() >= CaptureMessageLockout + 5 ) then trigger.action.outText(CapturedBaseName.." Has Been Captured By The Russians", 15) CaptureMessageLockout = timer.getAbsTime() elseif ( CapturedBaseCapturingUnitCoalition == 2 and timer.getAbsTime() >= CaptureMessageLockout + 5 ) then trigger.action.outText(CapturedBaseName.." Has Been Captured By The Allies", 15) CaptureMessageLockout = timer.getAbsTime() else end if ( string.find(CapturedBaseCapturingUnitName, "Infantry Squad") or string.find(CapturedBaseCapturingUnitName, "Stinger Squad") or string.find(CapturedBaseCapturingUnitName, "USACE Squad") or string.find(CapturedBaseCapturingUnitName, "USACE") ) then SEF_CAPAIRBASE(CapturedBaseName, 2) end --[[ --////Deal With Particular Airfields Late Activation if ( CapturedBaseCapturingUnitCoalition == 1 ) then if ( CapturedBaseName == "Whatever" ) then --trigger.action.activateGroup(Group.getByName("Whatever")) elseif ( CapturedBaseName == "Whatever" ) then --trigger.action.activateGroup(Group.getByName("Whatever")) else end elseif ( CapturedBaseCapturingUnitCoalition == 2 ) then if ( CapturedBaseName == "Whatever" ) then --trigger.action.activateGroup(Group.getByName("Whatever")) elseif ( CapturedBaseName == "Whatever" ) then --trigger.action.activateGroup(Group.getByName("Whatever")) else end else end ]]-- end end end world.addEventHandler(SEF_BASECAPTUREDEVENTHANDLER) SEF_SHOTHANDLER = {} function SEF_SHOTHANDLER:onEvent(Event) if Event.id == world.event.S_EVENT_SHOT then if Event.initiator then local ShootingUnit = Event.initiator local ShootingUnitName = Event.initiator:getName() local ShootingUnitCoalition = Event.initiator:getCoalition() local ShotWeapon = Event.weapon:getDesc() local ShotWeaponCategory = ShotWeapon.category local ShotWeaponMissileCategory = ShotWeapon.missileCategory local ShotWeaponMissileGuidanceType = ShotWeapon.guidance local ShotWeaponName = Event.weapon:getTypeName() if ( CustomSoundsEnabled == 1 ) then --Play sound if CustomSoundsEnabled is enabled and not SoundLocked. Set SoundLockout time once a sound starts playing. --////Check if Blue Coalition Is The One That Is Firing if ( ShootingUnitCoalition == 2 ) then --MISSILES if ( ShotWeaponCategory == 1 ) then --Missile, any type if ( ShotWeaponMissileCategory == 1 ) and false then -- 1 is A2A Missile "Fox" if ( ShotWeaponMissileGuidanceType == 4 ) then -- 4 is Fox 1, 2 is Fox 2, 3 is Fox 3 --trigger.action.outText("Fox 1!", 15) if ( timer.getAbsTime() >= SoundLockout + 7 ) then local RandomFox1Sound = math.random(1,2) trigger.action.outSound('Fox1 ' .. RandomFox1Sound .. '.ogg') SoundLockout = timer.getAbsTime() else end elseif ( ShotWeaponMissileGuidanceType == 2 ) then --trigger.action.outText("Fox 2!", 15) if ( timer.getAbsTime() >= SoundLockout + 7 ) then local RandomFox2Sound = math.random(1,3) trigger.action.outSound('Fox2 ' .. RandomFox2Sound .. '.ogg') SoundLockout = timer.getAbsTime() else end elseif ( ShotWeaponMissileGuidanceType == 3 ) then --trigger.action.outText("Fox 3!", 15) if ( timer.getAbsTime() >= SoundLockout + 7 ) then local RandomFox3Sound = math.random(1,5) trigger.action.outSound('FoxGeneric ' .. RandomFox3Sound .. '.ogg') SoundLockout = timer.getAbsTime() else end else end elseif ( ShotWeaponMissileCategory == 4 ) and false then --4 for Anti-Ship Missile "Bruiser" --trigger.action.outText("Bruiser!", 15) --////Can't find any Bruiser sounds yet --if ( timer.getAbsTime() >= SoundLockout + 7 ) then --local RandomBruiserSound = math.random(1,1) --trigger.action.outSound('Bruiser ' .. RandomBruiserSound .. '.ogg') --SoundLockout = timer.getAbsTime() --else --end elseif ( ShotWeaponMissileCategory == 6 ) and false then --6 for Other Missile "Rifle" (Maverick, HARM, Harpoon) -- Need to work out how to distinguish between anti-rad 'magnum' and anti-ship 'bruiser' --trigger.action.outText("Weapon: "..ShotWeaponName, 15) --Now test for the missile name --////ANTI RADIATION if ( ShotWeaponName == "weapons.missiles.AGM_88" or ShotWeaponName == "weapons.missiles.AGM_122" or ShotWeaponName == "weapons.missiles.X_58" or ShotWeaponName == "weapons.missiles.X_25MP" or ShotWeaponName == "LD-10" ) then --trigger.action.outText("Magnum!", 15) if ( timer.getAbsTime() >= SoundLockout + 7 ) then local RandomMagnumSound = math.random(1,1) trigger.action.outSound('Magnum ' .. RandomMagnumSound .. '.ogg') SoundLockout = timer.getAbsTime() else end --////ASM's elseif ( ShotWeaponName == "weapons.missiles.AGM_65D" or ShotWeaponName == "weapons.missiles.AGM_65E" or ShotWeaponName == "weapons.missiles.AGM_65F" or ShotWeaponName == "weapons.missiles.AGM_65G" or ShotWeaponName == "weapons.missiles.AGM_65H" or ShotWeaponName == "weapons.missiles.AGM_65K" or ShotWeaponName == "weapons.missiles.X_29T" or ShotWeaponName == "weapons.missiles.X_29L" or ShotWeaponName == "weapons.missiles.X_25ML" or ShotWeaponName == "weapons.missiles.S-25L" or ShotWeaponName == "weapons.missiles.Vikhr_M" or ShotWeaponName == "weapons.missiles.RB75" or ShotWeaponName == "weapons.missiles.CM-802AKG" or ShotWeaponName == "weapons.missiles.C-701T" or ShotWeaponName == "weapons.missiles.C-701IR" ) then --trigger.action.outText("Rifle!", 15) if ( timer.getAbsTime() >= SoundLockout + 7 ) then local RandomRifleSound = math.random(1,1) trigger.action.outSound('Rifle ' .. RandomRifleSound .. '.ogg') SoundLockout = timer.getAbsTime() else end --////ANTI-SHIP elseif (ShotWeaponName == "weapons.missiles.AGM_84D" or ShotWeaponName == "weapons.missiles.C-802AK" or ShotWeaponName == "weapons.missiles.ROBOT" ) then --trigger.action.outText("Bruiser!", 15) --////Can't find any Bruiser sounds yet --if ( timer.getAbsTime() >= SoundLockout + 7 ) then --local RandomBruiserSound = math.random(1,1) --trigger.action.outSound('Bruiser ' .. RandomBruiserSound .. '.ogg') --SoundLockout = timer.getAbsTime() --else --end else end else end --////ROCKETS elseif ( ShotWeaponCategory == 2 ) and false then --Rockets, any type --Brevity Call Nails ... I think --Probably best not to do rockets as so many get fired --trigger.action.outText("Nails!", 15) --////BOMBS elseif ( ShotWeaponCategory == 3 ) and false then --Bomb, any type --trigger.action.outText("Pickle!", 15) if ( timer.getAbsTime() >= SoundLockout + 7 ) then local RandomPickleSound = math.random(1,5) trigger.action.outSound('Pickle ' .. RandomPickleSound .. '.ogg') SoundLockout = timer.getAbsTime() else end --////SHELLS elseif ( ShotWeaponCategory == 0 ) and false then --Shell, any type --No Brevity Call --trigger.action.outText("Shell!", 15) else end elseif ( ShootingUnitCoalition == 1 ) then if ( ShotWeaponMissileCategory == 2 ) then --trigger.action.outText("SAM Launch!", 15) if ( timer.getAbsTime() >= SoundLockout + 7 ) then local RandomSAMSound = math.random(1,6) trigger.action.outSound('SAM ' .. RandomSAMSound .. '.ogg') SoundLockout = timer.getAbsTime() else end else end else end else end end end end world.addEventHandler(SEF_SHOTHANDLER) SEF_ONDEADEVENTHANDLER = {} function SEF_ONDEADEVENTHANDLER:onEvent(Event) if Event.id == world.event.S_EVENT_DEAD then if Event.initiator then if ( Event.initiator:getCategory() == 1 or Event.initiator:getCategory() == 3 ) then -- UNIT or STATIC if ( Event.initiator:getCoalition() ~= nil ) then local DeadUnit = Event.initiator local DeadUnitObjectCategory = Event.initiator:getCategory() -- 1 UNIT / 2 WEAPON / 3 STATIC / 4 BASE / 5 SCENERY / 6 CARGO local DeadUnitCategory = Event.initiator:getDesc().category -- 0 AIRPLANE / 1 HELICOPTER / 2 GROUND_UNIT / 3 SHIP / 4 STRUCTURE local DeadUnitCoalition = Event.initiator:getCoalition() local DeadUnitName = Event.initiator:getName() if ( DeadUnitCoalition == 1 ) and false then -- RED ONLY AT THIS STAGE if ( DeadUnitObjectCategory == 1 ) then -- UNIT if ( DeadUnitCategory == 2 or DeadUnitCategory == 3 ) then -- GROUND_UNIT or SHIP if ( string.find(DeadUnitName, "Russian APC Tigr 233036") ) then --Do nothing we don't want to include these units in the list currently else UnitIntermentTableLength = UnitIntermentTableLength + 1 ClearFieldMkIIUnitInterment[UnitIntermentTableLength] = DeadUnitName end else end elseif ( DeadUnitObjectCategory == 3 ) then -- STATIC StaticIntermentTableLength = StaticIntermentTableLength + 1 ClearFieldMkIIStaticInterment[StaticIntermentTableLength] = DeadUnitName else end else end else end end end end end world.addEventHandler(SEF_ONDEADEVENTHANDLER) --////END EVENT HANDLERS --trigger.action.outText("Event Handlers Started", 15) env.info("Surrexen's Event Handlers Loaded Successfully", false) -------------------------------------------------------------------------------------------------------------------------------------------------
-- test/test-lex.lua -- -- Lua Access Control Engine -- Tests for the lexer -- -- Copyright 2012 Daniel Silverstone <dsilvers@digital-scurf.org> -- -- For Licence terms, see COPYING -- -- Step one, start coverage pcall(require, 'luacov') local lex = require 'lace.lex' local testnames = {} local real_assert = assert local total_asserts = 0 local function assert(...) local retval = real_assert(...) total_asserts = total_asserts + 1 return retval end local function add_test(suite, name, value) rawset(suite, name, value) testnames[#testnames+1] = name end local suite = setmetatable({}, {__newindex = add_test}) function suite.empty_string() local content = assert(lex.string("", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 0, "There are lines provided, despite source being empty") end function suite.single_cmd_string() local content = assert(lex.string("hello", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].epos == 5, "The word ends at the fifth character") assert(content.lines[1].content[1].str == "hello", "The word is 'hello'") assert(type(content.lines[1].warnings) == "nil", "There should be no warnings") end function suite.single_cmd_two_words_string() local content = assert(lex.string("hello world", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 2, "The line should have 2 words") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].epos == 5, "The word ends at the fifth character") assert(content.lines[1].content[1].str == "hello", "The word is 'hello'") assert(content.lines[1].content[2].spos == 7, "The word starts at the seventh character") assert(content.lines[1].content[2].epos == 11, "The word ends at the eleventh character") assert(content.lines[1].content[2].str == "world", "The word is 'world'") end function suite.two_cmds_two_words_string() local content = assert(lex.string("hello world\nworld hello", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 2, "There should have been two lines") assert(#content.lines[1].content == 2, "The line should have 2 words") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello", "The word starts is 'hello'") assert(content.lines[1].content[2].spos == 7, "The word starts at the seventh character") assert(content.lines[1].content[2].epos == 11, "The word ends at the eleventh character") assert(content.lines[1].content[2].str == "world", "The word is 'hello'") assert(#content.lines[2].content == 2, "The line should have 2 words") assert(content.lines[2].content[1].spos == 1, "The word starts at the first character") assert(content.lines[2].content[1].str == "world", "The word is 'word'") assert(content.lines[2].content[2].spos == 7, "The word starts at the seventh character") assert(content.lines[2].content[2].epos == 11, "The word ends at the eleventh character") assert(content.lines[2].content[2].str == "hello", "The word is 'hello'") end function suite.one_hash_comment() local content = assert(lex.string("# Hello", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(content.lines[1].type == "comment", "The line should be a comment") end function suite.one_slashes_comment() local content = assert(lex.string("// Hello", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(content.lines[1].type == "comment", "The line should be a comment") end function suite.one_dashes_comment() local content = assert(lex.string("-- Hello", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(content.lines[1].type == "comment", "The line should be a comment") end function suite.pure_whitespace() local content = assert(lex.string(" ", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(content.lines[1].type == "whitespace", "The line should be whitespace") end function suite.whitespace_then_comment() local content = assert(lex.string(" -- Fish", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(content.lines[1].type == "comment", "The line should be whitespace") end function suite.whitespace_then_command() local content = assert(lex.string(" hello", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 4, "The word starts at the fourth character") assert(content.lines[1].content[1].epos == 8, "The word ends at the ninth character") assert(content.lines[1].content[1].str == "hello", "The word is 'hello'") end function suite.whitespace_in_command() local content = assert(lex.string("hello world", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 2, "The line should have 2 words") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello", "The word is 'hello'") assert(content.lines[1].content[2].spos == 9, "The word starts at the ninth character") assert(content.lines[1].content[2].str == "world", "The word is 'world'") end function suite.single_quoted_word() local content = assert(lex.string("'hello'", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].epos == 7, "The word ends at the seventh character") assert(content.lines[1].content[1].str == "hello", "The word is 'hello'") end function suite.double_quoted_word() local content = assert(lex.string('"hello"', "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello", "The word is 'hello'") end function suite.escape_outside_quotes() local content = assert(lex.string("\\this", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "this", "The word is 'this'") end function suite.escape_inside_normal() local content = assert(lex.string("'hell\\o'", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello", "The word is 'hello'") end function suite.escape_inside_quotetype() local content = assert(lex.string("'hello\\''", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello'", "The word is \"hello'\"") end function suite.escape_inside_tab() local content = assert(lex.string("'hello\\t'", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello\t", "The word is \"hello\\t\"") end function suite.escape_inside_newline() local content = assert(lex.string("'hello\\n'", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello\n", "The word is \"hello\\n\"") end function suite.escape_outside_unused() local content = assert(lex.string("hello\\", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello", "The word is \"hello\"") assert(type(content.lines[1].warnings) == "table", "There should be a warning") assert(#content.lines[1].warnings == 1, "There should be one warning") assert(content.lines[1].warnings[1]:find("escape"), "The warning should be about the escape") end function suite.unclosed_quote() local content = assert(lex.string("'hello", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello", "The word is \"hello\"") assert(type(content.lines[1].warnings) == "table", "There should be a warning") assert(#content.lines[1].warnings == 1, "There should be one warning") assert(content.lines[1].warnings[1]:find("quoted"), "The warning should be about the unclosed quotes") end function suite.escape_inside_unclosed_unused() local content = assert(lex.string("'hello\\", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 1, "The line should have 1 word") assert(content.lines[1].content[1].spos == 1, "The word starts at the first character") assert(content.lines[1].content[1].str == "hello", "The word is \"hello\"") assert(type(content.lines[1].warnings) == "table", "There should be a warning") assert(#content.lines[1].warnings == 2, "There should be two warnings") assert(content.lines[1].warnings[1]:find("quoted"), "The warning should be about the unclosed quotes") assert(content.lines[1].warnings[2]:find("escape"), "The warning should be about the escape") end function suite.empty_string_words_work() local content = assert(lex.string("allow ''", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 2, "The line should have 2 words") assert(content.lines[1].content[1].spos == 1, "The first word starts at the first character") assert(content.lines[1].content[1].str == "allow", "The word is \"allow\"") assert(content.lines[1].content[2].str == "", "The second word is empty") assert(content.lines[1].content[2].spos == 7, "The empty word starts at the seventh character") end function suite.braced_sections_sublex() local content = assert(lex.string("foo [bar baz] meta", "SRC")) assert(content.source == "SRC", "Source name not propagated") assert(type(content.lines) == "table", "Lines is not a table") assert(#content.lines == 1, "There should have been one line") assert(#content.lines[1].content == 3, "The line should have 3 words") assert(content.lines[1].content[1].spos == 1, "The first word starts at the first character") assert(content.lines[1].content[1].str == "foo", "The word is \"foo\"") assert(content.lines[1].content[3].spos == 15, "The third word starts at the first character") assert(content.lines[1].content[3].str == "meta", "The word is \"foo\"") -- Now the sublex... assert(content.lines[1].content[2].sub, "The second word is a sublex") assert(#content.lines[1].content[2].sub == 2, "The sublex should have 2 words") assert(content.lines[1].content[2].sub[1].str == "bar", "The sublex first word should be bar") assert(content.lines[1].content[2].sub[2].str == "baz", "The sublex first word should be bar") assert(content.lines[1].content[2].spos == 5, "The sublex starts at location 5") assert(content.lines[1].content[2].epos == 13, "The sublex ends at location 13") end local count_ok = 0 for _, testname in ipairs(testnames) do -- print("Run: " .. testname) local ok, err = xpcall(suite[testname], debug.traceback) if not ok then print(err) print() else count_ok = count_ok + 1 end end print(tostring(count_ok) .. "/" .. tostring(#testnames) .. " [" .. tostring(total_asserts) .. "] OK") os.exit(count_ok == #testnames and 0 or 1)
repeat wait() until script.Parent.Parent.Parent.Parent.Parent.Name == "PurchasedObjects" script.Parent.Text = "" ..script.Parent.Parent.Parent.Parent.Parent.Parent.Owner.Value.Name.. "'s Gym"
-- !!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!! -- This file is automaticly generated. Don't edit manualy! -- !!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!! ---@class C_CampaignInfo C_CampaignInfo = {} ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.GetAvailableCampaigns) ---@return table @campaignIDs function C_CampaignInfo.GetAvailableCampaigns() end ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.GetCampaignChapterInfo) ---@param campaignChapterID number ---@return CampaignChapterInfo @campaignChapterInfo function C_CampaignInfo.GetCampaignChapterInfo(campaignChapterID) end ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.GetCampaignID) ---@param questID number ---@return number @campaignID function C_CampaignInfo.GetCampaignID(questID) end ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.GetCampaignInfo) ---@param campaignID number ---@return CampaignInfo @campaignInfo function C_CampaignInfo.GetCampaignInfo(campaignID) end ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.GetChapterIDs) ---@param campaignID number ---@return table @chapterIDs function C_CampaignInfo.GetChapterIDs(campaignID) end ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.GetCurrentChapterID) ---@param campaignID number ---@return number @currentChapterID function C_CampaignInfo.GetCurrentChapterID(campaignID) end ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.GetFailureReason) ---@param campaignID number ---@return CampaignFailureReason @failureReason function C_CampaignInfo.GetFailureReason(campaignID) end ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.GetState) ---@param campaignID number ---@return CampaignState @state function C_CampaignInfo.GetState(campaignID) end ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.IsCampaignQuest) ---@param questID number ---@return boolean @isCampaignQuest function C_CampaignInfo.IsCampaignQuest(questID) end ---[Wowpedia documentation](https://wow.gamepedia.com/API_C_CampaignInfo.UsesNormalQuestIcons) ---@param campaignID number ---@return boolean @useNormalQuestIcons function C_CampaignInfo.UsesNormalQuestIcons(campaignID) end ---@alias CampaignState number|"Enum.CampaignState.Invalid"|"Enum.CampaignState.Complete"|"Enum.CampaignState.InProgress"|"Enum.CampaignState.Stalled" ---@class CampaignChapterInfo ---@field public name string ---@field public description string ---@field public rewardQuestID number ---@field public orderIndex number CampaignChapterInfo = {} ---@class CampaignFailureReason ---@field public text string ---@field public questID number ---@field public mapID number CampaignFailureReason = {} ---@class CampaignInfo ---@field public name string ---@field public description string ---@field public uiTextureKit string ---@field public isWarCampaign boolean CampaignInfo = {}
local Tentacle = Fight:extend() function Tentacle:new(...) Tentacle.super.new(self, ...) Art.new(self, "tentacle") self.enemyName = "tentacle monster" self.anim:add("attacking", 1); self.anim:add("defending", 1); self.anim:add("prepareAttack", 1); self.anim:add("prepareDefense", 1); self.health = 90 self.attack = 2 self.timeAttacking = 4 self.timeDefending = 3 self.strength = 15 self.description = "Suddenly, a tentacle monster popped out of the ground. " self.attackDescription = "The tentacle monster flung himself at [username]" self.prepareAttackDescription = "Then the tentacle monster was preparing for an attack!" end return Tentacle
add_rules("mode.debug", "mode.release") option("wchar32", {showmenu = true, default = false}) option("freetype", {showmenu = true, default = false}) option("glfw_opengl3", {showmenu = true, default = false}) option("user_config", {showmenu = true, default = nil, type = "string"}) option("use_glad", {showmenu = true, default = false}) if has_config("freetype") then add_requires("freetype") end if has_config("glfw_opengl3") then add_requires("glfw") if has_config("use_glad") then add_requires("glad") end end target("imgui") set_kind("static") add_files("*.cpp") add_headerfiles("*.h") add_includedirs(".") if has_config("wchar32") then add_headerfiles("misc/freetype/imgui_freetype.h") add_files("misc/freetype/imgui_freetype.cpp") add_defines("IMGUI_USE_WCHAR32") end if has_config("freetype") then add_headerfiles("misc/freetype/imgui_freetype.h") add_files("misc/freetype/imgui_freetype.cpp") add_packages("freetype") add_defines("IMGUI_ENABLE_FREETYPE") end if has_config("glfw_opengl3") then add_files("backends/imgui_impl_glfw.cpp", "backends/imgui_impl_opengl3.cpp") add_headerfiles("backends/imgui_impl_glfw.h", "backends/imgui_impl_opengl3.h") add_packages("glfw") if has_config("use_glad") then add_defines("IMGUI_IMPL_OPENGL_LOADER_GLAD") add_packages("glad") else add_headerfiles("backends/imgui_impl_opengl3_loader.h") end end if has_config("user_config") then local user_config = get_config("user_config") add_defines("IMGUI_USER_CONFIG=\"".. user_config .."\"") end -- Modify imconfig. after_install(function (target) local config_file = path.join(target:installdir(), "include/imconfig.h") if has_config("wchar32") then io.gsub(config_file, "//#define IMGUI_USE_WCHAR32", "#define IMGUI_USE_WCHAR32") end if has_config("freetype") then io.gsub(config_file, "//#define IMGUI_ENABLE_FREETYPE", "#define IMGUI_ENABLE_FREETYPE") end end)
--------------------------------------------------------------------------------------------------- -- Description: Check that SDL processes OnVehicleData notification with <vd_param> parameter -- -- Preconditions: -- 1) SDL and HMI are started -- 2) SubscribeVehicleData, OnVehicleData RPCs and <vd_param> parameter are allowed by policies -- 3) App is registered -- 4) App is subscribed to <vd_param> parameter data -- -- In case: -- 1) HMI sends valid OnVehicleData notification with <vd_param> parameter data to SDL -- SDL does: -- - a) transfer this notification to App -- Exception: Notification for unsubscribable VD parameter is not transfered --------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local common = require('test_scripts/API/VehicleData/common') --[[ Scenario ]] common.Title("Preconditions") common.Step("Clean environment and update preloaded_pt file", common.preconditions) common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) common.Step("Register App", common.registerApp) common.Title("Test") for param in common.spairs(common.getVDParams(true)) do common.Title("VD parameter: " .. param) common.Step("RPC " .. common.rpc.sub, common.processSubscriptionRPC, { common.rpc.sub, param }) common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, common.isExpected }) end for param in common.spairs(common.getVDParams(false)) do common.Title("VD parameter: " .. param) common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, common.isNotExpected }) end common.Title("Postconditions") common.Step("Stop SDL", common.postconditions)
class(DateUtils); function DateUtils.now(dateFormat) local dateFormatId = runtime::invokeClassMethod("NSDateFormatter", "new"); runtime::invokeMethod(dateFormatId, "autorelease"); runtime::releaseObject(dateFormatId); runtime::invokeMethod(dateFormatId, "setDateFormat:", dateFormat); local dateId = runtime::invokeClassMethod("NSDate", "new"); runtime::invokeMethod(dateId, "autorelease"); runtime::releaseObject(dateId); local dateString = runtime::invokeMethod(dateFormatId, "stringFromDate:", dateId); runtime::releaseObject(dateFormatId); runtime::releaseObject(dateId); return dateString; end
-- Menu texts local mainMenuText = [[-----=====Lua TextRogue=====----- --Main Menu-- a) Play b) Settings c) Quit]] -- Main menu function - Encapsulates all game code (Uses tail recursion to run different menus and the actual game) function run_menu(args) assert(args.outputfunc and args.valuefunc and args.inputfunc and args.clearfunc, "Main game menu: run_menu called without core arguments.") local output = args.outputfunc local valuefunc = args.valuefunc local input = args.inputfunc local clear = args.clearfunc output(mainMenuText, true) while true do output("\nEnter your choice.") local choice = input(nil, ">") if choice == 'a' then return menu_play(args) elseif choice == 'b' then return menu_settings(args) elseif choice == 'c' then return else output("'" .. choice .. "' is not a valid option.") end end end function menu_play(args) print("Blah") error("Play menu not implemented yet.") print("Bleh") end function menu_settings(args) error("Settings menu not implemented yet.") end
---@class AttackState : zombie.ai.states.AttackState ---@field private s_instance AttackState ---@field private frontStr String ---@field private backStr String ---@field private rightStr String ---@field private leftStr String AttackState = {} ---@public ---@param arg0 IsoGameCharacter ---@return boolean function AttackState:isAttacking(arg0) end ---Overrides: --- ---exit in class State ---@public ---@param owner IsoGameCharacter ---@return void function AttackState:exit(owner) end ---@public ---@param arg0 IsoGameCharacter ---@param arg1 AnimEvent ---@return void function AttackState:animEvent(arg0, arg1) end ---@private ---@param arg0 String ---@param arg1 IsoGameCharacter ---@return void function AttackState:triggerPlayerReaction(arg0, arg1) end ---Overrides: --- ---enter in class State ---@public ---@param owner IsoGameCharacter ---@return void function AttackState:enter(owner) end ---Overrides: --- ---execute in class State ---@public ---@param owner IsoGameCharacter ---@return void function AttackState:execute(owner) end ---@public ---@return AttackState function AttackState:instance() end
local _ENV = mkmodule('utils') local df = df -- Comparator function function compare(a,b) if a < b then return -1 elseif a > b then return 1 else return 0 end end -- Sort strings; compare empty last function compare_name(a,b) if a == '' then if b == '' then return 0 else return 1 end elseif b == '' then return -1 else return compare(a,b) end end -- Make a field comparator function compare_field(field,cmp) cmp = cmp or compare if field then return function (a,b) return cmp(a[field],b[field]) end else return cmp end end -- Make a comparator of field vs key function compare_field_key(field,cmp) cmp = cmp or compare if field then return function (a,b) return cmp(a[field],b) end else return cmp end end function is_container(obj) return df.isvalid(obj) == 'ref' and obj._kind == 'container' end -- Make a sequence of numbers in 1..size function make_index_sequence(istart,iend) local index = {} for i=istart,iend do index[i-istart+1] = i end return index end --[[ Sort items in data according to ordering. Each ordering spec is a table with possible fields: * key = function(value) Computes comparison key from a data value. Not called on nil. * key_table = function(data) Computes a key table from the data table in one go. * compare = function(a,b) Comparison function. Defaults to compare above. Called on non-nil keys; nil sorts last. * nil_first If true, nil keys are sorted first instead of last. * reverse If true, sort non-nil keys in descending order. Returns a table of integer indices into data. --]] function make_sort_order(data,ordering) -- Compute sort keys and comparators local keys = {} local cmps = {} local size = data.n or #data for i=1,#ordering do local order = ordering[i] if order.key_table then keys[i] = order.key_table(data) elseif order.key then local kt = {} local kf = order.key for j=1,size do if data[j] == nil then kt[j] = nil else kt[j] = kf(data[j]) end end keys[i] = kt else keys[i] = data end cmps[i] = order.compare or compare end -- Make an order table local index = make_index_sequence(1,size) -- Sort the ordering table table.sort(index, function(ia,ib) for i=1,#keys do local ka = keys[i][ia] local kb = keys[i][ib] -- Sort nil keys to the end if ka == nil then if kb ~= nil then return ordering[i].nil_first end elseif kb == nil then return not ordering[i].nil_first else local cmpv = cmps[i](ka,kb) if ordering[i].reverse then cmpv = -cmpv end if cmpv < 0 then return true elseif cmpv > 0 then return false end end end return ia < ib -- this should ensure stable sort end) return index end --[[ Iterate a 'list' structure, e.g. df.global.world.job_list --]] local function next_df_list(s,link) link = link.next if link then return link, link.item end end function listpairs(list) return next_df_list, nil, list end --[[ Recursively assign data into a table. --]] function assign(tgt,src) if df.isvalid(tgt) == 'ref' then df.assign(tgt, src) elseif type(tgt) == 'table' then for k,v in pairs(src) do if type(v) == 'table' then local cv = tgt[k] if cv == nil then cv = {} tgt[k] = cv end assign(cv, v) else tgt[k] = v end end else error('Invalid assign target type: '..tostring(tgt)) end return tgt end local function copy_field(obj,k,v,deep) if v == nil then return NULL end if deep then local field = obj:_field(k) if field == v then return clone(v,deep) end end return v end -- Copy the object as lua data structures. function clone(obj,deep) if type(obj) == 'table' then if deep then return assign({},obj) else return copyall(obj) end elseif df.isvalid(obj) == 'ref' then local kind = obj._kind if kind == 'primitive' then return obj.value elseif kind == 'bitfield' then local rv = {} for k,v in pairs(obj) do rv[k] = v end return rv elseif kind == 'container' then local rv = {} for k,v in ipairs(obj) do rv[k+1] = copy_field(obj,k,v,deep) end return rv else -- struct local rv = {} for k,v in pairs(obj) do rv[k] = copy_field(obj,k,v,deep) end return rv end else return obj end end local function get_default(default,key,base) if type(default) == 'table' then local dv = default[key] if dv == nil then dv = default._default end if dv == nil then dv = base end return dv else return default end end -- Copy the object as lua data structures, skipping values matching defaults. function clone_with_default(obj,default,force) local rv = nil local function setrv(k,v) if v ~= nil then if rv == nil then rv = {} end rv[k] = v end end if default == nil then return nil elseif type(obj) == 'table' then for k,v in pairs(obj) do setrv(k, clone_with_default(v, get_default(default,k))) end elseif df.isvalid(obj) == 'ref' then local kind = obj._kind if kind == 'primitive' then return clone_with_default(obj.value,default,force) elseif kind == 'bitfield' then for k,v in pairs(obj) do setrv(k, clone_with_default(v, get_default(default,k,false))) end elseif kind == 'container' then for k,v in ipairs(obj) do setrv(k+1, clone_with_default(v, default, true)) end else -- struct for k,v in pairs(obj) do setrv(k, clone_with_default(v, get_default(default,k))) end end elseif obj == default and not force then return nil elseif obj == nil then return NULL else return obj end if force and rv == nil then rv = {} end return rv end -- Parse an integer value into a bitfield table function parse_bitfield_int(value, type_ref) if value == 0 then return nil end local res = {} for i,v in ipairs(type_ref) do if bit32.extract(value, i) ~= 0 then res[v] = true end end return res end -- List the enabled flag names in the bitfield table function list_bitfield_flags(bitfield, list) list = list or {} if bitfield then for name,val in pairs(bitfield) do if val then table.insert(list, name) end end end return list end -- Sort a vector or lua table function sort_vector(vector,field,cmp) local fcmp = compare_field(field,cmp) local scmp = function(a,b) return fcmp(a,b) < 0 end if df.isvalid(vector) then if vector._kind ~= 'container' then error('Container expected: '..tostring(vector)) end local items = clone(vector, true) table.sort(items, scmp) vector:assign(items) else table.sort(vector, scmp) end return vector end -- Linear search function linear_index(vector,key,field) local min,max if df.isvalid(vector) then min,max = 0,#vector-1 else min,max = 1,#vector end if field then for i=min,max do local obj = vector[i] if obj[field] == key then return i, obj end end else for i=min,max do local obj = vector[i] if obj == key then return i, obj end end end return nil end -- Binary search in a vector or lua table function binsearch(vector,key,field,cmp,min,max) if not(min and max) then if df.isvalid(vector) then min = -1 max = #vector else min = 0 max = #vector+1 end end local mf = math.floor local fcmp = compare_field_key(field,cmp) while true do local mid = mf((min+max)/2) if mid <= min then return nil, false, max end local item = vector[mid] local cv = fcmp(item, key) if cv == 0 then return item, true, mid elseif cv < 0 then min = mid else max = mid end end end -- Binary search and insert function insert_sorted(vector,item,field,cmp) local key = item if field and item then key = item[field] end local cur,found,pos = binsearch(vector,key,field,cmp) if found then return false,cur,pos else if df.isvalid(vector) then vector:insert(pos, item) else table.insert(vector, pos, item) end return true,vector[pos],pos end end -- Binary search, then insert or overwrite function insert_or_update(vector,item,field,cmp) local added,cur,pos = insert_sorted(vector,item,field,cmp) if not added then vector[pos] = item cur = vector[pos] end return added,cur,pos end -- Binary search and erase function erase_sorted_key(vector,key,field,cmp) local cur,found,pos = binsearch(vector,key,field,cmp) if found then if df.isvalid(vector) then vector:erase(pos) else table.remove(vector, pos) end end return found,cur,pos end function erase_sorted(vector,item,field,cmp) local key = item if field and item then key = item[field] end return erase_sorted_key(vector,key,field,cmp) end -- Calls a method with a string temporary function call_with_string(obj,methodname,...) return dfhack.with_temp_object( df.new "string", function(str,obj,methodname,...) obj[methodname](obj,str,...) return str.value end, obj,methodname,... ) end function getBuildingName(building) return call_with_string(building, 'getName') end function getBuildingCenter(building) return xyz2pos(building.centerx, building.centery, building.z) end function getItemDescription(item,mode) return call_with_string(item, 'getItemDescription', mode or 0) end function getItemDescriptionPrefix(item,mode) return call_with_string(item, 'getItemDescriptionPrefix', mode or 0) end -- Split the string by the given delimiter function split_string(self, delimiter) local result = { } local from = 1 local delim_from, delim_to = string.find( self, delimiter, from ) while delim_from do table.insert( result, string.sub( self, from , delim_from-1 ) ) from = delim_to + 1 delim_from, delim_to = string.find( self, delimiter, from ) end table.insert( result, string.sub( self, from ) ) return result end -- Ask a yes-no question function prompt_yes_no(msg,default) local prompt = msg if default == nil then prompt = prompt..' (y/n): ' elseif default then prompt = prompt..' (y/n)[y]: ' else prompt = prompt..' (y/n)[n]: ' end while true do local rv = dfhack.lineedit(prompt) if rv then if string.match(rv,'^[Yy]') then return true elseif string.match(rv,'^[Nn]') then return false elseif rv == 'abort' then qerror('User abort') elseif rv == '' and default ~= nil then return default end end end end -- Ask for input with check function function prompt_input(prompt,check,quit_str) quit_str = quit_str or '~~~' while true do local rv = dfhack.lineedit(prompt) if rv == quit_str then qerror('User abort') end local rtbl = table.pack(check(rv)) if rtbl[1] then return table.unpack(rtbl,2,rtbl.n) end end end function check_number(text) local nv = tonumber(text) return nv ~= nil, nv end function invert(tab) local result = {} for k,v in pairs(tab) do result[v]=k end return result end function processArgs(args, validArgs) --[[ standardized argument processing for scripts -argName value -argName [list of values] -argName [list of [nested values] -that can be [whatever] format of matched square brackets] -arg1 \-arg3 escape sequences --]] local result = {} local argName local bracketDepth = 0 for i,arg in ipairs(args) do if argName then if arg == '[' then if bracketDepth > 0 then table.insert(result[argName], arg) end bracketDepth = bracketDepth+1 elseif arg == ']' then bracketDepth = bracketDepth-1 if bracketDepth > 0 then table.insert(result[argName], arg) else argName = nil end elseif string.sub(arg,1,1) == '\\' then if bracketDepth == 0 then result[argName] = string.sub(arg,2) argName = nil else table.insert(result[argName], string.sub(arg,2)) end else if bracketDepth == 0 then result[argName] = arg argName = nil else table.insert(result[argName], arg) end end elseif string.sub(arg,1,1) == '-' then argName = string.sub(arg,2) if validArgs and not validArgs[argName] then error('error: invalid arg: ' .. i .. ': ' .. argName) end if result[argName] then error('duplicate arg: ' .. i .. ': ' .. argName) end if i+1 > #args or string.sub(args[i+1],1,1) == '-' then result[argName] = '' argName = nil else result[argName] = {} end else error('error parsing arg ' .. i .. ': ' .. arg) end end return result end function fillTable(table1,table2) for k,v in pairs(table2) do table1[k] = v end end function unfillTable(table1,table2) for k,v in pairs(table2) do table1[k] = nil end end return _ENV
-- Train an encoder using config.json. require('torch') require('nn') require('optim') require('hdf5') require('cunn') require('lfs') package.path = package.path .. ";" .. lfs.currentdir() .. '/../?/th/init.lua' lib = require('lib') --- Check if the file exists and read it. -- @param filepath path to H5 file -- @return tensor read from file local function checkAndRead(filepath) if not lib.utils.fileExists(filepath) then print('[Error] file ' .. filepath .. ' not found; check ' .. configFile) os.exit() end print('[Training] reading ' .. filepath) return lib.utils.readHDF5(filepath) end -- https://github.com/torch/cutorch if cutorch.isCachingAllocatorEnabled() then print('[Training] caching allocator enabled') end --- Convert a table of tensors to a table of CUDA tensors. -- @param table the table to convert local function tableToCUDA(table) for key, value in pairs(table) do table[key] = table[key]:cuda() end end --- Set all table elements to zero. -- @param table table to set to zero local function tableToZero(table) for key, value in pairs(table) do table[key] = 0 end end -- --------------------------------------------------------------- -- Read configuration and data. -- --------------------------------------------------------------- -- Load configuration. configFile = 'clean.json' if arg[1] then configFile = arg[1] end if not lib.utils.fileExists(configFile) then print('[Error] configuration file not found') os.exit() end print('[Training] reading ' .. configFile) config = lib.utils.readJSON(configFile) config['data_directory'] = config['data_directory'] .. '/' config['base_directory'] = config['base_directory'] .. '/' if not lib.utils.directoryExists(config['data_directory']) then print('[Error] Data directory not found') os.exit() end if not lib.utils.fileExists(config['base_directory'] .. config['prior_model_file']) then print('[Error] ' .. config['base_directory'] .. config['prior_model_file'] .. ' does not exist; train a shape prior first, create the base directory manually and put the trained model inside') os.exit() end if lib.utils.fileExists(config['base_directory'] .. config['inference_model_file']) then print('[Training] Model already exists, overwriting results and model?') print('[Training] Press ANY KEY to continue') io.read() end config['data_directory'] = config['data_directory'] .. '/' points = checkAndRead(config['data_directory'] .. config['inference_training_inputs']) inputs_2 = checkAndRead(config['data_directory'] .. config['inference_training_lsdf_inputs']) inputs = torch.cat({points:float(), inputs_2}, 2) if config['inference_training_outputs'] and config['inference_training_lsdf_outputs'] then outputs_1 = checkAndRead(config['data_directory'] .. config['inference_training_outputs']) outputs_2 = checkAndRead(config['data_directory'] .. config['inference_training_lsdf_outputs']) outputs = torch.cat({outputs_1:float(), outputs_2}, 2) end space = checkAndRead(config['data_directory'] .. config['inference_training_space']) -- Load data for validation. valPoints = checkAndRead(config['data_directory'] .. config['validation_inputs']) valInputs_2 = checkAndRead(config['data_directory'] .. config['validation_lsdf_inputs']) valInputs = torch.cat({valPoints:float(), valInputs_2}, 2) if config['validation_outputs'] and config['validation_lsdf_outputs'] then valOutputs_1 = checkAndRead(config['data_directory'] .. config['validation_outputs']) valOutputs_2 = checkAndRead(config['data_directory'] .. config['validation_lsdf_outputs']) valOutputs = torch.cat({valOutputs_1:float(), valOutputs_2}, 2) end valSpace = checkAndRead(config['data_directory'] .. config['validation_space']) -- Check dimensions. N = inputs:size(1) -- --------------------------------------------------------------- -- Setup and initialize model. -- --------------------------------------------------------------- priorModel = torch.load(config['base_directory'] .. config['prior_model_file']) print(priorModel) encoder = priorModel.modules[1] encoder:remove(#encoder.modules) encoder:remove(#encoder.modules) mean = encoder.modules[#encoder.modules].modules[1] encoder:remove(#encoder.modules) encoder:add(mean) decoder = priorModel.modules[2] KLD = nn.MaximumLikelihoodPrior() KLD.var = 1 KLD.lambda = config['prior_weight'] encoder:add(KLD) lib.utils.fixLayersAfter(decoder, 1) if config['reinitialize_encoder'] then lib.init(encoder, config['weight_initialization'], config['weight_value'], config['bias_initialization'], config['bias_value']) print('[Training] reinitializing encoder') end model = nn.Sequential() model:add(encoder) model:add(decoder) model = model:cuda() print(model) -- --------------------------------------------------------------- -- Setup training. -- --------------------------------------------------------------- batchSize = config['batch_size'] learningRate = config['learning_rate'] momentum = config['momentum'] weightDecay = config['weight_decay'] epochs = config['epochs'] iterations = epochs*math.floor(N/batchSize) minimumLearningRate = config['minimum_learning_rate'] learningRateDecay = config['decay_learning_rate'] maximumMomentum = config['maximum_momentum'] momentumDecay = config['decay_momentum'] decayIterations = config['decay_iterations'] lossIterations = config['loss_iterations'] snapshotIterations = config['snapshot_iterations'] testIterations = config['test_iterations'] if config['inference_training_statistics'] then if not lib.utils.fileExists(config['data_directory'] .. config['inference_training_statistics']) then print('[Error] the key inference_training_statistics is defined in the configuration; but file ' .. config['data_directory'] ..config['inference_training_statistics'] .. ' cannot be found') os.exit() end print('[Training] reading ' .. config['data_directory'] ..config['inference_training_statistics']) trainStatistics = lib.utils.readHDF5(config['data_directory'] ..config['inference_training_statistics']) trainStatistics = nn.utils.addSingletonDimension(nn.utils.addSingletonDimension(trainStatistics, 1), 1) trainStatistics = torch.repeatTensor(trainStatistics, batchSize, 1, 1, 1, 1) end -- Parameters and gradients. parameters, gradParameters = model:getParameters() parameters = parameters:cuda() gradParameters = gradParameters:cuda() -- --------------------------------------------------------------- -- Setup loss. -- --------------------------------------------------------------- criterion = nn.MultipleCriterion() criterion.weights = {} criterion.criteria = {} criterion.channels = {} assert(#config['criteria'] == #config['weights']) for i = 1, #config['criteria'] do if config['criteria'][i] == 'sdfpointbce' then local pointCriterion = nn.GaussianPointBCECriterion() pointCriterion.sizeAverage = false pointCriterion = pointCriterion:cuda() criterion.criteria[i] = pointCriterion criterion.weights[i] = config['weights'][i] criterion.channels[i] = 2 elseif config['criteria'][i] == 'sdfspacebce' then local spaceCriterion = nn.GaussianFreeSpaceBCECriterion() spaceCriterion.sizeAverage = false spaceCriterion = spaceCriterion:cuda() if config['weighted'] then assert(trainStatistics) spaceCriterion = nn.WeightedGaussianFreeSpaceBCECriterion() spaceCriterion.sizeAverage = false spaceCriterion.weights = trainStatistics spaceCriterion = spaceCriterion:cuda() print('[Training] using weighted sdfspacebce') end criterion.criteria[i] = spaceCriterion criterion.weights[i] = config['weights'][i] criterion.channels[i] = 2 elseif config['criteria'][i] == 'occpointbce' then local pointCriterion = nn.PointBCECriterion() pointCriterion.sizeAverage = false pointCriterion = pointCriterion:cuda() criterion.criteria[i] = pointCriterion criterion.weights[i] = config['weights'][i] criterion.channels[i] = 1 elseif config['criteria'][i] == 'occspacebce' then local spaceCriterion = nn.FreeSpaceBCECriterion() spaceCriterion.sizeAverage = false spaceCriterion = spaceCriterion:cuda() if config['weighted'] then assert(trainStatistics) spaceCriterion = nn.WeightedFreeSpaceBCECriterion() spaceCriterion.sizeAverage = false spaceCriterion.weights = trainStatistics spaceCriterion = spaceCriterion:cuda() print('[Training] using weighted occspacebce') end criterion.criteria[i] = spaceCriterion criterion.weights[i] = config['weights'][i] criterion.channels[i] = 1 else assert(False) end end -- --------------------------------------------------------------- -- Main training loop. -- --------------------------------------------------------------- protocol = torch.Tensor(iterations, 5):fill(0) valProtocol = torch.Tensor(math.floor(iterations/testIterations) + 1, 10):fill(0) for t = 1, iterations do -- Sample a random batch from the dataset. local shuffle = torch.randperm(N) shuffle = shuffle:narrow(1, 1, batchSize) shuffle = shuffle:long() local container = {} -- Container will hold the different inputs and outputs in different representations. container['input'] = inputs:index(1, shuffle) container['points'] = points:index(1, shuffle) container['space'] = space:index(1, shuffle) if outputs then container['target'] = outputs:index(1, shuffle) end tableToCUDA(container) --- Definition of the objective on the current mini-batch. -- This will be the objective fed to the optimization algorithm. -- @param x input parameters -- @return object value, gradients local feval = function(x) if x ~= parameters then parameters:copy(x) end gradParameters:zero() -- Evaluate function on mini-batch. local pred = model:forward(container['input']) local f = criterion:forward(pred, {container['points'], container['space'], container['points'], container['space']}) local df = criterion:backward(pred, {container['points'], container['space'], container['points'], container['space']}) model:backward(container['input'], df) -- Save losses in protocol. protocol[t][2] = f protocol[t][3] = KLD.loss -- Weight decay: if weightDecay > 0 then weightDecayLoss = weightDecay * torch.norm(parameters, 2)^2/2 f = f + weightDecayLoss protocol[t][4] = weightDecayLoss gradParameters:add(parameters:clone():mul(weightDecay)) end if container['target'] then protocol[t][5] = torch.mean(torch.abs(pred - container['target'])) end -- Add the Kullback-Leibler loss. f = f + KLD.loss return f, gradParameters end -- Update state with learning rate and momentum. state = state or { learningRate = learningRate, momentum = momentum, learningRateDecay = 0 -- will be done manually below } -- Returns the new parameters and the objective evaluated -- before the update. --_, _ = optim.adam(feval, parameters, state) _, _ = optim.sgd(feval, parameters, state) local time = os.date("*t") -- Report a smoothed loss instead of batch loss. if t%lossIterations == 0 then local smoothedLoss = torch.mean(protocol:narrow(1, t - lossIterations + 1, lossIterations):narrow(2, 2, 1)) local smoothedKLD = torch.mean(protocol:narrow(1, t - lossIterations + 1, lossIterations):narrow(2, 3, 1)) local smoothedWeightDecay = torch.mean(protocol:narrow(1, t - lossIterations + 1, lossIterations):narrow(2, 4, 1)) local loss = smoothedLoss + smoothedKLD + smoothedWeightDecay print('[Training] ' .. t .. '|' .. iterations .. '|' .. time.hour .. ':' .. time.min .. ':' .. time.sec ..': [' .. KLD.lambda .. '] ' .. loss .. ' / ' .. smoothedLoss .. ' / ' .. smoothedKLD .. ' / ' .. smoothedWeightDecay) end -- Decay learning rate and KLD weight, do this before resetting all smoothed -- statistics. if t%decayIterations == 0 then learningRate = math.max(minimumLearningRate, learningRate*learningRateDecay) momentum = math.min(maximumMomentum, momentum*momentumDecay) print('[Training] ' .. t .. '|' .. iterations .. '|' .. time.hour .. ':' .. time.min .. ':' .. time.sec ..': learning rate ' .. learningRate) print('[Training] ' .. t .. '|' .. iterations .. '|' .. time.hour .. ':' .. time.min .. ':' .. time.sec ..': momentum ' .. momentum) end -- Validate on validation set. if t%testIterations == 0 or t == 1 or t == iterations then -- In case the validation set gets to large. local valN = valInputs:size(1) local valBatchSize = batchSize local valNumBatches = math.floor(valN/valBatchSize) local valIteration = math.floor(t/testIterations) + 1 -- Accumulate and save all predictions. local accValPreds = nil for b = 0, valNumBatches do local batchStart = b*valBatchSize + 1 local batchLength = math.min((b + 1)*valBatchSize - b*valBatchSize, valN - b*valBatchSize) local container = {} -- Container will hold the different inputs and outputs in different representations. container['input'] = valInputs:narrow(1, batchStart, batchLength) container['points'] = valPoints:narrow(1, batchStart, batchLength) container['space'] = valSpace:narrow(1, batchStart, batchLength) if valTargets then container['target'] = valTargets:narrow(1, batchStart, batchLength) end tableToCUDA(container) local valPreds = model:forward(container['input']) local valCodes = model.modules[1].modules[#model.modules[1].modules].output local f = criterion:forward(valPreds, {container['points'], container['space'], container['points'], container['space']}) accValPreds = lib.utils.appendTensor(accValPreds, valPreds) valProtocol[valIteration][2] = valProtocol[valIteration][2] + f valProtocol[valIteration][4] = valProtocol[valIteration][4] + KLD.loss if container['target'] then valProtocol[valIteration][6] = valProtocol[valIteration][6] + torch.mean(torch.abs(valPreds - container['target'])) end valProtocol[valIteration][8] = valProtocol[valIteration][8] + torch.mean(valCodes) valProtocol[valIteration][9] = valProtocol[valIteration][9] + torch.std(valCodes) end valProtocol[valIteration][1] = t for i = 2, valProtocol:size(2) do valProtocol[valIteration][i] = valProtocol[valIteration][i] / valNumBatches end local predFile = config['base_directory'] .. t .. '_predictions.h5' lib.utils.writeHDF5(predFile, accValPreds) print('[Training] ' .. t .. '|' .. iterations .. '|' .. time.hour .. ':' .. time.min .. ':' .. time.sec ..': saved ' .. predFile) print('[Training] ' .. t .. '|' .. iterations .. '|' .. time.hour .. ':' .. time.min .. ':' .. time.sec ..': codes ' .. valProtocol[valIteration][8] .. ' / ' .. valProtocol[valIteration][9]) print('[Training] ' .. t .. '|' .. iterations .. '|' .. time.hour .. ':' .. time.min .. ':' .. time.sec ..': validation loss ' .. valProtocol[valIteration][2]) print('[Training] ' .. t .. '|' .. iterations .. '|' .. time.hour .. ':' .. time.min .. ':' .. time.sec ..': KLD loss ' .. valProtocol[valIteration][4]) print('[Training] ' .. t .. '|' .. iterations .. '|' .. time.hour .. ':' .. time.min .. ':' .. time.sec ..': validation error (abs) ' .. valProtocol[valIteration][6]) end end -- --------------------------------------------------------------- -- Save protocols and model. -- --------------------------------------------------------------- protocolFile = config['base_directory'] .. config['train_protocol_file'] lib.utils.writeHDF5(protocolFile, protocol) print('[Training] protocol ' .. protocolFile) protocolFile = config['base_directory'] .. config['val_protocol_file'] lib.utils.writeHDF5(protocolFile, valProtocol) print('[Training] protocol ' .. protocolFile) modelFile = config['base_directory'] .. config['inference_model_file'] torch.save(modelFile, model) print('[Training] model ' .. modelFile)
-- -- tests/actions/vstudio/cs2005/test_build_events.lua -- Check generation of pre- and post-build commands for C# projects. -- Copyright (c) 2012-2013 Jason Perkins and the Premake project -- local suite = test.declare("vstudio_cs2005_build_events") local cs2005 = premake.vstudio.cs2005 -- -- Setup -- local sln, prj, cfg function suite.setup() premake.escaper(premake.vstudio.vs2010.esc) sln = test.createsolution() end local function prepare(platform) prj = premake.solution.getproject(sln, 1) cs2005.buildEvents(prj) end -- -- If no build steps are specified, nothing should be written. -- function suite.noOutput_onNoEvents() prepare() test.isemptycapture() end -- -- If one command set is used and not the other, only the one should be written. -- function suite.onlyOne_onPreBuildOnly() prebuildcommands { "command1" } prepare() test.capture [[ <PropertyGroup> <PreBuildEvent>command1</PreBuildEvent> </PropertyGroup> ]] end function suite.onlyOne_onPostBuildOnly() postbuildcommands { "command1" } prepare() test.capture [[ <PropertyGroup> <PostBuildEvent>command1</PostBuildEvent> </PropertyGroup> ]] end function suite.both_onBoth() prebuildcommands { "command1" } postbuildcommands { "command2" } prepare() test.capture [[ <PropertyGroup> <PreBuildEvent>command1</PreBuildEvent> <PostBuildEvent>command2</PostBuildEvent> </PropertyGroup> ]] end -- -- Multiple commands should be separated with un-escaped EOLs. -- function suite.splits_onMultipleCommands() postbuildcommands { "command1", "command2" } prepare() test.capture ("\t<PropertyGroup>\n\t\t<PostBuildEvent>command1\r\ncommand2</PostBuildEvent>\n\t</PropertyGroup>\n") end -- -- Quotes should not be escaped, other special characters should. -- function suite.onSpecialChars() postbuildcommands { '\' " < > &' } prepare() test.capture [[ <PropertyGroup> <PostBuildEvent>' " &lt; &gt; &amp;</PostBuildEvent> </PropertyGroup> ]] end
local MediaPlayerClass = "mediaplayer_tv" local function AddMediaPlayerModel( spawnName, name, model, playerConfig ) list.Set( "SpawnableEntities", spawnName, { PrintName = name, ClassName = MediaPlayerClass, Category = "Media Player", DropToFloor = true, KeyValues = { model = model } } ) list.Set( "MediaPlayerModelConfigs", model, playerConfig ) end AddMediaPlayerModel( "../spawnicons/models/hunter/plates/plate5x8", "Huge Billboard", "models/hunter/plates/plate5x8.mdl", { angle = Angle(0, 90, 0), offset = Vector(-118.8, 189.8, 2.5), width = 380, height = 238 } ) AddMediaPlayerModel( "../spawnicons/models/props_phx/rt_screen", "Small TV", "models/props_phx/rt_screen.mdl", { angle = Angle(-90, 90, 0), offset = Vector(6.5, 27.9, 35.3), width = 56, height = 33 } ) if SERVER then -- fix for media player owner not getting set on alternate model spawn hook.Add( "PlayerSpawnedSENT", "MediaPlayer.SetOwner", function(ply, ent) if not ent.IsMediaPlayerEntity then return end ent:SetCreator(ply) local mp = ent:GetMediaPlayer() mp:SetOwner(ply) end ) end
--Installs custom functions for encrypted messages local dontPreventQueue, myKey = ... local function verifyChannel(n) return type(n) == "number" and n >= 0 and n <= 65535 end local function createConfig() local f = fs.open("/.pubKeys", "w") f.write("{}") f.close() return {} end local publicKeys = (function() local f = fs.open("/.pubKeys", "r") if f then local t = f.readAll() f.close() t = textutils.unserialize(t) if type(t) == "table" then for name, key in pairs(t) do if type(name) ~= "string" or name == "" or type(key) ~= "table" or type(key[1]) ~= "number" or key[1] == math.huge or key[1] < 1 or type(key[2]) ~= "number" or key[2] == math.huge or key[2] < 0 then return createConfig() end end return t else return createConfig() end else return createConfig() end end)() local seenIDs = {timers = {}, check = {}} local nativepullraw, nativequeue = _G.os.pullEventRaw, _G.os.queueEvent local run = coroutine.wrap(function() while true do local e = {nativepullraw()} local t = os.time() + os.day * 24000 if e[1] == "modem_message" and verifyChannel(e[3]) and verifyChannel(e[4]) and type(e[5]) == "table" and e[5]._pgram == "PSocket" and e[5].type = "secure_transmit" and type(e[5].msg) == "table" and publicKeys[e[5].from] and type(e[5].time) == "number" and e[5].time >= t and e[5].time <= (t + MSG_DELIVER_WINDOW) and e[5].msgID and tostring(e[5].msgID) and not seenIDs.check[e[5].msgID] then local comMsg = "" local isOk = true for _, part in ipairs(e[5].msg) do if type(part) ~= "number" or part >= or part < 0 then isOk = false break end local ok, v = pcall(function() return PCrypt.RSA.encrypt(part, publicKeys[e[5].from]) end) if not ok then isOk = false break end while part > 0 do comMsg = comMsg .. string.char(part % 256) part = math.floor(part / 256) * 256 end end if isOk and PCrypt.sha2.hash256(tostring(e[5].msgID):gsub("\\", "\\\\"):gsub(":", "\\:") .. ":" .. e[5].time .. ":" .. comMsg) == e[5].hash then seenIDs.check[e[5].msgID] = true seenIDs.timers[os.startTimer(MSG_DELIVER_WINDOW + 0.2)] = msgID nativequeue("secure_message", from, e[5].msg) end elseif e[1] == "timer" and seenIDs.timers[e[2]] then seenIDs.check[seenIDs.timers[e[2]]] = nil seenIDs.timers[e[2]] = nil end end end) run() _G.os.pullEventRaw = function(s) while true do local e = {nativepullraw()} run(table.unpack(e)) if not s or e[1] == s then return table.unpack(e) end end end if not dontPreventQueue then _G.os.queueEvent = function(...) if arg[1] == "secure_message" then error("Could not forage secure message event", 2) end return table.unpack(arg) end end local nativewrap = _G.peripheral.wrap _G.secureWrap = function(s) if peripheral.getType(s) ~= "modem" then return nativewrap(s) else local t = peripheral.wrap(s) if not t then return end local oldTransmit = t.transmit t.transmit = function(snd, recv, msg) if
Quest.Config.Storylines["minecraft"] ={ name = "Minecraft", id = "minecraft", desc = "Steve isn't the only guy who knows his way around a Pickaxe", quests = { [1] = { name = "Purchase a Pickaxe/Drill", desc = "Purchase a Pickaxe/Drill from the miner", func = function(ply, data) return true end }, [2] = { name = "Mine 10 Ore chunks", desc = function(data) return string.format("Mine 10 Ore chunks. You have currently mined %i/10", tonumber(data) or 0) end, func = function(ply, data) local mined = data or 0 mined = mined + 1 return (mined == 10), mined, true end }, [3] = { name = "Sell $25,000 worth of Ores", desc = function(data) return string.format("Sell $25,000 worth of Ores. You have currently sold %s/$25,000", DarkRP.formatMoney(tonumber(data) or 0)) end, func = function(ply, data, other) local sold = tonumber(data) or 0 sold = sold + (other or 0) return (sold >= 25000), sold, true end, reward = function(ply) Quest.Core.GiveStoryline(ply, "stable_income") end }, } }
--[[Modified from Daffles' Door Controller]] --Declare 'Constants' Open = 1 Closed = 0 --Input Channels DoorButtonChannel = 1 DoorTimeChannel = 2 --'Global' variables SleepTimer = 0 ButtonPressed = false --State variables DoorState = Closed function onTick() -- Read inputs button = input.getBool(DoorButtonChannel) -- If the button is pressed for the first tick since it was last pressed, then flip the state -- Also record that the button is currently pressed, so it can be ignored until it's been released and then pressed again. if button then if not ButtonPressed then -- Change the ButtonPressed flag so that this block cannot be entered again until the button is first released. ButtonPressed = true -- Change the door state to open. DoorState = Open SleepTimer = 0 end else -- When the button is released, reset the ButtonPressed flag. ButtonPressed = false end -- If the door state is 'open' then run the timer and close it when appropriate, resetting the timer when closing the door. if DoorState == Open then SleepTimer = SleepTimer + 1 output.setBool(1, true) -- when time is up, close the door. if SleepTimer >= input.getNumber(DoorTimeChannel) then output.setBool(1, false) DoorState = Closed end end end
return {'mohammed','mohikaan','mohair','mohammedaan','mohammedaans','mohammedaanse','mohammedanisme','mohairen','moheel','mohamed','mohamad','mohammad','mohr','mohan','mohnen','mohammadi','mohikanen','mohammedanen','moheels','mohamads','mohameds','mohammads','mohammeds'}
--adjust these to something sensible for your loco IDLERPM = 200 FULLRPM = 850 MAXAMPS = 1000 lspeed = 0 block = 0 slock = 0 vlock = 0 xlock = 0 pdistance = 0 sdistance = 0 bspeed = 0 wspeed = 0 twarning = 0 xwarning = 0 sbeep = 0 rbeep = 0 ksignal = 0 --Convel ConvelON = 0 ConvelSTARTING = 0 CNVtest = 0 errorled = 0 dataled = 0 CNVdisplaycode = 0 CNVcode = 0 cnv_dataerror = 0 --this is the smoke generation rate, higher means less smoke, towards 0 means maximum smoke RATE = 0.04 --this controls smoke discoloration at low power settings, 1 means dark black, higher is lighter gray COL = 4 --this controls smoke generation at high RPMs, 0 means none, 1 means a lot RPMCF = 0.3 --this controls smoke generation at high load (amperage), meaning as above AMPCF = 0.7 --this controls the blueness of the smoke, 1.2 is bluish smoke, 0.8 is brownish smoke BLNSS = 1.0 RPM_ID = 1709 RPMD_ID = 1710 AMPS_ID = 1711 -- How long to stay off/on in each flash cycle LIGHT_FLASH_OFF_SECS = 0.25 LIGHT_FLASH_ON_SECS = 0.25 -- State of flashing light gTimeSinceLastFlash = 0 gLightFlashOn = false tTimeSinceLastFlash = 0 tLightFlashOn = false tFirstLightFlash = false mTimeSinceLastFlash = 0 mLightFlashOn = false oTimeSinceLastFlash = 0 oLightFlashOn = false tTimeSinceLastUpdate = 0 htime = 0 function Initialise () gPrevRPM = 0 gPrevRPMDelta = 0 gPrevAmps = 0 Call("*:SetControlValue", "TrainBrakeControl", 0, 1) --uncomment these to randomize smoke generation for each locomotive RPMCF = math.random() AMPCF = math.random() BLNSS = 0.8 + (math.random() * 0.4) COL = math.random() * 10 RATE = math.random() / 10 Call( "BeginUpdate" ) Call( "Exhaust:SetEmitterActive", 1 ) end function OnControlValueChange ( name, index, value ) if Call( "*:ControlExists", name, index ) then Call( "*:SetControlValue", name, index, value ); end end function Update ( time ) tspeed = Call("*:GetSpeed") pdistance = (tspeed*time) + pdistance ntype, nspeed, ndistance = Call("GetNextSpeedLimit", 0, 0) dtype, dstate, ddistance, daspect = Call("GetNextRestrictiveSignal", 0, 0) xspeed = Call("*:GetCurrentSpeedLimit") sdistance = (Call("*:GetControlValue", "CNV_Sdistance", 0) - pdistance) fdistance = ((tspeed)^2 - (nspeed)^2) / (2 * 0.58) rdistance = ((tspeed)^2 - (nspeed)^2) / (2 * 0.48) wdistance = ((tspeed)^2 - (nspeed)^2) / (2 * 0.38) xdistance = ((tspeed^2)/(2*0.58)) + (6*tspeed) zdistance = ((tspeed^2)/(2*0.58)) + (3*tspeed) qdistance = ((tspeed^2)/(2*0.58)) --SysCall("ScenarioManager:ShowAlertMessageExt", tonumber(tspeed), tonumber(time), 0.2, 0) --SysCall("ScenarioManager:ShowAlertMessageExt", tonumber(CNVtest), tonumber(htime), 0.2, 0) oCNV = (math.floor(nspeed * 3.6)) oCNV = tostring(oCNV) gCNV = (math.floor(lspeed * 3.6)) gCNV = tostring(gCNV) sCNV = (math.floor(Call("*:GetControlValue", "SpeedometerKPH", 0))) sCNV = tostring(sCNV) -- Convel Inicializacao htime = htime + time if Call("*:GetControlValue", "CNVONOFF", 0) == 1 and ConvelON == 0 and ConvelSTARTING == 0 then ConvelSTARTING = 1 CNVtest = 1 CNVdisplaycode = 1 end if Call("*:GetControlValue", "CNVONOFF", 0) == 0 then ConvelON = 0 end if ConvelSTARTING == 1 then if CNVtest == 1 then if Call("*:GetControlValue", "BrakePipePressureBAR", 0) < 3 then CNVcode = 550 elseif Call("*:GetControlValue", "BrakePipePressureBAR", 0) >= 3 then CNVtest = 2 end elseif CNVtest == 2 then if Call("*:GetControlValue", "BrakePipePressureBAR", 0) < 4.2 then CNVcode = 402 elseif Call("*:GetControlValue", "BrakePipePressureBAR", 0) >= 4.2 then Call("*:SetControlValue", "TrainBrakeControl", 0, 0.9) CNVcode = 403 CNVtest = 3 end elseif CNVtest == 3 then if Call("*:GetControlValue", "BrakePipePressureBAR", 0) > 2.5 then CNVcode = 403 elseif Call("*:GetControlValue", "BrakePipePressureBAR", 0) <= 2.5 then Call("*:SetControlValue", "TrainBrakeControl", 0, 0) CNVtest = 4 CNVcode = 404 end elseif CNVtest == 4 then if Call("*:GetControlValue", "BrakePipePressureBAR", 0) < 4.2 then CNVcode = 404 elseif Call("*:GetControlValue", "BrakePipePressureBAR", 0) >= 4.2 then Call("*:SetControlValue", "TrainBrakeControl", 0, 0.9) CNVcode = 405 CNVtest = 5 end elseif CNVtest == 5 then if Call("*:GetControlValue", "BrakePipePressureBAR", 0) > 2.5 then CNVcode = 405 elseif Call("*:GetControlValue", "BrakePipePressureBAR", 0) <= 2.5 then Call("*:SetControlValue", "TrainBrakeControl", 0, 0) CNVtest = 6 CNVcode = 406 end elseif CNVtest == 6 then if Call("*:GetControlValue", "BrakePipePressureBAR", 0) < 4.2 then CNVcode = 407 elseif Call("*:GetControlValue", "BrakePipePressureBAR", 0) >= 4.2 then Call("*:SetControlValue", "TrainBrakeControl", 0, 1) CNVcode = 409 CNVtest = 7 end elseif CNVtest == 7 then if Call("*:GetControlValue", "BrakePipePressureBAR", 0) > 2.5 then CNVcode = 409 elseif Call("*:GetControlValue", "BrakePipePressureBAR", 0) <= 2.5 then Call("*:SetControlValue", "TrainBrakeControl", 0, 0) CNVtest = 8 CNVcode = 410 end elseif CNVtest == 8 then if Call("*:GetControlValue", "BrakePipePressureBAR", 0) < 4.2 then CNVcode = 700 elseif Call("*:GetControlValue", "BrakePipePressureBAR", 0) >= 4.2 then Call("*:SetControlValue", "CNV_Test", 0, 1) CNVdisplaycode = 0 errorled = 1 CNVtest = 9 end elseif CNVtest == 9 then if Call("*:GetControlValue", "CNV_Test", 0) == 1 and Call("*:GetControlValue", "CNV_DataEntry", 0) >= 0.5 then Call("*:SetControlValue", "CNV_Test", 0, 0) errorled = 0 CNVtest = 10 htime = 0 end elseif CNVtest == 10 then if htime > 3 then dataled = 1 CNVtest = 11 end elseif CNVtest == 11 then if Call("*:GetControlValue", "CNV_DataEntry", 0) >= 0.5 and ((Call("*:GetControlValue", "CNV_rotor04", 0) + Call("*:GetControlValue", "CNV_rotor05", 0)) < 8 or (Call("*:GetControlValue", "CNV_rotor04", 0) + Call("*:GetControlValue", "CNV_rotor05", 0)) > 19) then cnv_dataerror = 1 elseif Call("*:GetControlValue", "CNV_DataEntry", 0) >= 0.5 and ((Call("*:GetControlValue", "CNV_rotor04", 0) + Call("*:GetControlValue", "CNV_rotor05", 0)) >= 8 or (Call("*:GetControlValue", "CNV_rotor04", 0) + Call("*:GetControlValue", "CNV_rotor05", 0)) <= 19) then dataled = 0 cnv_dataerror = 0 ConvelSTARTING = 0 ConvelON = 1 end end end if string.len(CNVcode) == 1 then CNVcode = ("00" .. CNVcode) elseif string.len(CNVcode) == 2 then CNVcode = ("0" .. CNVcode) end _, _, cHundreds, cTens, cUnits = string.find(CNVcode, "(%d)(%d)(%d)") Call("*:SetControlValue", "CNV_Lspeed", 0, tonumber(lspeed)) gTimeSinceLastFlash = gTimeSinceLastFlash + time if (not gLightFlashOn) and gTimeSinceLastFlash >= LIGHT_FLASH_OFF_SECS then Call("*:SetControlValue", "CNV_breleaseLED", 0, 1) gLightFlashOn = true gTimeSinceLastFlash = 0 elseif gLightFlashOn and gTimeSinceLastFlash >= LIGHT_FLASH_ON_SECS then Call("*:SetControlValue", "CNV_breleaseLED", 0, 0) gLightFlashOn = false gTimeSinceLastFlash = 0 end mTimeSinceLastFlash = mTimeSinceLastFlash + time if errorled == 0 then Call("*:SetControlValue", "CNV_ErrorLED", 0, 0) elseif errorled == 1 and (not mLightFlashOn) and mTimeSinceLastFlash >= LIGHT_FLASH_OFF_SECS then Call("*:SetControlValue", "CNV_ErrorLED", 0, 1) mLightFlashOn = true mTimeSinceLastFlash = 0 elseif errorled == 1 and mLightFlashOn and mTimeSinceLastFlash >= LIGHT_FLASH_ON_SECS then Call("*:SetControlValue", "CNV_ErrorLED", 0, 0) mLightFlashOn = false mTimeSinceLastFlash = 0 end oTimeSinceLastFlash = oTimeSinceLastFlash + time if dataled == 0 then Call("*:SetControlValue", "CNV_DataentryLED", 0, 0) elseif dataled == 1 and (not oLightFlashOn) and oTimeSinceLastFlash >= LIGHT_FLASH_OFF_SECS then Call("*:SetControlValue", "CNV_DataentryLED", 0, 1) oLightFlashOn = true oTimeSinceLastFlash = 0 elseif dataled == 1 and oLightFlashOn and oTimeSinceLastFlash >= LIGHT_FLASH_ON_SECS then Call("*:SetControlValue", "CNV_DataentryLED", 0, 0) oLightFlashOn = false oTimeSinceLastFlash = 0 end if (block == 1 and tspeed > lspeed) or (slock == 1 and tspeed > bspeed) or (vlock == 1 and tspeed > 1) or (xlock == 1 and tspeed > 5) then Call("*:SetControlValue", "CNV_breleaseLED", 0, 1) elseif block == 0 and slock == 0 and vlock == 0 and xlock == 0 then Call("*:SetControlValue", "CNV_breleaseLED", 0, 0) end -- Velocimetro Digital if string.len(gCNV) == 1 then gCNV = ("00" .. gCNV) elseif string.len(gCNV) == 2 then gCNV = ("0" .. gCNV) end _, _, gHundreds, gTens, gUnits = string.find(gCNV, "(%d)(%d)(%d)") if string.len(sCNV) == 1 then sCNV = ("00" .. sCNV) elseif string.len(sCNV) == 2 then sCNV = ("0" .. sCNV) end _, _, sHundreds, sTens, sUnits = string.find(sCNV, "(%d)(%d)(%d)") Call("*:SetControlValue", "CNV_RUDigits", 0, tonumber(sUnits)) Call("*:SetControlValue", "CNV_RDDigits", 0, tonumber(sTens)) Call("*:SetControlValue", "CNV_RCDigits", 0, tonumber(sHundreds)) -- Tacografo tTimeSinceLastUpdate = tTimeSinceLastUpdate + time if tTimeSinceLastUpdate > 1 then Call("*:SetControlValue", "Taco", 0, Call("*:GetControlValue", "SpeedometerKPH", 0)) tTimeSinceLastUpdate = 0 end -- Display Principal if cnv_dataerror == 1 then Call("*:SetControlValue", "CNV_GUDigits", 0, 10) Call("*:SetControlValue", "CNV_GDDigits", 0, 11) Call("*:SetControlValue", "CNV_GCDigits", 0, 10) elseif ConvelON == 0 and CNVdisplaycode == 0 then Call("*:SetControlValue", "CNV_GUDigits", 0, 10) Call("*:SetControlValue", "CNV_GDDigits", 0, 10) Call("*:SetControlValue", "CNV_GCDigits", 0, 10) elseif ConvelSTARTING == 1 and CNVdisplaycode == 1 then Call("*:SetControlValue", "CNV_GUDigits", 0, tonumber(cUnits)) Call("*:SetControlValue", "CNV_GDDigits", 0, tonumber(cTens)) Call("*:SetControlValue", "CNV_GCDigits", 0, tonumber(cHundreds)) elseif twarning == 1 and ntype ~= 3 then tTimeSinceLastFlash = tTimeSinceLastFlash + time if tLightFlashOn == false and tTimeSinceLastFlash >= LIGHT_FLASH_OFF_SECS then Call("*:SetControlValue", "CNV_GUDigits", 0, 10) Call("*:SetControlValue", "CNV_GDDigits", 0, 10) Call("*:SetControlValue", "CNV_GCDigits", 0, 10) tLightFlashOn = true tTimeSinceLastFlash = 0 elseif tLightFlashOn == true and tTimeSinceLastFlash >= LIGHT_FLASH_ON_SECS then Call("*:SetControlValue", "CNV_GUDigits", 0, tonumber(oUnits)) Call("*:SetControlValue", "CNV_GDDigits", 0, tonumber(oTens)) Call("*:SetControlValue", "CNV_GCDigits", 0, tonumber(oHundreds)) tLightFlashOn = false tTimeSinceLastFlash = 0 end elseif twarning == 1 and ntype == 3 then tTimeSinceLastFlash = tTimeSinceLastFlash + time if tLightFlashOn == false and tTimeSinceLastFlash >= LIGHT_FLASH_OFF_SECS then Call("*:SetControlValue", "CNV_GUDigits", 0, 10) Call("*:SetControlValue", "CNV_GDDigits", 0, 10) Call("*:SetControlValue", "CNV_GCDigits", 0, 10) tLightFlashOn = true tTimeSinceLastFlash = 0 elseif tLightFlashOn == true and tTimeSinceLastFlash >= LIGHT_FLASH_ON_SECS then Call("*:SetControlValue", "CNV_GUDigits", 0, 11) Call("*:SetControlValue", "CNV_GDDigits", 0, tonumber(oTens)) Call("*:SetControlValue", "CNV_GCDigits", 0, tonumber(oHundreds)) tLightFlashOn = false tTimeSinceLastFlash = 0 end elseif xwarning == 1 then tTimeSinceLastFlash = tTimeSinceLastFlash + time if tLightFlashOn == false and tTimeSinceLastFlash >= LIGHT_FLASH_OFF_SECS then Call("*:SetControlValue", "CNV_GUDigits", 0, 10) Call("*:SetControlValue", "CNV_GDDigits", 0, 10) Call("*:SetControlValue", "CNV_GCDigits", 0, 10) tLightFlashOn = true tTimeSinceLastFlash = 0 elseif tLightFlashOn == true and tTimeSinceLastFlash >= LIGHT_FLASH_ON_SECS then Call("*:SetControlValue", "CNV_GUDigits", 0, 0) Call("*:SetControlValue", "CNV_GDDigits", 0, 0) Call("*:SetControlValue", "CNV_GCDigits", 0, 10) tLightFlashOn = false tTimeSinceLastFlash = 0 end elseif twarning == 0 and xwarning == 0 then Call("*:SetControlValue", "CNV_GUDigits", 0, tonumber(gUnits)) Call("*:SetControlValue", "CNV_GDDigits", 0, tonumber(gTens)) Call("*:SetControlValue", "CNV_GCDigits", 0, tonumber(gHundreds)) end -- Display Auxiliar if string.len(oCNV) == 1 then oCNV = ("00" .. oCNV) elseif string.len(oCNV) == 2 then oCNV = ("0" .. oCNV) end _, _, oHundreds, oTens, oUnits = string.find(oCNV, "(%d)(%d)(%d)") if ConvelON == 0 then Call("*:SetControlValue", "CNV_OUDigits", 0, 10) Call("*:SetControlValue", "CNV_ODDigits", 0, 10) Call("*:SetControlValue", "CNV_OCDigits", 0, 10) elseif ksignal == 0 and nspeed >= lspeed then Call("*:SetControlValue", "CNV_OUDigits", 0, 10) Call("*:SetControlValue", "CNV_ODDigits", 0, 10) Call("*:SetControlValue", "CNV_OCDigits", 0, 10) elseif ksignal == 0 and nspeed < lspeed and ntype ~= 3 then Call("*:SetControlValue", "CNV_OUDigits", 0, tonumber(oUnits)) Call("*:SetControlValue", "CNV_ODDigits", 0, tonumber(oTens)) Call("*:SetControlValue", "CNV_OCDigits", 0, tonumber(oHundreds)) elseif ksignal == 0 and nspeed < lspeed and ntype == 3 then Call("*:SetControlValue", "CNV_OUDigits", 0, 11) Call("*:SetControlValue", "CNV_ODDigits", 0, tonumber(oTens)) Call("*:SetControlValue", "CNV_OCDigits", 0, tonumber(oHundreds)) elseif ksignal == 1 then Call("*:SetControlValue", "CNV_OUDigits", 0, 0) Call("*:SetControlValue", "CNV_ODDigits", 0, 0) Call("*:SetControlValue", "CNV_OCDigits", 0, 10) end if ConvelON == 1 then if xspeed > (Call("*:GetControlValue", "CNV_rotor01", 0) + Call("*:GetControlValue", "CNV_rotor02", 0))/3.6 then lspeed = (Call("*:GetControlValue", "CNV_rotor01", 0) + Call("*:GetControlValue", "CNV_rotor02", 0))/3.6 else lspeed = Call("*:GetCurrentSpeedLimit") end -- Sobrevelocidade if tspeed - 1.389 > lspeed then Call("*:SetControlValue", "CNV_Overspeed", 0, 1) else Call("*:SetControlValue", "CNV_Overspeed", 0, 0) end if tspeed - 2.778 > lspeed then Call("*:SetControlValue", "TrainBrakeControl", 0, 0.9) Call("*:LockControl", "TrainBrakeControl", 0, 1) Call("*:SetControlValue", "Regulator", 0, 0) block = 1 end if block == 1 and Call("*:GetControlValue", "CNV_Brelease", 0) == 1 and tspeed < lspeed then Call("*:SetControlValue", "TrainBrakeControl", 0, 0) Call("*:LockControl", "TrainBrakeControl", 0, 0) block = 0 end -- Sobrevelocidade a velocidade objectivo if nspeed < lspeed and fdistance - ndistance >= 0 then Call("*:SetControlValue", "TrainBrakeControl", 0, 0.9) Call("*:LockControl", "TrainBrakeControl", 0, 1) Call("*:SetControlValue", "Regulator", 0, 0) bspeed = nspeed slock = 1 end if slock == 1 and Call("*:GetControlValue", "CNV_Brelease", 0) == 1 and tspeed < bspeed then Call("*:SetControlValue", "TrainBrakeControl", 0, 0) Call("*:LockControl", "TrainBrakeControl", 0, 0) slock = 0 end -- Avisos de frenagem a velocidade objectivo if nspeed < lspeed and wdistance - ndistance >= 0 then wspeed = nspeed twarning = 1 sbeep = 1 end if wspeed == lspeed then wspeed = 0 twarning = 0 end if sbeep == 1 then Call("*:SetControlValue", "CNV_Beep1", 0, 1) sbeep = 0 else Call("*:SetControlValue", "CNV_Beep1", 0, 0) sbeep = 0 end if nspeed < lspeed and rdistance - ndistance >= 0 then rbeep = 1 end if rbeep == 1 then Call("*:SetControlValue", "CNV_Beep2", 0, 1) rbeep = 0 else Call("*:SetControlValue", "CNV_Beep2", 0, 0) rbeep = 0 end -- Frenagem Sinal Fechado if vlock == 1 and Call("*:GetControlValue", "CNV_Brelease", 0) == 1 and tspeed < 1 then Call("*:SetControlValue", "TrainBrakeControl", 0, 0) Call("*:LockControl", "TrainBrakeControl", 0, 0) vlock = 0 xwarning = 0 end -- Aproximacao Sinal Fechado if ksignal == 1 and dstate == 2 then Call("*:SetControlValue", "CNV_Sdistance", 0, ddistance) pdistance = 0 ksignal = 2 elseif ksignal == 2 and sdistance < xdistance then sbeep = 1 xwarning = 1 ksignal = 3 elseif ksignal == 3 and sdistance < zdistance then rbeep = 1 ksignal = 4 elseif ksignal == 4 and sdistance < qdistance then Call("*:SetControlValue", "TrainBrakeControl", 0, 0.9) Call("*:LockControl", "TrainBrakeControl", 0, 1) Call("*:SetControlValue", "Regulator", 0, 0) xlock = 1 end if (ksignal == 4 or (ksignal == 3 and sdistance < zdistance) or (ksignal == 2 and sdistance < xdistance)) and tspeed < 4.17 then ksignal = 5 end if ksignal == 5 and tspeed > 4.17 then Call("*:SetControlValue", "CNV_Overspeed", 0, 1) elseif ksignal == 5 and tspeed <= 4.17 then Call("*:SetControlValue", "CNV_Overspeed", 0, 0) end if ksignal == 5 and tspeed > 5 then Call("*:SetControlValue", "TrainBrakeControl", 0, 0.9) Call("*:LockControl", "TrainBrakeControl", 0, 1) Call("*:SetControlValue", "Regulator", 0, 0) xlock = 1 end if xlock == 1 and Call("*:GetControlValue", "CNV_Brelease", 0) == 1 and tspeed < 5 then Call("*:SetControlValue", "TrainBrakeControl", 0, 0) Call("*:LockControl", "TrainBrakeControl", 0, 0) xlock = 0 end end -- Luzes if Call("*:GetControlValue", "Headlights", 0) == 0 then Call("ActivateNode", "farolfrente", 0) Call("Farol Frente:Activate", 0) Call("ActivateNode", "faroltras", 0) Call("Farol Tras:Activate", 0) elseif Call("*:GetControlValue", "Headlights", 0) == 1 then Call("ActivateNode", "farolfrente", 1) Call("Farol Frente:Activate", 1) Call("ActivateNode", "faroltras", 0) Call("Farol Tras:Activate", 0) elseif Call("*:GetControlValue", "Headlights", 0) == 2 then Call("ActivateNode", "farolfrente", 0) Call("Farol Frente:Activate", 0) Call("ActivateNode", "faroltras", 1) Call("Farol Tras:Activate", 1) end if Call("*:GetControlValue", "LuzCauda", 0) == 0 then Call("ActivateNode", "fvermelhofrente", 0) Call("ActivateNode", "fvermelhotras", 0) Call("Farolim Vermelho Esquerdo Frente:Activate", 0) Call("Farolim Vermelho Direito Frente:Activate", 0) Call("Farolim Vermelho Esquerdo Tras:Activate", 0) Call("Farolim Vermelho Direito Tras:Activate", 0) elseif Call("*:GetControlValue", "LuzCauda", 0) == 1 then Call("ActivateNode", "fvermelhofrente", 1) Call("ActivateNode", "fvermelhotras", 0) Call("Farolim Vermelho Esquerdo Frente:Activate", 1) Call("Farolim Vermelho Direito Frente:Activate", 1) Call("Farolim Vermelho Esquerdo Tras:Activate", 0) Call("Farolim Vermelho Direito Tras:Activate", 0) elseif Call("*:GetControlValue", "LuzCauda", 0) == 2 then Call("ActivateNode", "fvermelhofrente", 0) Call("ActivateNode", "fvermelhotras", 1) Call("Farolim Vermelho Esquerdo Frente:Activate", 0) Call("Farolim Vermelho Direito Frente:Activate", 0) Call("Farolim Vermelho Esquerdo Tras:Activate", 1) Call("Farolim Vermelho Direito Tras:Activate", 1) end if Call("*:GetControlValue", "CabLight", 0) == 0 then Call("CabLight:Activate", 0) else Call("CabLight:Activate", 1) end -- Get rpm values for this vehicle. rpm = Call( "*:GetControlValue", "RPM", 0 ) rpm_change = Call( "*:GetControlValue", "RPMDelta", 0 ) amps = Call("*:GetControlValue", "Ammeter", 0) --compute control values as ratio to max gCurRPM = (rpm - IDLERPM) / (FULLRPM - IDLERPM); gCurAmps = amps / MAXAMPS; exhaustrate = RATE - RATE * ((( gCurRPM * RPMCF ) + (( gCurAmps ) * AMPCF ))) exh_col = (( MAXAMPS - amps ) / MAXAMPS ) * COL Call( "Exhaust:SetEmitterRate", exhaustrate ) Call( "Exhaust:SetEmitterColour", exh_col, exh_col, exh_col*BLNSS ) end -- Mensagens de Baliza function OnCustomSignalMessage ( arg ) if arg == "red" then Call("*:SetControlValue", "TrainBrakeControl", 0, 1) Call("*:LockControl", "TrainBrakeControl", 0, 1) Call("*:SetControlValue", "Regulator", 0, 0) vlock = 1 ksignal = 0 xwarning = 0 elseif arg == "yellow" then ksignal = 1 xwarning = 0 elseif arg == "green" then ksignal = 0 xwarning = 0 end end
local _ = {name = "air", prob = 0} local T = {name = "ethereal:yellow_trunk", prob = 255} local t = {name = "ethereal:yellow_trunk", prob = 127} local L = {name = "ethereal:yellowleaves", prob = 255} local A = {name = "ethereal:golden_apple", prob = 115} ethereal.yellowtree = { size = {x = 9, y = 19, z = 9}, yslice_prob = { {ypos = 0, prob = 254}, {ypos = 3, prob = 254}, {ypos = 5, prob = 254}, }, data = { _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,L,A,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,L,T,L,_,_,_, _,_,_,_,L,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,L,A,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,t,_,_,_,_, _,_,_,L,T,L,_,_,_, _,_,_,_,L,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,L,t,L,_,_,_, _,_,_,_,L,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,T,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,T,_,_,_,_, _,_,_,_,L,L,_,_,_, _,_,_,_,_,_,L,L,_, _,_,_,L,_,_,_,_,_, A,L,L,L,T,L,_,_,_, _,_,_,_,_,L,_,_,_, _,_,_,_,L,_,L,L,_, _,_,L,L,L,_,_,_,_, A,L,L,L,T,L,_,_,_, _,_,_,L,T,L,_,_,_, _,_,_,_,L,_,_,_,_, _,_,_,_,T,_,_,_,_, _,_,_,_,T,_,_,_,_, _,_,_,_,T,_,_,_,_, _,_,_,T,T,_,_,_,_, _,_,_,_,T,_,_,_,_, _,_,_,_,T,T,_,_,_, _,_,_,_,T,_,_,_,_, _,_,_,T,T,_,_,_,_, _,_,_,_,T,_,_,_,_, _,_,_,_,T,T,t,_,_, _,_,_,_,T,_,T,T,L, _,_,t,T,T,_,L,L,_, L,T,T,_,T,_,_,_,_, _,L,L,_,T,T,t,_,_, _,_,_,_,T,L,T,T,L, _,_,t,T,T,L,L,L,_, L,T,T,L,T,L,_,_,_, _,L,L,_,L,A,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,T,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,L,_,_,_, _,_,_,_,T,L,L,L,A, _,_,_,L,_,_,_,_,_, _,L,L,_,_,_,_,_,_, _,_,_,_,_,L,_,_,_, _,_,_,L,T,L,L,L,A, _,_,L,L,L,_,_,_,_, _,L,L,_,L,_,_,_,_, _,_,_,_,A,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,t,_,_,_,_, _,_,_,L,T,L,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,L,t,L,_,_,_, _,_,_,L,T,L,_,_,_, _,_,_,_,L,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,L,T,L,_,_,_, _,_,_,L,L,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,L,T,L,_,_,_, _,_,_,_,L,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,A,L,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,A,L,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, _,_,_,_,_,_,_,_,_, } }
data:extend { { type = 'custom-input', name = 'picker-inventory-editor', key_sequence = 'CONTROL + SHIFT + GRAVE', consuming = 'game-only' } }
--[[ MIT License Copyright (c) 2022 Michael Wiesendanger 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 mod = rgpvpw local me = {} mod.testSoundSelfAvoidPriestEn = me me.tag = "TestSoundSelfAvoidPriestEn" local testGroupName = "SoundSelfAvoidPriestEn" local testCategory = RGPVPW_CONSTANTS.CATEGORIES.PRIEST.id function me.Test() mod.testReporter.StartTestGroup(testGroupName) me.CollectTestCases() mod.testReporter.PlayTestQueueWithDelay(function() mod.testReporter.StopTestGroup() -- asyncron finish of testgroup end) end function me.CollectTestCases() mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidChastise) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidDevouringPlague) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidHexOfWeakness) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidHolyFire) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidManaBurn) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidMindBlast) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidMindControl) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidPsychicScream) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidShadowWordDeath) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidShadowWordPain) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidSmite) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidBlackout) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidMindFlay) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidSilence) mod.testReporter.AddToTestQueueWithDelay(me.TestSoundSelfAvoidVampiricTouch) end function me.TestSoundSelfAvoidChastise() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidChastise", testCategory, "chastise" ) end function me.TestSoundSelfAvoidDevouringPlague() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidDevouringPlague", testCategory, "devouring_plague" ) end function me.TestSoundSelfAvoidHexOfWeakness() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidHexOfWeakness", testCategory, "hex_of_weakness" ) end function me.TestSoundSelfAvoidHolyFire() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidHolyFire", testCategory, "holy_fire" ) end function me.TestSoundSelfAvoidManaBurn() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidManaBurn", testCategory, "mana_burn" ) end function me.TestSoundSelfAvoidMindBlast() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidMindBlast", testCategory, "mind_blast" ) end function me.TestSoundSelfAvoidMindControl() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidMindControl", testCategory, "mind_control" ) end function me.TestSoundSelfAvoidPsychicScream() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidPsychicScream", testCategory, "psychic_scream" ) end function me.TestSoundSelfAvoidShadowWordDeath() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidShadowWordDeath", testCategory, "shadow_word_death" ) end function me.TestSoundSelfAvoidShadowWordPain() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidShadowWordPain", testCategory, "shadow_word_pain" ) end function me.TestSoundSelfAvoidSmite() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidSmite", testCategory, "smite" ) end function me.TestSoundSelfAvoidBlackout() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidBlackout", testCategory, "blackout" ) end function me.TestSoundSelfAvoidMindFlay() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidMindFlay", testCategory, "mind_flay" ) end function me.TestSoundSelfAvoidSilence() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidSilence", testCategory, "silence" ) end function me.TestSoundSelfAvoidVampiricTouch() mod.testHelper.TestSoundSpellMissedSelf( "TestSoundSelfAvoidVampiricTouch", testCategory, "vampiric_touch" ) end
--------------------------------------------------------------------------------------------------- ---game_over_menu.lua ---author: Karl ---date: 2021.8.16 ---desc: game over menu is the pause menu that is created when the player runs out of lives --------------------------------------------------------------------------------------------------- local PauseMenuManager = require("BHElib.scenes.stage.pause_menu.pause_menu") ---@class GameOverMenuManager:PauseMenuManager local M = LuaClass("menu.GameOverMenuManager", PauseMenuManager) local _init_callbacks = require("BHElib.scenes.stage.pause_menu.pause_menu_page_init_callbacks") --------------------------------------------------------------------------------------------------- ---menu manager function M:initMenuPages() local menu_pages = { {_init_callbacks.GameOverMenuTitle, "pause_page"}, } self:setupMenuPagesFromInfoArray(menu_pages, "game", LAYER_TOP) -- setup choices if any (none currently) self:setTopMenuPageToEnter() end return M
------------------------------------------ --DATA ACQUISITION AND WEB SERVICE REQUEST DHT_Humidity = 0 DHT_Temperature = 0 DHT_Quality = 0 DHT_PIN = 4 DHT_Attempt = 0 function getTempDHT() local Humidity = 0 local HumidityDec=0 local Temperature = 0 local TemperatureDec=0 local status if ( DHT_Attempt < 5 ) then DHT_Attempt = DHT_Attempt + 1 status, Temperature, Humidity, TemperatureDec, HumidityDec = dht.read(DHT_PIN) if status == dht.OK then DHT_Attempt = 0 --for the time being this sensor doesn't have decimals DHT_Temperature = Temperature DHT_Humidity = Humidity DHT_Quality = 1 elseif status == dht.ERROR_CHECKSUM then print( "DHT Checksum error." ) getTempDHT() elseif status == dht.ERROR_TIMEOUT then print( "DHT timed out." ) getTempDHT() end else DHT_Quality = 0 end print("DHT Temperature: " .. DHT_Temperature) print("DHT Humidity: " .. DHT_Humidity) print("DHT Quality: " .. DHT_Quality) end function collectData() print("-------------------") print("Executing Capture Data") print("-------------------") local timeNow = rtctime.get() timeNow = timeNow .. "000" print("Time now is " .. timeNow) getTempDHT() sendData(timeNow) end function setupMQTTClient() borkerIp = "192.168.1.220"; brokerPort = 1883; print("-------------------") print("Connecting to MQTT Broker " .. borkerIp .. ":" .. brokerPort) print("-------------------") m = mqtt.Client("BedroomBoard", 120); m:lwt("myHome/BedroomBoard/status", "offline", 0, 1); m:on("connect", function(client) m:publish("myHome/BedroomBoard/status","online",0,1, function(client) print("Updated will to online") end) end); m:on("offline", function(client) print ("offline") end); -- for TLS: m:connect("192.168.11.118", secure-port, 1) m:connect(borkerIp, brokerPort, 0, 0, function(client) print("connected") end, function(client, reason) print("failed reason: " .. reason) end) end function sendData(timeNow) print("-------------------") print("Executing Send Data") print("-------------------") local tm = rtctime.epoch2cal(timeNow) m:publish("myHome/BedroomBoard/DHT_Temperature",DHT_Temperature,0,1, function(client) print("DHT_Temperature Sent") end) m:publish("myHome/BedroomBoard/DHT_Humidity",DHT_Humidity,0,1, function(client) print("DHT_Humidity Sent") end) m:publish("myHome/BedroomBoard/DHT_Quality",DHT_Quality,0,1, function(client) print("DHT_Quality Sent") end) print("-------------------") print("Data Sent") print("-------------------") end setupMQTTClient(); print("Setting and starting the polling Timer...") tmr.alarm(2, 15000, tmr.ALARM_AUTO, function() collectData() end )
package.path = "../../lualib/?.lua;"..package.path local utils = require "utils" local mjlib = require "mjlib" local hulib = require "hulib" local function test_one() -- 6万6万6万4筒4筒4筒4条4条5条5条6条6条发发 local t = { 0,0,3, 3,2,3, 0,0,0, 0,0,0, 1,1,0, 1,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0,0, 0,0,0} if not hulib.get_hu_info(t) then print("测试失败") else print("测试成功") end end local function test_hu_sub(t, num) for j=1,16 do if j<= 9 then t[j] = t[j] + 3 else local index = j - 9 t[index] = t[index] + 1 t[index + 1] = t[index + 1] + 1 t[index + 2] = t[index + 2] + 1 end if num == 4 then local valid = true for i=1,34 do if t[i] > 4 then valid = false break end end if valid and not hulib.get_hu_info(t) then print("测试失败") utils.print_array(t) end else test_hu_sub(t, num + 1) end if j<= 9 then t[j] = t[j] - 3 else local index = j - 9 t[index] = t[index] - 1 t[index + 1] = t[index + 1] - 1 t[index + 2] = t[index + 2] - 1 end end end local function test_hu() local t = {} for i=1,33 do table.insert(t,0) end table.insert(t,2) test_hu_sub(t, 0) end local function main() local start = os.time() test_one() --test_hu() print("测试耗时",os.time() - start, "秒") end main()